# Madgraph dev meeting Mon 22 Aug 2022
Present: SR, AV, ZennyW, JorgenT, TC, NN, CV
## Round table
Working on the bridge in the sycl code.
Is there a way to do some tests and comparisons to fortran?
AV: yes look at tmad/madX.sh (or tmad/teeMadX.sh to write to file).
This includes functional tests (compare cross section with Fortran ME or cuda/cpp ME)
and performance measurements (throughputs wth Fortran ME or cuda/cpp ME).
For sycl you could do as done in cudacpp, you switch to sycl MEs and compare to Fortran,
how much faster than fortran are you to obtain the exact same physics results.
Building sycl version within a docker container.
This is a docker container provided by sycl,
solves all issues with clashing versions of compilers.
In contact with Nathan to solve issues.
AV: does it include CUDA, can it access Nvidia GPUs?
CV: yes somehow did manage to run also a Tesla T4.
Note that I installed cuda 11.6 inside the container.
SR: can you send a link? CV: yes will do
SR: maybe we can even run on AMD GPUs...
Doing some benchmarking on sycl version of madgraph.
Trying to use A100 at juwels HPC.
NN: using master branch?
JT: yes master
NN: try to use the golden4 tag instead, the master has issues
Was in Vienna last week, discussed with the CMS team there.
There is definite interest in reweighting for EFTs.
They are very interested in speeding up the calculations,
it would allow them to do many studies with more precision.
SR: we looked at cudacpp plugin, is this generic?
AV: yes you can use it as-is for a simple proof of concept,
for a reweighting to a single new set of parameters.
You just need to develop the I/O of momenta and MEs on file.
Independently of phase space sampling (you can use
the standalone stuff, or better even madevent!),
first you generate some events and write them to file
for a given parameter set: you must write the momenta,
and the ME from the cudacpp plugin.
Then in your frameweork to read events, you read momenta and ME,
send to the SAME cudacpp kernels the calculation of ME
with a new parameter set, and compute the ratio of new ME
over old ME: this is the reweighting.
Later on, a second step will be to compute MANY parameter sets
at the same time, and this will require changes to the cudacpp plugin:
but for a single parameter set no changes in cudacpp are needed.
Mainly worked on the HEPIX benchmarking project,
I had already created a madgraph container in summer 2021.
Now I integrated our most recent madgraph from 2022 there,
this also required adding a few patches to madgraph.
Example for cpu (many cores) or gpu (1 core) benchmarking:
singularity run -B <local_path_to_results>:/results oras://registry.cern.ch/hep-workloads/mg5amc-madgraph4gpu-2022-bmk:v0.2 --args '--cpu'
singularity run -B <local_path_to_results>:/results oras://registry.cern.ch/hep-workloads/mg5amc-madgraph4gpu-2022-bmk:v0.2 --args '--gpu'
Created a few patches in madgraph for Jorgen
to address mixing different compilers on the Juwels HPC.
Discussed with Olivier about random choice of color/helicity
but did not progress in that.
We have a hackathon in Lugano end september.
Amongst the things that we could work on there:
heterogeneous madevent cpu+gpu, kernel splitting, tensor cores.
If we go for kernel splitting I may need to do some preparatory work.
Back from holiday.
Doing some work on tensor cores for matrix algebra using direct cuda.
Does not work yet.
Following up on CIPEA project for environmental computing.
Idea is to measure electrical power consumption
for different software workloads including madgraph,
to compare different hardware architectures.
AV: ICHEP paper by end October, 6 pages
TC: do not plan to add new results, should document what was there at ICHEP
AV: will attend ACAT end of October
TC: will hav enew results for ACAT
Next meeting: 5 September?
TC: labor day in the US...
SR: ok lets move to Tuesday 6 Sep
AV: ok (I have a meeting at 5 but am free at 3)