From 53839282cf6f800f27ffb489e4f9dee154a58e48 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 19 Sep 2024 17:15:31 +0200 Subject: [PATCH 01/13] Ship tcl and tk libs and get em signed up for macOS --- cmake/PythonCopyStandardLib.py | 1 - cmake/PythonFixUpOnMac.cmake | 17 ------- cmake/PythonFixUpTclTk.py | 62 ++++++++++++++++++++++++++ cmake/install_codesign_script.cmake | 2 +- src/EnergyPlus/CMakeLists.txt | 11 ++--- src/EnergyPlus/CommandLineInterface.cc | 5 --- 6 files changed, 69 insertions(+), 29 deletions(-) create mode 100644 cmake/PythonFixUpTclTk.py diff --git a/cmake/PythonCopyStandardLib.py b/cmake/PythonCopyStandardLib.py index fafbcbd3b0e..2c1a5e83434 100644 --- a/cmake/PythonCopyStandardLib.py +++ b/cmake/PythonCopyStandardLib.py @@ -122,7 +122,6 @@ def find_libs(dir_path): python_root_dir = os.path.dirname(standard_lib_dir) tcl_dir = os.path.join(python_root_dir, 'tcl') shutil.copytree(tcl_dir, target_dir, dirs_exist_ok=True) -# TODO: Need to do this on Mac as well, see the bottom of cmake/PythonFixUpOnMac.cmake for more info # then I'm going to try to clean up any __pycache__ folders in the target dir to reduce installer size for root, dirs, _ in os.walk(target_dir): diff --git a/cmake/PythonFixUpOnMac.cmake b/cmake/PythonFixUpOnMac.cmake index 21c2410dc69..615d04340a3 100644 --- a/cmake/PythonFixUpOnMac.cmake +++ b/cmake/PythonFixUpOnMac.cmake @@ -71,20 +71,3 @@ foreach(PREREQ IN LISTS PREREQUISITES) execute_process(COMMAND "install_name_tool" -change "${PREREQ}" "@loader_path/${LIB_INT_FILENAME}" "${LOCAL_PYTHON_LIBRARY}") endif() endforeach() - -##############3 -# we need to look into the tkinter binary's runtime dependencies, copy over the tcl and tk dylibs, update them with install_name_tool, and make sure they all get signed, like this: - -# libtcl -# cp /opt/homebrew/opt/tcl-tk/lib/libtcl8.6.dylib /path/to/python_lib/lib-dynload/ -# install_name_tool -change "/opt/homebrew/opt/tcl-tk/lib/libtcl8.6.dylib" "@loader_path/libtcl8.6.dylib" /path/to/python_lib/lib-dynload/_tkinter.cpython-312-darwin.so - -# Do the same for libtk -# cp /opt/homebrew/opt/tcl-tk/lib/libtk8.6.dylib /path/to/python_lib/lib-dynload/ -# install_name_tool -change "/opt/homebrew/opt/tcl-tk/lib/libtk8.6.dylib" "@loader_path/libtk8.6.dylib" /path/to/python_lib/lib-dynload/_tkinter.cpython-312-darwin.so - -# Resign _tkinter -# codesign -vvvv -s "Developer ID Application: National ..." -f --timestamp -i "org.nrel.EnergyPlus" -o runtime /path/to/python_lib/lib-dynload/_tkinter.cpython-312-darwin.so -# codesign -vvvv -s "Developer ID Application: National ..." -f --timestamp -i "org.nrel.EnergyPlus" -o runtime /path/to/python_lib/lib-dynload/libtcl8.6.dylib -# codesign -vvvv -s "Developer ID Application: National ..." -f --timestamp -i "org.nrel.EnergyPlus" -o runtime /path/to/python_lib/lib-dynload/libtk8.6.dylib -##############3 diff --git a/cmake/PythonFixUpTclTk.py b/cmake/PythonFixUpTclTk.py new file mode 100644 index 00000000000..d122a455beb --- /dev/null +++ b/cmake/PythonFixUpTclTk.py @@ -0,0 +1,62 @@ +import platform +import re +import shutil +import subprocess +import sys +from pathlib import Path + + +def locate_tk_so(python_dir: Path) -> Path: + sos = list(python_dir.glob("lib-dynload/_tkinter*.so")) + assert len(sos) == 1, "Unable to locate _tkinter so" + return sos[0] + + +LINKED_RE = re.compile( + r"(?P.*) \(compatibility version (?P\d+\.\d+\.\d+), " + r"current version (?P\d+\.\d+\.\d+)(?:, \w+)?\)" +) + + +def get_linked_libraries(p: Path): + linked_libs = [] + lines = subprocess.check_output(["otool", "-L", str(p)], encoding="utf-8", universal_newlines=True).splitlines() + if "is not an object file" in lines[0]: + return None + lines = [x.strip() for x in lines[1:]] + + for line in lines: + if m := LINKED_RE.match(line): + linked_libs.append(m.groupdict()) + else: + raise ValueError(f"For {p}, cannot parse line: '{line}'") + return linked_libs + + +if __name__ == "__main__": + + if platform.system() != "Darwin": + sys.exit(0) + + print("PYTHON: Copying standard library files") + + if len(sys.argv) == 2: + python_dir = Path(sys.argv[1]) + else: + print("Must call " + sys.argv[0] + "with one command line argument: the path to the python_lib directory") + sys.exit(1) + + assert python_dir.is_dir() + lib_dynload_dir = python_dir / "lib-dynload" + + tk_so = locate_tk_so(python_dir) + tcl_tk_sos = [Path(t["libname"]) for t in get_linked_libraries(tk_so) if "libt" in t["libname"]] + + for tcl_tk_so in tcl_tk_sos: + new_tcl_tk_so = lib_dynload_dir / tcl_tk_so.name + shutil.copy(tcl_tk_so, new_tcl_tk_so) + lines = subprocess.check_output( + ["install_name_tool", "-change", str(tcl_tk_so), f"@loader_path/{new_tcl_tk_so.name}", str(tk_so)] + ) + # Change the id that's the first line of the otool -L in this case and it's confusing + lines = subprocess.check_output(["install_name_tool", "-id", str(new_tcl_tk_so.name), str(new_tcl_tk_so)]) diff --git a/cmake/install_codesign_script.cmake b/cmake/install_codesign_script.cmake index 8a439cad5d7..10db6b51a11 100644 --- a/cmake/install_codesign_script.cmake +++ b/cmake/install_codesign_script.cmake @@ -113,7 +113,7 @@ foreach(path ${_all_root_dylibs}) endif() endforeach() -file(GLOB PYTHON_SOS "${CMAKE_INSTALL_PREFIX}/python_lib/lib-dynload/*.so") +file(GLOB PYTHON_SOS "${CMAKE_INSTALL_PREFIX}/python_lib/lib-dynload/*.so" "${CMAKE_INSTALL_PREFIX}/python_lib/lib-dynload/*.dylib") print_relative_paths(PREFIX "FULL_PATHS=" ABSOLUTE_PATHS ${FULL_PATHS}) print_relative_paths(PREFIX "ROOT_DYLIBS=" ABSOLUTE_PATHS ${ROOT_DYLIBS}) diff --git a/src/EnergyPlus/CMakeLists.txt b/src/EnergyPlus/CMakeLists.txt index 1bb3c1ef519..70a715471a8 100644 --- a/src/EnergyPlus/CMakeLists.txt +++ b/src/EnergyPlus/CMakeLists.txt @@ -970,6 +970,7 @@ if(LINK_WITH_PYTHON) COMMAND ${Python_EXECUTABLE} "${PROJECT_SOURCE_DIR}/cmake/PythonCopyStandardLib.py" "$" "python_lib" COMMAND ${CMAKE_COMMAND} -E env --unset=PIP_REQUIRE_VIRTUALENV ${Python_EXECUTABLE} -m pip install --target="$/python_lib" --upgrade energyplus-launch==3.7.2 + COMMAND ${Python_EXECUTABLE} "${PROJECT_SOURCE_DIR}/cmake/PythonFixUpTclTk.py" "$/python_lib" ) endif() @@ -979,12 +980,12 @@ if(BUILD_PACKAGE) # we'll want to grab the standard lib for python plugins # TODO: I don't think we want to quote the generator expression install(DIRECTORY "$/python_lib/" DESTINATION "./python_lib") - if(WIN32) - # on Windows, with Build Package, and also Link With Python, we can also drop in shortcuts to the new auxiliary CLI - # NOTE: The install command COMPONENTS should line up so that they are run at the same packaging step + if(WIN32) + # on Windows, with Build Package, and also Link With Python, we can also drop in shortcuts to the new auxiliary CLI + # NOTE: The install command COMPONENTS should line up so that they are run at the same packaging step install(CODE "execute_process(COMMAND powershell.exe -ExecutionPolicy Bypass -File ${PROJECT_SOURCE_DIR}/scripts/dev/create_shortcut.ps1 -TargetPath \"$\" -ShortcutPath \"$/EPLaunchPython.lnk\" -Arguments \"auxiliary eplaunch\")" COMPONENT Auxiliary) - install(FILES $/EPLaunchPython.lnk DESTINATION "./" COMPONENT Auxiliary) - endif() + install(FILES $/EPLaunchPython.lnk DESTINATION "./" COMPONENT Auxiliary) + endif() endif() # we'll want to always provide the C API headers install(FILES ${API_HEADERS} DESTINATION "./include/EnergyPlus/api") diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index 71b95a39d40..4ad89e369ac 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -235,10 +235,6 @@ Built on Platform: {} app.add_flag("--debug-cli", debugCLI, "Print the result of the CLI assignments to the console and exit")->group(""); // Empty group to hide it #if LINK_WITH_PYTHON -#if __APPLE__ - // for now on Apple we are not providing the command line interface to EP-Launch due to packaging issues - // once that is fixed, this __APPLE__ block will be removed and we'll just have this on all platforms -#else auto *auxiliaryToolsSubcommand = app.add_subcommand("auxiliary", "Run Auxiliary Python Tools"); auxiliaryToolsSubcommand->require_subcommand(); // should default to requiring 1 or more additional args? @@ -286,7 +282,6 @@ main_gui() engine.exec(cmd); exit(0); }); -#endif #endif app.footer("Example: energyplus -w weather.epw -r input.idf"); From 4c7510d8a354d67123d7207c6c1bee97caafa97d Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 19 Sep 2024 11:22:09 -0500 Subject: [PATCH 02/13] Add regex for arm64 otool output, fix string --- cmake/PythonFixUpTclTk.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/PythonFixUpTclTk.py b/cmake/PythonFixUpTclTk.py index d122a455beb..b7fad1c8306 100644 --- a/cmake/PythonFixUpTclTk.py +++ b/cmake/PythonFixUpTclTk.py @@ -17,6 +17,8 @@ def locate_tk_so(python_dir: Path) -> Path: r"current version (?P\d+\.\d+\.\d+)(?:, \w+)?\)" ) +LINKED_RE_ARM64 = re.compile(f"(?P.*) \(architecture arm64\)") + def get_linked_libraries(p: Path): linked_libs = [] @@ -28,6 +30,8 @@ def get_linked_libraries(p: Path): for line in lines: if m := LINKED_RE.match(line): linked_libs.append(m.groupdict()) + elif m := LINKED_RE_ARM64.match(line): + linked_libs.append(m.groupdict()) # it will only have a libname key, I think that's fine else: raise ValueError(f"For {p}, cannot parse line: '{line}'") return linked_libs @@ -38,7 +42,7 @@ def get_linked_libraries(p: Path): if platform.system() != "Darwin": sys.exit(0) - print("PYTHON: Copying standard library files") + print("PYTHON: Copying and fixing up Tcl/Tk") if len(sys.argv) == 2: python_dir = Path(sys.argv[1]) From b9bd8acd165234f63c44cb995962bc19ae221032 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 19 Sep 2024 11:40:44 -0500 Subject: [PATCH 03/13] Add license text --- cmake/PythonFixUpTclTk.py | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/cmake/PythonFixUpTclTk.py b/cmake/PythonFixUpTclTk.py index b7fad1c8306..fdf8a0e894f 100644 --- a/cmake/PythonFixUpTclTk.py +++ b/cmake/PythonFixUpTclTk.py @@ -1,3 +1,58 @@ +# 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. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# (1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# (2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# (3) Neither the name of the University of California, Lawrence Berkeley +# National Laboratory, the University of Illinois, U.S. Dept. of Energy nor +# the names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in +# stand-alone form without changes from the version obtained under this +# License, or (ii) Licensee makes a reference solely to the software +# portion of its product, Licensee must refer to the software as +# "EnergyPlus version X" software, where "X" is the version number Licensee +# obtained under this License and may not use a different name for the +# software. Except as specifically required in this Section (4), Licensee +# shall not use in a company name, a product name, in advertising, +# publicity, or other promotional activities any name, trade name, +# trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or +# confusingly similar designation, without the U.S. Department of Energy's +# prior written consent. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + import platform import re import shutil From d4e2ea863f53bc11fabd6f0e1405f40d3b9a66d5 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 20 Sep 2024 11:14:38 -0500 Subject: [PATCH 04/13] Fixes to tcl packaging --- cmake/PythonCopyStandardLib.py | 2 ++ cmake/PythonFixUpTclTk.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/cmake/PythonCopyStandardLib.py b/cmake/PythonCopyStandardLib.py index 2c1a5e83434..7cc0f7a9723 100644 --- a/cmake/PythonCopyStandardLib.py +++ b/cmake/PythonCopyStandardLib.py @@ -85,6 +85,8 @@ ctypes_package_dir = os.path.dirname(ctypes_import_file) standard_lib_dir = os.path.dirname(ctypes_package_dir) +print(f"PYTHON: Analyzing standard library directory at {standard_lib_dir}") + if os.path.exists(target_dir): # Let's check the library files to see if the ABI matches # Otherwise if you build with say python 3.8 initially, and then switch to diff --git a/cmake/PythonFixUpTclTk.py b/cmake/PythonFixUpTclTk.py index fdf8a0e894f..cba51f7edce 100644 --- a/cmake/PythonFixUpTclTk.py +++ b/cmake/PythonFixUpTclTk.py @@ -59,9 +59,12 @@ import subprocess import sys from pathlib import Path +import os +import stat def locate_tk_so(python_dir: Path) -> Path: + print(f"Searching for _tkinter so in {python_dir}") sos = list(python_dir.glob("lib-dynload/_tkinter*.so")) assert len(sos) == 1, "Unable to locate _tkinter so" return sos[0] @@ -72,7 +75,7 @@ def locate_tk_so(python_dir: Path) -> Path: r"current version (?P\d+\.\d+\.\d+)(?:, \w+)?\)" ) -LINKED_RE_ARM64 = re.compile(f"(?P.*) \(architecture arm64\)") +LINKED_RE_ARM64 = re.compile(f"(?P.*) (architecture arm64)") def get_linked_libraries(p: Path): @@ -113,7 +116,17 @@ def get_linked_libraries(p: Path): for tcl_tk_so in tcl_tk_sos: new_tcl_tk_so = lib_dynload_dir / tcl_tk_so.name + if str(tcl_tk_so).startswith('@loader_path'): + assert new_tcl_tk_so.is_file(), f"{new_tcl_tk_so} missing when the tkinter so is already adjusted. Wipe the dir" + print("Already fixed up the libtcl and libtk, nothing to do here") + continue shutil.copy(tcl_tk_so, new_tcl_tk_so) + # during testing, the brew installed tcl and tk libraries were installed without write permission + # the workaround was to manually chmod u+w those files in the brew install folder + # instead let's just fix them up once we copy them here + current_perms = os.stat(str(new_tcl_tk_so)).st_mode + os.chmod(str(new_tcl_tk_so), current_perms | stat.S_IWUSR) + # now that it can definitely be written, we can run install_name_tool on it lines = subprocess.check_output( ["install_name_tool", "-change", str(tcl_tk_so), f"@loader_path/{new_tcl_tk_so.name}", str(tk_so)] ) From 404e209f935eab3f03a587d7c286b2ef115335bb Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 20 Sep 2024 11:53:57 -0500 Subject: [PATCH 05/13] Fix regex --- cmake/PythonFixUpTclTk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/PythonFixUpTclTk.py b/cmake/PythonFixUpTclTk.py index cba51f7edce..dac83009c72 100644 --- a/cmake/PythonFixUpTclTk.py +++ b/cmake/PythonFixUpTclTk.py @@ -75,7 +75,7 @@ def locate_tk_so(python_dir: Path) -> Path: r"current version (?P\d+\.\d+\.\d+)(?:, \w+)?\)" ) -LINKED_RE_ARM64 = re.compile(f"(?P.*) (architecture arm64)") +LINKED_RE_ARM64 = re.compile(r"(?P.*) \(architecture arm64\)") def get_linked_libraries(p: Path): @@ -86,9 +86,9 @@ def get_linked_libraries(p: Path): lines = [x.strip() for x in lines[1:]] for line in lines: - if m := LINKED_RE.match(line): + if 'compatibility version' in line and (m := LINKED_RE.match(line)): linked_libs.append(m.groupdict()) - elif m := LINKED_RE_ARM64.match(line): + elif 'architecture arm64' in line and (m := LINKED_RE_ARM64.match(line)): linked_libs.append(m.groupdict()) # it will only have a libname key, I think that's fine else: raise ValueError(f"For {p}, cannot parse line: '{line}'") From 66d83c6d70ff900eaf5179df672344768dc86625 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 20 Sep 2024 13:40:47 -0500 Subject: [PATCH 06/13] Add upterm to debug --- .github/workflows/release_mac.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release_mac.yml b/.github/workflows/release_mac.yml index 6314ca6773c..d666dbab023 100644 --- a/.github/workflows/release_mac.yml +++ b/.github/workflows/release_mac.yml @@ -159,6 +159,9 @@ jobs: -DCPACK_CODESIGNING_NOTARY_PROFILE_NAME:STRING=EnergyPlus \ ../ + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + - name: Build Package working-directory: ./build shell: bash From 36142a14bd17df191207f755633aaf4e0f197142 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 20 Sep 2024 14:38:06 -0500 Subject: [PATCH 07/13] Add brew install tcl-tk, it worked on GHA once --- .github/workflows/release_mac.yml | 2 +- .github/workflows/test_pull_requests.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_mac.yml b/.github/workflows/release_mac.yml index d666dbab023..7e74718f841 100644 --- a/.github/workflows/release_mac.yml +++ b/.github/workflows/release_mac.yml @@ -137,7 +137,7 @@ jobs: 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 - brew install ninja + brew install ninja tcl-tk - name: Create Build Directory run: cmake -E make_directory ./build/ diff --git a/.github/workflows/test_pull_requests.yml b/.github/workflows/test_pull_requests.yml index 1a3fc03c513..21ba7cc371a 100644 --- a/.github/workflows/test_pull_requests.yml +++ b/.github/workflows/test_pull_requests.yml @@ -58,6 +58,7 @@ jobs: if: runner.os == 'macOS' run: | brew update + brew install tcl-tk brew reinstall gcc@13 echo "FC=$(brew --prefix gcc@13)/bin/gfortran-13" >> $GITHUB_ENV echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_dev_target }} >> $GITHUB_ENV From 793eb390335b0a478cad12446de4296c213179dd Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 20 Sep 2024 14:38:40 -0500 Subject: [PATCH 08/13] Disable upterm session --- .github/workflows/release_mac.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release_mac.yml b/.github/workflows/release_mac.yml index 7e74718f841..7c5a916714b 100644 --- a/.github/workflows/release_mac.yml +++ b/.github/workflows/release_mac.yml @@ -159,9 +159,6 @@ jobs: -DCPACK_CODESIGNING_NOTARY_PROFILE_NAME:STRING=EnergyPlus \ ../ - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - - name: Build Package working-directory: ./build shell: bash From 1b74173a63ee858a3994f00f27e3c568509a860f Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Mon, 23 Sep 2024 09:45:59 -0500 Subject: [PATCH 09/13] Update readme --- release/readme.in.html | 130 ++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 52 deletions(-) diff --git a/release/readme.in.html b/release/readme.in.html index b86d7adc888..eff1f6fe1b5 100644 --- a/release/readme.in.html +++ b/release/readme.in.html @@ -1,5 +1,5 @@ - + @@ -35,7 +35,8 @@
-

