Commit 285c5b73 authored by Adrian Pope's avatar Adrian Pope
Browse files

fixes for rank0 file create case

parent 8a27d358
......@@ -518,6 +518,11 @@ void GenericIO::write() {
LocalFileName = FileName;
}
#ifndef GENERICIO_NO_MPI
if(Rank0CreateAll && NRanks > 1)
MPI_Barrier(Comm);
#endif
RankHeader<IsBigEndian> RHLocal;
int Dims[3], Periods[3], Coords[3];
......@@ -797,7 +802,7 @@ nocomp:
setFH(MPI_COMM_SELF);
FH.get()->open(LocalFileName, false, Rank0CreateAll);
FH.get()->open(LocalFileName, false, Rank0CreateAll && NRanks>1);
FH.get()->setSize(FileSize);
FH.get()->write(&Header[0], HeaderSize, 0, "header");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment