-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-spack.sh
executable file
·29 lines (26 loc) · 1.03 KB
/
azure-spack.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
#!/bin/bash
SPACKINSTALLDIR=`pwd`
#-- change to location you prefer
#SPACKINSTALLDIR=/shared/spack
pushd $SPACKINSTALLDIR
git clone https://github.com/spack/spack.git
# hack for missing clzero flg on HB60rs https://github.com/spack/spack/issues/12896
pushd spack/lib/spack/llnl/util/cpu/
sed --in-place=.org '/\"clzero\",/d' microarchitectures.json
popd
#-- set build_jobs to 32
#-- edit this with "spack config --scope defaults edit config"
pushd spack/etc/spack/defaults/
sed --in-place=.org 's/\# build_jobs: 16/build_jobs: 32/g' config.yaml
popd
#-- set default compiler & package files
#wget https://raw.githubusercontent.com/mkiernan/azure-spack/master/compilers.yaml
#wget https://raw.githubusercontent.com/mkiernan/azure-spack/master/packages.yaml
#wget https://raw.githubusercontent.com/mkiernan/azure-spack/master/modules.yaml
mkdir -p ~/.spack/linux
cp compilers.yaml ~/.spack/linux
cp packages.yaml ~/.spack
cp modules.yaml ~/.spack
#-- setup env
echo ". ${SPACKINSTALLDIR}/spack/share/spack/setup-env.sh" >> ~/.bashrc
source ~/.bashrc