Slurm(3)

๐ŸŒธ NAME ๐ŸŒธ

This is the Slurm(3) page from User Contributed Perl Documentation, bestie. Manual name: Slurm - Perl API for libslurm. That's the whole vibe: Perl interface, Slurm energy, no cap ๐Ÿ’….


โœจ SYNOPSIS โœจ

use Slurm;

my $slurm = Slurm::new();
$nodes = $slurm->load_node();
unless($nodes) {
    die "failed to load node info: " . $slurm->strerror();
}

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The Slurm class gives you a Perl interface to the Slurm API functions in <slurm/slurm.h>, plus some extra frequently used functions exported by libslurm. Iconic crossover event, honestly ๐Ÿซถ.

๐Ÿ’ฌ METHODS ๐Ÿ’ฌ

To use the API, first create a Slurm object:

$slurm = Slurm::new($conf);

Then call the desired functions:

$resp = $slurm->load_jobs();

In the following METHODS section, if a parameter is omitted, it will be listed as param=val, where val is the default value of the parameter.

๐Ÿงฑ DATA STRUCTURES ๐Ÿงฑ

Typically, C structures are converted to (maybe blessed) Perl hash references, with field names as hash keys. Arrays in C are converted to arrays in Perl. For example, there is a structure job_info_msg_t:

typedef struct job_info_msg {
    time_t last_update;     /* time of latest info */
    uint32_t record_count;  /* number of records */
    job_info_t *job_array;  /* the job records */
} job_info_msg_t;

This will be converted to a hash reference with the following structure:

{
    last_update => 1285847672,
    job_array => [ {account => 'test', alloc_node => 'ln0', alloc_sid => 1234, ...},
                   {account => 'debug', alloc_node => 'ln2', alloc_sid => 5678, ...},
                   ...
                 ]
}

Note the missing record_count field in the hash. It can be derived from the number of elements in array job_array. Slay, derived data ๐Ÿ’….

To pass parameters to the API functions, use the corresponding hash references, for example:

$rc = $slurm->update_node({node_names => 'node[0-7]', node_state => NODE_STATE_DRAIN});

Please see <slurm/slurm.h> for the definition of the structures.

๐Ÿ”ฎ CONSTANTS ๐Ÿ”ฎ

The enumerations and macro definitions are available in the Slurm package. If :constant is given when using the Slurm package, the constants will be exported to the calling package.

Please see Slurm::Constant for the available constants.

๐Ÿ’… METHODS ๐Ÿ’…

๐Ÿ› ๏ธ CONSTRUCTOR/DESTRUCTOR ๐Ÿ› ๏ธ

$slurm = Slurm::new($conf_file=undef);

Create a Slurm object. For now the object is just a hash reference with no members.

  • IN $conf_file: the Slurm configuration file. If omitted, the default Slurm configuration file will be used (file specified by environment variable SLURM_CONF or the file slurm.conf under directory specified in compile time).
  • RET: blessed opaque Slurm object. On error undef is returned.

๐Ÿšจ ERROR INFORMATION FUNCTIONS ๐Ÿšจ

$errno = $slurm->get_errno();

Get the error number associated with last operation.

  • RET: error number associated with last operation.

$str = $slurm->strerror($errno=0)

Get the string describing the specified error number.

  • IN $errno: error number. If omitted or 0, the error number returned by $slurm->get_errno() will be used.
  • RET: error string.

๐Ÿท๏ธ ENTITY STATE/REASON/FLAG/TYPE STRING FUNCTIONS ๐Ÿท๏ธ

$str = $slurm->preempt_mode_string($mode_num);

Get the string describing the specified preemt mode number.

  • IN $mode_num: preempt mode number.
  • RET: preempt mode string.

$num = $slurm->preempt_mode_num($mode_str);

Get the preempt mode number of the specified preempt mode string.

  • IN $mode_str: preempt mode string.
  • RET: preempt mode number.

$str = $slurm->job_reason_string($num);

