void fini( void ) { pthread_mutex_lock( &thread_flag_mutex ); if ( builtin_thread ) { verbose( "Built-in scheduler plugin shutting down" ); stop_builtin_agent(); pthread_join(builtin_thread, NULL); builtin_thread = 0; } pthread_mutex_unlock( &thread_flag_mutex ); }
static void _load_config(void) { char *sched_params, *select_type, *tmp_ptr; sched_timeout = slurm_get_msg_timeout() / 2; sched_timeout = MAX(sched_timeout, 1); sched_timeout = MIN(sched_timeout, 10); sched_params = slurm_get_sched_params(); if (sched_params && (tmp_ptr=strstr(sched_params, "interval="))) builtin_interval = atoi(tmp_ptr + 9); if (builtin_interval < 1) { error("Invalid SchedulerParameters interval: %d", builtin_interval); builtin_interval = BACKFILL_INTERVAL; } if (sched_params && (tmp_ptr=strstr(sched_params, "max_job_bf="))) max_sched_job_cnt = atoi(tmp_ptr + 11); if (sched_params && (tmp_ptr=strstr(sched_params, "bf_max_job_test="))) max_sched_job_cnt = atoi(tmp_ptr + 16); if (max_sched_job_cnt < 1) { error("Invalid SchedulerParameters bf_max_job_test: %d", max_sched_job_cnt); max_sched_job_cnt = 50; } xfree(sched_params); select_type = slurm_get_select_type(); if (!xstrcmp(select_type, "select/serial")) { /* Do not spend time computing expected start time for * pending jobs */ max_sched_job_cnt = 0; stop_builtin_agent(); } xfree(select_type); }