KaliVeda
Toolkit for HIC analysis
KV_CCIN2P3_Slurm.h
1 
4 #ifndef __KV_CCIN2P3_SLURM_H
5 #define __KV_CCIN2P3_SLURM_H
6 
7 #include "KVBatchSystem.h"
8 
17 protected:
18 
25 
26  void ChangeDefJobOpt(KVDataAnalyser*) override;
27 
28 public:
29 
30  KV_CCIN2P3_Slurm(const Char_t* name);
31 
32  void SetJobTime(const Char_t* h = ""); /* Set CPU time for batch job */
33  void SetJobMemory(const Char_t* h = ""); /* Set max memory for batch job */
34  void PrintJobs(Option_t* opt = "") override; /* Print list of all jobs submitted to system */
35 
36  Bool_t CheckJobParameters() override; /* Checks job parameters */
37  void SetMultiJobsMode(Bool_t on = kTRUE)
38  {
39  fMultiJobs = on;
40  }
41  Bool_t MultiJobsMode() const override
42  {
43  return fMultiJobs;
44  }
45 
47  {
49  fRunsPerJob = n;
50  }
52  {
54  return fRunsPerJob;
55  }
56 
57  const Char_t* GetJobTime(void) const; /* Get CPU time for batch job */
58  const Char_t* GetJobMemory(void) const; /* Get max memory for batch job */
59 
60  void ChooseJobTime(void); /* Choose CPU time for batch job */
61  void ChooseJobMemory(void); /* Choose max memory for batch job */
62 
63  void Clear(Option_t* opt = "") override;
64 
65  void WriteBatchEnvFile(TEnv*) override;
66  void ReadBatchEnvFile(TEnv*) override;
67  void Print(Option_t* /*option*/ = "") const override;
68 
69  void SanitizeJobName() const override;
70 
71  void Run() override;
73  void SetBatchSystemParameters(const KVNameValueList&) override;
74 
75  ClassDefOverride(KV_CCIN2P3_Slurm, 1) //Interface to new CCIN2P3 Slurm batch system (2022)
76 };
77 
78 #endif
int Int_t
bool Bool_t
char Char_t
const char Option_t
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Base class for interface to a batch job management system.
Definition: KVBatchSystem.h:78
Manager class which sets up and runs data analysis tasks.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Interface to CCIN2P3 Grid Engine batch job management system.
void SetRunsPerJob(Int_t n)
KVString fDefJobTime
default job length
void ChangeDefJobOpt(KVDataAnalyser *) override
void SetMultiJobsMode(Bool_t on=kTRUE)
void SetBatchSystemParameters(const KVNameValueList &) override
Use the parameters in the list to set all relevant parameters for batch system.
void GetBatchSystemParameterList(KVNameValueList &) override
const Char_t * GetJobTime(void) const
returns the parameter string corresponding to the job CPU time
void SetJobMemory(const Char_t *h="")
Bool_t fMultiJobs
set to kTRUE if several jobs are to be submitted for the runlist set in fAnalyser
void Print(Option_t *="") const override
Bool_t CheckJobParameters() override
Checks the job and asks for any missing parameters.
Bool_t MultiJobsMode() const override
void ReadBatchEnvFile(TEnv *) override
const Char_t * GetJobMemory(void) const
returns the parameter string corresponding to the job Memory
void ChooseJobMemory(void)
void Clear(Option_t *opt="") override
Clear previously set parameters in order to create a new job submission command.
void SetJobTime(const Char_t *h="")
void SanitizeJobName() const override
Int_t fRunsPerJob
number of runs per job submitted in multi job mode (default=1)
KVString fDefJobMem
default job memory allocation (with units, e.g. "512M")
Int_t GetRunsPerJob() const
void WriteBatchEnvFile(TEnv *) override
void Run() override
KV_CCIN2P3_Slurm(const Char_t *name)
void PrintJobs(Option_t *opt="") override
Print list of owner's jobs.
const Int_t n