improve error-handling and mvapich2 ergonomics

This commit is contained in:
Carl Pearson
2021-04-30 15:03:07 -06:00
parent 3acb81ca23
commit cb4361e91a

View File

@@ -1,16 +1,26 @@
#! /bin/bash
# ./run-all.sh | grep 'PASS\|FAIL'
set -eou pipefail
run_test() {
run_cpu_test() {
# mvapich2 makes a bunch of spam if you use non-GPU buffers :(
export MV2_USE_CUDA=0
# mvapich2 makes a bunch of spam if its build with CUDA but the above is set :(
export MV2_SUPPRESS_CUDA_USAGE_WARNING=1
mpirun -n 4 $1 && echo PASS: mpirun -n 4 $1 || echo FAIL: mpirun -n 4 $1
}
run_gpu_test() {
export MV2_USE_CUDA=1
mpirun -n 4 $1 && echo PASS: mpirun -n 4 $1 || echo FAIL: mpirun -n 4 $1
}
# test that we can run something
run_test hostname
run_cpu_test hostname
# rotate an integer around ranks
run_test ./main
run_cpu_test ./main
# rotate with mpi-put
run_test ./one-sided
run_cpu_test ./one-sided