EnergyPlus Logo EnergyPlus

+

+ EnergyPlus Logo EnergyPlus

Version @CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@.@CMAKE_VERSION_PATCH@
@CMAKE_PROJECTED_RELEASE_DATE@
@@ -90,12 +91,41 @@

Using EnergyPlus

* Python Ecosystem *

- While EnergyPlus will continue to provide users with current workflows and installation methods, we are pushing - toward a more flexible EnergyPlus that behaves like a standard Python library. An upcoming version will allow - users to pip install energyplus, which will bring down the EnergyPlus native libraries plus the Python API - bindings, ready to be used by the user's desired Python environment. This should make setting up EnergyPlus - much easier for many use cases! + The EnergyPlus-Python connections continue to grow. The Python-focused deployment via PyPi is still coming, + but will remain on the test server on PyPi for now. + Once official releases are ready, they will be on the + main PyPi page, so check there if interested. + The pip install energyplus experience will bring EnergyPlus native libraries plus the Python API + bindings, ready to be used by the user's desired Python environment. This should make setting up EnergyPlus + much easier for many Python-facing use cases!

+

+ In addition to the Pip Install work coming along, we are also working to improve our Python integration for + traditional EnergyPlus use cases. As of 24.2, when a user downloads the install package onto their machine, + they will get the new cross-platform Python-based EP-Launch. The classic EP-Launch is still packaged for now, + but will likely be deprecated in favor of the Python tools soon. There are two ways to launch this new + EP-Launch: +

    +
  • + For Windows, there is a batch file right inside the EnergyPlus install folder called + EPLaunchPython that will launch the EP-Launch application: + EnergyPlus Python Launch Shortcut + Just double click it! It will open a terminal window before launching the Python app, but + you can ignore that for now. Once we get some testing feedback, we'll include it as a proper shortcut + on the Start Menu and other locations. +
  • +
  • + On all platforms, you can launch the new EP-Launch right from the command line using a new auxiliary + command class. Simply launch a terminal, and execute a single command. On Windows, it would be + C:\Path\To\EnergyPlusV24-2-0\energyplus.exe auxiliary eplaunch. On POSIX-y systems, it would + be /path/to/energyplus auxiliary eplaunch. Give it a try and let us know how it goes. As + always, we appreciate issue reports on our + GitHub repository. +
  • +
