run-regression.sh 3.43 KB
Newer Older
Philip Carns's avatar
Philip Carns committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash

# This is a shell script to be run from a login node of the Theta system at
# the ALCF, that will download, compile, and execute the ssg performance 
# regression tests, including any dependencies

# exit on any error
set -e

SANDBOX=/tmp/mochi-regression-$$
PREFIX=~/tmp/mochi-regression-install-$$
JOBDIR=~/tmp/mochi-regression-job-$$

# gcc
module swap PrgEnv-intel PrgEnv-gnu
module load boost/gnu

Philip Carns's avatar
Philip Carns committed
18
export CC=cc
Philip Carns's avatar
Philip Carns committed
19 20 21 22 23 24 25 26 27 28 29 30
export CFLAGS="-O3 -I$BOOST_ROOT/include"
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export CRAYPE_LINK_TYPE=dynamic

# scratch area to clone and build things
mkdir $SANDBOX

# scratch area for job submission
mkdir $JOBDIR
cp margo-p2p-latency.qsub $JOBDIR

cd $SANDBOX
31
git clone https://github.com/ofiwg/libfabric.git
32
git clone git://git.mcs.anl.gov/bmi
Philip Carns's avatar
Philip Carns committed
33
git clone https://github.com/pmodels/argobots.git
34
git clone https://github.com/carns/mercury.git
Philip Carns's avatar
Philip Carns committed
35 36 37 38 39 40 41 42 43 44 45 46
wget http://dist.schmorp.de/libev/libev-4.24.tar.gz
tar -xvzf libev-4.24.tar.gz
git clone https://xgitlab.cels.anl.gov/sds/abt-snoozer.git
git clone https://xgitlab.cels.anl.gov/sds/margo.git
git clone https://xgitlab.cels.anl.gov/sds/ssg.git

# argobots
echo "=== BUILDING ARGOBOTS ==="
cd $SANDBOX/argobots
./autogen.sh
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
47
../configure --prefix=$PREFIX --enable-perf-opt --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
48 49 50 51 52
make -j 3
make install
 
# libfabric
echo "=== BUILDING LIBFABRIC ==="
53
cd $SANDBOX/libfabric
Philip Carns's avatar
Philip Carns committed
54 55 56
./autogen.sh
mkdir build
cd build
57
../configure --prefix=$PREFIX --enable-gni --disable-rxd --disable-rxm --disable-udp --disable-usnic --disable-verbs --disable-sockets --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
58 59 60
make -j 3
make install

61 62 63 64 65 66 67 68 69 70
# BMI
echo "=== BUILDING BMI ==="
cd $SANDBOX/bmi
./prepare
mkdir build
cd build
../configure --prefix=$PREFIX --enable-shared --host=x86_64-linux 
make -j 3
make install

Philip Carns's avatar
Philip Carns committed
71 72 73
# mercury
echo "=== BUILDING MERCURY ==="
cd $SANDBOX/mercury
74
git checkout dev-bmi-addr-resolution
Philip Carns's avatar
Philip Carns committed
75 76
mkdir build
cd build
77
cmake -DNA_USE_BMI:BOOL=ON -DBMI_INCLUDE_DIR:PATH=$PREFIX/include -DBMI_LIBRARY:FILEPATH=$PREFIX/lib/libbmi.so -DNA_USE_OFI:BOOL=ON -DMERCURY_USE_BOOST_PP:BOOL=ON -DCMAKE_INSTALL_PREFIX=/$PREFIX -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DMERCURY_USE_SELF_FORWARD:BOOL=ON -DNA_USE_SM:BOOL=ON ../
Philip Carns's avatar
Philip Carns committed
78 79 80 81 82 83 84 85
make -j 3
make install

# libev
echo "=== BUILDING LIBEV ==="
cd $SANDBOX/libev-4.24
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
86
../configure --prefix=$PREFIX --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
87 88 89 90 91 92 93 94 95
make -j 3
make install

# abt-snoozer
echo "=== BUILDING ABT-SNOOZER ==="
cd $SANDBOX/abt-snoozer
./prepare.sh
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
96
../configure --prefix=$PREFIX  --host=x86_64-linux
Philip Carns's avatar
Philip Carns committed
97 98 99 100 101 102 103 104 105
make -j 3
make install

# margo
echo "=== BUILDING MARGO ==="
cd $SANDBOX/margo
./prepare.sh
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
106
../configure --prefix=$PREFIX  --host=x86_64-linux
Philip Carns's avatar
Philip Carns committed
107 108 109 110 111 112 113 114 115
make -j 3
make install

# ssg
echo "=== BUILDING SSG ==="
cd $SANDBOX/ssg
./prepare.sh
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
116
../configure --prefix=$PREFIX --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
117 118 119 120 121 122
make -j 3
make install
make tests

# set up job to run
echo "=== SUBMITTING AND WAITING FOR JOB ==="
Philip Carns's avatar
Philip Carns committed
123
cp $SANDBOX/ssg/build/tests/perf-regression/.libs/margo-p2p-latency $JOBDIR
Philip Carns's avatar
Philip Carns committed
124
cd $JOBDIR
Philip Carns's avatar
Philip Carns committed
125
JOBID=`qsub ./margo-p2p-latency.qsub`
Philip Carns's avatar
Philip Carns committed
126 127 128 129 130 131
cqwait $JOBID

echo "=== JOB DONE, COLLECTING AND SENDING RESULTS ==="
# gather output, strip out funny characters, mail
cat $JOBID.* > combined.$JOBID.txt
dos2unix combined.$JOBID.txt
Philip Carns's avatar
Philip Carns committed
132
mailx -s "margo-p2p-latency (theta, ofi/gni)" sds-commits@lists.mcs.anl.gov < combined.$JOBID.txt
Philip Carns's avatar
Philip Carns committed
133 134

cd /tmp
135 136 137
#echo sandbox: $SANDBOX
#echo prefix: $PREFIX
#echo jobdir: $JOBDIR
Philip Carns's avatar
Philip Carns committed
138 139
rm -rf $SANDBOX
rm -rf $PREFIX