Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into Ref…
Browse files Browse the repository at this point in the history
…ormat-eplusout-dbg-file
  • Loading branch information
rraustad committed Feb 25, 2024
2 parents 8f8f496 + 69e977a commit 85a4b3b
Show file tree
Hide file tree
Showing 1,175 changed files with 38,030 additions and 27,648 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build wheels

on:
# push:
# branches:
# - develop
# - wheel
# tags:
# - "*"

workflow_dispatch:
inputs:
ref:
description: 'The branch, tag, or SHA for which to run (eg: v22.1.0 or develop)'
required: true

jobs:
build_wheel:

strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
os: [ubuntu-22.04, macos-13, windows-2019]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout EnergyPlus
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: build wheels
run: |
pip install wheel
python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: energyplus-wheel-${{ matrix.os }}
path: ./dist
4 changes: 2 additions & 2 deletions .github/workflows/custom_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: '3.10'

- name: Custom Check
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout EnergyPlus
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: '3.10'

- name: Install System dependencies and LaTeX
shell: bash
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Build Docs
working-directory: ${{runner.workspace}}/EnergyPlus/doc/build
run: |
cmake --build . -j 2
cmake --build . -j 4
- name: Upload entire pdf folder
if: ${{ always() }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
- name: Checkout EnergyPlus
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: '3.10'

- name: Set up LaTeX
run: sudo apt update && sudo apt install -y texlive texlive-xetex texlive-science poppler-utils
Expand All @@ -30,7 +30,7 @@ jobs:

- name: Build Docs
working-directory: ${{runner.workspace}}/EnergyPlus/doc/build
run: cmake --build . -j 2
run: cmake --build . -j 4

- name: Upload Acknowledgments
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/epjson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Setup
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
- name: Build EnergyPlus
working-directory: ./build/
shell: bash
run: cmake --build . --target energyplus -j 2
run: cmake --build . --target energyplus -j 4
4 changes: 2 additions & 2 deletions .github/workflows/linux_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'
qtifw-version: '4.6.1'

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Build Package
working-directory: ./build
shell: bash
run: cmake --build . --target package -j 2
run: cmake --build . --target package -j 4

- name: Upload Tarball to release
uses: svenstaro/upload-release-action@v2
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/mac_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_TYPE: Release
FC: gfortran-11
FC: gfortran-13
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
Python_REQUIRED_VERSION: 3.8

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'
qtifw-version: '4.6.1'

- name: Install Python dependencies
run: |
Expand All @@ -65,6 +65,9 @@ jobs:
# The MACOSX_DEPLOYMENT_TARGET environment variable sets the default value for the CMAKE_OSX_DEPLOYMENT_TARGET variable.
# We use cmake commands to build some subprojects, so setting it globally
echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_dev_target }} >> $GITHUB_ENV
echo "Installing gcc@13 for gfortran support of -static-libquadmath"
brew list gcc@13 || brew install gcc@13
which gfortran-13 || echo "FC=$(brew --prefix gcc@13)/bin/gfortran-13" >> $GITHUB_ENV
- name: Create Build Directory
run: cmake -E make_directory ./build/
Expand All @@ -79,13 +82,28 @@ jobs:
-DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/${{ steps.setup-python.outputs.python-version }}/x64/ \
-DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON \
-DDOCUMENTATION_BUILD:STRING="BuildWithAll" -DTEX_INTERACTION:STRING="batchmode" \
-DENABLE_OPENMP:BOOL=OFF -DUSE_OpenMP:BOOL=OFF \
../
- name: Build Package
working-directory: ./build
shell: bash
run: cmake --build . --target package -j 3

- name: otool the exes and libs
shell: bash
working-directory: ./build
run: |
set -x
cd _CPack_Packages/Darwin/TGZ/EnergyPlus*/
otool -L ExpandObjects || true
otool -L ConvertInputFormat || true
otool -L energyplus || true
otool -L libenergyplusapi.dylib || true
otool -L PreProcess/IDFVersionUpdater/Transition-V23-1-0-to-V23-2-0 || true
otool -L PostProcess/ReadVarsESO || true
otool -L PostProcess/HVAC-Diagram || true
- name: Upload Tarball to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Setup QtIFW 4.x
uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.x'
qtifw-version: '4.6.1'

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Build Package
working-directory: ./build
shell: bash
run: cmake --build . --target package -j 2 --config $BUILD_TYPE
run: cmake --build . --target package -j 4 --config $BUILD_TYPE

