https://bitbucket.org/petsc/petsc/pull-requests/852/change-fortran-seterra-and-seterrq-to-be/diff
"Smith, Barry F." <[email protected]> writes: >> On Jan 31, 2018, at 3:17 PM, Jed Brown <[email protected]> wrote: >> >> "Smith, Barry F." <[email protected]> writes: >> >>>> On Jan 31, 2018, at 3:12 PM, Jed Brown <[email protected]> wrote: >>>> >>>> I think his point is that Fortran has a one-line if statement (no then >>>> and no endif), which simplifies the macro and usage. >>>> >>>> if (cond) SETERRQ(...) >>> >>> That doesn't work because the SETERRQ() has both the call to the error >>> handler followed by a return which is two lines in Fortran. >> >> Ah, right. Would it make sense for PetscError to call MPI_Abort when >> called in this context? > > I don't think so. We want the traceback stack from Fortran as well as C, > hence we want to return and not just abort. > > Your proposed change (of pulling out the endif) is fine with me, I don't > think there are viable alternatives. > > Barry
