Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into fix…
Browse files Browse the repository at this point in the history
…-window-heat-emission
  • Loading branch information
xuanluo113 committed Mar 4, 2020
2 parents 616381b + 415a34b commit 26de1bf
Show file tree
Hide file tree
Showing 1,071 changed files with 269,954 additions and 31,452 deletions.
6 changes: 3 additions & 3 deletions .decent_ci-Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ compilers:
- "STGZ"
- "TGZ"
release_build_cmake_extra_flags: -DENABLE_REGRESSION_TESTING:BOOL=ON -DBUILD_DOCS:BOOL=ON
cmake_extra_flags: -DBUILD_DOCS:BOOL=ON -DTEX_INTERACTION="nonstopmode" -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=ON -DVALGRIND_ANALYZE_PERFORMANCE_TESTS:BOOL=ON
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_DOCS:BOOL=ON -DTEX_INTERACTION="nonstopmode" -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DBUILD_PERFORMANCE_TESTS:BOOL=ON -DVALGRIND_ANALYZE_PERFORMANCE_TESTS:BOOL=ON
collect_performance_results: true
s3_upload: doc-pdf
s3_upload_bucket: energyplus
Expand All @@ -31,7 +31,7 @@ compilers:
version: "7.4"
build_type: Debug
build_package_generator: "STGZ"
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 41.0
Expand All @@ -46,7 +46,7 @@ compilers:
version: "7.4"
build_type: Debug
build_package_generator: "STGZ"
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DLINK_WITH_PYTHON=ON -DBUILD_FORTRAN=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 68.0
Expand Down
3 changes: 2 additions & 1 deletion .decent_ci-MacOS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ compilers:
- IFW
- TGZ
release_build_cmake_extra_flags: -DBUILD_DOCS:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DOPENGL_REQUIRED:BOOL=ON -DLINK_WITH_PYTHON=ON

5 changes: 3 additions & 2 deletions .decent_ci-Windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ compilers:
build_package_generator:
- IFW
release_build_cmake_extra_flags: -DBUILD_DOCS:BOOL=ON -DTEX_INTERACTION="nonstopmode"
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DOPENGL_REQUIRED:BOOL=ON

- name: Visual Studio
version: 16
Expand All @@ -15,4 +15,5 @@ compilers:
- IFW
- ZIP
release_build_cmake_extra_flags: -DBUILD_DOCS:BOOL=ON -DTEX_INTERACTION="nonstopmode"
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF -DOPENGL_REQUIRED:BOOL=ON -DLINK_WITH_PYTHON=ON

79 changes: 51 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ endif()

if(GIT_FOUND)
execute_process(COMMAND "${GIT_EXECUTABLE}" "rev-parse" "--short=10" "HEAD"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
TIMEOUT 10
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE GIT_VERSION
Expand All @@ -54,6 +54,17 @@ else()
set(GIT_DIR "")
endif()

set( OPENGL_REQUIRED OFF CACHE BOOL "Require OpenGL in order to build" )
if(OPENGL_REQUIRED)
find_package(OpenGL)
if(NOT OPENGL_FOUND)
set(CMAKE_VERSION_BUILD "${CMAKE_VERSION_BUILD} (No OpenGL)" CACHE STRING "Build number" FORCE) # git sha
message(WARNING "OpenGL libraries were not found. EnergyPlus will be compiled without GPU acceleration capabilities.")
endif()
else()
set( OPENGL_FOUND FALSE )
endif()

# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
Expand All @@ -76,7 +87,7 @@ option( ENABLE_INSTALL_REMOTE "Enable install_remote and install_remote_plist co

mark_as_advanced( ENABLE_INSTALL_REMOTE )

# we are making python a required dependency, so find it here
# we are making *a Python 3 Interpreter* a required dependency, so find it here
find_package(PythonInterp 3 REQUIRED)

if( BUILD_TESTING )
Expand Down Expand Up @@ -128,40 +139,48 @@ if (MINGW)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
endif ()

set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Products" )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Products" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Products" )

include(cmake/ProjectMacros.cmake)
include(cmake/CompilerFlags.cmake)

INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/btwxt/src )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/re2 )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/doj )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/nlohmann )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/valijson )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/ObjexxFCL/src/ )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/SQLite/ SYSTEM )
INCLUDE_DIRECTORIES( "${CMAKE_SOURCE_DIR}/third_party/Expat" "${CMAKE_SOURCE_DIR}/third_party/Expat/lib" SYSTEM )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/CLI/ )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/eigen/ )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Chromogenics/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Common/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Gases/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/MultiLayerOptics/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/SingleLayerOptics/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/SpectralAveraging/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Tarcog/include)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Viewer/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/btwxt/src )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/re2 )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/doj )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/nlohmann )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/valijson )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/ObjexxFCL/src/ )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/SQLite/ SYSTEM )
INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/third_party/Expat" "${PROJECT_SOURCE_DIR}/third_party/Expat/lib" SYSTEM )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/CLI/ )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/eigen/ )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Chromogenics/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Common/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Gases/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/MultiLayerOptics/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/SingleLayerOptics/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/SpectralAveraging/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Tarcog/include)
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/Windows-CalcEngine/src/Viewer/include)
if( OPENGL_FOUND )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/third_party/penumbra/include )
endif()

