Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
- 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: Run SSC Variable & SAM Defaults Differ
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ 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
PATHS $ENV{SSCD_LIB} $ENV{SSCDIR}/build/ssc $ENV{SSCDIR}/build/ssc/Debug)
target_link_libraries(SAM_api debug ${SSCD_LIB})
endif()

if(SAMAPI_EXPORT) # only on Unix
if(SAMAPI_EXPORT AND UNIX) # only on Unix
unset(SSCE_LIB CACHE)
find_library( SSCE_LIB
NAMES libssc.so
Expand Down
2 changes: 1 addition & 1 deletion test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NREL-PySAM==3.0.0
NLR-PySAM==8.0.0
requests
17 changes: 17 additions & 0 deletions test/run_defaults_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@

old_ssc = installations_dirs / "linux_64" / 'ssc.so'

# 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'

# 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])

Expand Down
Loading