run-regression.sh 4.26 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 19 20
# need newer cmake
module load cmake

Philip Carns's avatar
Philip Carns committed
21
export CC=cc
22
export CXX=CC
Philip Carns's avatar
Philip Carns committed
23
export CFLAGS="-O3 -I$BOOST_ROOT/include"
24
export CXXFLAGS="-O3"
Philip Carns's avatar
Philip Carns committed
25 26 27 28 29 30 31 32 33 34 35
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
36
git clone https://github.com/ofiwg/libfabric.git
37
git clone git://git.mcs.anl.gov/bmi
38 39
git clone https://github.com/carns/argobots.git
git clone https://github.com/mercury-hpc/mercury.git
Philip Carns's avatar
Philip Carns committed
40 41 42 43 44
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
45 46
wget http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-5.3.2.tar.gz
tar -xvzf osu-micro-benchmarks-5.3.2.tar.gz
47
git clone https://github.com/pdlfs/mercury-runner.git
48 49

# OSU MPI benchmarks
Philip Carns's avatar
Philip Carns committed
50
echo "=== BUILDING OSU MICRO BENCHMARKS ==="
51 52 53 54 55 56
cd $SANDBOX/osu-micro-benchmarks-5.3.2
mkdir build
cd build
../configure --prefix=$PREFIX --host=x86_64-linux 
make -j 3
make install
Philip Carns's avatar
Philip Carns committed
57 58 59 60

# argobots
echo "=== BUILDING ARGOBOTS ==="
cd $SANDBOX/argobots
61
git checkout dev-get-dev-basic
Philip Carns's avatar
Philip Carns committed
62 63 64
./autogen.sh
mkdir build
cd build
Philip Carns's avatar
Philip Carns committed
65
../configure --prefix=$PREFIX --enable-perf-opt --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
66 67 68 69
make -j 3
make install
 
# libfabric
Philip Carns's avatar
Philip Carns committed
70
echo "=== BUILDING LIBFABRIC v1.5.0 ==="
71
cd $SANDBOX/libfabric
Philip Carns's avatar
Philip Carns committed
72 73 74
./autogen.sh
mkdir build
cd build
75
../configure --prefix=$PREFIX --enable-gni --with-kdreg=no --enable-ugni-static --enable-sockets --disable-rxd --disable-rxm --disable-udp --disable-usnic --disable-verbs --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
76 77 78
make -j 3
make install

79 80 81 82 83 84 85 86 87 88
# 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
89 90 91
# mercury
echo "=== BUILDING MERCURY ==="
cd $SANDBOX/mercury
92
git submodule update --init
Philip Carns's avatar
Philip Carns committed
93 94
mkdir build
cd build
95
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 -DBUILD_SHARED_LIBS:BOOL=ON -DMERCURY_USE_SELF_FORWARD:BOOL=ON -DNA_USE_SM:BOOL=ON ../
Philip Carns's avatar
Philip Carns committed
96 97 98 99 100 101 102 103
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
104
../configure --prefix=$PREFIX --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
105 106 107 108 109 110 111 112 113
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
114
../configure --prefix=$PREFIX  --host=x86_64-linux
Philip Carns's avatar
Philip Carns committed
115 116 117 118 119 120 121 122 123
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
124
../configure --prefix=$PREFIX  --host=x86_64-linux
Philip Carns's avatar
Philip Carns committed
125 126 127 128 129 130 131 132 133
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
134
../configure --prefix=$PREFIX --host=x86_64-linux 
Philip Carns's avatar
Philip Carns committed
135 136 137 138
make -j 3
make install
make tests

139 140 141 142 143 144 145 146 147
# mercury-runner benchmark
echo "=== BUILDING MERCURY-RUNNER BENCHMARK ==="
cd $SANDBOX/mercury-runner
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX -DMPI=ON ..
make -j 3
make install

Philip Carns's avatar
Philip Carns committed
148 149
# set up job to run
echo "=== SUBMITTING AND WAITING FOR JOB ==="
Philip Carns's avatar
Philip Carns committed
150
cp $SANDBOX/ssg/build/tests/perf-regression/.libs/margo-p2p-latency $JOBDIR
Philip Carns's avatar
Philip Carns committed
151
cp $PREFIX/bin/fi_pingpong $JOBDIR
152
cp $PREFIX/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency $JOBDIR
153
cp $PREFIX/bin/mercury-runner $JOBDIR
Philip Carns's avatar
Philip Carns committed
154
cd $JOBDIR
Philip Carns's avatar
Philip Carns committed
155
JOBID=`qsub ./margo-p2p-latency.qsub`
Philip Carns's avatar
Philip Carns committed
156 157 158 159 160 161
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
162
mailx -s "margo-p2p-latency (theta)" sds-commits@lists.mcs.anl.gov < combined.$JOBID.txt
Philip Carns's avatar
Philip Carns committed
163 164

cd /tmp
165 166 167
echo sandbox: $SANDBOX
echo prefix: $PREFIX
echo jobdir: $JOBDIR
Philip Carns's avatar
Philip Carns committed
168 169
rm -rf $SANDBOX
rm -rf $PREFIX