Get the string representation of the specified job state reason number.

  • IN $num: job reason number.
  • RET: job reason string.

$str = $slurm->job_state_string($num);

Get the string representation of the specified job state number.

  • IN $num: job state number.
  • RET: job state string.

$str = $slurm->job_state_string_compact($num);

Get the compact string representation of the specified job state number.

  • IN $num: job state number.
  • RET: compact job state string.

$num = $slurm->job_state_num($str);

Get the job state number of the specified (compact) job state string.

  • IN $str: job state string.
  • RET: job state number.

$str = $slurm->reservation_flags_string($flags);

Get the string representation of the specified reservation flags.

  • IN $num: reservation flags number.
  • RET: reservation flags string.
Not me noticing the bullet says $num while the signature says $flags ๐Ÿ’€. Keeping it exact, bestie.

$str = $slurm->node_state_string($num);

Get the string representation of the specified node state number.

  • IN $num: node state number.
  • RET: node state string.

$str = $slurm->node_state_string_compact($num);

Get the compact string representation of the specified node state number.

  • IN $num: node state number.
  • RET: compact node state string.

$str = $slurm->private_data_string($num);

Get the string representation of the specified private data type.

  • IN $num: private data type number.
  • RET: private data type string.

$str = $slurm->accounting_enforce_string($num);

Get the string representation of the specified accounting enforce type.

  • IN $num: accounting enforce type number.
  • RET: accounting enforce type string.

๐ŸŽŸ๏ธ RESOURCE ALLOCATION FUNCTIONS ๐ŸŽŸ๏ธ

$resp = $slurm->allocate_resources($job_desc);

Allocate resources for a job request. If the requested resources are not immediately available, the slurmctld will send the job_alloc_resp_msg to the specified node and port.

  • IN $job_desc: description of resource allocation request, with structure of job_desc_msg_t.
  • RET: response to request, with structure of resource_allocation_response_msg_t. This only represents a job allocation if resources are immediately available. Otherwise it just contains the job id of the enqueued job request. On failure undef is returned.

$resp = $slurm->allocate_resources_blocking($job_desc, $timeout=0, $pending_callbacks=undef);

Allocate resources for a job request. This call will block until the allocation is granted, or the specified timeout limit is reached.

  • IN $job_desc: description of resource allocation request, with structure of job_desc_msg_t.
  • IN $timeout: amount of time, in seconds, to wait for a response before giving up. A timeout of zero will wait indefinitely.
  • IN $pending_callbacks: If the allocation cannot be granted immediately, the controller will put the job in the PENDING state. If pending callback is given, it will be called with the job id of the pending job as the sole parameter.
  • RET: allocation response, with structure of resource_allocation_response_msg_t. On failure undef is returned, with errno set.

$resp = $slurm->allocatiion_lookup($job_id);

Retrieve info for an existing resource allocation.

  • IN $job_id: job allocation identifier.
  • RET: job allocation info, with structure of resource_allocation_response_msg_t. On failure undef is returned with errno set.
Yep, allocatiion_lookup with the extra i โ€” that's the method name, I'm not fixing it ๐Ÿ’€.

$str = $slurm->read_hostfile($filename, $n);

Read a specified Slurm hostfile. The file must contain a list of Slurm NodeNames, one per line.

  • IN $filename: name of Slurm hostlist file to be read.
  • IN $n: number of NodeNames required.
  • RET: a string representing the hostlist. Returns NULL if there are fewer than $n hostnames in the file, or if an error occurs.

$msg_thr = $slurm->allocation_msg_thr_create($port, $callbacks);

Startup a message handler talking with the controller dealing with messages from the controller during an allocation.

  • OUT $port: port we are listening for messages on from the controller.
  • IN $callbacks: callbacks for different types of messages, with structure of slurm_allocation_callbacks_t.
  • RET: opaque object of allocation_msg_thread_t *, or NULL on failure.

$slurm->allocation_msg_thr_destroy($msg_thr);

Shutdown the message handler talking with the controller dealing with messages from the controller during an allocation.

  • IN $msg_thr: opaque object of allocation_msg_thread_t pointer.

