[petsc-users] KSPSetUp with PETSc/MUMPS

Satish Balay balay at mcs.anl.gov
Wed May 25 12:06:23 CDT 2016


> > ==28659== Invalid write of size 4
> > ==28659==    at 0x509B519: matload_ (in
> > /scratch/hzhang/petsc/arch-linux-gcc-gfortran-o/lib/libpetsc.so.3.07.1)

This refers to the buggy call to MatLoad()

   call MatLoad(mat_c, viewer)
Should be:
   call MatLoad(mat_c, viewer,ierr)

Satish

On Wed, 25 May 2016, Satish Balay wrote:

>    call PetscViewerBinaryOpen(PETSC_COMM_WORLD, "mat_c_bin.txt", 0, viewer, ierr) 
> 
> This looks buggy. It should be:
> 
>    call PetscViewerBinaryOpen(PETSC_COMM_WORLD, "mat_c_bin.txt", FILE_MODE_READ, viewer, ierr) 
> 
> Satish
> 
> On Wed, 25 May 2016, Hong wrote:
> 
> > Constantin:
> > I can reproduce your report, and am trying to debug it.
> > One thing I found is memory problem. With one processor on o-build,
> > I get
> > $ valgrind --tool=memcheck ./ex51f
> > ==28659== Memcheck, a memory error detector
> > ==28659== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
> > ==28659== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
> > ==28659== Command: ./ex51f
> > ==28659==
> >  BEGIN PROC           0
> >  ITERATION           1
> > ==28659== Invalid write of size 4
> > ==28659==    at 0x509B519: matload_ (in
> > /scratch/hzhang/petsc/arch-linux-gcc-gfortran-o/lib/libpetsc.so.3.07.1)
> > ==28659==    by 0x402204: MAIN__ (in
> > /scratch/hzhang/petsc/src/ksp/ksp/examples/tests/ex51f)
> > ==28659==    by 0x4030DC: main (in
> > /scratch/hzhang/petsc/src/ksp/ksp/examples/tests/ex51f)
> > ==28659==  Address 0xe is not stack'd, malloc'd or (recently) free'd
> > 
> > g-build does not show this error, plenty memory leak though.
> > 
> > I'm further investing it...
> > 
> > Hong
> > 
> > Hi,
> > >
> > > I'm a new user of PETSc and I try to use it with MUMPS functionalities to
> > > compute a nullbasis.
> > > I wrote a code where I compute 4 times the same nullbasis. It does work
> > > well when I run it with several procs but with only one processor I get an
> > > error on the 2nd iteration when KSPSetUp is called. Furthermore when it is
> > > run with a debugger ( --with-debugging=yes), it works fine with one or
> > > several processors.
> > > Have you got any idea about why it doesn't work with one processor and no
> > > debugger?
> > >
> > > Thanks.
> > > Constantin.
> > >
> > > PS: You can find the code and the files required to run it enclosed.
> > >
> > 
> 
> 



More information about the petsc-users mailing list