GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Cloning a Job Instance Up: Job Management Previous: Checkpointing a Job Instance   Contents

Migrating a Job Instance

Here's where things get interesting. Say you, Pygmalion, have somehow managed to shoehorn the encephalon of your beloved Galatea in to the 3.5K of RAM available in your salvaged VIC-20, but just as this Galatea is ever so slowly coming to life a new hardware resource comes on-line, the Earth Simulator. Through careful thought and much deliberation, you decide that it would likely be, well, a bit better to run your Galatea on the Earth Simulator instead of your once mighty VIC-20. However, you don't want to lose all the memories your Galatea has had living in the mortal coil of this VIC-20. Euthanasia is one thing, murder quite another. So, what you would really like to do is to take the current state of your Galatea save it, move it to the Earth Simulator, and start her there and stop the old job. Like going to sleep and waking up in the body of superman, if only. How can this be done? GAT!

GAT allows for this very thing, job migration, for properly instrumented jobs. (One can determine if a job is properly instrumented by calling the GATJob_GetInfo function and looking for the value of the key checkpointable. If the value is $1$, then the job is properly instrumented.) One can migrate a job to a specified hardware resource through a call to the function

GATResult GATJob_Migrate(GATJob_const job, 
                         GATHardwareResource_const hr, 
                         GATJob *migratedJob)

This function will reconstitute the passed job using the state information saved in the previous call to the function GATJob_Checkpoint and stop the original job. It takes as its first argument a GATJob representing the job to migrate. Its second argument is a GATHardwareResource identifying 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 migrated job. As is old hat by now, this function returns a GATResult, covered in Appendix [*], which indicates its completion status.


next up previous contents
Next: Cloning a Job Instance Up: Job Management Previous: Checkpointing a Job Instance   Contents
Andre Merzky 2004-05-13