$resp = $slurm->submit_batch_job($job_desc_msg);

Issue RPC to submit a job for later execution.

  • IN $job_desc_msg: description of batch job request, with structure of job_desc_msg_t.
  • RET: SLURM_SUCCESS on success, otherwise return SLURM_ERROR with errno set.

$rc = $slurm->job_will_run($job_desc_msg);

Determine if a job would execute immediately if submitted now.

  • IN $job_desc_msg: description of resource allocation request, with structure of job_desc_msg_t.
  • RET: SLURM_SUCCESS on success, otherwise return SLURM_ERROR with errno set.

$resp = $slurm->sbcast_lookup($job_id);

Retrieve info for an existing resource allocation including a credential needed for sbcast.

  • IN $jobid: job allocation identifier.
  • RET: job allocation information including a credential for sbcast, with structure of job_sbcast_cred_msg_t. On failure undef is returned with errno set.
The signature says $job_id, the bullet says $jobid โ€” both are here, exactly as the page gives them ๐Ÿซถ.

๐Ÿ“ก JOB/STEP SIGNALING FUNCTIONS ๐Ÿ“ก

$rc = $slurm->kill_job($job_id, $signal, $batch_flag=0);

Send the specified signal to all steps of an existing job.

  • IN $job_id: the job's id.
  • IN $signal: signal number.
  • IN $batch_flag: 1 to signal batch shell only, otherwise 0.
  • RET: SLURM_SUCCESS on success, otherwise return SLURM_ERROR with errno set.

$rc = $slurm->signal_job($job_id, $signal);

Send the specified signal to all steps of an existing job.

  • IN $job_id: the job's id.
  • IN $signal: signal number.
  • RET: SLURM_SUCCESS on success, otherwise return SLURM_ERROR with errno set.

โš™๏ธ SLURM CONTROL CONFIGURATION READ/PRINT/UPDATE FUNCTIONS โš™๏ธ

($major, $minor, $micro) = $slurm->api_version();

Get the Slurm API's version number.

  • RET: a three element list of the major, minor, and micro version number.

$resp = $slurm->load_ctl_conf($update_time=0);

Issue RPC to get Slurm control configuration information if changed.

  • IN $update_time: time of current configuration data.
  • RET: Slurm configuration data, with structure of slurm_ctl_t. On failure undef is returned with errno set.

$slurm->print_ctl_conf($out, $conf);

Output the contents of Slurm control configuration message as loaded using load_ctl_conf().

  • IN $out: file to write to.
  • IN $conf: Slurm control configuration, with structure of slurm_conf_t.

$list = $slurm->ctl_conf_2_key_pairs($conf);

Put the Slurm configuration data into a List of opaque data type config_key_pair_t.

  • IN $conf: Slurm control configuration, with structure of slurm_conf_t.
  • RET: List of opaque data type config_key_pair_t.

$resp = $slurm->load_slurmd_status();

Okay bestie, this one fires an RPC to get the status of the slurmd daemon on this machine ๐Ÿ’…

  • RET: slurmd status info, with structure of slurmd_status_t. On failure undef is returned with errno set.

$slurm->print_slurmd_status($out, $slurmd_status);

Prints out the contents of a slurmd status message that you loaded with load_slurmd_status() โœจ

  • IN $out: file to write to.
  • IN $slurmd_status: slurmd status info, with structure of slurmd_status_t.

$slurm->print_key_pairs($out, $key_pairs, $title);

Prints the contents of $key_pairs, which is a list of the opaque data type config_key_pair_t ๐ŸŽ€

  • IN $out: file to write to.
  • IN $key_pairs: list containing key pairs to be printed.
  • IN $title: title of key pair list.

โœจ SLURM JOB CONFIGURATION READ/PRINT/UPDATE FUNCTIONS โœจ

$time = $slurm->get_end_time($job_id);

