- 
                Notifications
    You must be signed in to change notification settings 
- Fork 76
Fix MutliPart Generator random Engine #162
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
Fix MutliPart Generator random Engine #162
Conversation
| A new Pull Request was created by @bear-is-asleep (Bear Carlson) for develop. It involves the following packages: larsim @LArSoft/level-1-managers, @LArSoft/level-2-managers can you please review it and eventually sign? Thanks. cms-bot commands are listed here | 
| The code-checks are being triggered in jenkins. | 
| +code-checks | 
| @bear-is-asleep, the reason for the segfault is that the variable  The best fix would be to initialize  MultiPartRain::MultiPartRain(fhicl::ParameterSet const& p)
  : EDProducer(p)
  , fFlatEngine(art::ServiceHandle<rndm::NuRandomService>()->registerAndSeedEngine(
      createEngine(0, "HepJamesRandom", "GenRain"),
      "HepJamesRandom",
      "GenRain"))
  , _cosmic_distribution{p.get<bool>("CosmicDistribution", false)} // <== Initialize before use
{
 // ... a bunch of code that can now use _cosmic_distribution
} | 
| 
 It successfully builds locally after the most recent commit. Thank you for the suggestion! | 
| 
 No problem. Actually, that one change should be sufficient to resolve the segfault—you shouldn't need the other commits. Can you adjust this PR to contain only the change in initializing the Boolean variable? | 
| 
 
 Ah I got it, just updated the PR to only use the boolean. I checked and it locally builds and runs. | 
| trigger build | 
| The tests are being triggered in jenkins. | 
| Pull request #162 was updated. @LArSoft/level-2-managers, @LArSoft/level-1-managers can you please check and sign again. | 
| The code-checks are being triggered in jenkins. | 
| +code-checks | 
| +LArSoft tests OK on slf7 for e26:prof | 
| +LArSoft tests OK on slf7 for c14:prof | 
| -ICARUS tests failed on slf7 for e26:prof | 
| -uBooNE tests failed on slf7 for e26:prof | 
| -SBND tests failed on slf7 for e26:prof | 
| -DUNE tests failed on slf7 for e26:prof | 
| approve | 
| This pull request is fully signed and it will be merged to develop and built in the next LArSoft release after it passes the integration tests. | 
Update multipart generator to have engines run without segmentation faults. Segmentation faults occur in SBND without this patch.
@LauPM can you check this?