Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
516450c
Initial structure for EmbreeRunner
jmaack24 Jan 8, 2026
6a4c716
Bounding box calculations added to surface and aperture structures
jmaack24 Jan 12, 2026
98dedec
Add tests for aperture bounding box
jmaack24 Jan 12, 2026
9d5e69c
Separate logging from thread manager
jmaack24 Jan 13, 2026
aa82d59
Change embree runner to inherit from native runner
jmaack24 Jan 13, 2026
944e179
Fix CI builds
jmaack24 Jan 13, 2026
7ea1104
Add tests for surface bounding box
jmaack24 Jan 13, 2026
6b47441
Add logger to trace_embree function
jmaack24 Jan 13, 2026
5ec6524
Add EmbreeRunner validation test and another short unit test
jmaack24 Jan 13, 2026
fc02507
Set virtual flag for reading input files; update embree and native ru…
jmaack24 Jan 13, 2026
2d2b811
Add unit tests for thread manager
jmaack24 Jan 14, 2026
e55fad9
Move embree initialization to part of runner setup
jmaack24 Jan 14, 2026
e4465f2
Commonize interaction type determination between embree and native ru…
jmaack24 Jan 14, 2026
9b52531
EmbreeRunner multi-threading implementation
jmaack24 Jan 15, 2026
a5971e7
Address copilot comments
jmaack24 Jan 15, 2026
4a911fa
Update CI and coverage work flows to build Embree
jmaack24 Jan 21, 2026
878f6eb
Fix work flow errors
jmaack24 Jan 21, 2026
6fe5cce
Change windows build to use downloaded binary
jmaack24 Jan 21, 2026
73919c2
Attempt to fix windows build
jmaack24 Jan 21, 2026
cf6f3c0
Fix windows CI hopefully. Maybe.
jmaack24 Jan 21, 2026
5050963
Pass along number of threads value to embree; another attempt to fix …
jmaack24 Jan 21, 2026
c4ff4bf
Fix linux compiler warning; attempt whatever to fix windows ci
jmaack24 Jan 21, 2026
079ff23
Try again
jmaack24 Jan 21, 2026
17afb27
Updates to README for Embree install and SolTrace build; disable lega…
jmaack24 Jan 22, 2026
8487343
Merge branch 'develop' into 95-implement-embree-runner
jmaack24 Jan 22, 2026
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
38 changes: 38 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,43 @@ jobs:
sudo apt-get update
sudo apt-get install -y libfontconfig1-dev

