Skip to content

Commit 2911d48

Browse files
authored
Merge pull request #12441 from jiaxiyan/fix_warning
Fix compiler warning
2 parents 79cd4d3 + 5098cc0 commit 2911d48

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ompi/mca/coll/basic/coll_basic_gatherv.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ mca_coll_basic_gatherv_intra(const void *sbuf, int scount,
7676
}
7777

7878
ompi_request_t **reqs;
79-
size_t nrecv = 0, recv_iter = 0;
79+
int nrecv = 0, recv_iter = 0;
8080

8181
for (i = 0; i < size; ++i) {
8282
/* We directly copied the data from self */
@@ -107,13 +107,13 @@ mca_coll_basic_gatherv_intra(const void *sbuf, int scount,
107107
err = ompi_request_wait_all(nrecv, reqs, MPI_STATUSES_IGNORE);
108108

109109
if (MPI_ERR_IN_STATUS == err) {
110-
for (size_t j = 0; j < nrecv; j++) {
111-
if (MPI_REQUEST_NULL == reqs[j])
110+
for (i = 0; i < nrecv; i++) {
111+
if (MPI_REQUEST_NULL == reqs[i])
112112
continue;
113-
if (MPI_ERR_PENDING == reqs[j]->req_status.MPI_ERROR)
113+
if (MPI_ERR_PENDING == reqs[i]->req_status.MPI_ERROR)
114114
continue;
115-
if (MPI_SUCCESS != reqs[j]->req_status.MPI_ERROR) {
116-
err = reqs[j]->req_status.MPI_ERROR;
115+
if (MPI_SUCCESS != reqs[i]->req_status.MPI_ERROR) {
116+
err = reqs[i]->req_status.MPI_ERROR;
117117
break;
118118
}
119119
}

0 commit comments

Comments
 (0)