[petsc-dev] [EXTERNAL] Re: [pflotran-dev: 2196] Readability with CHKERRQ

Jed Brown jed at jedbrown.org
Mon Jul 21 15:18:19 CDT 2014


Nathan Collier <nathaniel.collier at gmail.com> writes:
>> > Since this doesn't provide error tracing, why can't we use the ierr
>> argument
>> > to make the wrapper do this abort instead?
>> >
>> > call PetscFunctionWithSeveralArgs(a,b,c,d,PetscErrAbort)
>> >
>> > Here, PetscErrAbort would be a special value similar to
>> PETSC_NULL_OBJECT.
>> > If the wrapper sees it, the wrapper aborts instead of returning.
>>  Thoughts?
>>
>
> Jed, I don't totally follow you here. Are you suggesting that the PETSc
> fortran wrapper itself could be made to call the Abort internally such that
> user codes do not need to do anything? If that is what you mean, then user
> code would have to check codes or configure with --with-errorchecking=0?

The idea is that if all a caller wants is to abort on error, they would
pass a special constant instead of 'ierr', in which case the wrapper
would abort instead of returning an error code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140721/bc25899a/attachment.sig>


More information about the petsc-dev mailing list