[petsc-dev] Help tracking down unexpected Fortran behavior

Patrick Sanan patrick.sanan at gmail.com
Mon Dec 6 04:20:26 CST 2021


I ran into an unexpected seg fault, which took me too long to realize was
because of the old-school "you forgot the ierr" mistake! I was expecting
the compiler to complain, since we've had better checking for a while. E.g.
as in the attached code to reproduce, my compiler indeed errors on this

    call PCSetType(pc, PCLU)

but not this

   call PCFactorSetMatOrderingType(pc, MATORDERINGEXTERNAL)

I'm not yet seeing what the difference is, but there is still plenty I
don't understand about how the custom fortran interfaces work. E.g. both of
those functions have custom interfaces in ftn-custom directories, accepting
an additional "len" argument to be used with FIXCHAR(), but I'm  not sure
how that argument is ultimately populated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211206/cf22c0cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex999f.F90
Type: application/octet-stream
Size: 2732 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211206/cf22c0cc/attachment.obj>


More information about the petsc-dev mailing list