Scroll to navigation

pbs_submit(3B) PBS pbs_submit(3B)

NAME

pbs_submit - submit a pbs batch job

SYNOPSIS

#include <pbs_error.h>
#include <pbs_ifl.h>

char *pbs_submit(int connect, struct attropl *attrib,
char *script, char *destination, char *extend)

DESCRIPTION

Issue a batch request to submit a new batch job.

A Queue Job batch request is generated and sent to the server over the connection specified by connect which is the return value of pbs_connect(). The job will be submitted to the queue specified by destination.

The parameter, attrib, is a list of attropl structures which is defined in pbs_ifl.h as:


struct attrl {
char *name;
char *resource;
char *value;
struct attrl *next;
enum batch_op op;
};

The attrib list is terminated by the first entry where next is a null pointer.

The name member points to a string which is the name of the attribute. The value member points to a string which is the value of the attribute. The attribute names are defined in pbs_ifl.h:

#define ATTR_a "Execution_Time"
Defines the job's execution time.
#define ATTR_A "Account_Name"
Defines the account string.
#define ATTR_c "Checkpoint"
Defines the checkpoint interval.
#define ATTR_e "Error_Path"
Defines the path name for the standard error of the job.
#define ATTR_g "Group_List"
Defines the list of group names under which the job may execute.
#define ATTR_h "Hold_Types"
Defines the hold types, the only allowable value string is "u".
#define ATTR_j "Join_Paths"
Defines whether standard error and standard output are joined (merged).
#define ATTR_k "Keep_Files"
Defines which output of the job is kept on the execution host.
#define ATTR_l "Resource_List"
Defines a resource required by the job.
#define ATTR_m "Mail_Points"
Defines the points at which the server will send mail about the job.
#define ATTR_M "Mail_Users"
Defines the list of users who would receive mail about the job.
#define ATTR_N "Job_Name"
Defines the job name.
#define ATTR_o "Output_Path"
Defines the path name for the standard output of the job.
#define ATTR_p "Priority"
Defines the priority of the job.
#define ATTR_r "Rerunable"
Defines the rerunable flag.
#define ATTR_S "Shell_Path_List"
Defines the path to the shell which will interpret the job script.
#define ATTR_t "job_array_request"
Requests specific array IDs. Makes this submission a job array submit.
#define ATTR_u "User_List"
Defines the list of user names under which the job may execute.
#define ATTR_v "Variable_List"
Defines the list of additional environment variables which are exported to the job.
#define ATTR_depend "depend"
Defines the inter-job dependencies.
#define ATTR_stagein "stagein"
Defines the list of files to be staged in prior to job execution.
#define ATTR_stageout "stageout"
Defines the list of files to be staged out after job execution.

If an attribute is not named in the attrib array, the default action will be taken. It will either be assigned the default value or will not be passed with the job. The action depends on the attribute. If attrib itself is a null pointer, then the default action will be taken for each attribute.

Associated with an attribute of type ATTR_l (the letter ell) is a resource name indicated by resource in the attrl structure. All other attribute types should have a pointer to a null string for resource.

The op member is forced to a value of SET by pbs_submit().

The parameter, script, is the path name to the job script. If the path name is relative, it will be expanded to the processes current working directory. If script is a null pointer or the path name pointed to is specified as the null string, no script is passed with the job.

The destination parameter specifies the destination for the job. It is specified as: [queue] If destination is the null string or the queue is not specified, the destination will be the default queue at the connected server.

The parameter, extend, is reserved for implementation defined extensions.

The return value is a character string which is the job_identifier assigned to the job by the server. The space for the job_identifier string is allocated by pbs_submit() and should be released via a call to free() by the user when no longer needed.

SEE ALSO

qsub(1B) and pbs_connect(3B)

DIAGNOSTICS

When the batch request generated by pbs_submit() function has been completed successfully by a batch server, the routine will return a pointer to a character string which is the job identifier of the submitted batch job. Otherwise, a null pointer is returned and the error code is set in pbs_error.

Local