Exemple #1
0
uint32_t slurm_sched_g_initial_priority(uint32_t last_prio,
					struct job_record *job_ptr)
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	return (*(ops.initial_priority))( last_prio, job_ptr );
}
Exemple #2
0
/* *********************************************************************** */
char *
slurm_sched_p_get_conf( void )
{
        if ( slurm_sched_init() < 0 )
                return NULL;

        return (*(g_sched_context->ops.get_conf))( );
}
Exemple #3
0
/* *********************************************************************** */
char *
slurm_sched_p_strerror( int errnum )
{
	if ( slurm_sched_init() < 0 )
		return NULL;

	return (*(g_sched_context->ops.strerror))( errnum );
}
Exemple #4
0
/* *********************************************************************** */
void
slurm_sched_requeue( struct job_record *job_ptr, char *reason )
{
        if ( slurm_sched_init() < 0 )
                return;

        (*(g_sched_context->ops.job_requeue))( job_ptr, reason );
}
Exemple #5
0
/* *********************************************************************** */
char *
slurm_sched_g_get_conf( void )
{
        if ( slurm_sched_init() < 0 )
                return NULL;

        return (*(ops.get_conf))( );
}
Exemple #6
0
/* *********************************************************************** */
int
slurm_sched_p_get_errno( void )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	return (*(g_sched_context->ops.get_errno))( );
}
Exemple #7
0
/* *********************************************************************** */
void
slurm_sched_job_is_pending( void )
{
	if ( slurm_sched_init() < 0 )
		return;

	(*(g_sched_context->ops.job_is_pending))();
}
Exemple #8
0
/* *********************************************************************** */
char *
slurm_sched_g_strerror( int errnum )
{
	if ( slurm_sched_init() < 0 )
		return NULL;

	return (*(ops.strerror))( errnum );
}
Exemple #9
0
/* *********************************************************************** */
int
slurm_sched_g_get_errno( void )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	return (*(ops.get_errno))( );
}
Exemple #10
0
/* *********************************************************************** */
void
slurm_sched_g_job_is_pending( void )
{
	if ( slurm_sched_init() < 0 )
		return;

	(*(ops.job_is_pending))();
}
Exemple #11
0
extern int slurm_sched_g_reconfig(void)
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	gs_reconfig();

	return (*(ops.reconfig))();
}
Exemple #12
0
/* *********************************************************************** */
void
slurm_sched_partition_change( void )
{
	if ( slurm_sched_init() < 0 )
		return;

	if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) &&
	     (gs_reconfig() != SLURM_SUCCESS))
		error( "cannot reconfigure gang scheduler" );

	(*(g_sched_context->ops.partition_change))();
}
Exemple #13
0
/* *********************************************************************** */
extern int
slurm_sched_reconfig( void )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) &&
	     (gs_reconfig() != SLURM_SUCCESS))
		error( "cannot reconfigure gang scheduler" );

	return (*(g_sched_context->ops.reconfig))();
}
Exemple #14
0
/* *********************************************************************** */
int
slurm_sched_freealloc( struct job_record *job_ptr )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) &&
	     (gs_job_fini( job_ptr ) != SLURM_SUCCESS)) {
		error( "gang scheduler problem finishing job %u",
		       job_ptr->job_id);
	}

	return (*(g_sched_context->ops.freealloc))( job_ptr );
}
Exemple #15
0
/* *********************************************************************** */
int
slurm_sched_g_newalloc( struct job_record *job_ptr )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

	if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) &&
	     (gs_job_start( job_ptr ) != SLURM_SUCCESS)) {
		error( "gang scheduler problem starting job %u",
		       job_ptr->job_id);
	}

	return (*(ops.newalloc))( job_ptr );
}
Exemple #16
0
/* *********************************************************************** */
int
slurm_sched_schedule( void )
{
	if ( slurm_sched_init() < 0 )
		return SLURM_ERROR;

#if 0
	/* Must have job write lock and node read lock set here */
	if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) &&
	     (gs_job_scan() != SLURM_SUCCESS))
		error( "gang scheduler could not rescan jobs" );
#endif

	return (*(g_sched_context->ops.schedule))();
}