@@ -585,9 +585,11 @@ int ompi_rte_init(int *pargc, char ***pargv)
585
585
/* just assume 0 */
586
586
u16 = 0 ;
587
587
} else {
588
- ret = opal_pmix_convert_status (rc );
589
- error = "node rank" ;
590
- goto error ;
588
+ /* we may be in an environment that doesn't quite adhere
589
+ * to the Standard - we can safely assume it is the same
590
+ * as the local rank as such environments probably aren't
591
+ * going to care */
592
+ u16 = opal_process_info .my_local_rank ;
591
593
}
592
594
}
593
595
opal_process_info .my_node_rank = u16 ;
@@ -704,10 +706,6 @@ int ompi_rte_init(int *pargc, char ***pargv)
704
706
& pname , & u32ptr , PMIX_UINT32 );
705
707
if (PMIX_SUCCESS == rc ) {
706
708
opal_process_info .num_local_peers = u32 - 1 ; // want number besides ourselves
707
- } else {
708
- ret = opal_pmix_convert_status (rc );
709
- error = "local size" ;
710
- goto error ;
711
709
}
712
710
713
711
/* retrieve temp directories info */
@@ -777,28 +775,27 @@ int ompi_rte_init(int *pargc, char ***pargv)
777
775
opal_process_info .proc_is_bound = false;
778
776
}
779
777
780
- /* get our local peers */
781
- if (0 < opal_process_info .num_local_peers ) {
782
- /* if my local rank if too high, then that's an error */
783
- if (opal_process_info .num_local_peers < opal_process_info .my_local_rank ) {
784
- ret = OPAL_ERR_BAD_PARAM ;
785
- error = "num local peers" ;
786
- goto error ;
787
- }
788
- /* retrieve the local peers - defaults to local node */
789
- val = NULL ;
790
- OPAL_MODEX_RECV_VALUE (rc , PMIX_LOCAL_PEERS ,
791
- & pname , & val , PMIX_STRING );
792
- if (PMIX_SUCCESS == rc && NULL != val ) {
793
- peers = opal_argv_split (val , ',' );
794
- free (val );
795
- } else {
796
- ret = opal_pmix_convert_status (rc );
797
- error = "local peers" ;
798
- goto error ;
799
- }
778
+ /* retrieve the local peers - defaults to local node */
779
+ val = NULL ;
780
+ OPAL_MODEX_RECV_VALUE (rc , PMIX_LOCAL_PEERS ,
781
+ & pname , & val , PMIX_STRING );
782
+ if (PMIX_SUCCESS == rc && NULL != val ) {
783
+ peers = opal_argv_split (val , ',' );
784
+ free (val );
800
785
} else {
801
- peers = NULL ;
786
+ ret = opal_pmix_convert_status (rc );
787
+ error = "local peers" ;
788
+ goto error ;
789
+ }
790
+ /* if we were unable to retrieve the #local peers, set it here */
791
+ if (0 == opal_process_info .num_local_peers ) {
792
+ opal_process_info .num_local_peers = opal_argv_count (peers ) - 1 ;
793
+ }
794
+ /* if my local rank if too high, then that's an error */
795
+ if (opal_process_info .num_local_peers < opal_process_info .my_local_rank ) {
796
+ ret = OPAL_ERR_BAD_PARAM ;
797
+ error = "num local peers" ;
798
+ goto error ;
802
799
}
803
800
804
801
/* set the locality */
0 commit comments