[petsc-dev] PetscUse/TryMethod

Satish Balay balay at mcs.anl.gov
Sun Apr 3 10:25:50 CDT 2022


On Sun, 3 Apr 2022, Satish Balay via petsc-dev wrote:

> Just noticed - CHKERRQ() got removed from fortran interface - breaking pflotran
> 
> https://gitlab.com/xsdk-project/spack-xsdk/-/jobs/2285145624
> 
> [also CHKERRABORT]. Perhaps they can be added back in.
> 
> $ git diff release-3.16..release include/petsc/finclude/petscsys.h
> diff --git a/include/petsc/finclude/petscsys.h b/include/petsc/finclude/petscsys.h
> <snip>
>  #define SETERRABORT(c,ierr,s)  call PetscError(c,ierr,0,s); call MPI_Abort(c,ierr)
> -#define CHKERRQ(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);return;endif
> +#define PetscCall(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);return;endif
>  #define CHKERRA(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);call MPIU_Abort(PETSC_COMM_SELF,ierr);endif
> -#define CHKERRABORT(c,ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);call MPI_Abort(c,ierr);endif
> +#define PetscCallAbort(c,ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);call MPI_Abort(c,ierr);endif
>  #define CHKMEMQ call chkmemfortran(__LINE__,__FILE__,ierr)

https://gitlab.com/petsc/petsc/-/merge_requests/5073

Satish


More information about the petsc-dev mailing list