Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug of missing braces in 'if' blocks #18

Merged
merged 1 commit into from
Mar 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions libparmetis/gkmpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ int gkMPI_Alltoallv(void *sendbuf, idx_t *sendcounts,
/* bail-out if MPI 3.x cannot handle such large counts */
for (i=0; i<npes; i++) {
if (sendcounts[i] >= INT_MAX || sdispls[i] >= INT_MAX ||
recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX)
recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX) {
errexit("MPI_Gatherv message sizes goes over INT_MAX. Use MPI 4.x\n");
break;
}
}

lsendcounts = gk_imalloc(npes, "lsendcounts");
Expand Down Expand Up @@ -250,9 +251,10 @@ int gkMPI_Allgatherv(void *sendbuf, idx_t sendcount, MPI_Datatype sendtype,

/* bail-out if MPI 3.x cannot handle such large counts */
for (i=0; i<npes; i++) {
if (sendcount >= INT_MAX || recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX)
if (sendcount >= INT_MAX || recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX) {
errexit("MPI_Allgatherv message sizes goes over INT_MAX. Use MPI 4.x\n");
break;
}
}

lrecvcounts = gk_imalloc(npes, "lrecvcounts");
Expand Down Expand Up @@ -302,9 +304,10 @@ int gkMPI_Scatterv(void *sendbuf, idx_t *sendcounts, idx_t *sdispls,

/* bail-out if MPI 3.x cannot handle such large counts */
for (i=0; i<npes; i++) {
if (sendcounts >= INT_MAX || recvcount >= INT_MAX || sdispls[i] >= INT_MAX)
if (sendcounts[i] >= INT_MAX || recvcount >= INT_MAX || sdispls[i] >= INT_MAX) {
errexit("MPI_Scatterv message sizes goes over INT_MAX. Use MPI 4.x\n");
break;
}
}

lsendcounts = gk_imalloc(npes, "lsendcounts");
Expand Down Expand Up @@ -354,9 +357,10 @@ int gkMPI_Gatherv(void *sendbuf, idx_t sendcount, MPI_Datatype sendtype,

/* bail-out if MPI 3.x cannot handle such large counts */
for (i=0; i<npes; i++) {
if (sendcount >= INT_MAX || recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX)
if (sendcount >= INT_MAX || recvcounts[i] >= INT_MAX || rdispls[i] >= INT_MAX) {
errexit("MPI_Gatherv message sizes goes over INT_MAX. Use MPI 4.x\n");
break;
}
}


Expand Down