From b1c6c0d7d008fdab264bb36712f2723cffff532d Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 11 Sep 2011 18:13:23 +0000 Subject: [PATCH] Avoid a race condition by making sure temp files are unique between runs with different numbers of processors. git-svn-id: https://svn.dealii.org/trunk@24306 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/mpi/p4est_2d_constraintmatrix_01.cc | 6 +++--- tests/mpi/p4est_2d_constraintmatrix_03.cc | 4 ++-- tests/mpi/p4est_3d_constraintmatrix_01.cc | 4 ++-- tests/mpi/p4est_3d_constraintmatrix_04.cc | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/mpi/p4est_2d_constraintmatrix_01.cc b/tests/mpi/p4est_2d_constraintmatrix_01.cc index 8ae11ba1a0..fe7136dd72 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_01.cc +++ b/tests/mpi/p4est_2d_constraintmatrix_01.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2009, 2010 by the deal.II authors +// Copyright (C) 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -66,7 +66,7 @@ void test() DoFTools::make_hanging_node_constraints (dofh, cm2); { - std::ofstream file((std::string("p4est_2d_constraintmatrix_01/dat.") + Utilities::int_to_string(myid)).c_str()); + std::ofstream file((std::string("p4est_2d_constraintmatrix_01/ncpu_") + Utilities::int_to_string(Utilities::System::get_n_mpi_processes (MPI_COMM_WORLD)) + "/dat." + Utilities::int_to_string(myid)).c_str()); file << "**** proc " << myid << std::endl; cm.print(file); file << "****" << std::endl; @@ -82,7 +82,7 @@ void test() { for (unsigned int i=0;i