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
8 changes: 4 additions & 4 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ RUN git clone --depth=1 --branch 3.7.02 https://github.com/kokkos/kokkos.git &&
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_STANDARD=17 \
../ && \
make -j$(nproc) && \
make install && \
cmake --build . -- -j$(nproc) && \
cmake --install . && \
cd / && \
rm -rf kokkos

RUN cd MParT_ && \
mkdir build && \
cd build && \
cmake -DMPART_BUILD_TESTS=OFF -DPYTHON_EXECUTABLE=`which python` -DMPART_FETCH_DEPS=OFF ../ && \
make -j$(nproc) && \
make install && \
cmake --build . -- -j$(nproc) && \
cmake --install . && \
cd / && \
rm -rf MParT_

Expand Down
1 change: 1 addition & 0 deletions .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ dependencies:
- pytorch
- cxx-compiler
- dill
- cmake =3.31
28 changes: 14 additions & 14 deletions .github/workflows/build-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ on:
pull_request: {}

env:
CONDA_CACHE_NUMBER: 0 # increase to reset cache manually
CONDA_CACHE_NUMBER: 0 # increase to reset cache manually

jobs:
build-tests:
runs-on: ubuntu-latest
steps:

- name: Store Date
shell: bash -l {0}
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
Expand All @@ -25,26 +24,26 @@ jobs:
path: mpart

- name: Use Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: test
use-mamba: true
auto-update-conda: true
python-version: "3.8"
activate-environment: "test"

- name: Cache Conda Deps
uses: actions/cache@v3
id: cache-conda
with:
path: /usr/share/miniconda3/envs/test
path: /usr/share/miniconda/envs/test
key: cache-conda-${{ hashFiles('mpart/.github/environment.yml') }}-${{ env.DATE }}-${{ env.CONDA_CACHE_NUMBER }}-BINDINGS

- name: Install Conda Dependencies
shell: bash -l {0}
run: mamba env update -n test -f $GITHUB_WORKSPACE/mpart/.github/environment.yml
run: conda env update -n test -f $GITHUB_WORKSPACE/mpart/.github/environment.yml
if: steps.cache-conda.outputs.cache-hit != 'true'
- uses: julia-actions/setup-julia@v2
with:
version: "1.10"

- name: Setup Julia
run: |
Expand All @@ -62,15 +61,15 @@ jobs:
id: cache-kokkos
with:
path: "${{ github.workspace }}/KOKKOS_INSTALL"
key: kokkos4.2.00
key: kokkos4.5.01

- if: ${{steps.cache-kokkos.outputs.cache-hit != 'true'}}
name: Checkout Kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
path: kokkos
ref: '4.2.00'
ref: "4.5.01"

- if: ${{steps.cache-kokkos.outputs.cache-hit != 'true'}}
name: Install Kokkos
Expand All @@ -83,7 +82,8 @@ jobs:
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/KOKKOS_INSTALL/ \
../
sudo make -j2 install
sudo cmake --build . -- -j2
sudo cmake --install .

- name: Configure MParT
shell: bash -l {0}
Expand All @@ -97,7 +97,7 @@ jobs:

- name: Build MParT
shell: bash -l {0}
run: cd $GITHUB_WORKSPACE/mpart/build; make -j2 install
run: cd $GITHUB_WORKSPACE/mpart/build; cmake --build . -- -j2; cmake --install .

- name: Run Python Tests
continue-on-error: true
Expand Down Expand Up @@ -132,4 +132,4 @@ jobs:
if: always()
with:
check_name: "Test Results with Bindings"
junit_files: ${{ github.workspace }}/test-results-*.xml
files: ${{ github.workspace }}/test-results-*.xml
6 changes: 3 additions & 3 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Use Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.11"
Expand Down Expand Up @@ -46,8 +46,8 @@ jobs:
- name: Build Docs
shell: bash -l {0}
run: |
cd ${{ github.workspace }} && cd build
make sphinx
cd ${{ github.workspace }} && cd build
make sphinx

