[petsc-dev] CHKERRQ vs PetscCall for Fortran? Which is the future?
Boyce Griffith
boyceg at gmail.com
Tue Apr 26 20:18:55 CDT 2022
> On Apr 26, 2022, at 8:12 PM, Barry Smith <bsmith at petsc.dev> wrote:
>
> I didn't like PetscCall(ierr) in Fortran because it is strange, even freakish. PetscCall(AFunction(args)) makes sense in C but IMHO "call AFunction(args,ierr); PetscCall(ierr)" looks weird, what are you calling? Nothing. I'd like to keep CHKERRQ(ierr) in Fortran and not support PetscCall(ierr) in Fortran.
I have to admit that I don’t really understand the C usage either, since unless I am misreading the code, PetscCall in C doesn’t actually “call” the function that is in its arguments, but rather “checks” the called function’s return value.
— Boyce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220426/34e2e589/attachment.html>
More information about the petsc-dev
mailing list