+

What’s going on in V@CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@?

@@ -158,23 +188,21 @@
No, they are different
aria-expanded="false" aria-controls="collapseCompatible"> Is version @CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@ backward compatible? - Can I run v@PREV_VERSION_MAJOR@.@PREV_VERSION_MINOR@ file in v@CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@? + Can I run v@PREV_VERSION_MAJOR@.@PREV_VERSION_MINOR@ file in + v@CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@?
Some objects require transition
There have been changes in the following objects which require conversion. Either read and follow - the Rules document or use the IDFVersionUpdater utility. The “Rules” document contains information + the "Rules" document or use the IDFVersionUpdater utility. The “Rules” document contains information on exact object changes that you can do by hand. The updater program is described more fully in the Auxiliary Programs document.
    -
  • AirLoopHVAC:UnitarySystem
  • -
  • ComfortViewFactorAngles
  • -
  • HeatExchanger:AirToAir:SensibleAndLatent
  • -
  • People
  • -
  • ZoneHVAC:PackagedTerminalAirConditioner
  • -
  • ZoneHVAC:PackagedTerminalHeatPump
  • -
  • ZoneHVAC:WaterToAirHeatPump
  • +
  • HeatPump:PlantLoop:EIR:Cooling
  • +
  • HeatPump:PlantLoop:EIR:Heating
  • +
  • OutputControl:Files
  • +
  • ZoneHVAC:TerminalUnit:VariableRefrigerantFlow
