From: bangerth Date: Thu, 13 Sep 2012 01:43:34 +0000 (+0000) Subject: Delete tmp files again. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=640e5103d091986925574dbe940537d2c6963ae9;p=dealii-svn.git Delete tmp files again. git-svn-id: https://svn.dealii.org/trunk@26333 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/no_flux_constraints_02.cc b/tests/mpi/no_flux_constraints_02.cc index 2256bed104..fc5b4e0fd4 100644 --- a/tests/mpi/no_flux_constraints_02.cc +++ b/tests/mpi/no_flux_constraints_02.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2009, 2010 by the deal.II authors +// Copyright (C) 2009, 2010, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -100,7 +100,7 @@ void test() DoFHandler dofh(triangulation); dofh.distribute_dofs (fe); DoFRenumbering::hierarchical(dofh); - + if (myid == 0) deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl; @@ -121,7 +121,7 @@ void test() constraints.close(); std::string base = output_file_for_mpi("no_flux_constraints_02"); - + MPI_Barrier(MPI_COMM_WORLD); { //write the constraintmatrix to a file on each cpu @@ -147,6 +147,12 @@ void test() } } } + + // remove tmp files again + std::remove ((base + "cm_" + Utilities::int_to_string(myid) + ".dot").c_str()); + std::remove ((base + "cm").c_str()); + std::remove ((base + "cm.check").c_str()); + // print the number of constraints. since // processors might write info in different // orders, copy all numbers to root processor diff --git a/tests/mpi/no_flux_constraints_03.cc b/tests/mpi/no_flux_constraints_03.cc index bede6939d7..c7b307d454 100644 --- a/tests/mpi/no_flux_constraints_03.cc +++ b/tests/mpi/no_flux_constraints_03.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2009, 2010 by the deal.II authors +// Copyright (C) 2009, 2010, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -71,7 +71,7 @@ void test() DoFHandler dofh(triangulation); dofh.distribute_dofs (fe); DoFRenumbering::hierarchical(dofh); - + if (myid == 0) deallog << "#dofs = " << dofh.locally_owned_dofs().size() << std::endl; @@ -96,7 +96,7 @@ void test() MPI_Barrier(MPI_COMM_WORLD); { //write the constraintmatrix to a file on each cpu - std::string fname = base+"cm_" + Utilities::int_to_string(myid) + ".dot"; + std::string fname = base + "cm_" + Utilities::int_to_string(myid) + ".dot"; std::ofstream file(fname.c_str()); constraints.print(file); } @@ -106,8 +106,8 @@ void test() { //sort and merge the constraint matrices on proc 0, generate a checksum //and output that into the deallog - system((std::string("cat ") + base+"cm_?.dot|sort -n|uniq >" + base+"cm").c_str()); - system((std::string("md5sum ") + base + "cm >" + base + "cm.check").c_str()); + system((std::string("cat ") + base + "cm_*.dot | sort -n | uniq > " + base + "cm").c_str()); + system((std::string("md5sum ") + base + "cm > " + base + "cm.check").c_str()); { std::ifstream file((base+"cm.check").c_str()); std::string str; @@ -120,6 +120,12 @@ void test() } + // remove tmp files again + std::remove ((base + "cm_" + Utilities::int_to_string(myid) + ".dot").c_str()); + std::remove ((base + "cm").c_str()); + std::remove ((base + "cm.check").c_str()); + + // print the number of constraints. since // processors might write info in different // orders, copy all numbers to root processor