diff --git a/NEWS b/NEWS index ae1cc82078946a3ec4543c65ae8180fea0e43556..ca5dc02b88ee9ac7e45e74e5f7ccd500cfa11e3f 100644 --- a/NEWS +++ b/NEWS @@ -354,6 +354,7 @@ documents those changes that are of interest to users and administrators. -- ALPS - Fix --ntasks-per-core option on multiple nodes. -- Double max string that Slurm can pack from 16MB to 32MB to support larger MPI2 configurations. + -- Fix Centos5 compile issues. * Changes in Slurm 14.03.10 =========================== diff --git a/src/plugins/task/affinity/affinity.c b/src/plugins/task/affinity/affinity.c index 49a04759d542310544938efd166ec1f79135f504..43730e54bc1a7b0dd0156a93bd86e13e8f67349f 100644 --- a/src/plugins/task/affinity/affinity.c +++ b/src/plugins/task/affinity/affinity.c @@ -36,6 +36,26 @@ #include "affinity.h" +/* Older versions of sched.h (ie. Centos5) don't include CPU_OR. */ +#ifndef CPU_OR + +#ifndef CPU_OP_S +# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \ + (__extension__ \ + ({ cpu_set_t *__dest = (destset); \ + const __cpu_mask *__arr1 = (srcset1)->__bits; \ + const __cpu_mask *__arr2 = (srcset2)->__bits; \ + size_t __imax = (setsize) / sizeof (__cpu_mask); \ + size_t __i; \ + for (__i = 0; __i < __imax; ++__i) \ + ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \ + __dest; })) +#endif + +# define CPU_OR(destset, srcset1, srcset2) \ + __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |) +#endif + static int is_power = -1; void slurm_chkaffinity(cpu_set_t *mask, stepd_step_rec_t *job, int statval) diff --git a/src/plugins/task/cray/task_cray.c b/src/plugins/task/cray/task_cray.c index 3a2270897944c011e5d251e3e128f36d2a1f0839..7ababe4af2ac31ded372ac331b84179855b7995e 100644 --- a/src/plugins/task/cray/task_cray.c +++ b/src/plugins/task/cray/task_cray.c @@ -100,12 +100,12 @@ const char plugin_name[] = "task CRAY plugin"; const char plugin_type[] = "task/cray"; const uint32_t plugin_version = 100; +#ifdef HAVE_NATIVE_CRAY #ifdef HAVE_NUMA // TODO: Remove this prototype once the prototype appears in numa.h. unsigned int numa_bitmask_weight(const struct bitmask *bmp); #endif -#ifdef HAVE_NATIVE_CRAY static void _alpsc_debug(const char *file, int line, const char *func, int rc, int expected_rc, const char *alpsc_func, char *err_msg);