#### Create interface for JSON for Modern C++ so we can include it in targets
# add_library( ModernJSON INTERFACE )
# target_include_directories( ModernJSON INTERFACE "${CMAKE_SOURCE_DIR}/third_party/nlohmann" "${CMAKE_SOURCE_DIR}/third_party/doj" )
# target_include_directories( ModernJSON INTERFACE "${PROJECT_SOURCE_DIR}/third_party/nlohmann" "${PROJECT_SOURCE_DIR}/third_party/doj" )

set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE)


if( OPENGL_FOUND )
set(BUILD_PENUMBRA_TESTING ${BUILD_TESTING} CACHE BOOL "" FORCE)
endif()

if( BUILD_TESTING )
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(BUILD_GTEST ON CACHE BOOL "" FORCE)
Expand Down Expand Up @@ -199,7 +218,11 @@ ADD_SUBDIRECTORY(third_party/btwxt)
# Kiva
INCLUDE(third_party/cmake/kiva.cmake)

execute_process( COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/scripts/dev/generate_epJSON_schema/generate_epJSON_schema.py" "${CMAKE_SOURCE_DIR}" TIMEOUT 30 RESULT_VARIABLE generate_epJSON_schema_result)
if( OPENGL_FOUND )
ADD_SUBDIRECTORY(third_party/penumbra)
endif()

execute_process( COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/dev/generate_epJSON_schema/generate_epJSON_schema.py" "${PROJECT_SOURCE_DIR}" TIMEOUT 30 RESULT_VARIABLE generate_epJSON_schema_result)
if( ${generate_epJSON_schema_result} MATCHES ".*timeout.*" )
message(FATAL_ERROR "Generating epJSON Schema from IDD failed: ${generate_epJSON_schema_result}")
endif()
Expand Down Expand Up @@ -256,7 +279,7 @@ endif()

if( BUILD_PACKAGE )
# We handle everything in a dedicated cmake file
include(cmake/Install.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/Install.cmake)
endif()

if (BUILD_DOCS)
Expand Down
4 changes: 4 additions & 0 deletions cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
ADD_CXX_DEFINITIONS("-DOBJEXXFCL_ALIGN=64") # Align ObjexxFCL arrays to 64B
ADD_CXX_DEBUG_DEFINITIONS("-DOBJEXXFCL_ARRAY_INIT_DEBUG") # Initialize ObjexxFCL arrays to aid debugging

if (NOT OPENGL_FOUND)
add_definitions("-DEP_NO_OPENGL")
endif()

# Make sure expat is compiled as a static library
ADD_DEFINITIONS("-DXML_STATIC")

Expand Down
Loading

7 comments on commit 26de1bf

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-MacOS-10.13-clang: OK (2701 of 2703 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.
  • 1 test had: Table big diffs.
  • 1 test had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 687
  • Failed: 2

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2733 of 2735 tests passed, 2 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 2 tests had: Table small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 707
  • Failed: 2

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1315 of 1315 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (693 of 694 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 693
  • Timeout: 1

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix-window-heat-emission (xuanluo113) - Win64-Windows-10-VisualStudio-16: OK (2697 of 2699 tests passed, 1 test warnings)

Messages:\n

  • 1 test had: ESO big diffs.
  • 1 test had: Table big diffs.
  • 1 test had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 687
  • Failed: 2

Build Badge Test Badge

Please sign in to comment.