diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index c5c03e2050..d4700ce86a 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -125,7 +125,8 @@ int DumpAtom::modify_param(int narg, char **arg) void DumpAtom::write_header(int ndump) { - if (me == 0) (this->*header_choice)(ndump); + if (multiproc) (this->*header_choice)(ndump); + else if (me == 0) (this->*header_choice)(ndump); } /* ---------------------------------------------------------------------- */ diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index fbee19b1b5..f4c50d4eb2 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -225,7 +225,8 @@ void DumpCustom::init() void DumpCustom::write_header(int ndump) { - if (me == 0) (this->*header_choice)(ndump); + if (multiproc) (this->*header_choice)(ndump); + else if (me == 0) (this->*header_choice)(ndump); } /* ---------------------------------------------------------------------- */