[petsc-dev] PetscStackCall() and CHKMEMQ
Jed Brown
jedbrown at mcs.anl.gov
Mon Apr 1 11:01:02 CDT 2013
Many uses of PetscStackCall() are O(1) calls per iteration or
communication, thus I think acceptable in debug mode. But some of them
are called O(n) times, such as in gamg/agg.c:
/* QR */
ierr = PetscFPTrapPush(PETSC_FP_TRAP_OFF);CHKERRQ(ierr);
PetscStackCall("LAPACKgeqrf",LAPACKgeqrf_(&Mdata, &N, qqc, &LDA, TAU, WORK, &LWORK, &INFO));
ierr = PetscFPTrapPop();CHKERRQ(ierr);
PetscStackCall("LAPACKgeqrf",LAPACKgeqrf_(&Mdata, &N, qqc, &LDA, TAU, WORK, &LWORK, &INFO));
and in blockinvert.h. Presumably we need two versions of PetscCallStack,
one that is used to call "safe" functions or those that are only called
O(1) times, and one that is used to call "unsafe" or
performance-sensitive functions.
More information about the petsc-dev
mailing list