Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE EndEnergyPlus
! SUBROUTINE INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN December 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine causes the program to terminate when complete (no errors).
! METHODOLOGY EMPLOYED:
! Puts a message on output files.
! Closes files.
! Stops the program.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPrecisionGlobals
USE DataSystemVariables
USE DataTimings
USE DataErrorTracking
USE DataInterfaces, ONLY: ShowMessage
USE General, ONLY: RoundSigDigits
USE SolarShading, ONLY: ReportSurfaceErrors
USE ExternalInterface, ONLY: NumExternalInterfaces, CloseSocket, haveExternalInterfaceBCVTB
USE SQLiteProcedures, ONLY: UpdateSQLiteSimulationRecord, WriteOutputToSQLite
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: ETimeFmt="(I2.2,'hr ',I2.2,'min ',F5.2,'sec')"
! INTERFACE BLOCK SPECIFICATIONS
! see DataInterfaces
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER tempfl
INTEGER, EXTERNAL :: GetNewUnitNumber
CHARACTER(len=32) NumWarnings
CHARACTER(len=32) NumSevere
CHARACTER(len=32) NumWarningsDuringWarmup
CHARACTER(len=32) NumSevereDuringWarmup
CHARACTER(len=32) NumWarningsDuringSizing
CHARACTER(len=32) NumSevereDuringSizing
CHARACTER(len=32) Elapsed
INTEGER Hours ! Elapsed Time Hour Reporting
INTEGER Minutes ! Elapsed Time Minute Reporting
REAL(r64) Seconds ! Elapsed Time Second Reporting
INTEGER :: write_stat
IF(WriteOutputToSQLite) THEN
CALL UpdateSQLiteSimulationRecord(.true.,.true.)
ENDIF
CALL ReportSurfaceErrors
CALL ShowRecurringErrors
CALL SummarizeErrors
CALL CloseMiscOpenFiles
NumWarnings=RoundSigDigits(TotalWarningErrors)
NumWarnings=ADJUSTL(NumWarnings)
NumSevere=RoundSigDigits(TotalSevereErrors)
NumSevere=ADJUSTL(NumSevere)
NumWarningsDuringWarmup=RoundSigDigits(TotalWarningErrorsDuringWarmup)
NumWarningsDuringWarmup=ADJUSTL(NumWarningsDuringWarmup)
NumSevereDuringWarmup=RoundSigDigits(TotalSevereErrorsDuringWarmup)
NumSevereDuringWarmup=ADJUSTL(NumSevereDuringWarmup)
NumWarningsDuringSizing=RoundSigDigits(TotalWarningErrorsDuringSizing)
NumWarningsDuringSizing=ADJUSTL(NumWarningsDuringSizing)
NumSevereDuringSizing=RoundSigDigits(TotalSevereErrorsDuringSizing)
NumSevereDuringSizing=ADJUSTL(NumSevereDuringSizing)
Time_Finish=epElapsedTime()
if (Time_Finish < Time_Start) Time_Finish=Time_Finish+24.0d0*3600.0d0
Elapsed_Time=Time_Finish-Time_Start
#ifdef EP_Detailed_Timings
CALL epStopTime('EntireRun=')
#endif
Hours=Elapsed_Time/3600.0d0
Elapsed_Time=Elapsed_Time-Hours*3600.0d0
Minutes=Elapsed_Time/60.0d0
Elapsed_Time=Elapsed_Time-Minutes*60.0d0
Seconds=Elapsed_Time
IF (Seconds < 0.0d0) Seconds=0.0d0
WRITE(Elapsed,ETimeFmt) Hours,Minutes,Seconds
CALL ShowMessage('EnergyPlus Warmup Error Summary. During Warmup: '//TRIM(NumWarningsDuringWarmup)// &
' Warning; '//TRIM(NumSevereDuringWarmup)//' Severe Errors.')
CALL ShowMessage('EnergyPlus Sizing Error Summary. During Sizing: '//TRIM(NumWarningsDuringSizing)// &
' Warning; '//TRIM(NumSevereDuringSizing)//' Severe Errors.')
CALL ShowMessage('EnergyPlus Completed Successfully-- '//TRIM(NumWarnings)//' Warning; '//TRIM(NumSevere)//' Severe Errors;'// &
' Elapsed Time='//TRIM(Elapsed))
CALL DisplayString('EnergyPlus Run Time='//TRIM(Elapsed))
tempfl=GetNewUnitNumber()
open(tempfl,file='eplusout.end', Action='write',iostat=write_stat)
IF (write_stat /= 0) THEN
CALL DisplayString('EndEnergyPlus: Could not open file "eplusout.end" for output (write).')
ENDIF
write(tempfl,'(A)') 'EnergyPlus Completed Successfully-- '//TRIM(NumWarnings)//' Warning; '//TRIM(NumSevere)// &
' Severe Errors;'//' Elapsed Time='//TRIM(Elapsed)
close(tempfl)
#ifdef EP_Detailed_Timings
CALL epSummaryTimes(Time_Finish-Time_Start)
#endif
CALL CloseOutOpenFiles
! Close the ExternalInterface socket. This call also sends the flag "1" to the ExternalInterface,
! indicating that E+ finished its simulation
IF ((NumExternalInterfaces > 0).AND. haveExternalInterfaceBCVTB) CALL CloseSocket(1)
STOP 'EnergyPlus Completed Successfully.'
RETURN
END SUBROUTINE EndEnergyPlus