Dimension 5440 not equal to 8160

60 views
Skip to first unread message

Tiny Y

unread,
Nov 3, 2023, 3:44:43 AM11/3/23
to deal.II User Group

Hi,


My code, although there were errors before the change, could run under single core mode. However, after I made some modifications, the following error message appeared. When I run the code before the change again, the following error message will also appear. 

I just tried to change the error reported in the previous code and added a few parameter definitions. Why do the same code produce different results?

Any advice on this issue would be appreciated.


Best regard,

Yu

=======================================================================
Timestep 0: 0 (0.001)   Cells: 2560   DoFs: 10880
-----------------------------------------------------------------------

It. #A.Set Residual Reduction LSrch #LinIts
0 1.056223e+00
1 1363
--------------------------------------------------------
An error occurred in line <162> of file </home/qincai/dealii-candi/tmp/unpack/deal.II-v9.4.2/source/lac/trilinos_precondition_ml.cc> in function
    void dealii::TrilinosWrappers::PreconditionAMG::AdditionalData::set_operator_null_space(Teuchos::ParameterList&, std::unique_ptr<Epetra_MultiVector>&, const Epetra_RowMatrix&) const
The violated condition was:
    constant_modes[d].size() == expected_mode_size
Additional information:
    Dimension 5440 not equal to 8160.

Stacktrace:
-----------
#0  /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2: dealii::TrilinosWrappers::PreconditionAMG::AdditionalData::set_operator_null_space(Teuchos::ParameterList&, std::unique_ptr<Epetra_MultiVector, std::default_delete<Epetra_MultiVector> >&, Epetra_RowMatrix const&) const
#1  /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2: dealii::TrilinosWrappers::PreconditionAMG::AdditionalData::set_parameters(Teuchos::ParameterList&, std::unique_ptr<Epetra_MultiVector, std::default_delete<Epetra_MultiVector> >&, Epetra_RowMatrix const&) const
#2  /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2: dealii::TrilinosWrappers::PreconditionAMG::initialize(Epetra_RowMatrix const&, dealii::TrilinosWrappers::PreconditionAMG::AdditionalData const&)
#3  /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2: dealii::TrilinosWrappers::PreconditionAMG::initialize(dealii::TrilinosWrappers::SparseMatrix const&, dealii::TrilinosWrappers::PreconditionAMG::AdditionalData const&)
#4  ./cracks: FracturePhaseFieldProblem<2>::assemble_system(bool)
#5  ./cracks: FracturePhaseFieldProblem<2>::newton_active_set()
#6  ./cracks: FracturePhaseFieldProblem<2>::run()
#7  ./cracks: main
--------------------------------------------------------

