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,

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_job_attributes(7B).

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.