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 CloseOutputFiles
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN June 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine closes all of the input and output files needed for
! an EnergyPlus run. It also prints the end of data marker for each
! output file.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataOutputs
USE OutputProcessor, ONLY: MaxRVariable,NumOfRVariable_Setup,NumOfRVariable_Sum,NumOfRVariable_Meter, &
MaxIVariable,NumOfIVariable_Setup,NumOfIVariable_Sum, &
NumOfRVariable,NumOfIVariable, &
NumEnergyMeters,NumVarMeterArrays, &
NumTotalRVariable,NumTotalIVariable, NumReportList, InstMeterCacheSize
USE OutputReportTabular, ONLY: maxUniqueKeyCount,MonthlyFieldSetInputCount
USE SolarShading, ONLY: maxNumberOfFigures, MAXHCArrayBounds
USE DataRunTimeLanguage
USE DataBranchNodeConnections, ONLY: NumOfNodeConnections, MaxNumOfNodeConnections
USE DataHeatBalance, ONLY: CondFDRelaxFactor, HeatTransferAlgosUsed, UseCondFD, CondFDRelaxFactorInput
USE General, ONLY: RoundSigDigits
USE DataSystemVariables !, ONLY: MaxNumberOfThreads,NumberIntRadThreads,iEnvSetThreads
USE DataSurfaces, ONLY: MaxVerticesPerSurface
USE DataTimings
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: EndOfDataFormat = '("End of Data")' ! Signifies the end of the data block in the output file
CHARACTER(len=*), PARAMETER :: ThreadingHeader = '! <Program Control Information:Threads/Parallel Sims>, '// &
'Threading Supported,Maximum Number of Threads, Env Set Threads (OMP_NUM_THREADS), '// &
'EP Env Set Threads (EP_OMP_NUM_THREADS), IDF Set Threads, Number of Threads Used (Interior Radiant Exchange), '// &
'Number Nominal Surfaces, Number Parallel Sims'
CHARACTER(len=*), PARAMETER :: fmtA='(A)'
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER EchoInputFile ! found unit number for 'eplusout.audit'
INTEGER, EXTERNAL :: FindUnitNumber
CHARACTER(len=10) :: cEnvSetThreads
CHARACTER(len=10) :: cepEnvSetThreads
CHARACTER(len=10) :: cIDFSetThreads
EchoInputFile=FindUnitNumber('eplusout.audit')
! Record some items on the audit file
WRITE (EchoInputFile,*) 'NumOfRVariable=',NumOfRVariable_Setup
WRITE (EchoInputFile,*) 'NumOfRVariable(Total)=',NumTotalRVariable
WRITE (EchoInputFile,*) 'NumOfRVariable(Actual)=',NumOfRVariable
WRITE (EchoInputFile,*) 'NumOfRVariable(Summed)=',NumOfRVariable_Sum
WRITE (EchoInputFile,*) 'NumOfRVariable(Meter)=',NumOfRVariable_Meter
WRITE (EchoInputFile,*) 'NumOfIVariable=',NumOfIVariable_Setup
WRITE (EchoInputFile,*) 'NumOfIVariable(Total)=',NumTotalIVariable
WRITE (EchoInputFile,*) 'NumOfIVariable(Actual)=',NumOfIVariable
WRITE (EchoInputFile,*) 'NumOfIVariable(Summed)=',NumOfIVariable_Sum
WRITE (EchoInputFile,*) 'MaxRVariable=',MaxRVariable
WRITE (EchoInputFile,*) 'MaxIVariable=',MaxIVariable
WRITE (EchoInputFile,*) 'NumEnergyMeters=',NumEnergyMeters
WRITE (EchoInputFile,*) 'NumVarMeterArrays=',NumVarMeterArrays
WRITE (EchoInputFile,*) 'maxUniqueKeyCount=',maxUniqueKeyCount
WRITE (EchoInputFile,*) 'maxNumberOfFigures=',maxNumberOfFigures
WRITE (EchoInputFile,*) 'MAXHCArrayBounds=',MAXHCArrayBounds
WRITE (EchoInputFile,*) 'MaxVerticesPerSurface=',MaxVerticesPerSurface
WRITE (EchoInputFile,*) 'NumReportList=',NumReportList
WRITE (EchoInputFile,*) 'InstMeterCacheSize=',InstMeterCacheSize
IF (SutherlandHodgman) THEN
WRITE (EchoInputFile,*) 'ClippingAlgorithm=SutherlandHodgman'
ELSE
WRITE (EchoInputFile,*) 'ClippingAlgorithm=ConvexWeilerAtherton'
ENDIF
WRITE (EchoInputFile,*) 'MonthlyFieldSetInputCount=',MonthlyFieldSetInputCount
WRITE (EchoInputFile,*) 'NumConsideredOutputVariables=',NumConsideredOutputVariables
WRITE (EchoInputFile,*) 'MaxConsideredOutputVariables=',MaxConsideredOutputVariables
WRITE (EchoInputFile,*) 'numActuatorsUsed=',numActuatorsUsed
WRITE (EchoInputFile,*) 'numEMSActuatorsAvailable=',numEMSActuatorsAvailable
WRITE (EchoInputFile,*) 'maxEMSActuatorsAvailable=',maxEMSActuatorsAvailable
WRITE (EchoInputFile,*) 'numInternalVariablesUsed=',numInternalVariablesUsed
WRITE (EchoInputFile,*) 'numEMSInternalVarsAvailable=',numEMSInternalVarsAvailable
WRITE (EchoInputFile,*) 'maxEMSInternalVarsAvailable=',maxEMSInternalVarsAvailable
WRITE (EchoInputFile,*) 'NumOfNodeConnections=',NumOfNodeConnections
WRITE (EchoInputFile,*) 'MaxNumOfNodeConnections=',MaxNumOfNodeConnections
#ifdef EP_Count_Calls
WRITE (EchoInputFile,*) 'NumShadow_Calls=',NumShadow_Calls
WRITE (EchoInputFile,*) 'NumShadowAtTS_Calls=',NumShadowAtTS_Calls
WRITE (EchoInputFile,*) 'NumClipPoly_Calls=',NumClipPoly_Calls
WRITE (EchoInputFile,*) 'NumInitSolar_Calls=',NumInitSolar_Calls
WRITE (EchoInputFile,*) 'NumAnisoSky_Calls=',NumAnisoSky_Calls
WRITE (EchoInputFile,*) 'NumDetPolyOverlap_Calls=',NumDetPolyOverlap_Calls
WRITE (EchoInputFile,*) 'NumCalcPerSolBeam_Calls=',NumCalcPerSolBeam_Calls
WRITE (EchoInputFile,*) 'NumDetShadowCombs_Calls=',NumDetShadowCombs_Calls
WRITE (EchoInputFile,*) 'NumIntSolarDist_Calls=',NumIntSolarDist_Calls
WRITE (EchoInputFile,*) 'NumIntRadExchange_Calls=',NumIntRadExchange_Calls
WRITE (EchoInputFile,*) 'NumIntRadExchangeZ_Calls=',NumIntRadExchangeZ_Calls
WRITE (EchoInputFile,*) 'NumIntRadExchangeMain_Calls=',NumIntRadExchangeMain_Calls
WRITE (EchoInputFile,*) 'NumIntRadExchangeOSurf_Calls=',NumIntRadExchangeOSurf_Calls
WRITE (EchoInputFile,*) 'NumIntRadExchangeISurf_Calls=',NumIntRadExchangeISurf_Calls
WRITE (EchoInputFile,*) 'NumMaxInsideSurfIterations=',NumMaxInsideSurfIterations
WRITE (EchoInputFile,*) 'NumCalcScriptF_Calls=',NumCalcScriptF_Calls
#endif
WRITE (OutputFileStandard,EndOfDataFormat)
WRITE (OutputFileStandard,*) 'Number of Records Written=',StdOutputRecordCount
IF (StdOutputRecordCount > 0) THEN
CLOSE (OutputFileStandard)
ELSE
CLOSE (OutputFileStandard,STATUS='DELETE')
ENDIF
IF (ANY(HeatTransferAlgosUsed == UseCondFD)) THEN ! echo out relaxation factor, it may have been changed by the program
Write(OutputFileInits,'(A)') '! <ConductionFiniteDifference Numerical Parameters>, '// &
'Starting Relaxation Factor, Final Relaxation Factor'
Write(OutputFileInits,'(A)') 'ConductionFiniteDifference Numerical Parameters, '// &
TRIM(RoundSigDigits(CondFDRelaxFactorInput,3)) // ', '// &
TRIM(RoundSigDigits(CondFDRelaxFactor,3))
ENDIF
! Report number of threads to eio file
IF (Threading) THEN
IF (iEnvSetThreads == 0) THEN
cEnvSetThreads='Not Set'
ELSE
cEnvSetThreads=RoundSigDigits(iEnvSetThreads)
ENDIF
IF (iepEnvSetThreads == 0) THEN
cepEnvSetThreads='Not Set'
ELSE
cepEnvSetThreads=RoundSigDigits(iepEnvSetThreads)
ENDIF
IF (iIDFSetThreads == 0) THEN
cIDFSetThreads='Not Set'
ELSE
cIDFSetThreads=RoundSigDigits(iIDFSetThreads)
ENDIF
IF (lnumActiveSims) THEN
Write(OutputFileInits,fmtA) ThreadingHeader
Write(OutputFileInits,'(A)') 'Program Control:Threads/Parallel Sims, Yes,'// &
TRIM(RoundSigDigits(MaxNumberOfThreads)) // ', '// &
TRIM(cEnvSetThreads) // ', '// &
TRIM(cepEnvSetThreads) // ', '// &
TRIM(cIDFSetThreads) // ', '// &
TRIM(RoundSigDigits(NumberIntRadThreads)) // ', '// &
TRIM(RoundSigDigits(iNominalTotSurfaces)) // ', '// &
TRIM(RoundSigDigits(inumActiveSims))
ELSE
Write(OutputFileInits,fmtA) ThreadingHeader
Write(OutputFileInits,'(A)') 'Program Control:Threads/Parallel Sims, Yes,'// &
TRIM(RoundSigDigits(MaxNumberOfThreads)) // ', '// &
TRIM(cEnvSetThreads) // ', '// &
TRIM(cepEnvSetThreads) // ', '// &
TRIM(cIDFSetThreads) // ', '// &
TRIM(RoundSigDigits(NumberIntRadThreads)) // ', '// &
TRIM(RoundSigDigits(iNominalTotSurfaces)) // ', '// &
'N/A'
ENDIF
ELSE ! no threading
IF (lnumActiveSims) THEN
Write(OutputFileInits,fmtA) ThreadingHeader
Write(OutputFileInits,'(A)') 'Program Control:Threads/Parallel Sims, No,'// &
TRIM(RoundSigDigits(MaxNumberOfThreads)) // ', '// &
'N/A, N/A, N/A, N/A, N/A, '// &
TRIM(RoundSigDigits(inumActiveSims))
ELSE
Write(OutputFileInits,fmtA) ThreadingHeader
Write(OutputFileInits,'(A)') 'Program Control:Threads/Parallel Sims, No,'// &
TRIM(RoundSigDigits(MaxNumberOfThreads)) // ', '// &
'N/A, N/A, N/A, N/A, N/A, N/A'
ENDIF
ENDIF
! Close the Initialization Output File
WRITE (OutputFileInits,EndOfDataFormat)
CLOSE (OutputFileInits)
! Close the Meters Output File
WRITE (OutputFileMeters,EndOfDataFormat)
WRITE (OutputFileMeters,*) 'Number of Records Written=',StdMeterRecordCount
IF (StdMeterRecordCount > 0) THEN
CLOSE (OutputFileMeters)
ELSE
CLOSE (OutputFileMeters,STATUS='DELETE')
ENDIF
RETURN
END SUBROUTINE CloseOutputFiles