<div dir="ltr">Seems like the MatMFFDSetBase is now broken in petsc 3.9<div><br></div><div>In 3.7 I used: </div><div><br></div><div>call MatMFFDSetBase(dRdW, wVec, PETSC_NULL_OBJECT, ierr)</div><div><br></div><div>and the most logical translation is now</div><div><br></div><div><div>call MatMFFDSetBase(dRdW, wVec, PETSC_NULL_VEC, ierr)</div></div><div><br></div><div>Unfortunately this just segfaults:</div><div><div>#0  VecAXPY (y=y@entry=0x10a3750, alpha=alpha@entry=-1, x=x@entry=0xffffffffffffffff) at /nobackup/gkenway/packages/petsc-3.9.2/src/vec/vec/interface/rvector.c:601</div><div>#1  0x00007fffb697faae in MatMult_MFFD (mat=0x291a150, a=0x10b25c0, y=0x10a3750) at /nobackup/gkenway/packages/petsc-3.9.2/src/mat/impls/mffd/mffd.c:368</div><div>#2  0x00007fffb6847af2 in MatMult (mat=0x291a150, x=x@entry=0x10b25c0, y=y@entry=0x10a3750) at /nobackup/gkenway/packages/petsc-3.9.2/src/mat/interface/matrix.c:2305</div><div>#3  0x00007fffb6e982e7 in PCApplyBAorAB (pc=0xe64d00, side=PC_RIGHT, x=0x10aaee0, y=y@entry=0x10a3750, work=0x10b25c0) at /nobackup/gkenway/packages/petsc-3.9.2/src/ksp/pc/interface/precon.c:680</div><div>#4  0x00007fffb6f02b84 in KSP_PCApplyBAorAB (w=<optimized out>, y=0x10a3750, x=<optimized out>, ksp=0xf135e0) at /u/wk/gkenway/scratch/packages/petsc-3.9.2/include/petsc/private/kspimpl.h:304</div><div>#5  KSPGMRESCycle (itcount=itcount@entry=0x7fffffffb73c, ksp=ksp@entry=0xf135e0) at /nobackup/gkenway/packages/petsc-3.9.2/src/ksp/ksp/impls/gmres/gmres.c:152</div><div>#6  0x00007fffb6f035c2 in KSPSolve_GMRES (ksp=0xf135e0) at /nobackup/gkenway/packages/petsc-3.9.2/src/ksp/ksp/impls/gmres/gmres.c:234</div><div>#7  0x00007fffb6f35050 in KSPSolve (ksp=0xf135e0, b=0xf7ced0, x=0xf77be0) at /nobackup/gkenway/packages/petsc-3.9.2/src/ksp/ksp/interface/itfunc.c:669</div><div>#8  0x00007fffb6f482ee in kspsolve_ (ksp=ksp@entry=0x7fffb461bae8 <__anksolver_MOD_ank_ksp>, b=<optimized out>, b@entry=0x7fffb461b9c8 <__anksolver_MOD_rvec>, x=<optimized out>, </div><div>    x@entry=0x7fffb461ba18 <__anksolver_MOD_deltaw>, ierr=ierr@entry=0x7fffffffb938) at /nobackup/gkenway/packages/petsc-3.9.2/src/ksp/ksp/interface/ftn-custom/zitfuncf.c:54</div><div>#9  0x00007fffb3d7e697 in anksolver::ankstep (firstcall=<optimized out>) at ../NKSolver/NKSolvers.F90:2891</div><div>#10 0x00007fffb3ebbbb9 in solvers::solvestate () at ../solver/solvers.F90:1114</div><div>#11 0x00007fffb3ebe285 in solvers::solver () at ../solver/solvers.F90:69</div><div>#12 0x00007fffb3cfca17 in f2py_rout_libadflow_solvers_solver (capi_self=<optimized out>, capi_args=<optimized out>, capi_keywds=<optimized out>, f2py_func=0x7fffb3ebe0e0 <solvers::solver>)</div><div>    at libadflowmodule.c:6710</div><div>#13 0x00007fffb3cf85b3 in fortran_call (fp=<optimized out>, arg=<optimized out>, kw=<optimized out>) at /u/wk/gkenway/.local/lib/python2.7/site-packages/numpy/f2py/src/fortranobject.c:404</div><div>#14 0x00007ffff7a5aa63 in PyObject_Call () from /lib64/libpython2.7.so.1.0</div><div>#15 0x00007ffff7aef236 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0</div><div>#16 0x00007ffff7af603d in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0</div><div>#17 0x00007ffff7a7f978 in function_call () from /lib64/libpython2.7.so.1.0</div><div>#18 0x00007ffff7a5aa63 in PyObject_Call () from /lib64/libpython2.7.so.1.0</div><div>#19 0x00007ffff7a69a55 in instancemethod_call () from /lib64/libpython2.7.so.1.0</div><div>#20 0x00007ffff7a5aa63 in PyObject_Call () from /lib64/libpython2.7.so.1.0</div><div>#21 0x00007ffff7ab1e27 in slot_tp_call () from /lib64/libpython2.7.so.1.0</div><div>#22 0x00007ffff7a5aa63 in PyObject_Call () from /lib64/libpython2.7.so.1.0</div><div>#23 0x00007ffff7aef236 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0</div><div>#24 0x00007ffff7af603d in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0</div><div>#25 0x00007ffff7af6142 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0</div><div>#26 0x00007ffff7b0f57f in run_mod () from /lib64/libpython2.7.so.1.0</div><div>#27 0x00007ffff7b1073e in PyRun_FileExFlags () from /lib64/libpython2.7.so.1.0</div><div>#28 0x00007ffff7b119c9 in PyRun_SimpleFileExFlags () from /lib64/libpython2.7.so.1.0</div><div>#29 0x00007ffff7b22b7f in Py_Main () from /lib64/libpython2.7.so.1.0</div><div>#30 0x00007ffff6d3f3d5 in __libc_start_main () from /lib64/libc.so.6</div><div>#31 0x000000000040066e in _start ()</div></div><div><br></div><div>Thanks,</div><div><br></div><div>Gaetan</div><div><br></div><div><br></div><div><br></div><div><br></div></div>