#include <src/requestad/adconverter.h>
it manages partitioner, collection and parametric jdls converting internally into an ExpDagAd clas instance. It also provide a set of utilities to easily create valid jdl template for simple Jobs (even with jobtype different from "normal") Dags or Collection of jobs; just by specifing a few parameters.
Public Types | |
ADCONV_JOBTYPE_NORMAL = 1 | |
ADCONV_JOBTYPE_PARAMETRIC = 2 | |
ADCONV_JOBTYPE_INTERACTIVE = 4 | |
ADCONV_JOBTYPE_MPICH = 8 | |
ADCONV_JOBTYPE_PARTITIONABLE = 16 | |
ADCONV_JOBTYPE_CHECKPOINTABLE = 32 | |
ADCONV_ATTR_INPUTSB = 1 | |
ADCONV_ATTR_INPUTDATA = 2 | |
ADCONV_ATTR_ARGUMENTS = 4 | |
enum | jobtype { ADCONV_JOBTYPE_NORMAL = 1, ADCONV_JOBTYPE_PARAMETRIC = 2, ADCONV_JOBTYPE_INTERACTIVE = 4, ADCONV_JOBTYPE_MPICH = 8, ADCONV_JOBTYPE_PARTITIONABLE = 16, ADCONV_JOBTYPE_CHECKPOINTABLE = 32 } |
Enum used to specify the Jobtype of a job Notice: muliple job type can be obtained by bitwise '|' operator. More... | |
enum | attribute { ADCONV_ATTR_INPUTSB = 1, ADCONV_ATTR_INPUTDATA = 2, ADCONV_ATTR_ARGUMENTS = 4 } |
Enum used to specify which attribute(s) are to be parametrised Notice: muliple attributes can be obtained by bitwise '|' operator. More... | |
Static Public Member Functions | |
Template creation: | |
static JobAd * | createJobTemplate (int type, const std::string &executable, const std::string &arguments, const std::string &requirements, const std::string &rank, const std::string &vo="") |
Create a valid JDL ready for submission. | |
static JobAd * | createStringParametricTemplate (std::vector< std::string > parametrised, std::vector< std::string > parameters, const std::string &requirements, const std::string &rank, const std::string &vo="") |
Create a valid Parametric. | |
static JobAd * | createStringParametricTemplate (int parametrised, std::vector< std::string > parameters, const std::string &requirements, const std::string &rank, const std::string &vo="") |
static JobAd * | createIntParametricTemplate (std::vector< std::string > parametrised, int param_number, int param_start, int param_step, const std::string &requirements, const std::string &rank, const std::string &vo="") |
Create a valid Parametric. | |
static JobAd * | createIntParametricTemplate (int parametrised, int param_number, int param_start, int param_step, const std::string &requirements, const std::string &rank, const std::string &vo="") |
static ExpDagAd * | createDAGTemplate (NodeStruct dependencies, const std::string &requirements, const std::string &rank, const std::string &vo="") |
Create a valid template JDL for a Dag. | |
static CollectionAd * | createCollectionTemplate (unsigned int jobNumber, const std::string &requirements, const std::string &rank, const std::string &vo="") |
Create a valid template JDL for a Collection of jobs. | |
static CollectionAd * | createCollectionFromPath (const std::string &path, const std::string &vo="") |
Load all the JDL files stored in a specified path and put them all inside a collection of jobs. | |
static Ad * | createDagAdFromPath (const std::string &path, const std::string &vo="") |
Load all the JDL files stored in a specified path and create an Ad instance that represents a DagAd with enmpty dependencies. | |
static ExpDagAd * | createDagAdFromPath (NodeStruct dependencies, const std::string &path, const std::string &vo="") |
Load all the JDL files stored in a specified path and create an ExpDagAd instance. | |
Ad conversion: | |
static ExpDagAd * | part2dag (const std::string &jdl) |
utility that converts the jdl of a partitioner job into a DagAd | |
static ExpDagAd * | part2dag (Ad *ad) |
utility that converts the jdl of a partitioner job into a DagAd | |
static ExpDagAd * | collection2dag (const std::string &jdl) |
utility that converts the jdl of a collection into a DagAd | |
static ExpDagAd * | collection2dag (Ad *ad) |
utility that converts the jdl of a collection into a DagAd | |
static ExpDagAd * | bulk2dag (const std::string &jdl, unsigned int maxCycles=0) |
utility that converts the jdl of a parametric job into a DagAd | |
static ExpDagAd * | bulk2dag (Ad *ad, unsigned int maxCycles_i=0) |
utility that converts the jdl of a parametric job into a DagAd | |
Static Public Attributes | |
Static Const String Values: | |
static const std::string | VALUES |
static const std::string | VALUE |
static const std::string | NODE |
static const std::string | SIMPLE_NODE_TYPE |
static const std::string | PARAMETRIC_PARAMETERS |
static const std::string | PARAMETRIC_START |
static const std::string | PARAMETRIC_STEP |
static const std::string | PARAMETER_VALUE |
Enum used to specify which attribute(s) are to be parametrised Notice: muliple attributes can be obtained by bitwise '|' operator.
Enum used to specify the Jobtype of a job Notice: muliple job type can be obtained by bitwise '|' operator.
static ExpDagAd* glite::jdl::AdConverter::bulk2dag | ( | const std::string & | jdl, | |
unsigned int | maxCycles = 0 | |||
) | [static] |
utility that converts the jdl of a parametric job into a DagAd
jdl | string representing the classad of a parametric job | |
maxCycles | the max number of cycles over parameters to be done (0 means all) |
static ExpDagAd* glite::jdl::AdConverter::collection2dag | ( | const std::string & | jdl | ) | [static] |
utility that converts the jdl of a collection into a DagAd
jdl | string representing the classad of a collection of jobs |
static CollectionAd* glite::jdl::AdConverter::createCollectionFromPath | ( | const std::string & | path, | |
const std::string & | vo = "" | |||
) | [static] |
Load all the JDL files stored in a specified path and put them all inside a collection of jobs.
path | the path (including wildcards) where to look for JDL files to be added to the collection | |
vo | the VirtualOrganisation name to be used by all the jobs in the collection |
static CollectionAd* glite::jdl::AdConverter::createCollectionTemplate | ( | unsigned int | jobNumber, | |
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
Create a valid template JDL for a Collection of jobs.
jobNumber | the number of jobs to be created for the collection | |
requirements | a string representing the expression describing the requirements (which is an attribute of boolean type) for all the jobs in the collection | |
rank | a string representing the expression for the rank (which is an attribute of double type) for all the jobs in the collection | |
vo | the VirtualOrganisation name to be used by all the jobs in the collection |
static ExpDagAd* glite::jdl::AdConverter::createDagAdFromPath | ( | NodeStruct | dependencies, | |
const std::string & | path, | |||
const std::string & | vo = "" | |||
) | [static] |
Load all the JDL files stored in a specified path and create an ExpDagAd instance.
dependencies | the dependency structure of the dag: each node must list all the nodes that depends on it. | |
path | the path (including wildcards) where to look for JDL files to be added to the DagAd | |
vo | the VirtualOrganisation name to be used by all the jobs in the collection |
static Ad* glite::jdl::AdConverter::createDagAdFromPath | ( | const std::string & | path, | |
const std::string & | vo = "" | |||
) | [static] |
Load all the JDL files stored in a specified path and create an Ad instance that represents a DagAd with enmpty dependencies.
path | the path (including wildcards) where to look for JDL files to be added to the DagAd | |
vo | the VirtualOrganisation name to be used by all the jobs in the collection |
static ExpDagAd* glite::jdl::AdConverter::createDAGTemplate | ( | NodeStruct | dependencies, | |
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
Create a valid template JDL for a Dag.
dependencies | the dependency structure of the dag: each node must list all the nodes that depends on it. | |
requirements | a string representing the expression describing the requirements (which is an attribute of boolean type) for all the nodes of the dag | |
rank | a string representing the expression for the rank (which is an attribute of double type) for all the nodes of the dag | |
vo | the VirtualOrganisation name to be used for all the nodes of the dag |
static JobAd* glite::jdl::AdConverter::createIntParametricTemplate | ( | int | parametrised, | |
int | param_number, | |||
int | param_start, | |||
int | param_step, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
static JobAd* glite::jdl::AdConverter::createIntParametricTemplate | ( | std::vector< std::string > | parametrised, | |
int | param_number, | |||
int | param_start, | |||
int | param_step, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
Create a valid Parametric.
parametrised | all the attributes that contains reference to a parameter. | |
param_number | the number of different parameters to be created | |
param_start | (default value is 0) the starting point where to begin to parametrise | |
param_step | (default value is 1) the step between one parameter and the next one among param_start | |
requirements | a string representing the expression describing all the Job requirements (which is an attribute of boolean type) | |
rank | a string representing the expression for the rank (which is an attribute of double type) of the resource | |
vo | the VirtualOrganisation name to be used |
static JobAd* glite::jdl::AdConverter::createJobTemplate | ( | int | type, | |
const std::string & | executable, | |||
const std::string & | arguments, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
Create a valid JDL ready for submission.
type | the jobtype of the job. Multiple jobtype can be specified toghether through the bitwise '|' operator ( as specified in jobtype) | |
executable | the simple file name to be executed (if local) or the full path if stored in the remote machine. In the former case the full path of the file must be specified in the inputsandbox attribute | |
arguments | a string representing the arguments (if needed) of the executable file (empty "" string if not needed) | |
requirements | a string representing the expression describing all the Job requirements (which is an attribute of boolean type) | |
rank | a string representing the expression for the rank (which is an attribute of double type) of the resource | |
vo | the VirtualOrganisation name to be used |
static JobAd* glite::jdl::AdConverter::createStringParametricTemplate | ( | int | parametrised, | |
std::vector< std::string > | parameters, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
static JobAd* glite::jdl::AdConverter::createStringParametricTemplate | ( | std::vector< std::string > | parametrised, | |
std::vector< std::string > | parameters, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
const std::string & | vo = "" | |||
) | [static] |
Create a valid Parametric.
parametrised | all the attributes that contains reference to a parameter. | |
parameters | a vector containing all the parameters | |
requirements | a string representing the expression describing all the Job requirements (which is an attribute of boolean type) | |
rank | a string representing the expression for the rank (which is an attribute of double type) of the resource | |
vo | the VirtualOrganisation name to be used |
static ExpDagAd* glite::jdl::AdConverter::part2dag | ( | const std::string & | jdl | ) | [static] |
utility that converts the jdl of a partitioner job into a DagAd
jdl | string representing the classad of a partitioner job |
const std::string glite::jdl::AdConverter::NODE [static] |
const std::string glite::jdl::AdConverter::PARAMETER_VALUE [static] |
const std::string glite::jdl::AdConverter::PARAMETRIC_PARAMETERS [static] |
const std::string glite::jdl::AdConverter::PARAMETRIC_START [static] |
const std::string glite::jdl::AdConverter::PARAMETRIC_STEP [static] |
const std::string glite::jdl::AdConverter::SIMPLE_NODE_TYPE [static] |
const std::string glite::jdl::AdConverter::VALUE [static] |
const std::string glite::jdl::AdConverter::VALUES [static] |