Open oliviermattelaer opened 2 years ago
Hi Olivier, just to mention that this is related to a few things I have been working on these days https://github.com/madgraph5/madgraph4gpu/issues/455 https://github.com/madgraph5/madgraph4gpu/issues/458 and even https://github.com/oliviermattelaer/mg5amc_test/issues/15
Just to summarise some possible options, and the directions I have taken (that we can rediscuss! also because all this needs integration upstream):
The discussion about include guards (https://github.com/madgraph5/madgraph4gpu/issues/458) is related, because the arrays dimensioned using NB_PAGE_MAX (or even in the current code using NB_PAGE) are in .inc files where NB_PAGE is used. This means that either vector.inc (defining NB_PAGE) must be included in those .inc, or it must be included in the .f files that include those .inc. In C++ you would include the headers within other headers, but in Fortran without include guards this is complex. For the moment I am just making sure that each .f file includes all relevant .inc files (but I am trying not to include .inc files in other .inc files).
The discussion about get_user_params (https://github.com/oliviermattelaer/mg5amc_test/issues/15) is also related, because if you want to have NB_PAGE_LOOP defined at runtime, then it must be defined very early on. The function that is now used to read from 'madevent < inputfile', get_user_params, is called quite late in driver.f, while I need NB_PAGE_LOOP earlier on. What I am doing for the moment is that I have a separate READ(,) statement in driver.f, outside get_user_params, quite a bit earlier than the call to get_user_params.
Voila... many points to discuss at some point, but at least I try to summarise what I have done! Thanks Andrea
This is also related to the changes in my MR https://github.com/mg5amcnlo/mg5amcnlo/pull/23
Not that the model does use vector.inc and has hardcoded the value for the coupling/G