-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_osu_bibw
executable file
·38 lines (31 loc) · 1.7 KB
/
run_osu_bibw
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
#!/bin/bash
# Basic script that calls pt2pt/osu_latency
#SBATCH --time=0:05:00
#SBATCH --nodes=2
#SBATCH --tasks-per-node=1
#SBATCH --exclusive
#SBATCH -o /gpfs/data/admin/golem/osu/%j.out
# Environment
DIR="$PWD"
INST_DIR=`cat $PWD/environment.env | grep INST_DIR | awk -F'=' '{print $2}'`
MODULE_NAME=`cat $PWD/environment.env | grep MODULE_NAME | awk -F'=' '{print $2}'`
MPI_VER=`cat $PWD/environment.env | grep MPI_VER | awk -F'=' '{print $2}'`
INST_PATH="${INST_DIR}${MODULE_NAME}/osu-benchmarks"
DATA_PATH=`cat $PWD/environment.env | grep OSU_DATA | awk -F'=' '{print $2}'`
bench_type='bibw'
module load mpi/$MPI_VER osu-mpi/$MODULE_NAME python/3.6.6
# Store CPU Family Name and Node Numbers
# TODO: As noted by Sam Fulcomer, need to see if cross-model (rather than cross-arch) execution works. If not, lscpu should be used for nodeinfo instead. Check Skylake and CascadeLake.
nodeinfo=`/usr/local/bin/srun --mpi=pmi2 sh -c "(hostname -s && cat /sys/devices/cpu/caps/pmu_name) | sed -z 's/\s/,/g'" | sed 's/.$//'`
ibinfo=`/usr/local/bin/srun --mpi=pmi2 sh -c "(/usr/sbin/ibstat | grep 'CA type')" | awk '{print $3","}'`
ibinfo=`echo $ibinfo | sed -z 's/\s//g' | sed -z 's/.$//'`
# Perform pt2pt latency test
test_results=`/usr/local/bin/srun --mpi=pmi2 osu_bibw`
echo $test_results
data_point=`awk '/2097152/ {print $2}' <<< "$test_results"`
# Extract one line results to store in the data file
one_line_results=`date +"%D,%T" | sed -z 's/.$//'`","$SLURM_JOB_ID","$nodeinfo","$ibinfo","$bench_type","$data_point
echo $one_line_results >> $DATA_PATH/test_data.temp
# Toggle python script to push results to SQL db
source $INST_DIR$MODULE_NAME"/osu_env/bin/activate"
python $INST_PATH/sql_connect.py "w" "$SLURM_JOB_ID" "$bench_type"