MPI bugfix for dump netcdf from Paul Coffman
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user