File: run-parallel-unitTest.sh

package info (click to toggle)
opm-simulators 2022.10%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,352 kB
  • sloc: cpp: 76,729; lisp: 1,173; sh: 886; python: 158; makefile: 19
file content (26 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download | duplicates (2)
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
#!/bin/bash 
# This executes a unit test in parallel.

if test $# -eq 0
then
  echo -e "Usage:\t$0 <options> -- [additional simulator options]"
  echo -e "\tMandatory options:"
  echo -e "\t\t -n <procs>    Number of MPI Processes to use"
  echo -e "\t\t -b <path>     Path to simulator binary"
  echo -e "\t\t -e <filename> Simulator binary to use"
  exit 1
fi

OPTIND=1
while getopts "n:b:e:" OPT
do
  case "${OPT}" in
    b) BDIR=${OPTARG} ;;
    e) EXE_NAME=${OPTARG} ;;
    n) NP=${OPTARG} ;;
  esac
done
shift $(($OPTIND-1))
TEST_ARGS="$@"

mpirun -np $NP $BDIR/bin/${EXE_NAME} ${TEST_ARGS}