Gets the expected end time for a given Slurm job, no cap ๐Ÿ•

  • IN $jobid: Slurm job id.
  • RET: scheduled end time for the job. On failure undef is returned with errno set.

$secs = $slurm->get_rem_time($job_id);

Gets the expected time remaining for a given job. Literally your โ€œhow much longerโ€ check ๐Ÿ’–

  • IN $jobid: Slurm job id.
  • RET: remaining time in seconds or -1 on error.

$rc = $slurm->job_node_ready($job_id);

Reports whether nodes are ready for the job to execute right now ๐Ÿ‘‘

  • IN $job_id: Slurm job id.
  • RET:
    • READY_JOB_FATAL: fatal error
    • READY_JOB_ERROR: ordinary error
    • READY_NODE_STATE: node is ready
    • READY_JOB_STATE: job is ready to execute

$resp = $slurm->load_job($job_id, $show_flags=0);

Fires an RPC to get job information for one job ID ๐Ÿฆ‹

  • IN $job_id: ID of job we want information about.
  • IN $show_flags: job filtering options.
  • RET: job information, with structure of job_info_msg_t. On failure undef is returned with errno set.

$resp = $slurm->load_jobs($update_time=0, $show_flags=0);

Fires an RPC to get all Slurm job information if it changed. Group-chat โ€œwhatโ€™s newโ€ energy fr fr ๐Ÿ’ฌ

  • IN $update_time: time of current job information data.
  • IN $show_flags: job filtering options.
  • RET: job information, with structure of job_info_msg_t. On failure undef is returned with errno set.

$rc = $slurm->notify_job($job_id, $message);

Sends a message to the jobโ€™s stdout โ€” usable only by user root ๐Ÿ”ฅ

  • IN $job_id: Slurm job id or 0 for all jobs.
  • IN $message: arbitrary message.
  • RET: 0 or -1 on error.

$job_id = $slurm->pid2jobid($job_pid);

Fires an RPC to get the Slurm job ID of a given process ID on this machine ๐Ÿ”Ž

  • IN $job_pid: process ID of interest on this machine.
  • RET: corresponding job ID. On failure undef is returned.

$slurm->print_job_info($out, $job_info, $one_liner=0);

Prints information about a specific Slurm job based on the message you loaded with load_jobs() ๐Ÿ’…

  • IN $out: file to write to.
  • IN $job_info: an individual job information record, with structure of job_info_t.
  • IN $one_liner: print as a single line if true.

$slurm->print_job_info_msg($out, $job_info_msg, $one_liner=0);

Prints information about all Slurm jobs based on the message you loaded with load_jobs() ๐ŸŒˆ

  • IN $out: file to write to.
  • IN $job_info_msg: job information message, with structure of job_info_msg_t.
  • IN $one_liner: print as a single line if true.

$str = $slurm->sprint_job_info($job_info, $one_liner=0);

Prints information about a specific Slurm job based on the message you loaded with load_jobs() โ€” but returns it as a string instead of printing straight to a file โœจ

  • IN $job_info: an individual job information record, with structure of job_info_t.
  • IN $one_liner: print as a single line if true.
  • RET: string containing formatted output.

$rc = $slurm->update_job($job_info);

Fires an RPC to a jobโ€™s configuration per request โ€” only usable by user root or, for some parameters, the jobโ€™s owner ๐Ÿ‘‘

  • IN $job_info: description of job updates, with structure of job_desc_msg_t.
  • RET: SLURM_SUCCESS on success, otherwise return SLURM_ERROR with errno set.

๐Ÿฆ‹ SLURM NODE CONFIGURATION READ/PRINT/UPDATE FUNCTIONS ๐Ÿฆ‹

$resp = $slurm->load_node($update_time=0, $show_flags=0);

Fires an RPC to get all node configuration information if it changed ๐Ÿงš

  • IN $update_time: time of current configuration data.
  • IN $show_flags: node filtering options.
  • RET: response hash reference with structure of node_info_msg_t. On failure undef is returned with errno set.

$slurm->print_node_info_msg($out, $node_info_msg, $one_liner=0);

