Skip to content

Commit

Permalink
warn if MT execution requested, but got sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelHu committed Aug 11, 2024
1 parent ab47ad8 commit 47a5cf3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/RMGManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ void RMGManager::Initialize() {
if (fNThreads <= 0) fNThreads = G4Threading::G4GetNumberOfCores();
else fNThreads = std::min(fNThreads, G4Threading::G4GetNumberOfCores());
fG4RunManager->SetNumberOfThreads(fNThreads);
RMGLog::OutFormat(RMGLog::detail, "Execution is multi-threaded ({} threads are used)",
fNThreads);
if (!IsExecSequential())
RMGLog::OutFormat(RMGLog::detail, "Execution is multi-threaded ({} threads are used)",
fNThreads);
else {
RMGLog::OutFormat(RMGLog::warning,
"multi-threaded execution with {} threads requested, but executing sequentially",
fNThreads);
}
}
}

Expand Down

0 comments on commit 47a5cf3

Please sign in to comment.