Actual source code: zplog.c

     2:  #include src/fortran/custom/zpetsc.h
     3:  #include petscsys.h

      5: #ifdef PETSC_HAVE_FORTRAN_CAPS
      6: #define petsclogprintsummary_     PETSCLOGPRINTSUMMARY
      7: #define petsclogeventbegin_       PETSCLOGEVENTBEGIN
      8: #define petsclogeventend_         PETSCLOGEVENTEND
      9: #define petsclogflops_            PETSCLOGFLOPS
     10: #define petsclogallbegin_         PETSCLOGALLBEGIN
     11: #define petsclogdestroy_          PETSCLOGDESTROY
     12: #define petsclogbegin_            PETSCLOGBEGIN
     13: #define petsclogdump_             PETSCLOGDUMP
     14: #define petsclogeventregister_    PETSCLOGEVENTREGISTER
     15: #define petsclogstagepop_         PETSCLOGSTAGEPOP
     16: #define petsclogstageregister_    PETSCLOGSTAGEREGISTER
     17: #define petsclogclassregister_    PETSCLOGCLASSREGISTER
     18: #define petsclogstagepush_        PETSCLOGSTAGEPUSH
     19: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
     20: #define petsclogprintsummary_     petsclogprintsummary
     21: #define petsclogeventbegin_       petsclogeventbegin
     22: #define petsclogeventend_         petsclogeventend
     23: #define petsclogflops_            petsclogflops
     24: #define petsclogallbegin_         petsclogallbegin
     25: #define petsclogdestroy_          petsclogdestroy
     26: #define petsclogbegin_            petsclogbegin
     27: #define petsclogeventregister_    petsclogeventregister
     28: #define petsclogdump_             petsclogdump
     29: #define petsclogstagepop_         petsclogstagepop
     30: #define petsclogstageregister_    petsclogstageregister
     31: #define petsclogclassregister_    petsclogclassregister
     32: #define petsclogstagepush_        petsclogstagepush
     33: #endif

     37: void PETSC_STDCALL petsclogprintsummary_(MPI_Comm *comm,CHAR filename PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))
     38: {
     39: #if defined(PETSC_USE_LOG)
     40:   char *t;
     41:   FIXCHAR(filename,len,t);
     42:   *PetscLogPrintSummary((MPI_Comm)PetscToPointerComm(*comm),t);
     43:   FREECHAR(filename,t);
     44: #endif
     45: }

     49: void PETSC_STDCALL petsclogdump_(CHAR name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))
     50: {
     51: #if defined(PETSC_USE_LOG)
     52:   char *t1;
     53:   FIXCHAR(name,len,t1);
     54:   *PetscLogDump(t1);
     55:   FREECHAR(name,t1);
     56: #endif
     57: }
     58: void PETSC_STDCALL petsclogeventregister_(PetscEvent *e,CHAR string PETSC_MIXED_LEN(len),int *cookie,PetscErrorCode *ierr PETSC_END_LEN(len))
     59: {
     60: #if defined(PETSC_USE_LOG)
     61:   char *t1;
     62:   FIXCHAR(string,len,t1);
     63:   *PetscLogEventRegister(e,t1,*cookie);
     64:   FREECHAR(string,t1);
     65: #endif
     66: }
     67: void PETSC_STDCALL petsclogclassregister_(PetscCookie *e,CHAR string PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))
     68: {
     69: #if defined(PETSC_USE_LOG)
     70:   char *t1;
     71:   FIXCHAR(string,len,t1);

     73:   *PetscLogClassRegister(e,t1);
     74:   FREECHAR(string,t1);
     75: #endif
     76: }

     78: void PETSC_STDCALL petsclogallbegin_(PetscErrorCode *ierr){
     79: #if defined(PETSC_USE_LOG)
     80:   *PetscLogAllBegin();
     81: #endif
     82: }

     84: void PETSC_STDCALL petsclogdestroy_(PetscErrorCode *ierr){
     85: #if defined(PETSC_USE_LOG)
     86:   *PetscLogDestroy();
     87: #endif
     88: }

     90: void PETSC_STDCALL petsclogbegin_(PetscErrorCode *ierr){
     91: #if defined(PETSC_USE_LOG)
     92:   *PetscLogBegin();
     93: #endif
     94: }

     96: void PETSC_STDCALL petsclogeventbegin_(PetscEvent *e,PetscErrorCode *ierr){
     97:   *PetscLogEventBegin(*e,0,0,0,0);
     98: }

    100: void PETSC_STDCALL petsclogeventend_(PetscEvent *e,PetscErrorCode *ierr){
    101:   *PetscLogEventEnd(*e,0,0,0,0);
    102: }

    104: void PETSC_STDCALL petsclogflops_(int *f,PetscErrorCode *ierr) {
    105:   *PetscLogFlops(*f);
    106: }

    108: void PETSC_STDCALL petsclogstagepop_(PetscErrorCode *ierr)
    109: {
    110: #if defined(PETSC_USE_LOG)
    111:   *PetscLogStagePop();
    112: #endif
    113: }

    115: void PETSC_STDCALL petsclogstageregister_(int *stage,CHAR sname PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len))
    116: {
    117: #if defined(PETSC_USE_LOG)
    118:   char *t;
    119:   FIXCHAR(sname,len,t);
    120:   *PetscLogStageRegister(stage,t);
    121:   FREECHAR(sname,t);
    122: #endif
    123: }

    125: void PETSC_STDCALL petsclogstagepush_(int *stage,PetscErrorCode *ierr){
    126: #if defined(PETSC_USE_LOG)
    127:   *PetscLogStagePush(*stage);
    128: #endif
    129: }