Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
64bcb0d
adding omega_h install path to the build system
magnoxemo Jun 2, 2026
b266514
add omega_h to the build system
magnoxemo Jun 7, 2026
8067920
override the pure virtual functions
magnoxemo Jun 7, 2026
da32c5b
update CI to include omega_h
magnoxemo Jun 7, 2026
b980783
update openmc testing ci to include omega_h as well
magnoxemo Jun 8, 2026
e954124
concentrating on changes that are necessary only for omega_h support
magnoxemo Jun 8, 2026
a8c9491
keeping my cicd docker file locally
magnoxemo Jun 8, 2026
7387535
Merge branch 'xdg-org:main' into omega_h
magnoxemo Jun 9, 2026
afc7b2c
still need to implement parse metadata
magnoxemo Jun 15, 2026
638dd41
implementing tests
magnoxemo Jun 15, 2026
b805e6a
compile omega_h with exodus support
magnoxemo Jun 21, 2026
b92d362
add omega_h to the docker file
magnoxemo Jun 21, 2026
2b855a8
fix testing mesh file name
magnoxemo Jun 24, 2026
6d85772
Merge branch 'main' into omega_h
magnoxemo Jun 24, 2026
e86a8a2
update mesh file name
magnoxemo Jun 24, 2026
2bfa6cc
install seacas in docker file to support exodus mesh in omega_h
magnoxemo Jun 25, 2026
929b883
setting xdg branch in docker file to this branch for now
magnoxemo Jun 25, 2026
7e8a479
update main CI to include seacas
magnoxemo Jun 27, 2026
be2d849
update xdg headers and lib pointers to allows using omega_h
magnoxemo Jun 27, 2026
5e003ca
change mesh file against which we will be testing
magnoxemo Jul 13, 2026
0507288
update test mesh
magnoxemo Jul 23, 2026
cc0db2d
trying to fix ci by providing seacas prefix path
magnoxemo Jul 27, 2026
634c3a1
Fix CMAKE_PREFIX_PATH formatting in CI workflow
magnoxemo Aug 2, 2026
7a6d1cf
regold test values
magnoxemo Aug 2, 2026
7b36ae7
cleaning up
magnoxemo Aug 4, 2026
461210d
don't build docker from my own branch
magnoxemo Aug 4, 2026
fa53c9b
Merge branch 'main' into omega_h
magnoxemo Aug 4, 2026
280fc00
rebase and adapt to API change issue
magnoxemo Aug 8, 2026
4da8529
cache seacas in CI as well
magnoxemo Aug 12, 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
97 changes: 95 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ on:
jobs:
main:
name: |
libMesh=${{ matrix.libmesh }};MOAB=${{ matrix.moab }}
libMesh=${{ matrix.libmesh }};MOAB=${{ matrix.moab }};Omega_h=${{ matrix.omega_h }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
libmesh: [true, false]
moab: [true, false]
omega_h: [true, false]
exclude:
- moab: false
libmesh: false
omega_h: false

steps:
- name: Checkout
Expand Down Expand Up @@ -81,6 +83,18 @@ jobs:
cd libmesh
git checkout v1.7.0

- name: Omega_h Clone
if: ${{ matrix.omega_h }}
shell: bash
run: |
cd ~
git clone https://github.com/SCOREC/omega_h.git
cd omega_h
git checkout master
cd ~
git clone https://github.com/sandialabs/seacas.git


- name: OpenMP Environment Variables
run: |
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
Expand All @@ -97,6 +111,16 @@ jobs:
# Enforce that we're using the debug build of libMesh
echo "METHOD=dbg" >> $GITHUB_ENV

- name: Omega_h Environment Variables
if: ${{ matrix.omega_h }}
run: |
echo "OMEGA_H_SHA"=$(cd ~/omega_h && git rev-parse HEAD) >> $GITHUB_ENV

- name: Seacas Environment Variables
if: ${{ matrix.omega_h }}
run: |
echo "SEACAS_SHA"=$(cd ~/seacas && git rev-parse HEAD) >> $GITHUB_ENV

- name: MOAB Cache
if: ${{ matrix.moab }}
id: moab-cache
Expand All @@ -117,6 +141,26 @@ jobs:
path: ~/LIBMESH
key: libmesh-${{ runner.os }}-${{ env.cache-name }}-${{ env.LIBMESH_SHA }}

- name: Omega_h Cache
if: ${{ matrix.omega_h }}
id: omega-h-cache
uses: actions/cache@v3
env:
cache-name: omega-h-cache
with:
path: ~/OMEGA_H
key: omega-h-${{ runner.os }}-${{ env.cache-name }}-${{ env.OMEGA_H_SHA }}

- name: Seacas Cache
if: ${{ matrix.omega_h }}
id: seacas-cache
uses: actions/cache@v3
env:
cache-name: seacas-cache
with:
path: ~/SEACAS
key: seacas-${{ runner.os }}-${{ env.cache-name }}-${{ env.SEACAS_SHA }}

- if: ${{ matrix.moab && steps.moab-cache.outputs.cache-hit != 'true' }}
name: Build MOAB
run: |
Expand All @@ -141,6 +185,43 @@ jobs:
make -j4
sudo make install

- if: ${{ matrix.omega_h && steps.seacas-cache.outputs.cache-hit != 'true' }}
name: Build Seacas
shell: bash
run: |
# before building omega_h we need to compile seacas on which omega_h depends
# for interacting with exodus mesh API
cd ~/seacas
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/SEACAS \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DSeacas_ENABLE_ALL_PACKAGES=OFF \
-DSeacas_ENABLE_SEACASExodus=ON \
-DTPL_ENABLE_MPI=OFF \
-DTPL_ENABLE_Netcdf=ON
make -j4
make install

- if: ${{ matrix.omega_h && steps.omega-h-cache.outputs.cache-hit != 'true' }}
name: Build Omega_h
shell: bash
run: |
cd ~/omega_h
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/OMEGA_H \
-DCMAKE_BUILD_TYPE=Release \
-DOmega_h_USE_MPI=OFF \
-DBUILD_TESTING=OFF \
-DSEACASExodus_DIR=$HOME/SEACAS/lib/cmake/SEACASExodus \
-DOmega_h_USE_SEACASExodus=ON
make -j4
make install

- name: Build
shell: bash
run: |
Expand All @@ -157,7 +238,19 @@ jobs:
fi
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}$HOME/MOAB"
fi
cmake .. -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" -DCMAKE_INSTALL_PREFIX=$HOME/opt -DXDG_ENABLE_MOAB=${{ matrix.moab && 'ON' || 'OFF' }} -DXDG_ENABLE_LIBMESH=${{ matrix.libmesh && 'ON' || 'OFF' }}
if [ "${{ matrix.omega_h }}" = 'true' ]; then
if [ -n "$CMAKE_PREFIX_PATH" ]; then
CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;"
fi
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}$HOME/OMEGA_H;$HOME/SEACAS"
fi
cmake .. \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
-DCMAKE_INSTALL_PREFIX=$HOME/opt \
-DXDG_ENABLE_MOAB=${{ matrix.moab && 'ON' || 'OFF' }} \
-DXDG_ENABLE_LIBMESH=${{ matrix.libmesh && 'ON' || 'OFF' }} \
-DXDG_ENABLE_OMEGA_H=${{ matrix.omega_h && 'ON' || 'OFF' }} \
-DOMEGA_H_INSTALL_PATH=$HOME/OMEGA_H
make -j4 install

