properly initialize result storage for per-chunk arrays

This commit is contained in:
Axel Kohlmeyer
2022-08-29 12:52:16 -04:00
parent 2f8c370645
commit 37d4c4c7f1

View File

@ -323,7 +323,7 @@ void ComputeReduceChunk::compute_one(int m, double *vchunk, int nstride)
{
// initialize per-chunk values in accumulation vector
for (int i = 0; i < nchunk; i += nstride) vchunk[i] = initvalue;
for (int i = 0; i < nvalues*nchunk; i += nstride) vchunk[i] = initvalue;
// loop over my atoms
// use peratom input and chunk ID of each atom to update vector