Skip to content

BUG FIX in PR #47: arrays were uninitialised in RAII constructors#74

Merged
valassi merged 1 commit into
madgraph5:masterfrom
valassi:issue73
Nov 30, 2020
Merged

BUG FIX in PR #47: arrays were uninitialised in RAII constructors#74
valassi merged 1 commit into
madgraph5:masterfrom
valassi:issue73

Conversation

@valassi
Copy link
Copy Markdown
Member

@valassi valassi commented Nov 29, 2020

As described in #73 this is a spinoff of #72

@valassi valassi requested review from hageboeck and roiser November 29, 2020 21:28
@roiser
Copy link
Copy Markdown
Member

roiser commented Nov 30, 2020

The difference between the two lines should be that the new one initializes the array values all to 0. I just wonder where we depend on 0 inits in the code? Could you point me to the line?

But of course it's fine to have proper 0 initializations, therefore approve it.

@roiser roiser closed this Nov 30, 2020
@roiser roiser reopened this Nov 30, 2020
@valassi
Copy link
Copy Markdown
Member Author

valassi commented Nov 30, 2020

The difference between the two lines should be that the new one initializes the array values all to 0. I just wonder where we depend on 0 inits in the code? Could you point me to the line?

But of course it's fine to have proper 0 initializations, therefore approve it.

Hi Stefan, this has showed up in my latest changes in #71. Amongst other things I reimplemented the helicity filtering in c++ in the same way as in cuda. I was initially getting a worse performance, because some bad helicities were not filtered out. This is from https://github.com/valassi/madgraph4gpu/blob/acc333ac82223842162dcc6e4bf39bb802eafd19/epoch1/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc#L724, the missing initialization being in https://github.com/valassi/madgraph4gpu/blob/acc333ac82223842162dcc6e4bf39bb802eafd19/epoch1/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/check.cc#L213

Anyway, looks like you approved :-)

Thanks, I will merge
Andrea

@valassi valassi linked an issue Nov 30, 2020 that may be closed by this pull request
@valassi valassi merged commit f5f62b0 into madgraph5:master Nov 30, 2020
@valassi valassi deleted the issue73 branch November 30, 2020 12:57
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

Successfully merging this pull request may close these issues.

Bug in unique_ptr: arrays not initialized

2 participants