Skip to content

Commit

Permalink
EventProcessor runs modules in global begin transitions concurrently
Browse files Browse the repository at this point in the history
Use new async version for global begin Run and Luminosity transitions.
  • Loading branch information
Dr15Jones committed Apr 24, 2017
1 parent 50fa04f commit fe9e05e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions FWCore/Framework/src/EventProcessor.cc
Expand Up @@ -1635,7 +1635,14 @@ namespace edm {
}
{
typedef OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> Traits;
schedule_->processOneGlobal<Traits>(runPrincipal, es);
auto globalWaitTask = make_empty_waiting_task();
globalWaitTask->increment_ref_count();
schedule_->processOneGlobalAsync<Traits>(WaitingTaskHolder(globalWaitTask.get()),runPrincipal, es);
globalWaitTask->wait_for_all();
if(globalWaitTask->exceptionPtr() != nullptr) {
std::rethrow_exception(* (globalWaitTask->exceptionPtr()) );
}

for_all(subProcesses_, [&runPrincipal, &ts](auto& subProcess){ subProcess.doBeginRun(runPrincipal, ts); });
}
FDEBUG(1) << "\tbeginRun " << run.runNumber() << "\n";
Expand Down Expand Up @@ -1750,7 +1757,13 @@ namespace edm {
EventSetup const& es = esp_->eventSetup();
{
typedef OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> Traits;
schedule_->processOneGlobal<Traits>(lumiPrincipal, es);
auto globalWaitTask = make_empty_waiting_task();
globalWaitTask->increment_ref_count();
schedule_->processOneGlobalAsync<Traits>(WaitingTaskHolder(globalWaitTask.get()),lumiPrincipal, es);
globalWaitTask->wait_for_all();
if(globalWaitTask->exceptionPtr() != nullptr) {
std::rethrow_exception(* (globalWaitTask->exceptionPtr()) );
}
for_all(subProcesses_, [&lumiPrincipal, &ts](auto& subProcess){ subProcess.doBeginLuminosityBlock(lumiPrincipal, ts); });
}
FDEBUG(1) << "\tbeginLumi " << run << "/" << lumi << "\n";
Expand Down

0 comments on commit fe9e05e

Please sign in to comment.