1
/*****************************************************************************\
4
* $Id: select_cons_res.h,v 1.3 2006/10/31 20:01:38 palermo Exp $
5
*****************************************************************************
6
* Copyright (C) 2006 Hewlett-Packard Development Company, L.P.
7
* Written by Susanne M. Balle, <susanne.balle@hp.com>
8
* CODE-OCEC-09-009. All rights reserved.
10
* This file is part of SLURM, a resource management program.
11
* For details, see <https://computing.llnl.gov/linux/slurm/>.
12
* Please also read the included file: DISCLAIMER.
14
* SLURM is free software; you can redistribute it and/or modify it under
15
* the terms of the GNU General Public License as published by the Free
16
* Software Foundation; either version 2 of the License, or (at your option)
19
* In addition, as a special exception, the copyright holders give permission
20
* to link the code of portions of this program with the OpenSSL library under
21
* certain conditions as described in each individual source file, and
22
* distribute linked combinations including the two. You must obey the GNU
23
* General Public License in all respects for all of the code used other than
24
* OpenSSL. If you modify file(s) with this exception, you may extend this
25
* exception to your version of the file(s), but you are not obligated to do
26
* so. If you do not wish to do so, delete this exception statement from your
27
* version. If you delete this exception statement from all source files in
28
* the program, then also delete it here.
30
* SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
31
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
32
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
35
* You should have received a copy of the GNU General Public License along
36
* with SLURM; if not, write to the Free Software Foundation, Inc.,
37
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
38
\*****************************************************************************/
40
#ifndef _CR_JOB_TEST_H
41
#define _CR_JOB_TEST_H
46
#include <slurm/slurm.h>
47
#include <slurm/slurm_errno.h>
49
#include "src/common/list.h"
50
#include "src/common/log.h"
51
#include "src/common/node_select.h"
52
#include "src/common/pack.h"
53
#include "src/common/slurm_protocol_api.h"
54
#include "src/common/xassert.h"
55
#include "src/common/xmalloc.h"
56
#include "src/common/xstring.h"
57
#include "src/common/slurm_resource_info.h"
58
#include "src/slurmctld/slurmctld.h"
61
/* _job_test - does most of the real work for select_p_job_test(), which
62
* pretty much just handles load-leveling and max_share logic */
63
int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap,
64
uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes,
65
int mode, select_type_plugin_info_t cr_type,
66
enum node_cr_state job_node_req, uint32_t cr_node_cnt,
67
struct part_res_record *cr_part_ptr,
68
struct node_use_record *node_usage);
70
#endif /* !_CR_JOB_TEST_H */