diff --git a/src/NETCDF/dump_netcdf_mpiio.cpp b/src/NETCDF/dump_netcdf_mpiio.cpp index 2407678386..fe65ccae18 100644 --- a/src/NETCDF/dump_netcdf_mpiio.cpp +++ b/src/NETCDF/dump_netcdf_mpiio.cpp @@ -639,8 +639,8 @@ void DumpNetCDFMPIIO::write() nme = count(); int *block_sizes = new int[comm->nprocs]; MPI_Allgather(&nme, 1, MPI_INT, block_sizes, 1, MPI_INT, world); - blocki = 0; - for (int i = 0; i < comm->me; i++) blocki += block_sizes[i]; + blocki = (MPI_Offset) 0; + for (int i = 0; i < comm->me; i++) blocki += (MPI_Offset) (block_sizes[i]); delete[] block_sizes; // ensure buf is sized for packing and communicating diff --git a/src/NETCDF/dump_netcdf_mpiio.h b/src/NETCDF/dump_netcdf_mpiio.h index 14ee930e26..004c5fb209 100644 --- a/src/NETCDF/dump_netcdf_mpiio.h +++ b/src/NETCDF/dump_netcdf_mpiio.h @@ -49,11 +49,11 @@ class DumpNetCDFMPIIO : public DumpCustom { int quantity; // type of the quantity }; - int framei; // current frame index - int blocki; // current block index + MPI_Offset framei; // current frame index + MPI_Offset blocki; // current block index int ndata; // number of data blocks to expect - bigint ntotalgr; // # of atoms + MPI_Offset ntotalgr; // # of atoms int n_perat; // # of netcdf per-atom properties nc_perat_t *perat; // per-atom properties