Skip to content

Commit

Permalink
[refactorMakefile] attempt an additional fix for codegen: move back f…
Browse files Browse the repository at this point in the history
…2py patching from generateAndCompare.sh to patchMad.sh

(This is an old commit from 9 Dec but the description is still valid on 14 Dec)

Before this commit, codegen was now failing on itscrd90 as it was previously failing on itscrd80 (patchMd.sh fails due to f2py)

After this commit, codegen is succeeding again on itscrd90, and now also on itscrd80 (fixing the issue in PR madgraph5#753)
  • Loading branch information
valassi committed Dec 14, 2023
1 parent 8f65910 commit 5473f65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ touch ${dir}/Events/.keep # this file should already be present (mg5amcnlo copie
\cp -pr ${scrdir}/MG5aMC_patches/${dir_patches}/fbridge_common.inc ${dir}/SubProcesses # new file
if [ "${patchlevel}" == "2" ]; then
cd ${dir}
sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' Source/make_opts # AV back in patchMad.sh #753
echo "DEBUG: cd ${PWD}; patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common"
if ! patch -p4 -i ${scrdir}/MG5aMC_patches/${dir_patches}/patch.common; then status=1; fi
\rm -f Source/*.orig
Expand Down
2 changes: 1 addition & 1 deletion epochX/cudacpp/CODEGEN/generateAndCompare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function codeGenAndDiff()
\rm -rf ${outproc}/bin/internal/ufomodel/__pycache__
touch ${outproc}/HTML/.keep # new file
if [ "${patchlevel}" == "2" ]; then
sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts
###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${outproc}/Source/make_opts # AV back in patchMad.sh #753
cat ${outproc}/Source/make_opts | sed '/#end/q' | head --lines=-1 | sort > ${outproc}/Source/make_opts.new
cat ${outproc}/Source/make_opts | sed -n -e '/#end/,$p' >> ${outproc}/Source/make_opts.new
\mv ${outproc}/Source/make_opts.new ${outproc}/Source/make_opts
Expand Down

0 comments on commit 5473f65

Please sign in to comment.