Prints information about all Slurm nodes based on the message you loaded with load_node() ๐ŸŒธ

  • IN $out: FILE handle to write to.
  • IN $node_info_msg: node information message to print, with structure of node_info_msg_t.
  • IN $one_liner: if true, each node info will be printed as a single line.

$slurm->print_node_table($out, $node_info, $one_liner=0);

Prints information about a specific Slurm node based on the message you loaded with load_node() ๐ŸŽ€

  • IN $out: FILE handle to write to.
  • IN $node_info: an individual node information record with structure of node_info_t.
  • IN $one_liner: whether to print as a single line.

$str = $slurm->sprint_node_table($node_info, $one_liner=0);

Prints information about a specific Slurm node based on the message as loaded using load_node โ€” and gives you the formatted string back ๐Ÿ’–

  • IN $node_info: an individual node information record with structure of node_info_t.
  • IN $one_liner: whether to print as a single line.
  • RET: string containing formatted output on success, undef on failure.

$rc = $slurm->update_node($node_info);

Fires an RPC to modify a nodeโ€™s configuration per request โ€” only usable by user root ๐Ÿ”ฅ

  • IN $node_info: description of node updates, with structure of update_node_msg_t.
  • RET: 0 on success, -1 on failure with errno set.

๐ŸŽ€ SLURM PARTITION CONFIGURATION READ/PRINT/UPDATE FUNCTIONS ๐ŸŽ€

$resp = $slurm->load_partitions($update_time=0, $show_flags=0);

Fires an RPC to get all Slurm partition configuration information if it changed ๐Ÿฆ‹

  • IN $update_time: time of current configuration data.
  • IN $show_flags: partitions filtering options.
  • RET: response hash reference with structure of partition_info_msg_t.

$slurm->print_partition_info_msg($out, $part_info_msg, $one_liner=0);

Prints information about all Slurm partitions based on the message you loaded with load_partitions() ๐Ÿ’…

  • IN $out: FILE handle to write to.
  • IN $part_info_msg: partitions information message, with structure of partition_info_msg_t.
  • IN $one_liner: print as a single line if true.

$slurm->print_partition_info($out, $part_info, $one_liner=0);

Prints information about a specific Slurm partition based on the message you loaded with load_partitions() ๐ŸŒˆ

  • IN $out: FILE handle to write to.
  • IN $part_info: an individual partition information record, with structure of partition_info_t.
  • IN $one_liner: print as a single line if true.

$str = $slurm->sprint_partition_info($part_info, $one_liner=0);

Prints information about a specific Slurm partition based on the message as loaded using load_reservations() โ€” yes, thatโ€™s what it says, bestie ๐Ÿ˜ญ

  • IN $part_info: an individual partition information record, with structure of partition_info_t.
  • IN $one_liner: print as a single line if true.
  • RET: string containing formatted output. On failure undef is returned.

$rc = $slurm->create_partition($part_info);

Creates a new partition โ€” only usable by user root ๐Ÿ‘‘

  • IN $part_info: description of partition configuration with structure of update_part_msg_t.
  • RET: 0 on success, -1 on failure with errno set.

$rc = $slurm->update_partition($part_info);

Fires an RPC to update a partitionโ€™s configuration per request โ€” only usable by user root ๐Ÿ”ฅ

  • IN $part_info: description of partition updates with structure of update_part_msg_t.
  • RET: 0 on success, -1 on failure with errno set.

$rc = $slurm->delete_partition($part_info)

Fires an RPC to delete a partition โ€” only usable by user root ๐Ÿ’€

  • IN $part_info: description of partition to delete, with structure of delete_part_msg_t.
  • RET: 0 on success, -1 on failure with errno set.

๐Ÿ’œ SLURM RESERVATION CONFIGURATION READ/PRINT/UPDATE FUNCTIONS ๐Ÿ’œ

$name = $slurm->create_reservation($resv_info);

