|
15 | 15 | * Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
|
16 | 16 | * reserved.
|
17 | 17 | * 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. |
19 | 19 | * $COPYRIGHT$
|
20 | 20 | */
|
21 | 21 | #include "ompi_config.h"
|
@@ -848,19 +848,21 @@ int ompi_rte_init(int *pargc, char ***pargv)
|
848 | 848 |
|
849 | 849 | /* retrieve the local peers - defaults to local node */
|
850 | 850 | 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); |
853 | 853 | if (PMIX_SUCCESS == rc && NULL != val) {
|
854 | 854 | peers = opal_argv_split(val, ',');
|
855 | 855 | free(val);
|
856 | 856 | } else {
|
857 |
| - ret = opal_pmix_convert_status(rc); |
858 |
| - error = "local peers"; |
859 |
| - goto error; |
| 857 | + peers = NULL; |
860 | 858 | }
|
861 | 859 | /* if we were unable to retrieve the #local peers, set it here */
|
862 | 860 | 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 | + } |
864 | 866 | }
|
865 | 867 | /* if my local rank if too high, then that's an error */
|
866 | 868 | if (opal_process_info.num_local_peers < opal_process_info.my_local_rank) {
|
|
0 commit comments