Skip to content

Commit 2659da6

Browse files
authored
Merge pull request #10688 from jjhursey/fix-singleton-spawn
Fix Singletons and Singleton Spawn
2 parents c9c9e27 + 16a1fa6 commit 2659da6

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

ompi/dpm/dpm.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
2424
* Copyright (c) 2018-2022 Triad National Security, LLC. All rights
2525
* reserved.
26+
* Copyright (c) 2022 IBM Corporation. All rights reserved.
2627
* $COPYRIGHT$
2728
*
2829
* Additional copyrights may follow
@@ -2042,7 +2043,7 @@ static int start_dvm(char **hostfiles, char **dash_host)
20422043
opal_asprintf(&tmp, "%d", death_pipe[0]);
20432044
opal_argv_append_nosize(&args, tmp);
20442045
free(tmp);
2045-
opal_argv_append_nosize(&args, "&");
2046+
opal_argv_append_nosize(&args, "--daemonize");
20462047

20472048
/* Fork off the child */
20482049
pid = fork();

ompi/runtime/ompi_rte.c

+9-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
1616
* reserved.
1717
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
18-
* Copyright (c) 2021 IBM Corporation. All rights reserved.
18+
* Copyright (c) 2021-2022 IBM Corporation. All rights reserved.
1919
* $COPYRIGHT$
2020
*/
2121
#include "ompi_config.h"
@@ -848,19 +848,21 @@ int ompi_rte_init(int *pargc, char ***pargv)
848848

849849
/* retrieve the local peers - defaults to local node */
850850
val = NULL;
851-
OPAL_MODEX_RECV_VALUE(rc, PMIX_LOCAL_PEERS,
852-
&pname, &val, PMIX_STRING);
851+
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_LOCAL_PEERS,
852+
&pname, &val, PMIX_STRING);
853853
if (PMIX_SUCCESS == rc && NULL != val) {
854854
peers = opal_argv_split(val, ',');
855855
free(val);
856856
} else {
857-
ret = opal_pmix_convert_status(rc);
858-
error = "local peers";
859-
goto error;
857+
peers = NULL;
860858
}
861859
/* if we were unable to retrieve the #local peers, set it here */
862860
if (0 == opal_process_info.num_local_peers) {
863-
opal_process_info.num_local_peers = opal_argv_count(peers) - 1;
861+
if (NULL != peers) {
862+
opal_process_info.num_local_peers = opal_argv_count(peers) - 1;
863+
} else {
864+
opal_process_info.num_local_peers = 1;
865+
}
864866
}
865867
/* if my local rank if too high, then that's an error */
866868
if (opal_process_info.num_local_peers < opal_process_info.my_local_rank) {

0 commit comments

Comments
 (0)