|
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"
|
@@ -843,19 +843,21 @@ int ompi_rte_init(int *pargc, char ***pargv)
|
843 | 843 |
|
844 | 844 | /* retrieve the local peers - defaults to local node */
|
845 | 845 | val = NULL;
|
846 |
| - OPAL_MODEX_RECV_VALUE(rc, PMIX_LOCAL_PEERS, |
847 |
| - &pname, &val, PMIX_STRING); |
| 846 | + OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_LOCAL_PEERS, |
| 847 | + &pname, &val, PMIX_STRING); |
848 | 848 | if (PMIX_SUCCESS == rc && NULL != val) {
|
849 | 849 | peers = opal_argv_split(val, ',');
|
850 | 850 | free(val);
|
851 | 851 | } else {
|
852 |
| - ret = opal_pmix_convert_status(rc); |
853 |
| - error = "local peers"; |
854 |
| - goto error; |
| 852 | + peers = NULL; |
855 | 853 | }
|
856 | 854 | /* if we were unable to retrieve the #local peers, set it here */
|
857 | 855 | if (0 == opal_process_info.num_local_peers) {
|
858 |
| - opal_process_info.num_local_peers = opal_argv_count(peers) - 1; |
| 856 | + if (NULL != peers) { |
| 857 | + opal_process_info.num_local_peers = opal_argv_count(peers) - 1; |
| 858 | + } else { |
| 859 | + opal_process_info.num_local_peers = 1; |
| 860 | + } |
859 | 861 | }
|
860 | 862 | /* if my local rank if too high, then that's an error */
|
861 | 863 | if (opal_process_info.num_local_peers < opal_process_info.my_local_rank) {
|
|
0 commit comments