- name: Test
Expand Down
73 changes: 72 additions & 1 deletion .github/workflows/openmc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,22 @@ jobs:
cd libmesh
git checkout v1.7.0

- name: Omega_h Clone
shell: bash
run: |
cd ~
git clone https://github.com/SCOREC/omega_h.git
cd omega_h
git checkout master
cd ~
git clone https://github.com/sandialabs/seacas.git

- name: Cache Variables
run: |
echo "MOAB_SHA"=$(cd ~/moab && git rev-parse HEAD) >> $GITHUB_ENV
echo "LIBMESH_SHA"=$(cd ~/libmesh && git rev-parse HEAD) >> $GITHUB_ENV
echo "OMEGA_H_SHA"=$(cd ~/omega_h && git rev-parse HEAD) >> $GITHUB_ENV
echo "SEACAS_SHA"=$(cd ~/seacas && git rev-parse HEAD) >> $GITHUB_ENV

- name: MOAB Cache
id: moab-cache
Expand All @@ -73,6 +85,24 @@ jobs:
path: ~/LIBMESH
key: libmesh-${{ runner.os }}-${{ env.cache-name }}-${{ env.LIBMESH_SHA }}

- name: Omega_h Cache
id: omega-h-cache
uses: actions/cache@v3
env:
cache-name: omega-h-cache
with:
path: ~/OMEGA_H
key: omega-h-${{ runner.os }}-${{ env.cache-name }}-${{ env.OMEGA_H_SHA }}

