-
Notifications
You must be signed in to change notification settings - Fork 33
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
master_june24: nomultichannel should be an array nullptr, not an array full of 0s #892
Comments
Example in gg_tt.mad (regenerated with master_june24 as is). This is completely internally inconsistent
The first code section correctly uses nullptr as a check, the second section uses individual channelids (the channelid of the first event...) |
Hi, there are two places in CPPProcess where the channelID needs to be checked, one in wavefunctions (the above case) where this is all working fine and once in sigmaKin (the below case) where this was not working because our testing infrastructure was not supporting this case. I can try to dig out the case where this has happened. The way out was to check in sigmaKin the first value of the array, please note that I tried to make sure that the array in all cases contains 0s upon initialisation also for GPUs which I could not find a guarantuee for in the documentation. |
The point is to have a uniform API. No multi channel with channelids is nullptr. I will fix this, faster |
Thanks, I kind of see what you mean now. Indeed calculate_wavefunction and sigmaKin may handle this differently. Or even more, I just realised that calculate_wavefunction and sigmaKin MUST hadnle this differently (to make it faster). I am modifying as follows (half way done and pending tests)
PS With respect to #894, ie the SIMD implementation, under the scanario above this becomes much simpler and extremely simple (again, calculate_wavefunctions goes back to upstream/master essentially) |
…omputeMatrixElements in madgraph5#892 (now bool useChannelIds, was uint channelId in master)
…nt in computeMatrixElements in madgraph5#892 - bldall ok but runTest segfaults
…ol useChannelIds, was uint channelId in master) to MEK::computeMatrixElements in madgraph5#892 In CODEGEN, adapt Bridge*/runTest/check accordingly to add the useChannelIds argument in computeMatrixElements
…'channelIds != nullptr' (fix segfault madgraph5#892) The SIMD tests pass without crashing, the CUDA test fails returning ME=0
…nelIds[0] != 0' by 'channelIds != nullptr' (fix segfault madgraph5#892) Also add the missing fix for computeMatrixElements (I just added -Wunused-parameter otherwise this is not spotted) Also replace 0 by nullptr for clarity on the channelIDs array Now both the SIMD and cuda runTest.exe pass without crashing and with success results
This is completed in #882. This issue was so pervasive that it is impossible to point a single commit which fixed this. Amongst others these are relevant
i.e. 229efdf 3bdd88d 8ca4fb6 4162768 a11f1d2 In addition, the two issues #914 and #916 are related to this, so also the commits for those two issues are relevant. Fixed in 882. Linking it there and closing. |
Another issue introduced in #830 and being reviewed in #882.
Before channelid array #830, the same channel was used for all events. The convention was to use channelid=0 to indicate nomultichannel in some fringe cases (like helicity filtering, or runTest.exe, of check.exe).
To prepare for channelid array #830, we had agreed that nomultichannel would be a nullptr to a channelid array. I was asked to prepare a specific function to handle one of these cases, fbridgesequence_nomultichannel (PR #796). This was already used in the code in some of the relevant places.
In channelid array #830 for master_june24, however, this has changed
This is confusing, internally inconsistent, and differs from what we had agreed.
More fundamentally, when code is generated in multichannel mode, but a function is called in nomultichannel mode (e.g. because helicity filtering does not need single diagram enhancement, or because so far runTest.exe and check.exe use no multichannel), this is a global parameter of the function for all events: there is no use case where we use multichannel for some events, and nomultichannel for other events, in the same batch.
We should implement nomultichannel as nullptr to channelid.
The text was updated successfully, but these errors were encountered: