Skip to content

Commit

Permalink
Fixes for Neurodamus and Mac instructions (#841)
Browse files Browse the repository at this point in the history
Neurodamus link dependency and Mac instructions

Neurodamus, when building in mac suffered always assumed a brew Python
Updated README.md for Mac usage

Co-authored-by: Matthias Wolf <[email protected]>
  • Loading branch information
ferdonline and matz-e committed Jul 30, 2020
1 parent 2f05748 commit a8fafd1
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 7 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,30 @@ The information for external packages is stored in
[email protected] +optimize+pic+shared: /gpfs/bbp.cscs.ch/apps/hpc/jenkins/deploy/external-libraries/2019-01-04/linux-rhel7-x86_64/gcc-6.4.0/zlib-1.2.11-w43e56tzqj
</details>

## Building software on OS X

<details>
<summary>
Install software on OS X, using Homebrew for binary packages
</summary>

On OS X the build process is very similar to Ubuntu. To avoid building
the whole stack from source we can likewise use another package manager to provide precompiled binaries.
To that end we have successfully used Homebrew. We also provide a skeleton
`packages.yaml` that you should review and adapt to your needs.

Before starting, please install brew and the required packages.
If you require Python please install a version dowloaded from
Python.org, as several issues have been found with Homebrew's Python

$ git clone https://github.com/BlueBrain/spack.git
$ mkdir ~/.spack
$ cp spack/sysconfig/mac_osx/*.yaml ~/.spack
$ . spack/share/spack/setup-env.sh
$ spack compiler find
</details>


## Using Spack for Continuous Integration on BlueBrain5

<details>
Expand Down
4 changes: 0 additions & 4 deletions etc/spack/defaults/darwin/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ packages:
# although the version number used here isn't critical
[email protected]: /usr
buildable: False
python:
paths:
[email protected]: /usr/local/opt/python3
version: [3.7.7]
111 changes: 111 additions & 0 deletions sysconfig/mac_osx/packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
packages:
autoconf:
paths:
[email protected]: /usr/local/opt/autoconf
version: [2.69]
automake:
paths:
[email protected]: /usr/local/opt/automake
version: [1.16.1]
bison:
paths:
[email protected]: /usr/local/opt/bison
version: [3.4]
boost:
paths:
[email protected]: /usr/local/opt/boost
buildable: False
bzip2:
paths:
[email protected]: /usr/local/opt/bzip
version: [1.0.6]
cairo:
paths:
[email protected]: /usr/local/opt/cairo
version: [1.8.10]
catch:
paths:
[email protected]: /usr/local/opt/catch2
version: [2.x]
cmake:
paths:
[email protected]: /usr/local/opt/cmake
buildable: False
curl:
paths:
[email protected]: /usr/local/opt/curl
version: [7.29.0]
environment-modules:
paths:
[email protected]: /usr/local/opt/modules
buildable: False
flex:
paths:
[email protected]: /usr/local/opt/flex
version: [2.6.4]
fontconfig:
paths:
[email protected]: /usr/local/opt/fontconfig
version: [2.10.95]
gettext:
paths:
[email protected]: /usr/local/opt/gettext
version: [0.20.1]
hdf5:
paths:
[email protected]+mpi: /usr/local/opt/hdf5-parallel
version: [1.12]
buildable: False
hdf5:
paths:
[email protected]~mpi: /usr/local/opt/hdf5
version: [1.12]
hwloc:
paths:
[email protected]: /usr/local/opt/hwloc
version: [1.11.2]
openblas:
paths:
[email protected]: /usr/local/opt/openblas
version: [0.3.5]
openmpi:
paths:
[email protected]: /usr/local/opt/openmpi
buildable: False
openssl:
paths:
[email protected]: /usr/local/opt/openssl
version: [1.0.2k]
pcre:
paths:
[email protected]+jit+utf: /usr/local/opt/pcre
version: [8.32]
petsc:
variants: +patchmpi64
pkg-config:
paths:
[email protected]: /usr/local/opt/pkg-config
version: [0.29.2]
python:
paths:
[email protected]+shared: /Library/Frameworks/Python.framework/Versions/3.7
version: [3.7.5]
tcl:
paths:
[email protected]: /usr
version: [8.5.13]
trilinos:
variants: +kokkos+teuchos~amesos~hypre~superlu-dist~mumps~metis~suite-sparse
version: [xsdk-0.4.0-rc1]
tk:
paths:
[email protected]: /usr
version: [8.5.13]
xz:
paths:
[email protected]: /usr/local/opt/xz
version: [5.2]
zlib:
paths:
[email protected]: /usr/local/opt/zlib
version: [1.2.11]
7 changes: 7 additions & 0 deletions var/spack/repos/builtin/packages/neurodamus-core/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ class NeurodamusCore(SimModel):
# Dont apply name for now for compat with neuron+binary
mech_name = ''

# We want neurodamus-model to fully depend on core, but no modules
# loaded at runtime. 'link' dependency requires libraries which we
# dont provide so we override libs to allow an empty LibraryList
@property
def libs(self):
return LibraryList([])

@run_before('build')
def prepare(self):
filter_file(r'UNKNOWN_CORE_VERSION', r'%s' % self.spec.version,
Expand Down
6 changes: 3 additions & 3 deletions var/spack/repos/builtin/packages/neurodamus-model/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class NeurodamusModel(SimModel):
# 'run' mode will load the same mpi module
depends_on("mpi", type=('build', 'run'))
depends_on('neurodamus-core', type=('build', 'run'))
depends_on('neurodamus-core@develop', type='build', when='@develop')
depends_on("hdf5+mpi")
depends_on('neurodamus-core@develop', type=('build', 'run'), when='@develop')
depends_on('hdf5+mpi')
depends_on('reportinglib')
depends_on('libsonata-report')
depends_on('reportinglib+profile', when='+profile')
Expand Down Expand Up @@ -153,7 +153,7 @@ def install(self, spec, prefix):

def setup_run_environment(self, env):
self._setup_run_environment_common(env)
for libnrnmech_name in find(self.prefix.lib, 'libnrnmech*.so',
for libnrnmech_name in find(self.prefix.lib, 'libnrnmech*',
recursive=False):
# We have the two libs and must export them in different vars
# - NRNMECH_LIB_PATH the combined lib (used by neurodamus-py)
Expand Down

0 comments on commit a8fafd1

Please sign in to comment.