66 m_maxVSize(iConfig.getUntrackedParameter<double>(
"maxVSize",0)*1000.),
67 m_maxRSS(iConfig.getUntrackedParameter<double>(
"maxRSS",0)*1000.),
68 m_maxTime(iConfig.getUntrackedParameter<double>(
"maxTime",0)*60.*60.),
96 bool expected =
false;
97 if(
m_doingCheck.compare_exchange_strong(expected,
true,std::memory_order_acq_rel) ) {
131 desc.
addUntracked<
double>(
"maxVSize", 0.)->
setComment(
"Maximum allowed VSize for the job in GB. Ignored if set to 0.");
132 desc.
addUntracked<
double>(
"maxRSS", 0.)->
setComment(
"Maximum allowd RSS for the job in GB. Ignored if set to 0.");
133 desc.
addUntracked<
double>(
"maxTime", 0.)->
setComment(
"Maximum allowd wallclock time for the job in hours. Ignored if set to 0.");
134 descriptions.
add(
"ResourceEnforcer", desc);
void setComment(std::string const &value)
unsigned int m_nEventsToSkip
void watchPreallocate(Preallocate::slot_type const &iSlot)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void watchPostEvent(PostEvent::slot_type const &iSlot)
void postEventProcessing(edm::StreamContext const &)
unsigned int maxNumberOfStreams() const
ResourceEnforcer(edm::ParameterSet const &iConfig, edm::ActivityRegistry &iAR)
std::atomic< bool > m_doingCheck
#define DEFINE_FWK_SERVICE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
volatile std::atomic< bool > shutdown_flag false
ProcInfoFetcher m_fetcher
std::atomic< unsigned int > m_eventCount