Hi John,

Unfortunately, I'm using a complicated build which uses libMesh linked with
a real PETSc. My code is then linked with libMesh, a real PETSc build and a
complex PETSc build. It would be difficult to replicate the problem in an
example.

Some more investigation in GDB: mat() returns a non-NULL _p_Mat pointer,
but the memory pointed by the header seems to be inaccessible.

(gdb) p A_
libMesh::PetscMatrix<libMesh::Real> *) 0x10a22d0

(gdb) p A_->mat()
$7 = (_p_Mat *) 0x10d9a80

(gdb) p ((PetscObject)(*(A_->mat())))
$8 = (_p_PetscObject *) 0x127b54

(gdb) p *((PetscObject)(*(A_->mat())))
Cannot access memory at address 0x127b54

(gdb) p ((PetscObject)(*(A_->mat())))->classid
Cannot access memory at address 0x127b54

Sorry for presenting a vague problem.

Thanks,
Harshad


On Mon, Oct 20, 2014 at 3:15 PM, John Peterson <[email protected]> wrote:

> On Mon, Oct 20, 2014 at 1:09 PM, Harshad Sahasrabudhe
> <[email protected]> wrote:
> > Hi,
> >
> > I get the PETSc matrix object from libMesh and use it in MatGetType()
> call
> > of PETSc. This is when the following error is thrown:
> >
> > [0]PETSC ERROR: --------------------- Error Message
> > ------------------------------------
> > [0]PETSC ERROR: Invalid argument!
> > [0]PETSC ERROR: Wrong type of object: Parameter # 1!
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: Petsc Release Version 3.4.3, Oct, 15, 2013
> > [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> > [0]PETSC ERROR: See docs/index.html for manual pages.
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: MatGetType() line 100 in
> > petsc/build-real/src/mat/interface/matreg.c
> >
> > This basically means that the PETSc I'm calling doesn't recognize the
> > classid of the Mat obtained from PetscMatrix<>::mat() to be of type Mat.
> Am
> > I doing something wrong? Can there be a linking issue?
>
> Possibly the pointer is NULL.
>
> Can you provide a minimal working example which demonstrates the error.
>
> --
> John
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to