Skip to content

Commit 1f76187

Browse files
martenoledavidrohr
authored andcommitted
Enable TRD TRAP sim by default, avoid global OpenMP setting
1 parent bc9f262 commit 1f76187

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

Detectors/TRD/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,8 @@ void Digitizer::process(std::vector<Hit> const& hits)
157157
getHitContainerPerDetector(hits, hitsPerDetector);
158158

159159
#ifdef WITH_OPENMP
160-
omp_set_num_threads(mNumThreads);
161160
// Loop over all TRD detectors (in a parallel fashion)
162-
#pragma omp parallel for schedule(dynamic)
161+
#pragma omp parallel for schedule(dynamic) num_threads(mNumThreads)
163162
#endif
164163
for (int det = 0; det < MAXCHAMBER; ++det) {
165164
#ifdef WITH_OPENMP

Detectors/TRD/workflow/src/TRDTrapSimulatorSpec.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ void TRDDPLTrapSimulatorTask::run(o2::framework::ProcessingContext& pc)
248248
auto timeParallelStart = std::chrono::high_resolution_clock::now();
249249

250250
#ifdef WITH_OPENMP
251-
omp_set_num_threads(mNumThreads);
252-
#pragma omp parallel for schedule(dynamic)
251+
#pragma omp parallel for schedule(dynamic) num_threads(mNumThreads)
253252
#endif
254253
for (int iTrig = 0; iTrig < triggerRecords.size(); ++iTrig) {
255254
int currHCId = -1;

Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
174174
workflowOptions.push_back(ConfigParamSpec{"use-ccdb-tof", o2::framework::VariantType::Bool, false, {"enable access to ccdb tof calibration objects"}});
175175

176176
// option to use or not use the Trap Simulator after digitisation (debate of digitization or reconstruction is for others)
177-
workflowOptions.push_back(ConfigParamSpec{"enable-trd-trapsim", VariantType::Bool, false, {"enable the trap simulation of the TRD"}});
177+
workflowOptions.push_back(ConfigParamSpec{"disable-trd-trapsim", VariantType::Bool, false, {"disable the trap simulation of the TRD"}});
178178
}
179179

180180
void customize(std::vector<o2::framework::DispatchPolicy>& policies)
@@ -544,8 +544,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
544544
specs.emplace_back(o2::trd::getTRDDigitizerSpec(fanoutsize++, mctruth));
545545
// connect the TRD digit writer
546546
specs.emplace_back(o2::trd::getTRDDigitWriterSpec(mctruth));
547-
auto enableTrapSim = configcontext.options().get<bool>("enable-trd-trapsim");
548-
if (enableTrapSim) {
547+
auto disableTrapSim = configcontext.options().get<bool>("disable-trd-trapsim");
548+
if (!disableTrapSim) {
549549
// connect the TRD Trap SimulatorA
550550
specs.emplace_back(o2::trd::getTRDTrapSimulatorSpec(mctruth));
551551
// connect to the device to write out the tracklets.

prodtests/full_system_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ QED2HAD=$(awk "BEGIN {printf \"%.2f\",`grep xSectionQED qedgenparam.ini | cut -d
6161
echo "Obtained ratio of QED to hadronic x-sections = $QED2HAD" >> qedsim.log
6262
cd ..
6363

64-
DIGITRDOPTREAL="--configKeyValues \"TRDSimParams.digithreads=${NJOBS}\" --enable-trd-trapsim"
64+
DIGITRDOPTREAL="--configKeyValues \"TRDSimParams.digithreads=${NJOBS}\" "
6565
if [ $SPLITTRDDIGI == "1" ]; then
6666
DIGITRDOPT="--skipDet TRD"
6767
else

0 commit comments

Comments
 (0)