diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512y/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512y/output.txt new file mode 100644 index 0000000000..fc51da0a3b --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512y/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:39 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 35 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> build.512y_m_inl0_hrd0/madevent_cpp +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:46 PM CEST 2024 +ELAPSED: 7 seconds diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512z/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512z/output.txt new file mode 100644 index 0000000000..70c0ed00a0 --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cpp512z/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:47 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 35 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> build.512z_m_inl0_hrd0/madevent_cpp +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:54 PM CEST 2024 +ELAPSED: 7 seconds diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppavx2/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppavx2/output.txt new file mode 100644 index 0000000000..d6e61c44c4 --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppavx2/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:31 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 35 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> build.avx2_m_inl0_hrd0/madevent_cpp +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:38 PM CEST 2024 +ELAPSED: 7 seconds diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppnone/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppnone/output.txt new file mode 100644 index 0000000000..698e0c92ea --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppnone/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:14 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 35 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> build.none_m_inl0_hrd0/madevent_cpp +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:22 PM CEST 2024 +ELAPSED: 8 seconds diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppsse4/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppsse4/output.txt new file mode 100644 index 0000000000..a11b1ce562 --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/cppsse4/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:23 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 35 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> build.sse4_m_inl0_hrd0/madevent_cpp +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:30 PM CEST 2024 +ELAPSED: 7 seconds diff --git a/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/fortran/output.txt b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/fortran/output.txt new file mode 100644 index 0000000000..72e3f12dc2 --- /dev/null +++ b/epochX/cudacpp/tlau/fromgridpacks/gg_tt.mad/fortran/output.txt @@ -0,0 +1,49 @@ +START: Wed Aug 7 02:04:05 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +lrwxrwxrwx. 1 avalassi zg 16 Aug 7 14:04 madevent/SubProcesses/P1_gg_ttx/madevent -> madevent_fortran +Now generating 10000 events with random seed 21 and granularity 1 +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +WRITE GRIDCARD /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/madevent +generate 10000 events +P1_gg_ttx +Using random number seed offset = 21 +INFO: Generating 10000.0 unweighted events. +sum of cpu time of last step: 2 seconds +INFO: need to improve 2 channels +combine_events +store_events + === Results Summary for run: GridRun_21 tag: tag_1 === + + Cross-section : 0 +- 0 pb + Nb of events : 10000 + +INFO: No version of lhapdf. Can not run systematics computation +decay_events -from_cards +DONE +write ./events.lhe.gz +END: Wed Aug 7 02:04:13 PM CEST 2024 +ELAPSED: 8 seconds diff --git a/epochX/cudacpp/tlau/gridpacks/.gitignore b/epochX/cudacpp/tlau/gridpacks/.gitignore new file mode 100644 index 0000000000..30a22396e5 --- /dev/null +++ b/epochX/cudacpp/tlau/gridpacks/.gitignore @@ -0,0 +1,2 @@ +madevent +run.sh diff --git a/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/output.txt b/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/output.txt new file mode 100644 index 0000000000..5bd181bdeb --- /dev/null +++ b/epochX/cudacpp/tlau/gridpacks/gg_tt.mad/output.txt @@ -0,0 +1,69 @@ +START: Wed Aug 7 12:35:46 PM CEST 2024 +CUDACPP_RUNTIME_DISABLEFPE is not set +************************************************************ +* * +* W E L C O M E to * +* M A D G R A P H 5 _ a M C @ N L O * +* M A D E V E N T * +* * +* * * * +* * * * * * +* * * * * 5 * * * * * +* * * * * * +* * * * +* * +* VERSION 3.5.3_lo_vect * +* * +* The MadGraph5_aMC@NLO Development Team - Find us at * +* https://server06.fynu.ucl.ac.be/projects/madgraph * +* * +* Type 'help' for in-line help. * +* * +************************************************************ +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +INFO: load configuration from /data/avalassi/GPU2024/madgraph4gpuX/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +No valid eps viewer found. Please set in ./input/mg5_configuration.txt +Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt +generate_events -f +Generating gridpack with run name run_01 +survey run_01 --accuracy=0.01 --points=2000 --iterations=8 --gridpack=.true. +INFO: compile directory +compile Source Directory +Using random number seed offset = 21 +INFO: Running Survey +Creating Jobs +Working on SubProcesses +INFO: P1_gg_ttx +Pre-building madevent in madevent_interface.py with ALL matrix elements +Building madevent in madevent_interface.py with 'fortran' matrix elements +INFO: Idle: 1, Running: 0, Completed: 0 [ current time: 12h35 ] +INFO: Idle: 0, Running: 0, Completed: 1 [ 1.8s ] +INFO: Idle: 0, Running: 0, Completed: 1 [ 1.8s ] +sum of cpu time of last step: 2 seconds + === Results Summary for run: run_01 tag: tag_1 === + + Cross-section : 442.3 +- 4.036 pb + Nb of events : 0 + +INFO: End survey +combine_events +INFO: Combining Events +combination of events done in 0.002616405487060547 s +store_events +INFO: Storing parton level results +INFO: End Parton +decay_events -from_cards +create_gridpack +INFO: Creating gridpack +P1_gg_ttx +Cleaning SubProcesses. +INFO: gridpack created +quit +INFO: storing files of previous run +INFO: Done +INFO: +17.17user 2.95system 0:08.06elapsed 249%CPU (0avgtext+0avgdata 91752maxresident)k +1144inputs+288384outputs (127major+996717minor)pagefaults 0swaps +END: Wed Aug 7 12:35:55 PM CEST 2024 +ELAPSED: 9 seconds diff --git a/epochX/cudacpp/tlau/lauX.sh b/epochX/cudacpp/tlau/lauX.sh index b4bb47155d..594174b643 100755 --- a/epochX/cudacpp/tlau/lauX.sh +++ b/epochX/cudacpp/tlau/lauX.sh @@ -10,51 +10,69 @@ scrdir=$(cd $(dirname $0); pwd) function usage() { - echo "Usage: $0 [- [-nomakeclean]|-ALL] [-rndoff ] " + echo "Usage: $0 - [-nomakeclean] [-rndoff ] [-togridpack|-fromgridpack]" echo " (supported values: fortran, cuda, hip, cppnone, cppsse4, cppavx2, cpp512y, cpp512z)" + echo " (*special* value: ALL processes all available backends)" echo "Example: $0 -cppavx2 gg_tt.mad" exit 1 } bckend= proc= +grid= nomakeclean= rndoff=0 while [ "$1" != "" ]; do if [ "$1" == "-fortran" ] || [ "$1" == "-cuda" ] || [ "$1" == "-hip" ] || [ "$1" == "-cppnone" ] || [ "$1" == "-cppsse4" ] || [ "$1" == "-cppavx2" ] || [ "$1" == "-cpp512y" ] || [ "$1" == "-cpp512z" ] || [ "$1" == "-ALL" ]; then if [ "${bckend}" == "" ]; then bckend=${1/-/}; else echo "ERROR! Backend already set"; usage; fi + elif [ "$1" == "-togridpack" ] && [ "${grid}" == "" ]; then + grid=${1} + elif [ "$1" == "-fromgridpack" ] && [ "${grid}" == "" ]; then + grid=${1} elif [ "$1" == "-nomakeclean" ]; then nomakeclean=$1 elif [ "$1" == "-rndoff" ]; then rndoff=$2 shift + elif [ "${1#-}" != "${1}" ]; then + echo "ERROR! Invalid option '$1'" + usage elif [ "${proc}" == "" ]; then proc=$1 else - echo "ERROR! Invalid option '$1': process directory already set to '${proc}'" + echo "ERROR! Invalid input '$1': process directory already set to '${proc}'" usage fi shift 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 [ "${proc}" == "" ]; then echo "ERROR! No process directory was specified"; usage; fi +if [ "${grid}" != "" ] && [ "${rndoff}" != "0" ]; then echo "ERROR! ${grid} and -rndoff are not compatible"; exit 1; fi if [ "${bckend}" == "ALL" ]; then + if [ "${grid}" == "-togridpack" ]; then echo "ERROR! ${grid} and -ALL are not compatible"; exit 1; fi # temporary? for b in fortran cuda hip cppnone cppsse4 cppavx2 cpp512y cpp512z; do - $0 -${b} ${nomakeclean} ${proc} -rndoff ${rndoff} + $0 -${b} ${nomakeclean} ${proc} -rndoff ${rndoff} ${grid} nomakeclean=-nomakeclean # respect user input only on the first test, then keep the builds done exit 0 # successful termination on each loop (and skip the rest of this file) fi +gridpackdir=${scrdir}/gridpacks/${proc} suff=.mad if [ "${proc}" == "${proc%${suff}}" ]; then echo "ERROR! Process directory does not end in '${suff}'"; usage; fi proc=${proc%${suff}} -resultsdir=${scrdir}/logs_${proc//_}_${bckend/} +resultsdir=${scrdir}/logs_${proc//_}_${bckend} +if [ "${grid}" == "-togridpack" ]; then + resultsdir=${gridpackdir} +elif [ "${grid}" == "-fromgridpack" ]; then + resultsdir=${gridpackdir/gridpacks/fromgridpacks}/${bckend} + rm -rf ${resultsdir}; mkdir -p ${resultsdir} +fi if [ "${rndoff}" == "x10" ]; then for i in $(seq 0 9); do - $0 -${bckend} ${nomakeclean} ${proc} -rndoff ${i} + $0 -${bckend} ${nomakeclean} ${proc} ${grid} -rndoff ${i} nomakeclean=-nomakeclean # respect user input only on the first test, then keep the builds done more ${resultsdir}/*txt | \egrep '(Cross-section :)' @@ -66,7 +84,6 @@ fi outfile=output.txt if [ "${rndoff}" != "0" ]; then outfile=output${rndoff}.txt; fi -(( rndseed = 21 + ${rndoff} )) function exit0() { @@ -88,12 +105,6 @@ elif [ "${bckend}" == "hip" ]; then fi fi -cd $(dirname $0)/.. -echo "Execute $(basename $0) for process ${proc} and backend ${bckend} in directory $(pwd)" -procdir=$(pwd)/${proc}${suff} -if [ ! -d ${procdir} ]; then echo "ERROR! Process directory '${procdir}' does not exist"; usage; fi -cd ${procdir} - function getnevt() { if [ "${proc}" == "gg_tt" ]; then @@ -111,6 +122,58 @@ function getnevt() echo $nevt } +# Get the random seed +(( rndseed = 21 + ${rndoff} )) + +# Get the number of unweighted events to generate +nevt=$(getnevt) + +# --- OPTION 2: RUN FROM GRIDPACK --- +if [ "${grid}" == "-fromgridpack" ]; then + echo "Execute $(basename $0) for process ${proc} and backend ${bckend} from gridpack directory $(pwd)" + if [ ! -d ${gridpackdir} ]; then echo "ERROR! Gridpack directory '${gridpackdir}' does not exist"; usage; fi + cd ${gridpackdir} + rm -rf madevent run.sh events.lhe* + tar -xzf run_01_gridpack.tar.gz + # Configure the appropriate backend + for dir in madevent/SubProcesses/P*; do + pushd $dir >& /dev/null + echo "INFO: redefine madevent symlink for backend ${bckend} in ${dir}" + if [ "${bckend}" == "fortran" ]; then + exe=$(\ls madevent_fortran) + else + exe=$(\ls build.*${bckend/cpp/}*/madevent_*) + fi + if [ "$(echo ${exe} | wc -w)" == "0" ]; then + echo "ERROR! No madevent executable found for backend $bckend"; exit 1 + elif [ "$(echo ${exe} | wc -w)" != "1" ]; then + echo "ERROR! Too many madevent executables found for backend $bckend:"; echo "$exe"; exit 1 + fi + \rm -f madevent + ln -sf $exe madevent + popd >& /dev/null + echo "----> madevent symlink will now point to $exe" + done + # Run the test for the appropriate backend + START=$(date +%s) + echo "START: $(date)" |& tee ${resultsdir}/${outfile} + if [ -v CUDACPP_RUNTIME_DISABLEFPE ]; then echo CUDACPP_RUNTIME_DISABLEFPE is set |& tee -a ${resultsdir}/${outfile}; else echo CUDACPP_RUNTIME_DISABLEFPE is not set |& tee -a ${resultsdir}/${outfile}; fi # temporary? (debug FPEs in CMS DY #942) + ls -l madevent/SubProcesses/P*/madevent |& tee -a ${resultsdir}/${outfile} + ./run.sh ${nevt} ${rndseed} |& tee -a ${resultsdir}/${outfile} + mv events* ${resultsdir} + echo "END: $(date)" |& tee -a ${resultsdir}/${outfile} + END=$(date +%s) + echo "ELAPSED: $((END-START)) seconds" |& tee -a ${resultsdir}/${outfile} + exit0 +fi + +# --- OPTION 1: RUN FROM SOURCE CODE (AND OPTIONALLY CREATE A GRIDPACK) --- +cd $(dirname $0)/.. +echo "Execute $(basename $0) for process ${proc} and backend ${bckend} in directory $(pwd)" +procdir=$(pwd)/${proc}${suff} +if [ ! -d ${procdir} ]; then echo "ERROR! Process directory '${procdir}' does not exist"; usage; fi +cd ${procdir} + function lauX_makeclean() { if [ "${nomakeclean}" == "" ]; then @@ -127,30 +190,46 @@ function lauX_cleanup() rm -f SubProcesses/results.dat rm -rf Events HTML; mkdir Events HTML; touch Events/.keep HTML/.keep for d in SubProcesses/P*; do cd $d; rm -rf gensym input_app.txt symfact.dat G[0-9]* ajob[0-9]*; cd - > /dev/null; done + if [ "${grid}" == "-togridpack" ]; then + rm -rf bin/TheChopper-pl + rm -rf bin/clean4grid + rm -rf bin/compile + rm -rf bin/gridrun + rm -rf bin/internal/gen_ximprove + rm -rf bin/refine4grid + rm -rf bin/replace.pl + rm -rf bin/run.sh + fi } # Clean builds before launch lauX_makeclean +# Back up config before launch +cp SubProcesses/randinit SubProcesses/randinit.BKP # save the initial file +cp Cards/run_card.dat Cards/run_card.dat.BKP # save the initial file +cp Cards/grid_card.dat Cards/grid_card.dat.BKP # save the initial file +cp Source/run_card.inc Source/run_card.inc.BKP # save the initial file +cp bin/internal/gen_ximprove.py bin/internal/gen_ximprove.py.BKP # save the initial file +cp bin/internal/madevent_interface.py bin/internal/madevent_interface.py.BKP # save the initial file +cp Source/make_opts Source/make_opts.BKP # save the initial file +cp Source/param_card.inc Source/param_card.inc.BKP # save the initial file + # Clean config before launch +# (NB: "just in case" actions below should normally keep the defaults of generated code in the repo?) +# (NB: but some small differences have been observed, e.g. "False = gridpack" vs "False = gridpack") if [ "${rndoff}" == "0" ]; then rm -rf ${resultsdir}; mkdir ${resultsdir}; fi lauX_cleanup rm -f SubProcesses/ME5_debug -echo "r=21" > SubProcesses/randinit # just in case a previous test was not cleaned up -cp SubProcesses/randinit SubProcesses/randinit.BKP # save the initial file +echo "r=21" > SubProcesses/randinit # just in case sed -i "s/.* = nevents/ 10000 = nevents/" Cards/run_card.dat # just in case sed -i "s/.* = cudacpp_backend/ cpp = cudacpp_backend/" Cards/run_card.dat # just in case sed -i "s/.* = cudacpp_bldall/ False = cudacpp_bldall/" Cards/run_card.dat # just in case -cp Cards/run_card.dat Cards/run_card.dat.BKP # save the initial file +sed -i "s/.* = gridpack/ False = gridpack/" Cards/run_card.dat # just in case sed -i "s/ NEVENTS = .*/ NEVENTS = 10000/" Source/run_card.inc # just in case -cp Source/run_card.inc Source/run_card.inc.BKP # save the initial file sed -i "s/8192 1 1/%(event)s %(maxiter)s %(miniter)s/" bin/internal/gen_ximprove.py # just in case -cp bin/internal/gen_ximprove.py bin/internal/gen_ximprove.py.BKP # save the initial file sed -i "s/'int', 8192,'Number of points/'int', 1000,'Number of points/" bin/internal/madevent_interface.py # just in case sed -i "s/'int', 1, 'Number of iterations'/'int', 5, 'Number of iterations'/" bin/internal/madevent_interface.py # just in case -cp bin/internal/madevent_interface.py bin/internal/madevent_interface.py.BKP # save the initial file -cp Source/make_opts Source/make_opts.BKP # save the initial file -cp Source/param_card.inc Source/param_card.inc.BKP # save the initial file # Set the random seed echo "r=${rndseed}" > SubProcesses/randinit # just in case a previous test was not cleaned up @@ -163,12 +242,14 @@ sed -i "s/'int', 5, 'Number of iterations'/'int', 1, 'Number of iterations'/" bi sed -i "s/%(event)s %(maxiter)s %(miniter)s/8192 1 1/" bin/internal/gen_ximprove.py # Set the number of unweighted events in run_card.dat -nevt=$(getnevt) sed -i "s/ 10000 = nevents/ ${nevt} = nevents/" Cards/run_card.dat # Set the backend in run_card.dat sed -i "s/ cpp = cudacpp_backend/${bckend} = cudacpp_backend/" Cards/run_card.dat +# Set gridpack mode in run_card.dat +if [ "${grid}" == "-togridpack" ]; then sed -i "s/.* = gridpack/ True = gridpack/" Cards/run_card.dat; fi + # Configure bldall in run_card.dat sed -i "s/.* = cudacpp_bldall/ True = cudacpp_bldall/" Cards/run_card.dat @@ -176,7 +257,7 @@ sed -i "s/.* = cudacpp_bldall/ True = cudacpp_bldall/" Cards/run_card.dat # (BUG #683: generate_events does not return an error code even if it fails) ###set -x # verbose START=$(date +%s) -echo "START: $(date)" |& tee ${resultsdir}/${outfile} +echo "START: $(date)" |& tee ${resultsdir}/${outfile} if [ -v CUDACPP_RUNTIME_DISABLEFPE ]; then echo CUDACPP_RUNTIME_DISABLEFPE is set |& tee -a ${resultsdir}/${outfile}; else echo CUDACPP_RUNTIME_DISABLEFPE is not set |& tee -a ${resultsdir}/${outfile}; fi # temporary? (debug FPEs in CMS DY #942) MG5AMC_CARD_PATH=$(pwd)/Cards time ./bin/generate_events -f |& tee -a ${resultsdir}/${outfile} echo "END: $(date)" |& tee -a ${resultsdir}/${outfile} @@ -184,8 +265,14 @@ END=$(date +%s) echo "ELAPSED: $((END-START)) seconds" |& tee -a ${resultsdir}/${outfile} ###set +x # not verbose +# Copy output gridpack to tlau/gridpacks directory +if [ "${grid}" == "-togridpack" ]; then + mv run_01_gridpack.tar.gz ${gridpackdir}/run_01_gridpack.tar.gz + echo "Gridpack created: ${gridpackdir}/run_01_gridpack.tar.gz" +fi + # Process and keep results (only for the default rndoff) -if [ "${rndoff}" == "0" ]; then +if [ "${grid}" != "-togridpack" ] && [ "${rndoff}" == "0" ]; then \rm HTML/results.pkl mv Events ${resultsdir}; mv HTML ${resultsdir} gunzip ${resultsdir}/Events/run_01/unweighted_events.lhe.gz @@ -199,6 +286,7 @@ fi lauX_cleanup mv SubProcesses/randinit.BKP SubProcesses/randinit # restore the initial file mv Cards/run_card.dat.BKP Cards/run_card.dat # restore the initial file +mv Cards/grid_card.dat.BKP Cards/grid_card.dat # restore the initial file mv Source/run_card.inc.BKP Source/run_card.inc # restore the initial file mv bin/internal/gen_ximprove.py.BKP bin/internal/gen_ximprove.py # restore the initial file mv bin/internal/madevent_interface.py.BKP bin/internal/madevent_interface.py # restore the initial file