From cb4361e91a9ee3944d45f9a75af7f0463fcc7a58 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 30 Apr 2021 15:03:07 -0600 Subject: [PATCH] improve error-handling and mvapich2 ergonomics --- run-all.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/run-all.sh b/run-all.sh index 9f8e5d9..a326db8 100755 --- a/run-all.sh +++ b/run-all.sh @@ -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 \ No newline at end of file +run_cpu_test ./one-sided \ No newline at end of file