[petsc-users] RE : RE : PETSc : how to get back d_nnz and o_nnz ?

HOUSSEN Franck Franck.Houssen at cea.fr
Wed Jul 3 15:38:33 CDT 2013


I iterate on solving a AX=B system. I can not know in advance the maximum non zero values in A (at least, I am not sure to know how to do this). So I wanted to try to check if the existing A matrix is OK for the new solve to come : if so I keep it as it is, if not so I wanted to re-preallocate (increasing the number of non zero value in a suitable way).

"doesn't work" means, even using the CHCKERR marco, I do not get any stack in the error traces but just a message saying something like "a sig sev error occured" (occuring somewhere but no info about where - my install of petsc is a debug one). When I commented MatGetRow (that I tried to use instead of MatMPIxxx to avoid handling on one hand MPI matrices and on the other hand Seq matrices - the code handles both MPI or Seq matrices depending on the number of MPI procs), the code does something "wrong" (or say no what I want) but it does not crash : so I know the crash is du to the MatGetRow call.

FH

________________________________________
De : Jed Brown [five9a2 at gmail.com] de la part de Jed Brown [jedbrown at mcs.anl.gov]
Date d'envoi : mercredi 3 juillet 2013 13:13
À : HOUSSEN Franck; petsc-users at mcs.anl.gov
Objet : Re: RE : [petsc-users] PETSc : how to get back d_nnz and o_nnz ?

HOUSSEN Franck <Franck.Houssen at cea.fr> writes:

> Is this working also for MPI matrices ?

The functions I suggested are for MPI matrices, as should be clear since
they start with MatMPI...

> (the code create Seq matrice with 1 proc, and, MPI matrice with n
> procs) Seems that MatGetRow don't work neither.

"doesn't work" is not helpful.

I asked you to resend your _other_ message because it is the one that
states your actual problem and I think it indicates a misunderstanding
about what will overflow an existing preallocation.


More information about the petsc-users mailing list