[qincai-OMEN:37046] *** Process received signal ***
[qincai-OMEN:37046] Signal: Aborted (6)
[qincai-OMEN:37046] Signal code:  (-6)
[qincai-OMEN:37046] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3c460)[0x7f475f83c460]
[qincai-OMEN:37046] [ 1] /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11b)[0x7f475f89152b]
[qincai-OMEN:37046] [ 2] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x16)[0x7f475f83c3b6]
[qincai-OMEN:37046] [ 3] /lib/x86_64-linux-gnu/libc.so.6(abort+0xd7)[0x7f475f82287c]
[qincai-OMEN:37046] [ 4] /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2(_ZN6dealii18deal_II_exceptions9internals22do_issue_error_nothrowERKNS_13ExceptionBaseE+0x0)[0x7f47788c4264]
[qincai-OMEN:37046] [ 5] ./cracks(_ZN6dealii18deal_II_exceptions9internals20issue_error_noreturnINS_18StandardExceptions20ExcDimensionMismatchEEEvNS1_17ExceptionHandlingEPKciS7_S7_S7_T_+0x8c)[0x555c60715cc0]
[qincai-OMEN:37046] [ 6] /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2(_ZNK6dealii16TrilinosWrappers15PreconditionAMG14AdditionalData23set_operator_null_spaceERN7Teuchos13ParameterListERSt10unique_ptrI18Epetra_MultiVectorSt14default_deleteIS7_EERK16Epetra_RowMatrix+0x3c2)[0x7f47782f1602]
[qincai-OMEN:37046] [ 7] /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2(_ZNK6dealii16TrilinosWrappers15PreconditionAMG14AdditionalData14set_parametersERN7Teuchos13ParameterListERSt10unique_ptrI18Epetra_MultiVectorSt14default_deleteIS7_EERK16Epetra_RowMatrix+0xf19)[0x7f47782f0b55]
[qincai-OMEN:37046] [ 8] /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2(_ZN6dealii16TrilinosWrappers15PreconditionAMG10initializeERK16Epetra_RowMatrixRKNS1_14AdditionalDataE+0x72)[0x7f47782f1d94]
[qincai-OMEN:37046] [ 9] /home/qincai/dealii-candi/deal.II-v9.4.2/lib/libdeal_II.g.so.9.4.2(_ZN6dealii16TrilinosWrappers15PreconditionAMG10initializeERKNS0_12SparseMatrixERKNS1_14AdditionalDataE+0x45)[0x7f47782f1d1f]
[qincai-OMEN:37046] [10] ./cracks(_ZN25FracturePhaseFieldProblemILi2EE15assemble_systemEb+0x23202)[0x555c60791ece]
[qincai-OMEN:37046] [11] ./cracks(_ZN25FracturePhaseFieldProblemILi2EE17newton_active_setEv+0x996)[0x555c6074dfc4]
[qincai-OMEN:37046] [12] ./cracks(_ZN25FracturePhaseFieldProblemILi2EE3runEv+0x127c)[0x555c607322e6]
[qincai-OMEN:37046] [13] ./cracks(main+0x44c)[0x555c606e04f3]
[qincai-OMEN:37046] [14] /lib/x86_64-linux-gnu/libc.so.6(+0x23a90)[0x7f475f823a90]
[qincai-OMEN:37046] [15] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89)[0x7f475f823b49]
[qincai-OMEN:37046] [16] ./cracks(_start+0x25)[0x555c606cb4d5]
[qincai-OMEN:37046] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 0 on node qincai-OMEN exited on signal 6 (Aborted).
--------------------------------------------------------------------------




Wolfgang Bangerth

unread,
Nov 3, 2023, 11:28:53 PM11/3/23
to dea...@googlegroups.com
On 11/3/23 01:44, Tiny Y wrote:
>
> My code, although there were errors before the change, could run under single
> core mode. However, after I made some modifications, the following error
> message appeared. When I run the code before the change again, the following
> error message will also appear.
>
> I just tried to change the error reported in the previous code and added a few
> parameter definitions. Why do the same code produce different results?

Yu:
there must of course be a reason, and it will reveal itself by debugging the
issue :-)

Here, a good starting point would be to read the error message and how you get
into this place. From the backtrace, you find that the problem is in a the
following function:

void
PreconditionAMG::AdditionalData::set_operator_null_space(
Teuchos::ParameterList &parameter_list,
std::unique_ptr<Epetra_MultiVector> &ptr_distributed_constant_modes,
const Epetra_RowMatrix &matrix) const
{
const Epetra_Map &domain_map = matrix.OperatorDomainMap();

const size_type constant_modes_dimension = constant_modes.size();
ptr_distributed_constant_modes = std::make_unique<Epetra_MultiVector>(
domain_map, constant_modes_dimension > 0 ? constant_modes_dimension : 1);

Epetra_MultiVector &distributed_constant_modes =
*ptr_distributed_constant_modes;

if (constant_modes_dimension > 0)
{
const size_type global_size = TrilinosWrappers::n_global_rows(matrix);
[...]
const bool constant_modes_are_global =
constant_modes[0].size() == global_size;
const size_type my_size = domain_map.NumMyElements();

// Reshape null space as a contiguous vector of doubles so that
// Trilinos can read from it.
const size_type expected_mode_size =
constant_modes_are_global ? global_size : my_size;
for (size_type d = 0; d < constant_modes_dimension; ++d)
{
Assert(constant_modes[d].size() == expected_mode_size,
ExcDimensionMismatch(constant_modes[d].size(),
expected_mode_size));

From the error messages you already know what the actual and the expected
size of the array is. Now it's for you to figure out why these are not the same.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages