-
Notifications
You must be signed in to change notification settings - Fork 772
{chem,data}[intel/2020a] h5py v2.10.0, yaff v1.6.0 w/ Python 3.8.2 + add patch for h5py 2.10.0 to avoid triggering MPI_Init at import #10687
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
Merged
Micket
merged 3 commits into
easybuilders:develop
from
boegel:20200526154725_new_pr_h5py2100
May 26, 2020
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
37 changes: 37 additions & 0 deletions
37
easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2020a-Python-3.8.2.eb
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| easyblock = 'PythonPackage' | ||
|
|
||
| name = 'h5py' | ||
| version = '2.10.0' | ||
| versionsuffix = '-Python-%(pyver)s' | ||
|
|
||
| homepage = 'https://www.h5py.org/' | ||
| description = """HDF5 for Python (h5py) is a general-purpose Python interface to the Hierarchical Data Format library, | ||
| version 5. HDF5 is a versatile, mature scientific software library designed for the fast, flexible storage of enormous | ||
| amounts of data.""" | ||
|
|
||
| toolchain = {'name': 'intel', 'version': '2020a'} | ||
| toolchainopts = {'usempi': True} | ||
|
|
||
| source_urls = [PYPI_SOURCE] | ||
| sources = [SOURCE_TAR_GZ] | ||
| patches = ['h5py-%(version)s_avoid-mpi-init.patch'] | ||
| checksums = [ | ||
| '84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d', # h5py-2.10.0.tar.gz | ||
| '6bacb71f5d9fbd7bd9a01018d7fe21b067a2317f33c4a7c21fde9cd404c1603f', # h5py-2.10.0_avoid-mpi-init.patch | ||
| ] | ||
|
|
||
| builddependencies = [('pkgconfig', '1.5.1', versionsuffix)] | ||
|
|
||
| dependencies = [ | ||
| ('Python', '3.8.2'), | ||
| ('SciPy-bundle', '2020.03', versionsuffix), | ||
| ('HDF5', '1.10.6'), | ||
| ] | ||
|
|
||
| use_pip = False | ||
| download_dep_fail = True | ||
|
|
||
| # to really use mpi enabled hdf5 we now seem to need a configure step, which is the reason we can't use pip | ||
| prebuildopts = 'python setup.py configure --mpi --hdf5=$EBROOTHDF5 && ' | ||
|
|
||
| moduleclass = 'data' |
85 changes: 85 additions & 0 deletions
85
easybuild/easyconfigs/h/h5py/h5py-2.10.0_avoid-mpi-init.patch
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| avoid that 'import h5py' triggers MPI_Init via mpi4py | ||
|
|
||
| backported to h5py 2.10.0 from https://github.com/h5py/h5py/pull/1552 by Kenneth Hoste (HPC-UGent) | ||
|
|
||
| diff -ru h5py-2.10.0.orig/h5py/api_types_ext.pxd h5py-2.10.0/h5py/api_types_ext.pxd | ||
| --- h5py-2.10.0.orig/h5py/api_types_ext.pxd 2019-09-06 23:29:33.000000000 +0200 | ||
| +++ h5py-2.10.0/h5py/api_types_ext.pxd 2020-05-25 19:30:30.000000000 +0200 | ||
| @@ -12,7 +12,7 @@ | ||
| include 'config.pxi' | ||
|
|
||
| IF MPI: | ||
| - from mpi4py.MPI cimport MPI_Comm, MPI_Info, Comm, Info | ||
| + from mpi4py.libmpi cimport MPI_Comm, MPI_Info | ||
|
|
||
| cdef extern from "stdlib.h": | ||
| ctypedef long size_t | ||
| @@ -52,6 +52,7 @@ | ||
| cdef extern from "Python.h": | ||
| ctypedef void PyObject | ||
| ctypedef ssize_t Py_ssize_t | ||
| + ctypedef size_t Py_uintptr_t | ||
|
|
||
| PyObject* PyErr_Occurred() | ||
| void PyErr_SetString(object type, char *message) | ||
| diff -ru h5py-2.10.0.orig/h5py/h5p.pyx h5py-2.10.0/h5py/h5p.pyx | ||
| --- h5py-2.10.0.orig/h5py/h5p.pyx 2019-09-06 23:29:33.000000000 +0200 | ||
| +++ h5py-2.10.0/h5py/h5p.pyx 2020-05-25 19:33:24.000000000 +0200 | ||
| @@ -17,6 +17,7 @@ | ||
| from cpython.buffer cimport PyObject_CheckBuffer, \ | ||
| PyObject_GetBuffer, PyBuffer_Release, \ | ||
| PyBUF_SIMPLE | ||
| +from cpython.long cimport PyLong_AsVoidPtr | ||
|
|
||
| from utils cimport require_tuple, convert_dims, convert_tuple, \ | ||
| emalloc, efree, \ | ||
| @@ -1161,7 +1162,7 @@ | ||
|
|
||
| IF MPI: | ||
| @with_phil | ||
| - def set_fapl_mpio(self, Comm comm not None, Info info not None): | ||
| + def set_fapl_mpio(self, comm, info): | ||
| """ (Comm comm, Info info) | ||
|
|
||
| Set MPI-I/O Parallel HDF5 driver. | ||
| @@ -1169,7 +1170,12 @@ | ||
| Comm: An mpi4py.MPI.Comm instance | ||
| Info: An mpi4py.MPI.Info instance | ||
| """ | ||
| - H5Pset_fapl_mpio(self.id, comm.ob_mpi, info.ob_mpi) | ||
| + from mpi4py.MPI import Comm, Info, _handleof | ||
| + assert isinstance(comm, Comm) | ||
| + assert isinstance(info, Info) | ||
| + cdef Py_uintptr_t _comm = _handleof(comm) | ||
| + cdef Py_uintptr_t _info = _handleof(info) | ||
| + H5Pset_fapl_mpio(self.id, <MPI_Comm>_comm, <MPI_Info>_info) | ||
|
|
||
|
|
||
| @with_phil | ||
| @@ -1183,20 +1189,22 @@ | ||
| """ | ||
| cdef MPI_Comm comm | ||
| cdef MPI_Info info | ||
| + from mpi4py.MPI import Comm, Info, _addressof | ||
|
|
||
| H5Pget_fapl_mpio(self.id, &comm, &info) | ||
| pycomm = Comm() | ||
| - pyinfo = Info() | ||
| - MPI_Comm_dup(comm, &pycomm.ob_mpi) | ||
| - MPI_Info_dup(info, &pyinfo.ob_mpi) | ||
| + MPI_Comm_dup(comm, <MPI_Comm *>PyLong_AsVoidPtr(_addressof(pycomm))) | ||
| MPI_Comm_free(&comm) | ||
| + | ||
| + pyinfo = Info() | ||
| + MPI_Info_dup(info, <MPI_Info *>PyLong_AsVoidPtr(_addressof(pyinfo))) | ||
| MPI_Info_free(&info) | ||
|
|
||
| return (pycomm, pyinfo) | ||
|
|
||
|
|
||
| @with_phil | ||
| - def set_fapl_mpiposix(self, Comm comm not None, bint use_gpfs_hints=0): | ||
| + def set_fapl_mpiposix(self, comm, bint use_gpfs_hints=0): | ||
| """ Obsolete. | ||
| """ | ||
| raise RuntimeError("MPI-POSIX driver is broken; removed in h5py 2.3.1") | ||
42 changes: 42 additions & 0 deletions
42
easybuild/easyconfigs/y/yaff/yaff-1.6.0-intel-2020a-Python-3.8.2.eb
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Updated from previous config | ||
| # Author: Pavel Grochal (INUITS) | ||
| # License: GPLv2 | ||
| # | ||
| # Building this in interactive Slurm session will result in freeze during either | ||
| # runtest phase or sanity_check_commands phase (python -c 'import yaff') | ||
| # | ||
| # If you submit this as non-interactive Slurm job, it will build just fine. | ||
| # Possibly root cause: https://github.com/h5py/h5py/issues/917 | ||
| # | ||
| easyblock = 'PythonPackage' | ||
|
|
||
| name = 'yaff' | ||
| version = '1.6.0' | ||
| versionsuffix = '-Python-%(pyver)s' | ||
|
|
||
| homepage = 'https://molmod.github.io/yaff/' | ||
| description = """Yaff stands for 'Yet another force field'. It is a pythonic force-field code.""" | ||
|
|
||
| toolchain = {'name': 'intel', 'version': '2020a'} | ||
|
|
||
| source_urls = ['https://github.com/molmod/yaff/releases/download/%(version)s'] | ||
| sources = [SOURCE_TAR_GZ] | ||
| checksums = ['a266ab032778e37bb2e93152aefb67f396827aa728151651403984429c74ceaa'] | ||
|
|
||
| dependencies = [ | ||
| ('Python', '3.8.2'), | ||
| ('h5py', '2.10.0', versionsuffix), | ||
| ('molmod', '1.4.5', versionsuffix), | ||
| ] | ||
|
|
||
| use_pip = True | ||
| download_dep_fail = True | ||
| sanity_pip_check = True | ||
|
|
||
| # required because we're building a Python package using Intel compilers on top of Python built with GCC | ||
| check_ldshared = True | ||
|
|
||
| runtest = "export MATPLOTLIBRC=$PWD; echo 'backend: agg' > $MATPLOTLIBRC/matplotlibrc; " | ||
| runtest += "python setup.py build_ext -i; nosetests -v" | ||
|
|
||
| moduleclass = 'chem' |
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.
Uh oh!
There was an error while loading. Please reload this page.