- name: Install embree (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libembree-dev

- name: Install embree (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install embree

- name: Install embree (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$embreeVersion = "4.4.0"
$embreeUrl = "https://github.com/embree/embree/releases/download/v$embreeVersion/embree-$embreeVersion.x64.windows.zip"
$embreeZip = "$env:TEMP\embree.zip"
$embreeDir = "C:\embree"

Write-Host "Downloading Embree $embreeVersion..."
Invoke-WebRequest -Uri $embreeUrl -OutFile $embreeZip

Write-Host "Extracting Embree..."
Expand-Archive -Path $embreeZip -DestinationPath $embreeDir -Force

# $embreeRoot = Get-ChildItem -Path $embreeDir -Directory -Filter "embree*" | Select-Object -First 1
$embreeCMake = Join-Path $embreeDir "lib\cmake\embree-$embreeVersion"
$embreeLib = Join-Path $embreeDir "bin"

# Write-Host "Embree root: $($embreeRoot.FullName)"
Write-Host "Embree CMake: $embreeCMake"
Write-Host "Embree Lib: $embreeLib"

echo "embree_DIR=$embreeCMake" >> $env:GITHUB_ENV
echo "$embreeLib" >> $env:GITHUB_PATH
Comment on lines +75 to +99
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows Embree installation script extracts to a directory path that includes the version number in the zip, but the code assumes a specific directory structure. The commented-out lines suggest there was an attempt to find the embree directory dynamically. This could break if Embree's directory structure changes between versions. Consider making the path detection more robust.

Copilot uses AI. Check for mistakes.

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
Expand All @@ -77,6 +114,7 @@ jobs:
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DSOLTRACE_BUILD_GUI=OFF
-DSOLTRACE_BUILD_EMBREE_SUPPORT=ON
-S ${{ github.workspace }}

- name: Build-Windows
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y lcov libfontconfig1-dev
sudo apt-get install -y lcov libfontconfig1-dev libembree-dev

- name: Set reusable strings
id: strings
Expand All @@ -43,6 +43,7 @@ jobs:
-DSOLTRACE_BUILD_CORETRACE=OFF
-DSOLTRACE_BUILD_GUI=OFF
-DENABLE_COVERAGE=ON
-DSOLTRACE_BUILD_EMBREE_SUPPORT=ON
-S ${{ github.workspace }}

- name: Build
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

option(SOLTRACE_BUILD_GUI "Build the GUI parts of Soltrace" OFF)
option(SOLTRACE_BUILD_CORETRACE "Build the coretrace library (ray tracing core)" ON)
option(
SOLTRACE_BUILD_CORETRACE
"Legacy ray tracing backend including the strace executable"
OFF)

option(SOLTRACE_BUILD_EMBREE_SUPPORT "Build Embree support for ray tracing" OFF)
option(SOLTRACE_BUILD_OPTIX_SUPPORT "Build the OptiX support for ray tracing" OFF)

option(SOLTRACE_BUILD_PERF_TEST "Build performance tests (not built for debug)" OFF)

option(FULL_FIELD_VALIDATION_TEST "Include full field validation tests" OFF)
Expand Down
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `pysoltrace` API is capable of running multi-threaded simulations, generatin

The API requires the compiled coretrace library. Project files for building this library are generated using CMake as outlined in the steps below. It is possible to build only coretrace and not build the graphical interface by following the steps 1-7, but only building the `coretrace_api` project in step 7.vii.

## Steps for Building SolTrace
## Steps for Building SolTrace (Legacy)

These are the general steps you need to follow to set up your computer for developing SolTrace:

Expand Down Expand Up @@ -78,6 +78,62 @@ These are the general steps you need to follow to set up your computer for devel

Note that output is NOT stored in the ```build-soltrace/``` directory!

## Steps for Building SolTrace (work in progress)

SolTrace has been updated to use multiple ray tracing engines in addition to the prior implementation. Currently, there is no graphical user interface (it is underdevelopment).
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "it is underdevelopment" should be "it is under development" (missing space).

Suggested change
SolTrace has been updated to use multiple ray tracing engines in addition to the prior implementation. Currently, there is no graphical user interface (it is underdevelopment).
SolTrace has been updated to use multiple ray tracing engines in addition to the prior implementation. Currently, there is no graphical user interface (it is under development).

Copilot uses AI. Check for mistakes.

Building SolTrace (develop branch) requires a C++-17 capable compiler and cmake 3.19 or greater. Once these are available, building can be done in the normal pattern of configure and build:

```sh
git clone https://github.com/NatLabRockies/SolTrace.git
cd SolTrace
mkdir build
cd build
cmake ..
cmake --build . -j4
```

Note the `-j4` instructs cmake to use 4 processes to compile the source code. This can be adjusted if the number of processors available is greater (or less) than 4.

### Building with Intel's Embree Ray Tracing Library

Information about Embree can be found on the [Embree webpage](https://www.embree.org/) or on the [Embree github page](https://github.com/RenderKit/embree).

Prior to building SolTrace, you will need to install Embree v4.x.x. On Linux this is best done with a package manager. E.g.,

```sh
sudo apt-get update
sudo apt-get install libembree-dev
```
On Mac, you can use Homebrew

```sh
brew install embree
```

On Windows (this works for Linux and MacOS as well), you need to download the binaries from the [github page](https://github.com/RenderKit/embree) (under the appropriate installation header). Follow the corresponding install instructions found there.

Once Embree is installed, clone the SolTrace repo, configure with embree enabled, and build:

```sh
git clone https://github.com/NatLabRockies/SolTrace.git
cd SolTrace
mkdir build
cd build
cmake .. -DSOLTRACE_BUILD_EMBREE_SUPPORT=ON
cmake --build . -j4
```

If cmake is having trouble locating the Embree install, you specify Embree's install location passing the `embree_DIR` variable to cmake. In this case the configure command would be

```sh
cmake .. -DSOLTRACE_BUILD_EMBREE_SUPPORT=ON -Dembree_DIR=<EMBREE_INSTALL_DIR>
```

### Building with Nvidia's Optix Ray Tracing Library

TODO.

## Contributing

If you would like to report an issue with SolTrace or make a feature request, please let us know by adding a new issue on the [issues page](https://github.com/NREL/SolTrace/issues).
Expand Down
8 changes: 4 additions & 4 deletions coretrace/simulation_data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ set(SIMDATA_SRC
stage_element.cpp
sun.cpp
surface.cpp
virtual_element.cpp
utilities.cpp
vector3d.cpp
virtual_element.cpp
cst_templates/arclength.cpp
cst_templates/heliostat.cpp
cst_templates/linear_fresnel.cpp
cst_templates/parabolic_dish.cpp
cst_templates/parabolic_trough.cpp
cst_templates/utilities.cpp
solar_position_calculators/solar_position_calculator.cpp
solar_position_calculators/lib_irradproc.cpp
solar_position_calculators/solpos.cpp
Expand Down Expand Up @@ -60,14 +60,14 @@ set(SIMDATA_HDRS
stage_element.hpp
sun.hpp
surface.hpp
utilities.hpp
vector3d.hpp
# virtual_element.hpp
virtual_element.hpp
cst_templates/arclength.hpp
cst_templates/heliostat.hpp
cst_templates/linear_fresnel.hpp
cst_templates/parabolic_dish.hpp
cst_templates/parabolic_trough.hpp
cst_templates/utilities.hpp
solar_position_calculators/solar_position_calculator.hpp
solar_position_calculators/lib_irradproc.h
solar_position_calculators/solpos00.h
Expand Down
Loading