next up previous print clean
Next: FUTURE WORK Up: R. Clapp: Parallel SEPlib Previous: Functions

Program functions

There are two required and three optional function available to the programmer. The required functions go near the beginning and ending of the program. The first, sep_begin_prog, tells the server that the program has started successfully. It should be used when it is safe to start another instance of the program on the same node. This latter requirement is important when sharing an output space (COPY) on a node. If you are adding to the output space you need insure that the output file has been created by the first instance of the program. The other required function is sep_end_prog. This should be used after all of the output files have been completely written to. The server interprets as a sign of completion for the job.

The sep_progress function enables effective job restarting. The programmer can use this function to signify a checkpoint in the code. When restarting a job, both the restart flag and the last progress message will be passed as arguments for the restarting job. In the case when you sharing an output space, you should use this function whenever you write to the shared file. The final two functions are when you are sharing an output space. The sep_open_lock(tag) locks (if already locked waits for the file to become available) a seplib tag. The sep_close_lock(tag) functions frees a tag so another process can safely read or write to it. All of these commands perform no function when not a portion of a parallel job.


next up previous print clean
Next: FUTURE WORK Up: R. Clapp: Parallel SEPlib Previous: Functions
Stanford Exploration Project
10/23/2004