Skip to content

Commit 413ff22

Browse files
committed
Provide an MCA param to control hwloc shmem sharing
There are times when it can be beneficial to separate the hwloc topology memory images between PRRTE and applications it might be running. Provide an MCA param to indicate that the topology should not be shared via shmem. Default it to true (i.e., the topology shall be shared in memory). Signed-off-by: Ralph Castain <[email protected]>
1 parent 64f2921 commit 413ff22

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/prted/pmix/pmix_server.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ static void modex_resp(pmix_status_t status, char *data, size_t sz, void *cbdata
386386
static bool remote_connections_specified = false;
387387
static char *remote_cncts = NULL;
388388
static char *generate_dist = "fabric,gpu,network";
389+
static bool share_hwloc_memory = true;
390+
389391
void pmix_server_register_params(void)
390392
{
391393
int i;
@@ -498,6 +500,10 @@ void pmix_server_register_params(void)
498500
PMIX_MCA_BASE_VAR_TYPE_BOOL,
499501
&prte_pmix_server_globals.system_controller);
500502

503+
(void) pmix_mca_base_var_register("prte", "pmix", NULL, "hwloc_shared_memory",
504+
"Whether or not to share HWLOC topology via shared memory",
505+
PMIX_MCA_BASE_VAR_TYPE_BOOL,
506+
&share_hwloc_memory);
501507
}
502508

503509
static void timeout_cbfunc(int sd, short args, void *cbdata)
@@ -709,7 +715,8 @@ int pmix_server_init(void)
709715
return rc;
710716
}
711717
// tell the server to share this topology for us
712-
PMIX_INFO_LIST_ADD(prc, ilist, PMIX_SERVER_SHARE_TOPOLOGY, NULL, PMIX_BOOL);
718+
PMIX_INFO_LIST_ADD(prc, ilist, PMIX_SERVER_SHARE_TOPOLOGY,
719+
(void*)&share_hwloc_memory, PMIX_BOOL);
713720
if (PMIX_SUCCESS != prc) {
714721
PMIX_INFO_LIST_RELEASE(ilist);
715722
rc = prte_pmix_convert_status(prc);

0 commit comments

Comments
 (0)