165 std::ostringstream randStream;
167 ATH_MSG_INFO(
"Using random components for IPC object names: " << randStream.str());
176 if(pDetStore->record(evtQueue,
"AthenaMPEventQueue_"+randStream.str()).isFailure()) {
177 ATH_MSG_FATAL(
"Unable to record the pointer to the Shared Event queue into Detector Store");
179 return StatusCode::FAILURE;
187 if(pDetStore->record(failedPidQueue,
"AthenaMPFailedPidQueue_"+randStream.str()).isFailure()) {
188 ATH_MSG_FATAL(
"Unable to record the pointer to the Failed PID queue into Detector Store");
189 delete failedPidQueue;
190 return StatusCode::FAILURE;
202 srand((
unsigned)
time(0));
203 std::ostringstream randname;
208 ATH_MSG_WARNING(
"The job will attempt to save it with the name " << backupDir <<
" and create new top directory from scratch");
212 strerror_r(errno, buf,
sizeof(buf));
214 return StatusCode::FAILURE;
224 strerror_r(errno, buf,
sizeof(buf));
226 return StatusCode::FAILURE;
236 incSvc->fireIncident(Incident(
name(),
"BeforeFork"));
249 SmartIF<IDataShare> dataShare{serviceLocator()->service(
"AthenaPoolCnvSvc")};
252 auto sharedWriterTool =
m_tools[
"SharedWriterTool"];
255 if(sharedWriterWithFAFE) {
256 (*sharedWriterTool)->useFdsRegistry(
registry);
257 (*sharedWriterTool)->setRandString(randStream.str());
261 ATH_MSG_FATAL(
"makePool failed for " << (*sharedWriterTool)->name());
262 return StatusCode::FAILURE;
269 StatusCode mySc = (*sharedWriterTool)->exec();
270 if(!mySc.isSuccess()) {
272 return StatusCode::FAILURE;
276 if(!dataShare->makeClient(
m_nWorkers+1).isSuccess()) {
277 ATH_MSG_FATAL(
"Cannot make mother process a client for Conversion Service");
278 return StatusCode::FAILURE;
288 if(!scEvtProc.isSuccess()) {
290 ATH_MSG_FATAL(
"Unable to process first " << nEventsToProcess <<
" events in the master");
292 ATH_MSG_FATAL(
"Unable to process first event in the master");
307 if(sharedWriterWithFAFE && !dataShare->makeClient(0).isSuccess()) {
308 ATH_MSG_FATAL(
"Cannot make mother process not client for Conversion Service");
309 return StatusCode::FAILURE;
319 for(;
it!=itLast; ++
it) {
320 if(sharedWriterWithFAFE && (*it)->name() ==
"AthMpEvtLoopMgr.SharedWriterTool")
continue;
322 (*it)->setRandString(randStream.str());
324 incSvc->fireIncident(Incident(
name(),
"PreFork"));
329 return StatusCode::FAILURE;
338 return StatusCode::FAILURE;
343 if(sharedWriterWithFAFE && (*it)->name() ==
"AthMpEvtLoopMgr.SharedWriterTool")
continue;
344 if((*it)->exec().isFailure()) {
345 ATH_MSG_FATAL(
"Unable to submit work to the tool " << (*it)->name());
346 return StatusCode::FAILURE;
363 std::vector<std::string> logs;
365 (*it)->subProcessLogs(logs);
366 for(
size_t i=0;
i<logs.size();++
i) {
367 std::cout <<
"\n File: " << logs[
i] <<
"\n" << std::endl;
369 log.open(logs[
i].c_str(),std::ifstream::in);
373 std::cout <<
line << std::endl;