( can not get hotmail to mark or preserve markings on reply text, comments at bottom ) ________________________________________ From: John Peterson <jwpeter...@gmail.com> Sent: Monday, August 14, 2017 12:25 PM To: Mike Marchywka Cc: libmesh-users@lists.sourceforge.net Subject: Re: [Libmesh-users] "Unknown convergence flag!"
On Mon, Aug 14, 2017 at 5:20 AM, Mike Marchywka <marchy...@hotmail.com<mailto:marchy...@hotmail.com>> wrote: I started to get this message after changing parameters in the code excerpt below (MM_ERR is my debugging maco that prints to stderr with file/line info ) . I probably have pathological data due to algorithm and coding problems but curious if anyone has seen this flag come up or it is likely due to bug like memory corruption or linking incorrectly. Why doesn't the default case handler print the unknown reason number and line/file that generates this mystery message ? Thanks. typedef libMesh::LinearSolver< libMesh::Number > LiSolver; LiSolver * p=get_linear_solver(); p->solve(*matrix,0,*solution,*rhs,1e-18,5000); //p->solve(*matrix,0,*solution,*rhs,rtol,iters); m_reason=p->get_converged_reason(); MM_ERR(" got code solver "<<m_reason<<" "<<converged_string(m_reason)) Most likley code to be generating this message without actually stepping through it, https://libmesh.github.io/doxygen/classlibMesh_1_1PetscLinearSolver.html 1681 default : 1682 libMesh::err << "Unknown convergence flag!" << std::endl; 1683 return UNKNOWN_FLAG; What is "converged_string"? How about you just pass m_reason, which is an integer, to the macro and see if that fixes the problem. -- John Thanks. converged_string is my code to print it as a string ( yes this is probably not a good idea , I did find various libmesh enum string functions eventually lol) but the message is prior to that apparently coming from the switch statement line 1682 from the libmesh source link I posted. m_reason is whatever is returned from this AFAICT, template<typename T > LinearConvergenceReason libMesh::PetscLinearSolver< T >::get_converged_reason ( ) const and the default case complains to stderr but I have no way to tell immediately what the "reason" is returned from KSP. It would be easy to print this too. If this helps, here is what the thing is apparently linked to,. Is libmesh too old to recognize all the return codes from ksp or should I suspect corruption / flakey error ? Thanks. ldd a.out linux-vdso.so.1 => (0x00007ffff51c8000) libmesh_devel.so.0 => /home/marchywka/d/libmesh/libmesh-1.0.0/.libs/libmesh_devel.so.0 (0x00007f21bc8b0000) libpetsc.so.3.7 => /home/marchywka/d/petsc/petsc-3.7.3/arch-linux2-c-debug/lib/libpetsc.so.3.7 (0x00007f21bad6a000) libstdc++.so.6 => /home/marchywka/d/gcc/stage-4.9/usr/local/lib64/libstdc++.so.6 (0x00007f21baa58000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f21ba7a7000) libgomp.so.1 => /home/marchywka/d/gcc/stage-4.9/usr/local/lib64/libgomp.so.1 (0x00007f21ba590000) libgcc_s.so.1 => /home/marchywka/d/gcc/stage-4.9/usr/local/lib64/libgcc_s.so.1 (0x00007f21ba37a000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f21ba15d000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f21b9dbd000) libnetcdf.so.7 => /home/marchywka/d/libmesh/libmesh-1.0.0/contrib/netcdf/v4/liblib/.libs/libnetcdf.so.7 (0x00007f21b9ad7000) libvtkIOCore-7.0.so.1 => /usr/local/lib/libvtkIOCore-7.0.so.1 (0x00007f21b9829000) libvtkCommonCore-7.0.so.1 => /usr/local/lib/libvtkCommonCore-7.0.so.1 (0x00007f21b8f85000) libvtkCommonDataModel-7.0.so.1 => /usr/local/lib/libvtkCommonDataModel-7.0.so.1 (0x00007f21b8830000) libvtkFiltersCore-7.0.so.1 => /usr/local/lib/libvtkFiltersCore-7.0.so.1 (0x00007f21b7ef5000) libvtkIOXML-7.0.so.1 => /usr/local/lib/libvtkIOXML-7.0.so.1 (0x00007f21b7bc8000) libvtkImagingCore-7.0.so.1 => /usr/local/lib/libvtkImagingCore-7.0.so.1 (0x00007f21b77d2000) libvtkIOImage-7.0.so.1 => /usr/local/lib/libvtkIOImage-7.0.so.1 (0x00007f21b73f6000) libvtkImagingMath-7.0.so.1 => /usr/local/lib/libvtkImagingMath-7.0.so.1 (0x00007f21b71b3000) libvtkIOParallelXML-7.0.so.1 => /usr/local/lib/libvtkIOParallelXML-7.0.so.1 (0x00007f21b6f77000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f21b6d5e000) libslepc.so.3.7 => /home/marchywka/d/slepc/slepc-3.7.2/arch-linux2-c-debug/lib/libslepc.so.3.7 (0x00007f21b6663000) liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007f21b5a46000) libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00007f21b54dc000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f21b51a4000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f21b4f53000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f21b4ba3000) libmpifort.so.12 => /home/marchywka/d/petsc/petsc-3.7.3/arch-linux2-c-debug/lib/libmpifort.so.12 (0x00007f21b496a000) libgfortran.so.3 => /home/marchywka/d/gcc/stage-4.9/usr/local/lib64/libgfortran.so.3 (0x00007f21b464d000) libquadmath.so.0 => /home/marchywka/d/gcc/stage-4.9/usr/local/lib64/libquadmath.so.0 (0x00007f21b440f000) libmpicxx.so.12 => /home/marchywka/d/petsc/petsc-3.7.3/arch-linux2-c-debug/lib/libmpicxx.so.12 (0x00007f21b41e8000) libmpi.so.12 => /home/marchywka/d/petsc/petsc-3.7.3/arch-linux2-c-debug/lib/libmpi.so.12 (0x00007f21b3bfc000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f21b39f3000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f21b37ef000) /lib64/ld-linux-x86-64.so.2 (0x00007f21bdf08000) libvtkCommonExecutionModel-7.0.so.1 => /usr/local/lib/libvtkCommonExecutionModel-7.0.so.1 (0x00007f21b34e3000) libvtkzlib-7.0.so.1 => /usr/local/lib/libvtkzlib-7.0.so.1 (0x00007f21b32c6000) libvtksys-7.0.so.1 => /usr/local/lib/libvtksys-7.0.so.1 (0x00007f21b304a000) libvtkCommonMisc-7.0.so.1 => /usr/local/lib/libvtkCommonMisc-7.0.so.1 (0x00007f21b2e28000) libvtkCommonSystem-7.0.so.1 => /usr/local/lib/libvtkCommonSystem-7.0.so.1 (0x00007f21b2c14000) libvtkCommonTransforms-7.0.so.1 => /usr/local/lib/libvtkCommonTransforms-7.0.so.1 (0x00007f21b29e0000) libvtkCommonMath-7.0.so.1 => /usr/local/lib/libvtkCommonMath-7.0.so.1 (0x00007f21b27b7000) libvtkIOXMLParser-7.0.so.1 => /usr/local/lib/libvtkIOXMLParser-7.0.so.1 (0x00007f21b2594000) libvtkpng-7.0.so.1 => /usr/local/lib/libvtkpng-7.0.so.1 (0x00007f21b235e000) libvtktiff-7.0.so.1 => /usr/local/lib/libvtktiff-7.0.so.1 (0x00007f21b20f1000) libvtkmetaio-7.0.so.1 => /usr/local/lib/libvtkmetaio-7.0.so.1 (0x00007f21b1de2000) libvtkDICOMParser-7.0.so.1 => /usr/local/lib/libvtkDICOMParser-7.0.so.1 (0x00007f21b1b9b000) libvtkjpeg-7.0.so.1 => /usr/local/lib/libvtkjpeg-7.0.so.1 (0x00007f21b196e000) libvtkParallelCore-7.0.so.1 => /usr/local/lib/libvtkParallelCore-7.0.so.1 (0x00007f21b16d2000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f21b14b6000) libvtkexpat-7.0.so.1 => /usr/local/lib/libvtkexpat-7.0.so.1 (0x00007f21b1285000) libvtkIOLegacy-7.0.so.1 => /usr/local/lib/libvtkIOLegacy-7.0.so.1 (0x00007f21b0fc9000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f21b0dc5000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f21b0bbf000) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users