diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2019b-Python-3.7.4.eb index 6fd9a432b6e..a6a689db5f9 100644 --- a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2019b-Python-3.7.4.eb @@ -14,7 +14,11 @@ toolchainopts = {'usempi': True} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -checksums = ['84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d'] +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)] diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2020a-Python-3.8.2.eb b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2020a-Python-3.8.2.eb index 2965e1735c6..1b2202193d9 100644 --- a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2020a-Python-3.8.2.eb +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-foss-2020a-Python-3.8.2.eb @@ -14,7 +14,11 @@ toolchainopts = {'usempi': True} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -checksums = ['84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d'] +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)] diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-fosscuda-2019b-Python-3.7.4.eb index 915042b665c..e6885265b40 100644 --- a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-fosscuda-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-fosscuda-2019b-Python-3.7.4.eb @@ -14,7 +14,11 @@ toolchainopts = {'usempi': True} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -checksums = ['84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d'] +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)] diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2019b-Python-3.7.4.eb index 0d47cb50d7b..b682a8c51c2 100644 --- a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2019b-Python-3.7.4.eb +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2019b-Python-3.7.4.eb @@ -14,7 +14,11 @@ toolchainopts = {'usempi': True} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -checksums = ['84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d'] +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)] diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2020a-Python-3.8.2.eb b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2020a-Python-3.8.2.eb new file mode 100644 index 00000000000..d7b78c733fa --- /dev/null +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0-intel-2020a-Python-3.8.2.eb @@ -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' diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.10.0_avoid-mpi-init.patch b/easybuild/easyconfigs/h/h5py/h5py-2.10.0_avoid-mpi-init.patch new file mode 100644 index 00000000000..98034776400 --- /dev/null +++ b/easybuild/easyconfigs/h/h5py/h5py-2.10.0_avoid-mpi-init.patch @@ -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, _comm, _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, PyLong_AsVoidPtr(_addressof(pycomm))) + MPI_Comm_free(&comm) ++ ++ pyinfo = Info() ++ MPI_Info_dup(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") diff --git a/easybuild/easyconfigs/y/yaff/yaff-1.6.0-intel-2020a-Python-3.8.2.eb b/easybuild/easyconfigs/y/yaff/yaff-1.6.0-intel-2020a-Python-3.8.2.eb new file mode 100644 index 00000000000..53973f4809c --- /dev/null +++ b/easybuild/easyconfigs/y/yaff/yaff-1.6.0-intel-2020a-Python-3.8.2.eb @@ -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'