PETSC debug

Barry Smith bsmith at mcs.anl.gov
Tue Nov 14 19:56:42 CST 2006


  Billy,

   The x array contains the vector entries. It is either that
1) idx == 1710 is not a valid index or more likely
2) x[] on input has garbage values in it.

   Can you call VecView() on x right before or after
it is passed into the MatMult? My guess is it has
garbage in it from earlier in the code.

   Barry

On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote:

> 
> Hi,
> 
> I was running my code and I got FPE error on alpha machines.
> 
> Using gdb the output is the following. I am using 4 processors.
> 
> Program received signal SIGFPE, Arithmetic exception.
> 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770,
>     zz=0x120bc9fb0) at baij2.c:260
> 260         while (n--) sum += *v++ * x[*idx++];
> (gdb) print n
> $1 = 0
> (gdb) print idx
> $2 = (PetscInt *) 0x120c7aab8
> (gdb) print *idx
> $3 = 1710
> (gdb) print v
> $4 = (MatScalar *) 0x120c99190
> (gdb) print *v
> $5 = 4.0109832449655266e-12
> (gdb) print x
> $6 = (PetscScalar *) 0x120be1690
> (gdb) print x[*idx]
> $7 = 1.2349520920477556e-308
> (gdb) print sum
> $8 = 0
> 
> 
> Billy
> 




More information about the petsc-users mailing list