- name: Upload Zip to release
uses: svenstaro/upload-release-action@v2
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ cppcheck.txt
# by default CLion uses cmake-build-debug as the build folder, so add that as well
cmake-build-*

# for wheel builds, we can also ignore a couple
build-wheel/
dist/
energyplus.egg-info
wheelhouse/

# App-specific project files, for example, for Geany IDE:
*.geany
.project
Expand Down
13 changes: 11 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ version: 2

sphinx:
configuration: doc/readthedocs/sphinx/conf.py
builder: html

build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- doxygen

# read the docs image build already includes sphinx-rtd-theme, so this isn't needed
# however, keeping it here and running it on RTD is a near zero cost operation and makes sure the requirements are ok
python:
install:
- requirements: doc/readthedocs/requirements.txt

submodules:
exclude: all
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ add_library(project_fp_options INTERFACE)

add_library(project_warnings INTERFACE)

add_library(turn_off_warnings INTERFACE)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
target_link_libraries(project_options INTERFACE Threads::Threads)
Expand Down Expand Up @@ -174,6 +176,7 @@ endif()

# we are making *a Python 3.6 Interpreter* a required dependency, so find it here
# If LINK_WITH_PYTHON, also request the Development (libs) at the same time, to ensure consistent version between interpreter and Development
# and ask for at least 3.8 (for the PyConfig stuff).
if(LINK_WITH_PYTHON)
# find_package(Python) has the problem that on github actions in particular it'll pick up the most recent python (eg 3.9) from the tool cache
# even if you have used the setup-python action and set it to 3.8, so we make the exact version required
Expand All @@ -184,7 +187,7 @@ if(LINK_WITH_PYTHON)
if(Python_REQUIRED_VERSION)
find_package(Python ${Python_REQUIRED_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED)
else()
find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED)
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
endif()
else()
find_package(Python 3.6 COMPONENTS Interpreter REQUIRED)
Expand Down Expand Up @@ -346,6 +349,8 @@ if(BUILD_TESTING)
set_target_properties(TestAPI_Runtime_C PROPERTIES FOLDER Testing)
set_target_properties(TestAPI_Functional_C PROPERTIES FOLDER Testing)
set_target_properties(TestEnergyPlusCallbacks PROPERTIES FOLDER Testing)
set_target_properties(TestAPI_RuntimeDeleteState_C PROPERTIES FOLDER Testing)
set_target_properties(TestAPI_RuntimeResetState_C PROPERTIES FOLDER Testing)
endif()

add_subdirectory(src/ConvertInputFormat)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.

NOTICE: This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In the meantime, while Decent CI is still handling the regression and bulkier te
[![](https://github.com/NREL/EnergyPlus/workflows/Linux%20Releases/badge.svg)](https://github.com/NREL/EnergyPlus/actions/workflows/linux_release.yml)

EnergyPlus is released twice annually, usually in March and September.
It is recommended all use of EnergyPlus is production workflows use these formal, public releases.
It is recommended all use of EnergyPlus in production workflows use these formal, public releases.
Iteration **(pre-)releases** may be created during a development cycle, however users should generally avoid these, as input syntax may change which won't be supported by the major release version transition tools, and could require manual intervention to remedy.
If an interim release is intended for active use by users, such as a bug-fix-only or performance-only re-release, it will be clearly specified on the release notes and a public announcement will accompany this type of release.
Our releases are now built by Github Actions.
Expand Down
25 changes: 22 additions & 3 deletions cmake/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ if(MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")) # Visual C++ (VS
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/RTCsu>) # Runtime checks
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:/fp:strict>) # Floating point model
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/DMSVC_DEBUG>) # Triggers code in main.cc to catch floating point NaNs

