[petsc-dev] PetscCheck__FUNCT__ and PETSC_FUNCTION_NAME

Blaise Bourdin bourdin at lsu.edu
Thu Oct 7 14:15:31 CDT 2010


As of changeset 16818, it looks like PetscFunctionBegin checks for consistency of PETSC_FUNCTION_NAME (which is set in $PETSC_ARCH/include/petscconf.h to __func__ ) and __FUNCT__, which is user set

This is a problem when __FUNCT__ as been set purposely (or not) to not match __func__ 
Tao, for instance does a lot of 
#undef __FUNCT__
#define __FUNCT__ "TaoVecPetsc::Clone"
int TaoVecPetsc::Clone(TaoVec**ntv){
In thus, case __func__ (and hence PETSC_FUNCTION_NAME ) is Clone, and PetscCheck__FUNCT__ complains (I only checked with the intel compilers on mac OS).

Would it be possible to relax PetscCheck__FUNCT__ or to have PETSC_FUNCTION_NAME set to __func__ only if __FUNCT__ is not defined?
If petsc is using PETSC_FUNCTION_NAME everywhere, do we even need __FUNCT__?

Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin

More information about the petsc-dev mailing list