From af1a87b701dfd0d3559cb89dcaf484910f919cfc Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Tue, 13 Jun 2023 18:48:04 +0200 Subject: [PATCH] [nobm] improve lauX.sh script, add support for a generic process #683 (This is the result of cherry-picking ce995d849fea0ad115a787fb6598a0de70c06187 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) --- epochX/cudacpp/tlau/lauX.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/epochX/cudacpp/tlau/lauX.sh b/epochX/cudacpp/tlau/lauX.sh index 1cf16b151c..9c2ef5c24c 100755 --- a/epochX/cudacpp/tlau/lauX.sh +++ b/epochX/cudacpp/tlau/lauX.sh @@ -10,19 +10,18 @@ scrdir=$(cd $(dirname $0); pwd) function usage() { - echo "Usage: $0 <-FORTRAN|-CUDA|-CPP> " - echo "Example: $0 -CPP gg_tt" + echo "Usage: $0 <-FORTRAN|-CUDA|-CPP> " + 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 @@ -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)"