-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathArmadillo-10.4.0_install
executable file
·51 lines (38 loc) · 1.28 KB
/
Armadillo-10.4.0_install
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
#!/usr/bin/env bash
###############################################
# Installing Armadillo C++ Library 10.4.0 with GCC 10.2.0
#
# by Brian Alston, April 2021
set -e
export PATH=$INSTALL_PREFIX/bin:$PATH
dirname=$(dirname $0 2>/dev/null || pwd)
INCLUDES_DIR=${INCLUDES_DIR:-${dirname}/includes}
source ${INCLUDES_DIR}/module_maker_inc.sh
source ${INCLUDES_DIR}/require_inc.sh
temp_dir=`mktemp -d -p /dev/shm`
cd $temp_dir
require gcc-libs/10.2.0
require compilers/gnu/10.2.0
require openblas/0.3.13-native-threads/gnu-10.2.0
require arpack-ng/3.8.0-threaded/gnu-10.2.0
require superlu/5.2.1/gnu-10.2.0
require cmake/3.19.1 # needs >=2.8.12
VERSION=${VERSION:-10.4.0}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/Armadillo/${VERSION}-${COMPILER_TAG} }
MD5=${MD5:-9479b5ec68c0cc6b56abb0fbbd590faa}
SRC_ARCHIVE=${SRC_ARCHIVE:-http://sourceforge.net/projects/arma/files/armadillo-${VERSION}.tar.xz}
INSTALL_ARCHIVE=${INSTALL_ARCHIVE:-armadillo-${VERSION}.tar.xz}
wget $SRC_ARCHIVE
CHECKSUM=`md5sum $INSTALL_ARCHIVE | awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar -xvf $INSTALL_ARCHIVE
cd armadillo-${VERSION}
cmake . -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
make
make install
else
echo "***** Hash mismatch,"
echo " Expected: $MD5"
echo " Got: $CHECKSUM"
fi