- name: Push to gh-pages
uses: peaceiris/actions-gh-pages@v3.6.1
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/build-external-lib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request: {}

env:
CONDA_CACHE_NUMBER: 0 # increase to reset cache manually
CONDA_CACHE_NUMBER: 0 # increase to reset cache manually

jobs:
build-tests:
Expand All @@ -24,14 +24,11 @@ jobs:
path: mpart

- name: Use Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: test
use-mamba: true
auto-update-conda: true
python-version: "3.8"
activate-environment: "test"

- name: Cache Conda Deps
uses: actions/cache@v3
Expand All @@ -45,15 +42,15 @@ jobs:
id: cache-kokkos
with:
path: "${{ github.workspace }}/KOKKOS_INSTALL"
key: kokkos4.2.00
key: kokkos4.5.01

- if: ${{steps.cache-kokkos.outputs.cache-hit != 'true'}}
name: Checkout Kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
path: kokkos
ref: '4.2.00'
ref: "4.5.01"

- if: ${{steps.cache-kokkos.outputs.cache-hit != 'true'}}
name: Install Kokkos
Expand Down Expand Up @@ -86,11 +83,11 @@ jobs:

- name: Run Tests
shell: bash -l {0}
run: cd $GITHUB_WORKSPACE/mpart/build; ./RunTests --kokkos-threads=2 --reporter junit -o test-results-external.xml
run: cd $GITHUB_WORKSPACE/mpart/build; ./RunTests --kokkos-num-threads=2 --reporter junit -o test-results-external.xml

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "Test Results with Externally Built Libraries"
junit_files: ${{ github.workspace }}/mpart/build/test-results-external.xml
junit_files: ${{ github.workspace }}/mpart/build/test-results-external.xml
19 changes: 14 additions & 5 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,33 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Install compiler
uses: rlalik/setup-cpp-compiler@master
with:
compiler: g++-12

- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.25.2
ninjaVersion: 1.13.1

- name: Run CMake
run: |
cd ${{ github.workspace }}
mkdir build
cd build
cmake -DKokkos_ENABLE_THREADS=ON -DKokkos_ENABLE_SERIAL=ON ../
cmake -GNinja -DKokkos_ENABLE_THREADS=ON -DKokkos_ENABLE_SERIAL=ON ../

- name: Build
run: cd build; make -j2
run: cd build; cmake --build . -- -j2

- name: Run Tests
run: cd build; ./RunTests --kokkos-threads=2 --reporter junit -o test-results.xml
run: cd build; ./RunTests --kokkos-num-threads=2 --reporter junit -o test-results.xml

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
check_name: "Test Results"
files: build/test-results.xml


2 changes: 1 addition & 1 deletion .github/workflows/pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz

Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.13...3.31)
project(MParT VERSION 2.2.1)

message(STATUS "Will install MParT to ${CMAKE_INSTALL_PREFIX}")
Expand Down Expand Up @@ -88,15 +88,15 @@ if(NOT Kokkos_FOUND)
FetchContent_Declare(
kokkos
GIT_REPOSITORY https://github.com/kokkos/kokkos
GIT_TAG 4.2.00
GIT_TAG 4.5.01
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(kokkos)
else()
message(FATAL_ERROR "Could not find Kokkos library and MPART_FETCH_DEPS=OFF, so CMake will not attempt to fetch and install Kokkos itself.")
endif()
else()
message(STATUS "Found Kokkos!")
message(STATUS "Found Kokkos: ${Kokkos_DIR}")
endif()

if(${COMPILER_IS_NVCC})
Expand Down Expand Up @@ -297,7 +297,7 @@ if(MPART_BUILD_TESTS)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.2.1
GIT_TAG v3.4.0
)

FetchContent_MakeAvailable(Catch2)
Expand Down
Loading
Loading