-
Notifications
You must be signed in to change notification settings - Fork 212
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
Copy only necessary cmake macros to case #4492
Conversation
This implementation makes some assumptions about the context of /.../Macros.cmake, so I am only turning this on for E3SM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything here that limits this to e3sm. Please just add two more files and this will apply to both models.
CIME/case/case_setup.py
Outdated
|
||
# This impl is coupled to contents of Macros.cmake | ||
macros = [ | ||
"universal.cmake", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you should include cesm. To do that you just need to add a couple more files:
${OS}.cmake
${COMPILER}_${OS}.cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jedwards4b , I am happy to do so. I don't have access to you guys' Macros.cmake file, so I didn't know for sure if it had been changed to load different patterns. I will change it so that it works for both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our Macros.cmake file is generated in cime/CIME/build.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedwards4b , are you sure? I can see where the Makefile macros are generated (from the Cmake ones) but I think the cmake ones need to exist already:
cmake_macro = os.path.join(caseroot, "Macros.cmake")
expect(
os.path.exists(cmake_macro),
"Cannot generate Makefile macro without {}".format(cmake_macro),
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - I just tried a build with this PR and it works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedwards4b , great. So do you approve of this PR now?
This implementation makes some assumptions about the context of /.../Macros.cmake, so I am only turning this on for E3SM.
I think this is a nice improvement. This will reduce the number of macros that get copied from nearly 100 to just a handful, making it easier for the user to view and edit their macros from the case.
Test suite: by-hand
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]
Fixes [CIME Github issue #]
User interface changes?:
Update gh-pages html (Y/N)?: