<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 13 Jan 2020, at 4:38 PM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class=""><blockquote type="cite" class="">On Jan 13, 2020, at 9:32 AM, Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr" class="">pierre.jolivet@enseeiht.fr</a>> wrote:<br class=""><br class="">Hello,<br class="">This is actually two separate questions, sorry.<br class="">1) I’m looking for the Fortran equivalent of the following, but I couldn’t get any help looking at the sources.<br class=""> ierr = PetscOptionsBegin(PETSC_COMM_WORLD,"","","");CHKERRQ(ierr);<br class=""> ierr = PetscOptionsFList("-mat_type","Matrix type","MatSetType",MatList,deft,type,256,&flg);CHKERRQ(ierr);<br class=""> ierr = PetscOptionsEnd();CHKERRQ(ierr);<br class=""></blockquote><br class="">   These are based on C macros and have some funny arguments so would require all custom Fortran stubs and interfaces. Sorry no one has written them.<br class=""></div></div></blockquote><br class=""></div><div>OK. No big deal.</div><div>Another question about Fortran: what’s the equivalent of a NULL PetscErrorCode (*setup)(Mat, PetscReal, Vec, Vec, PetscReal, IS, void*)?</div><div>I’m passing a PETSC_NULL_FUNCTION but it doesn’t seem to do the job as I’m getting segmentation faults in C (for some architectures), the code goes in the if(setup) branch.</div><div><br class=""></div><div>I want to convert this: <a href="https://gitlab.com/petsc/petsc/blob/fbda2a43629902c7e64367d3e3c13db2ceb5b740/src/ksp/ksp/examples/tutorials/ex76.c#L68" class="">https://gitlab.com/petsc/petsc/blob/fbda2a43629902c7e64367d3e3c13db2ceb5b740/src/ksp/ksp/examples/tutorials/ex76.c#L68</a></div><div>Into (hopefully something similar to) this: <a href="https://gitlab.com/petsc/petsc/commit/fbda2a43629902c7e64367d3e3c13db2ceb5b740#42254f97b9989f77d6aa51f62644a282fc31f3fd_0_93" class="">https://gitlab.com/petsc/petsc/commit/fbda2a43629902c7e64367d3e3c13db2ceb5b740#42254f97b9989f77d6aa51f62644a282fc31f3fd_0_93</a></div><br class=""><div class="">Thanks in advance for bearing with me,</div><div class="">Pierre</div></body></html>