From baef88b6654a652a902c569da09b214d8356019f Mon Sep 17 00:00:00 2001 From: Mark Berrill Date: Tue, 11 Nov 2014 12:06:02 -0500 Subject: [PATCH] Fixing minor bug without MPI --- IO/Writer.cpp | 2 ++ common/MPI.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IO/Writer.cpp b/IO/Writer.cpp index e3953960..35148a9c 100644 --- a/IO/Writer.cpp +++ b/IO/Writer.cpp @@ -24,6 +24,7 @@ static std::vector writeMeshesOrigFormat( const std::vector mesh = meshData[i].mesh; IO::MeshDatabase mesh_entry; mesh_entry.name = meshData[i].meshName; @@ -160,6 +161,7 @@ void IO::writeData( int timestep, const std::vector& meshDat sprintf(path,"vis%03i",timestep); if ( rank == 0 ) mkdir(path,S_IRWXU|S_IRGRP); + MPI_Barrier(MPI_COMM_WORLD); // Write the mesh files std::vector meshes_written; if ( format == 1 ) { diff --git a/common/MPI.cpp b/common/MPI.cpp index 54f0865b..38318c36 100644 --- a/common/MPI.cpp +++ b/common/MPI.cpp @@ -123,7 +123,7 @@ int MPI_Comm_size( MPI_Comm, int *size ) } int MPI_Comm_rank( MPI_Comm, int *rank ) { - *rank = 1; + *rank = 0; return 0; } int MPI_Barrier( MPI_Comm )