From 15c67f98824ef3b70f5f112c3035b0cefe21344f Mon Sep 17 00:00:00 2001 From: Pramod Kumbhar Date: Tue, 31 Mar 2020 22:39:47 +0200 Subject: [PATCH] Bug fix for importing neuron+mpi compiled mechanism library - also added latest releases of bluepyopt and efel --- .../builtin/packages/py-bluepyopt/package.py | 8 +++++++- .../packages/py-bluepyopt/pmi_rank.patch | 17 +++++++++++++++++ .../repos/builtin/packages/py-efel/package.py | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/package.py b/var/spack/repos/builtin/packages/py-bluepyopt/package.py index 9a3576b4c9e52f..848bbdda6294f8 100644 --- a/var/spack/repos/builtin/packages/py-bluepyopt/package.py +++ b/var/spack/repos/builtin/packages/py-bluepyopt/package.py @@ -10,12 +10,18 @@ class PyBluepyopt(PythonPackage): """Bluebrain Python Optimisation Library""" homepage = "https://github.com/BlueBrain/BluePyOpt" - url = "https://pypi.io/packages/source/b/bluepyopt/bluepyopt-1.6.56.tar.gz" + url = "https://pypi.io/packages/source/b/bluepyopt/bluepyopt-1.9.27.tar.gz" + # NOTE : while adding new release check pmi_rank.patch compatibility + version('1.9.27', sha256='4cce15b92b32311c808cae5e005b664deb6e8dc5df4ca13ea7b59252ae346522') + version('1.8.68', sha256='b9d432840aab89d4863c935d3dc604816441eba02d731422b92056cee751ca9c') version('1.6.56', sha256='1c57c91465ca4b947fe157692e7004a3e6df02e4151e3dc77a8831382a8f1ab9') version('1.8.68', sha256='b9d432840aab89d4863c935d3dc604816441eba02d731422b92056cee751ca9c') version('1.9.12', sha256='7b623ab9168f460a85d952719ca5249248fc95e6f7a02658b0673b2baa0a8fc6') + # patch required to avoid hpe-mpi linked mechanism library + patch("pmi_rank.patch", when="@1.9.27:") + variant('neuron', default=True, description="Use BluePyOpt together with NEURON") depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch new file mode 100644 index 00000000000000..21a73849b28683 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch @@ -0,0 +1,17 @@ +diff --git a/bluepyopt/ephys/simulators.py b/bluepyopt/ephys/simulators.py +index e71ad8b..3c93237 100644 +--- a/bluepyopt/ephys/simulators.py ++++ b/bluepyopt/ephys/simulators.py +@@ -89,6 +89,12 @@ class NrnSimulator(object): + NrnSimulator._nrn_disable_banner() + self.banner_disabled = True + ++ # certain mpi libraries (hpe-mpt) use PMI_RANK env variable to initialize ++ # MPI before calling MPI_Init (which is undesirable). Unset this variable ++ # if exist to avoid issue with loading neuron and mechanism library. ++ if 'PMI_RANK' in os.environ: ++ os.environ.pop("PMI_RANK") ++ + import neuron # NOQA + + return neuron diff --git a/var/spack/repos/builtin/packages/py-efel/package.py b/var/spack/repos/builtin/packages/py-efel/package.py index 718b54efd27ef5..72a9346112be95 100644 --- a/var/spack/repos/builtin/packages/py-efel/package.py +++ b/var/spack/repos/builtin/packages/py-efel/package.py @@ -16,8 +16,9 @@ class PyEfel(PythonPackage): features to be calculated. The library will then extract the requested features and return the values to the user.""" homepage = "https://github.com/BlueBrain/eFEL" - url = "https://pypi.io/packages/source/e/efel/efel-3.0.70.tar.gz" + url = "https://pypi.io/packages/source/e/efel/efel-3.0.80.tar.gz" + version('3.0.80', sha256='daad2a0fd98643e649f8556412b25502c35294ca8435625f87fb1de9bb060e08') version('3.0.70', sha256='3f3368012cdec5ca7d5551cea35b30a53befd0c0c740fc535209f840616c07b1') version('3.0.22', sha256='97b2c1a0425b12cd419e8539bb1e936ce64c4e93f5d0dd7f81f38554490064a2')