pbs_runjob(3B)

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

πŸ’… pbs_runjob(3B) β€” the PBS page, bestie edition πŸŽ€

okay so this is pbs_runjob(3B) from the PBS manual, and it's literally the page about telling a batch server "hey, run this job for me" ✨ no cap, it's short and sweet and you're gonna get it in like two minutes.


🌸 NAME 🌸

pbs_runjob β€” run a pbs batch job πŸƒβ€β™€οΈπŸ’¨ (yes that's the whole name section, she's lowkey minimal, we respect it)


✨ SYNOPSIS ✨

like, include these first, obviously:

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

and then the two function girlies in question:

int pbs_runjob(int connect, char *job_id, char *location, char *extend)

int pbs_asyrunjob(int connect, char *job_id, char *location,
char *extend)

(she's a two-liner for the async one, that's just how it's formatted, don't come for her 🫢)


πŸ’– DESCRIPTION πŸ’–

So the whole vibe: you issue a batch request to run a batch job. That's it. That's the job. πŸ‘‘

πŸ¦‹ pbs_runjob() β€” the patient one

For pbs_runjob(), a "Run Job" batch request gets generated and sent off to the server over the connection specified by connect β€” which is literally just the return value of pbs_connect(). iykyk.

Then: the server will reply when the job has started execution, unless file in-staging is required. In that case, the server will reply when the staging operations are started. πŸŽ€

🌈 pbs_asyrunjob() β€” the fast one, main character energy

For pbs_asyrunjob(), an "Asynchronous Run Job" request is generated and set to the server over the connection. The server will validate the request and reply before initiating the execution of the job.

This version of the call can be used to reduce latency in scheduling, especially when the scheduler must start a large number of jobs. basically the group-chat-of-jobs version, so good πŸ”₯

⚠️ real talk bestie: these requests require that the issuing user have operator or administrator privilege. no privilege, no run, that's the rule πŸ’…

🧚 the arguments, one by one

  • job_id β€” identifies which job is to be run. it's specified in the form: sequence_number.server πŸ“
  • location β€” if it's not the null pointer or null string, this specifies the location where the job should be run. the location is the name of a host in the the cluster managed by the server. (yes, "the the" β€” the original page really said that, and honestly? iconic typo, I'm keeping it 😭)
  • extend β€” reserved for implementation defined extensions. that's it. reserved. don't touch. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

go read these next, bestie, they're all connected:

  • qrun(8B)
  • qsub(1B)
  • pbs_connect(3B)

🌟 DIAGNOSTICS 🌟

When the batch request generated by the pbs_runjob() or pbs_asyrunjob() functions has been completed successfully by a batch server, the routines will return 0 (zero). πŸŽ‰

Otherwise, a non zero error is returned. and ngl, the error number is also set in pbs_errno, so you can go look at what went wrong. πŸ’€


okay that's the whole page, you ate that honestly 🫢 go run some jobs, operator-privileged legend πŸ‘‘

sign-off szn: this was pbs_runjob(3B), footer says Local, and the date/version line is the one and only pbs_runjob(3B) β€” mwah, ily, bye πŸ’‹

πŸ“¦ where this page comes from