-
Notifications
You must be signed in to change notification settings - Fork 27
/
Cuba-4.2_install
executable file
·61 lines (50 loc) · 1.53 KB
/
Cuba-4.2_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
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
###############################################
# Installing Cuba 4.2
#
# by Brian Alston, 2018
#
# Numerical integration library for Mathematica 11.0.1
#
# Updated July 2018 to downgrade version of Mathematica
#
# Note: 11.1 is the most recent version of Mathematica
# that Cuba will work with. It is NOT compatible with
# 11.2 or 11.3 see IN03009733
#
# Will need modules: gcc-libs/4.9.2, compilers/gnu/4.9.2
# qt/5.4.2/gnu-4.9.2, xorg-utils/X11R7.7, mathematica/11.0.1
VERSION=${VERSION:-4.2}
VER=`echo $VERSION | sed 's/\.//'`
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/Cuba/${VERSION}_gnu-4.9.2_Math-11.0.1}
MD5=${MD5:-a3eb0751d4872a3f86401694bc5bedae}
SRC_ARCHIVE=${SRC_ARCHIVE:-http://www.feynarts.de/cuba/Cuba-${VERSION}.tar.gz}
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
require gcc-libs/4.9.2
require compilers/gnu/4.9.2
require bison/3.0.4/gnu-4.9.2
require gperf/3.0.4/gnu-4.9.2
require qt/5.4.2/gnu-4.9.2
require xorg-utils/X11R7.7
require mathematica/11.0.1
temp_dir=`mktemp -d -p /dev/shm`
cd $temp_dir
wget $SRC_ARCHIVE
CHECKSUM=`md5sum Cuba-${VERSION}.tar.gz | awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar xvzf Cuba-${VERSION}.tar.gz
cd Cuba-${VERSION}
./configure --prefix=${INSTALL_PREFIX}
make
make check
make install
else
echo "***** Hash mismatch,"
echo " Expected: $MD5"
echo " Got: $CHECKSUM"
fi