fix buffer size and format bugs in atom_vec_tri.cpp

This commit is contained in:
Axel Kohlmeyer
2020-07-12 15:46:56 -04:00
parent 5f14d5c87f
commit 60f078a8f9
3 changed files with 3 additions and 6 deletions

View File

@ -669,7 +669,7 @@ void WriteData::bonus(int flag)
int maxvalues;
MPI_Allreduce(&nvalues,&maxvalues,1,MPI_INT,MPI_MAX,world);
double *buf;
double *buf = nullptr;
if (me == 0) memory->create(buf,MAX(1,maxvalues),"write_data:buf");
else memory->create(buf,MAX(1,nvalues),"write_data:buf");