- name: Seacas Cache
id: seacas-cache
uses: actions/cache@v3
env:
cache-name: seacas-cache
with:
path: ~/SEACAS
key: seacas-${{ runner.os }}-${{ env.cache-name }}-${{ env.SEACAS_SHA }}

- if: ${{ steps.moab-cache.outputs.cache-hit != 'true' }}
name: Build MOAB
shell: bash
Expand All @@ -95,13 +125,54 @@ jobs:
../configure --prefix=$HOME/LIBMESH --enable-exodus --disable-netcdf4 --disable-eigen --disable-lapack --disable-mpi --disable-metaphysicl
make -j4
make install
- if: ${{ steps.seacas-cache.outputs.cache-hit != 'true' }}
name: Build Seacas
shell: bash
run: |
# before building omega_h we need to compile seacas on which omega_h depends
# for interacting with exodus mesh API
cd ~/seacas
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/SEACAS \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DSeacas_ENABLE_ALL_PACKAGES=OFF \
-DSeacas_ENABLE_SEACASExodus=ON \
-DTPL_ENABLE_MPI=OFF \
-DTPL_ENABLE_Netcdf=ON
make -j4
make install

- if: ${{ steps.omega-h-cache.outputs.cache-hit != 'true' }}
name: Build Omega_h
shell: bash
run: |
cd ~/omega_h
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/OMEGA_H \
-DCMAKE_BUILD_TYPE=Release \
-DOmega_h_USE_MPI=OFF \
-DBUILD_TESTING=OFF \
-DSEACASExodus_DIR=$HOME/SEACAS/lib/cmake/SEACASExodus \
-DOmega_h_USE_SEACASExodus=ON
make -j4
make install

- name: Build XDG
shell: bash
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/opt -DCMAKE_PREFIX_PATH="$HOME/MOAB;$HOME/LIBMESH" -DXDG_ENABLE_MOAB=ON -DXDG_ENABLE_LIBMESH=ON
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/opt \
-DCMAKE_PREFIX_PATH="$HOME/MOAB;$HOME/LIBMESH;$HOME/OMEGA_H;$HOME/SEACAS" \
-DXDG_ENABLE_MOAB=ON \
-DXDG_ENABLE_LIBMESH=ON \
-DXDG_ENABLE_OMEGA_H=ON
make -j4 all install

- name: Build OpenMC
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ build
docs/_build
docs/Doxyfile
.vscode