@@ -215,7 +243,7 @@

Documentation

href="https://energyplus.net/documentation">online. For new users of EnergyPlus, a guide called the EnergyPlus Essentials was developed and is available with the installed pdf documentation. Big Ladder Software is also hosting html versions of the - EnergyPlus Documentation online. + EnergyPlus Documentation online.

There are some other documents of interest available on the EnergyPlus web site including:

@@ -246,31 +274,32 @@

New Features

Description - 10081 - API Enhancements + 10311 + NewFeature: Additional ASHRAE Metrics for E+ 24-1 - 10277 - Enhancement for Heat Exchanger for Variable-Speed Heat Recovery Ventilation + 10372 + Add Reports to Support createRMD - ruleset model description - 10363 - Add E+ API demo to the install + 10379 + Air-To-Water Heat Pump with Heat Recovery - 10385 - Indoor living wall module + 10415 + Chiller economizing using thermosiphon or fluid heat exchanger free cooling - -

Runtime Performance Enhancing Developments

- - - + + - - + + + + + +
PR #Description10511Variable flow condenser plant control
10231SetupOutputVariable wrapper to use enum type parameters (endUseCategory, ReportingFrequency, and eResouceType)10658A couple API Endpoints
10716Initial Python App Packaging

Targeted Refactoring Efforts

