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

# This is a shell script to be run from a login node of the Bebop system at
# the LCRC, 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-$$

Philip Carns's avatar
Philip Carns committed
14
export CC=icc
Philip Carns's avatar
Philip Carns committed
15 16 17 18 19 20 21 22 23 24 25 26 27
export CFLAGS="-O3"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

module load numactl
module load cmake
module load boost

# scratch area to clone and build things
mkdir $SANDBOX

# scratch area for job submission
mkdir $JOBDIR

Philip Carns's avatar
Philip Carns committed
28
cp margo-p2p-latency.sbatch $JOBDIR
Philip Carns's avatar
Philip Carns committed
29 30
cp margo-p2p-latency-knl.sbatch $JOBDIR

Philip Carns's avatar
Philip Carns committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
cd $SANDBOX
git clone http://git.mpich.org/openpa.git/
git clone https://github.com/01org/opa-psm2.git
git clone https://github.com/ofiwg/libfabric.git
git clone https://github.com/carns/argobots.git
git clone https://github.com/mercury-hpc/mercury.git
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
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
git clone https://github.com/pdlfs/mercury-runner.git

# OSU MPI benchmarks
echo "=== BUILDING OSU MICRO BENCHMARKS ==="
cd $SANDBOX/osu-micro-benchmarks-5.3.2
mkdir build
cd build
51
../configure --prefix=$PREFIX CC=mpiicc CXX=mpiicc
Philip Carns's avatar
Philip Carns committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
make -j 3
make install

# argobots
echo "=== BUILDING ARGOBOTS ==="
cd $SANDBOX/argobots
git checkout dev-get-dev-basic
libtoolize
./autogen.sh
mkdir build
cd build
../configure --prefix=$PREFIX --enable-perf-opt
make -j 3
make install
  
# opa-psm2
echo "=== BUILDING LIBFABRIC ==="
cd $SANDBOX/opa-psm2
make
make DESTDIR=$PREFIX install

# TODO: it doesn't seem like this should be necessary; we are specifying path
# to lib in libfabric build.
LD_LIBRARY_PATH=$PREFIX/usr/lib64:$LD_LIBRARY_PATH

# libfabric
echo "=== BUILDING LIBFABRIC ==="
cd $SANDBOX/libfabric
./autogen.sh
mkdir build
cd build
../configure --prefix=$PREFIX --enable-sockets --enable-psm2=$PREFIX/usr --enable-verbs 
make -j 3
make install

# openpa
echo "=== BUILDING OPENPA ==="
cd $SANDBOX/openpa
./autogen.sh
mkdir build
cd build
../configure --prefix=$PREFIX 
make -j 3
make install

# mercury
echo "=== BUILDING MERCURY ==="
cd $SANDBOX/mercury
git submodule update --init
mkdir build
cd build
cmake -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 ../
make -j 3
make install

# libev
echo "=== BUILDING LIBEV ==="
cd $SANDBOX/libev-4.24
mkdir build
cd build
../configure --prefix=$PREFIX
make -j 3
make install

# abt-snoozer
echo "=== BUILDING ABT-SNOOZER ==="
cd $SANDBOX/abt-snoozer
libtoolize
./prepare.sh
mkdir build
cd build
../configure --prefix=$PREFIX 
make -j 3
make install

# margo
echo "=== BUILDING MARGO ==="
cd $SANDBOX/margo
libtoolize
./prepare.sh
mkdir build
cd build
../configure --prefix=$PREFIX 
make -j 3
make install

# ssg
echo "=== BUILDING SSG ==="
cd $SANDBOX/ssg
libtoolize
./prepare.sh
mkdir build
cd build
145
../configure --prefix=$PREFIX CC=mpiicc
Philip Carns's avatar
Philip Carns committed
146 147 148 149 150 151 152 153 154
make -j 3
make install
make tests

# mercury-runner benchmark
echo "=== BUILDING MERCURY-RUNNER BENCHMARK ==="
cd $SANDBOX/mercury-runner
mkdir build
cd build
155
CC=mpiicc CXX=mpiicc CXXFLAGS='-D__STDC_FORMAT_MACROS' cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX -DMPI=ON ..
Philip Carns's avatar
Philip Carns committed
156 157 158 159 160 161 162 163 164
make -j 3
make install

# set up job to run
echo "=== SUBMITTING AND WAITING FOR JOB ==="
cp $SANDBOX/ssg/build/tests/perf-regression/.libs/margo-p2p-latency $JOBDIR
cp $PREFIX/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency $JOBDIR
cp $PREFIX/bin/mercury-runner $JOBDIR
cd $JOBDIR
Philip Carns's avatar
Philip Carns committed
165
sbatch --wait --export=ALL ./margo-p2p-latency.sbatch
Philip Carns's avatar
Philip Carns committed
166
sbatch --wait --export=ALL ./margo-p2p-latency-knl.sbatch
Philip Carns's avatar
Philip Carns committed
167 168 169

echo "=== JOB DONE, COLLECTING AND SENDING RESULTS ==="
# gather output, strip out funny characters, mail
Philip Carns's avatar
Philip Carns committed
170 171 172 173
cat *.out > combined.txt
# TODO: dooesn't look like we have this on bebop, need another solution
# dos2unix combined.txt
mailx -s "margo-p2p-latency (bebop)" sds-commits@lists.mcs.anl.gov < combined.txt
Philip Carns's avatar
Philip Carns committed
174 175 176 177

cd /tmp
rm -rf $SANDBOX
rm -rf $PREFIX