MODULE trace INTEGER,SAVE :: markId CONTAINS SUBROUTINE init_trace IMPLICIT NONE #ifdef VTRACE #include #endif #ifdef VTRACE VT_MARKER_DEF("marker", VT_MARKER_TYPE_HINT, markId) #endif END SUBROUTINE init_trace SUBROUTINE trace_start(name) IMPLICIT NONE CHARACTER(LEN=*),INTENT(IN) :: name #ifdef VTRACE #include #endif !$OMP MASTER #ifdef VTRACE VT_USER_START(name) #endif !$OMP END MASTER END SUBROUTINE trace_start SUBROUTINE trace_end(name) IMPLICIT NONE #ifdef VTRACE #include #endif CHARACTER(LEN=*),INTENT(IN) :: name !$OMP MASTER #ifdef VTRACE VT_USER_END(name) #endif !$OMP END MASTER END SUBROUTINE trace_end SUBROUTINE Marker(name) IMPLICIT NONE CHARACTER(LEN=*),INTENT(IN) :: name #ifdef VTRACE #include #endif !$OMP MASTER #ifdef VTRACE VT_MARKER(markId,name) #endif !$OMP END MASTER END SUBROUTINE Marker END MODULE trace