Skip to content

Commit

Permalink
Merge 3a2d9ae into ffa9e20
Browse files Browse the repository at this point in the history
  • Loading branch information
sgenie68 committed Oct 8, 2018
2 parents ffa9e20 + 3a2d9ae commit 896e210
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/base_routines.F90
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,12 @@ SUBROUTINE Enters(name,err,error,*)
CHARACTER(C_CHAR) :: cError(MAXSTRLEN)
REAL(DP) :: entersCPUTime,entersSystemTime
LOGICAL :: finished
LOGICAL :: needAlternate = .FALSE.
TYPE(RoutineListItemType), POINTER :: listRoutinePtr
TYPE(RoutineStackItemType), POINTER :: newRoutinePtr,routinePtr

!$OMP CRITICAL(ENTERS_1)
IF(diagOrTiming) THEN
!$OMP CRITICAL(ENTERS_1)
ALLOCATE(newRoutinePtr,STAT=err)
IF(err/=0) CALL FlagError("Could not allocate new routine stack item.",err,error,*999)
newRoutinePtr%diagnostics=.FALSE.
Expand Down Expand Up @@ -383,12 +384,22 @@ SUBROUTINE Enters(name,err,error,*)
ENDIF
ENDIF
ENDIF
!$OMP END CRITICAL(ENTERS_1)
ENDIF

RETURN
999 RETURN 1


goto 200
999 needAlternate=.TRUE.

200 continue
!$OMP END CRITICAL(ENTERS_1)

IF (needAlternate) then
RETURN 1
else
RETURN
endif


END SUBROUTINE Enters

!
Expand Down Expand Up @@ -430,8 +441,8 @@ SUBROUTINE Exits(name)
TYPE(VARYING_STRING) :: error
TYPE(RoutineStackItemType), POINTER :: previousRoutinePtr,routinePtr

!$OMP CRITICAL(EXITS_1)
IF(diagOrTiming) THEN
!$OMP CRITICAL(EXITS_1)
routinePtr=>routineStack%stackPointer
IF(ASSOCIATED(routinePtr)) THEN
previousRoutinePtr=>routinePtr%previousRoutine
Expand Down Expand Up @@ -526,10 +537,11 @@ SUBROUTINE Exits(name)

!ELSE ERROR????
ENDIF
!$OMP END CRITICAL(EXITS_1)
ENDIF

999 RETURN
999 continue
!$OMP END CRITICAL(EXITS_1)
RETURN

END SUBROUTINE Exits

Expand Down

0 comments on commit 896e210

Please sign in to comment.