diff --git a/src/mca/llm/hostfile/src/llm_hostfile_component.c b/src/mca/llm/hostfile/src/llm_hostfile_component.c index 73fe619842..1983a74c42 100644 --- a/src/mca/llm/hostfile/src/llm_hostfile_component.c +++ b/src/mca/llm/hostfile/src/llm_hostfile_component.c @@ -51,6 +51,7 @@ const mca_llm_base_component_1_0_0_t mca_llm_hostfile_component = { * component variables handles */ static int param_filename; +static int param_filename_deprecated; static int param_priority; int @@ -58,10 +59,12 @@ mca_llm_hostfile_component_open(void) { char *default_path = ompi_os_path(false, OMPI_SYSCONFDIR, "openmpi-default-hostfile", NULL); + /* accept either OMPI_MCA_llm_hostfile_hostfile or + OMPI_MCA_hostfile */ param_filename = mca_base_param_register_string("llm", "hostfile", "hostfile", - NULL, + "hostfile", default_path); if (NULL != default_path) free(default_path); diff --git a/src/tools/mpirun/mpirun.c b/src/tools/mpirun/mpirun.c index a4dfbc0a42..7293f69294 100644 --- a/src/tools/mpirun/mpirun.c +++ b/src/tools/mpirun/mpirun.c @@ -151,6 +151,18 @@ main(int argc, char *argv[]) return ret; } + /* get our hostfile, if we have one */ + if (ompi_cmd_line_is_taken(cmd_line, "hostfile")) { + /* BWB - XXX - fix me. We really should be setting this via + * an API rather than setenv. But we don't have such an API just + * yet. */ + char *buf = NULL; + asprintf(&buf, "OMPI_MCA_hostfile=%s", + ompi_cmd_line_get_param(cmd_line, "hostfile", 0, 0)); + /* yeah, it leaks. Can't do nothin' about that */ + putenv(buf); + } + /* get our numprocs */ if (ompi_cmd_line_is_taken(cmd_line, "np")) { num_procs = atoi(ompi_cmd_line_get_param(cmd_line, "np", 0, 0));