-
Notifications
You must be signed in to change notification settings - Fork 27
/
R-3.2.0_install
executable file
·73 lines (61 loc) · 2.02 KB
/
R-3.2.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
###############################################
# Installing base R plus recommended packages using GCC + ATLAS
#
# by Brian Alston, 2015
#
# Using Ian's require function to load modules
#
# Will need modules: see list of modules below.
VERSION=${VERSION:-3.2.0}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/R/R-${VERSION}-ATLAS }
MD5=${MD5:-66fa17ad457d7e618191aa0f52fc402e}
SRC_ARCHIVE=${SRC_ARCHIVE:- http://www.stats.bris.ac.uk/R/src/base/R-3/R-${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 rcps-core/1.0.0
require gcc-libs/4.9.2
require compilers/gnu/4.9.2
require atlas/3.10.2/gnu-4.9.2
require java/1.8.0_45
require fftw/3.3.4/gnu-4.9.2
require ghostscript/9.16/gnu-4.9.2
require texinfo/5.2/gnu-4.9.2
require texlive/2014
require gsl/1.16/gnu-4.9.2
require hdf/5-1.8.15/gnu-4.9.2
require netcdf/4.3.3.1/gnu-4.9.2
require jags/3.4.0/gnu.4.9.2-atlas
require root/5.34.30/gnu-4.9.2
#
# And for doing the MPI support:
require mpi/openmpi/1.8.4/gnu-4.9.2
temp_dir=`mktemp -d -p /dev/shm`
echo "Building in $temp_dir ..."
cd $temp_dir
module list
read -p "Press [Enter] key to start ..."
cd $temp_dir
wget $SRC_ARCHIVE
CHECKSUM=`md5sum R-${VERSION}.tar.gz| awk '{print $1}'`
if [[ "$MD5" == "$CHECKSUM" ]]
then
tar xvzf R-${VERSION}.tar.gz
cd R-${VERSION}
./configure -C --prefix=${INSTALL_PREFIX} --with-recommended-packages --with-x \
--with-readline=yes --enable-R-shlib \
--with-blas="-L/shared/ucl/apps/atlas/3.10.2/gnu-4.9.2/lib -lptf77blas -lpthread -latlas" 2>&1 |
tee configure-command-ATLAS_log
make 2>&1 | tee make-ATLAS_log
make check 2>&1 | tee make-check-ATLAS_log
make pdf 2>&1 | tee make-pdf_log
make install 2>&1 | tee make-install_log
make install-pdf 2>&1 | tee make-install-pdf_log
else
echo "***** Hash mismatch,"
echo " Expected: $MD5"
echo " Got: $CHECKSUM"
fi