madgraph5/madgraph4gpu

Determine number of BSM parameters when generating CPPProcess.cc (get rid of MGONGPUCPP_NBSMINDEPPARAM_GT_0)

Opened this issue · 1 comments

Hi @oliviermattelaer this is one issue I mentioned in between lines, but maybe better make an explicit issue.

In Parameters.h from PR #824 I have this code

// AV Jan 2024 (PR #625): this ugly #define was the only way I found to avoid creating arrays[nBsm] in CPPProcess.cc if nBsm is 0
// The problem is that nBsm is determined when generating Parameters.h, which happens after CPPProcess.cc has already been generated
// For simplicity, keep this code hardcoded also for SM processes (a nullptr is needed as in the case nBsm == 0)
#define MGONGPUCPP_NBSMINDEPPARAM_GT_0 1

The comments says it all: in the code generation, I deteremine the "extra BSM parameters" when generating Parameters.h, but I would prefer to know this already when generating CPPProcess.cc, so that some dead code can be removed.

I guess I could understand this myself if I look at the code, but maybe for you it's totally obvious what I need to do?

Thanks
Andrea

As mentioned here #824 (comment)
there is one line of CODEGEN that is an explicit reminder of this issue
"# FIXME! Here there should be different code generated depending on MGONGPUCPP_NBSMINDEPPARAM_GT_0"