KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KV_CCIN2P3_Slurm.h
Go to the documentation of this file.
1 
4 #ifndef __KV_CCIN2P3_SLURM_H
5 #define __KV_CCIN2P3_SLURM_H
6 
7 #include "KVBatchSystem.h"
8 
16 protected:
17 
25 
26  virtual void ChangeDefJobOpt(KVDataAnalyser*);
27 
28 public:
29 
30  KV_CCIN2P3_Slurm(const Char_t* name);
31  virtual ~ KV_CCIN2P3_Slurm();
32 
33  void SetJobTime(const Char_t* h = ""); /* Set CPU time for batch job */
34  void SetJobMemory(const Char_t* h = ""); /* Set max memory for batch job */
35  void PrintJobs(Option_t* opt = ""); /* Print list of all jobs submitted to system */
36 
37  virtual Bool_t CheckJobParameters(); /* Checks job parameters */
38  void SetMultiJobsMode(Bool_t on = kTRUE)
39  {
40  fMultiJobs = on;
41  }
43  {
44  return fMultiJobs;
45  }
46 
48  {
50  fRunsPerJob = n;
51  }
53  {
55  return fRunsPerJob;
56  }
57 
58  const Char_t* GetJobTime(void) const; /* Get CPU time for batch job */
59  const Char_t* GetJobMemory(void) const; /* Get max memory for batch job */
60 
61  void ChooseJobTime(void); /* Choose CPU time for batch job */
62  void ChooseJobMemory(void); /* Choose max memory for batch job */
63 
64  virtual void Clear(Option_t* opt = "");
65 
66  virtual void WriteBatchEnvFile(TEnv*);
67  virtual void ReadBatchEnvFile(TEnv*);
68  virtual void Print(Option_t* /*option*/ = "") const;
69 
70  virtual void SanitizeJobName() const;
71 
72  void Run();
73  const Char_t* GetJobName() const;
75  virtual void SetBatchSystemParameters(const KVNameValueList&);
76 
77  ClassDef(KV_CCIN2P3_Slurm, 1) //Interface to new CCIN2P3 Slurm batch system (2022)
78 };
79 
80 #endif
int Int_t
char Char_t
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Base class for interface to a batch job management system.
Definition: KVBatchSystem.h:77
Manager class which sets up and runs data analysis tasks.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Interface to CCIN2P3 Grid Engine batch job management system.
void SetRunsPerJob(Int_t n)
KVString fDefJobTime
default job length
virtual void Print(Option_t *="") const
virtual void ChangeDefJobOpt(KVDataAnalyser *)
Bool_t MultiJobsMode() const
void SetMultiJobsMode(Bool_t on=kTRUE)
const Char_t * GetJobName() const
const Char_t * GetJobTime(void) const
returns the parameter string corresponding to the job CPU time
virtual void Clear(Option_t *opt="")
Clear previously set parameters in order to create a new job submission command.
virtual Bool_t CheckJobParameters()
Checks the job and asks for any missing parameters.
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
KVNumberList fCurrJobRunList
runlist for (multi job mode) job being submitted
virtual void GetBatchSystemParameterList(KVNameValueList &)
const Char_t * GetJobMemory(void) const
returns the parameter string corresponding to the job Memory
void ChooseJobMemory(void)
void SetJobTime(const Char_t *h="")
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
virtual ~ KV_CCIN2P3_Slurm()
void PrintJobs(Option_t *opt="")
Print list of owner's jobs.
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")
virtual void ReadBatchEnvFile(TEnv *)
virtual void SanitizeJobName() const
Int_t GetRunsPerJob() const
virtual void WriteBatchEnvFile(TEnv *)
KV_CCIN2P3_Slurm(const Char_t *name)
const Int_t n