|
||||||||||||
|
Dyrect Acyclic Graphs (DAG) JobsA DAG (directed acyclic graph) represents a set of jobs where the input, output, or execution of one or more jobs depends on one or more other jobs. The jobs are nodes (vertices) in the graph and the edges (arcs) identify the dependencies. Although not requiring a great number of new attributes, the structure of the JDL description for a DAG differs significantly from the one for a job and it is more complex. Due to this we start by providing an example of DAG description so that the structure of the JDL in this case is clear from the beginning. The new attributes and the slight differences in the semantic for some of the known ones will be highlighted in the text. It is important to note that upon submission of a DAG, besides the identifier associated with each node, the WMS assigns also to the DAG itself an identifier that has to be used as the handle for monitoring and controlling the whole DAG. Example - DAG example It can be described by the following JDL:
[ Type = "dag"; VirtualOrganisation = "gilda"; InputSandbox = {"/tmp/foo", "/home/gliteuser/bar", "/tmp/myconf"}; max_nodes_running = 5; nodes = [ nodeA = [ description = [ JobType = "Normal"; Executable = "a.exe"; InputSandbox = {"/home/data/myfile.txt", root.InputSandbox}; ]; ]; mynode = [ description = [ JobType = "Normal"; Executable = "b.exe"; Arguments = "1 2 3"; RetryCount = 3; Requirements = other.GlueCEInfoTotalCPUs > 2; OutputSandbox = {"myoutput.txt", "myerror.txt" }; ]; ]; nodeD = [ description = [ JobType = "Normal"; Executable = "b.exe"; Arguments = "1 2 3"; RetryCount = 3; InputSandbox = {"/home/pippo", "/home/test/b.exe"}; ]; ]; nodeC = [ file = "/home/test/c.jdl"; ]; nodeB = [ file = "foo.jdl"; ]; dependencies = { { nodeA, nodeB }, { nodeA, nodeC }, {nodeA, mynode }, { { nodeB, nodeC, mynode }, nodeD } }; ]; ]; Mandadory TAGS for DAGs: Type: In this case the value for the Type attribute is “DAG”. Type="DAG"; VirtualOrganisation: The Virtual Organisation must be the same for the DAG and all its nodes VirtualOrganization="gilda"; Nodes: The Nodes attribute is the core of the DAG description and it is used for specifying the nodes and their dependencies. It contains all the nodes of the DAG and the attribute named Dependencies. Each node corresponds to a classad attribute (nodeA, nodeB, nodeC, nodeD and mynode in the previous Example), whose name can be freely set by the user, which contains the description of the job representing the node. Such description can be provided through the File or Description attributes: Dependencies: The Dependencies attribute is a list of lists representing the dependencies between the nodes of the DAG described in the nodes attribute. Each sub-list specifies dependencies between a sub set of nodes. Nodes = [ nodeName1 = [
In this exercise we will use again the RegularExplorer Java class that you have seen in the Job Management Commands section. The goal is submit multiple jobs to sample multiple areas of the surface in a single step. This is achieved using a easy DAG without dependecies. We will make use of a simple bash script (dag_gener.sh) to generate the JDL nodes and the main DAG JDL. This script reads an argument.list file with the list of the different input parameters to sample the surface and takes as input a number n of lines to read. It will generate n JDL nodes. Download here the files of this exercise. Download here the Shapes Data. Step 1: Create an argument.list file. Insert in this file your input parameters (x0, y0, x1, y1, #_of_samples) according to the following format:
Step 2: Create the node jdls and the DAG JDL files running the dag_gener.sh script :
Step 3: Take a look to the file father_job.jdl and checks the format:
Step 4: DAG submission can be accomplished through the same commands used for simple jobs. Run the DAG job (father_job.jdl) generated by dag_gener.sh:
Step 5: Monitor the job until its status is DONE and finally retrieve the output :
Step 6: Take a look to the files out<i>.dat returned by the job using gnuplot to visualize the tridimensional surface as in the previous exercise. |
|||||||||||
|