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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
DEFAULT_BRANCH: develop
DEFAULT_BRANCH: patch
WX_VERSION: '3.2.8.1'
ORTOOLS_VER: "9.14"
ORTOOLS_RELEASE: "6206"
Expand Down 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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ The desktop version of SAM for Windows, Mac, or Linux builds from the following

* [jsoncpp](https://github.com/open-source-parsers/jsoncpp) is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings.

* [Python](https://www.python.org)/[Miniconda](https://docs.conda.io/) is for integration of Python scripts with the SAM user interface.

This repository, **SAM**, contains the code for SAM's user interface that assigns values to inputs of the SSC compute modules, runs the modules in the correct order, and displays simulation results. It also includes tools for editing LK scripts, viewing time series results, and generating shade data from a 3-dimensional representation of a photovoltaic array or solar hot water collector and nearby shading objects.

The SAM repository also includes [two libraries](https://github.com/NatLabRockies/SAM/tree/develop/Sandia) from Sandia National Laboratories, [stepwise](https://dakota.sandia.gov/content/packages/stepwise), and [LHS](https://dakota.sandia.gov/content/packages/lhs), which are distributed as part of the Dakota platform, licensed under [LGPL](https://www.gnu.org/licenses/lgpl-3.0.en.html).
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