[petsc-users] EPSKrylovSchurSetDetectZeros() not working

Jose E. Roman jroman at dsic.upv.es
Sun Jul 24 14:46:28 CDT 2016


The PETSc configuration you are using (PETSC_ARCH) does not have MUMPS. You have to add the appropiate options to PETSc's configure script.

> El 24 jul 2016, a las 21:31, Hassan Md Mahmudulla <mhassan at miners.utep.edu> escribió:
> 
> Hi Jose, 
> Here is the part of the code:
> 
>   ierr = STSetType(st,STSINVERT);CHKERRQ(ierr);
> 
>   ierr = STGetKSP(st,&ksp);CHKERRQ(ierr);
>   ierr = KSPSetType(ksp,KSPPREONLY);CHKERRQ(ierr);
>   ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr);
>   ierr = PCSetType(pc,PCCHOLESKY);CHKERRQ(ierr);
> 
> #if defined(PETSC_HAVE_MUMPS)
> #if defined(PETSC_USE_COMPLEX)
>   SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP,"Spectrum slicing with MUMPS is not available for complex scalars");
> #endif
>   ierr = PetscPrintf(PETSC_COMM_WORLD, "PETSC_HAVE_MUMPS\n");CHKERRQ(ierr);
>   ierr = EPSKrylovSchurSetDetectZeros(eps,PETSC_TRUE);CHKERRQ(ierr);  /* enforce zero detection */
>   ierr = PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);CHKERRQ(ierr);
>   /*
>      Add several MUMPS options (currently there is no better way of setting this in program):
>      '-mat_mumps_icntl_13 1': turn off ScaLAPACK for matrix inertia
>      '-mat_mumps_icntl_24 1': detect null pivots in factorization (for the case that a shift is equal to an eigenvalue)
>      '-mat_mumps_cntl_3 <tol>': a tolerance used for null pivot detection (must be larger than machine epsilon)
> 
>      Note: depending on the interval, it may be necessary also to increase the workspace:
>      '-mat_mumps_icntl_14 <percentage>': increase workspace with a percentage (50, 100 or more)
>   */
>   ierr = PetscOptionsInsertString(NULL,"-mat_mumps_icntl_13 1 -mat_mumps_icntl_24 1 -mat_mumps_cntl_3 1e-12");CHKERRQ(ierr);
> #endif
> 
>   /*
>      Set solver parameters at runtime
>   */
>   ierr = EPSSetFromOptions(eps);CHKERRQ(ierr);
> 
> I am using MUMPS. Actually it's the example I said before. I didn't modify it that much.
> 
> 
> M Hassan



More information about the petsc-users mailing list