1 /*****************************************************************************\ 2 * gang.h - Gang scheduler definitions 3 ***************************************************************************** 4 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 5 * Written by Chris Holmes 6 * CODE-OCEC-09-009. All rights reserved. 7 * 8 * This file is part of Slurm, a resource management program. 9 * For details, see <https://slurm.schedmd.com/>. 10 * Please also read the included file: DISCLAIMER. 11 * 12 * Slurm is free software; you can redistribute it and/or modify it under 13 * the terms of the GNU General Public License as published by the Free 14 * Software Foundation; either version 2 of the License, or (at your option) 15 * any later version. 16 * 17 * In addition, as a special exception, the copyright holders give permission 18 * to link the code of portions of this program with the OpenSSL library under 19 * certain conditions as described in each individual source file, and 20 * distribute linked combinations including the two. You must obey the GNU 21 * General Public License in all respects for all of the code used other than 22 * OpenSSL. If you modify file(s) with this exception, you may extend this 23 * exception to your version of the file(s), but you are not obligated to do 24 * so. If you do not wish to do so, delete this exception statement from your 25 * version. If you delete this exception statement from all source files in 26 * the program, then also delete it here. 27 * 28 * Slurm is distributed in the hope that it will be useful, but WITHOUT ANY 29 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 30 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 31 * details. 32 * 33 * You should have received a copy of the GNU General Public License along 34 * with Slurm; if not, write to the Free Software Foundation, Inc., 35 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 36 \*****************************************************************************/ 37 38 #ifndef __SCHED_GANG_H 39 #define __SCHED_GANG_H 40 41 #include <stdio.h> 42 43 #include "slurm/slurm_errno.h" 44 45 #include "src/common/plugin.h" 46 #include "src/common/log.h" 47 #include "src/slurmctld/job_scheduler.h" 48 #include "src/slurmctld/slurmctld.h" 49 50 /* Initialize data structures and start the gang scheduling thread */ 51 extern void gs_init(void); 52 53 /* Terminate the gang scheduling thread and free its data structures */ 54 extern void gs_fini(void); 55 56 /* Notify the gang scheduler that a job has been resumed or started. 57 * In either case, add the job to gang scheduling. */ 58 extern void gs_job_start(job_record_t *job_ptr); 59 60 /* Notify the gang scheduler that a job has been suspended or completed. 61 * In either case, remove the job from gang scheduling. */ 62 extern void gs_job_fini(job_record_t *job_ptr); 63 64 /* Gang scheduling has been disabled by change in configuration, 65 * resume any suspended jobs */ 66 extern void gs_wake_jobs(void); 67 68 /* Tell gang scheduler that system reconfiguration has been performed 69 * configuration parameters may have changed. Rebuild data structures 70 * from scratch */ 71 extern void gs_reconfig(void); 72 73 #endif 74