Creates a new reservation โ€” only usable by user root ๐Ÿ‘‘

  • IN $resv_info: description of reservation, with structure of resv_desc_msg_t.
  • RET: name of reservation created. On failure undef is returned with errno set.

$rc = $slurm->update_reservation($resv_info);

Modifies an existing reservation โ€” only usable by user root ๐ŸŒธ

  • IN $resv_info: description of reservation, with structure of resv_desc_msg_t.
  • RET: error code.

$rc = $slurm->delete_reservation($resv_info);

Fires an RPC to delete a reservation โ€” only usable by user root ๐Ÿ’…

  • IN $resv_info: description of reservation to delete, with structure of reservation_name_msg_t.
  • RET: error code.

$resp = $slurm->load_reservations($update_time=0);

Fires an RPC to get all Slurm reservation configuration information if it changed ๐Ÿงš

  • IN $update_time: time of current configuration data.
  • RET: response of reservation information, with structure of reserve_info_msg_t. On failure undef is returned with errno set.

$slurm->print_reservation_info_msg($out, $resv_info_msg, $one_liner=0);

Prints information about all Slurm reservations based on the message you loaded with load_reservation() ๐ŸŽ€

  • IN $out: FILE handle to write to.
  • IN $resv_info_msg: reservation information message, with structure of reserve_info_msg_t.
  • IN $one_liner: print as a single line if true.

$slurm->print_reservation_info($out, $resv_info, $one_liner=0);

Prints information about a specific Slurm reservation based on the message you loaded with load_reservation() โœจ

  • IN $out: FILE handle to write to.
  • IN $resv_info: an individual reservation information record, with structure of reserve_info_t.
  • IN $one_liner: print as a single line if true.

$str = $slurm->sprint_reservation_info($resv_info, $one_liner=0);

Prints information about a specific Slurm reservation based on the message you loaded with load_reservations() โ€” and returns it as a string ๐Ÿ’–

  • IN $resv_info: an individual reservation information record, with structure of reserve_info_t.
  • IN $one_liner: print as a single line if true.
  • RET: string containing formatted output. On failure undef is returned.

๐Ÿ”ฅ SLURM PING/RECONFIGURE/SHUTDOWN FUNCTIONS ๐Ÿ”ฅ

$rc = $slurm->ping($primary);

Fires an RPC to ping the Slurm controller (slurmctld) ๐Ÿ“ก

  • IN primary: 1 for primary controller, 2 for secondary controller.
  • RET: error code.

$rc = $slurm->reconfigure()

Okay so the next RPC is literally the one that has the Slurm controller (slurmctld) reload its configuration file. โœจ

  • RET โ€” error code.

$rc = $slurm->shutdown($options); โ€” this RPC tells the Slurm controller (slurmctld) to cease operations, and both the primary and backup controller are shutdown. ๐Ÿ˜ญ

  • IN $options:
    • 0 โ€” all slurm daemons are shutdown.
    • 1 โ€” slurmctld generates a core file.
    • 2 โ€” only the slurmctld is shutdown (no core file).
  • RET โ€” error code.

$rc = $slurm->takeover(); โ€” this RPC has the Slurm backup controller take over the primary controller. REQUEST_CONTROL is sent by the backup to the primary controller to take control. ๐Ÿ‘‘

  • RET โ€” error code.

$rc = $slurm->set_debug_level($debug_level) โ€” this RPC sets the slurm controller debug level. ๐Ÿ›

  • IN $debug_level โ€” requested debug level.
  • RET โ€” 0 on success, -1 on error with errno set.

$rc = $slurm->set_schedlog_level($schedlog_level); โ€” this RPC sets the slurm scheduler log level. ๐Ÿ“

  • $schedlog_level โ€” requested scheduler log level.
  • RET โ€” 0 on success, -1 on error with errno set.

โธ๏ธ SLURM JOB SUSPEND FUNCTIONS โธ๏ธ

$rc = $slurm->suspend($job_id); โ€” suspend execution of a job. ๐Ÿ˜ด

  • IN $job_id โ€” the job you're targeting for the operation.
  • RET โ€” error code.