.idea/*
39 changes: 35 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(xdg C CXX)
option(XDG_ENABLE_MOAB "Enable support for the MOAB mesh library" ON)
option(XDG_ENABLE_MFEM "Enable support for the MFEM mesh library" OFF)
option(XDG_ENABLE_LIBMESH "Enable support for the libMesh mesh library" OFF)
option(XDG_ENABLE_OMEGA_H "Enable support for the Omega_h mesh library" OFF)
option(XDG_LINK_MPI "Link with MPI (for dependency compatibility)" OFF)
option(XDG_ENABLE_EMBREE "Enable support for the Embree ray tracing library" ON)
option(XDG_ENABLE_GPRT "Enable support for the GPRT ray tracing library" OFF)
Expand Down Expand Up @@ -43,6 +44,20 @@ if (NOT MOAB_USE_HDF5)
endif()
endif()

#===============================================================================
# Omega_h backend
#===============================================================================
if (XDG_ENABLE_OMEGA_H)
if (NOT OMEGA_H_INSTALL_PATH)
set(OMEGA_H_INSTALL_PATH "$ENV{OMEGA_H_INSTALL_PATH}")
endif()
message(STATUS "OMEGA_H_INSTALL_PATH=${OMEGA_H_INSTALL_PATH}")
find_package(Omega_h REQUIRED HINTS "${OMEGA_H_INSTALL_PATH}/lib/cmake/Omega_h")
endif()

#===============================================================================
# Embree
#===============================================================================
if (XDG_ENABLE_EMBREE)
# find Embree for CPU ray tracing

Expand Down Expand Up @@ -148,7 +163,6 @@ if (XDG_BUILD_TESTS)
message(STATUS "Using Catch2 ${Catch2_VERSION} at ${Catch2_DIR}")
endif()


# fmt
if (NOT fmt_FOUND)
set(FMT_INSTALL OFF CACHE BOOL "Generate the fmt install target")
Expand All @@ -165,13 +179,13 @@ if(XDG_BUILD_TOOLS)
add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/indicators)
endif()


# Ensure at least one mesh backend is enabled
if (NOT XDG_ENABLE_MOAB AND NOT XDG_ENABLE_LIBMESH)
if (NOT XDG_ENABLE_MOAB AND NOT XDG_ENABLE_LIBMESH AND NOT XDG_ENABLE_OMEGA_H)
message(FATAL_ERROR
"No mesh backend enabled. Enable at least one of:\n"
" -DXDG_ENABLE_MOAB=ON\n"
" -DXDG_ENABLE_LIBMESH=ON")
" -DXDG_ENABLE_LIBMESH=ON\n"
" -DXDG_ENABLE_OMEGA_H=ON")
endif()

# Ensure at least one ray tracing backend is enabled
Expand Down Expand Up @@ -240,6 +254,12 @@ src/moab/metadata.cpp
)
endif()

if (XDG_ENABLE_OMEGA_H)
list(APPEND xdg_sources
src/omega_h/mesh_manager.cpp
)
endif ()

#===============================================================================
# RPATH information (from OpenMC)
#===============================================================================
Expand Down Expand Up @@ -318,6 +338,12 @@ if (XDG_ENABLE_EMBREE)
target_compile_definitions(xdg PUBLIC XDG_ENABLE_EMBREE)
endif()


if (XDG_ENABLE_OMEGA_H)
target_compile_definitions(xdg PUBLIC XDG_ENABLE_OMEGA_H)
endif()


if (XDG_ENABLE_GPRT)
target_compile_definitions(xdg PUBLIC XDG_ENABLE_GPRT)
target_link_options(xdg PRIVATE -Wl,--unresolved-symbols=ignore-in-shared-libs)
Expand Down Expand Up @@ -358,6 +384,11 @@ if(XDG_ENABLE_LIBMESH)
target_link_libraries(xdg PRIVATE PkgConfig::LIBMESH)
endif()

if(XDG_ENABLE_OMEGA_H)
target_link_libraries(xdg PRIVATE Omega_h::omega_h)
endif()


# this provides the ability to link MPI when needed for compatibility with other
# libraries (e.g., libMesh)
if (XDG_LINK_MPI)
Expand Down
Loading
Loading