@@ -819,34 +819,34 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
819819 global_split_type = tmp [0 ];
820820
821821 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 ];
845845 } 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 ];
850850 }
851851
852852 if (MPI_UNDEFINED == global_split_type ) {
@@ -863,18 +863,18 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
863863 /* --------------------------------------------------------- */
864864
865865 /* 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
878878 Even though HWTHREAD/CORE etc. is overkill they are here for consistency.
879879 They will most likely return a communicator which is equal to MPI_COMM_SELF
880880 Unless oversubscribing.
@@ -924,14 +924,14 @@ int ompi_comm_split_type (ompi_communicator_t *comm, int split_type, int key,
924924 }
925925
926926 /* 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+ }
935935
936936 if (!need_split ) {
937937 /* common case. no reordering and no MPI_UNDEFINED */
0 commit comments