-
Notifications
You must be signed in to change notification settings - Fork 247
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
CMake build for WW3 fails when compiling S2SW with -DDEBUG=ON #1133
Comments
So, UFS adds ufs-weather-model/cmake/GNU.cmake Line 12 in af1e026
Just need a way to undo that in the WW3 layer. Or change the variable name. |
I did make a fix which changed the variable name. That worked, but I wasn't sure if that was the easiest route. |
There's the CMake function |
@kgerheiser I'm going to take over the testing for Matt on this. I might have just missed something in the chain, but if we add the remove_definitions(-DDEBUG) would we then need to add something else at the UFS level so that WW3 does in fact use debug flags if UFS is saying to use debug flags? |
I don't think any other changes are necessary. If you add WW3 will still pick up But you may want to clear because WW3 has its own debug flags. |
I think we want a way to retain the UWM debug flags (for example I don't understand CMake enough to really follow the logic you're suggesting above. |
What would the right combination of the two be where WW3 has the model specific compile flags it needs (eg "-assume byterecl") while being responsive to the over-all coupled model build/flag decisions? |
It should be fine to keep the UFS debug flags as well. They'll be appended in addition to the native WW3 debug flags. When you set the debug build, it sets ufs-weather-model/CMakeLists.txt Line 97 in af1e026
which tells CMake to build with debug flags and uses the flags provided in the variable I was saying to clear the flags provided by UFS and only use the native WW3 debug flags, just to avoid any conflicts like when UFS sets |
@JessicaMeixner-NOAA WW3 uses You can leave it as it currently is (and undo the |
@kgerheiser that would be fine. I misunderstood a comment to be replacing instead of adding to. Adding to is great. The -assume byterecl is the most key//unique WW3 flag and would be my biggest cause of concern. |
I created a PR to @DeniseWorthen's mesh cap branch. DeniseWorthen/WW3#3 |
Thanks for the quick fix. This seems to have worked; these are the arguments used to compile the source code
|
Yeah, some duplicated flags, but that doesn't matter. |
The fix from Kyle for this is in: There is no expectation that any answers will change. I will start running regression tests on all machines I have access to (hera, orion, gaea, WCOSS-DELL, WCOSS-cray) and run the following oRT test: I hope to have a PR submitted by the end of the day. If a preview of the PR is wanted before I've finished the tests, I'm happy to do that too. |
Description
Compiling UWM app S2SW in debug mode fails with a conflict between compile flag -DDEBUG=ON used at the app level and an internal WW3 variable named DEBUG
To Reproduce:
Check out current develop branch. Compile S2SW in debug mode:
The compile log shows a compile failure
The source code shows that the "1" is a replacement for the WW3 variable
DEBUG
The text was updated successfully, but these errors were encountered: