@@ -819,34 +819,34 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
819
819
global_split_type = tmp [0 ];
820
820
821
821
if (tmp [0 ] != - tmp [1 ] || inter ) {
822
- /* at least one rank supplied a different split type check if our split_type is ok */
823
- ok = (MPI_UNDEFINED == split_type ) || global_split_type == split_type ;
824
-
825
- rc = comm -> c_coll .coll_allreduce (MPI_IN_PLACE , & ok , 1 , MPI_INT , MPI_MIN , comm ,
826
- comm -> c_coll .coll_allgather_module );
827
- if (OPAL_UNLIKELY (OMPI_SUCCESS != rc )) {
828
- return rc ;
829
- }
830
-
831
- if (inter ) {
832
- /* need an extra allreduce to ensure that all ranks have the same result */
833
- rc = comm -> c_coll .coll_allreduce (MPI_IN_PLACE , & ok , 1 , MPI_INT , MPI_MIN , comm ,
834
- comm -> c_coll .coll_allgather_module );
835
- if (OPAL_UNLIKELY (OMPI_SUCCESS != rc )) {
836
- return rc ;
837
- }
838
- }
839
-
840
- if (OPAL_UNLIKELY (!ok )) {
841
- return OMPI_ERR_BAD_PARAM ;
842
- }
843
-
844
- need_split = tmp [0 ] == - tmp [1 ];
822
+ /* at least one rank supplied a different split type check if our split_type is ok */
823
+ ok = (MPI_UNDEFINED == split_type ) || global_split_type == split_type ;
824
+
825
+ rc = comm -> c_coll .coll_allreduce (MPI_IN_PLACE , & ok , 1 , MPI_INT , MPI_MIN , comm ,
826
+ comm -> c_coll .coll_allgather_module );
827
+ if (OPAL_UNLIKELY (OMPI_SUCCESS != rc )) {
828
+ return rc ;
829
+ }
830
+
831
+ if (inter ) {
832
+ /* need an extra allreduce to ensure that all ranks have the same result */
833
+ rc = comm -> c_coll .coll_allreduce (MPI_IN_PLACE , & ok , 1 , MPI_INT , MPI_MIN , comm ,
834
+ comm -> c_coll .coll_allgather_module );
835
+ if (OPAL_UNLIKELY (OMPI_SUCCESS != rc )) {
836
+ return rc ;
837
+ }
838
+ }
839
+
840
+ if (OPAL_UNLIKELY (!ok )) {
841
+ return OMPI_ERR_BAD_PARAM ;
842
+ }
843
+
844
+ need_split = tmp [0 ] == - tmp [1 ];
845
845
} else {
846
- /* intracommunicator and all ranks specified the same split type */
847
- no_undefined = true;
848
- /* check if all ranks specified the same key */
849
- no_reorder = tmp [2 ] == - tmp [3 ];
846
+ /* intracommunicator and all ranks specified the same split type */
847
+ no_undefined = true;
848
+ /* check if all ranks specified the same key */
849
+ no_reorder = tmp [2 ] == - tmp [3 ];
850
850
}
851
851
852
852
if (MPI_UNDEFINED == global_split_type ) {
@@ -863,18 +863,18 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
863
863
/* --------------------------------------------------------- */
864
864
865
865
/* allowed splitting types:
866
- CLUSTER
867
- CU
868
- HOST
869
- BOARD
870
- NODE
871
- NUMA
872
- SOCKET
873
- L3CACHE
874
- L2CACHE
875
- L1CACHE
876
- CORE
877
- HWTHREAD
866
+ CLUSTER
867
+ CU
868
+ HOST
869
+ BOARD
870
+ NODE
871
+ NUMA
872
+ SOCKET
873
+ L3CACHE
874
+ L2CACHE
875
+ L1CACHE
876
+ CORE
877
+ HWTHREAD
878
878
Even though HWTHREAD/CORE etc. is overkill they are here for consistency.
879
879
They will most likely return a communicator which is equal to MPI_COMM_SELF
880
880
Unless oversubscribing.
@@ -924,14 +924,14 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
924
924
}
925
925
926
926
/* Step 5: Check if we need to remove or reorder ranks in the communicator */
927
- if (!(no_reorder && no_undefined )) {
928
- rc = ompi_comm_split_verify (newcomp , split_type , key , & need_split );
929
-
930
- if (inter ) {
931
- /* verify that no local ranks need to be removed or reordered */
932
- rc = ompi_comm_split_verify (newcomp -> c_local_comm , split_type , key , & need_split );
933
- }
934
- }
927
+ if (!(no_reorder && no_undefined )) {
928
+ rc = ompi_comm_split_verify (newcomp , split_type , key , & need_split );
929
+
930
+ if (inter ) {
931
+ /* verify that no local ranks need to be removed or reordered */
932
+ rc = ompi_comm_split_verify (newcomp -> c_local_comm , split_type , key , & need_split );
933
+ }
934
+ }
935
935
936
936
if (!need_split ) {
937
937
/* common case. no reordering and no MPI_UNDEFINED */
0 commit comments