fix 32-bit/64-bit overflow issue in expression

This commit is contained in:
Axel Kohlmeyer 2019-04-04 09:01:39 -04:00
parent f73ccc3025
commit 8c03f51020
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 1 additions and 8 deletions

View File

@ -921,7 +921,7 @@ void Irregular::exchange_data(char *sendbuf, int nbytes, char *recvbuf)
// post all receives, starting after self copies
bigint offset = num_self*nbytes;
bigint offset = num_self*(bigint)nbytes;
for (int irecv = 0; irecv < nrecv_proc; irecv++) {
MPI_Irecv(&recvbuf[offset],num_recv[irecv]*nbytes,MPI_CHAR,
proc_recv[irecv],0,world,&request[irecv]);
@ -964,13 +964,6 @@ void Irregular::exchange_data(char *sendbuf, int nbytes, char *recvbuf)
// wait on all incoming messages
if (nrecv_proc) MPI_Waitall(nrecv_proc,request,status);
// approximate memory tally
// DEBUG lines
//bigint irregular_bytes = 2*nprocs*sizeof(int);
//irregular_bytes += maxindex*sizeof(int);
//irregular_bytes += maxbuf;
}
/* ----------------------------------------------------------------------