(Click to open topic with navigation)
Not every job is checkpointable. A job for which checkpointing is desirable must be started with the -c command line option. This option takes a comma-separated list of arguments that are used to control checkpointing behavior. The list of valid options available in the 2.4 version of Torque is show below.
Example 5-369: Sample test program
#include "stdio.h"
int main( int argc, char *argv[] )
{
int i;
for (i=0; i<100; i++)
{
printf("i = %d\n", i);
fflush(stdout);
sleep(1);
}
}
Example 5-370: Instructions for building test program
> gcc -o test test.c
Example 5-371: Sample test script
#!/bin/bash ./test
Example 5-372: Starting the test job
> qstat
> qsub -c enabled,periodic,shutdown,interval=1 test.sh
77.jakaa.cridomain
> qstat
Job id Name User Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
77.jakaa test.sh jsmith 0 Q batch
>
If you have no scheduler running, you might need to start the job with qrun.
As this program runs, it writes its output to a file in /var/spool/torque/spool. This file can be observed with the command tail -f.
Related Topics