Skip to content

Commit 8d77a83

Browse files
committed
some additional rebase cleanup
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 622f4a9 commit 8d77a83

File tree

3 files changed

+33
-38
lines changed

3 files changed

+33
-38
lines changed

ompi/mca/coll/libnbc/nbc_ialltoall.c

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -77,40 +77,39 @@ static int nbc_alltoall_init(const void* sendbuf, int sendcount, MPI_Datatype se
7777
rank = ompi_comm_rank (comm);
7878
p = ompi_comm_size (comm);
7979

80+
res = ompi_datatype_type_extent(sendtype, &sndext);
81+
if (MPI_SUCCESS != res) {
82+
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
83+
return res;
84+
}
85+
8086
res = ompi_datatype_type_extent(recvtype, &rcvext);
8187
if (MPI_SUCCESS != res) {
8288
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
8389
return res;
8490
}
8591

92+
res = ompi_datatype_type_size(sendtype, &sndsize);
93+
if (MPI_SUCCESS != res) {
94+
NBC_Error("MPI Error in ompi_datatype_type_size() (%i)", res);
95+
return res;
96+
}
97+
98+
/* algorithm selection */
99+
a2asize = sndsize * sendcount * p;
100+
/* this number is optimized for TCP on odin.cs.indiana.edu */
86101
if (inplace) {
87102
alg = NBC_A2A_INPLACE;
88-
} else {
89-
/* algorithm selection */
90-
res = ompi_datatype_type_extent(sendtype, &sndext);
91-
if (MPI_SUCCESS != res) {
92-
NBC_Error("MPI Error in ompi_datatype_type_extent() (%i)", res);
93-
return res;
94-
}
95-
res = ompi_datatype_type_size(sendtype, &sndsize);
96-
if (MPI_SUCCESS != res) {
97-
NBC_Error("MPI Error in ompi_datatype_type_size() (%i)", res);
98-
return res;
99-
}
100-
101-
a2asize = sndsize * sendcount * p;
102-
/* this number is optimized for TCP on odin.cs.indiana.edu */
103-
if((p <= 8) && ((a2asize < 1<<17) || (sndsize*sendcount < 1<<12))) {
104-
/* just send as fast as we can if we have less than 8 peers, if the
105-
* total communicated size is smaller than 1<<17 *and* if we don't
106-
* have eager messages (msgsize < 1<<13) */
107-
alg = NBC_A2A_LINEAR;
108-
} else if(a2asize < (1<<12)*(unsigned int)p) {
109-
/*alg = NBC_A2A_DISS;*/
110-
alg = NBC_A2A_LINEAR;
111-
} else
112-
alg = NBC_A2A_LINEAR; /*NBC_A2A_PAIRWISE;*/
113-
}
103+
} else if((p <= 8) && ((a2asize < 1<<17) || (sndsize*sendcount < 1<<12))) {
104+
/* just send as fast as we can if we have less than 8 peers, if the
105+
* total communicated size is smaller than 1<<17 *and* if we don't
106+
* have eager messages (msgsize < 1<<13) */
107+
alg = NBC_A2A_LINEAR;
108+
} else if(a2asize < (1<<12)*(unsigned int)p) {
109+
/*alg = NBC_A2A_DISS;*/
110+
alg = NBC_A2A_LINEAR;
111+
} else
112+
alg = NBC_A2A_LINEAR; /*NBC_A2A_PAIRWISE;*/
114113

115114
/* allocate temp buffer if we need one */
116115
if (alg == NBC_A2A_INPLACE) {

ompi/mpi/c/bcast.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,12 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype,
7676
FUNC_NAME);
7777
}
7878

79-
/* Errors for all involved ranks */
79+
/* Errors for all ranks */
8080

81-
if (OMPI_COMM_IS_INTRA(comm) || MPI_PROC_NULL != root) {
82-
OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
83-
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
84-
if (MPI_IN_PLACE == buffer) {
81+
OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
82+
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
83+
if (MPI_IN_PLACE == buffer) {
8584
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
86-
}
8785
}
8886

8987
/* Errors for intracommunicators */

ompi/mpi/c/ibcast.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,12 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype,
7070
FUNC_NAME);
7171
}
7272

73-
/* Errors for all involved ranks */
73+
/* Errors for all ranks */
7474

75-
if (OMPI_COMM_IS_INTRA(comm) || MPI_PROC_NULL != root) {
76-
OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
77-
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
78-
if (MPI_IN_PLACE == buffer) {
75+
OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
76+
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
77+
if (MPI_IN_PLACE == buffer) {
7978
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
80-
}
8179
}
8280

8381
/* Errors for intracommunicators */

0 commit comments

Comments
 (0)