From c4f1da784611419eb839b4a4a221dbf270a7cbfe Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 19 Aug 2019 13:17:46 -0400 Subject: [PATCH] add failing p4est test This is a simple way to trigger https://github.com/dealii/dealii/issues/7428 --- tests/mpi/p4est_bug_01.cc | 68 +++++++++++++++++++ ...t_bug_01.with_p4est=true.expect=run.output | 0 2 files changed, 68 insertions(+) create mode 100644 tests/mpi/p4est_bug_01.cc create mode 100644 tests/mpi/p4est_bug_01.with_p4est=true.expect=run.output diff --git a/tests/mpi/p4est_bug_01.cc b/tests/mpi/p4est_bug_01.cc new file mode 100644 index 0000000000..bf9ea3dfb5 --- /dev/null +++ b/tests/mpi/p4est_bug_01.cc @@ -0,0 +1,68 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2009 - 2018 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + + +// quarter_hyper_ball is currently broken with p4est: + +/** +Abort: Assertion 'edge_trees == (p4est_topidx_t) ta->elem_count + distinct' +Abort: /ssd/candi-v9.0.1-r6/tmp/unpack/p4est-2.0/src/p8est_connectivity.c:1167 + */ + +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "../tests.h" + + + +template +void +test() +{ + parallel::distributed::Triangulation triangulation( + MPI_COMM_WORLD, + Triangulation::limit_level_difference_at_vertices, + parallel::distributed::Triangulation::construct_multigrid_hierarchy); + + // Generate the mesh for a quarter of a ball + GridGenerator::quarter_hyper_ball(triangulation); + + triangulation.refine_global(); + + unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD); + if (myid == 0) + deallog << "OK, #cells = " << triangulation.n_global_active_cells() + << std::endl; +} + +int +main(int argc, char *argv[]) +{ + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); + MPILogInitAll all; + + test<2>(); // works + test<3>(); // crashes in the GridGenerator call +} diff --git a/tests/mpi/p4est_bug_01.with_p4est=true.expect=run.output b/tests/mpi/p4est_bug_01.with_p4est=true.expect=run.output new file mode 100644 index 0000000000..e69de29bb2 -- 2.39.5