Exemplo n.º 1
0
/*
 * 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);
}
Exemplo n.º 2
0
/*
 * 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);
}
Exemplo n.º 3
0
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);
}
Exemplo n.º 4
0
extern select_jobinfo_t *other_select_jobinfo_alloc(void)
{
	if (other_select_init() < 0)
		return NULL;

	return (*(ops.jobinfo_alloc))();;
}
Exemplo n.º 5
0
extern void other_ba_fini(void)
{
	if (other_select_init() < 0)
		return;

	(*(ops.ba_fini))();
}
Exemplo n.º 6
0
extern bitstr_t *other_ba_cnodelist2bitmap(char *cnodelist)
{
	if (other_select_init() < 0)
		return NULL;

	return (*(ops.ba_cnodelist2bitmap))(cnodelist);
}
Exemplo n.º 7
0
/*
 * 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);
}
Exemplo n.º 8
0
/*
 * Note reconfiguration or change in partition configuration
 */
extern int other_reconfigure (void)
{
	if (other_select_init() < 0)
		return SLURM_ERROR;

	return (*(ops.reconfigure))();
}
Exemplo n.º 9
0
/*
 * 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))();
}
Exemplo n.º 10
0
/*
 * 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);
}
Exemplo n.º 11
0
/*
 * 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);
}
Exemplo n.º 12
0
/*
 * 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);
}
Exemplo n.º 13
0
/*
 * 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);
}
Exemplo n.º 14
0
/*
 * 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);
}
Exemplo n.º 15
0
/*
 * 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);
}
Exemplo n.º 16
0
/*
 * 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);
}
Exemplo n.º 17
0
extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo)
{
	if (other_select_init() < 0)
		return SLURM_ERROR;

	return (*(ops.nodeinfo_free))(nodeinfo);
}
Exemplo n.º 18
0
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);
}
Exemplo n.º 19
0
extern int other_select_nodeinfo_set_all(void)
{
	if (other_select_init() < 0)
		return SLURM_ERROR;

	return (*(ops.nodeinfo_set_all))();
}
Exemplo n.º 20
0
extern int *other_ba_get_dims(void)
{
	if (other_select_init() < 0)
		return NULL;

	return (*(ops.ba_get_dims))();
}
Exemplo n.º 21
0
/*
 * 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);
}
Exemplo n.º 22
0
/*
 * 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);
}
Exemplo n.º 23
0
/* 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);
}
Exemplo n.º 24
0
/*
 * 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);
}
Exemplo n.º 25
0
/* 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);
}
Exemplo n.º 26
0
/* 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);
}
Exemplo n.º 27
0
/*
 * 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);
}
Exemplo n.º 28
0
/*
 * 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);
}
Exemplo n.º 29
0
/*
 * 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);
}
Exemplo n.º 30
0
/*
 * 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);
}