Skip to content

Commit 0e17e5b

Browse files
authored
Merge pull request #7678 from rhc54/topic/nit
Ensure proper handling of default MCA param files
2 parents 0fa7ead + f608575 commit 0e17e5b

File tree

7 files changed

+14
-38
lines changed

7 files changed

+14
-38
lines changed

ompi/runtime/ompi_mpi_finalize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ int ompi_mpi_finalize(void)
276276
ompi_communicator_t *comm = &ompi_mpi_comm_world.comm;
277277
comm->c_coll->coll_barrier(comm, comm->c_coll->coll_barrier_module);
278278

279-
if (PMIX_SUCCESS != (rc = PMIx_Fence(NULL, 0))) {
279+
if (PMIX_SUCCESS != (rc = PMIx_Fence(NULL, 0, NULL, 0))) {
280280
ret = opal_pmix_convert_status(rc);
281281
OMPI_ERROR_LOG(ret);
282282
}

ompi/runtime/ompi_rte.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -755,28 +755,6 @@ int ompi_rte_init(int *pargc, char ***pargv)
755755
opal_process_info.proc_is_bound = false;
756756
}
757757

758-
/* get our numa rank from PMIx */
759-
if (opal_process_info.proc_is_bound) {
760-
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_NUMA_RANK,
761-
&opal_process_info.my_name, &u16ptr, PMIX_UINT16);
762-
if (PMIX_SUCCESS != rc) {
763-
if (ompi_singleton) {
764-
/* just assume the numa_rank is invalid, set to UINT16_MAX */
765-
u16 = UINT16_MAX;
766-
} else {
767-
ret = opal_pmix_convert_status(rc);
768-
error = "numa rank";
769-
goto error;
770-
}
771-
}
772-
opal_process_info.my_numa_rank = u16;
773-
} else {
774-
/* If processes are not bound, the numa_rank is not available
775-
* Assign UINT16_MAX to the numa_rank to indicate an invalid value
776-
*/
777-
opal_process_info.my_numa_rank = UINT16_MAX;
778-
}
779-
780758
/* get our local peers */
781759
if (0 < opal_process_info.num_local_peers) {
782760
/* if my local rank if too high, then that's an error */

opal/mca/base/mca_base_var.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ int mca_base_var_init(void)
297297
return OPAL_ERROR;
298298
}
299299

300+
if( NULL == (cwd = getcwd(NULL, 0) )) {
301+
opal_output(0, "Error: Unable to get the current working directory\n");
302+
cwd = strdup(".");
303+
}
304+
300305
/* Set this before we register the parameter, below */
301306

302307
mca_base_var_initialized = true;
@@ -410,20 +415,15 @@ int mca_base_var_cache_files(bool rel_path_search)
410415
char *tmp;
411416
int ret;
412417

413-
if (NULL == cwd) {
414-
cwd = (char *) malloc(sizeof(char) * MAXPATHLEN);
415-
if( NULL == (cwd = getcwd(cwd, MAXPATHLEN) )) {
416-
opal_output(0, "Error: Unable to get the current working directory\n");
417-
cwd = strdup(".");
418-
}
418+
if (NULL != getenv("OPAL_USER_PARAMS_GIVEN")) {
419+
/* PMIx already provided the params for us */
420+
return OPAL_SUCCESS;
419421
}
420422

421423
#if OPAL_WANT_HOME_CONFIG_FILES
422-
if (NULL == getenv("OPAL_USER_PARAMS_GIVEN")) {
423-
opal_asprintf(&mca_base_var_files, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
424-
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
425-
home, ',', opal_install_dirs.sysconfdir);
426-
}
424+
opal_asprintf(&mca_base_var_files, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
425+
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
426+
home, ',', opal_install_dirs.sysconfdir);
427427
#else
428428
opal_asprintf(&mca_base_var_files, "%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
429429
opal_install_dirs.sysconfdir);

opal/util/proc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ opal_process_info_t opal_process_info = {
4040
.num_local_peers = 0, /* there is nobody else but me */
4141
.my_local_rank = 0, /* I'm the only process around here */
4242
.my_node_rank = 0,
43-
.my_numa_rank = UINT16_MAX, /* Assume numa_rank is unavailable, set to UINT16_MAX */
4443
.cpuset = NULL,
4544
.pid = 0,
4645
.num_procs = 0,

opal/util/proc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ typedef struct opal_process_info_t {
114114
uint32_t num_local_peers; /**< number of procs from my job that share my node with me */
115115
uint16_t my_local_rank; /**< local rank on this node within my job */
116116
uint16_t my_node_rank;
117-
uint16_t my_numa_rank; /**< rank on this processes NUMA node. A value of UINT16_MAX indicates unavailable numa_rank */
118117
char *cpuset; /**< String-representation of bitmap where we are bound */
119118
pid_t pid;
120119
uint32_t num_procs;

0 commit comments

Comments
 (0)