Problem with Debugging step-26 program

36 views
Skip to first unread message

pushkar...@gmail.com

unread,
May 5, 2021, 12:16:22 AM5/5/21
to deal.II User Group
Deal deal.II community

In my attempt to simulate the additive manufacturing process, I modified the step-26 program to reproduce the results in which I ran into an error which produces the output as :

$ make run
Consolidate compiler generated dependencies of target step-26
[ 66%] Built target step-26
[100%] Run step-26 with Debug configuration
***Time step 0 at t=0

===========================================
Number of active cells: 1024
Number of degrees of freedom: 99


--------------------------------------------------------
An error occurred in line <367> of file </usr/local/include/deal.II/base/smartpointer.h> in function
    T* dealii::SmartPointer<T, P>::operator->() const [with T = const dealii::SparsityPattern; P = dealii::SparseMatrix<double>]
The violated condition was:
    t != nullptr
Additional information:
    (none)

Stacktrace:
-----------
#0  ./step-26: Step26::HeatEquation<2>::assemble_system()
#1  ./step-26: Step26::HeatEquation<2>::run()
#2  ./step-26: main
--------------------------------------------------------

make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Aborted (core dumped)
make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:137: run] Error 2
I tried to debug with gdb but coudnt make track the error. So any help in this regard to debug the code  will prove beneficialMoreover,I have attached step-26.cc file which was modified.

Sincerely
Pushkar



step-26.cc

pushkar...@gmail.com

unread,
May 5, 2021, 3:12:51 AM5/5/21
to deal.II User Group
I did manage to get rid of the error and successfully run the simulation using eclipse CDT in built debugger as illustrated in video lecture 25 by Dr. Bangerth.So I would like to assure the developers that the issue on this thread has been resolved.

Regards
Pushkar

Wells, David

unread,
May 8, 2021, 12:44:32 PM5/8/21
to deal.II User Group
Hi Pushkar,

That error is usually a result of having a sparse matrix with no sparsity pattern attached to it. Could you please verify that you attach sparsity patterns to all the matrices you use in assembly?

Best,
David Wells

From: dea...@googlegroups.com <dea...@googlegroups.com> on behalf of pushkar...@gmail.com <pushkar...@gmail.com>
Sent: Wednesday, May 5, 2021 12:16 AM
To: deal.II User Group <dea...@googlegroups.com>
Subject: [deal.II] Problem with Debugging step-26 program
 
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/8afa57b5-ba7a-4f82-90c8-c37a01354513n%40googlegroups.com.

Pushkar Pandit

unread,
May 9, 2021, 1:04:08 AM5/9/21
to dea...@googlegroups.com
Dear David

Indeed that was the error as I forgot to reinit the boundary_matrix which resolved the problem.Thanks alot for the explanation of the error as I was not able to make sense out of the error initially.

Regards
Pushkar

Reply all
Reply to author
Forward
0 new messages