Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build WW3 with DEBUG for CI testing #151

Open
aekiss opened this issue May 1, 2024 · 6 comments
Open

Build WW3 with DEBUG for CI testing #151

aekiss opened this issue May 1, 2024 · 6 comments
Assignees
Labels
priority:low ww3 Related to WW3

Comments

@aekiss
Copy link
Contributor

aekiss commented May 1, 2024

@mvertens commented that they found several bugs in WW3 by building it with DEBUG - this catches bounds and floating-point errors. Sounds like we should use DEBUG for CI.

@aekiss aekiss added the ww3 Related to WW3 label May 1, 2024
@anton-seaice
Copy link
Contributor

anton-seaice commented May 1, 2024

We should probably be doing this for every component.

However it may not be straightforward. For example, when we did this for the latest OM3 build, we found a floating point exception in the dependencies - likely in the HDF5 library. (EDIT now with issue)

@ezhilsabareesh8 ezhilsabareesh8 self-assigned this May 1, 2024
@ezhilsabareesh8
Copy link
Contributor

WW3 by building it with DEBUG - this catches bounds and floating-

Thanks @aekiss, I have a doubt here, is this DEBUG related to compilation debug like setting the zero level optimisation -O0 and debug flag -g or is it related to the model debug?, for example WW3 has a debug switch WW3_T which will do additional checks and print warning messages.

@aekiss
Copy link
Contributor Author

aekiss commented May 2, 2024

I'm actually not sure what @mvertens meant by DEBUG exactly, but she didn't mention the WW3-T switch.

build.sh already builds debug versions, so we should use these for CI.

@micaeljtoliveira
Copy link
Contributor

Thanks @aekiss, I have a doubt here, is this DEBUG related to compilation debug like setting the zero level optimisation -O0 and debug flag -g or is it related to the model debug?, for example WW3 has a debug switch WW3_T which will do additional checks and print warning messages.

Note that the CMake debug build type does both things: it tweaks the compiler flags, but it also enables model specific compile options.

So if you notice there are model specific compile options, like WW3_T that are missing from the debug build, just let me know and we can add it.

@ezhilsabareesh8
Copy link
Contributor

ezhilsabareesh8 commented May 2, 2024

Thanks @micaeljtoliveira. It seems that CMake debug build is enough to create debug version of WW3. However, to enable the debug outputs in WW3, T switch is required in the compile options. It will do additional checks and print the debug outputs.

@mvertens
Copy link

mvertens commented May 2, 2024

@aekss - what I meant by DEBUG is to compile with bounds checking and floating point exception trapping. I did not mean the WW3-T switch. It sounds like you are already handling this with the CMAKE debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low ww3 Related to WW3
Projects
None yet
Development

No branches or pull requests

6 participants