From: Martin Kronbichler Date: Thu, 23 Oct 2014 11:39:58 +0000 (+0200) Subject: Disable nonlocal graph in Trilinos sparsity pattern because Trilinos has a bug. X-Git-Tag: v8.2.0-rc1~98^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9145654b39b79917051d828b85d63c596c47703;p=dealii.git Disable nonlocal graph in Trilinos sparsity pattern because Trilinos has a bug. --- diff --git a/include/deal.II/lac/trilinos_sparse_matrix.h b/include/deal.II/lac/trilinos_sparse_matrix.h index f2182b84e5..13bde68194 100644 --- a/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_sparse_matrix.h @@ -469,11 +469,14 @@ namespace TrilinosWrappers * TrilinosWrappers::SparsityPattern object that in turn has been * initialized with the reinit function specifying three index sets, one * for the rows, one for the columns and for the larger set of @p - * writeable_rows, and the operation is an addition. If Trilinos version - * 11.10 and greater is used, initializing from a + * writeable_rows, and the operation is an addition. At some point in the + * future, Trilinos support might be complete enough such that initializing + * from a * TrilinosWrappers::SparsityPattern that has been filled by a function * similar to DoFTools::make_sparsity_pattern always results in a matrix - * that allows several processes to write into the same matrix row. + * that allows several processes to write into the same matrix row. However, + * Trilinos until version at least 11.12 does not correctly support this + * feature. * * * Note that all other reinit methods and constructors of diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index 1467d14737..e53f7f1730 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -363,9 +363,13 @@ namespace TrilinosWrappers if (input_row_map.Comm().NumProc() > 1) graph.reset (new Epetra_FECrsGraph(Copy, input_row_map, n_entries_per_row, false -#if DEAL_II_TRILINOS_VERSION_GTE(11,9,0) - , true -#endif + // TODO: Check which new Trilinos + // version supports this... Remember + // to change tests/trilinos/assemble_matrix_parallel_07 + // too. + //#if DEAL_II_TRILINOS_VERSION_GTE(11,14,0) + //, true + //#endif )); else graph.reset (new Epetra_FECrsGraph(Copy, input_row_map, input_col_map, diff --git a/tests/trilinos/assemble_matrix_parallel_07.cc b/tests/trilinos/assemble_matrix_parallel_07.cc index 14e4095797..ec33217ff9 100644 --- a/tests/trilinos/assemble_matrix_parallel_07.cc +++ b/tests/trilinos/assemble_matrix_parallel_07.cc @@ -265,14 +265,15 @@ void LaplaceProblem::setup_system () TrilinosWrappers::SparsityPattern csp; IndexSet relevant_set; DoFTools::extract_locally_relevant_dofs (dof_handler, relevant_set); -#if DEAL_II_TRILINOS_VERSION_GTE(11,9,0) + // TODO: currently no Trilinos version is capable of doing this... + //#if DEAL_II_TRILINOS_VERSION_GTE(11,14,0) // Cannot pre-build sparsity pattern, Trilinos must provide it... - csp.reinit(locally_owned, locally_owned, MPI_COMM_WORLD); -#else + //csp.reinit(locally_owned, locally_owned, MPI_COMM_WORLD); + //#else // OK, Trilinos not new enough - use exactly the same as // assemble_matrix_parallel_02.cc csp.reinit(locally_owned, locally_owned, relevant_set, MPI_COMM_WORLD); -#endif + //#endif DoFTools::make_sparsity_pattern (dof_handler, csp, constraints, false); csp.compress();