$rc = $slurm->resume($job_id); โ€” resume execution of a previously suspended job. โ–ถ๏ธ

  • IN $job_id โ€” the job you're performing the operation on.
  • RET โ€” error code.

$rc = $slurm->requeue($job_id); โ€” re-queue a batch job; if it's already running, terminate it first. ๐Ÿ”

  • IN $job_id โ€” the job you're performing the operation on.
  • RET โ€” error code.

๐ŸŽฏ SLURM TRIGGER FUNCTIONS ๐ŸŽฏ

$rc = $slurm->set_trigger($trigger_info); โ€” set an event trigger. ๐ŸŽ€

  • IN $trigger_info โ€” hash reference of the specification of the trigger to create, with structure of "trigger_info_t".
  • RET โ€” error code.

$rc = $slurm->clear_trigger($trigger_info); โ€” clear an existing event trigger. ๐Ÿงน

  • IN $trigger_info โ€” hash reference of the specification of the trigger to remove, with structure of "trigger_info_t".
  • RET โ€” error code.

$resp = $slurm->get_triggers(); โ€” get all event trigger information. ๐Ÿ”

  • RET โ€” hash reference with structure of "trigger_info_msg_t". On failure "undef" is returned with errno set.

๐Ÿงช JOB/NODE STATE TESTING FUNCTIONS ๐Ÿงช

These are the little state-checking besties, based on the macros defined in src/common/slurm_protocol_defs.h. Each one takes a parameter of a hash reference of a job/node and returns a boolean value. For a job, $job->{job_state} is tested. For a node, $node->{node_state} is tested. Slay. ๐Ÿ’…

$cond = IS_JOB_PENDING($job);

$cond = IS_JOB_RUNNING($job);

$cond = IS_JOB_SUSPENDED($job);

$cond = IS_JOB_COMPLETE($job);

$cond = IS_JOB_CANCELLED($job);

$cond = IS_JOB_FAILED($job);

$cond = IS_JOB_TIMEOUT($job);

$cond = IS_JOB_NODE_FAILED($job);

$cond = IS_JOB_COMPLETING($job);

$cond = IS_JOB_CONFIGURING($job);

$cond = IS_JOB_STARTED($job);

$cond = IS_JOB_FINISHED($job);

$cond = IS_JOB_COMPLETED($job);

$cond = IS_JOB_RESIZING($job);

$cond = IS_NODE_UNKNOWN($node);

$cond = IS_NODE_DOWN($node);

$cond = IS_NODE_IDLE($node);

$cond = IS_NODE_ALLOCATED($node);

$cond = IS_NODE_ERROR($node);

$cond = IS_NODE_MIXED($node);

$cond = IS_NODE_FUTURE($node);

$cond = IS_NODE_DRAIN($node);

$cond = IS_NODE_DRAINING($node);

$cond = IS_NODE_DRAINED($node);

$cond = IS_NODE_COMPLETING($node);

$cond = IS_NODE_NO_RESPOND($node);

$cond = IS_NODE_POWERED_DOWN($node);

$cond = IS_NODE_POWER_UP($node);

$cond = IS_NODE_FAIL($node);

$cond = IS_NODE_MAINT($node);

๐Ÿ“ค EXPORT ๐Ÿ“ค

The job/node state testing functions are exported by default. ๐Ÿ’–

If ':constant' is specified, all constants are exported.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • Slurm::Constant, Slurm::Hostlist, Slurm::Bitstr
  • <slurm/slurm.h> for various hash reference structures.
  • Home page of Slurm: <http://slurm.schedmd.com>.

๐Ÿ’– AUTHOR ๐Ÿ’–

This library is created by Hongjia Cao, <hjcao(AT)nudt.edu.cn> and Danny Auble, <da(AT)llnl.gov>. It is distributed with Slurm. ๐Ÿซถ

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.

Later, bestie! ๐Ÿซถ This page's source/version is perl v5.40.2, its date is 2026-10-14, and it's the Slurm(3) man page. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from