[petsc-dev] GMRES with one processor crashes

Alexander Grayver agrayver at gfz-potsdam.de
Mon Jan 9 05:45:07 CST 2012


Hi Jed,

On 09.01.2012 12:34, Jed Brown wrote:
> On Mon, Jan 9, 2012 at 05:23, Alexander Grayver 
> <agrayver at gfz-potsdam.de <mailto:agrayver at gfz-potsdam.de>> wrote:
>
>     I run petsc-dev like that:
>     mpirun -n 2 /home/solveTest -ksp_view -ksp_monitor
>     -ksp_converged_reason -ksp_monitor_true_residual -log_summary
>     -mat_type mpiaij -ksp_rtol 1.0e-12
>
> [...]
>
>     But just switching to one process (-n 1) makes it crashing:
>
>
> Try removing the "-mat_type mpiaij" part. Note that you can still use 
> "-mat_type aij". Also note that you should usually use a prefix so 
> that you are setting the type of a specific matrix instead of setting 
> the type of all matrices (for which MatSetFromOptions() is called).

There is only one matrix in application. It is very simple one, the test 
just loads system matrix and rhs and solves system. I want to use it to 
test different solvers/preconditioners.

>
>     [0]PETSC ERROR:
>     ------------------------------------------------------------------------
>     [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation
>     Violation, probably memory access out of range
>
>
> Please run with valgrind --db-attach=yes (or at least a debugger) to 
> get a stack trace.

This is the stack trace:

      zdotc,               FP=7fffa35afce0
VecNorm_Seq,         FP=7fffa35afe40
VecNorm,             FP=7fffa35aff80
VecNormalize,        FP=7fffa35b0080
GMREScycle,          FP=7fffa35b02e0
KSPSolve_GMRES,      FP=7fffa35b0390
KSPSolve,            FP=7fffa35b1ef0
main,                FP=7fffa35b31d0

It crashes here:

    PetscFunctionBegin;
    if (type == NORM_2 || type == NORM_FROBENIUS) {
      ierr = VecGetArrayRead(xin,&xx);CHKERRQ(ierr);
      *z = BLASdot_(&bn,xx,&one,xx,&one);  // <<<< crash

The log from valgrind is attached, but it is completely filled with 
stupid MPI messages. How could one filter out all that stuff?

Regards,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120109/17bb0f6a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind.log.10769.zip
Type: application/x-zip-compressed
Size: 30286 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120109/17bb0f6a/attachment.bin>


More information about the petsc-dev mailing list