From: heister Date: Wed, 25 Jul 2012 18:44:45 +0000 (+0000) Subject: add failing test for trilinos 10.12.1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43b8b79b1d4c37b4f743a8d822dc49ac94fc067d;p=dealii-svn.git add failing test for trilinos 10.12.1 git-svn-id: https://svn.dealii.org/trunk@25733 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/interpolate_03.cc b/tests/mpi/interpolate_03.cc new file mode 100644 index 0000000000..e2599cc220 --- /dev/null +++ b/tests/mpi/interpolate_03.cc @@ -0,0 +1,122 @@ +//--------------------------------------------------------------------------- +// $Id: integrate_difference.cc 24418 2011-09-26 12:52:19Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009, 2010, 2011 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. +// +//--------------------------------------------------------------------------- + + +// in Trilinos 10.12.1 interpolate() hangs with a small number of cells (smaller than the number of CPUs). This works fine in 10.4.2 and 10.8.5 + +#include "../tests.h" +#include "coarse_grid_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + + +template +class LinearFunction : public Function +{ + public: + double value (const Point &p, + const unsigned int) const + { + return 1; + } +}; + + +template +void test() +{ + parallel::distributed::Triangulation tr(MPI_COMM_WORLD); + + GridGenerator::hyper_cube(tr); +// tr.refine_global (2); + + const FE_Q fe(2); + DoFHandler dofh(tr); + dofh.distribute_dofs (fe); + + TrilinosWrappers::MPI::Vector interpolated(dofh.locally_owned_dofs(), + MPI_COMM_WORLD); + deallog << "before" << std::endl; + VectorTools::interpolate (dofh, + LinearFunction(), + interpolated); + deallog << "after" << std::endl; + + if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) + deallog << "norm = " << interpolated.l2_norm() + << 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::MPI::this_mpi_process (MPI_COMM_WORLD); + + + deallog.push(Utilities::int_to_string(myid)); + + if (myid == 0) + { + std::ofstream logfile(output_file_for_mpi("interpolate_03").c_str()); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + deallog.push("2d"); + test<2>(); + deallog.pop(); + + deallog.push("3d"); + // test<3>(); + deallog.pop(); + } + else + { + deallog.push("2d"); + test<2>(); + deallog.pop(); + + deallog.push("3d"); +// test<3>(); + deallog.pop(); + } + +#ifdef DEAL_II_COMPILER_SUPPORTS_MPI + MPI_Finalize(); +#endif +} diff --git a/tests/mpi/interpolate_03/ncpu_10/cmp/generic b/tests/mpi/interpolate_03/ncpu_10/cmp/generic new file mode 100644 index 0000000000..02b42b4570 --- /dev/null +++ b/tests/mpi/interpolate_03/ncpu_10/cmp/generic @@ -0,0 +1,3 @@ + +DEAL:0:2d::difference = 0.577350 +DEAL:0:3d::difference = 0.577350 diff --git a/tests/mpi/interpolate_03/ncpu_4/cmp/generic b/tests/mpi/interpolate_03/ncpu_4/cmp/generic new file mode 100644 index 0000000000..02b42b4570 --- /dev/null +++ b/tests/mpi/interpolate_03/ncpu_4/cmp/generic @@ -0,0 +1,3 @@ + +DEAL:0:2d::difference = 0.577350 +DEAL:0:3d::difference = 0.577350