/* * Update specific sub nodes (usually something has gone wrong) * IN block_desc_ptr - information about the block */ extern int other_update_sub_node (update_block_msg_t *block_desc_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.update_sub_node))(block_desc_ptr); }
/* * Fail certain cnodes in a blocks midplane (usually comes from the * IBM runjob mux) * IN step_ptr - step that failed */ extern int other_fail_cnode (struct step_record *step_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.fail_cnode))(step_ptr); }
extern int other_select_nodeinfo_set(struct job_record *job_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.nodeinfo_set))(job_ptr); }
extern select_jobinfo_t *other_select_jobinfo_alloc(void) { if (other_select_init() < 0) return NULL; return (*(ops.jobinfo_alloc))();; }
extern void other_ba_fini(void) { if (other_select_init() < 0) return; (*(ops.ba_fini))(); }
extern bitstr_t *other_ba_cnodelist2bitmap(char *cnodelist) { if (other_select_init() < 0) return NULL; return (*(ops.ba_cnodelist2bitmap))(cnodelist); }
/* * Note termination of job is starting. Executed from slurmctld. * IN job_ptr - pointer to job being terminated */ extern int other_job_fini(struct job_record *job_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.job_fini))(job_ptr); }
/* * Note reconfiguration or change in partition configuration */ extern int other_reconfigure (void) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.reconfigure))(); }
/* * Test if expanding a job is permitted */ extern bool other_job_expand_allow(void) { if (other_select_init() < 0) return false; return (*(ops.job_expand_allow))(); }
/* * Pass job-step signal to other plugin. * IN job_ptr - job to be signalled * IN signal - signal(7) number */ extern int other_job_signal(struct job_record *job_ptr, int signal) { if (other_select_init() < 0) return -1; return (*(ops.job_signal))(job_ptr, signal); }
/* * determine if job is ready to execute per the node select plugin * IN job_ptr - pointer to job being tested * RET: -2 fatal error, -1 try again, 1 if ready to execute, * 0 not ready to execute */ extern int other_job_ready(struct job_record *job_ptr) { if (other_select_init() < 0) return -1; return (*(ops.job_ready))(job_ptr); }
/* * Note re/initialization of block record data structure * IN block_list - list of partition records */ extern int other_block_init(List block_list) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.block_init))(block_list); }
/* * Note re/initialization of node record data structure * IN node_ptr - current node data * IN node_count - number of node entries */ extern int other_node_init(struct node_record *node_ptr, int node_cnt) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.node_init))(node_ptr, node_cnt); }
/* * Note the initialization of job records, issued upon restart of * slurmctld and used to synchronize any job state. */ extern int other_job_init(List job_list) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.job_init))(job_list); }
/* * Resume a job. Executed from slurmctld. * indf_susp IN - set if job is being resumed from indefinite suspend by user * or admin, otherwise resume from gang scheduling * IN job_ptr - pointer to job being resumed * RET SLURM_SUCCESS or error code */ extern int other_job_resume(struct job_record *job_ptr, bool indf_susp) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.job_resume))(job_ptr, indf_susp); }
/* * Alter the node count for a job given the type of system we are on * IN/OUT job_desc - current job desc */ extern int other_alter_node_cnt (enum select_node_cnt type, void *data) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.alter_node_cnt))(type, data); }
extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.nodeinfo_free))(nodeinfo); }
extern void other_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) { if (other_select_init() < 0) return; (*(ops.ba_init))(node_info_ptr, sanity_check); }
extern int other_select_nodeinfo_set_all(void) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.nodeinfo_set_all))(); }
extern int *other_ba_get_dims(void) { if (other_select_init() < 0) return NULL; return (*(ops.ba_get_dims))(); }
/* * Updated a node state in the plugin, this should happen when a node is * drained or put into a down state then changed back. * IN index - index into the node record list * IN state - state to update to * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise */ extern int other_update_node_state (struct node_record *node_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.update_node_state))(node_ptr); }
/* * Initialize context for node selection plugin and * restore any global state information * IN dir_name - directory from which the data can be restored */ extern int other_state_restore(char *dir_name) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.state_restore))(dir_name); }
/* write select job info to a string * IN jobinfo - a select job credential * IN mode - print mode, see enum select_print_mode * RET - char * containing string of request */ extern char *other_select_jobinfo_xstrdup( select_jobinfo_t *jobinfo, int mode) { if (other_select_init() < 0) return NULL; return (*(ops.jobinfo_xstrdup))(jobinfo, mode); }
/* * Updated a node configuration. This happens when a node registers with * more resources than originally configured (e.g. memory). * IN index - index into the node record list * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise */ extern int other_update_node_config (int index) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops. update_node_config))(index); }
/* write select job credential to a string * IN jobinfo - a select job credential * OUT buf - location to write job credential contents * IN size - byte size of buf * IN mode - print mode, see enum select_print_mode * RET - the string, same as buf */ extern char *other_select_jobinfo_sprint(select_jobinfo_t *jobinfo, char *buf, size_t size, int mode) { if (other_select_init() < 0) return NULL; return (*(ops.jobinfo_sprint))(jobinfo, buf, size, mode); }
/* copy a select job credential * IN jobinfo - the select job credential to be copied * RET - the copy or NULL on failure * NOTE: returned value must be freed using other_free_jobinfo */ extern select_jobinfo_t *other_select_jobinfo_copy( select_jobinfo_t *jobinfo) { if (other_select_init() < 0) return NULL; return (*(ops.jobinfo_copy))(jobinfo); }
/* * clear what happened in select_g_step_pick_nodes * IN/OUT step_ptr - Flush the resources from the job and step. */ extern int other_step_finish(struct step_record *step_ptr) { if (other_select_init() < 0) return SLURM_ERROR; return (*(ops.step_finish)) (step_ptr); }
/* * Modify internal data structures for a job that has decreased job size. * Only support jobs shrinking. Also see other_job_expand(); * RET: 0 or an error code */ extern int other_job_resized(struct job_record *job_ptr, struct node_record *node_ptr) { if (other_select_init() < 0) return -1; return (*(ops.job_resized))(job_ptr, node_ptr); }
/* * Move the resource allocated to one job into that of another job. * All resources are removed from "from_job_ptr" and moved into * "to_job_ptr". Also see other_job_resized(). * RET: 0 or an error code */ extern int other_job_expand(struct job_record *from_job_ptr, struct job_record *to_job_ptr) { if (other_select_init() < 0) return -1; return (*(ops.job_expand))(from_job_ptr, to_job_ptr); }
/* * other_resv_test - Identify the nodes which "best" satisfy a reservation * request. "best" is defined as either single set of consecutive nodes * satisfying the request and leaving the minimum number of unused nodes * OR the fewest number of consecutive node sets * IN avail_bitmap - nodes available for the reservation * IN node_cnt - count of required nodes * RET - nodes selected for use by the reservation */ extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, uint32_t *core_cnt, bitstr_t **core_bitmap) { if (other_select_init() < 0) return NULL; return (*(ops.resv_test))(avail_bitmap, node_cnt, core_cnt, core_bitmap); }