Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Towards a worflow (extending Stefan's work on runcards) #688

Merged
merged 105 commits into from
Jun 12, 2023

Conversation

valassi
Copy link
Member

@valassi valassi commented Jun 9, 2023

Hi @roiser this is a WIP MR that starts from your #620, fixes some issues and extends runcard features. (And is rebased on the laest master)

Amongst other things it addresses parts of #687.

roiser and others added 21 commits June 9, 2023 17:07
…emove the CODEGEN changes in patch.P1

The overall changes were just a no-op adding an EOF
…emove changes related to symmetry.f in CODEGEN changes to patch.common

The issues in symmetry.f have been fixed in the upstream mg5amcnlo in the meantime
…flow, after checking that his gg_tt.mad was newer than CODEGEN

This produces updated patches because mg5amcnlo has been updated in the meantime

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/Source/vector.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad

NB: I still need to work on the gg_tt.mad changes...
…c and run_card.inc that result from the additions of 3 new parameters in run_card.inc (madgraph5#687)

treatcards run
Found unexpected entry in run_card: "exec_mode" with value "1 ".
  The type was assigned to int.
  The definition of that variable will be automatically added to fortran file
  The value of that variable will be passed to the fortran code via fortran file
Found unexpected entry in run_card: "bridge_mode" with value "1 ".
  The type was assigned to int.
  The definition of that variable will be automatically added to fortran file
  The value of that variable will be passed to the fortran code via fortran file
Found unexpected entry in run_card: "vector_size" with value "32 ".
  The type was assigned to int.
  The definition of that variable will be automatically added to fortran file
  The value of that variable will be passed to the fortran code via fortran file
…stead (madgraph5#687)

Revert "[runcard] in gg_tt.mad/Cards, comment out the 3 new parameters in run_card.dat"
This reverts commit 0b14451.

Revert "[runcard] in gg_tt.mad Source, commit the modified versions of run.inc and run_card.inc that result from the additions of 3 new parameters in run_card.inc (madgraph5#687)"
This reverts commit b5b1ffc.
madgraph5#687)

The run.inc and run_card.inc files now are no longer modified - which is ok/better as these variables are not needed there
This is needed to ensure at this stage that this does not fail (madgraph5#683)

cd ..; rm -rf gg_tt.mad; git checkout gg_tt.mad; cd gg_tt.mad; git status
MG5AMC_CARD_PATH=$(pwd)/Cards ./bin/generate_events
…h5#683)

Several limitations, including
- the script still stops to ask interactively if run/param card should be edited
- the param card file is overwritten!
- the make_opts file is overwritten!
Revert "[runcard] in tlau/lauX.sh add an option to use strace"
This reverts commit 90939d8.
…) use the new madevent_(fortran|cuda|cpp) names
…ckend from FORTRAN to CPP (as done initially by Stefan)
…g a modified MG5AMC for codegen

I used it to understand that run_card.dat is created by export_v4.py at the very end of everything...
It seems very difficult to imagine I can modify the runcard in the cudacpp plugin:
to add the -O3 global flags, I will have to do it in patchMad madgraph5#656 - and tell users to do it themselves
By the way I still need to test that the fastmath actually does not change much... madgraph5#252

I will therefore move both make_opts and runcard to patch.common and patch.P1...
./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/Source/vector.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad

This is not enough! If I regenerate, I get the following new differences
        modified:   gg_tt.mad/Cards/run_card.dat
        modified:   gg_tt.mad/Source/make_opts
        modified:   gg_tt.mad/bin/internal/banner.py
        modified:   gg_tt.mad/bin/internal/gen_ximprove.py
        modified:   gg_tt.mad/bin/internal/madevent_interface.py
This is expected... the last three had to go to patch.common.

About the first two, I wanted to do it differentlty but I am presently unable to... see the previous logs
…5 more files in patch.common

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/Source/vector.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/Cards/run_card.dat gg_tt.mad/Source/make_opts gg_tt.mad/bin/internal/banner.py gg_tt.mad/bin/internal/gen_ximprove.py gg_tt.mad/bin/internal/madevent_interface.py >> CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad

Clearly, this will make the removal of patchMad.sh more complex madgraph5#656
This must be removed from patch.common because it does not work for gg_tt01g
…ed run_card.dat

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/dsample.f gg_tt.mad/Source/genps.inc gg_tt.mad/Source/vector.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/Source/make_opts gg_tt.mad/bin/internal/banner.py gg_tt.mad/bin/internal/gen_ximprove.py gg_tt.mad/bin/internal/madevent_interface.py >> CODEGEN/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad
…ded .gitignore

(Strictly speaking, those .gitignore are for the .mad... but it does not harm, just leave it)
@valassi valassi linked an issue Jun 12, 2023 that may be closed by this pull request
@valassi
Copy link
Member Author

valassi commented Jun 12, 2023

This is essentialy ready now. Amongst other things it fixes #690 and essentially #658

I am running all tests after regenerating, I will document this tomorrow before metrging

STARTED  AT Mon Jun 12 02:54:10 CEST 2023
./tput/teeThroughputX.sh -mix -hrd -makej -eemumu -ggtt -ggttg -ggttgg -gqttq -ggttggg -makeclean
ENDED(1) AT Mon Jun 12 03:18:47 CEST 2023 [Status=0]
./tput/teeThroughputX.sh -flt -hrd -makej -eemumu -ggtt -ggttgg -inlonly -makeclean
ENDED(2) AT Mon Jun 12 03:27:41 CEST 2023 [Status=0]
./tput/teeThroughputX.sh -makej -eemumu -ggtt -ggttg -gqttq -ggttgg -ggttggg -flt -bridge -makeclean
ENDED(3) AT Mon Jun 12 03:36:49 CEST 2023 [Status=0]
./tput/teeThroughputX.sh -eemumu -ggtt -ggttgg -flt -rmbhst
ENDED(4) AT Mon Jun 12 03:39:49 CEST 2023 [Status=0]
./tput/teeThroughputX.sh -eemumu -ggtt -ggttgg -flt -curhst
ENDED(5) AT Mon Jun 12 03:42:48 CEST 2023 [Status=0]
STARTED AT Mon Jun 12 03:45:52 CEST 2023
ENDED   AT Mon Jun 12 08:01:30 CEST 2023
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Jun 12, 2023
In the meantime I have added many files to process-specific .gitignore in MR madgraph5#688

Revert "add gridpack files"
This reverts commit f357f12.
@valassi
Copy link
Member Author

valassi commented Jun 12, 2023

This is now ready to be merged.

I have systematically rerun all tput/tmad tests and they have all passed.

I have also launched a few lauX tests for ggtt and ggttg and everything seemed ok. I will be systematic about adding these tests later on (#683).

I am documenting here what this MR is about

Voila that should be all. CI tests wre ok, I am self merging

@valassi valassi merged commit 06a5cee into madgraph5:master Jun 12, 2023
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Jun 12, 2023
In the meantime I have added many files to process-specific .gitignore in MR madgraph5#688

Revert "add gridpack files"
This reverts commit 1dc82b5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants