forked from mimbert/g5k_bench_flops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_prepare_openmpi
executable file
·48 lines (37 loc) · 982 Bytes
/
node_prepare_openmpi
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
#!/bin/bash
set -e # any error will stop everyting
usage() {
echo "usage: `basename $0` <source_archive> <extract_directory> <compiled_archive>"
}
myecho() {
echo "### "$(date "+%Y-%m-%d %H:%M:%S")" ### ${@}"
}
myecho "`basename $0` start. args = $@"
myecho "on `uname -a`"
WORKDIR=$(cd `dirname $0`; pwd)
if [ "$#" != 3 ] ; then
usage
exit 1
fi
SOURCEARCHIVE=$1
EXTRACTDIR=$2
COMPILEDARCHIVE=$3
myecho "clean openmpi install dir"
rm -rf $WORKDIR/openmpi-install/
myecho "clean openmpi source dir"
rm -rf "$WORKDIR/$EXTRACTDIR"
myecho "extract openmpi"
cd "$WORKDIR"
tar xjf "$SOURCEARCHIVE"
myecho "configure openmpi"
cd "$WORKDIR/$EXTRACTDIR"
./configure --prefix=$WORKDIR/openmpi-install --enable-branch-probabilities --with-memory-manager=none
myecho "make openmpi"
make
myecho "install openmpi"
make install
# create targz of atlas installation
myecho "package openmpi install"
cd $WORKDIR
tar czf $COMPILEDARCHIVE openmpi-install/
myecho "finished"