-
Notifications
You must be signed in to change notification settings - Fork 4
/
spack_setup.sh
executable file
·53 lines (40 loc) · 1.36 KB
/
spack_setup.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
#! /bin/bash
# exit on errors
set -e
# avoid problems with splitting lib and lib64
unset CONFIG_SITE
# check that spack is available
if ! command -v spack &> /dev/null
then
echo "spack could not be found, please check your installation"
exit 1
fi
# install the spack environment
spack env activate spack_env
spack concretize -f
spack install
# link packages in PLAT_THIRD_PARTY
mkdir -p PLAT_THIRD_PARTY
hdf5_dir=$(spack location -i hdf5)
echo "linking hdf5 from ${hdf5_dir}"
ln -sf ${hdf5_dir} PLAT_THIRD_PARTY/hdf5
med_dir=$(spack location -i salome-med)
echo "linking med from ${med_dir}"
ln -sf ${med_dir} PLAT_THIRD_PARTY/med
medcoupling_dir=$(spack location -i salome-medcoupling)
echo "linking medcoupling from ${medcoupling_dir}"
ln -sf ${medcoupling_dir} PLAT_THIRD_PARTY/medcoupling
openmpi_dir=$(spack location -i openmpi)
echo "linking openmpi from ${openmpi_dir}"
ln -sf ${openmpi_dir} PLAT_THIRD_PARTY/openmpi
petsc_dir=$(spack location -i petsc)
echo "linking medcoupling from ${petsc_dir}"
ln -sf ${petsc_dir} PLAT_THIRD_PARTY/petsc
# link packages in PLAT_CODES
mkdir -p PLAT_CODES
libmesh_dir=$(spack location -i libmesh)
echo "linking libmesh from ${libmesh_dir}"
ln -sf ${libmesh_dir} PLAT_CODES/libmesh
# create empty libraries to satisfy femus dependencies
ar cru PLAT_THIRD_PARTY/petsc/lib/libfblas.a
ar cru PLAT_THIRD_PARTY/petsc/lib/libflapack.a