pbs_alterjob(3B)

πŸ“¦ version 6.1.3, in epel 9, nixos 26.05, nixpkgs unstable

πŸ’… pbs_alterjob(3B) β€” okay so you wanna ALTER a job, bestie ✨

Hi bestie!! Welcome to pbs_alterjob(3B) from the PBS fam πŸ’– This one's a local manpage and it's literally your new bestie for tweaking a batch job that's already out there. Let's get into it πŸŽ€


✨ NAME ✨

pbs_alterjob β€” alter pbs batch job πŸ¦‹


🌸 SYNOPSIS 🌸

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

int pbs_alterjob(int connect, char *job_id, struct attrl *attrib,
char *extend)

int pbs_alterjob_async(int connect, char *job_id, struct attrl *attrib,
char *extend)

πŸ’œ DESCRIPTION πŸ’œ

So basically you're issuing a batch request to alter a batch job. Slay. ✨

A Modify Job batch request gets generated and yeeted to the server over the connection you specify with connect β€” which is the return value of pbs_connect(). Okay and when you use the asynchronous pbs_alterjob_async() call, the server will validate the request and reply before modifying the job 🫢 This version of the call can be used to reduce latency in scheduling, especially when the scheduler must modify a large number of jobs. Lowkey iconic for schedulers tbh.

The job_id argument identifies which job is to be altered, and it's specified in the form:

sequence_number.server

Now, attrib is a pointer to an attrl structure, which is defined in pbs_ifl.h as:

struct attrl {
    char *name;
    char *resource;
    char *value
    struct attrl *next;
};

The attrib list is terminated by the first entry where next is a null pointer. Periodt. πŸ’…

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 and honestly there's a lot of them, so here we go πŸ‘‘

  • #define ATTR_a "Execution_Time" β€” Alter the job's execution time.
  • #define ATTR_A "Account_Name" β€” Alter the account string.
  • #define ATTR_c "Checkpoint" β€” Alter the checkpoint interval.
  • #define ATTR_e "Error_Path" β€” Alter the path name for the standard error of the job.
  • #define ATTR_g "Group_List" β€” Alter the list of group names under which the job may execute.
  • #define ATTR_h "Hold_Types" β€” Alter the hold types.
  • #define ATTR_j "Join_Path" β€” Alter if standard error and standard output are joined (merged).
  • #define ATTR_k "Keep_Files" β€” Alter which output of the job is kept on the execution host.
  • #define ATTR_l "Resource_List" β€” Alter the value of a named resource.
  • #define ATTR_m "Mail_Points" β€” Alter the points at which the server will send mail about the job.
  • #define ATTR_M "Mail_Users" β€” Alter the list of users who would receive mail about the job.
  • #define ATTR_N "Job_Name" β€” Alter the job name.
  • #define ATTR_o "Output_Path" β€” Alter the path name for the standard output of the job.
  • #define ATTR_p "Priority" β€” Alter the priority of the job.
  • #define ATTR_r "Rerunable" β€” Alter the rerunable flag.
  • #define ATTR_S "Shell_Path_List" β€” Alter the path to the shell which will interprets the job script.
  • #define ATTR_u "User_List" β€” Alter the list of user names under which the job may execute.
  • #define ATTR_v "Variable_List" β€” Alter the list of environmental variables which are to be exported to the job.
  • #define ATTR_depend "depend" β€” Alter the inter-job dependencies.
  • #define ATTR_stagein "stagein" β€” Alter the list of files to be staged-in before job execution.
  • #define ATTR_stageout "stageout" β€” Alter the list of files to be staged-out after job execution.

If attrib itself is a null pointer, then no attributes are altered. That's it, that's the vibe. πŸ™ˆ

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. Don't forget or it's giving chaos 😭

If the resource of the specified resource name is already present in the job's Resource_List attribute, it will be altered to the specified value. If the resource is not present in the attribute, it is added. Simple as that bestie ✨

Heads up though: certain attributes of a job may or may not be alterable depending on the state of the job β€” see qalter(1B) for the deets πŸ‘€

The extend parameter is reserved for implementation defined extensions. Don't come for it, it's just chillin'. πŸ’€


🌈 SEE ALSO 🌈

qalter(1B), qhold(1B), qrls(1B), qsub(1B), pbs_connect(3B), pbs_holdjob(3B), and pbs_rlsjob(3B) β€” go read these too, they're all part of the friend group 🫢


πŸ“ DIAGNOSTICS πŸ“

When the batch request generated by the pbs_alterjob() or pbs_alterjob_async() function has been completed successfully by a batch server, the routine will return 0 (zero). Otherwise, a non zero error is returned. The error number is also set in pbs_errno. So like, check that if things go sideways πŸ’€


Alright bestie that's the whole page!! This one's from the Local section, dated the same as pbs_alterjob(3B), and it's giving PBS manual page energy through and through. Go alter some jobs and slay πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from