-
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
Add python module load command for izumi #4116
Comments
You're supposed to load your python environment prior to running any cime commands. Doing it within cime leads to chaos. |
Under some circumstances, you need to do a module load python within cime in addition to having the right python module loaded in your own environment. e.g., I needed to add one for cheyenne for scripts_regression_tests to work correctly (#4033). I think the problem in that situation was that the overall python process (scripts_regression_tests) was spawning other CIME python processes (e.g., create_newcase), some of which were resetting the module environment according to config_machines, and this included a module reset that cleared any personally-loaded python module. I can envision other possible issues that might occur even within a single create_newcase/case.setup/case.build/case.submit workflow: CIME calls things like buildlib as a python subprocess, so these scripts might be executed with the wrong python environment under some circumstances. To deal with issues like this and other possibly unforeseen issues, I would support having an explicit module load of the correct python module. I agree with @rljacob that this mechanism can lead to chaos, though, and long-term we really need to think about #4059 . |
This is a CESM-only change (where there are already 11 explicit python module loads including 10 which appear to be loading a python 2.7 version). |
There has been a discussion over in #4117 about whether and why python 3.7 might be needed in CAM. In python 3.6.8 (default on Izumi):
In python 3.7.0:
So both in code (wanting to use duck typing to catch an input that may be a regular expression pattern) and in doctests (e.g., did a routine correctly return a regular expression match), python 3.7 offers a cleaner approach. |
add python 3.7.0 module load for izumi (CESM only) Add module load for python 3.7 on izumi for CESM in config_machines.xml. Without this update, the python version is set in cime regardless of whether a user does a module load before building. This addition ensures that CAM specifically is being built & run using python 3.7. Test suite: scripts_regression_tests.py, clean builds of CAM, CESM Test baseline: Test namelist changes: Test status: bit for bit Fixes #4116 User interface changes?: N Update gh-pages html (Y/N)?: N
To ensure CAM runs with python 3.7.0, add a module load command to the izumi section in config_machines.xml.
The text was updated successfully, but these errors were encountered: