From 8c03f510203f3aebd9b2e44854b904477711d438 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Apr 2019 09:01:39 -0400 Subject: [PATCH] fix 32-bit/64-bit overflow issue in expression --- src/irregular.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/irregular.cpp b/src/irregular.cpp index 848d853f2a..1865f9cbf6 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -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; } /* ----------------------------------------------------------------------