Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace Gambit

// Create new _pythiaInstance from _pythiaBase
if (_pythiaInstance) delete _pythiaInstance;
_pythiaInstance = new PythiaT(_pythiaBase->settings, _pythiaBase->particleData);
_pythiaInstance = new PythiaT(_pythiaBase->settings, _pythiaBase->particleData, false);

// Send along the SLHAea::Coll pointer, if it exists
if (slhaea) _pythiaInstance->slhaInterface.slha.setSLHAea(slhaea);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace Gambit

static bool first = true;
static str pythia_doc_path;
PythiaT pythia;
thread_local PythiaT pythia;

// Setup the Pythia documentation path and print the banner once
if (first)
Expand Down Expand Up @@ -129,14 +129,15 @@ namespace Gambit
std::map<int, double> combined_process_xsec;
std::map<int, double> combined_process_xsecErr;

#pragma omp parallel firstprivate(pythia, pythiaOptions)
#pragma omp parallel firstprivate(pythiaOptions)
{
// Add a thread-specific seed to this thread's copy of the Pythia options
str seed = std::to_string(int(Random::draw() * 899990000.));
pythiaOptions.push_back("Random:seed = " + seed);

try
{
pythia.clear();
pythia.init(pythia_doc_path, pythiaOptions, &slha);
}
catch (...)
Expand All @@ -146,6 +147,7 @@ namespace Gambit
pythiaOptions.push_back("Random:seed = " + std::to_string(newSeedBase));
try
{
pythia.clear();
pythia.init(pythia_doc_path, pythiaOptions, &slha);
}
catch (...)
Expand Down Expand Up @@ -303,7 +305,7 @@ namespace Gambit
void NAME(initialxsec_container& result) \
{ \
using namespace Pipes::NAME; \
static SLHAstruct slha = *Dep::SpectrumAndDecaysForPythia; \
SLHAstruct slha = *Dep::SpectrumAndDecaysForPythia; \
\
PerformInitialCrossSection_Pythia<PYTHIA_COLLIDER, PYTHIA_NS::Pythia8::Event>(result, slha, "", *runOptions); \
}
Expand All @@ -312,7 +314,7 @@ namespace Gambit
void NAME(initialxsec_container& result) \
{ \
using namespace Pipes::NAME; \
static SLHAstruct slha = *Dep::SpectrumAndDecaysForPythia; \
SLHAstruct slha = *Dep::SpectrumAndDecaysForPythia; \
\
PerformInitialCrossSection_Pythia<PYTHIA_COLLIDER, PYTHIA_NS::Pythia8::Event>(result, slha, #MODEL_EXTENSION, *runOptions); \
}
Expand Down
Loading