-
Notifications
You must be signed in to change notification settings - Fork 12
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
Katec/derecho update #58
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit updates CISM to be python3 compatible and the test cases be bit for bit with the "python2" version of CISM with the exception of the ross test case which is not bit for bit for the creation in the netCDF input file. This is the last commit that will ensure bit for bit with code using python2. The reason the ross case is not bit for bit depends on how some computation is now performed in Python3 and updated package version. In particular, for this test I did the following: A. I made the number of decimal points be trimmed to 3 for the velocity variable in the python3 version B. I manually specified the option dtype=float to the call to numpy.sin in the python3 version Doing A and B lead to bit for bit results with python2 counterpart. However, doing the multiplication of the corrected instances in A and B (i.e., velocity*numpy.sin(azimuth, dtype=float)) did not lead to bit for bit results with the python2 counterpart.
This commit removes the bit-for-bit compatibility with python2. The reason is due to the precision python3 writes to the config file which now contains more digits than python2. This led to minor differences in the outputs. This commit should be used as a new baseline for future code development comparison.
This commit contains additional changes towards adding flexibility for future python release. In particular the option parser (which is deprecated since version 3.2) is replaced by argument parser. In the ISMIP-HOM test case, the plotISMIP_HOM.py had to be slightly modified: a. The "reduce" function now needs to be imported from the "functools" module. b. The "map" function now returns an object as opposed to a list. While this had no big influences in this code, it did in the "read" function defined in this script and it had to be replaced by a list comprehension on line 222. In addition it seems that the map function in python2 could skip empty lines when reading through a text file. It's no longer the case in python3 and I had to add a check on line 219 to avoid an error.
Leguy/update toward cism3
The Intel compiler has been taking a long time to build glide_io.F90. Some testing showed that this is because 'use glide_types' and three other use statements were repeated in each of a large number of accessor subroutines. For some reason, this hasn't been an issue on the Gnu compiler. I modified ../utils/generate_ncvars.py and ../libglimmer/ncdf_template.in so that these 'use' statements appear only at the top of the glide_io module. With this change, the Intel build time on derecho with 8 cores ('make -j 8') decreases from about 4:40 to 1:10, a welcome improvement.
Removed redundant 'use' statements that slowed the Intel build
Ktc/fixin slap
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding build for Derecho, adding Gunter's changes to the python scripts.
Updates to old SLAP code to close issue #47 and issue #26 . Fixed missing use statement. Updated all tests to python 3.