diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index 9f61657716..28dffb9263 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -237,12 +237,15 @@ void ComputePropertyChunk::allocate() memory->destroy(array); memory->destroy(count_one); memory->destroy(count_all); - size_array_rows = maxchunk = nchunk; + + if (nvalues == 1) size_vector = maxchunk = nchunk; + else size_array_rows = maxchunk = nchunk; if (nvalues == 1) memory->create(vector,maxchunk,"property/chunk:vector"); else memory->create(array,maxchunk,nvalues,"property/chunk:array"); + if (countflag) { memory->create(count_one,maxchunk,"property/chunk:count_one"); - memory->create(count_one,maxchunk,"property/chunk:count_all"); + memory->create(count_all,maxchunk,"property/chunk:count_all"); } } @@ -257,7 +260,6 @@ double ComputePropertyChunk::memory_usage() return bytes; } - /* ---------------------------------------------------------------------- one method for every keyword compute property/chunk can output the property is packed into buf starting at n with stride nvalues