diff --git a/src/write_data.cpp b/src/write_data.cpp index 7de6f6e114..bfc0029ed6 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -612,6 +612,7 @@ void WriteData::impropers() int ncol = 5; int sendrow = static_cast (nimpropers_local); int maxrow; + MPI_Allreduce(&sendrow,&maxrow,1,MPI_INT,MPI_MAX,world); tagint **buf; if (me == 0) memory->create(buf,MAX(1,maxrow),ncol,"write_data:buf");