*If you run the program in a debugger, can you find out where the segfault happens?*

Yes, the starting point of the trace is "TrilinosWrappers::SolverDirect::do_solve", and the segmentation fault occurs in the libsuperlu_dist library.

On reviewing the do_solve function, it seems the exception TrilinosWrappers::SolverDirect::ExcTrilinosError is expected to be thrown. While Amesos_Mumps solver correctly throws this exception, unfortunately, Amesos_superludist does not. :(

You might want to report that to them.


*Perhaps a better approach than seeing whether a linear solver succeeds would
be to first check whether the matrix/rhs have NaNs before you hand them off to
the solver. *

My motivation for avoiding such checks was to keep the optimized release code free of unnecessary overhead, trusting that the solver would throw appropriate exceptions when feeded with bad input. However, I probably can not rely on that for all solvers, and manually checking for NaN
is the more reliable approach.

In fairness, I think it's reasonable for a solver to expect a matrix that at least doesn't have NaNs in them. It shouldn't segfault, of course, but I also don't think that it ought to check for NaNs itself.

Compared to the overall cost of a direct solver, going over all matrix entries once and sum them up is quite cheap. It doesn't seem worth it (to me) to avoid the check if it makes it easier for you to get good error messages from your code.

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 visit 
https://groups.google.com/d/msgid/dealii/489cd40d-0417-48cb-b285-ea7a318d8b79%40colostate.edu.

Reply via email to