[petsc-users] Multiple solves with PCMG fail

Mark Adams mfadams at lbl.gov
Mon Nov 10 08:26:45 CST 2014


It does not look like you are in fact using the branch with this fix.  The
branch code looks like:

if (n)  PetscValidScalarPointer(r,3);

*and*

if (n)  PetscValidScalarPointer(r,4);

So if you now put the check for argument 4 inside of your if statement then
you will have reimplemented my branch, or at least most of it, and I think
it might work or at least not give these errors.  I don't think we ever
fixed the issue that Cheby does will not have an eigen estimate now and so
you will probably see terrible performance.  I'm not sure if came up with a
fix for this.



On Mon, Nov 10, 2014 at 9:18 AM, Filippo Leonardi <
filippo.leonardi at sam.math.ethz.ch> wrote:

> Super late update, sorry.
>
> Not sure
> if I understood you correctly:
> if(n) {
>     PetscValidScalarPointer(r,3);
>     ierr = PetscPrintf(PETSC_COMM_WORLD, " ---> n = %d nonzero if.\n",
> n);CHKERRQ(ierr);
>   } else {
>     ierr = PetscPrintf(PETSC_COMM_WORLD, " ---> n = 0
> else.\n");CHKERRQ(ierr);
>   }
>
> I get (btw this is also the case with a single process):
> ./test1 -pc_type mg -pc_mg_levels 3
>
>  ---> n = 0 else.
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Null argument, when expecting valid pointer
> [0]PETSC ERROR: Null Pointer: Parameter # 4
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for
> trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.5.2-925-g233c798  GIT
> Date:
> 2014-11-03 17:44:15 -0700
> [0]PETSC ERROR: ./test1 on a arch-linux2-cxx-opt named Besikovitch-III by
> filippo Mon Nov 10 15:15:47 2014
> [0]PETSC ERROR: Configure options PETSC_ARCH=arch-linux2-cxx-opt
> [0]PETSC ERROR: #1 KSPComputeEigenvalues() line 125 in
>
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: #2 KSPChebyshevComputeExtremeEigenvalues_Private() line
> 328 in
>
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/ksp/impls/cheby/cheby.c
> [0]PETSC ERROR: #3 KSPSolve_Chebyshev() line 373 in
>
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/ksp/impls/cheby/cheby.c
> [0]PETSC ERROR: #4 KSPSolve() line 465 in /home/filippo/Workspace/petsc-
> git/ksp-zero-eig/src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: #5 PCMGMCycle_Private() line 19 in
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/pc/impls/mg/mg.c
> [0]PETSC ERROR: #6 PCApply_MG() line 337 in /home/filippo/Workspace/petsc-
> git/ksp-zero-eig/src/ksp/pc/impls/mg/mg.c
> [0]PETSC ERROR: #7 PCApply() line 440 in /home/filippo/Workspace/petsc-
> git/ksp-zero-eig/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: #8 KSP_PCApply() line 230 in /home/filippo/Workspace/petsc-
> git/ksp-zero-eig/include/petsc-private/kspimpl.h
> [0]PETSC ERROR: #9 KSPInitialResidual() line 63 in
>
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/ksp/interface/itres.c
> [0]PETSC ERROR: #10 KSPSolve_GMRES() line 234 in
>
> /home/filippo/Workspace/petsc-git/ksp-zero-eig/src/ksp/ksp/impls/gmres/gmres.c
> [0]PETSC ERROR: #11 KSPSolve() line 465 in /home/filippo/Workspace/petsc-
> git/ksp-zero-eig/src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: #12 main() line 149 in
> /home/filippo/Workspace/C++/MLMCTest/test1.cpp
> [0]PETSC ERROR: ----------------End of Error Message -------send entire
> error
> message to petsc-maint at mcs.anl.gov----------
>
> On Thursday 06 November 2014 11.27:59 you wrote:
> > if (n) PetscValidScalarPointer(r,3);
> > and put a print statement.  n==0 in your case when it fails.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141110/98c0b769/attachment.html>


More information about the petsc-users mailing list