forked from CEMeNT-PSAAP/MCDC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·46 lines (35 loc) · 977 Bytes
/
install.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
#!/bin/bash
# Install MC/DC module
pip install -e .
# Install MC/DC dependencies, reply "y" to conda prompt
conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y"
# Installing visualization dependencies (required via pip for osx-arm64)
pip install ngsolve distinctipy
bash patch_numba.sh
# Install or build mpi4py
if [ $# -eq 0 ]; then
conda mpi4py <<< "y"
fi
while [ $# -gt 0 ]; do
case $1 in
--hpc)
# Rename legacy compiler option in conda
s=$(which python)
s=${s//bin\/python/compiler_compat}
if [ ! -f $s/ld.bak ] && [ -f $s/ld ]; then
mv $s/ld $s/ld.bak
fi
mkdir installs; cd installs
wget https://github.com/mpi4py/mpi4py/releases/download/3.1.4/mpi4py-3.1.4.tar.gz -q
tar -zxf mpi4py-3.1.4.tar.gz
cd mpi4py-3.1.4
python setup.py install
cd ../../
rm -rf installs/
;;
--config_cont_lib)
bash config_cont_energy.sh
;;
esac
shift
done