|
7 | 7 | set -e # fail on error |
8 | 8 |
|
9 | 9 | # AV Recover special 'tmad' mode used by generateAndCompare.sh, after OM's changes that commented this out in patchMad.sh |
10 | | -export MG5AMC_TMADMODE=1 |
| 10 | +export CUDACPP_CODEGEN_TMADMODE=1 |
11 | 11 |
|
12 | 12 | #-------------------------------------------------------------------------------------- |
13 | 13 |
|
@@ -204,9 +204,31 @@ function codeGenAndDiff() |
204 | 204 | cat ${outproc}_log.txt | egrep -v '(Crash Annotation)' > ${outproc}_log.txt.new # remove firefox 'glxtest: libEGL initialize failed' errors |
205 | 205 | \mv ${outproc}_log.txt.new ${outproc}_log.txt |
206 | 206 | fi |
| 207 | + # Patches moved here from patchMad.sh after Olivier's PR #764 (THIS IS ONLY NEEDED IN THE MADGRAPH4GPU GIT REPO) |
| 208 | + if [ "${OUTBCK}" == "mad" ]; then |
| 209 | + # Force the use of strategy SDE=1 in multichannel mode (see #419) |
| 210 | + sed -i 's/2 = sde_strategy/1 = sde_strategy/' ${outproc}/Cards/run_card.dat |
| 211 | + # Generate run_card.inc and param_card.inc (include stdout and stderr in the code generation log which is later checked for errors) |
| 212 | + # These two steps are part of "cd Source; make" but they actually are code-generating steps |
| 213 | + ${outproc}/bin/madevent treatcards run >> ${outproc}_log.txt 2>&1 # AV BUG! THIS MAY SILENTLY FAIL (check if output contains "Please report this bug") |
| 214 | + ${outproc}/bin/madevent treatcards param >> ${outproc}_log.txt 2>&1 # AV BUG! THIS MAY SILENTLY FAIL (check if output contains "Please report this bug") |
| 215 | + # Cleanup |
| 216 | + \rm -f ${outproc}/crossx.html |
| 217 | + \rm -f ${outproc}/index.html |
| 218 | + \rm -f ${outproc}/madevent.tar.gz |
| 219 | + \rm -f ${outproc}/Cards/delphes_trigger.dat |
| 220 | + \rm -f ${outproc}/Cards/plot_card.dat |
| 221 | + \rm -f ${outproc}/bin/internal/run_plot* |
| 222 | + \rm -f ${outproc}/HTML/* |
| 223 | + \rm -rf ${outproc}/bin/internal/__pycache__ |
| 224 | + \rm -rf ${outproc}/bin/internal/ufomodel/py3_model.pkl |
| 225 | + \rm -rf ${outproc}/bin/internal/ufomodel/__pycache__ |
| 226 | + touch ${outproc}/HTML/.keep # new file |
| 227 | + fi |
| 228 | + # Check the code generation log for errors |
207 | 229 | if [ -d ${outproc} ] && ! grep -q "Please report this bug" ${outproc}_log.txt; then |
208 | 230 | ###cat ${outproc}_log.txt; exit 0 # FOR DEBUGGING |
209 | | - cat ${MG5AMC_HOME}/${outproc}_log.txt | egrep 'INFO: (Try|Creat|Organiz|Process)' |
| 231 | + cat ${MG5AMC_HOME}/${outproc}_log.txt | { egrep 'INFO: (Try|Creat|Organiz|Process)' || true; } |
210 | 232 | else |
211 | 233 | echo "*** ERROR! Code generation failed" |
212 | 234 | cat ${MG5AMC_HOME}/${outproc}_log.txt |
|
0 commit comments