-
Notifications
You must be signed in to change notification settings - Fork 283
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
update LAMMPS easyblock for LAMMPS/23Jun22 #2213
update LAMMPS easyblock for LAMMPS/23Jun22 #2213
Conversation
Dependency YAFF is not compatible with the newer h5py yet. I turned the YAFF extension off rather than try to deal with downgrades or other hacky nonsense. Eventually YAFF will catch up and we can turn it back on. |
Hi. I have updated the easyblock, and it builds now both 3Mar20 and 29Sep21 releases (and, therefore, 22Oct20 should also work). I could submit my changes to this PR, but not sure how to do that. So, could you check the attached easyblock? (which needs to be renamed to 'lammps.py') |
Sorry, I did take an initial look at this but I haven't had time to incorporate it yet (and won't for at least another two weeks). The one point I would raise is that it is likely that your version comparisons is not working correctly. LAMMPS has unfortunate versions which looseversion is unlikely to get right. At least it is predictable though, I think we will need to implement a version mapping function that will translate |
For version translation, something like this would work: import re
def translate_version(version):
items = [x for x in re.split('(\d+)', version) if x]
if len(items) != 3:
raise ValueError("Version %s does not have 3 elements" % version)
month_map = {"JAN": '01', "FEB": '02', "MAR": '03', "APR": '04', "MAY": '05', "JUN": '06', "JUL": '07', "AUG": '08', "SEP": '09', "OCT": '10', "NOV": '11', "DEC": '12'}
return items[2] + month_map[items[1].upper()] + items[0] |
Thanks for the hint and for the function template! I thought LoosVersion would work with any format, but let me add and test this function into lammps.py. I will just re-attach an updated version later. |
I tested it out just to be sure: [ocaisa@xlnode1 ~]$ python -c "from distutils.version import LooseVersion; print(LooseVersion('28Sep2021') > LooseVersion('29Sep2020'))"
False |
yeah, I have also seen it! So, the function you suggested did work, and here is an updated file |
I tested this for the |
…ld-easyblocks into lammps_allow_disable_cuda
Test report by @ocaisa Overview of tested easyconfigs (in order)
Build succeeded for 0 out of 1 (1 easyconfigs in total) |
Co-authored-by: Simon Branford <4967+branfosj@users.noreply.github.com>
Test report by @branfosj Overview of tested easyconfigs (in order)
Build succeeded for 0 out of 1 (1 easyconfigs in total) |
easybuild/easyblocks/l/lammps.py
Outdated
python_dir = get_software_root('Python') | ||
if python_dir: | ||
python_short_version = '.'.join(get_software_version('Python').split('.')[:2]) | ||
python_lib = glob.glob("%s/lib*/libpython%s.so" % (python_dir, python_short_version))[0] |
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.
For Python 3.7 (2019b) the library is libpython3.7m.so
, which is why I see #2213 (comment)
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.
Goes off to recall how to include an optional m
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.
python -c "import sysconfig; print(sysconfig.get_config_var('abiflags'))"
Is from https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/p/python.py#L511 - i.e. how we check for the right library in the Python easyblock.
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.
Urgh, I should have waited before committing 9f9591b, will fix now
Test report by @ocaisa Overview of tested easyconfigs (in order)
Build succeeded for 0 out of 1 (1 easyconfigs in total) |
Test report by @ocaisa Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
Test report by @branfosj Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 3 (3 easyconfigs in total) |
@branfosj Both of those builds are failing on the same issue:
Could that be true? Am I picking up the wrong Python include path? |
Urgh, yeah, the files are in a subdirectory...grr |
Failed runs with Python 3.7.4, the relevant parts are:
Success with Python 3.8.2:
Location of
Ah, in the actual build lines 2019b the only Python include is:
but for 2020a we've gained an extra include path:
However, I am not seeing information in the log as to what caused that extra include to appear for 2020a. |
Test report by @ocaisa Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
Test report by @branfosj Overview of tested easyconfigs (in order)
Build succeeded for 3 out of 3 (3 easyconfigs in total) |
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.
lgtm
Going in, thanks @ocaisa! |
This easyblock supports the patch release
22Oct20
of LAMMPS, which is rc2 for the next stable release.Unfortunately it is not currently backwards compatible so is a WIP until we figure that out.UPDATE:
This now supports the latest stable version of LAMMPS (
23Jun2022
)