Skip to content

Commit

Permalink
[nobm] improve lauX.sh script, add support for a generic process #683
Browse files Browse the repository at this point in the history
(This is the result of cherry-picking ce995d8 and fixing conflicts)

The syntax for launching has now changed - must add the trailing .mad
CUDA_HOME=none HRDCOD=1 tlau/lauX.sh -CPP nobm_pp_ttW.mad

This now fails with the usual three IEEE FPEs (all except division by zero)
  • Loading branch information
valassi committed Jul 21, 2023
1 parent 9f74a36 commit af1a87b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions epochX/cudacpp/tlau/lauX.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ scrdir=$(cd $(dirname $0); pwd)

function usage()
{
echo "Usage: $0 <-FORTRAN|-CUDA|-CPP> <proc>"
echo "Example: $0 -CPP gg_tt"
echo "Usage: $0 <-FORTRAN|-CUDA|-CPP> <procdir>"
echo "Example: $0 -CPP gg_tt.mad"
exit 1
}

bckend=
proc=
suff=.mad
while [ "$1" != "" ]; do
if [ "$1" == "-FORTRAN" ] || [ "$1" == "-CUDA" ] || [ "$1" == "-CPP" ]; then
if [ "$bckend" == "" ]; then bckend=${1/-/}; else echo "ERROR! Backend already set"; usage; fi
elif [ "$proc" == "" ]; then
proc=${1}
proc=$1
else
echo "ERROR! Invalid option '$1': process directory already set to '${proc}'"
usage
Expand All @@ -31,7 +30,7 @@ while [ "$1" != "" ]; do
done
if [ "$bckend" == "" ]; then echo "ERROR! No backend was specified"; usage; fi
if [ "$proc" == "" ]; then echo "ERROR! No process directory was specified"; usage; fi
if [ ! -d ${proc}${suff} ]; then echo "ERROR! Process directory '${proc}' does not exist"; usage; fi
if [ ! -d $proc ]; then echo "ERROR! Process directory '${proc}' does not exist"; usage; fi

cd $(dirname $0)/..
echo "Execute $(basename $0) for process ${proc} and backend ${bckend} in directory $(pwd)"
Expand Down

0 comments on commit af1a87b

Please sign in to comment.