From: heister Date: Wed, 22 Aug 2012 21:35:06 +0000 (+0000) Subject: revert last edit partly and fix test X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f8f3f593a30001024df0f115ea935cea3e39ad2;p=dealii-svn.git revert last edit partly and fix test git-svn-id: https://svn.dealii.org/trunk@26092 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/no_flux_constraints_02.cc b/tests/mpi/no_flux_constraints_02.cc index 3bde23bcb4..2256bed104 100644 --- a/tests/mpi/no_flux_constraints_02.cc +++ b/tests/mpi/no_flux_constraints_02.cc @@ -122,13 +122,10 @@ void test() std::string base = output_file_for_mpi("no_flux_constraints_02"); - if (myid==0) - system(("rm -rf " + base + "cm_?.dot").c_str()); - MPI_Barrier(MPI_COMM_WORLD); { //write the constraintmatrix to a file on each cpu - std::string fname = base+"cm_" + Utilities::int_to_string(numprocs) + "_" + 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); } @@ -138,7 +135,7 @@ 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_" +Utilities::int_to_string(numprocs)+ "_?.dot|sort -n|uniq >" + base+"cm").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()); diff --git a/tests/mpi/no_flux_constraints_03.cc b/tests/mpi/no_flux_constraints_03.cc index f99587e4d1..bede6939d7 100644 --- a/tests/mpi/no_flux_constraints_03.cc +++ b/tests/mpi/no_flux_constraints_03.cc @@ -92,13 +92,13 @@ void test() constraints.close(); std::string base = output_file_for_mpi("no_flux_constraints_03"); - + MPI_Barrier(MPI_COMM_WORLD); - + { //write the constraintmatrix to a file on each cpu - std::string fname = base+"cm_" + Utilities::int_to_string(numprocs) + "_" + Utilities::int_to_string(myid) + ".dot"; - std::ofstream file(fname.c_str()); - constraints.print(file); + std::string fname = base+"cm_" + Utilities::int_to_string(myid) + ".dot"; + std::ofstream file(fname.c_str()); + constraints.print(file); } MPI_Barrier(MPI_COMM_WORLD); sleep(1); @@ -106,16 +106,18 @@ 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_" +Utilities::int_to_string(numprocs)+ "_?.dot|sort -n|uniq|md5sum >" + base+Utilities::int_to_string(numprocs)+"cm.check").c_str()); - { - std::ifstream file((base+Utilities::int_to_string(numprocs)+"cm.check").c_str()); - std::string str; - while (!file.eof()) - { - std::getline(file, str); - deallog << str << std::endl; - } - } + 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; + while (!file.eof()) + { + std::getline(file, str); + deallog << str << std::endl; + } + } + } // print the number of constraints. since diff --git a/tests/mpi/no_flux_constraints_03/ncpu_1/cmp/generic b/tests/mpi/no_flux_constraints_03/ncpu_1/cmp/generic index b5ca27acb7..a58800dca0 100644 --- a/tests/mpi/no_flux_constraints_03/ncpu_1/cmp/generic +++ b/tests/mpi/no_flux_constraints_03/ncpu_1/cmp/generic @@ -1,7 +1,7 @@ DEAL:0:3d::#cells = 568 DEAL:0:3d::#dofs = 2481 -DEAL:0:3d::17a5cf8e1f66b693f8b54bf284cab4ac - +DEAL:0:3d::17a5cf8e1f66b693f8b54bf284cab4ac no_flux_constraints_03/ncpu_1/outputcm DEAL:0:3d:: DEAL:0:3d::#constraints on 0: 702 DEAL:0:3d::OK diff --git a/tests/mpi/no_flux_constraints_03/ncpu_9/cmp/generic b/tests/mpi/no_flux_constraints_03/ncpu_9/cmp/generic index 1da64b5073..45d63a150d 100644 --- a/tests/mpi/no_flux_constraints_03/ncpu_9/cmp/generic +++ b/tests/mpi/no_flux_constraints_03/ncpu_9/cmp/generic @@ -1,7 +1,7 @@ DEAL:0:3d::#cells = 568 DEAL:0:3d::#dofs = 2481 -DEAL:0:3d::17a5cf8e1f66b693f8b54bf284cab4ac - +DEAL:0:3d::17a5cf8e1f66b693f8b54bf284cab4ac no_flux_constraints_03/ncpu_9/outputcm DEAL:0:3d:: DEAL:0:3d::#constraints on 0: 198 DEAL:0:3d::#constraints on 1: 221