|
9 | 9 | * University of Stuttgart. All rights reserved. |
10 | 10 | * Copyright (c) 2004-2005 The Regents of the University of California. |
11 | 11 | * All rights reserved. |
12 | | - * Copyright (c) 2006-2018 Cisco Systems, Inc. All rights reserved |
| 12 | + * Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved |
13 | 13 | * Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights |
14 | 14 | * reserved. |
15 | 15 | * Copyright (c) 2014-2017 Intel, Inc. All rights reserved. |
@@ -272,14 +272,6 @@ static void launch_daemons(int fd, short args, void *cbdata) |
272 | 272 | opal_argv_append(&argc, &argv, "--kill-on-bad-exit"); |
273 | 273 | } |
274 | 274 |
|
275 | | - /* ensure the orteds are not bound to a single processor, |
276 | | - * just in case the TaskAffinity option is set by default. |
277 | | - * This will *not* release the orteds from any cpu-set |
278 | | - * constraint, but will ensure it doesn't get |
279 | | - * bound to only one processor |
280 | | - */ |
281 | | - opal_argv_append(&argc, &argv, "--cpu_bind=none"); |
282 | | - |
283 | 275 | #if SLURM_CRAY_ENV |
284 | 276 | /* |
285 | 277 | * If in a SLURM/Cray env. make sure that Cray PMI is not pulled in, |
@@ -420,6 +412,23 @@ static void launch_daemons(int fd, short args, void *cbdata) |
420 | 412 | /* setup environment */ |
421 | 413 | env = opal_argv_copy(orte_launch_environ); |
422 | 414 |
|
| 415 | + /* ensure the orteds are not bound to a single processor, |
| 416 | + * just in case the TaskAffinity option is set by default. |
| 417 | + * This will *not* release the orteds from any cpu-set |
| 418 | + * constraint, but will ensure it doesn't get |
| 419 | + * bound to only one processor |
| 420 | + * |
| 421 | + * NOTE: We used to pass --cpu_bind=none on the command line. But |
| 422 | + * SLURM 19 changed this to --cpu-bind. There is no easy way to |
| 423 | + * test at run time which of these two parameters is used (see |
| 424 | + * https://github.com/open-mpi/ompi/pull/6654). There was |
| 425 | + * discussion of using --test-only to see which one works, but |
| 426 | + * --test-only is only effective if you're not already inside a |
| 427 | + * SLURM allocation. Instead, set the env var SLURM_CPU_BIND to |
| 428 | + * "none", which should do the same thing as --cpu*bind=none. |
| 429 | + */ |
| 430 | + opal_setenv("SLURM_CPU_BIND", "none", true, &env); |
| 431 | + |
423 | 432 | if (0 < opal_output_get_verbosity(orte_plm_base_framework.framework_output)) { |
424 | 433 | param = opal_argv_join(argv, ' '); |
425 | 434 | opal_output(orte_plm_base_framework.framework_output, |
|
0 commit comments