Skip to content
Snippets Groups Projects
Commit af98f044 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'fwinkl20191016T152250' into 'master'

TrigPSC: Release Python GIL after fork

See merge request !27241
parents 7ee797f0 715a250e
No related branches found
No related tags found
7 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27241TrigPSC: Release Python GIL after fork
......@@ -268,10 +268,10 @@ bool psc::Psc::configure(const ptree& config)
// Normally this is TrigPSC/TrigPSCPythonDbSetup
std::string pyBasicFile = m_config->getOption("PYTHONSETUPFILE") ;
if ( pyBasicFile != "" ) {
if ( !psc::Utils::pyInclude(pyBasicFile) ) {
ERS_PSC_ERROR("Basic Python configuration failed.");
return false;
}
if ( !psc::Utils::pyInclude(pyBasicFile) ) {
ERS_PSC_ERROR("Basic Python configuration failed.");
return false;
}
}
}
}
......@@ -657,11 +657,17 @@ bool psc::Psc::doEventLoop()
bool psc::Psc::prepareWorker (const boost::property_tree::ptree& args)
{
using namespace std;
psc::Utils::ScopeTimer timer("Psc prepareWorker");
ERS_LOG("Individualizing DF properties");
/* Release the Python GIL (which we inherited from the mother)
to avoid dead-locking on the first call to Python. Only relevant
if Python is initialized and Python-based algorithms are used. */
if ( PyEval_ThreadsInitialized() ) {
ERS_DEBUG(1, "Releasing Python GIL");
PyEval_SaveThread();
}
ERS_LOG("Individualizing DF properties");
m_config->prepareWorker(args);
if (!setDFProperties({{"DF_Pid", "DF_PID"},
......
......@@ -163,8 +163,8 @@ StatusCode TrigCOOLUpdateHelper::resetFolder(const std::string& folder,
}
// Invalidate IOV range
ATH_MSG_DEBUG("Setting IOV range of " << folder << " to " << iov_range);
ATH_MSG_DEBUG("Invalidating IOV range of " << folder << " by setting it to " << iov_range);
if ((m_iovSvc->setRange(clid, key, iov_range, "StoreGateSvc")).isFailure()) {
ATH_MSG_WARNING("Could not set IOV range for " << folder << " to " << iov_range);
return StatusCode::FAILURE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment