-
Notifications
You must be signed in to change notification settings - Fork 214
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
case.build --clean lnd
and --clean-depends lnd
don't work for shared lnd lib
#3286
Comments
Side note: given how frequently issues arise with the shared land build: Long-term, I am tempted to suggest getting rid of this mechanism, and instead expanding the mechanism that @jgfouca has started to put in place to share the entire executable between tests. We would need to think more about how to leverage this from our test suites, to set up build subsets that can use a single build (because we can't get away with just one build: we need separate builds for debug vs. non-debug and a few other attributes). |
From CIME telecon: preferred way for anything new is to use |
Besides just passing COMP_LND (as was done in the previous commit), we also need to reference the correct path for './case.build --clean lnd' (the previous commit was sufficient to fix '--clean-depends lnd' but not '--clean lnd'). Resolves ESMCI#3286
Fix clean build for CLM Fixes so that ./case.build --clean-depends lnd and ./case.build --clean lnd work for cases with CLM, whose build is in the shared build area. Test suite: scripts_regression_tests in progress on cheyenne (I'll update the PR if there are failures). Also: In a case with CLM (SMS_D_Ld1_P4x1.f10_f10_musgs.I2000Clm50BgcCropQianRsGs.bishorn_gnu.clm-default): ./case.build --clean-depends lnd Observed that Srcfiles was removed from the right place ./case.build --clean lnd Observed that all files were moved from the clm/obj directory in the shared build space Similar testing for SMS_D.f09_g17_gl4.T1850G.bishorn_gnu, which uses dlnd, and thus does NOT use the shared land space Test baseline: N/A Test namelist changes: none Test status: bit for bit Fixes #3286 User interface changes?: N Update gh-pages html (Y/N)?: N Code review:
Besides just passing COMP_LND (as was done in the previous commit), we also need to reference the correct path for './case.build --clean lnd' (the previous commit was sufficient to fix '--clean-depends lnd' but not '--clean lnd'). Resolves #3286
When running
./case.build --clean lnd
or./case.build --clean-depends lnd
, the land build is not cleaned if using a shared land build (as is standard for CESM). It looks like the problem is thatCOMP_LND
isn't passed to the make command if you're doing a clean, and some Makefile logic depends on that in order to determine where the land build resides.Steps to reproduce:
Create a case in CESM that includes CLM (e.g., an I compset; e.g.,
SMS_D.f10_f10_musgs.I2000Clm50BgcCropQianRsGs.cheyenne_gnu
)Run
./case.build
if not already doneRun
./case.build --clean lnd
and/or./case.build --clean-depends lnd
.Observe that the relevant build files have NOT been removed (e.g., somewhere like
bld/gnu/mpich/debug/nothreads/mct/mct/noesmf/clm/obj
; I'm not sure if that's exactly the right path on cheyenne - e.g., the mpich might be something else)Optionally, in the Makefile, introduce the following diffs to further observe the issue:
then rerun
./case.build --clean-depends lnd
and take a look at the contents of~/makeout
: you should see thatCOMP_LND
is an empty string,USE_SHARED_CLM
is FALSE, andLNDOBJDIR
points to the location that's used in the non-shared-build case.I started to look into how to fix this, but wasn't sure exactly how to proceed. My first thought was to add
COMP_LND
to the_CMD_ARGS_FOR_BUILD
variable set near the top of build.py:cime/scripts/lib/CIME/build.py
Lines 12 to 18 in 1529bac
But then I noticed that, when doing the build, these COMP values are passed in via the environment:
cime/scripts/lib/CIME/build.py
Line 451 in 1529bac
So that made me wonder if the preferred method would be to add the necessary environment variables when calling case.build with the
--clean
or--clean-depends
argument.@jedwards4b or @jgfouca can you provide any guidance here?
The text was updated successfully, but these errors were encountered: