Skip to content

Commit

Permalink
Bug fix for importing neuron+mpi compiled mechanism library
Browse files Browse the repository at this point in the history
 - also added latest releases of bluepyopt and efel
  • Loading branch information
pramodk committed Mar 31, 2020
1 parent 39dbadd commit 15c67f9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion var/spack/repos/builtin/packages/py-bluepyopt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
17 changes: 17 additions & 0 deletions var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion var/spack/repos/builtin/packages/py-efel/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 15c67f9

Please sign in to comment.