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

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


"Hammond, Glenn E" <gehammo at sandia.gov> writes:

> I target 80 characters (not sure where the 132 characters came from).  How long is the macro in Fortran?

include/finclude/petscsysdef.h:#define CHKERRQ(n) if (n .ne. 0) call MPI_Abort(PETSC_COMM_WORLD,n,n)

[Cc: petsc-dev]

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?
-------------- 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/1efcdfbc/attachment.sig>


More information about the petsc-dev mailing list