Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong assert in cudacpp plugin (and test code generation for pptt) #337

Closed
oliviermattelaer opened this issue Jan 20, 2022 · 5 comments
Closed
Assignees

Comments

@oliviermattelaer
Copy link
Member

hi,

I do have the following crash

  File "/Users/omattelaer/Documents/workspace/convert_to_git/git-mg5amcnlo/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py"\
, line 1187, in get_matrix_element_calls
    res = self.super_get_matrix_element_calls(matrix_element, color_amplitudes)
  File "/Users/omattelaer/Documents/workspace/convert_to_git/git-mg5amcnlo/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py"\
, line 1176, in super_get_matrix_element_calls
    scoeff = PLUGIN_OneProcessExporter.coeff(*coeff) # AV
  File "/Users/omattelaer/Documents/workspace/convert_to_git/git-mg5amcnlo/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py"\
, line 992, in coeff
    assert(False)
AssertionError

when doing (from master)

generate p p > t t~; output standalone_cudacpp mytest

Is there a real reason for this assert?

@valassi
Copy link
Member

valassi commented Jan 20, 2022

Hi Olivier, interesting, it looks clearly wrong. I will have a look. I guess I need to generate a test pptt too as otherwise I will not see that? I am surprised I do not see the issues in the three processes I use routinely

@valassi valassi changed the title wrong assert in cudacpp plugin wrong assert in cudacpp plugin (and test code generation for pptt) Jan 20, 2022
@valassi
Copy link
Member

valassi commented Jan 20, 2022

I rename this to also mention "and test code generation for pptt" - the reason why I never had the issue reported by Olivier is that I never tried pptt, I gues?

valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 20, 2022
…adgraph5#337

DEBUG:  Entering PLUGIN_OneProcessExporter.write_process_cc_file [model_handling.py at line 1005]
Command "import /data/avalassi/GPU2020/MG5aMC/2.7.0_gpu/CODEGEN_cudacpp_pp_tt.mg" interrupted in sub-command:
"output standalone_cudacpp CODEGEN_cudacpp_pp_tt" with error:
AssertionError :
@valassi
Copy link
Member

valassi commented Jan 20, 2022

Thanks Olivier, this was easily confirmed. I will work on PR #340 about this.

I just realise I have no idea what the pptt code should look like. If I take the default madgraph without my plugin (say 270gou which is what I am based on for now), that was working for you initially and was producing code that made sense?

Thanks Andrea

valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 24, 2022
…graph5#337)

DEBUG:  Entering PLUGIN_OneProcessExporter.write_process_cc_file [model_handling.py at line 1005]
Command "import /data/avalassi/GPU2020/MG5aMC/2.7.0_gpu/CODEGEN_cudacpp_uu_tt.mg" interrupted in sub-command:
"output standalone_cudacpp CODEGEN_cudacpp_uu_tt" with error:
AssertionError :
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 24, 2022
@valassi
Copy link
Member

valassi commented Jan 24, 2022

Hi @oliviermattelaer

this specific issue is fixed easily: I just disabled the "assert(False)". I think that I had added that to understand if/when thi smethod "coeff" was used at all. I found that it is not used in eemumu or ggtt, but it it is used in uutt (or in the uutt within pptt).
2876844

There is now however a more fundamental issue with pptt, namely the problem of nprocesses>1 (#272). After fixing the assert, code generation succeeds but the build fails because of that nprocesses. I checked that the uutt standalone and the uutt within pptt differ in the following way for instance:

/data/avalassi/GPU2020/madgraph4gpuX/epochX/cudacpp> diff -r pp_tt.auto/ uu_tt.auto/
...
diff -r pp_tt.auto/SubProcesses/P1_Sigma_sm_uux_ttx/CPPProcess.cc uu_tt.auto/SubProcesses/P1_Sigma_sm_uux_ttx/CPPProcess.cc
...
502c497
<     const int denominators = 36,36; // FIXME: assume process.nprocesses == 1 for the moment (eventually denominators[nprocesses]?)
---
>     const int denominators = 36; // FIXME: assume process.nprocesses == 1 for the moment (eventually denominators[nprocesses]?)

From our discussions, I understand that this is because "uutt" within pptt is not only "uu" proper, but also some other combinations of quarks (I guess bbtt is the very different case?). Anyway, what I mean is that the ggtt within pptt and the ggtt standalone instead are essentially the same code, so it is really the "uutt" part which is different. I will have a look.

valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 24, 2022
…rocesses

This completes the fix for the assert issue madgraph5#337 (pptt generation was failing).
The second issue in pptt (generation succeeds but build fails with nprocesses=2) is moved to madgraph5#343
@valassi
Copy link
Member

valassi commented Jan 24, 2022

Hi Olivier, as discussed this afternoon, I have fixed the assert in #340, which I am about to merge, but I am reassigning to you the fix of the "nprocesses=2" issue. This is now in #343.

Closing this as fixed by PR #340.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants