]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Wait for processor 0 to be done with data files before deleting them.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2012 15:16:50 +0000 (15:16 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Sep 2012 15:16:50 +0000 (15:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@26355 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/no_flux_constraints_02.cc
tests/mpi/no_flux_constraints_03.cc

index e60bb67103bccee19e8fa33d0bb9b9b4873fd479..e41f7047d18f4660f3eb77124820a5d320d9d620 100644 (file)
@@ -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
index c0915dd082efc1151dd688e8fc42158f755d384a..faf49b118f436629c99c4f159eff6a7bc80269cf 100644 (file)
@@ -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());
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.