-
Notifications
You must be signed in to change notification settings - Fork 33
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
Prepare Makefile to combine MadEvent + Cudacpp plugin #400
Comments
Which branch are you using? (for the git plugin) |
Thanks Olivier! |
So the weird part is why you do not have the file:
This file can technically be empty so this should fix the issue. (in principle it should be created the first time you run the code such that you can edit it without having to worry about commiting the change) (my question was on the madgraph4gpu side which branch you use) |
Hm wait... there may be something wrong in my scripts... my bad, sorry! |
Now it built fine... let m edebug it |
Hm ok, the problem is that the MG5aMC auto generated directories are not relocatable as-is. I mean,
where the first is the directpry I created, and the second is a directory to which I copied the previous one. When I build in the first location (the original location), all is ok. When I build in the second location, things are not ok. Can this be fixed maybe upstream? Anyway. I will investigate and fix it in my scripts |
…5_path in Cards (see madgraph5#400)
…5_path in Cards (see madgraph5#400)
Ok the problem was that mg5_path in a card file was pointing to the main MG5aMC directory. I had already noticed when preparing gridpacks that this must be commented out. So this is the patch Now Source builds. However the Subprocess/P1 does not build because smatrix1 is not found (looks like matrix1_orig.f is not built). I guess this is also eventually related to helicity recycling #279 where matrix1_optim is used? |
Hi @oliviermattelaer I have trouble understanding this, can you explain please?
I am not even sure if "strip" there is the Makefile function (https://www.gnu.org/software/make/manual/html_node/Text-Functions.html) or if it is meant to be the linux strip command (https://linux.die.net/man/1/strip), but I imagine it is the first (also because the second woul dneed an extra shell keyword). There is no directive here for going from the _orig.f file to the _optim.f file (indeed, helicity recycling #279), so I am not sure how this could be meant to build? I will try "--hel_recycling=False" |
Ok I have disabled helicity recycling Now madevent builds! However I need to find some parameter files to feed to it to get some sensible results. |
Trying to understand what madevent accepts as inputs. The madevent in my case (is it always the case) is fror instance driver.f in The driver looks for some files, for instance using open_file Anyway, it reads dname.mg which is a local file with just the directory name.
Then it looks for results.dat but this does not exist in my directory (use strace and grep .dat)
It also (strace) opens a tmp gfortran file. Maybe this is the 'scratch' file?
Note that it does NOT seem (strace) to read param_card.dat? Then (use strace) it reads
Then it prompts for user input. |
Ok refine.sh and survey.sh show the use:
madgraph4gpu/epochX/gridpack/29x/gg_tt.auto/madevent/SubProcesses/refine_splitted.sh Line 53 in 34ab2d4
The inputs are input_app.txt and input_sg.txt
|
So you have two executable that can be generated for madevent The first is using matrixX_optim.f while the second use matrixX_orig.f to bypass the helicity recycling you can do a cp Those executable are a "interactive" script that take input within stdin: where input.txt is |
Thanks Olivier! Yes now I see
|
About the executables: I think madevent_forhel did not get built. The built failed, unless I put helicity recycling false. But once I do, it builds ok |
I think I am understdning better, the "channel of integration) is 1 in G1, 2 in G2 etc, as many as there are channels (as many as there are diagrams?) More important: is there a way I can get Grid Adjustement = 0, ie use a fixed grid? I think for performance tests this would probably be the best? |
For the executable, should be the opposite, you can compile madevent only if hel_recycling is False since in that case. For the channel of integration, yes G1 means 1, .... the number of channels is not exactly the number of diagrams but it is correlated to it (some diagram are not included -- 4 point interaction--, some diagram are integrated together due to symmetry, some diagram are split in multiple piece if the phase-space is really complex -- like h >ww --) For the grid, yes you can put the grid adjustement to 0 to freeze the vegas layer. |
I tried the cards above, which are the same you had given as example
but it fails eventually?
|
so the issue with the discretesampler is because this version requires to set |
Thanks @oliviermattelaer for the chat! Ok so as we found out, your suggestion to add "False = mc_grouped_subproc" fixes the issue. In practice:
|
About the cards:
Line by line:
The number of events are the events used in the first iteration. Then every iteration doubles the number of events, until either you reach max iterations or you reach the desired accuracy. In order to have an easily reproducible test case, the easiest is to set min iterations equal to max iterations: in that case, always the same number of events will be used, while the accuracy will be ignored.
Using option 2 means adaptive integration: there is one first iteration where a grid is created and written to files, then further iterations start from the file. This is one of those ftn26 files, IIUC. To have an easily reproducible test case for functional and performance tests, the best os probably to use option 0. In this case, if there is no grid file ftn26, some internal defaults are used. Note hoewver that if ft26 does exist, then it will be used. I think that for our functional/performance tests we do not care about having an efficent sampling algorithm (we use rambo in cudacpp!), so option 0 with no grid file sounds good.
This actually means using "multichannel" (ie I guess the single diagram enhanced algo). We should use 1.
For this one, Olivier suggests that we use 0. IIUC, when we have no helicity recycling the option 0 is used always anyway.
This is the choice of a specific channel. I guess we can use 1 (or we can try once with 1 and once with 2 and do a few internal tests). PS Note we can then get results like this, useful for tests
|
A full dump of what we still need in the bridge interface is in #404. In practice
Coming finally to this specific #400 about makefiles:
|
I have added a few comments about this issue of makefiles in #413. For the moment, madevent and cudacpp source code is mixed, superposed in the same directories. Maybe eventually we can cleanly separate them, but for the moment I would keep them as they are. In any case, I would keep two separate makefiles. I would probably rename the cudacpp Makefiles as plugin.mk, and add a symlink to Makefile only if it is a standalone installation. Otherwise, for madevent+cudacpp, the plugin.mk would be called by the (lowercase) madevent makefile. |
Note that makefile and Makefil clash on case-insensitive systems #480 |
…akefile to make this more specific madgraph5#400
I am about to merge PR #484, which is mainly about using different names for madevent and cudacpp makefile's, fixing the clash on case-insensitive systems #480. I renamed the cudacpp Makefile as cudacpp.mk. I then add a symlink of that as makefile (lowercase) so that in standalone mode a 'make' works without the need for '-f'. In madevent+cudacpp mode, the madevent code generation overwrites that makefile symlink (the cudacpp makefile) with its own makefile file (the madevent makefile). The latter includes also a call to cudacpp.mk, which cleans up this #400. I am closing this issue. Of course it can be cleaned up, and its code generation in upstream MG5aMC has to be done. But all that will be a general issue for much more than just makefiles. |
Hi @oliviermattelaer I am having a look at trying to combine MadEvent and the cudacpp plugin.
I am using for instance
This is the infrastructure you created that contains BOTH the fortran code and the cudacpp code.
As a reference, I am using the madevent only
Can you please remind me already how to build this? I imagine I need to do
but the first step fails with
Thanks
Andrea
The text was updated successfully, but these errors were encountered: