From: bangerth Date: Thu, 13 Sep 2012 15:16:50 +0000 (+0000) Subject: Wait for processor 0 to be done with data files before deleting them. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=867bb22af142842c2c7c89e1f5b7a819bd618b5d;p=dealii-svn.git Wait for processor 0 to be done with data files before deleting them. git-svn-id: https://svn.dealii.org/trunk@26355 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/no_flux_constraints_02.cc b/tests/mpi/no_flux_constraints_02.cc index e60bb67103..e41f7047d1 100644 --- a/tests/mpi/no_flux_constraints_02.cc +++ b/tests/mpi/no_flux_constraints_02.cc @@ -146,11 +146,16 @@ void test() deallog << str << std::endl; } } + // delete the files created + // by processor 0 std::remove ((base + "cm").c_str()); std::remove ((base + "cm.check").c_str()); } - // remove tmp files again + // remove tmp files again. wait + // till processor 0 has done its + // job with them + MPI_Barrier(MPI_COMM_WORLD); std::remove ((base + "cm_" + Utilities::int_to_string(myid) + ".dot").c_str()); // print the number of constraints. since diff --git a/tests/mpi/no_flux_constraints_03.cc b/tests/mpi/no_flux_constraints_03.cc index c0915dd082..faf49b118f 100644 --- a/tests/mpi/no_flux_constraints_03.cc +++ b/tests/mpi/no_flux_constraints_03.cc @@ -118,11 +118,16 @@ void test() } } + // delete the files created + // by processor 0 std::remove ((base + "cm").c_str()); std::remove ((base + "cm.check").c_str()); } - // remove tmp files again + // remove tmp files again. wait + // till processor 0 has done its + // job with them + MPI_Barrier(MPI_COMM_WORLD); std::remove ((base + "cm_" + Utilities::int_to_string(myid) + ".dot").c_str());