From b83863f32fe54aa09ed9710a7d417ad4558e2a72 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Tue, 22 Mar 2011 16:34:15 +0000 Subject: [PATCH] cpuset: Remove support for slurm < 2.1.0 in pam_slurm_cpuset --- cpuset/pam_slurm_cpuset.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/cpuset/pam_slurm_cpuset.c b/cpuset/pam_slurm_cpuset.c index f58df19..e0a3554 100644 --- a/cpuset/pam_slurm_cpuset.c +++ b/cpuset/pam_slurm_cpuset.c @@ -225,26 +225,7 @@ int hostname_hostid (const char *host, const char *nodes) int cpus_on_node (job_info_t *j, const char *host) { -#if ((SLURM_VERSION && SLURM_VERSION >= SLURM_VERSION_NUM(2,1,0)) || \ - SLURM_API_VERSION >= SLURM_VERSION_NUM(21,0,0)) return slurm_job_cpus_allocated_on_node (j->job_resrcs, host); -#else /* SLURM_VERSION < 2.1.0 */ - int i; - int start = 0; - int hostid = hostname_hostid (host, j->nodes); - - if (hostid < 0) - return (-1); - - for (i = 0; i < j->num_cpu_groups; i++) { - if (hostid >= start && hostid < (start + j->cpu_count_reps[i])) - return (j->cpus_per_node[i]); - else - start += j->cpu_count_reps[i]; - } - - return (0); -#endif /* SLURM_VERSION >= 2.1.0 */ } int create_all_job_cpusets (cpuset_conf_t conf, uid_t uid)