GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Some Useful Programs Up: Job Management Previous: Migrating a Job Instance   Contents

Cloning a Job Instance

The GATJob class introduces a notion of cloning distinct from that found in all the various GATObjects. The class GATJob introduces this second notion of cloning to mean the exact same thing as migration, however, the initial job is not stopped. Thinking of your Galatea you can see this name is quite apropos. Upon cloning the running process that is Galatea you'll end up with two of her, the more the merrier.

Cloning a GATJob is accomplished through a call to the function

GATResult GATJob_CloneJob(GATJob_const object, 
                          GATHardwareResource_const hr, 
                          GATJob *cloned_job)

This function will reconstitute the passed job using the state information saved in the previous call to the function GATJob_Checkpoint but will not stop the original job. Its first argument is a GATJob identifying the job to clone. Its next argument is a GATHardwareResource specifying the hardware resource to which the job should migrate. One can simply pass a NULL value for this second argument. This NULL signals that GAT should choose the new hardware resource. The final argument is a pointer to a GATJob. It is through this pointer that the function returns to the caller a GATJob instance corresponding to the cloned job. This function returns a GATResult, covered in Appendix [*], which indicates its completion status.


next up previous contents
Next: Some Useful Programs Up: Job Management Previous: Migrating a Job Instance   Contents
Andre Merzky 2004-05-13