Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
959f79a
[grid] in tlau add -grid mode to lauX.sh
valassi Aug 10, 2023
4c83c69
[grid] in tlau/lauX.sh, improve the backup of default config values
valassi Aug 2, 2024
e72e16d
[grid] rerun ggtt cuda tlau with latest code
valassi Aug 5, 2024
0cd37bb
[runcard] in gg_tt.mad and CODEGEN launch_plugin.py, change 'floating…
valassi Apr 15, 2024
b6802bf
[runcard] in CODEGEN output.py change CPP to cpp and add '\n' for cud…
valassi Aug 5, 2024
f451515
[runcard] in CODEGEN launch_plugin.py try to set include=True for cud…
valassi Aug 5, 2024
b5204a4
[runcard] in CODEGEN launch_plugin.py go back to include=False for cu…
valassi Aug 5, 2024
c82d115
[runcard] in CODEGEN launch_plugin.py try to set include=True for cud…
valassi Aug 5, 2024
f82c00a
[runcard] in CODEGEN launch_plugin.py go back to include=False for cu…
valassi Aug 5, 2024
4500d3d
[runcard] in CODEGEN launch_plugin.py move to hidden=False for cudacp…
valassi Aug 5, 2024
1fda033
[runcard] in CODEGEN launch_plugin.py add a cudacpp_fptype line to th…
valassi Aug 5, 2024
47ce57b
[runcard] in CODEGEN output.py add cudacpp_fptype in add_input_for_ba…
valassi Aug 5, 2024
853a20e
[runcard] in CODEGEN launch_plugin.py, configure compile to add USEBU…
valassi Aug 5, 2024
b51a59a
[runcard] in CODEGEN launch_plugin.py, prepend 'BACKEND=xxx' to 'make…
valassi Aug 5, 2024
ce67fb5
[runcard] in CODEGEN launch_plugin.py, append 'BACKEND=xxx' as args[0…
valassi Aug 5, 2024
1e3fc84
[runcard] in CODEGEN and gg_tt.mad launch_plugin.py, revert the last …
valassi Aug 5, 2024
8295e23
[runcard] in gg_tt.mad and CODEGEN makefile, fix Invalid target error…
valassi Aug 5, 2024
f4198b8
[runcard] in gg_tt.mad makefile, fix 'make -j madevent_cuda_link USEB…
valassi Aug 5, 2024
b90e7aa
[runcard] in gg_tt.mad makefile, hardcode USEBUILDDIR=1 in all _link …
valassi Aug 5, 2024
cf49075
[runcard] in gg_tt.mad makefile, add FPTYPE=$(FPTYPE) in all _link ta…
valassi Aug 5, 2024
62cb706
[runcard] in CODEGEN launch_plugin.py, remove USEBUILDDIR=1 from make…
valassi Aug 5, 2024
58d13bd
[runcard] in CODEGEN, backport gg_tt.mad: fix/hardcode USEBUILDDIR=1 …
valassi Aug 5, 2024
210a93f
[runcard] regenerate gg_tt.mad, check all is ok
valassi Aug 5, 2024
542052c
[runcard] rerun tlau ggtt test for cuda, all ok
valassi Aug 5, 2024
e2d920d
[runcard] in CODEGEN launch_plugin.py, add cudacpp_bldall to the runc…
valassi Aug 5, 2024
f5ab088
[runcard] in tlau/lauX.sh, configure bldall = True in the runcards #945
valassi Aug 5, 2024
ace9093
[runcard] in gg_tt.mad, add 'export FPTYPE' to propagate FPTYPE from …
valassi Aug 5, 2024
4dd64e2
[runcard] in CODEGEN, backport gg_tt.mad: export FPTYPE from make_opt…
valassi Aug 5, 2024
4f724d0
[runcard] rerun tlau ggtt test for cuda using the bldall option #945,…
valassi Aug 5, 2024
e5686da
[runcard] rerun tlau ggtt test for fortran using the bldall option #9…
valassi Aug 5, 2024
effc00b
[runcard] in tlau/lauX.sh add the -nomakeclean option
valassi Aug 5, 2024
487324b
[runcard] in tlau/lauX.sh, add a -ALL option to test all backends
valassi Aug 5, 2024
c4ca126
[runcard] rerun tlau ggtt test for ALL backends (add logs generated f…
valassi Aug 5, 2024
a34e12a
[runcard] in tlau/lauX.sh, skip cuda and hip tests if no appropriate …
valassi Aug 6, 2024
b72d635
[cmsdy] in tlau/lauX.sh add the option "-rndoff" to set a random seed…
valassi Aug 6, 2024
32bfd89
[cmsdy] in tlau/lauX.sh, fix the name of log directories after adding…
valassi Aug 7, 2024
e0264b9
[cmsdy] in tlau/lauX.sh add a printout about CUDACPP_RUNTIME_DISABLEF…
valassi Aug 7, 2024
a9ddfef
[grid] undo last commit for easier merging
valassi Aug 7, 2024
bffcfae
Merge branch 'runcard' (WIP on #945 multibuild gridpacks) into grid
valassi Aug 7, 2024
abccad3
[grid] in tlau/lauX.sh, specify that -grid and -ALL are incompatible
valassi Aug 7, 2024
def4cdb
[grid] in tlau/lauX.sh, rename -grid as -togridpack and complete its …
valassi Aug 7, 2024
1481570
[grid] add log from tlau gridpack creation of ggtt
valassi Aug 7, 2024
79a84d5
[grid] in tlau/gridpacks/.gitignore add madevent and run.sh to gitignore
valassi Aug 7, 2024
69ccb3c
[grid] in tlau/lauX.sh, add the -fromgridpack option (but backend swi…
valassi Aug 7, 2024
d3b52c3
[grid] add the first log from a gridpack execution of tlau ggtt fortran
valassi Aug 7, 2024
087c543
[grid] in tlau/lauX.sh, complete the -fromgridpack option including b…
valassi Aug 7, 2024
16ca7f1
[grid] add the first log from a gridpack execution of tlau ggtt cppno…
valassi Aug 7, 2024
43b64fe
[grid] add the first log from a gridpack execution of tlau ggtt for A…
valassi Aug 7, 2024
216ab5c
[grid] in tlau/lauX.sh add a printout about CPU and GPU properties (a…
valassi Aug 7, 2024
9fb6d86
[grid] in tlau/laux.sh improve backup options to avoid BKP files in g…
valassi Aug 7, 2024
88d030e
[grid] recreate ggtt gridpack from fortran on itgold91 (without BKP f…
valassi Aug 7, 2024
710bf15
[grid] in tlau/gridpacks, copy as-is gg_tt.mad/madevent/bin/internal/…
valassi Aug 7, 2024
536701c
[grid] in tlau/lauX.sh copy the patched madevent_interface.py in -fro…
valassi Aug 7, 2024
8a33e43
[grid] add log from tlau gridpack creation of gqttq (simplest process…
valassi Aug 7, 2024
8847428
[clang] in /tools/mg-clang-format/mg-clang-format, downgrade to clang…
valassi Aug 6, 2024
3a3ae86
[grid] regenerate gq_ttq.mad (will use it for tlau tests, simplest pr…
valassi Aug 7, 2024
df7105d
[tlau] regenerate gqttq gridpack from fortran, this time it includes …
valassi Aug 7, 2024
d7c35d9
[grid] add the first log from a gridpack execution of tlau gqttq cppn…
valassi Aug 7, 2024
9b21875
[grid] in tlau/gridpacks/MG5aMC_patches/madevent_interface.py, add se…
valassi Aug 7, 2024
4a288dc
[grid] new log from a gridpack execution of tlau gqttq cppnone (with …
valassi Aug 7, 2024
ab43494
[grid] in tlau/gridpacks, copy as-is also gg_tt.mad/madevent/bin/inte…
valassi Aug 7, 2024
68191a4
[grid] in tlau/lauX.sh copy the patched gen_ximprove.py in -fromgridp…
valassi Aug 7, 2024
95f3217
[grid] in tlau/gridpacks/MG5aMC_patches/gen_ximprove.py (and madevent…
valassi Aug 7, 2024
37127e6
[grid] new log from a gridpack execution of tlau gqttq cppnone (with …
valassi Aug 7, 2024
da103b0
[grid] in tlau/gridpacks, copy as-is also gg_tt.mad/madevent/bin/inte…
valassi Aug 7, 2024
29065c6
[grid] in tlau/lauX.sh copy the patched cluster.py in -fromgridpack mode
valassi Aug 7, 2024
2e8db84
[grid] in tlau/gridpacks/MG5aMC_patches/cluster.py, add several debug…
valassi Aug 7, 2024
03ad68e
[grid] new log from a gridpack execution of tlau gqttq cppnone (with …
valassi Aug 7, 2024
f6ea31c
[grid] in tlau/gridpacks/MG5aMC_patches/cluster.py test that misc.cal…
valassi Aug 7, 2024
eff4f15
[grid] in tlau/gridpacks/MG5aMC_patches try to add additional debug p…
valassi Aug 7, 2024
7d8be78
[grid] new log from a gridpack execution of tlau gqttq cppnone (with …
valassi Aug 7, 2024
6d87232
[grid] in tlau/gridpacks/MG5aMC_patches/gen_ximprove.py set keeplog=t…
valassi Aug 7, 2024
cdd747e
[grid] in tlau/gridpacks/MG5aMC_patches revert the changes in cluster…
valassi Aug 7, 2024
0161e3b
[grid] new log from a gridpack execution of tlau gqttq cppnone (with …
valassi Aug 7, 2024
5f16e48
[grid] in tlau/gridpacks/MG5aMC_patches/gen_ximprove.py finally dump …
valassi Aug 7, 2024
57df9ff
[grid] new log from a gridpack execution of tlau gqttq cppnone (final…
valassi Aug 7, 2024
a84bf7c
[grid] in tlau/gridpacks/MG5aMC_patches add python timers to all rele…
valassi Aug 7, 2024
1cbca07
[grid] new log from a gridpack execution of tlau gqttq cppnone (final…
valassi Aug 7, 2024
b1d2b4f
Merge remote-tracking branch 'upstream/master' (including clang-forma…
valassi Aug 10, 2024
ebcf619
[grid] move to upstream/master codegen logs for easier merging
valassi Aug 22, 2024
6ad8641
Merge remote-tracking branch 'upstream/master' (with hel #960, mac #9…
valassi Aug 22, 2024
d75ac0b
[grid] regenerate gg_tt.mad and gq_ttq.mad, all ok no change
valassi Aug 22, 2024
c68a9a7
[grid] in CODEGEN launch_plugin.py, make cudacpp_bldall a boolean par…
valassi Aug 22, 2024
2060dc1
[grid] regenerate gg_tt.mad and gq_ttq.mad, only launch_plugin.py has…
valassi Aug 22, 2024
9f7aa25
[grid] rerun tlau gridpack creation of gqttq (simplest process with t…
valassi Aug 22, 2024
5345ec0
[grid] add logs from a new gridpack execution of tlau gqttq on ALL ba…
valassi Aug 22, 2024
bebfd72
[grid] in tlau/fromgridpacks add parseGridpackLogs.sh
valassi Aug 7, 2024
70f5c47
[grid] further improvements in tlau parseGridpackLogs.sh, iterate ove…
valassi Aug 7, 2024
bfac4f7
[grid] further refine the tlau parseGridpackLogs.sh script
valassi Aug 7, 2024
324c613
[grid] further refine the tlau parseGridpackLogs.sh script
valassi Aug 8, 2024
289a973
[grid] in tlau compute gq_ttq.mad/summary.txt for the first time from…
valassi Aug 22, 2024
90431ba
[grid] regenerate all processes (before re-merging into cmsdy)
valassi Aug 23, 2024
a7267f0
[grid] move to CODEGEN logs from the latest upstream/master for easie…
valassi Sep 2, 2024
271afaf
Merge remote-tracking branch 'upstream/master' (including new CI and …
valassi Sep 2, 2024
cc08439
[runcard] checkout gg_tt.mad codegen log for easier merging
valassi Sep 10, 2024
0feabcf
Merge remote-tracking branch 'upstream/master' (including "june24" ch…
valassi Sep 10, 2024
e02dfd1
[runcard] regenerate CODEGEN patch from gg_tt.mad after merging upstr…
valassi Sep 10, 2024
58f4e11
[grid] checkout upstream/master gg_tt.mad codegen log for easier merging
valassi Sep 10, 2024
13f73b6
Merge branch 'runcard' (including latest upstream/master with "june24…
valassi Sep 10, 2024
15fc8b8
[grid] rerun tlau gridpack creation of gqttq, this time from cuda as …
valassi Sep 10, 2024
6d08d72
[grid] add logs from a new gridpack execution of tlau gqttq on ALL ba…
valassi Sep 10, 2024
a226276
[cmsdy] in CODEGEN/generateAndCompare.sh, add pp_dy012j from Jin to d…
valassi Aug 2, 2024
5c00ff2
[cmsdy] in CODEGEN/generateAndCompare.sh add pp_dy3j
valassi Aug 7, 2024
9cab25d
[grid] TEMPORARELY add pp_dy3j.mad to the repo... this is 91 MB of co…
valassi Sep 10, 2024
e9776e3
[grid] in tlau, create dy3j gridpack using cuda on itscrd90
valassi Sep 10, 2024
7629a69
[grid] in tlau, recreate dy3j gridpack using cuda on itscrd90, this t…
valassi Sep 10, 2024
1cc61f1
[grid] first tlau run of ppdy3j for ALL backends from gridpack on its…
valassi Sep 10, 2024
bad260f
[grid] in tlau/fromgridpacks, add pp_dy3j.mad/summary.txt
valassi Sep 10, 2024
ddb4296
[grid] in tlau/lauX.sh temporarely move the default nevt from 100 to 500
valassi Sep 10, 2024
9b7807d
[grid] rerun tlau ppdy3j for ALL backends from gridpack on itscrd90 w…
valassi Sep 11, 2024
084eacd
[grid] in tlau/fromgridpacks, update pp_dy3j.mad/summary.txt with 500…
valassi Sep 11, 2024
da2316e
[grid] in CODEGEN/generateAndCompare.sh, add pp_dy4j
valassi Sep 11, 2024
582ed5b
[grid] add bldall.sh script
valassi Sep 11, 2024
60267ed
[grid] in tlau/lauX.sh move back the default nevt from 500 to 100
valassi Sep 11, 2024
338d5ec
[grid] in tlau, create a dy4j gridpack using cuda on itscrd90 (NB sou…
valassi Sep 14, 2024
3ea7b9b
[grid] in tlau/lauX.sh --fromgridpack mode: use untarred backup if it…
valassi Sep 14, 2024
352dabb
[grid] in tlau/lauX.sh --fromgridpack mode: use rsync instead of cp f…
valassi Sep 14, 2024
5480502
[grid] in tlau/lauX.sh --fromgridpack mode: untar gridpacks rather th…
valassi Sep 14, 2024
65408e8
[grid] first run of tlau ppdy4j for ALL backends from gridpack on its…
valassi Sep 14, 2024
5d57d30
[grid] in tlau/fromgridpacks, add pp_dy4j.mad/summary.txt
valassi Sep 14, 2024
4763e1f
[grid] in tlau parseGridpackLogs.sh, print the number of events
valassi Sep 14, 2024
cf12395
[grid] in tlau/fromgridpacks, recreate pp_dy4j.mad/summary.txt with t…
valassi Sep 14, 2024
cc2bcd0
[grid] in tlau/lauX.sh temporarely move the default nevt from 100 to 500
valassi Sep 10, 2024
5557588
[grid] rerun tlau ppdy4j for ALL backends from gridpack on itscrd90 (…
valassi Sep 16, 2024
d3da460
[grid] in tlau/fromgridpacks, recreate pp_dy4j.mad/summary.txt
valassi Sep 16, 2024
39f2cb5
[grid] regenerate all processes before merging v1.00.00 - essentially…
valassi Oct 4, 2024
b712976
[grid] move back to upstream/master CODEGEN logs for easier merging
valassi Oct 4, 2024
7d17925
Merge remote-tracking branch 'upstream/master' (v1.00.00 release) int…
valassi Oct 4, 2024
440f3dd
Merge branch 'install' (fixes for v1.00.01 handling) into grid
valassi Oct 4, 2024
76ca7f4
[grid] regenerate all processes after merging v1.00.00 - no change
valassi Oct 4, 2024
5b8396f
[grid] move back to upstream/master CODEGEN logs for easier merging
valassi Oct 4, 2024
ecf7a22
Merge remote-tracking branch 'upstream/master' (with amd, 1.00.01 and…
valassi Oct 4, 2024
8a16479
[grid] regenerate all processes - ok no change
valassi Oct 4, 2024
6aea0ea
[grid] move back to upstream/master CODEGEN logs for easier merging
valassi Oct 4, 2024
768e58d
[grid] remove plugin_run_card from all processes - prepare to merge b…
valassi Oct 5, 2024
900b92a
Merge branch 'banner' (comment out add_input_for_banner #1015) into grid
valassi Oct 5, 2024
23c4ef7
Merge branch 'makefiles' (change default FPTYPE to 'm') into grid
valassi Oct 6, 2024
5a2e1d1
[grid] remove pp_dy3j.mad from the repo
valassi Oct 5, 2024
b9ebd72
[grid] in CODEGEN launch_plugin.py, add support for HELINL and HRDCOD…
valassi Oct 6, 2024
e43ecbb
[grid] in gg_tt.mad/SubProcesses/makefile, export HELINL and HRDCOD s…
valassi Oct 6, 2024
cde2517
[grid] regenerate CODEGEN patch from gg_tt.mad after merging the late…
valassi Oct 6, 2024
2e23e2d
[grid] regenerate gg_tt.mad - check that SubProcesses/makefile is cor…
valassi Oct 6, 2024
a5dec4e
[grid] regenerate all processes with changes for helinl/hrdcod in the…
valassi Oct 6, 2024
e3ed264
[grid] rerun 96 tput builds and tests on LUMI worker node (small-g 72…
valassi Oct 6, 2024
0fe4544
[grid] rerun 30 tmad tests on LUMI/HIP after merging banner+makefiles…
valassi Oct 6, 2024
deab280
[grid] revert from LUMI/HIP to previous itscrd90 tput/tmad logs
valassi Oct 6, 2024
b249b5e
[grid] rerun 96 tput builds and tests on gold91 after merging banner+…
valassi Oct 6, 2024
0bb573a
[grid] rerun 30 tmad tests on gold91 after merging banner+makefiles -…
valassi Oct 6, 2024
e384aef
[grid] revert from gold91 to previous itscrd90 tput/tmad logs
valassi Oct 6, 2024
8d3ab35
[grid] rerun 102 tput builds and tests on itscrd90 after merging bann…
valassi Oct 6, 2024
631750b
[grid] rerun 30 tmad tests on itscrd90 after merging banner+makefiles…
valassi Oct 6, 2024
bd60fef
[grid] ** COMPLETE GRID ** in CHANGELOG.md, document the changes in b…
valassi Oct 6, 2024
aa68f23
[grid] move to codegen logs from upstream/master to ease merging
valassi Oct 8, 2024
dbf35e0
Merge remote-tracking branch 'upstream/master' (after merging banner …
valassi Oct 8, 2024
e0e764c
[grid] regenerate CODEGEN patch from gg_tt.mad after merging upstream…
valassi Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com).

--------------------------------------------------------------------------------

## [Unreleased] - 2024-10-06
## [Unreleased] - 2024-10-08

### Added

- Infrastructure issues
- AV ([#945]) Add cudacpp_bldall runcard to produce multi-backend gridpacks.
- AV ([#700]) Add cudacpp_helinl and cudacpp_hrdcod runcards to support HELINL=1 and HRDCOD=1 builds.
- AV ([#957]) In internal "tlau" tests, instrument python code in gridpacks to provide timing profiles for event generation.
- AV Enhance internal "tlau" tests and add a few test logs and various scripts to analyse them.

### Changed

- Updated cudacpp version to 1.00.01.

- Infrastructure issues
- AV ([#700]) Renamed the floating_type runcard as cudacpp_fptype for consistency with other cudacpp runcards.

### Fixed

- Platform-specific issues
Expand Down Expand Up @@ -56,9 +67,12 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com).
[Unreleased]: https://github.com/madgraph5/madgraph4gpu/releases/compare/cudacpp_for3.6.0_v1.00.00...HEAD

[#601]: https://github.com/madgraph5/madgraph4gpu/issues/601
[#700]: https://github.com/madgraph5/madgraph4gpu/issues/700
[#846]: https://github.com/madgraph5/madgraph4gpu/issues/846
[#942]: https://github.com/madgraph5/madgraph4gpu/issues/942
[#944]: https://github.com/madgraph5/madgraph4gpu/issues/944
[#945]: https://github.com/madgraph5/madgraph4gpu/issues/945
[#957]: https://github.com/madgraph5/madgraph4gpu/issues/957
[#959]: https://github.com/madgraph5/madgraph4gpu/issues/959
[#993]: https://github.com/madgraph5/madgraph4gpu/issues/993
[#995]: https://github.com/madgraph5/madgraph4gpu/issues/995
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
index 348c283be..49e6800ff 100644
index 348c283be..2e5bff046 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
@@ -1,6 +1,37 @@
@@ -1,6 +1,42 @@
+SHELL := /bin/bash
+
include ../../Source/make_opts
+
+# Export the relevant settings from make_opts to builds using the cudacpp makefile (#700)
+export FPTYPE
+export HELINL
+export HRDCOD
+
+# Determine CUDACPP_BUILDDIR based on the user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD and USEBUILDDIR (#829)
+# Stop with an error if BACKEND=cuda and nvcc is missing or if BACKEND=hip and hipcc is missing
+include ../../src/cudacpp_config.mk
Expand Down Expand Up @@ -40,7 +45,7 @@ index 348c283be..49e6800ff 100644
# Load additional dependencies of the bias module, if present
ifeq (,$(wildcard ../bias_dependencies))
BIASDEPENDENCIES =
@@ -24,7 +55,20 @@ else
@@ -24,7 +60,20 @@ else
MADLOOP_LIB =
endif

Expand All @@ -62,7 +67,7 @@ index 348c283be..49e6800ff 100644

LIBS = $(LIBDIR)libbias.$(libext) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libdsample.$(libext) $(LIBDIR)libgeneric.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUPC.$(libext) $(LIBDIR)libmodel.$(libext) $(LIBDIR)libcernlib.$(libext) $(MADLOOP_LIB) $(LOOP_LIBS)

@@ -43,41 +87,148 @@ ifeq ($(strip $(MATRIX_HEL)),)
@@ -43,41 +92,150 @@ ifeq ($(strip $(MATRIX_HEL)),)
endif


Expand Down Expand Up @@ -153,32 +158,34 @@ index 348c283be..49e6800ff 100644
+ rm -f $(PROG)
+ ln -s $(PROG)_fortran $(PROG)
+
+madevent_cuda_link:
+ $(MAKE) USEGTEST=0 BACKEND=cuda $(CUDACPP_BUILDDIR)/$(PROG)_cuda
+madevent_cudacpp_link: all
+ rm -f $(PROG)
+ifeq ($(BACKEND),cuda)
+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG)
+
+madevent_hip_link:
+ $(MAKE) USEGTEST=0 BACKEND=hip $(CUDACPP_BUILDDIR)/$(PROG)_hip
+ rm -f $(PROG)
+else ifeq ($(BACKEND),hip)
+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_hip $(PROG)
+
+madevent_cpp_link:
+ $(MAKE) USEGTEST=0 BACKEND=cppauto $(CUDACPP_BUILDDIR)/$(PROG)_cpp
+ rm -f $(PROG)
+else
+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG)
+endif
+
+madevent_cuda_link:
+ $(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=cuda madevent_cudacpp_link

-$(LIBDIR)libpdf.$(libext):
- cd ../../Source/PDF; make
+override SUPPORTED_AVXS = cppnone cppsse4 cppavx2 cpp512y cpp512z cppauto
+madevent_%_link:
+ @if [ '$(words $(filter $*, $(SUPPORTED_AVXS)))' != '1' ]; then echo "ERROR! Invalid target '$@' (supported madevent_cpp*_link targets are: $(foreach avx,$(SUPPORTED_AVXS),'madevent_cpp$(avx)_link'))"; exit 1; fi
+ $(MAKE) USEGTEST=0 BACKEND=$* $(CUDACPP_BUILDDIR)/$(PROG)_cpp
+ rm -f $(PROG)
+ ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG)
+madevent_hip_link:
+ $(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=hip madevent_cudacpp_link

-$(LIBDIR)libgammaUPC.$(libext):
- cd ../../Source/PDF/gammaUPC; make
+madevent_cpp_link:
+ $(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=cppauto madevent_cudacpp_link
+
+override SUPPORTED_AVXS = cppnone cppsse4 cppavx2 cpp512y cpp512z cppauto
+madevent_%_link:
+ @if [ '$(words $(filter $*, $(SUPPORTED_AVXS)))' != '1' ]; then echo "ERROR! Invalid target '$@' (supported madevent_cpp*_link targets are: $(foreach avx,$(SUPPORTED_AVXS),'madevent_$(avx)_link'))"; exit 1; fi
+ $(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=$* madevent_cudacpp_link
+
+# Building $(PROG)_cpp no longer builds $(PROG)_cuda if CUDACPP_BACKENDLIB for cuda exists (this was the case in the past to allow cpp-only builds #503)
+$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs
+ $(FC) -o $@ $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(MATRIX) $(LINKLIBS) $(BIASDEPENDENCIES) $(OMPFLAGS) counters.o ompnumthreads.o -L$(LIBDIR)/$(CUDACPP_BUILDDIR) -l$(CUDACPP_COMMONLIB) -l$(CUDACPP_BACKENDLIB) $(LIBFLAGSRPATH) $(LDFLAGS)
Expand Down Expand Up @@ -227,7 +234,7 @@ index 348c283be..49e6800ff 100644

# Dependencies

@@ -97,5 +248,80 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \
@@ -97,5 +255,80 @@ unwgt.o: genps.inc nexternal.inc symswap.inc cluster.inc run.inc message.inc \
run_config.inc
initcluster.o: message.inc

Expand Down
60 changes: 48 additions & 12 deletions epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/launch_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ def compile(self, *args, **opts):
if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source':
path = pjoin(opts['cwd'], 'make_opts')
common_run_interface.CommonRunCmd.update_make_opts_full(path,
{'FPTYPE': self.run_card['floating_type'] })
misc.sprint('FPTYPE checked')
{'FPTYPE': self.run_card['cudacpp_fptype'],
'HELINL': self.run_card['cudacpp_helinl'],
'HRDCOD': self.run_card['cudacpp_hrdcod'] })
misc.sprint('FPTYPE, HELINL, HRDCOD checked')
cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'):
if self.run_card['cudacpp_bldall'] == True: # pre-build all backends #945
logger.info("Pre-building madevent in madevent_interface.py with ALL matrix elements")
args[0][0] = 'bldall'
misc.compile(nb_core=self.options['nb_core'], *args, **opts)
cudacpp_backend = self.run_card['cudacpp_backend'].lower() # the default value is defined in launch_plugin.py
logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
if cudacpp_backend in cudacpp_supported_backends :
Expand All @@ -47,14 +53,18 @@ def compile(self, *args, **opts):
else:
return misc.compile(nb_core=self.options['nb_core'], *args, **opts)

# Phase-Space Optimization ------------------------------------------------------------------------------------
# CUDACPP runcard block ------------------------------------------------------------------------------------
template_on = \
"""#***********************************************************************
# SIMD/GPU configuration for the CUDACPP plugin
#************************************************************************
%(cudacpp_backend)s = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp, cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
%(cudacpp_backend)s = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp (DEFAULT), cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
#*** WARNING! The following cudacpp runcards are experimental! Users should normally change only the cudacpp_backend card ***
%(cudacpp_fptype)s = cudacpp_fptype ! CUDACPP floating point precision: f (single), d (double), m (mixed, DEFAULT: double for amplitudes, single for colors)
%(cudacpp_hrdcod)s = cudacpp_hrdcod ! CUDACPP parameter hardcoding: 0 (DEFAULT, parameters not hardcoded: read param_card.dat at runtime), 1 (hardcoded parameters)
%(cudacpp_helinl)s = cudacpp_helinl ! CUDACPP helicity amplitude inlining: 0 (DEFAULT, ordinary inlining of templates), 1 (aggressive inlining with 'always inline')
%(cudacpp_bldall)s = cudacpp_bldall ! CUDACPP build all available backends in separate build directories: False, True
"""

template_off = ''
plugin_block = banner_mod.RunBlock('simd', template_on=template_on, template_off=template_off)

Expand All @@ -75,23 +85,49 @@ def reset_simd(self, old_value, new_value, name):
def reset_makeopts(self, old_value, new_value, name):
if not hasattr(self, 'path'):
raise Exception
if name == 'floating_type':
if name == 'cudacpp_fptype':
common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value})
elif name == 'cudacpp_hrdcod':
raise Exception('Cannot change cudacpp_hrdcod')
elif name == 'cudacpp_helinl':
raise Exception('Cannot change cudacpp_helinl')
elif name == 'cudacpp_bldall':
raise Exception('Cannot change cudacpp_bldall')
else:
raise Exception
Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source')
subprocess.call(['make', 'cleanall'], cwd=Sourcedir, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

def default_setup(self):
super().default_setup()
self.add_param('floating_type', 'm', include=False, hidden=True,
fct_mod=(self.reset_makeopts,(),{}),
allowed=['m','d','f'],
comment='floating point precision: f (single), d (double), m (mixed: double for amplitudes, single for colors)'
)
cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
self.add_param('cudacpp_backend', 'cpp', include=False, hidden=False,
self.add_param('cudacpp_backend', 'cpp',
include=False, # AV: 'include=True' would add "CUDACPP_BACKEND = 'cpp'" to run_card.inc
hidden=False, # AV: keep cudacpp_backend in runcard template and keep 'hidden='False'
allowed=cudacpp_supported_backends)
self.add_param('cudacpp_fptype', 'm',
include=False, # AV: 'include=True' would add "CUDACPP_FPTYPE = 'm'" to run_card.inc (if fct_mod is removed, else codegen fails)
hidden=False, # AV: add cudacpp_backend to runcard template and keep 'hidden='False'
fct_mod=(self.reset_makeopts,(),{}), # AV: I assume this forces a 'make cleanavx' if FPTYPE changes?
allowed=['m','d','f']
)
self.add_param('cudacpp_helinl', '0',
include=False, # AV: no need to add this parameter to run_card.inc
hidden=False, # AV: add cudacpp_helinl to runcard template and keep 'hidden='False'
fct_mod=(self.reset_makeopts,(),{}), # AV: I assume this raises an exception if cudacpp_helinl changes?
allowed=['0','1']
)
self.add_param('cudacpp_hrdcod', '0',
include=False, # AV: no need to add this parameter to run_card.inc
hidden=False, # AV: add cudacpp_hrdcod to runcard template and keep 'hidden='False'
fct_mod=(self.reset_makeopts,(),{}), # AV: I assume this raises an exception if cudacpp_hrdcod changes?
allowed=['0','1']
)
self.add_param('cudacpp_bldall', False,
include=False, # AV: no need to add this parameter to run_card.inc
hidden=False, # AV: add cudacpp_bldall to runcard template and keep 'hidden='False'
fct_mod=(self.reset_makeopts,(),{}), # AV: I assume this raises an exception if cudacpp_bldall changes?
)
self['vector_size'] = 16 # already setup in default class (just change value)
self['aloha_flag'] = '--fast-math'
self['matrix_flag'] = '-O3'
Expand Down
32 changes: 32 additions & 0 deletions epochX/cudacpp/CODEGEN/generateAndCompare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,38 @@ function codeGenAndDiff()
susy_gg_ulul)
cmd="import model MSSM_SLHA2; generate g g > ul ul~"
;;
pp_dy012j) # from Jin #942
cmd="import model sm-no_b_mass
define p = u d c s b u~ d~ c~ s~ b~ g
define j = p
define ell+ = e+ mu+ ta+
define ell- = e- mu- ta-
define nu = ve vm vt
define nubar = ve~ vm~ vt~
generate p p > ell+ ell- @0
add process p p > ell+ ell- j @1
add process p p > ell+ ell- j j @2"
;;
pp_dy3j) # from Jin #942
cmd="import model sm-no_b_mass
define p = u d c s b u~ d~ c~ s~ b~ g
define j = p
define ell+ = e+ mu+ ta+
define ell- = e- mu- ta-
define nu = ve vm vt
define nubar = ve~ vm~ vt~
generate p p > ell+ ell- j j j @0"
;;
pp_dy4j) # extend dy3j from Jin #942
cmd="import model sm-no_b_mass
define p = u d c s b u~ d~ c~ s~ b~ g
define j = p
define ell+ = e+ mu+ ta+
define ell- = e- mu- ta-
define nu = ve vm vt
define nubar = ve~ vm~ vt~
generate p p > ell+ ell- j j j j @0"
;;
atlas)
cmd="import model sm-no_b_mass
define p = g u c d s b u~ c~ d~ s~ b~
Expand Down
32 changes: 32 additions & 0 deletions epochX/cudacpp/bldall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [ "$1" == "" ] || [ "$2" != "" ]; then
echo "Usage: $0 <process_directory>"
exit 1
fi
spdir=${1}/SubProcesses

if [ ! -d ${spdir} ]; then
echo "ERROR! Directory not found: ${spdir}"
exit 1
fi
cd ${spdir}

START=$(date +%s)

TMP=${START}
for pdir in P*; do
echo "--------------------------------------------------------------------------------"
cd ${pdir}
pwd
sleep 1
make -j bldall
cd - > /dev/null
END=$(date +%s)
echo "ELAPSED: $((END-TMP)) seconds"
TMP=${END}
done
echo "================================================================================"

END=$(date +%s)
echo "ELAPSED: $((END-START)) seconds"
7 changes: 6 additions & 1 deletion epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,10 @@ systematics = systematics_program ! none, systematics [python], SysCalc [deprece
#***********************************************************************
# SIMD/GPU configuration for the CUDACPP plugin
#************************************************************************
cpp = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp, cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
cpp = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp (DEFAULT), cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
#*** WARNING! The following cudacpp runcards are experimental! Users should normally change only the cudacpp_backend card ***
m = cudacpp_fptype ! CUDACPP floating point precision: f (single), d (double), m (mixed, DEFAULT: double for amplitudes, single for colors)
0 = cudacpp_hrdcod ! CUDACPP parameter hardcoding: 0 (DEFAULT, parameters not hardcoded: read param_card.dat at runtime), 1 (hardcoded parameters)
0 = cudacpp_helinl ! CUDACPP helicity amplitude inlining: 0 (DEFAULT, ordinary inlining of templates), 1 (aggressive inlining with 'always inline')
False = cudacpp_bldall ! CUDACPP build all available backends in separate build directories: False, True

7 changes: 6 additions & 1 deletion epochX/cudacpp/ee_mumu.mad/Cards/run_card_default.dat
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,10 @@ systematics = systematics_program ! none, systematics [python], SysCalc [deprece
#***********************************************************************
# SIMD/GPU configuration for the CUDACPP plugin
#************************************************************************
cpp = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp, cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
cpp = cudacpp_backend ! CUDACPP backend: fortran, cuda, hip, cpp (DEFAULT), cppnone, cppsse4, cppavx2, cpp512y, cpp512z, cppauto
#*** WARNING! The following cudacpp runcards are experimental! Users should normally change only the cudacpp_backend card ***
m = cudacpp_fptype ! CUDACPP floating point precision: f (single), d (double), m (mixed, DEFAULT: double for amplitudes, single for colors)
0 = cudacpp_hrdcod ! CUDACPP parameter hardcoding: 0 (DEFAULT, parameters not hardcoded: read param_card.dat at runtime), 1 (hardcoded parameters)
0 = cudacpp_helinl ! CUDACPP helicity amplitude inlining: 0 (DEFAULT, ordinary inlining of templates), 1 (aggressive inlining with 'always inline')
False = cudacpp_bldall ! CUDACPP build all available backends in separate build directories: False, True

31 changes: 19 additions & 12 deletions epochX/cudacpp/ee_mumu.mad/SubProcesses/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ SHELL := /bin/bash

include ../../Source/make_opts

# Export the relevant settings from make_opts to builds using the cudacpp makefile (#700)
export FPTYPE
export HELINL
export HRDCOD

# Determine CUDACPP_BUILDDIR based on the user-defined choices of BACKEND, FPTYPE, HELINL, HRDCOD and USEBUILDDIR (#829)
# Stop with an error if BACKEND=cuda and nvcc is missing or if BACKEND=hip and hipcc is missing
include ../../src/cudacpp_config.mk
Expand Down Expand Up @@ -162,27 +167,29 @@ madevent_fortran_link: $(PROG)_fortran
rm -f $(PROG)
ln -s $(PROG)_fortran $(PROG)

madevent_cuda_link:
$(MAKE) USEGTEST=0 BACKEND=cuda $(CUDACPP_BUILDDIR)/$(PROG)_cuda
madevent_cudacpp_link: all
rm -f $(PROG)
ifeq ($(BACKEND),cuda)
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cuda $(PROG)
else ifeq ($(BACKEND),hip)
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_hip $(PROG)
else
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG)
endif

madevent_cuda_link:
$(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=cuda madevent_cudacpp_link

madevent_hip_link:
$(MAKE) USEGTEST=0 BACKEND=hip $(CUDACPP_BUILDDIR)/$(PROG)_hip
rm -f $(PROG)
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_hip $(PROG)
$(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=hip madevent_cudacpp_link

madevent_cpp_link:
$(MAKE) USEGTEST=0 BACKEND=cppauto $(CUDACPP_BUILDDIR)/$(PROG)_cpp
rm -f $(PROG)
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG)
$(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=cppauto madevent_cudacpp_link

override SUPPORTED_AVXS = cppnone cppsse4 cppavx2 cpp512y cpp512z cppauto
madevent_%_link:
@if [ '$(words $(filter $*, $(SUPPORTED_AVXS)))' != '1' ]; then echo "ERROR! Invalid target '$@' (supported madevent_cpp*_link targets are: $(foreach avx,$(SUPPORTED_AVXS),'madevent_cpp$(avx)_link'))"; exit 1; fi
$(MAKE) USEGTEST=0 BACKEND=$* $(CUDACPP_BUILDDIR)/$(PROG)_cpp
rm -f $(PROG)
ln -s $(CUDACPP_BUILDDIR)/$(PROG)_cpp $(PROG)
@if [ '$(words $(filter $*, $(SUPPORTED_AVXS)))' != '1' ]; then echo "ERROR! Invalid target '$@' (supported madevent_cpp*_link targets are: $(foreach avx,$(SUPPORTED_AVXS),'madevent_$(avx)_link'))"; exit 1; fi
$(MAKE) USEGTEST=0 USEBUILDDIR=1 BACKEND=$* madevent_cudacpp_link

# Building $(PROG)_cpp no longer builds $(PROG)_cuda if CUDACPP_BACKENDLIB for cuda exists (this was the case in the past to allow cpp-only builds #503)
$(CUDACPP_BUILDDIR)/$(PROG)_cpp: $(PROCESS) $(DSIG_cudacpp) auto_dsig.o $(LIBS) $(MATRIX) counters.o ompnumthreads.o $(CUDACPP_BUILDDIR)/.cudacpplibs
Expand Down
Loading