-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_modules.sh
103 lines (101 loc) · 4.62 KB
/
install_modules.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash
set -e
SPACK_ARGS="--config-scope spack-config/"
echo HOME=$(pwd) # to try and avoid spack looking for .spack and my own config
module purge
module load unstable python gcc git
export SPACK_INSTALL_PREFIX=/gpfs/bbp.cscs.ch/project/proj16/NEURONFrontiers2021/hippocampus/spack/opt/spack
. spack/share/spack/setup-env.sh
NEURON_VERSION="[email protected]"
NEURON_VARIANT="+caliper~rx3d~legacy-unit"
NEURODAMUS_VERSION="[email protected]"
NEURODAMUS_VARIANT="+coreneuron"
OLFACTORY_VERSION="[email protected]"
NVHPC_VERSION="[email protected]"
PY_NETPYNE_VERSION="[email protected]"
NETPYNE_M1_VERSION="[email protected]"
# Extra constraints that are desirable for NVHPC builds and that we might as
# well use for everything.
EXTRA_CONSTRAINTS=" ^[email protected]"
EXTRA_CONSTRAINTS+=" ^caliper%gcc+adiak+cuda~fortran+gotcha~ipo+libdw~libpfm+libunwind+mpi+papi+sampler+shared~sosflow cuda_arch=70"
EXTRA_CONSTRAINTS+=" ^gettext%gcc"
EXTRA_CONSTRAINTS+=" ^[email protected]%gcc"
EXTRA_CONSTRAINTS+=" ^py-cython%gcc"
EXTRA_CONSTRAINTS+=" ^py-numpy%gcc"
EXTRA_CONSTRAINTS+=" ^readline%gcc"
EXTRA_CONSTRAINTS+=" ^m4%gcc"
EXTRA_CONSTRAINTS+=" ^pkgconf%gcc"
EXTRA_CONSTRAINTS+=" ^libiconv%gcc"
EXTRA_CONSTRAINTS+=" ^bison%gcc"
EXTRA_CONSTRAINTS+=" ^flex%gcc"
EXTRA_CONSTRAINTS+=" ^ninja%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS=" ^hdf5%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS+=" ^py-mvdtool%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS+=" ^reportinglib%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS+=" ^spdlog%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS+=" ^synapsetool%gcc"
EXTRA_CONSTRAINTS_NEURODAMUS+=" ^libsonata-report%gcc"
EXTRA_CONSTRAINTS_NETPYNE="^py-matplotlib%gcc"
EXTRA_CONSTRAINTS_NETPYNE+="^py-matplotlibscalebar%gcc"
EXTRA_CONSTRAINTS_NETPYNE+="^py-scipy%gcc"
#EXTRA_CONSTRAINTS+=" ^/jgmkyfa" # hdf5%gcc that's already installed
spack ${SPACK_ARGS} spec -IL jq
spack ${SPACK_ARGS} install jq
for nmodl in '~nmodl' '+nmodl' '+nmodl+sympy' #'+nmodl+sympy+sympyopt'
do
CORENEURON_VERSION="[email protected]"
CORENEURON_VARIANT="+caliper~report~legacy-unit${nmodl}"
if [[ ${nmodl} == *"+nmodl"* ]]
then
NMODL_SPEC=" ^[email protected]%gcc~legacy-unit ^py-jinja2%gcc ^py-sympy%gcc ^py-pyyaml%gcc"
else
unset NMODL_SPEC
fi
# Build with Intel.
NEURODAMUS_SPEC="${NEURODAMUS_VERSION}%intel${NEURODAMUS_VARIANT}"
OLFACTORY_SPEC="${OLFACTORY_VERSION}%intel"
SPACK_SPEC=" ^${NEURON_VERSION}%intel${NEURON_VARIANT}"
SPACK_SPEC+=" ^${CORENEURON_VERSION}%intel${CORENEURON_VARIANT}${NMODL_SPEC}"
SPACK_SPEC+="${EXTRA_CONSTRAINTS}"
NEURODAMUS_SPEC+="${SPACK_SPEC}${EXTRA_CONSTRAINTS_NEURODAMUS}"
OLFACTORY_SPEC+="${SPACK_SPEC}"
NETPYNE_M1_SPEC="${NETPYNE_M1_VERSION}%intel${SPACK_SPEC}"
spack ${SPACK_ARGS} spec -IL ${NEURODAMUS_SPEC}
spack ${SPACK_ARGS} install ${NEURODAMUS_SPEC}
spack ${SPACK_ARGS} spec -IL ${OLFACTORY_SPEC}
spack ${SPACK_ARGS} install ${OLFACTORY_SPEC}
spack ${SPACK_ARGS} spec -IL ${NETPYNE_M1_SPEC}
spack ${SPACK_ARGS} install ${NETPYNE_M1_SPEC}
# Build with ISPC too for Intel+NMODL+Sympy
#if [[ "${nmodl}" == "+nmodl+sympy"* ]]
#then
# NEURODAMUS_SPEC="${NEURODAMUS_VERSION}%intel${NEURODAMUS_VARIANT}"
# OLFACTORY_SPEC="${OLFACTORY_VERSION}%intel"
# SPACK_SPEC=" ^${NEURON_VERSION}%intel${NEURON_VARIANT}"
# SPACK_SPEC+=" ^${CORENEURON_VERSION}%intel+ispc${CORENEURON_VARIANT}${NMODL_SPEC}"
# SPACK_SPEC+="${EXTRA_CONSTRAINTS}"
# NEURODAMUS_SPEC+="${SPACK_SPEC}${EXTRA_CONSTRAINTS_NEURODAMUS}"
# OLFACTORY_SPEC+="${SPACK_SPEC}"
# spack ${SPACK_ARGS} spec -IL ${NEURODAMUS_SPEC}
# spack ${SPACK_ARGS} install ${NEURODAMUS_SPEC}
# spack ${SPACK_ARGS} spec -IL ${OLFACTORY_SPEC}
# spack ${SPACK_ARGS} install ${OLFACTORY_SPEC}
#fi
# Build with NVHPC/GPU support.
NEURODAMUS_SPEC="${NEURODAMUS_VERSION}%${NVHPC_VERSION}${NEURODAMUS_VARIANT}"
OLFACTORY_SPEC="${OLFACTORY_VERSION}%${NVHPC_VERSION}"
SPACK_SPEC=" ^${NEURON_VERSION}%${NVHPC_VERSION}${NEURON_VARIANT}"
SPACK_SPEC+=" ^${CORENEURON_VERSION}%${NVHPC_VERSION}${CORENEURON_VARIANT}+gpu${NMODL_SPEC}"
SPACK_SPEC+="${EXTRA_CONSTRAINTS}"
NEURODAMUS_SPEC+="${SPACK_SPEC}${EXTRA_CONSTRAINTS_NEURODAMUS}"
OLFACTORY_SPEC+="${SPACK_SPEC}"
NETPYNE_M1_SPEC="${NETPYNE_M1_VERSION}%${NVHPC_VERSION}${SPACK_SPEC}${EXTRA_CONSTRAINTS_NETPYNE}"
spack ${SPACK_ARGS} spec -IL ${NEURODAMUS_SPEC}
spack ${SPACK_ARGS} install ${NEURODAMUS_SPEC}
spack ${SPACK_ARGS} spec -IL ${OLFACTORY_SPEC}
spack ${SPACK_ARGS} install ${OLFACTORY_SPEC}
spack ${SPACK_ARGS} spec -IL ${NETPYNE_M1_SPEC}
spack ${SPACK_ARGS} install ${NETPYNE_M1_SPEC}
done
spack ${SPACK_ARGS} config blame modules
spack ${SPACK_ARGS} module tcl refresh -y --latest