problem with -snes_mf_operator option
Vijay S. Mahadevan
vijay.m at gmail.com
Wed Mar 26 16:51:11 CDT 2008
Satish,
No. I am using C++. I currently have my MatStructure flag set to
DIFFERENT_NONZERO_PATTERN since I am using the identity matrix for the
preconditioner in order to eliminate any issues from user code.
I'd be interested in knowing what the fix was and can test if that
works in my case. Do let me know if you have any ideas.
Vijay
On Wed, Mar 26, 2008 at 4:45 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> Is this usage from fortran?
>
> There was a bug in fortran interface with 'MatStructure' that caused
> similar problems from fortran. [the fix was updated bfort].
>
> If this is indeed the case for you - I'll respin 2.3.3 tarball with
> the the updated bfort.
>
> Satish
>
>
>
> On Wed, 26 Mar 2008, Vijay S. Mahadevan wrote:
>
> > Hi all,
> >
> > I have a nonlinear solver test code that can use a user specified
> > Jacobian function directly, set using SNESSetJacobian. Now if I use
> > -snes_mf option, the solution scheme depends only on the residual and
> > the convergence is equivalent to the case when using the real Jacobian
> > matrix itself. But if I try the -snes_mf_operator option, with the
> > Jacobian=NULL to start with and the preconditioner being correctly
> > allocated the memory needed, I end up with a NULL argument exception.
> > I also alternately set the preconditioner to Identity matrix in order
> > to avoid any problems from user code to trickling in, but to no avail.
> >
> > Here's the call stack.
> >
> > [0]PETSC ERROR: Null argument, when expecting valid pointer!
> > [0]PETSC ERROR: Null Object: Parameter # 1!
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: Petsc Release Version 2.3.3, Patch 7, Fri Oct 26
> > 14:21:35 CDT 2007 HG revision:
> > 2e223033ba960114833e1f9713ab393ec78c056f
> > [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: bin/test-dbg on a linux-gnu named grove by vijaysm Wed
> > Mar 26 16:06:45 2008
> > [0]PETSC ERROR: Libraries linked from
> > /state/partition1/local/petsc-2.3.3-p7/lib/linux-gnu-c-debug
> > [0]PETSC ERROR: Configure run at Fri Nov 9 15:02:46 2007
> > [0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=ifort
> > --with-cxx=g++ --download-f-blas-lapack=1 --download-mpich=1
> > --with-shared=1
> > [0]PETSC ERROR:
> > ------------------------------------------------------------------------
> > [0]PETSC ERROR: PetscObjectGetComm() line 34 in src/sys/objects/gcomm.c
> > [0]PETSC ERROR: VecNormBegin() line 495 in src/vec/vec/utils/comb.c
> > [0]PETSC ERROR: MatMFFDCompute_WP() line 73 in src/mat/impls/mffd/wp.c
> > [0]PETSC ERROR: MatMult_MFFD() line 294 in src/mat/impls/mffd/mffd.c
> > [0]PETSC ERROR: MatMult() line 1632 in src/mat/interface/matrix.c
> > [0]PETSC ERROR: PCApplyBAorAB() line 584 in src/ksp/pc/interface/precon.c
> > [0]PETSC ERROR: GMREScycle() line 159 in src/ksp/ksp/impls/gmres/gmres.c
> > [0]PETSC ERROR: KSPSolve_GMRES() line 241 in src/ksp/ksp/impls/gmres/gmres.c
> > [0]PETSC ERROR: KSPSolve() line 379 in src/ksp/ksp/interface/itfunc.c
> > [0]PETSC ERROR: SNES_KSPSolve() line 2578 in src/snes/interface/snes.c
> > [0]PETSC ERROR: SNESSolve_LS() line 184 in src/snes/impls/ls/ls.c
> > [0]PETSC ERROR: SNESSolve() line 1871 in src/snes/interface/snes.c
> >
> > From what I can understand from the PETSc code (snes.c, mffd.c), the
> > current_u for MFFD context is NULL here. And that is the reason for
> > the final exception. But I do not understand how this can be since it
> > works perfectly fine with -snes_mf option with no changes in the code.
> >
> > Please do let me know if you think I should specifically be looking
> > for something to tackle this issue. Any help will be appreciated.
> >
> > Thanks,
> > Vijay
> >
> >
>
>
More information about the petsc-users
mailing list