Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

batch_job.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
00003 Copyright (C) 2005- The University of Notre Dame
00004 This software is distributed under a BSD-style license.
00005 See the file COPYING for details.
00006 */
00007 
00008 #ifndef BATCH_JOB_H
00009 #define BATCH_JOB_H
00010 
00011 #include <time.h>
00012 
00021 typedef int batch_job_id_t;
00022 
00024 typedef enum {
00025         BATCH_QUEUE_TYPE_UNKNOWN=-1, 
00026         BATCH_QUEUE_TYPE_UNIX,       
00027         BATCH_QUEUE_TYPE_CONDOR,     
00028         BATCH_QUEUE_TYPE_SGE,        
00029         BATCH_QUEUE_TYPE_WORK_QUEUE  
00030 } batch_queue_type_t;
00031 
00036 batch_queue_type_t batch_queue_type_from_string( const char *str );
00037 
00042 const char * batch_queue_type_to_string( batch_queue_type_t t );
00043 
00048 struct batch_queue * batch_queue_create( batch_queue_type_t type );
00049 
00056 void batch_queue_logfile( struct batch_queue *q, const char *logfile );
00057 
00061 void batch_queue_delete( struct batch_queue *q );
00062 
00064 struct batch_job_info {
00065         time_t submitted;       
00066         time_t started;         
00067         time_t finished;        
00068         int exited_normally;    
00069         int exit_code;          
00070         int exit_signal;        
00071 };
00072 
00081 batch_job_id_t batch_job_submit_simple(
00082         struct batch_queue *q,
00083         const char *cmdline,
00084         const char *input_files,
00085         const char *output_files );
00086 
00099 batch_job_id_t batch_job_submit(
00100         struct batch_queue *q,
00101         const char *cmd,
00102         const char *args,
00103         const char *infile,
00104         const char *outfile,
00105         const char *errfile,
00106         const char *extra_input_files,
00107         const char *extra_output_files );
00108 
00116 batch_job_id_t batch_job_wait( struct batch_queue *q, struct batch_job_info *info );
00117 
00126 int batch_job_remove( struct batch_queue *q, batch_job_id_t jobid );
00127 
00128 #endif

Generated on Fri Jun 26 09:34:26 2009 for cctools by  doxygen 1.3.9.1