[petsc-dev] PetscStackCall() and CHKMEMQ

Jed Brown jedbrown at mcs.anl.gov
Mon Apr 1 11:33:20 CDT 2013


Barry Smith <bsmith at mcs.anl.gov> writes:

>    Is the only issue that PetscStackCall() has a CHKMEMQ() within it?

Yes, that's the only problem I have.

>    Otherwise it seems PetscStackCall() costs no more than any other
>    PETSc function call with PetscFunctionBegin/Return(). Perhaps it
>    could take a flag argument indicating if the memory check should be
>    performed? For BLAS/LAPACK assuming we've allocated enough work
>    space the memory check is likely not needed, should we have a
>    PetscStackCallBLASLAPACK() (that possibly even handles the info
>    flag when it exists?) which does not do a CHKMEMQ?

At present, BLAS/LAPACK is the only case I noticed where PetscStackCall
was used in a perf-sensitive place so I think PetscStackCallBLASLAPACK
is fine. Do you really want a macro that checks the error code too?



More information about the petsc-dev mailing list