run-regression.sh 3.93 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#!/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

# SEE README.spack.md for environment setup information!  This script will not
#     work properly without properly configured spack environment

# exit on any error
set -e

Philip Carns's avatar
Philip Carns committed
13
14
15
# load newer gcc up front
module load gcc_new/7.3.0

16
17
18
SANDBOX=$PWD/mochi-regression-sandbox-$$
PREFIX=$PWD/mochi-regression-install-$$
JOBDIR=$PWD/mochi-regression-job-$$
19
20
21

# scratch area to clone and build things
mkdir -p $SANDBOX
22
cp packages.yaml $SANDBOX/
23
24
25
26

# scratch area for job submission
mkdir -p $JOBDIR
cp margo-regression.sbatch $JOBDIR
Philip Carns's avatar
Philip Carns committed
27
cp bake-regression.sbatch $JOBDIR
28
cp pmdk-regression.sbatch $JOBDIR
29
cp mobject-regression.sbatch $JOBDIR
30
31
32

cd $SANDBOX
git clone https://github.com/spack/spack.git
Rob Latham's avatar
Rob Latham committed
33
34
# back out prolematic opa-psm2 change
(cd spack && git revert --no-edit d4fbaa054f8d718eaffecb53b1d37ad93ceeca05)
35
git clone https://xgitlab.cels.anl.gov/sds/sds-repo.git
36
git clone https://xgitlab.cels.anl.gov/sds/sds-tests.git
37
38
39
40
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

41
42
export SPACK_ROOT=${SANDBOX}/spack

43
44
45
46
# set up most of the libraries in spack
echo "=== BUILD SPACK PACKAGES AND LOAD ==="
cd $SANDBOX/spack
. $SANDBOX/spack/share/spack/setup-env.sh
Rob Latham's avatar
Rob Latham committed
47

48
49
spack compiler find
spack compilers
50
51
# put packages file in place in SPACK_ROOT to set our preferences for building
# Mochi stack
52
mkdir -p $SPACK_ROOT/etc/spack
53
54
55
56
57
58
cp $SANDBOX/packages.yaml $SPACK_ROOT/etc/spack
# set up repos file to point to sds-repo; we do this manually because 
#    "spack repo add" will create files in ~/.spack, which is a bad idea in 
#    CI environments
echo "repos:" > $SPACK_ROOT/etc/spack/repos.yaml
echo "- ${SANDBOX}/sds-repo" >> $SPACK_ROOT/etc/spack/repos.yaml
59
60


Philip Carns's avatar
Philip Carns committed
61
spack uninstall -R -y argobots mercury opa-psm2 bake || true
62
# nightly tests should test nightly software!
Shane Snyder's avatar
Shane Snyder committed
63
spack install ior@develop+mobject ^margo@develop ^mercury@develop ^mobject@develop ^bake@develop ^remi@develop ^thallium@develop ^sdskeyval@develop ^ssg@develop
64

65
66
67
68
# deliberately repeat setup-env step after building modules to ensure
#   that we pick up the right module paths
. $SANDBOX/spack/share/spack/setup-env.sh
spack load -r ssg
Philip Carns's avatar
Philip Carns committed
69
spack load -r bake
70
spack load -r mobject
71
72
73
74
75
76
77
78
79
80
81
82

export CFLAGS="-O3"

# OSU MPI benchmarks
echo "=== BUILDING OSU MICRO BENCHMARKS ==="
cd $SANDBOX/osu-micro-benchmarks-5.3.2
mkdir build
cd build
../configure --prefix=$PREFIX CC=mpicc CXX=mpicxx
make -j 3
make install

83
84
85
# sds-tests
echo "=== BUILDING SDS TEST PROGRAMS ==="
cd $SANDBOX/sds-tests
86
87
88
89
90
91
libtoolize
./prepare.sh
mkdir build
cd build
../configure --prefix=$PREFIX CC=mpicc
make -j 3
92
make install
93
94
95
96
97
98
99
100
101
102
103
104

# mercury-runner benchmark
# echo "=== BUILDING MERCURY-RUNNER BENCHMARK ==="
# cd $SANDBOX/mercury-runner
# mkdir build
# cd build
# CC=mpicc CXX=mpicxx CXXFLAGS='-D__STDC_FORMAT_MACROS' cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX -DMPI=ON ..
# make -j 3
# make install

# set up job to run
echo "=== SUBMITTING AND WAITING FOR JOB ==="
105
106
cp $PREFIX/bin/margo-p2p-latency $JOBDIR
cp $PREFIX/bin/margo-p2p-bw $JOBDIR
Philip Carns's avatar
Philip Carns committed
107
cp $PREFIX/bin/bake-p2p-bw $JOBDIR
108
cp $PREFIX/bin/pmdk-bw $JOBDIR
109
110
111
cp $PREFIX/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency $JOBDIR
# cp $PREFIX/bin/mercury-runner $JOBDIR
cd $JOBDIR
112
export SANDBOX
113
sbatch --wait --export=ALL ./margo-regression.sbatch
Philip Carns's avatar
Philip Carns committed
114
sbatch --wait --export=ALL ./bake-regression.sbatch
115
sbatch --wait --export=ALL ./pmdk-regression.sbatch
116
sbatch --wait --export=ALL ./mobject-regression.sbatch
117
118
119
120

echo "=== JOB DONE, COLLECTING AND SENDING RESULTS ==="
# gather output, strip out funny characters, mail
cat *.out > combined.$JOBID.txt
Philip Carns's avatar
Philip Carns committed
121
# dos2unix combined.$JOBID.txt
122
mailx -s "mochi-regression (bebop)" sds-commits@lists.mcs.anl.gov < combined.$JOBID.txt
123
124
125
126

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