|
ATLAS Offline Software
|
Go to the documentation of this file.
38 if (gSystem->GetProcInfo (&pinfo) != 0) {
40 return StatusCode::FAILURE;
44 ANA_MSG_DEBUG (
"starting memory: " << pinfo.fMemResident <<
" " << pinfo.fMemVirtual);
45 return StatusCode::SUCCESS;
56 if (gSystem->GetProcInfo (&pinfo) != 0) {
58 return StatusCode::FAILURE;
62 ANA_MSG_DEBUG (
"finishing memory: " << pinfo.fMemResident <<
" " << pinfo.fMemVirtual);
67 if (!
data.m_jobStats->Branch (
"memIncreaseResident", &incRes)) {
68 ANA_MSG_ERROR (
"Failed to create branch memIncreaseResident");
69 return StatusCode::FAILURE;
72 if (!
data.m_jobStats->Branch (
"memIncreaseVirtual", &incVirt)) {
74 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
90 const int absResidentLimit =
93 const int absVirtualLimit =
96 const int perEvResidentLimit =
99 const int perEvVirtualLimit =
105 const Double_t resLeakPerEv =
106 (
static_cast< Double_t
> (resLeak) /
109 const Double_t virtLeakPerEv =
110 (
static_cast< Double_t
> (virtLeak) /
112 ANA_MSG_INFO (
"Memory increase/change during the job:");
113 ANA_MSG_INFO (
" - resident: " << resLeakPerEv <<
" kB/event ("
114 << resLeak <<
" kB total)");
115 ANA_MSG_INFO (
" - virtual : " << virtLeakPerEv <<
" kB/event ("
116 << virtLeak <<
" kB total)");
119 if ((resLeak > absResidentLimit) &&
120 (resLeakPerEv > perEvResidentLimit) &&
121 (virtLeak > absVirtualLimit) &&
122 (virtLeakPerEv > perEvVirtualLimit)) {
127 return StatusCode::FAILURE;
135 return StatusCode::SUCCESS;
145 throw std::logic_error (
"Function called at incorrect time");
158 throw std::logic_error (
"Function called at incorrect time");
Long_t m_initMemVirtual
Amount of virtual memory used after initialisation in kB.
char data[hepevt_bytes_allocation_ATLAS]
virtual StatusCode onWorkerEnd(ModuleData &data) override
action at the end of the worker job
the data the EventLoop core classes are sharing with the Module implementation
Long_t memIncreaseVirtual() const
Virtual memory leak/increase during the job.
static const std::string optMemResidentPerEventIncreaseLimit
The minimal per-event resident memory increase for triggering an error.
Long_t memIncreaseResident() const
Resident memory leak/increase during the job.
Long_t m_initMemResident
Amount of resident memory used after initialisation in kB.
Long_t m_finMemVirtual
Amount of virtual memory used after finalisation in kB.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode postFinalize(ModuleData &data) override
actions after algorithms have been finalized
This module defines the arguments passed from the BATCH driver to the BATCH worker.
static const std::string optMemFailOnLeak
Failure behaviour of the code when a "significant memory leak" is found.
static const std::string optMemResidentIncreaseLimit
The minimal resident memory increase necessary to trigger an error.
uint64_t m_skippedEvents
number of skipped events
Long_t m_finMemResident
Amount of resident memory used after finalisation in kB.
virtual StatusCode postFirstEvent(ModuleData &data) override
action after processing first event
static const std::string optMemVirtualPerEventIncreaseLimit
The minimal per-event virtual memory increase for triggering an error.
static const std::string optMemVirtualIncreaseLimit
The minimal virtual memory increase necessary to trigger an error.