With TaskPlugin=task/affinity (using hwloc), when I launch a job with
--cpu_bind=none, the job still gets launched explicitly bound to CPUs. Looking
at src/plugins/task/affinity/dist_tasks.c, it seems like this behavior is
by-design in lllp_distribution(). However, I really wanted --cpu_bind=none to
make the TaskPlugin work like task/none (and just let the OS take care of
resource management).
I made the following change to lllp_distribution() in
src/plugins/task/affinity/dist_tasks.c to keep jobs from launching bound to
CPUs when --cpu_bind=none:
*** dist_tasks.c_orig 2012-07-11 09:44:48.298620129 -0700
--- dist_tasks.c 2012-07-11 09:46:14.318395335 -0700
***************
*** 304,309 ****
--- 304,313 ----
CPU_BIND_LDMASK | CPU_BIND_LDRANK |
CPU_BIND_LDMAP;
+ if (req->cpu_bind_type & CPU_BIND_NONE) {
+ return;
+ }
+
if (req->cpu_bind_type & bind_mode) {
/* Explicit step binding specified by user */
char *avail_mask = _alloc_mask(req,
This change seems to work without causing any problems.
Two questions, though-
Does this change break anything that I might need later (i.e. MPI)?
What is the reasoning behind changing cpu_bind_type CPU_BIND_NONE to
CPU_BIND_MASK and launching with explicit CPU binding in lllp_distribution()?
Thanks,
Phil