Skip to content
New issue

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

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

Already on GitHub? # to your account

implement new CI and fixed the one related to the compilation issue. #980

Merged
merged 23 commits into from
Sep 1, 2024

Conversation

oliviermattelaer
Copy link
Member

Hi,

This PR is basically the same as #865 but not targetting master but testsuite_only.
(and with a lot of cherry-pick/squashing from the original branch), so #865 is just the sum of this PR and the one related to testsuite_only.

Note that this PR need a change to the upstream madgraph (which should be urgently approved) and the associated PR is
mg5amcnlo/mg5amcnlo#132

@oliviermattelaer oliviermattelaer changed the base branch from testsuite_only to master August 30, 2024 15:09
@oliviermattelaer oliviermattelaer requested a review from a team as a code owner August 30, 2024 15:09
@valassi
Copy link
Member

valassi commented Aug 30, 2024

Hi @oliviermattelaer thanks so far looks good.

One 'minor' point, I would probably prefer (need to cross check) to split the clean logic in Source from

clean:
	$(RM) *.o $(LIBRARIES) $(BINARIES)
	cd PDF; make clean; cd ..
	cd PDF/gammaUPC; make clean; cd ../../
	cd DHELAS; make clean; cd ..
	cd CERNLIB; make clean; cd ..
	cd MODEL; make clean; cd ..
	if [ -d RUNNING ]; then cd RUNNING; make clean; cd ..; fi
	cd BIAS/dummy; make clean; cd ../..
	cd BIAS/ptj_bias; make clean; cd ../..
	if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi
	if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi
	for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done;

to the following (what I have now in master through patches)

cleanSource:
	$(RM) *.o $(LIBRARIES) $(BINARIES)
	cd PDF; make clean; cd ..
	cd PDF/gammaUPC; make clean; cd ../../
	cd DHELAS; make clean; cd ..
	cd CERNLIB; make clean; cd ..
	cd MODEL; make clean; cd ..
	if [ -d RUNNING ]; then cd RUNNING; make clean; cd ..; fi
	cd BIAS/dummy; make clean; cd ../..
	cd BIAS/ptj_bias; make clean; cd ../..
	if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi
	if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi

clean: cleanSource
	for i in `ls -d ../SubProcesses/P*`; do cd $$i; make clean; cd -; done;

The motivation is that this allows faster make cleanall of cudacpp: by calling cleanSource I ONLY clean Source, then the more complex cleaning looping through P* I do elsewhere (I need to delete the build.* directories).

I can do that no problem, I propose

  • I would change the default Source makefile making the split above (might look useless, but it is harmless, make clean does the same)
  • I would add some comments to explain what the different clean commands do
  • I would then fix the rest using your nice mechanism
  • By the way, I would then prefer to actually add the clean at the end rather than in the middle, so I can add one dictionary entry 'append_to_makefile' or something instead of using `additional_dependencies'

I will let you know when done

@valassi
Copy link
Member

valassi commented Aug 31, 2024

The motivation is that this allows faster make cleanall of cudacpp: by calling cleanSource I ONLY clean Source, then the more complex cleaning looping through P* I do elsewhere (I need to delete the build.* directories).

I did a simple test to confirm this, on gq_ttq which is the simplest process with more than one P* in the repo.

Using upstream/master (i.e. what I would lik to go back to)

[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu> make cleanall | \grep Entering 
make[1]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF/gammaUPC'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF/gammaUPC'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/DHELAS'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/CERNLIB'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/MODEL'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/BIAS/dummy'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/BIAS/ptj_bias'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'

Using instead what is currently in this PR

[avalassi@itscrd90 gcc11/usr] /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu> make cleanall | \grep Entering 
make[1]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF/gammaUPC'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/PDF/gammaUPC'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/DHELAS'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/CERNLIB'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/MODEL'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/BIAS/dummy'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/Source/BIAS/ptj_bias'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[3]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[4]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'
make[5]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/src'

The difference is

11,12d10
< make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux'
< make[2]: Entering directory '/data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu'

In a project with many P*, where looping through P* is slow, this is an issue. I will go back to the upstream/master logic (with the new codegen however)

…ll' instead of 'make cleanavx' to clean the build (these are identical)
… up P* cleanup; remove cleanavx which is identical to cleanall (launch_plugin.py has been changed accordingly)
valassi added a commit to valassi/mg5amcnlo that referenced this pull request Aug 31, 2024
…ource+clean and add an %(additional_clean) section

This is needed to speed up the cleanup of P* subprocesses in cudacpp
See madgraph5/madgraph4gpu#980
…efile, split clean into cleanSource+clean and move cleanavxs at the end via %(additional_clean)
…k cleanSource to speed up P* cleanup

Also remove cleanavx which is identical to cleanall (launch_plugin.py has been changed accordingly)

Add some comments in Olivier's write_source_makefile
…l commit message later (regenerating the patch changes nothing)
…g changes: I just want to mark that Source/makefile is no longer there)

The only files that still need to be patched are
- 2 in patch.common: Source/genps.inc, SubProcesses/makefile
- 3 in patch.P1: auto_dsig1.f, driver.f, matrix1.f

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/genps.inc gg_tt.mad/SubProcesses/makefile > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/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/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad
Copy link
Member

@valassi valassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve, but we need also #984

oliviermattelaer pushed a commit to mg5amcnlo/mg5amcnlo that referenced this pull request Aug 31, 2024
…ource+clean and add an %(additional_clean) section

This is needed to speed up the cleanup of P* subprocesses in cudacpp
See madgraph5/madgraph4gpu#980
@valassi
Copy link
Member

valassi commented Sep 1, 2024

Hi @oliviermattelaer some of your confusion in #984 (comment) probably came from the fact that this testsuite_only_fixed did not include the latest upstream/master.

I have now merged master into testsuite_only, and I have also merged testsuite_only into this testsuite_only_fixed.

…_fixci): fix my bug, define additional_clean in the second place where it is needed in export_v4.py
@valassi
Copy link
Member

valassi commented Sep 1, 2024

I have now merged #984 into this PR as discussed with Olivier.

After the CI runs I will merge 979 and this 980 into master.

@valassi
Copy link
Member

valassi commented Sep 1, 2024

Ok the CI is as expected, only the three pptt012j tests fail.
image

I will merge #979 and then this 980.

@valassi
Copy link
Member

valassi commented Sep 1, 2024

I have merged #979 into master.

Now merging into master this #980 which also includes #984.

@valassi valassi merged commit c4c6e13 into master Sep 1, 2024
170 of 173 checks passed
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 1, 2024
…, madgraph5#980, madgraph5#984 patches for the new CI and Source/makefile) into june24

Fix conflicts:
- MG5aMC/mg5amcnlo (keep the current june24 version 4ef15cab1 i.e. current valassi_gpucpp_june24)
- epochX/cudacpp/gg_tt.mad/bin/internal/banner.py (keep a debug printout)
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 2, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 2, 2024
…Source/makefile madgraph5#980) into prof

(Checked that regenerating gg_tt.mad is all ok)
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 2, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 2, 2024
…adgraph5#980) into cmsdy

Fix conflicts:
- epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common (remove Source/makefile)
- epochX/cudacpp/CODEGEN/allGenerateAndCompare.sh (add processes from both branches)

(Checked that regenerating gg_tt.mad is ok)
valassi added a commit to valassi/madgraph4gpu that referenced this pull request Sep 2, 2024
…rce/makefile madgraph5#980) into cmsdyps

Fix conflicts:
- epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common (remove Source/makefile)

(NB regenerating gg_tt.mad is not ok: the newranmar.o is now missing)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants