cctools
batch_wrapper.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2024 The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef BATCH_WRAPPER_H
8 #define BATCH_WRAPPER_H
9 
10 #include "batch_job.h"
11 
34 struct batch_wrapper *batch_wrapper_create(void);
35 
40 void batch_wrapper_delete(struct batch_wrapper *w);
41 
48 void batch_wrapper_pre(struct batch_wrapper *w, const char *cmd);
49 
56 void batch_wrapper_argv(struct batch_wrapper *w, char *const argv[]);
57 
63 void batch_wrapper_args(struct batch_wrapper *w, char *const args[]);
64 
69 void batch_wrapper_cmd(struct batch_wrapper *w, const char *cmd);
70 
71 
78 void batch_wrapper_post(struct batch_wrapper *w, const char *cmd);
79 
86 void batch_wrapper_prefix(struct batch_wrapper *w, const char *prefix);
87 
95 char *batch_wrapper_write(struct batch_wrapper *w, struct batch_job *t);
96 
103 char *batch_wrapper_expand(struct batch_job *t, struct jx *spec);
104 
105 #endif
106 /* vim: set noexpandtab tabstop=8: */
Represents a single batch job.
void batch_wrapper_args(struct batch_wrapper *w, char *const args[])
Specify a command line to execute with shell interpretation.
void batch_wrapper_pre(struct batch_wrapper *w, const char *cmd)
Add a shell command to the batch wrapper.
struct batch_wrapper * batch_wrapper_create(void)
Create a builder for a batch wrapper.
Internal description of a single batch job submitted to a queue.
Definition: batch_job.h:27
void batch_wrapper_argv(struct batch_wrapper *w, char *const argv[])
Specify a command line to execute in the wrapper.
char * batch_wrapper_write(struct batch_wrapper *w, struct batch_job *t)
Write out the batch_wrapper as a shell script.
void batch_wrapper_delete(struct batch_wrapper *w)
Free a batch_wrapper.
void batch_wrapper_post(struct batch_wrapper *w, const char *cmd)
Specify cleanup commands.
void batch_wrapper_cmd(struct batch_wrapper *w, const char *cmd)
Specify a shell command to execute.
char * batch_wrapper_expand(struct batch_job *t, struct jx *spec)
Generate one or more wrapper scripts from a JX command spec.
JX value representing any expression type.
Definition: jx.h:117
void batch_wrapper_prefix(struct batch_wrapper *w, const char *prefix)
Set the name prefix to use for the wrapper script.