[petsc-users] EPSKrylovSchurSetDetectZeros() not working
Hassan Md Mahmudulla
mhassan at miners.utep.edu
Sun Jul 24 14:56:30 CDT 2016
Hi Jose,
I don't think that my PETSc configuration doesn't have MUMPS. I configured that myself. I also got the output from this if-else code section
ierr = PetscPrintf(PETSC_COMM_WORLD, "PETSC_HAVE_MUMPS\n");CHKERRQ(ierr);
which works from inside of the if-else section.
Please take a look at the configuration info from the error output also:
[0]PETSC ERROR: Configure options --COPTFLAGS=-O2 -no-ipo -g -qopt-report=5 -dynamic --CXXOPTFLAGS=-O2 -no-ipo -g -qopt-report=5 -dynamic --FOPTFLAGS=-O2 -no-ipo -g -qopt-report=5 -dynamic --with-mpiexec=srun --with-cc=cc --with-clib-autodetect=0 --with-cxx=CC --with-cxxlib-autodetect=0 --with-debugging=0 --with-fc=ftn --with-fortranlib-autodetect=0 --with-mpiexec=srun --with-shared-libraries=0 --with-x=0 LIBS=-lstdc++ PETSC_ARCH=arch-edison-opt64-intel --download-mumps --download-ptscotch --download-scalapack --download-metis --download-parmetis
Thanks,
M Hassan
________________________________
From: Jose E. Roman <jroman at dsic.upv.es>
Sent: Sunday, July 24, 2016 1:46:28 PM
To: Hassan Md Mahmudulla
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] EPSKrylovSchurSetDetectZeros() not working
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160724/ea8c55db/attachment-0001.html>
More information about the petsc-users
mailing list