On 6/9/22 20:02, Matthew Rich wrote:

I am not sure if this is a dealii issue or more a gcc issue but I am not getting line numbers on the stack traces, which makes debugging errors hard since I am a raw beginner.

So for example I get the following

--------------------------------------------------------
An error occurred in line <182> of file </build/deal.ii-KebjEf/deal.ii-9.2.0/include/deal.II/numerics/vector_tools_project.templates.h> in function     void dealii::VectorTools::internal::project_matrix_free(const dealii::Mapping<dim, spacedim>&, const dealii::DoFHandler<dim, spacedim>&, const dealii::AffineConstraints<number>&, const dealii::Quadrature<dim>&, const dealii::Function<spacedim, typename dealii::LinearAlgebra::distributed::Vector<Number>::value_type>&, dealii::LinearAlgebra::distributed::Vector<Number>&, bool, const dealii::Quadrature<(dim - 1)>&, bool) [with int components = 2; int fe_degree = 3; int dim = 2; Number = double; int spacedim = 2; typename dealii::LinearAlgebra::distributed::Vector<Number>::value_type = double]
The violated condition was:
     dof.get_fe(0).n_components() == function.n_components
Additional information:
     Dimension 2 not equal to 1.

Stacktrace:
-----------
[...]

--------------------------------------------------------

Aborted

So I would expect some line number show up on #7 which would help me find the offending line faster. Anyone else have this problem.

Matthew,
the code that generates the stacktraces you see following the error messages does not have access to line number information. You only get line numbers when you run the program in a debugger.

The debugger will stop when you hit an error (just after generating the message above) and you can then call the 'backtrace' command in the debugger to see where you are -- and this will then include line numbers.

Best
 W.


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

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/61ff4af7-7b89-cc22-f98c-0b103d7ce159%40colostate.edu.

Reply via email to