ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaMPTools
AthenaMPTools
IAthenaMPTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAMPTOOLS_IATHENAMPTOOL_H
6
#define ATHENAMPTOOLS_IATHENAMPTOOL_H
7
8
#include "GaudiKernel/IAlgTool.h"
9
#include "
AthenaInterprocess/FdsRegistry.h
"
10
#include "
CxxUtils/checker_macros.h
"
11
12
#include <memory>
13
#include <vector>
14
#include <map>
15
16
namespace
AthenaInterprocess
{
17
class
IMPRunStop
;
18
}
19
20
namespace
AthenaMP
{
21
struct
WorkerOutput
{
22
std::string
filename
;
23
std::string
technology
;
24
std::string
description
;
25
std::string
access_mode
;
26
bool
shared
{};
27
};
28
typedef
std::vector<WorkerOutput>
SingleWorkerOutputs
;
29
typedef
std::map<std::string,SingleWorkerOutputs>
AllWorkerOutputs
;
30
typedef
AllWorkerOutputs::iterator
AllWorkerOutputsIterator
;
31
32
typedef
std::unique_ptr<AllWorkerOutputs>
AllWorkerOutputs_ptr
;
33
}
34
35
static
const
InterfaceID
IID_IAthenaMPTool
(
"IAthenaMPTool"
, 1, 0 );
36
37
class
IAthenaMPTool
:
virtual
public
IAlgTool
38
{
39
public
:
40
static
const
InterfaceID&
interfaceID
() {
return
IID_IAthenaMPTool
; }
41
42
// Returns number of children processes in the pool. -1 in case of failure
43
virtual
int
makePool
ATLAS_NOT_THREAD_SAFE
(
int
maxevt,
int
nprocs,
const
std::string& topdir) = 0;
44
45
virtual
StatusCode exec
ATLAS_NOT_THREAD_SAFE
() = 0;
46
47
// Pid of the finished process, 0 if no process finished, <0 if wait on the group failed
48
virtual
StatusCode wait_once
ATLAS_NOT_THREAD_SAFE
(
pid_t
& pid) = 0;
49
50
virtual
void
reportSubprocessStatuses
() = 0;
51
virtual
void
subProcessLogs
(std::vector<std::string>&) = 0;
52
virtual
AthenaMP::AllWorkerOutputs_ptr
generateOutputReport
() = 0;
53
54
virtual
void
useFdsRegistry
(std::shared_ptr<AthenaInterprocess::FdsRegistry>) = 0;
55
virtual
void
setRandString
(
const
std::string& randStr) = 0;
56
virtual
void
setMaxEvt
(
int
maxEvt) = 0;
57
virtual
void
setMPRunStop
(
const
AthenaInterprocess::IMPRunStop
* runStop) = 0;
58
59
// Brute force: kill all children
60
virtual
void
killChildren
() = 0;
61
};
62
63
#endif
pid_t
int32_t pid_t
Definition
FPGATrackSimTypes.h:19
FdsRegistry.h
IID_IAthenaMPTool
static const InterfaceID IID_IAthenaMPTool("IAthenaMPTool", 1, 0)
checker_macros.h
Define macros for attributes used to control the static checker.
AthenaInterprocess::IMPRunStop
Definition
IMPRunStop.h:10
IAthenaMPTool
Definition
IAthenaMPTool.h:38
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual StatusCode exec ATLAS_NOT_THREAD_SAFE()=0
IAthenaMPTool::generateOutputReport
virtual AthenaMP::AllWorkerOutputs_ptr generateOutputReport()=0
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual int makePool ATLAS_NOT_THREAD_SAFE(int maxevt, int nprocs, const std::string &topdir)=0
IAthenaMPTool::ATLAS_NOT_THREAD_SAFE
virtual StatusCode wait_once ATLAS_NOT_THREAD_SAFE(pid_t &pid)=0
IAthenaMPTool::reportSubprocessStatuses
virtual void reportSubprocessStatuses()=0
IAthenaMPTool::setMPRunStop
virtual void setMPRunStop(const AthenaInterprocess::IMPRunStop *runStop)=0
IAthenaMPTool::subProcessLogs
virtual void subProcessLogs(std::vector< std::string > &)=0
IAthenaMPTool::killChildren
virtual void killChildren()=0
IAthenaMPTool::setRandString
virtual void setRandString(const std::string &randStr)=0
IAthenaMPTool::useFdsRegistry
virtual void useFdsRegistry(std::shared_ptr< AthenaInterprocess::FdsRegistry >)=0
IAthenaMPTool::interfaceID
static const InterfaceID & interfaceID()
Definition
IAthenaMPTool.h:40
IAthenaMPTool::setMaxEvt
virtual void setMaxEvt(int maxEvt)=0
AthenaInterprocess
Definition
FdsRegistry.h:11
AthenaMP
Definition
IAthenaMPTool.h:20
AthenaMP::AllWorkerOutputs
std::map< std::string, SingleWorkerOutputs > AllWorkerOutputs
Definition
IAthenaMPTool.h:29
AthenaMP::AllWorkerOutputs_ptr
std::unique_ptr< AllWorkerOutputs > AllWorkerOutputs_ptr
Definition
IAthenaMPTool.h:32
AthenaMP::AllWorkerOutputsIterator
AllWorkerOutputs::iterator AllWorkerOutputsIterator
Definition
IAthenaMPTool.h:30
AthenaMP::SingleWorkerOutputs
std::vector< WorkerOutput > SingleWorkerOutputs
Definition
IAthenaMPTool.h:28
AthenaMP::WorkerOutput
Definition
IAthenaMPTool.h:21
AthenaMP::WorkerOutput::description
std::string description
Definition
IAthenaMPTool.h:24
AthenaMP::WorkerOutput::technology
std::string technology
Definition
IAthenaMPTool.h:23
AthenaMP::WorkerOutput::shared
bool shared
Definition
IAthenaMPTool.h:26
AthenaMP::WorkerOutput::access_mode
std::string access_mode
Definition
IAthenaMPTool.h:25
AthenaMP::WorkerOutput::filename
std::string filename
Definition
IAthenaMPTool.h:22
Generated on
for ATLAS Offline Software by
1.17.0