Skip to content

Commit

Permalink
plugin: set hwloc.xmlfile shell option
Browse files Browse the repository at this point in the history
Problem: flux-pmix does not yet share hwloc with MPI, which
forces MPI to go looking for it, sometimes at great cost
to performance.

For the time being, tell flux-core to share a hwloc xml
file by setting the -o hwloc.xmlfile shell option.

Later we will want to fix flux-framework#31 properly and drop this.
  • Loading branch information
garlick committed Feb 5, 2024
1 parent eff13f6 commit c2b2293
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/shell/plugins/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,14 @@ int flux_plugin_init (flux_plugin_t *p)

shell_debug ("server is enabled");

/* flux-pmix does not yet share hwloc with MPI, which forces MPI to
* go looking for it, sometimes at great cost to performance.
* Until we can address flux-framework/flux-pmix#31 properly,
* tell flux-core to share a hwloc xml file instead.
*/
if (flux_shell_setopt_pack (shell, "hwloc", "{s:i}", "xmlfile", 1) < 0)
shell_warn ("unable to set Flux hwloc.xmlfile shell option");

if (flux_plugin_add_handler (p, "shell.init", px_init, NULL) < 0
|| flux_plugin_add_handler (p, "task.init", px_task_init, NULL) < 0) {
return -1;
Expand Down

0 comments on commit c2b2293

Please sign in to comment.