-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparallel_run.sh
More file actions
executable file
·44 lines (38 loc) · 962 Bytes
/
parallel_run.sh
File metadata and controls
executable file
·44 lines (38 loc) · 962 Bytes
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
38
39
40
41
42
43
#!/bin/bash
#
# Copyright (C) 2024, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# Exit immediately if a command exits with a non-zero status.
set -e
# Get the directory containing this script
if test "x$NPROC" = x ; then
NPROC=4
fi
# get output folder from command line
if test "$#" -gt 0 ; then
args=("$@")
OUT_DIR="${args[0]}"
# check if output folder exists
if ! test -d $OUT_DIR ; then
echo "Error: output folder \"$OUT_DIR\" does not exist."
exit 1
fi
else
# output folder is not set at command line, use current folder
OUT_DIR="."
fi
# echo "OUT_DIR=$OUT_DIR"
for prog in $check_PROGRAMS; do
printf '%-60s' "Testing $prog"
if test $prog = "torch_ddp_skeleton.py" ; then
CMD="${TESTMPIRUN} -n $NPROC python $prog -q"
fi
$CMD
status=$?
if [ $status -ne 0 ]; then
echo " ---- FAIL"
else
echo " ---- PASS"
fi
done