Skip to content

Commit

Permalink
Uses OMP C++ interface rather than grabbing potentially non-existent …
Browse files Browse the repository at this point in the history
…environment variable
  • Loading branch information
henry-wallace-phys committed Aug 1, 2024
1 parent 8ac572f commit cdf64d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samplePDF/samplePDFFDBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ void samplePDFFDBase::SetupOscCalc(double PathLength, double Density)
//if we just want to use CUDAProb3 CPU then setup BeamCpuPropagator object
#if defined (MULTITHREAD)
//if we want to multithread then get number of threads from OMP_NUM_THREADS env variable
MCSamples[iSample].Oscillator = new cudaprob3::BeamCpuPropagator<double>(MCSamples[iSample].nEvents, std::atoi(std::getenv("OMP_NUM_THREADS")));
MCSamples[iSample].Oscillator = new cudaprob3::BeamCpuPropagator<double>(MCSamples[iSample].nEvents, omp_get_max_threads()));
MCSamples[iSample].Oscillator->setPathLength(PathLength);
MCSamples[iSample].Oscillator->setDensity(Density);
#else
Expand Down

0 comments on commit cdf64d1

Please sign in to comment.