-
Notifications
You must be signed in to change notification settings - Fork 355
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
Move compiled WW3 code to the case build directory #6601
Conversation
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.
Looks good. Was that warning about ww3 needing a lot of infrastructure updates wrong?
@@ -43,14 +43,23 @@ def buildlib(bldroot, installpath, case): | |||
# Define WW3 repository directories | |||
repodir = "{}/components/ww3/src".format(srcroot) | |||
modeldir = "{}/WW3/model".format(repodir) | |||
builddir = "{}/wav".format(exeroot) |
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.
Is this the CIME EXEROOT?
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.
exeroot here refers to the build directory .. i.e. in env_build.xml: entry id="EXEROOT" value="/lcrc/group/e3sm/ac.ethomas/E3SMv3/Build_ww3_test.G.v3.PiControl/build"
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.
@rljacob to clarify: this PR would then place the compiled wave code in the "..../build/wav" directory.... if this is an inappropriate place to put the compiled WW3 code - suggestions for a better place are very welcome.
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.
Thats a good place!
@jgfouca - I'm not sure it was wrong exactly - but this PR provides an easy work around by copying the parts of ww3 needed to compile the code and then changing the way WW3 finds the new code... If we wanted to avoid copying the aux, bin, and ftn directories to the build directory I think we WOULD need to do a significant overhaul of the built-in WW3 code/scripting infrastructure ... |
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.
Thanks for these changes, @erinethomas. I think this is a good strategy for handling builds with the older version of WW3 we're using.
I just had a couple really minor suggestions:
- I think
"{}/bin".format(builddir)
is more straightforward than"{}/wav/bin".format(exeroot)
- Something like
shutil.copytree(bindir_from, bindir_to)
orshutil.copytree(bindir_source, bindir_dest)
may be a little more intuitive thanshutil.copytree(bindir1, bindir)
.
Obviously, these are just cosmetic, so feel free to decide whether you want to adopt them or not.
@sbrus89 Good suggestions - changes made to improve clarity. |
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.
@erinethomas, I merged to next locally on Chrysalis and tested with e3sm_wav_developer
defined as:
"e3sm_wav_developer" : {
"time" : "0:45:00",
"tests" : (
"ERS.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
"PEM.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
"SMS_D_Ln3.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
)
},
Those tests all PASS when running ./create_test
in parallel.
closing to rename branch according to standards. |
Moved to #6663 |
WW3 code currently compiles in the source code repo. This is severely problematic and creates several issues including:
a) cluttering the source code directory
b) creating problematic 'race-conditions' when more than one case with WW3 need to be compiled (such as running test suites)
This PR simply copies the required directories from the WW3 source code repo (the aux, ftn, and bin directories) to the "build/wav" directory and compiles all WW3 code there.
The compiled .F90 and executable tar files are now located here: "/build/wav/tmp/"
The E3SM commands ./case.build and ./case.build --clean-all correctly compile and clean all WW3 code.