]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add failing p4est test 8603/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 19 Aug 2019 17:17:46 +0000 (13:17 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 11 May 2020 21:40:37 +0000 (17:40 -0400)
This is a simple way to trigger
https://github.com/dealii/dealii/issues/7428

tests/mpi/p4est_bug_01.cc [new file with mode: 0644]
tests/mpi/p4est_bug_01.with_p4est=true.expect=run.output [new file with mode: 0644]

diff --git a/tests/mpi/p4est_bug_01.cc b/tests/mpi/p4est_bug_01.cc
new file mode 100644 (file)
index 0000000..bf9ea3d
--- /dev/null
@@ -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 <deal.II/base/tensor.h>
+#include <deal.II/base/utilities.h>
+
+#include <deal.II/distributed/tria.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_accessor.h>
+
+#include "../tests.h"
+
+
+
+template <int dim>
+void
+test()
+{
+  parallel::distributed::Triangulation<dim> triangulation(
+    MPI_COMM_WORLD,
+    Triangulation<dim>::limit_level_difference_at_vertices,
+    parallel::distributed::Triangulation<dim>::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 (file)
index 0000000..e69de29

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.