-
Notifications
You must be signed in to change notification settings - Fork 213
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
Major progress converting perl to python: case.build and check_input_… #61
Conversation
…data Things to note: 1) Machines will now need to specific python information in the modules section of config_machines.xml 2) Fix a few mistakes in config_component.xml, errant ">" character 3) Implemented Case class from perl-OO branch * This should replace xmlquery/xmlchange 4) Had to get rid of XML version in xmlchange. This was causing XML files to diff between locked files. This restriction can go away once everything is using Case. 5) New python tools that need to be in caseroot are symlinked instead of copied. This makes it so all the python/utils don't have to be copied. 6) Add classes for all the env*.xml files. They all inherit from a common base class to reduce code duplication. 7) Add new env_module module to replace ModuleLoader.pm
I will annotate to help you review. |
help="Case directory to build") | ||
|
||
parser.add_argument("-t", "--testmode", action="store_true", | ||
help="Unknown TODO") |
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.
Wasn't sure what this option means.
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.
Oops that was a different option. Some of the tests require multiple model builds, to accommodate that we have a case.test_build script. If you are in a test that requires multiple builds and do not run case.build from case.test_build it will throw an error.
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.
OK, added comment.
Review complete, no major concerns. |
os.environ["SMP"] = "FALSE" | ||
|
||
# TODO - Special case for clm? | ||
# TODO - bldroot? |
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'm trying to understand how bldroot works in this algorithm. It looks like it might be left as empty string in many cases in the perl version. Is this right?
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 if it's empty the default setting of EXEROOT is used
I haven't been following this too closely (don't have time), but if you're using Python 2 specifically I recommend using the shebang: #!/usr/bin/env python2 instead of #!/usr/bin/env python There are a few weird cases (e.g. some Linux distributions) where |
In the postprocessing scripts, we actually go a little further with the #!/usr/bin/env python from future import print_function import sys check the system python version and require 2.7.x or greaterif sys.hexversion < 0x02070000: On Tue, Feb 16, 2016 at 2:17 PM, Sean Patrick Santos <
Alice Bertini |
Superceded by PR #62 |
@quantheory or @bertinia , please make a github issue about verifying python versions so it doesn't get lost in the PR review comments. |
@quantheory , python2 is probably better. The one problem, which I immediately noticed, is that emacs was not smart enough to load python-mode after this change was made. It was easy to fix in my .emacs file after some googling, but it might trip up other users. |
now duplicate MPI communicators in init_intracomm
…data
Things to note:
section of config_machines.xml
-This should replace xmlquery/xmlchange
files to diff between locked files. This restriction can go away
once everything is using Case.
of copied. This makes it so all the python/utils don't have to be copied.
base class to reduce code duplication.