target_compile_options(turn_off_warnings INTERFACE /W0)

elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # g++/Clang

# TODO: after we fix all test, enable this by default on Debug builds
Expand All @@ -86,9 +89,10 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O

# COMPILER FLAGS
target_compile_options(project_options INTERFACE -pipe) # Faster compiler processing
target_compile_options(project_warnings INTERFACE -Wpedantic
)# Turn on warnings about constructs/situations that may be non-portable or outside of the standard
target_compile_options(project_warnings INTERFACE -Wall -Wextra) # Turn on warnings
target_compile_options(project_warnings INTERFACE -Wpedantic)
# Turn on warnings about constructs/situations that may be non-portable or outside of the standard
target_compile_options(project_warnings INTERFACE -Wall) # Turn on warnings
target_compile_options(project_warnings INTERFACE -Wextra) # Turn on warnings
target_compile_options(project_warnings INTERFACE -Wno-unknown-pragmas)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)
target_compile_options(project_warnings INTERFACE -Wno-deprecated-copy)
Expand All @@ -101,6 +105,16 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
target_compile_options(project_warnings INTERFACE -Wno-unused-but-set-parameter -Wno-unused-but-set-variable)
target_compile_options(project_warnings INTERFACE -Wno-maybe-uninitialized)
target_compile_options(project_warnings INTERFACE -Wno-aggressive-loop-optimizations)
# Sadly, GCC 13.2 is throwing many false positives on dangling references and compile time array-bounds
# https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=6b927b1297e66e26e62e722bf15c921dcbbd25b9
# https://trofi.github.io/posts/264-gcc-s-new-Wdangling-reference-warning.html
target_compile_options(project_warnings INTERFACE -Wno-dangling-reference)
# The array-bounds appears to be problematic as well depending on the optimization level chosen
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100430
target_compile_options(project_warnings INTERFACE -Wno-array-bounds)
# depending on the level of overflow check selected, the stringop-overflow can also emit false positives
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow
target_compile_options(project_warnings INTERFACE -Wno-stringop-overflow)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
# Suppress unused-but-set warnings until more serious ones are addressed
Expand Down Expand Up @@ -139,6 +153,8 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
target_compile_options(project_options INTERFACE $<$<CONFIG:Release>:-fno-stack-protector>)
# ADD_CXX_RELEASE_DEFINITIONS("-Ofast") # -Ofast (or -ffast-math) needed to auto-vectorize floating point loops

target_compile_options(turn_off_warnings INTERFACE -w)

elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")

# Disabled Warnings: Enable some of these as more serious warnings are addressed
Expand Down Expand Up @@ -192,6 +208,8 @@ elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:/Qfp-stack-check>)
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/traceback>) # Enables traceback on error

target_compile_options(turn_off_warnings INTERFACE /w)

elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")

# Disabled Warnings: Enable some of these as more serious warnings are addressed
Expand Down Expand Up @@ -237,6 +255,7 @@ elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:-fp-stack-check>) # Check the floating point stack after every function call
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:-traceback>) # Enables traceback on error

target_compile_options(turn_off_warnings INTERFACE -w)
endif() # COMPILER TYPE

# Add Color Output if Using Ninja:
Expand Down
1 change: 1 addition & 0 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ install(CODE "execute_process(COMMAND \"${Python_EXECUTABLE}\" \"${PROJECT_SOURC
install(FILES "${DOCS_OUT}/ExampleFiles-ObjectsLink.html" DESTINATION "./ExampleFiles/" COMPONENT ExampleFiles)

option(BUILD_CHANGELOG "Build a changelog for this package -- requires GITHUB_TOKEN in environment" OFF)
mark_as_advanced(FORCE BUILD_CHANGELOG)
if(BUILD_CHANGELOG)
# build the change log, only if we do have a github token in the environment
# Watch out! GITHUB_TOKEN could go out of scope by the time install target is run.
Expand Down
Loading

0 comments on commit 85a4b3b

Please sign in to comment.