From a6d9ba48e60308bb29492fac9320449beef71b21 Mon Sep 17 00:00:00 2001 From: heister Date: Thu, 30 May 2013 00:36:51 +0000 Subject: [PATCH] fix test and output git-svn-id: https://svn.dealii.org/trunk@29667 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/mpi/tria_01.cc | 30 +++------- tests/mpi/tria_01/ncpu_10/cmp/generic | 83 ++++++++++++++++++++++++++- tests/mpi/tria_01/ncpu_2/cmp/generic | 8 +++ tests/mpi/tria_01/ncpu_4/cmp/generic | 33 ++++++++++- 4 files changed, 127 insertions(+), 27 deletions(-) diff --git a/tests/mpi/tria_01.cc b/tests/mpi/tria_01.cc index 4417c12bad..71075f5028 100644 --- a/tests/mpi/tria_01.cc +++ b/tests/mpi/tria_01.cc @@ -51,12 +51,13 @@ void test() deallog << "begin(1)==end(1)? " << (tr.begin(1)==tr.end(1)) << std::endl; - if (myid!=0) - Assert(tr.begin(1)==tr.end(1), ExcInternalError()); deallog << "subdomainid = " << tr.begin_active()->subdomain_id() << std::endl; + + //if (myid!=0) + // Assert(tr.begin(1)==tr.end(1), ExcInternalError()); const unsigned int checksum = tr.get_checksum (); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) @@ -72,24 +73,9 @@ void test() int main(int argc, char *argv[]) { Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); - - unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); - - - deallog.push(Utilities::int_to_string(myid)); - - if (myid == 0) - { - std::ofstream logfile(output_file_for_mpi("tria_01").c_str()); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - deallog.push("2d"); - test<2>(); - deallog.pop(); - } - else - test<2>(); - + MPILogInitAll log(__FILE__); + + deallog.push("2d"); + test<2>(); + deallog.pop(); } diff --git a/tests/mpi/tria_01/ncpu_10/cmp/generic b/tests/mpi/tria_01/ncpu_10/cmp/generic index 106d06a0d2..ffc818c011 100644 --- a/tests/mpi/tria_01/ncpu_10/cmp/generic +++ b/tests/mpi/tria_01/ncpu_10/cmp/generic @@ -1,5 +1,82 @@ -DEAL:0:2d::subdomainid = 0 -DEAL:0:2d::#cells = 29035 -DEAL:0:2d::Checksum: 1364131841 +DEAL:0:2d::#cells = 4 +DEAL:0:2d::proc 0, n levels 1 +DEAL:0:2d::proc 0, n gobal levels 2 +DEAL:0:2d::begin().cell_index 0 +DEAL:0:2d::begin(0).cell_index 0 +DEAL:0:2d::begin(1)==end(1)? 1 +DEAL:0:2d::subdomainid = 4294967294 +DEAL:0:2d::Checksum: 167510149 DEAL:0:2d::OK + +DEAL:1:2d::proc 1, n levels 1 +DEAL:1:2d::proc 1, n gobal levels 2 +DEAL:1:2d::begin().cell_index 0 +DEAL:1:2d::begin(0).cell_index 0 +DEAL:1:2d::begin(1)==end(1)? 1 +DEAL:1:2d::subdomainid = 4294967294 + + +DEAL:2:2d::proc 2, n levels 2 +DEAL:2:2d::proc 2, n gobal levels 2 +DEAL:2:2d::begin().cell_index 0 +DEAL:2:2d::begin(0).cell_index 0 +DEAL:2:2d::begin(1)==end(1)? 0 +DEAL:2:2d::subdomainid = 2 + + +DEAL:3:2d::proc 3, n levels 1 +DEAL:3:2d::proc 3, n gobal levels 2 +DEAL:3:2d::begin().cell_index 0 +DEAL:3:2d::begin(0).cell_index 0 +DEAL:3:2d::begin(1)==end(1)? 1 +DEAL:3:2d::subdomainid = 4294967294 + + +DEAL:4:2d::proc 4, n levels 1 +DEAL:4:2d::proc 4, n gobal levels 2 +DEAL:4:2d::begin().cell_index 0 +DEAL:4:2d::begin(0).cell_index 0 +DEAL:4:2d::begin(1)==end(1)? 1 +DEAL:4:2d::subdomainid = 4294967294 + + +DEAL:5:2d::proc 5, n levels 1 +DEAL:5:2d::proc 5, n gobal levels 2 +DEAL:5:2d::begin().cell_index 0 +DEAL:5:2d::begin(0).cell_index 0 +DEAL:5:2d::begin(1)==end(1)? 1 +DEAL:5:2d::subdomainid = 4294967294 + + +DEAL:6:2d::proc 6, n levels 1 +DEAL:6:2d::proc 6, n gobal levels 2 +DEAL:6:2d::begin().cell_index 0 +DEAL:6:2d::begin(0).cell_index 0 +DEAL:6:2d::begin(1)==end(1)? 1 +DEAL:6:2d::subdomainid = 4294967294 + + +DEAL:7:2d::proc 7, n levels 1 +DEAL:7:2d::proc 7, n gobal levels 2 +DEAL:7:2d::begin().cell_index 0 +DEAL:7:2d::begin(0).cell_index 0 +DEAL:7:2d::begin(1)==end(1)? 1 +DEAL:7:2d::subdomainid = 4294967294 + + +DEAL:8:2d::proc 8, n levels 1 +DEAL:8:2d::proc 8, n gobal levels 2 +DEAL:8:2d::begin().cell_index 0 +DEAL:8:2d::begin(0).cell_index 0 +DEAL:8:2d::begin(1)==end(1)? 1 +DEAL:8:2d::subdomainid = 4294967294 + + +DEAL:9:2d::proc 9, n levels 1 +DEAL:9:2d::proc 9, n gobal levels 2 +DEAL:9:2d::begin().cell_index 0 +DEAL:9:2d::begin(0).cell_index 0 +DEAL:9:2d::begin(1)==end(1)? 1 +DEAL:9:2d::subdomainid = 4294967294 + diff --git a/tests/mpi/tria_01/ncpu_2/cmp/generic b/tests/mpi/tria_01/ncpu_2/cmp/generic index 4c6d1f374b..377ec968f7 100644 --- a/tests/mpi/tria_01/ncpu_2/cmp/generic +++ b/tests/mpi/tria_01/ncpu_2/cmp/generic @@ -8,3 +8,11 @@ DEAL:0:2d::begin(1)==end(1)? 0 DEAL:0:2d::subdomainid = 0 DEAL:0:2d::Checksum: 167510149 DEAL:0:2d::OK + +DEAL:1:2d::proc 1, n levels 1 +DEAL:1:2d::proc 1, n gobal levels 2 +DEAL:1:2d::begin().cell_index 0 +DEAL:1:2d::begin(0).cell_index 0 +DEAL:1:2d::begin(1)==end(1)? 1 +DEAL:1:2d::subdomainid = 4294967294 + diff --git a/tests/mpi/tria_01/ncpu_4/cmp/generic b/tests/mpi/tria_01/ncpu_4/cmp/generic index 106d06a0d2..8f59b65bd9 100644 --- a/tests/mpi/tria_01/ncpu_4/cmp/generic +++ b/tests/mpi/tria_01/ncpu_4/cmp/generic @@ -1,5 +1,34 @@ +DEAL:0:2d::#cells = 4 +DEAL:0:2d::proc 0, n levels 2 +DEAL:0:2d::proc 0, n gobal levels 2 +DEAL:0:2d::begin().cell_index 0 +DEAL:0:2d::begin(0).cell_index 0 +DEAL:0:2d::begin(1)==end(1)? 0 DEAL:0:2d::subdomainid = 0 -DEAL:0:2d::#cells = 29035 -DEAL:0:2d::Checksum: 1364131841 +DEAL:0:2d::Checksum: 167510149 DEAL:0:2d::OK + +DEAL:1:2d::proc 1, n levels 1 +DEAL:1:2d::proc 1, n gobal levels 2 +DEAL:1:2d::begin().cell_index 0 +DEAL:1:2d::begin(0).cell_index 0 +DEAL:1:2d::begin(1)==end(1)? 1 +DEAL:1:2d::subdomainid = 4294967294 + + +DEAL:2:2d::proc 2, n levels 1 +DEAL:2:2d::proc 2, n gobal levels 2 +DEAL:2:2d::begin().cell_index 0 +DEAL:2:2d::begin(0).cell_index 0 +DEAL:2:2d::begin(1)==end(1)? 1 +DEAL:2:2d::subdomainid = 4294967294 + + +DEAL:3:2d::proc 3, n levels 1 +DEAL:3:2d::proc 3, n gobal levels 2 +DEAL:3:2d::begin().cell_index 0 +DEAL:3:2d::begin(0).cell_index 0 +DEAL:3:2d::begin(1)==end(1)? 1 +DEAL:3:2d::subdomainid = 4294967294 + -- 2.39.5