]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add simplified test that crashes in release mode
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 Sep 2013 12:34:40 +0000 (12:34 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 Sep 2013 12:34:40 +0000 (12:34 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30974 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/constraint_matrix_crash_01.cc [new file with mode: 0644]
tests/mpi/constraint_matrix_crash_01.mpirun=1.output [new file with mode: 0644]

diff --git a/tests/mpi/constraint_matrix_crash_01.cc b/tests/mpi/constraint_matrix_crash_01.cc
new file mode 100644 (file)
index 0000000..74f4a76
--- /dev/null
@@ -0,0 +1,54 @@
+// ---------------------------------------------------------------------
+// $Id: constraint_matrix_set_zero_02.cc 30694 2013-09-13 17:22:08Z maier $
+//
+// Copyright (C) 2013 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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+
+// ConstraintMatrix::add_line crashes in release mode
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/parallel_vector.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/dofs/dof_tools.h>
+#include <deal.II/lac/parallel_block_vector.h>
+
+#include <fstream>
+
+
+void test ()
+{
+  unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
+  unsigned int numproc = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
+
+  IndexSet local_active_together(3);
+  local_active_together.add_range(0,1);
+  local_active_together.add_range(1,3);
+
+  ConstraintMatrix cm(local_active_together);
+  cm.add_line(1);
+  cm.close();
+  deallog << "OK" << std::endl;
+}
+
+
+int main(int argc, char *argv[])
+{
+  Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+  MPILogInitAll log;
+
+  test();
+  return 0;
+}
diff --git a/tests/mpi/constraint_matrix_crash_01.mpirun=1.output b/tests/mpi/constraint_matrix_crash_01.mpirun=1.output
new file mode 100644 (file)
index 0000000..be8d055
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL:0::OK

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.