Valgrind reported many errors about string processing functionss of petsc. These error seems harmless, but really ugly.
Some are ==5137== Invalid read of size 8 ==5137== at 0x171A9EA: PetscStrlen (str.c:149) ==5137== by 0x171B272: PetscStrallocpy (str.c:185) ==5137== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5137== by 0x16C833A: PetscFListFind (reg.c:355) ==5137== by 0x1871568: MatSetType (matreg.c:62) ==5137== by 0x197B2D8: MatGetFactor_aij_mumps (mumps.c:1310) ==5137== by 0x1845DD3: MatGetFactor (matrix.c:3950) ==5137== by 0x1C9949F: PCSetUp_LU (lu.c:133) ==5137== by 0x1F5B26B: PCSetUp (precon.c:819) ==5137== by 0x1CEAD36: KSPSetUp (itfunc.c:260) ==5137== by 0x1CE67C3: KSPSolve (itfunc.c:379) ==5137== by 0x1DA4F08: SNES_KSPSolve (snes.c:3396) ==5137== Address 0xcc09e10 is 0 bytes inside a block of size 7 alloc'd ==5137== at 0x4A06936: memalign (vg_replace_malloc.c:694) ==5137== by 0x16D6EFA: PetscMallocAlign (mal.c:30) ==5137== by 0x171B2C0: PetscStrallocpy (str.c:186) ==5137== by 0x16DCD3A: PetscObjectChangeTypeName (pname.c:134) ==5137== by 0x1943A53: MatCreate_MPIAIJ (mpiaij.c:5528) ==5137== by 0x18715C9: MatSetType (matreg.c:73) ==5137== by 0x124790C: FVM_NonlinearSolver::setup_nonlinear_data() (fvm_nonlinear_solver.cc:214) ==5137== by 0x1143BF0: DDMSolverBase::create_solver() (ddm_solver.cc:66) ==5137== by 0xFD7442: DDM1Solver::create_solver() (ddm1.cc:46) ==5137== by 0xEC7A61: SolverControl::do_solve(Parser::Card const&) (control.cc:1081) ==5137== by 0xEB9688: SolverControl::mainloop() (control.cc:200) ==5137== by 0x141B97A: main (main.cc:225) ==5137== ==5139== Invalid read of size 8 ==5139== at 0x171A9EA: PetscStrlen (str.c:149) ==5139== by 0x171B272: PetscStrallocpy (str.c:185) ==5139== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5139== by 0x16C833A: PetscFListFind (reg.c:355) ==5139== by 0x1871568: MatSetType (matreg.c:62) ==5139== by 0x197B2D8: MatGetFactor_aij_mumps (mumps.c:1310) ==5139== by 0x1845DD3: MatGetFactor (matrix.c:3950) ==5139== by 0x1C9949F: PCSetUp_LU (lu.c:133) ==5139== by 0x1F5B26B: PCSetUp (precon.c:819) ==5139== by 0x1CEAD36: KSPSetUp (itfunc.c:260) ==5139== by 0x1CE67C3: KSPSolve (itfunc.c:379) ==5139== by 0x1DA4F08: SNES_KSPSolve (snes.c:3396) ==5139== Address 0xb1225e0 is 0 bytes inside a block of size 7 alloc'd ==5139== at 0x4A06936: memalign (vg_replace_malloc.c:694) ==5139== by 0x16D6EFA: PetscMallocAlign (mal.c:30) ==5139== by 0x171B2C0: PetscStrallocpy (str.c:186) ==5139== by 0x16DCD3A: PetscObjectChangeTypeName (pname.c:134) ==5139== by 0x1943A53: MatCreate_MPIAIJ (mpiaij.c:5528) ==5139== by 0x18715C9: MatSetType (matreg.c:73) ==5139== by 0x124790C: FVM_NonlinearSolver::setup_nonlinear_data() (fvm_nonlinear_solver.cc:214) ==5139== by 0x1143BF0: DDMSolverBase::create_solver() (ddm_solver.cc:66) ==5139== by 0xFD7442: DDM1Solver::create_solver() (ddm1.cc:46) ==5139== by 0xEC7A61: SolverControl::do_solve(Parser::Card const&) (control.cc:1081) ==5139== by 0xEB9688: SolverControl::mainloop() (control.cc:200) ==5139== by 0x141B97A: main (main.cc:225) ==5139== ==5136== Invalid read of size 8 ==5136== at 0x171A9EA: PetscStrlen (str.c:149) ==5136== by 0x171B272: PetscStrallocpy (str.c:185) ==5136== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5136== by 0x16C833A: PetscFListFind (reg.c:355) ==5136== by 0x1871568: MatSetType (matreg.c:62) ==5136== by 0x197B2D8: MatGetFactor_aij_mumps (mumps.c:1310) ==5136== by 0x1845DD3: MatGetFactor (matrix.c:3950) ==5136== by 0x1C9949F: PCSetUp_LU (lu.c:133) ==5136== by 0x1F5B26B: PCSetUp (precon.c:819) ==5136== by 0x1CEAD36: KSPSetUp (itfunc.c:260) ==5136== by 0x1CE67C3: KSPSolve (itfunc.c:379) ==5136== by 0x1DA4F08: SNES_KSPSolve (snes.c:3396) ==5136== Address 0xabde120 is 0 bytes inside a block of size 7 alloc'd ==5136== at 0x4A06936: memalign (vg_replace_malloc.c:694) ==5136== by 0x16D6EFA: PetscMallocAlign (mal.c:30) ==5136== by 0x171B2C0: PetscStrallocpy (str.c:186) ==5136== by 0x16DCD3A: PetscObjectChangeTypeName (pname.c:134) ==5136== by 0x1943A53: MatCreate_MPIAIJ (mpiaij.c:5528) ==5136== by 0x18715C9: MatSetType (matreg.c:73) ==5136== by 0x124790C: FVM_NonlinearSolver::setup_nonlinear_data() (fvm_nonlinear_solver.cc:214) ==5136== by 0x1143BF0: DDMSolverBase::create_solver() (ddm_solver.cc:66) ==5136== by 0xFD7442: DDM1Solver::create_solver() (ddm1.cc:46) ==5136== by 0xEC7A61: SolverControl::do_solve(Parser::Card const&) (control.cc:1081) ==5136== by 0xEB9688: SolverControl::mainloop() (control.cc:200) ==5136== by 0x141B97A: main (main.cc:225) ==5136== ==5138== Invalid read of size 8 ==5138== at 0x171A9EA: PetscStrlen (str.c:149) ==5138== by 0x171B272: PetscStrallocpy (str.c:185) ==5138== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5138== by 0x16C833A: PetscFListFind (reg.c:355) ==5138== by 0x1871568: MatSetType (matreg.c:62) ==5138== by 0x197B2D8: MatGetFactor_aij_mumps (mumps.c:1310) ==5138== by 0x1845DD3: MatGetFactor (matrix.c:3950) ==5138== by 0x1C9949F: PCSetUp_LU (lu.c:133) ==5138== by 0x1F5B26B: PCSetUp (precon.c:819) ==5138== by 0x1CEAD36: KSPSetUp (itfunc.c:260) ==5138== by 0x1CE67C3: KSPSolve (itfunc.c:379) ==5138== by 0x1DA4F08: SNES_KSPSolve (snes.c:3396) ==5138== Address 0xe316cb0 is 0 bytes inside a block of size 7 alloc'd ==5138== at 0x4A06936: memalign (vg_replace_malloc.c:694) ==5138== by 0x16D6EFA: PetscMallocAlign (mal.c:30) ==5138== by 0x171B2C0: PetscStrallocpy (str.c:186) ==5138== by 0x16DCD3A: PetscObjectChangeTypeName (pname.c:134) ==5138== by 0x1943A53: MatCreate_MPIAIJ (mpiaij.c:5528) ==5138== by 0x18715C9: MatSetType (matreg.c:73) ==5138== by 0x124790C: FVM_NonlinearSolver::setup_nonlinear_data() (fvm_nonlinear_solver.cc:214) ==5138== by 0x1143BF0: DDMSolverBase::create_solver() (ddm_solver.cc:66) ==5138== by 0xFD7442: DDM1Solver::create_solver() (ddm1.cc:46) ==5138== by 0xEC7A61: SolverControl::do_solve(Parser::Card const&) (control.cc:1081) ==5138== by 0xEB9688: SolverControl::mainloop() (control.cc:200) ==5138== by 0x141B97A: main (main.cc:225) and more ==5138== Conditional jump or move depends on uninitialised value(s) ==5138== at 0x171A9FA: PetscStrlen (str.c:149) ==5138== by 0x171B272: PetscStrallocpy (str.c:185) ==5138== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5138== by 0x16CA932: PetscFListAdd (reg.c:204) ==5138== by 0x1DA2D21: SNESRegister (snes.c:3059) ==5138== by 0x1D8AD1C: SNESRegisterAll (snesregi.c:48) ==5138== by 0x1DAF496: SNESInitializePackage (dlregissnes.c:53) ==5138== by 0x1DA6FE9: SNESCreate (snes.c:1051) ==5138== by 0x1246CD6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:158) ==5138== by 0x12500F6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:0) ==5138== by 0x11439E2: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:36) ==5138== by 0x114C0F8: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:0) ==5138== ==5138== Conditional jump or move depends on uninitialised value(s) ==5138== at 0x171B284: PetscStrallocpy (str.c:186) ==5138== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5138== by 0x16CA932: PetscFListAdd (reg.c:204) ==5138== by 0x1DA2D21: SNESRegister (snes.c:3059) ==5138== by 0x1D8AD1C: SNESRegisterAll (snesregi.c:48) ==5138== by 0x1DAF496: SNESInitializePackage (dlregissnes.c:53) ==5138== by 0x1DA6FE9: SNESCreate (snes.c:1051) ==5138== by 0x1246CD6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:158) ==5138== by 0x12500F6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:0) ==5138== by 0x11439E2: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:36) ==5138== by 0x114C0F8: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:0) ==5137== Conditional jump or move depends on uninitialised value(s) ==5137== at 0x171A9FA: PetscStrlen (str.c:149) ==5137== by 0x171B272: PetscStrallocpy (str.c:185) ==5137== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5137== by 0x16CA932: PetscFListAdd (reg.c:204) ==5137== by 0x1DA2D21: SNESRegister (snes.c:3059) ==5137== by 0x1D8AD1C: SNESRegisterAll (snesregi.c:48) ==5137== by 0x1DAF496: SNESInitializePackage (dlregissnes.c:53) ==5137== by 0x1DA6FE9: SNESCreate (snes.c:1051) ==5138== by 0xEB6E86: DDM1Solver::DDM1Solver(SimulationSystem&) (ddm1.h:37) ==5137== by 0x1246CD6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:158) ==5137== by 0x12500F6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:0) ==5137== by 0x11439E2: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:36) ==5137== by 0x114C0F8: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:0) ==5137== ==5137== Conditional jump or move depends on uninitialised value(s) ==5137== at 0x171B284: PetscStrallocpy (str.c:186) ==5137== by 0x16CAD73: PetscFListGetPathAndFunction (reg.c:24) ==5137== by 0x16CA932: PetscFListAdd (reg.c:204) ==5137== by 0x1DA2D21: SNESRegister (snes.c:3059) ==5137== by 0x1D8AD1C: SNESRegisterAll (snesregi.c:48) ==5137== by 0x1DAF496: SNESInitializePackage (dlregissnes.c:53) ==5137== by 0x1DA6FE9: SNESCreate (snes.c:1051) ==5137== by 0x1246CD6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:158) ==5137== by==5138== 0x12500F6: FVM_NonlinearSolver::FVM_NonlinearSolver(SimulationSystem&) (fvm_nonlinear_solver.cc:0) ==5137== by 0x11439E2: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:36) ==5137== by 0x114C0F8: DDMSolverBase::DDMSolverBase(SimulationSystem&) (ddm_solver.cc:0) ==5137== by 0xEB6E86: DDM1Solver::DDM1Solver(SimulationSystem&) (ddm1.h:37)
