-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.eqquasi.sh
112 lines (96 loc) · 3.98 KB
/
install.eqquasi.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
104
105
106
107
108
109
110
111
112
#! /bin/bash
# The shell script is to set up environments for EQquasi and
# install it. It will call the makefile inside src/ and generate
# an executable eqquasi and move it to bin/.
# Currently, the machines supported are:
# ls6: Lonestar6 at TACC
# ubuntu: Ubuntu 22.04
# Usage: install-eqquasi [-h] [-m Machine_name] [-c Machine_name]
set -- "$@"
while getopts "hm:c:" OPTION; do
case $OPTION in
m)
MACH=$OPTARG
;;
c)
MACH=$OPTARG
CONFIG="True"
;;
h)
echo "Usage: ./install-eqquasi.sh [-h] [-m Machine_name] [-c Machine_name] "
echo " "
echo "Examples: "
echo " "
echo "./install-eqquasi.sh -h "
echo " -----Display this help message "
echo " "
echo "./install-eqquasi.sh -m ls6 "
echo " -----Install EQquasi on Lonestar6 at TACC "
echo " "
echo "./install-eqquasi.sh -c ubuntu "
echo " -----Simply set up envs for EQquasi without installation "
echo " -----on ubuntu "
echo " "
echo "source install-eqquasi.sh "
echo " -----Activate ENV VAR EQQUASIROOT and add exes to PATH "
echo " "
echo "Currently supported machines include: "
echo " ls6/ubuntu "
;;
esac
done
if [ -n "$MACH" ]; then
export MACHINE=$MACH
if [ $MACHINE == "ls6" ]; then
echo "Installing EQquasi on Lonestar6 at TACC ... ..."
echo "Loading netcdf and mumps modules ... ..."
module load netcdf/4.6.2 mumps
ml
echo "NETCDF INC and LIB PATH"
echo $TACC_NETCDF_INC
echo $TACC_NETCDF_LIB
echo "TACC_MUMPS INC and LIB PATH"
echo $TACC_MUMPS_INC
echo $TACC_MUMPS_LIB
elif [ $MACHINE == "ubuntu" ]; then
echo "Installing EQquasi on Ubuntu 22.04 ... ..."
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
elif [ $MACHINE == "local"]; then
MUMPS_LIB_DIR="./mumps/build/local/lib"
libNames=("libdmumps.a" "libmumps_common.a" "libpord.a" "libsmumps.a")
all_exist=TRUE
for file in "${libNames[@]}"; do
if [! -f "$MUMPS_LIB_DIR/$file" ]; then
all_exist=FALSE
break
fi
done
if $all_exist; then
echo "MUMPS have been installed under ./mumps/build/local ..."
else
echo "Installing a local copy of MUMPS ..."
chmod 755 install.mumps.sh
./install.mumps.sh
fi
fi
if [ -n "$CONFIG" ]; then
echo "Simply configure EQquasi without installation ... ..."
else
cd src
make
cd ..
mkdir bin
mv src/eqquasi bin
fi
export EQQUASIROOT=$(pwd)
export PATH=$(pwd)/bin:$PATH
export PATH=$(pwd)/scripts:$PATH
echo EQQUASIROOT
echo PATH
chmod -R 755 scripts
fi
export EQQUASIROOT=$(pwd)
export PATH=$(pwd)/bin:$PATH
export PATH=$(pwd)/scripts:$PATH
echo EQQUASIROOT
echo PATH