Remove patches and patchMad.sh, fix googletest incompatibilities#1052
Remove patches and patchMad.sh, fix googletest incompatibilities#1052Qubitol merged 16 commits intomadgraph5:masterfrom
Conversation
…ATA VECSIZE_USED initialisation
This solves the issues presented in madgraph5#1040, madgraph5#1045, madgraph5#1048, madgraph5#1051: apparently, googletest is build once and then cached: if it had been built on an Intel runner with AVX512 support, and the same is restored on an AMD runner without AVX512, then the runTest.exe would fail with Illegal Instruction.
valassi
left a comment
There was a problem hiding this comment.
Hi Daniele, thanks and well done, nice MR! It was about time we remove patchMad.
As discussed, I send you here a few (minor) comments/questions.
-
I saw that
make bldallno longer works and one must domake -f makefile -f cudacpp_overlay.mk bldall. First point, it would be nice if possible to avoid passing the two extra-f. Second point, this spits out many warnings. I was wondering, would it not be possible to use the same trick you used elsewhere, "%(CUDACPP_MAKEFILE_EXTRA)" inside the makefile template and define/modify some things inside the makefile itself? For instance, to instruct the makefile itself to add the overlay, and in the relevant places to make changes that avoid the warnings? Not a problem if you think that's not useful/needed, but I wanted to suggest it. -
I got confused at some point because you have a MR open on mg5amc mg5amcnlo/mg5amcnlo#191, and I was wondering how your MR can work without it. Then I realised that actually this MR uses a similar change I had already done in view of removing patchMad, mg5amcnlo/mg5amcnlo@c1509dc. So my question is, can mg5amcnlo/mg5amcnlo#191 be closed or do you still need that too (why)?
I also sent a couple of other minor points directly in the code.
Thanks again, cheers Andrea
epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
Show resolved
Hide resolved
epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
Show resolved
Hide resolved
...dacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp_overlay.mk
Outdated
Show resolved
Hide resolved
|
PS Specifically about the warnings, these are things like |
|
Thanks for the comments! Here are my thoughts.
I thought about that, and there are 2 solutions:
I don't have a strong opinion on either 3 of the solutions (leave it as it is, use approach 1 or use approach 2), I guess we should involve @roiser and @oliviermattelaer for a final decision.
That's a good point, but this requires to modify the MadGraph code generator to write
Yes, indeed that PR can be closed, no changes in MadGraph are necessary for this PR. |
Yeah, they are annoying, but there is no easy and robust way to remove them, unless we silence stderr. And I don't thing we should silence stderr. We can filter stderr, but I don't think it is worthy just to get rid of those lines. There may be other tricks, but I can't recall any. |
Thanks to you Daniele!
I think the technicality is not too complex here. Whether makefile is copied or used as a template can be decidded in cudacpp, but if you do not inject the placeholders in the template in mg5amc this will not work. So in case it requires changes in mg5amc. I think this can be done (and in that case you do not even need option 1 above, you can just modify the makefile). But another option is, just go ahead with the MR and keep the warnings. Then a future MR can always be done at another time to remove those warnings. This may speed things up.
Ok thanks for confirming! |
No I agree, I would not silence stderr. As I said previously, you can also just merge the MR as is, and then these warnings can be removed at a later stage. Summary, all good for me, thanks for the changes you made! |
Makefile wrapper used in case of madevent to join together both makefile_orig and cudacpp_overlay.mk. This is to avoid doing make -f makefile -f cudacpp.mk, keeping the possibility to just do `make`: - makefile (after code generation by MadGraph) is renamed to makefile_original.mk - makefile_wrapper.mk (copied from cudacpp) is symlinked as makefile The logic is: in each SubProcesses/P* directory we have - makefile -> ../makefile (this is the original makefile) - cudacpp_overlay.mk -> ../cudacpp_overlay.mk While in the SubProcesses directory we had to: - makefile (this is the original makefile) - cudacpp_overlay.mk - makefile_wrapper.mk So, in each SubProcesses/P* we had to (done in model_handling.py) symlink from SubProcesses/P*/makefile_original.mk to SubProcesses/makefile_original.mk (it will be broken initially). While in SubProcesses we had to (done in output.py): - copy makefile to makefile_original.mk (this fixes the previous symlink) - remove makefile - symlink from makefile_wrapper.mk to makefile So that now the situation in each SubProcesses/P* is: - makefile -> ../makefile (this is the makefile_wrapper.mk) - cudacpp_overlay.mk -> ../cudacpp_overlay.mk - makefile_original.mk -> ../makefile_original.mk (this is the original makefile)
|
Thanks for the comments, regarding adding an additional |
PR to remove
patchesandpatchMad.sh.The code additions have been done using the code generation placeholders present within MadGraph itself.
Additionally, fix issues due to googletest incompatibilities, in the CI, see previous PRs #1040, #1045, #1048, #1051, and commits
5c73921,af17e41.