Skip to content

Commit

Permalink
Work on conda CI for oneAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
garth-wells committed Jul 18, 2024
1 parent 6b3f262 commit a09f4bf
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/conda-env-oneapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: idp
dependencies:
- intelpython3_core
177 changes: 96 additions & 81 deletions .github/workflows/oneapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,99 +17,114 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: fenicsproject/test-env:current-oneapi
# container: fenicsproject/test-env:current-oneapi

env:
PETSC_ARCH: ${{ matrix.petsc_arch }}
# env:
# PETSC_ARCH: ${{ matrix.petsc_arch }}

strategy:
matrix:
petsc_arch: [linux-gnu-real32-32, linux-gnu-real64-32, linux-gnu-complex128-32]
# strategy:
# matrix:
# petsc_arch: [linux-gnu-real32-32, linux-gnu-real64-32, linux-gnu-complex128-32]

name: oneAPI build and test (${{ matrix.petsc_arch }})
# name: oneAPI build and test (${{ matrix.petsc_arch }})

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: idp
python-version: 3.10
channels: https://software.repos.intel.com/python/conda/,conda-forge
environment-file: .github/workflows/conda-env-oneapi.yml
# allow-softlinks: true
# channel-priority: flexible
show-channel-urls: true
# use-only-tar-bz2: true
- run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Install Python dependencies
run: |
. /opt/intel/oneapi/setvars.sh
python3 -m pip install nanobind scikit-build-core[pyproject] --upgrade
# - name: Install Python dependencies
# run: |
# . /opt/intel/oneapi/setvars.sh
# python3 -m pip install nanobind scikit-build-core[pyproject] --upgrade

- name: Install Basix
run: |
. /opt/intel/oneapi/setvars.sh
pip install --no-build-isolation git+https://github.com/FEniCS/basix.git
# - name: Install Basix
# run: |
# . /opt/intel/oneapi/setvars.sh
# pip install --no-build-isolation git+https://github.com/FEniCS/basix.git

- name: Clone FFCx
uses: actions/checkout@v4
with:
path: ./ffcx
repository: FEniCS/ffcx
ref: main
- name: Install FFCx C interface
run: |
. /opt/intel/oneapi/setvars.sh
cmake -B ufcx-build-dir -S ffcx/cmake/
cmake --build ufcx-build-dir
cmake --install ufcx-build-dir
# - name: Clone FFCx
# uses: actions/checkout@v4
# with:
# path: ./ffcx
# repository: FEniCS/ffcx
# ref: main
# - name: Install FFCx C interface
# run: |
# . /opt/intel/oneapi/setvars.sh
# cmake -B ufcx-build-dir -S ffcx/cmake/
# cmake --build ufcx-build-dir
# cmake --install ufcx-build-dir

- name: Configure DOLFINx C++
run: |
. /opt/intel/oneapi/setvars.sh
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -DDOLFINX_ENABLE_SCOTCH=on -DDOLFINX_ENABLE_KAHIP=on -DDOLFINX_UFCX_PYTHON=off -B build -S cpp/
# - name: Configure DOLFINx C++
# run: |
# . /opt/intel/oneapi/setvars.sh
# cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -DDOLFINX_ENABLE_SCOTCH=on -DDOLFINX_ENABLE_KAHIP=on -DDOLFINX_UFCX_PYTHON=off -B build -S cpp/

- name: Build and install DOLFINx C++ library
run: |
. /opt/intel/oneapi/setvars.sh
cmake --build build
cmake --install build
# - name: Build and install DOLFINx C++ library
# run: |
# . /opt/intel/oneapi/setvars.sh
# cmake --build build
# cmake --install build

- name: Install UFL and FFCx modules
run: |
. /opt/intel/oneapi/setvars.sh
pip install --no-build-isolation git+https://github.com/FEniCS/ufl.git
pip install --no-build-isolation ffcx/
# - name: Install UFL and FFCx modules
# run: |
# . /opt/intel/oneapi/setvars.sh
# pip install --no-build-isolation git+https://github.com/FEniCS/ufl.git
# pip install --no-build-isolation ffcx/

- name: Build and run DOLFINx C++ unit tests (serial and MPI)
run: |
. /opt/intel/oneapi/setvars.sh
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S cpp/test/
cmake --build build/test
cd build/test
ctest --output-on-failure -R unittests
mpiexec -n 2 ctest --output-on-failure -R unittests
# - name: Build and run DOLFINx C++ unit tests (serial and MPI)
# run: |
# . /opt/intel/oneapi/setvars.sh
# cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S cpp/test/
# cmake --build build/test
# cd build/test
# ctest --output-on-failure -R unittests
# mpiexec -n 2 ctest --output-on-failure -R unittests

- name: Build and run DOLFINx C++ regression tests (serial and MPI (np=2))
run: |
. /opt/intel/oneapi/setvars.sh
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S cpp/demo/
cmake --build build/demo
cd build/demo
ctest -R demo -R serial
ctest -R demo -R mpi_2
# - name: Build and run DOLFINx C++ regression tests (serial and MPI (np=2))
# run: |
# . /opt/intel/oneapi/setvars.sh
# cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S cpp/demo/
# cmake --build build/demo
# cd build/demo
# ctest -R demo -R serial
# ctest -R demo -R mpi_2

- name: Build DOLFINx Python interface
run: |
. /opt/intel/oneapi/setvars.sh
pip -v install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" python/
- name: Install Python test dependencies
run: |
. /opt/intel/oneapi/setvars.sh
pip install matplotlib pytest pytest-xdist
- name: Run DOLFINx demos (Python, serial)
run: |
. /opt/intel/oneapi/setvars.sh
pytest -v -n=2 -m serial --durations=10 python/demo/test.py
- name: Run DOLFINx demos (Python, MPI (np=2))
run: |
. /opt/intel/oneapi/setvars.sh
pytest -m mpi --num-proc=2 python/demo/test.py
- name: Run DOLFINx Python unit tests (serial)
run: |
. /opt/intel/oneapi/setvars.sh
pytest -n=auto --durations=50 python/test/unit
- name: Run DOLFINx Python unit tests (MPI, np=2)
run: |
. /opt/intel/oneapi/setvars.sh
mpiexec -n 2 pytest python/test/unit
# - name: Build DOLFINx Python interface
# run: |
# . /opt/intel/oneapi/setvars.sh
# pip -v install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" python/
# - name: Install Python test dependencies
# run: |
# . /opt/intel/oneapi/setvars.sh
# pip install matplotlib pytest pytest-xdist
# - name: Run DOLFINx demos (Python, serial)
# run: |
# . /opt/intel/oneapi/setvars.sh
# pytest -v -n=2 -m serial --durations=10 python/demo/test.py
# - name: Run DOLFINx demos (Python, MPI (np=2))
# run: |
# . /opt/intel/oneapi/setvars.sh
# pytest -m mpi --num-proc=2 python/demo/test.py
# - name: Run DOLFINx Python unit tests (serial)
# run: |
# . /opt/intel/oneapi/setvars.sh
# pytest -n=auto --durations=50 python/test/unit
# - name: Run DOLFINx Python unit tests (MPI, np=2)
# run: |
# . /opt/intel/oneapi/setvars.sh
# mpiexec -n 2 pytest python/test/unit

0 comments on commit a09f4bf

Please sign in to comment.