From: Timo Heister Date: Tue, 22 Mar 2011 12:31:27 +0000 (+0000) Subject: crash in refining a 12 cell shell X-Git-Tag: v8.0.0~4213 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f76ef007a1c677cf2786248247c4f0e9cc8d6df;p=dealii.git crash in refining a 12 cell shell git-svn-id: https://svn.dealii.org/trunk@23489 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/p4est_3d_refine_02.cc b/tests/mpi/p4est_3d_refine_02.cc new file mode 100644 index 0000000000..8229d12798 --- /dev/null +++ b/tests/mpi/p4est_3d_refine_02.cc @@ -0,0 +1,109 @@ +//--------------------------------------------------------------------------- +// $Id: p4est_3d_refine_02.cc 23327 2011-02-11 03:19:07Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009, 2010 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- + + +// refine a 3d shell once (currently a bug): +//[t500u:16597] [17] /scratch/p4est-0.3.1.55//DEBUG/lib/libsc.so.0(sc_abort_verbosef+0) [0x2afcc77b943b] +//[t500u:16597] [18] /scratch/p4est-0.3.1.55//DEBUG/lib/libp4est.so.0(p8est_quadrant_parent+0x5d) [0x2afcc7548d4b] +//[t500u:16597] [19] /scratch/p4est-0.3.1.55//DEBUG/lib/libp4est.so.0(+0x5046c) [0x2afcc754446c] +//[t500u:16597] [20] /scratch/p4est-0.3.1.55//DEBUG/lib/libp4est.so.0(p8est_partition_ext+0x1295) [0x2afcc7543daf] +//[t500u:16597] [21] /scratch/deal-trunk/deal.II/lib/libdeal_II.g.so.6.4.pre(_ZN6dealii8parallel11distributed13TriangulationILi3ELi3EE33execute_coarsening_and_refinementEv+0x483) [0x2afcbfba1b8f] +//[t500u:16597] [22] ./p4est_3d_refine_02/exe(_Z4testILi3EEvv+0x109) [0x410f1c] + +#include "../tests.h" +#include "coarse_grid_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +template +void test() +{ + unsigned int myid = Utilities::System::get_this_mpi_process (MPI_COMM_WORLD); + + parallel::distributed::Triangulation tr(MPI_COMM_WORLD); + GridGenerator::hyper_shell (tr, + Point(), + 0.5, 1.0, + 12, + true); + + int ind = 0; + for (typename Triangulation::active_cell_iterator + cell = tr.begin_active(); cell != tr.end(); ++cell, ++ind) + if (!cell->is_artificial()) + { + if (myid==0 && (ind==4 || ind==5 || ind==6 || ind== 8)) + cell->set_refine_flag(); + if (myid==1 && (ind==0 || ind==2 || ind==10)) + cell->set_refine_flag(); + } + + tr.execute_coarsening_and_refinement (); + + unsigned int checksum = tr.get_checksum (); + if (myid == 0) + { + deallog << "#cells = " << tr.n_global_active_cells() << std::endl; + deallog << "Checksum: " + << checksum + << std::endl; + } + + if (Utilities::System::get_this_mpi_process (MPI_COMM_WORLD) == 0) + deallog << "OK" << std::endl; +} + + +int main(int argc, char *argv[]) +{ +#ifdef DEAL_II_COMPILER_SUPPORTS_MPI + MPI_Init (&argc,&argv); +#else + (void)argc; + (void)argv; +#endif + + unsigned int myid = Utilities::System::get_this_mpi_process (MPI_COMM_WORLD); + + + deallog.push(Utilities::int_to_string(myid)); + + if (myid == 0) + { + std::ofstream logfile(output_file_for_mpi("p4est_3d_refine_02").c_str()); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + deallog.push("3d"); + test<3>(); + deallog.pop(); + } + else + test<3>(); + + +#ifdef DEAL_II_COMPILER_SUPPORTS_MPI + MPI_Finalize(); +#endif +} diff --git a/tests/mpi/p4est_3d_refine_02/ncpu_10/cmp/generic b/tests/mpi/p4est_3d_refine_02/ncpu_10/cmp/generic new file mode 100644 index 0000000000..e7e7c9a42c --- /dev/null +++ b/tests/mpi/p4est_3d_refine_02/ncpu_10/cmp/generic @@ -0,0 +1,21 @@ + +DEAL:0:3d::hyper_cube +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 22 +DEAL:0:3d::Checksum: 2519335187 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 85 +DEAL:0:3d::Checksum: 1154286748 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 386 +DEAL:0:3d::Checksum: 4143996808 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 1590 +DEAL:0:3d::Checksum: 3261418524 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 5895 +DEAL:0:3d::Checksum: 221486420 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 21197 +DEAL:0:3d::Checksum: 4164589755 +DEAL:0:3d::OK diff --git a/tests/mpi/p4est_3d_refine_02/ncpu_4/cmp/generic b/tests/mpi/p4est_3d_refine_02/ncpu_4/cmp/generic new file mode 100644 index 0000000000..229d080764 --- /dev/null +++ b/tests/mpi/p4est_3d_refine_02/ncpu_4/cmp/generic @@ -0,0 +1,21 @@ + +DEAL:0:3d::hyper_cube +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 22 +DEAL:0:3d::Checksum: 2519335187 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 85 +DEAL:0:3d::Checksum: 3146384512 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 337 +DEAL:0:3d::Checksum: 955797508 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 1219 +DEAL:0:3d::Checksum: 1730475346 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 4621 +DEAL:0:3d::Checksum: 2797369050 +DEAL:0:3d::refine_loop... +DEAL:0:3d::#cells = 16108 +DEAL:0:3d::Checksum: 4196398193 +DEAL:0:3d::OK