diff --git a/src/read_data.cpp b/src/read_data.cpp index f74314e9ba..c97be2fdff 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -733,7 +733,8 @@ void ReadData::bodies() bigint natoms = nbodies; while (nread < natoms) { - nchunk = MIN(natoms-nread,CHUNK); + if (natoms-nread > CHUNK) nmax = CHUNK; + else nmax = natoms-nread; if (me == 0) { nchunk = 0;