From 73c2e82c1cea857785aa8a7ab224b51011943e15 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 4 Dec 2006 17:09:51 +0000 Subject: [PATCH] Validate product of socket*core*thread count on node registration rather than individual values. Correct values will need to be specified in slurm.conf with FastSchedule=1 for correct multi-core scheduling behavior. --- NEWS | 3 +++ src/slurmctld/node_mgr.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/NEWS b/NEWS index 8a03efa9f25..fe91b8a7c88 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ documents those changes that are of interest to users and admins. ============================= -- Fix for select/cons_res state preservation over slurmctld restart, patch.1.2.0-pre7.061130.cr_state from Dan Palermo. + -- Validate product of socket*core*thread count on node registration rather + than individual values. Correct values will need to be specified in slurm.conf + with FastSchedule=1 for correct multi-core scheduling behavior. * Changes in SLURM 1.2.0-pre8 ============================= diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index d8c1cc8961a..9bda8135ce7 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -1170,6 +1170,10 @@ validate_node_specs (char *node_name, uint16_t cpus, config_ptr = node_ptr->config_ptr; error_code = 0; +#if 0 + /* Testing the socket, core, and thread count here can produce + * an error if the user did not specify the values on slurm.conf + * for a multi-core system */ if ((slurmctld_conf.fast_schedule != 2) && (sockets < config_ptr->sockets)) { error("Node %s has low socket count %u", node_name, sockets); @@ -1193,6 +1197,23 @@ validate_node_specs (char *node_name, uint16_t cpus, reason_down = "Low thread count"; } node_ptr->threads = threads; +#else + if (slurmctld_conf.fast_schedule != 2) { + int tot1, tot2; + tot1 = sockets * cores * threads; + tot2 = config_ptr->sockets * config_ptr->cores * + config_ptr->threads; + if (tot1 < tot2) { + error("Node %s has low socket*core*thread count %u", + node_name, tot1); + error_code = EINVAL; + reason_down = "Low socket*core*thread count"; + } + } + node_ptr->sockets = sockets; + node_ptr->cores = cores; + node_ptr->threads = threads; +#endif if ((slurmctld_conf.fast_schedule != 2) && (cpus < config_ptr->cpus)) { -- GitLab