Re: [petsc-dev] PetscStackCall() and CHKMEMQ
Barry Smith <[email protected]> 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?
participants (1)
-
Jed Brown