From 0d022a286ef77b305cd9826fd18515c4852bedd8 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Sun, 16 Aug 2026 03:42:48 -0600 Subject: [PATCH 01/12] Update PySAM version for differ --- test/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/requirements.txt b/test/requirements.txt index c7339842bb..ba7b4d6acb 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,2 +1,2 @@ -NREL-PySAM==3.0.0 +NREL-PySAM==8.0.0 requests From f0f1a675f4586b640ec393e839f49c87ba7d0e34 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Sun, 16 Aug 2026 03:54:11 -0600 Subject: [PATCH 02/12] Update requirements.txt to NLR-PySAM==8.0.0 for Ubuntu runner --- test/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/requirements.txt b/test/requirements.txt index ba7b4d6acb..bfec01749b 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,2 +1,2 @@ -NREL-PySAM==8.0.0 +NLR-PySAM==8.0.0 requests From 448be98b0f44d9a8d899c10e145e7bcab611f924 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 01:39:26 -0600 Subject: [PATCH 03/12] Update runpath for all .so in linux_64 for PySSC differ to work --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9831927210..70b5452b9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,25 +177,34 @@ jobs: cmake -Bbuild -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSAMAPI_EXPORT=0 -DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PREFIX_PATH=${ORTOOLSDIR} -Dabsl_DIR=${ORTOOLSDIR}\lib\cmake\absl" -Dutf8_range_DIR=${ORTOOLSDIR}\lib\cmake\utf8_range" cmake --build build -j4 - - name: Generate test file - shell: bash {0} - run: results="1"; nohup xvfb-run ${SAMNTDIR}"/build/deploy/linux_64/SAMOS.bin" no_sam_file ${SAMNTDIR}"/build/deploy/test_script_ow.lk" &>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l ${SAMNTDIR}/build/test_results_linux64.csv | cut -d' ' -f1); echo $lines; grep -i final_configuration_eof ${SAMNTDIR}/build/test_results_linux64.csv; results=$?; done - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: Test Results Linux - path: ${{env.SAMNTDIR}}/build/test_results_linux64.csv - - name: Evaluate test results vs Linux file - run: | - python ${SAMNTDIR}/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_linux64.csv ${SAMNTDIR}/build/test_results_linux64.csv false + # - name: Generate test file + # shell: bash {0} + # run: results="1"; nohup xvfb-run ${SAMNTDIR}"/build/deploy/linux_64/SAMOS.bin" no_sam_file ${SAMNTDIR}"/build/deploy/test_script_ow.lk" &>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l ${SAMNTDIR}/build/test_results_linux64.csv | cut -d' ' -f1); echo $lines; grep -i final_configuration_eof ${SAMNTDIR}/build/test_results_linux64.csv; results=$?; done + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} + # - name: Upload Artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: Test Results Linux + # path: ${{env.SAMNTDIR}}/build/test_results_linux64.csv + # - name: Evaluate test results vs Linux file + # run: | + # python ${SAMNTDIR}/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_linux64.csv ${SAMNTDIR}/build/test_results_linux64.csv false - - name: Evaluate test results vs Windows file + # - name: Evaluate test results vs Windows file + # run: | + # python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true + + - name: Update runpath for PySSC run: | - python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true + apt update + apt install patchelf + cd ${SAMNTDIR}"/build/deploy/linux_64 + for lib in *.so; do + [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" + done - name: Run SSC Variable & SAM Defaults Differ run: | From 114038f21eb78d0196df7cf53edc837bb2e600f2 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 02:00:08 -0600 Subject: [PATCH 04/12] Update apt-get CLI interface for patchelf --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70b5452b9f..5a5582eaf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,8 +199,7 @@ jobs: - name: Update runpath for PySSC run: | - apt update - apt install patchelf + sudo apt-get install -y patchelf cd ${SAMNTDIR}"/build/deploy/linux_64 for lib in *.so; do [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" From 3628e80645c5499b3e57d91b45ca217e25a54bea Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 02:20:55 -0600 Subject: [PATCH 05/12] Update to cache builds to speed up runpath debugging --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a5582eaf4..8813c042c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,24 +197,24 @@ jobs: # run: | # python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - - name: Update runpath for PySSC - run: | - sudo apt-get install -y patchelf - cd ${SAMNTDIR}"/build/deploy/linux_64 - for lib in *.so; do - [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" - done + # - name: Update runpath for PySSC + # run: | + # sudo apt-get install -y patchelf + # cd ${SAMNTDIR}/build/deploy/linux_64 + # for lib in *.so; do + # [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" + # done - - name: Run SSC Variable & SAM Defaults Differ - run: | - python -m pip install --upgrade pip - pip install -r ${SAMNTDIR}/test/requirements.txt - python ${SAMNTDIR}/test/run_defaults_diff.py - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: SSC Var & SAM Defaults Diff - path: ${{env.SAMNTDIR}}/version_diff.json + # - name: Run SSC Variable & SAM Defaults Differ + # run: | + # python -m pip install --upgrade pip + # pip install -r ${SAMNTDIR}/test/requirements.txt + # python ${SAMNTDIR}/test/run_defaults_diff.py + # - name: Upload Artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: SSC Var & SAM Defaults Diff + # path: ${{env.SAMNTDIR}}/version_diff.json build-windows: From 460576fa67555b5b01a0f91358cb3101aee92cc6 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 02:39:14 -0600 Subject: [PATCH 06/12] With cached builds. retest runpath update for differ --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8813c042c7..6b42ce6c19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,24 +197,24 @@ jobs: # run: | # python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - # - name: Update runpath for PySSC - # run: | - # sudo apt-get install -y patchelf - # cd ${SAMNTDIR}/build/deploy/linux_64 - # for lib in *.so; do - # [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" - # done + - name: Update runpath for PySSC + run: | + sudo apt-get install -y patchelf + cd ${SAMNTDIR}/build/deploy/linux_64 + for lib in *.so; do + [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" + done - # - name: Run SSC Variable & SAM Defaults Differ - # run: | - # python -m pip install --upgrade pip - # pip install -r ${SAMNTDIR}/test/requirements.txt - # python ${SAMNTDIR}/test/run_defaults_diff.py - # - name: Upload Artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: SSC Var & SAM Defaults Diff - # path: ${{env.SAMNTDIR}}/version_diff.json + - name: Run SSC Variable & SAM Defaults Differ + run: | + python -m pip install --upgrade pip + pip install -r ${SAMNTDIR}/test/requirements.txt + python ${SAMNTDIR}/test/run_defaults_diff.py + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: SSC Var & SAM Defaults Diff + path: ${{env.SAMNTDIR}}/version_diff.json build-windows: From 0dec970ef7a7095fcf1bde4094cda12d8ffff9d0 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 03:04:33 -0600 Subject: [PATCH 07/12] Update run_defaults_diff.py to set runpath in release --- test/run_defaults_diff.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/run_defaults_diff.py b/test/run_defaults_diff.py index ff9e2da394..80073f4ac9 100644 --- a/test/run_defaults_diff.py +++ b/test/run_defaults_diff.py @@ -69,6 +69,23 @@ old_ssc = installations_dirs / "linux_64" / 'ssc.so' +# update runpath of old ssc.so - should be done in the future by the SAM build system, but for now we need to do it manually +# Set your target directory and new runpath +target_dir = Path(installations_dirs / "linux_64") +new_runpath = "$ORIGIN" # Or an absolute path like '/usr/local/lib' + +# Loop through all .so files recursively +for so_file in target_dir.glob("**/*.so"): + try: + # Run patchelf to set the rpath/runpath + subprocess.run( + ["patchelf", "--set-rpath", new_runpath, str(so_file)], check=True + ) + print(f"Successfully updated: {so_file.name}") + except subprocess.CalledProcessError as e: + print(f"Failed to update {so_file.name}: {e}") + + ssc_dir = Path(os.environ.get("SSCDIR")) new_ssc = Path(glob.glob(str(ssc_dir / "build" / "ssc" / "*ssc.so"))[0]) From 4d769ce1579af1a76e92bcebf551a30856a26791 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 03:15:16 -0600 Subject: [PATCH 08/12] Remove step to update runpath in current sam build --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b42ce6c19..0d2cd3e2c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,13 +197,13 @@ jobs: # run: | # python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - - name: Update runpath for PySSC - run: | - sudo apt-get install -y patchelf - cd ${SAMNTDIR}/build/deploy/linux_64 - for lib in *.so; do - [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" - done + # - name: Update runpath for PySSC + # run: | + # sudo apt-get install -y patchelf + # cd ${SAMNTDIR}/build/deploy/linux_64 + # for lib in *.so; do + # [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" + # done - name: Run SSC Variable & SAM Defaults Differ run: | From ee9cbd95c128d6e14da3122b4db6419dc1066de5 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 03:23:28 -0600 Subject: [PATCH 09/12] Reinstate all steps for Ubuntu runner - differ is now running --- .github/workflows/ci.yml | 50 +++++++++++++++++++-------------------- test/run_defaults_diff.py | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d2cd3e2c1..a265ec4a40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,33 +177,33 @@ jobs: cmake -Bbuild -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSAMAPI_EXPORT=0 -DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PREFIX_PATH=${ORTOOLSDIR} -Dabsl_DIR=${ORTOOLSDIR}\lib\cmake\absl" -Dutf8_range_DIR=${ORTOOLSDIR}\lib\cmake\utf8_range" cmake --build build -j4 - # - name: Generate test file - # shell: bash {0} - # run: results="1"; nohup xvfb-run ${SAMNTDIR}"/build/deploy/linux_64/SAMOS.bin" no_sam_file ${SAMNTDIR}"/build/deploy/test_script_ow.lk" &>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l ${SAMNTDIR}/build/test_results_linux64.csv | cut -d' ' -f1); echo $lines; grep -i final_configuration_eof ${SAMNTDIR}/build/test_results_linux64.csv; results=$?; done - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Upload Artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: Test Results Linux - # path: ${{env.SAMNTDIR}}/build/test_results_linux64.csv - # - name: Evaluate test results vs Linux file - # run: | - # python ${SAMNTDIR}/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_linux64.csv ${SAMNTDIR}/build/test_results_linux64.csv false + - name: Generate test file + shell: bash {0} + run: results="1"; nohup xvfb-run ${SAMNTDIR}"/build/deploy/linux_64/SAMOS.bin" no_sam_file ${SAMNTDIR}"/build/deploy/test_script_ow.lk" &>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l ${SAMNTDIR}/build/test_results_linux64.csv | cut -d' ' -f1); echo $lines; grep -i final_configuration_eof ${SAMNTDIR}/build/test_results_linux64.csv; results=$?; done + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Test Results Linux + path: ${{env.SAMNTDIR}}/build/test_results_linux64.csv + - name: Evaluate test results vs Linux file + run: | + python ${SAMNTDIR}/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_linux64.csv ${SAMNTDIR}/build/test_results_linux64.csv false - # - name: Evaluate test results vs Windows file - # run: | - # python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true + - name: Evaluate test results vs Windows file + run: | + python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - # - name: Update runpath for PySSC - # run: | - # sudo apt-get install -y patchelf - # cd ${SAMNTDIR}/build/deploy/linux_64 - # for lib in *.so; do - # [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" - # done + - name: Update runpath for PySSC + run: | + sudo apt-get install -y patchelf + cd ${SAMNTDIR}/build/deploy/linux_64 + for lib in *.so; do + [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" + done - name: Run SSC Variable & SAM Defaults Differ run: | diff --git a/test/run_defaults_diff.py b/test/run_defaults_diff.py index 80073f4ac9..21ff199217 100644 --- a/test/run_defaults_diff.py +++ b/test/run_defaults_diff.py @@ -69,7 +69,7 @@ old_ssc = installations_dirs / "linux_64" / 'ssc.so' -# update runpath of old ssc.so - should be done in the future by the SAM build system, but for now we need to do it manually +# update runpath of old ssc.so (in release) - should be done in the future by the SAM build system, but for now we need to do it manually # Set your target directory and new runpath target_dir = Path(installations_dirs / "linux_64") new_runpath = "$ORIGIN" # Or an absolute path like '/usr/local/lib' From 383575efad9495f92ca9575fc2a604d95ae3a56f Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Mon, 17 Aug 2026 03:35:38 -0600 Subject: [PATCH 10/12] Remove unused step to set PySSC runpath for differ --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a265ec4a40..88d5777a71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,14 +197,6 @@ jobs: run: | python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - - name: Update runpath for PySSC - run: | - sudo apt-get install -y patchelf - cd ${SAMNTDIR}/build/deploy/linux_64 - for lib in *.so; do - [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" - done - - name: Run SSC Variable & SAM Defaults Differ run: | python -m pip install --upgrade pip From d2e42f746171c5be411980b6126ca1d4e5c631b6 Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 20 Aug 2026 02:07:51 -0600 Subject: [PATCH 11/12] Update to SAM api to address Windows runner on pysam --- api/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 15ea280f14..bc5ef091fa 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -110,7 +110,7 @@ else() find_library( SSC_LIB NAMES ssc.dylib ssc.lib ssc.so PATHS $ENV{SSC_LIB} $ENV{SSCDIR}/build/ssc $ENV{SSCDIR}/build/ssc/Release) - if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR MSVC) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") unset(SSCD_LIB CACHE) find_library( SSCD_LIB NAMES sscd.dylib sscd.lib sscd.so @@ -119,7 +119,7 @@ else() endif() if(SAMAPI_EXPORT) # only on Unix - unset(SSCE_LIB CACHE) + unset(SSCE_LIB CACHE AND UNIX) find_library( SSCE_LIB NAMES libssc.so PATHS $ENV{SSCE_LIB} $ENV{SSCDIR}/build/ssc $ENV{SSCDIR}/../build_linux_ssc/ssc ) From d9d23d827ad592b495eafd7f393eae79bace970c Mon Sep 17 00:00:00 2001 From: Steven Janzou Date: Thu, 20 Aug 2026 02:33:22 -0600 Subject: [PATCH 12/12] Fix syntax error for Windows and Linux pysam runners --- api/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index bc5ef091fa..cdacf1fd99 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -118,8 +118,8 @@ else() target_link_libraries(SAM_api debug ${SSCD_LIB}) endif() - if(SAMAPI_EXPORT) # only on Unix - unset(SSCE_LIB CACHE AND UNIX) + if(SAMAPI_EXPORT AND UNIX) # only on Unix + unset(SSCE_LIB CACHE) find_library( SSCE_LIB NAMES libssc.so PATHS $ENV{SSCE_LIB} $ENV{SSCDIR}/build/ssc $ENV{SSCDIR}/../build_linux_ssc/ssc )