@@ -280,24 +309,20 @@

Targeted Refactoring Efforts

Description - 10281 - Initial WeatherManager refactor - - - 10289 - First (and only?) Pollution module refactor + 10323 + Reformat eplusout.dbg file for easier excel viewing - 10347 - OutputProcessor Refactor + 10474 + Fans Refactor - 10351 - DaylightingManager Refactor -- Part 2 + 10720 + Material Refactor - 10404 - Heat Pump Plant Loop EIR refactoring + Many PRs + Addressing CppCheck warnings and suggestions across our codebase @@ -316,18 +341,18 @@

Targeted Refactoring Efforts

Platforms

- We test and develop on Windows 10 and 11, and currently produce 32 and 64 bit builds on Windows. The 32-bit - build is likely to be removed at some point soon. For Linux, we provide packages for - Ubuntu 20.04 and 22.04. This release also includes an Ubuntu 18.04 build, but moving forward we will be - eliminating that. On Mac, we are releasing an installer for OSX 10.15, 11, and 12, but the 10.15 will be + We test and develop on Windows 10 and 11, and currently produce 32 and 64 bit builds on Windows. The 32-bit + build is likely to be removed at some point soon. For Linux, we provide packages for + Ubuntu 20.04 and 22.04. This release also includes an Ubuntu 18.04 build, but moving forward we will be + eliminating that. On Mac, we are releasing an installer for OSX 10.15, 11, and 12, but the 10.15 will be eliminated soon.

    -
  • Windows 10 and 11
  • +
  • Windows 11
  • - Linux (Ubuntu 18.04, 20.04, 22.04) 64 bit versions + Linux (Ubuntu 22.04 and 24.04) 64 bit versions
  • -
  • Mac OSX 10.15, 11, and 12 64 bit versions
  • +
  • Mac OSX 12 x64 and 13 arm64
  • EnergyPlus V@CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@ has been tested on all of these platforms
  • @@ -412,7 +437,8 @@

    Additional steps you may want to consider:

    University of California through Ernest Orlando Lawrence Berkeley National Laboratory, Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.

    -

    Other Notices and Acknowledgments are found in the Other Notices and Acknowledgments are found in the + Acknowledgments document.

    From b0bdd098a60bd10f5993d18287f273a08c83fe14 Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Wed, 25 Sep 2024 14:54:16 -0500 Subject: [PATCH 10/13] SurfaceGeometry_GetKivaFoundationTest3 --- tst/EnergyPlus/unit/SurfaceGeometry.unit.cc | 51 +++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc index d369945cb47..97dfe665b7c 100644 --- a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc @@ -12068,6 +12068,57 @@ TEST_F(EnergyPlusFixture, SurfaceGeometry_GetKivaFoundationTest2) " ** ~~~ ** will be overridden with the Autoselected depth (40.0 m)"}); EXPECT_TRUE(compare_err_stream(error_string, true)); } +TEST_F(EnergyPlusFixture, SurfaceGeometry_GetKivaFoundationTest3) +{ + bool ErrorsFound(false); + + std::string const idf_objects = delimited_string({ + "Material,", + " exterior vertical ins, !- Name", + " Rough, !- Roughness", + " 0.04611624, !- Thickness {m}", + " 0.029427, !- Conductivity {W/m-K}", + " 32.04, !- Density {kg/m3}", + " 1214.23, !- Specific Heat {J/kg-K}", + " 0.9, !- Thermal Absorptance", + " 0.7, !- Solar Absorptance", + " 0.7; !- Visible Absorptance", + + "Foundation:Kiva,", + " Foundation Kiva 1, !- Name", + " 20, !- Initial Indoor Air Temperature {C}", + " , !- Interior Horizontal Insulation Material Name", + " , !- Interior Horizontal Insulation Depth {m}", + " , !- Interior Horizontal Insulation Width {m}", + " , !- Interior Vertical Insulation Material Name", + " , !- Interior Vertical Insulation Depth {m}", + " , !- Exterior Horizontal Insulation Material Name", + " , !- Exterior Horizontal Insulation Depth {m}", + " , !- Exterior Horizontal Insulation Width {m}", + " , !- Exterior Vertical Insulation Material Name", + " , !- Exterior Vertical Insulation Depth {m}", + " 0.3048, !- Wall Height Above Grade {m}", + " 0.2032, !- Wall Depth Below Slab {m}", + " , !- Footing Wall Construction Name", + " , !- Footing Material Name", + " , !- Footing Depth {m}", + " exterior vertical ins, !- Custom Block Material Name 1", + " 2.4384, !- Custom Block Depth 1 {m}", + " 0.2159, !- Custom Block X Position 1 {m}", + " 0; !- Custom Block Z Position 1 {m}", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + state->dataEnvrn->Elevation = 600.; + + Material::GetMaterialData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + + GetFoundationData(*state, ErrorsFound); + EXPECT_FALSE(ErrorsFound); + EXPECT_TRUE(compare_err_stream("")); +} TEST_F(EnergyPlusFixture, SurfaceGeometry_ZoneAndSpaceAreas) { From 005f6b46639f6d530bd37e950ad9d2be182bbf26 Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Wed, 25 Sep 2024 14:56:17 -0500 Subject: [PATCH 11/13] Remove FindItemInPtrList --- src/EnergyPlus/SurfaceGeometry.cc | 2 +- src/EnergyPlus/UtilityRoutines.hh | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 51eb490b07a..2de47e03eb3 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -11455,7 +11455,7 @@ namespace SurfaceGeometry { for (int blockNum = 0; blockNum < numBlocks; blockNum++) { Kiva::InputBlock block; if (!s_ipsc->lAlphaFieldBlanks(alpF)) { - int index = Util::FindItemInPtrList(s_ipsc->cAlphaArgs(alpF), s_mat->materials); + int index = Material::GetMaterialNum(state, s_ipsc->cAlphaArgs(alpF)); if (index == 0) { ErrorsFound = true; ShowSevereError(state, diff --git a/src/EnergyPlus/UtilityRoutines.hh b/src/EnergyPlus/UtilityRoutines.hh index e6bd1877768..564417c5cfe 100644 --- a/src/EnergyPlus/UtilityRoutines.hh +++ b/src/EnergyPlus/UtilityRoutines.hh @@ -374,23 +374,6 @@ namespace Util { return 0; // Not found } - template ::value>::type> - // Container needs and operator[i] and elements need Name - inline int FindItemInPtrList(std::string_view const String, Container const &ListOfItems, int const NumItems) - { - for (typename Container::size_type i = 0, e = NumItems; i < e; ++i) { - if (String == ListOfItems[i]->Name) return int(i + 1); // 1-based return index - } - return 0; // Not found - } - - template ::value>::type> - // Container needs and operator[i] and elements need Name - inline int FindItemInPtrList(std::string_view const String, Container const &ListOfItems) - { - return Util::FindItemInPtrList(String, ListOfItems, ListOfItems.isize()); - } - template ::value>::type> // Container needs isize() and operator[i] and elements need Name inline int FindItemInList(std::string_view const String, Container const &ListOfItems) From 88832d0883b22c99bc55050cd2c9cf3865b6a2e9 Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Thu, 26 Sep 2024 21:28:24 -0500 Subject: [PATCH 12/13] Baseboard sizing adjustments --- src/EnergyPlus/BaseboardRadiator.cc | 29 +++++++------ src/EnergyPlus/BaseboardRadiator.hh | 2 +- tst/EnergyPlus/unit/BaseboardRadiator.unit.cc | 43 +++++++++++-------- 3 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index 7f03f312eaf..95075a1901a 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -419,7 +419,7 @@ namespace BaseboardRadiator { thisBaseboard.ZonePtr = DataZoneEquipment::GetZoneEquipControlledZoneNum( state, DataZoneEquipment::ZoneEquipType::BaseboardConvectiveWater, thisBaseboard.EquipID); - thisBaseboard.resetSizingFlagBasedOnInput(state); // set MySizeFlag to false if no autosizing is being done + thisBaseboard.checkForZoneSizing(state); // check if any autosizing is being done } if (ErrorsFound) { @@ -625,8 +625,6 @@ namespace BaseboardRadiator { state.dataSize->DataScalableCapSizingON = false; if (state.dataSize->CurZoneEqNum > 0) { - auto &zoneEqSizing = state.dataSize->ZoneEqSizing(state.dataSize->CurZoneEqNum); - auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum); bool FlowAutoSize = false; // Indicator to autosizing water volume flow if (this->WaterVolFlowRateMax == DataSizing::AutoSize) { @@ -638,6 +636,8 @@ namespace BaseboardRadiator { state, cCMO_BBRadiator_Water, this->EquipID, "User-Specified Maximum Water Flow Rate [m3/s]", this->WaterVolFlowRateMax); } } else { + auto &zoneEqSizing = state.dataSize->ZoneEqSizing(state.dataSize->CurZoneEqNum); + auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum); std::string_view const CompType = cCMO_BBRadiator_Water; std::string_view const CompName = this->EquipID; state.dataSize->DataFracOfAutosizedHeatingCapacity = 1.0; @@ -748,6 +748,8 @@ namespace BaseboardRadiator { state, cCMO_BBRadiator_Water, this->EquipID, "User-Specified U-Factor Times Area Value [W/K]", this->UA); } } else { + auto &zoneEqSizing = state.dataSize->ZoneEqSizing(state.dataSize->CurZoneEqNum); + auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum); this->WaterInletTemp = state.dataSize->PlantSizData(PltSizHeatNum).ExitTemp; this->AirInletTemp = finalZoneSizing.ZoneTempAtHeatPeak; this->AirInletHumRat = finalZoneSizing.ZoneHumRatAtHeatPeak; @@ -938,19 +940,18 @@ namespace BaseboardRadiator { } } - void BaseboardParams::resetSizingFlagBasedOnInput(EnergyPlusData &state) + void BaseboardParams::checkForZoneSizing(EnergyPlusData &state) { - // this->MySizeFlag defaults to true. Set to false if no sizing is requested. - // Condition 1: Is UA hardwired (not autosized)? - // Condition 2: Is max flow rate hardwired (not autosized)? - // Condition 3: Is EITHER capacity used and hardwired (not autosized) OR capacity per floor area used? - // If YES to all three, then this unit does not need to be autosized and the sizing flag needs to be set to false. - if ((this->UA != DataSizing::AutoSize) && (this->WaterVolFlowRateMax != DataSizing::AutoSize) && - (((this->HeatingCapMethod == DataSizing::HeatingDesignCapacity) && (this->ScaledHeatingCapacity != DataSizing::AutoSize)) || - (this->HeatingCapMethod == DataSizing::CapacityPerFloorArea))) { - this->MySizeFlag = false; + // If any sizing is requested, check that zone sizing has been done + // Condition 1: Is UA autosized)? + // Condition 2: Is max flow rate autosized? + // Condition 3: Is HeatingDesignCapacity used and autosized) + // Condition 4: Is FractionOfAutosizedHeatingCapacity used and heating capacity is autosized + if ((this->UA == DataSizing::AutoSize) || (this->WaterVolFlowRateMax == DataSizing::AutoSize) || + ((this->HeatingCapMethod == DataSizing::HeatingDesignCapacity) && (this->ScaledHeatingCapacity == DataSizing::AutoSize)) || + ((this->HeatingCapMethod == DataSizing::FractionOfAutosizedHeatingCapacity) && (this->ScaledHeatingCapacity == DataSizing::AutoSize))) { + CheckZoneSizing(state, cCMO_BBRadiator_Water, this->EquipID); } - if (this->MySizeFlag) CheckZoneSizing(state, cCMO_BBRadiator_Water, this->EquipID); } void SimHWConvective(EnergyPlusData &state, int &BaseboardNum, Real64 &LoadMet) diff --git a/src/EnergyPlus/BaseboardRadiator.hh b/src/EnergyPlus/BaseboardRadiator.hh index 457fbd05687..7dc8a51adb3 100644 --- a/src/EnergyPlus/BaseboardRadiator.hh +++ b/src/EnergyPlus/BaseboardRadiator.hh @@ -108,7 +108,7 @@ namespace BaseboardRadiator { void SizeBaseboard(EnergyPlusData &state, int baseboardNum); - void resetSizingFlagBasedOnInput(EnergyPlusData &state); + void checkForZoneSizing(EnergyPlusData &state); }; void SimBaseboard( diff --git a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc index 2fcdabd9f68..1416366a8b5 100644 --- a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc @@ -54,6 +54,7 @@ #include "Fixtures/EnergyPlusFixture.hh" #include #include +#include #include #include #include @@ -480,58 +481,66 @@ TEST_F(EnergyPlusFixture, BaseboardConvWater_SizingTest) EXPECT_EQ(state->dataBaseboardRadiator->baseboards(BaseboardNum).UA, 3000.0); } -TEST_F(EnergyPlusFixture, BaseboardConvWater_resetSizingFlagBasedOnInputTest) +TEST_F(EnergyPlusFixture, BaseboardConvWater_checkForZoneSizingTest) { state->dataBaseboardRadiator->baseboards.allocate(1); auto &thisBB = state->dataBaseboardRadiator->baseboards(1); - state->dataSize->ZoneSizingRunDone = true; + state->dataSize->ZoneSizingRunDone = false; + + std::string const error_string = + delimited_string({" ** Severe ** For autosizing of ZoneHVAC:Baseboard:Convective:Water , a zone sizing run must be done.\n" + " ** ~~~ ** No \"Sizing:Zone\" objects were entered.\n" + " ** ~~~ ** The \"SimulationControl\" object did not have the field \"Do Zone Sizing Calculation\" set to Yes.\n" + " ** Fatal ** Program terminates due to previously shown condition(s).\n" + " ...Summary of Errors that led to program termination:\n" + " ..... Reference severe error count=1\n" + " ..... Last severe error=For autosizing of ZoneHVAC:Baseboard:Convective:Water , a zone sizing run must be done."}); // Test 1A: UA autosized so MySizeFlag should stay true - thisBB.MySizeFlag = true; // reset to default/initialized value thisBB.UA = DataSizing::AutoSize; thisBB.WaterVolFlowRateMax = 0.001; thisBB.HeatingCapMethod = DataSizing::FractionOfAutosizedHeatingCapacity; thisBB.ScaledHeatingCapacity = 1.0; - thisBB.resetSizingFlagBasedOnInput(*state); - EXPECT_TRUE(thisBB.MySizeFlag); + ASSERT_THROW(thisBB.checkForZoneSizing(*state), std::runtime_error); + EXPECT_TRUE(compare_err_stream(error_string, true)); // Test 1B: WaterVolFlowRateMax autosized so MySizeFlag should stay true - thisBB.MySizeFlag = true; // reset to default/initialized value + state->dataErrTracking->TotalSevereErrors = 0; thisBB.UA = 0.5; thisBB.WaterVolFlowRateMax = DataSizing::AutoSize; thisBB.HeatingCapMethod = DataSizing::FractionOfAutosizedHeatingCapacity; thisBB.ScaledHeatingCapacity = 1.0; - thisBB.resetSizingFlagBasedOnInput(*state); - EXPECT_TRUE(thisBB.MySizeFlag); + ASSERT_THROW(thisBB.checkForZoneSizing(*state), std::runtime_error); + EXPECT_TRUE(compare_err_stream(error_string, true)); // Test 1C: Heating Capacity autosized for method HeatingDesignCapacity so MySizeFlag should stay true - thisBB.MySizeFlag = true; // reset to default/initialized value + state->dataErrTracking->TotalSevereErrors = 0; thisBB.UA = 0.5; thisBB.WaterVolFlowRateMax = 0.001; thisBB.HeatingCapMethod = DataSizing::HeatingDesignCapacity; thisBB.ScaledHeatingCapacity = DataSizing::AutoSize; - thisBB.resetSizingFlagBasedOnInput(*state); - EXPECT_TRUE(thisBB.MySizeFlag); + ASSERT_THROW(thisBB.checkForZoneSizing(*state), std::runtime_error); + EXPECT_TRUE(compare_err_stream(error_string, true)); // Test 2A: Heating Capacity not autosized for method HeatingDesignCapacity and UA and WaterVolFlowRateMax not autosized // so MySizeFlag should be changed to false - thisBB.MySizeFlag = true; // reset to default/initialized value + state->dataErrTracking->TotalSevereErrors = 0; thisBB.UA = 0.5; thisBB.WaterVolFlowRateMax = 0.001; thisBB.HeatingCapMethod = DataSizing::HeatingDesignCapacity; thisBB.ScaledHeatingCapacity = 1000.0; - thisBB.resetSizingFlagBasedOnInput(*state); - EXPECT_FALSE(thisBB.MySizeFlag); + thisBB.checkForZoneSizing(*state); + EXPECT_TRUE(compare_err_stream("", true)); // Test 2B: CapacityPerFloorArea method and UA and WaterVolFlowRateMax not autosized // so MySizeFlag should be changed to false - thisBB.MySizeFlag = true; // reset to default/initialized value + state->dataErrTracking->TotalSevereErrors = 0; thisBB.UA = 0.5; thisBB.WaterVolFlowRateMax = 0.001; thisBB.HeatingCapMethod = DataSizing::CapacityPerFloorArea; thisBB.ScaledHeatingCapacity = DataSizing::AutoSize; // this value does not mater since it is not really valid for this method - thisBB.resetSizingFlagBasedOnInput(*state); - EXPECT_FALSE(thisBB.MySizeFlag); + thisBB.checkForZoneSizing(*state); + EXPECT_TRUE(compare_err_stream("", true)); } } // namespace EnergyPlus From 93b50a97bd08b49722fc12e49b09965dced16600 Mon Sep 17 00:00:00 2001 From: amirroth Date: Thu, 26 Sep 2024 23:21:26 -0400 Subject: [PATCH 13/13] Attempted fix --- src/EnergyPlus/OutputProcessor.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 926a1d947b1..455ab0c4c3c 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -803,7 +803,7 @@ namespace OutputProcessor { // Has to be a summed variable if (srcDDVar->storeType != StoreType::Sum) { - ShowWarningCustomMessage(state, + ShowWarningCustomMessage(state, // Is clang-format formatting things like this? This is gross. eoh, format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", ipsc->cAlphaArgs(1), @@ -867,8 +867,7 @@ namespace OutputProcessor { ipsc->cAlphaFieldNames(fldIndex + 1), ipsc->cAlphaArgs(fldIndex + 1))); ShowContinueError(state, "...will not be shown with the Meter results."); - foundBadSrc = true; - break; + // Not setting the foundBadSrc flag here. } } // for (fldIndex)