forked from bsc-performance-tools/extrae
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·74 lines (65 loc) · 1.66 KB
/
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
74
#!/bin/bash
# Retrieve script variables
targetDir=$1
if [ "$#" -gt 1 ]; then
tryEnableMPIMerge=$2
else
tryEnableMPIMerge=false
fi
# Setup Extrae for PAPI (or not)
papiPath=$(which papi_avail 2> /dev/null)
if [ -z "${papiPath}" ]; then
# No PAPI available
papiArg="--without-papi"
else
# PAPI available
papiRealPath=$(readlink -f "${papiPath}")
papiBaseDir=${papiRealPath%/bin**}
papiArg="--with-papi=${papiBaseDir}"
fi
# Setup MPI for parallel merge (or not)
mpiPath=$(which mpirun 2> /dev/null)
if ! $tryEnableMPIMerge || [ -z "${mpiPath}" ]; then
# No MPI available
mpiArg="--without-mpi"
else
# MPI available detect openmpi or impi
if [ -z "$I_MPI_ROOT" ]; then
mpiBaseDir=${mpiPath%/bin**}
else
mpiBaseDir=${I_MPI_ROOT}
fi
mpiArg="--with-mpi=${mpiBaseDir} --enable-parallel-merge"
fi
# Create installation folder
mkdir -p "${targetDir}"
# Configure, compile and install
autoreconf --force --install
ev=$?
if [ "$ev" -ne 0 ]; then
exit $ev
fi
./configure --enable-gettimeofday-clock \
--without-unwind \
--without-dyninst \
--without-binutils \
"${mpiArg}" \
"${papiArg}" \
--with-java-jdk="${JAVA_HOME}" \
--disable-openmp \
--enable-nanos \
--disable-smpss \
--disable-instrument-io \
--prefix="${targetDir}" \
--libdir="${targetDir}/lib"
ev=$?
if [ "$ev" -ne 0 ]; then
exit $ev
fi
make clean install
ev=$?
if [ "$ev" -ne 0 ]; then
exit $ev
fi
# Exit normal
exit 0