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 ); }
/* *********************************************************************** */ char * slurm_sched_p_get_conf( void ) { if ( slurm_sched_init() < 0 ) return NULL; return (*(g_sched_context->ops.get_conf))( ); }
/* *********************************************************************** */ char * slurm_sched_p_strerror( int errnum ) { if ( slurm_sched_init() < 0 ) return NULL; return (*(g_sched_context->ops.strerror))( errnum ); }
/* *********************************************************************** */ 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 ); }
/* *********************************************************************** */ char * slurm_sched_g_get_conf( void ) { if ( slurm_sched_init() < 0 ) return NULL; return (*(ops.get_conf))( ); }
/* *********************************************************************** */ int slurm_sched_p_get_errno( void ) { if ( slurm_sched_init() < 0 ) return SLURM_ERROR; return (*(g_sched_context->ops.get_errno))( ); }
/* *********************************************************************** */ void slurm_sched_job_is_pending( void ) { if ( slurm_sched_init() < 0 ) return; (*(g_sched_context->ops.job_is_pending))(); }
/* *********************************************************************** */ char * slurm_sched_g_strerror( int errnum ) { if ( slurm_sched_init() < 0 ) return NULL; return (*(ops.strerror))( errnum ); }
/* *********************************************************************** */ int slurm_sched_g_get_errno( void ) { if ( slurm_sched_init() < 0 ) return SLURM_ERROR; return (*(ops.get_errno))( ); }
/* *********************************************************************** */ void slurm_sched_g_job_is_pending( void ) { if ( slurm_sched_init() < 0 ) return; (*(ops.job_is_pending))(); }
extern int slurm_sched_g_reconfig(void) { if ( slurm_sched_init() < 0 ) return SLURM_ERROR; gs_reconfig(); return (*(ops.reconfig))(); }
/* *********************************************************************** */ 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))(); }
/* *********************************************************************** */ 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))(); }
/* *********************************************************************** */ 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 ); }
/* *********************************************************************** */ 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 ); }
/* *********************************************************************** */ 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))(); }