GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Obtaining and Destroying Job Up: The Job Management Package Previous: Creating and Destroying SoftwareDescription   Contents

Creating and Destroying JobDescription Instances

A GATJobDescription, unsurprisingly, describes a job. As in describing a job one usually needs to describe at least things: the executable which is to run and the hardware on which this executable is to run. As we saw previously, an executable is described by a GATSoftwareDescription instance and a hardware resource is described quite generally by a GATHardwareResourceDescription or more specifically by a GATHardwareResource. So, one might guess that a GATJobDescription is no more than an container for a GATSoftwareDescription and a GATHardwareResourceDescription or a GATHardwareResource, and if one guessed this, then they'd be right.

As a result, the construction of a GATJobDescription should be obvious. One can construct it using the function

GATJobDescription
GATJobDescription_Create_Description(GATContext context,
  GATSoftwareDescription_const software,
  GATResourceDescription_const resource)

which takes a GATSoftwareDescription describing the executable and a GATResourceDescription describing where to run the executable. Or on can use the function

GATJobDescription
GATJobDescription_Create(GATContext context,
  GATSoftwareDescription_const software, 
  GATResource_const resource)

which takes a GATSoftwareDescription describing the executable and a GATResource indicating exactly where to run the executable. Both of these functions return a corresponding GATJobDescription on success and NULL on error.

There is only a single path to destruction, the function

void GATJobDescription_Destroy(GATJobDescription *resource)

which upon completion frees any resources held by the passed GATJobDescription.


next up previous contents
Next: Obtaining and Destroying Job Up: The Job Management Package Previous: Creating and Destroying SoftwareDescription   Contents
Andre Merzky 2004-05-13