Skip to content

Commit

Permalink
ci: Add icx workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Mar 24, 2023
1 parent ceeb42e commit ce35a22
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker-bases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ jobs:
dockerfile: './docker/Dockerfile.cpu'
runner: ubuntu-latest

- tag: 'devitocodes/bases:cpu-icx'
arch: 'arch=icx'
version: ''
dockerfile: './docker/Dockerfile.cpu'
runner: ubuntu-latest

- tag: 'devitocodes/bases:cpu-nvc'
arch: 'arch=nvc-host'
version: ''
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
pytest-ubuntu-py39-gcc9-omp,
pytest-osx-py37-clang-omp,
pytest-docker-py37-gcc-omp,
pytest-docker-py37-icc-omp
pytest-docker-py37-icc-omp,
pytest-docker-py38-icx-omp
]
set: [base, adjoint]
include:
Expand Down Expand Up @@ -101,6 +102,13 @@ jobs:
language: "openmp"
sympy: "1.11"

- name: pytest-docker-py38-icx-omp
python-version: '3.8'
os: ubuntu-22.04
arch: "icx"
language: "openmp"
sympy: "1.11"

- set: base
test-set: 'not adjoint'

Expand Down Expand Up @@ -135,7 +143,7 @@ jobs:
fi
id: set-run

- name: Install GCC ${{ matrix.arch }}
- name: Install ${{ matrix.arch }} compiler
if: "runner.os == 'linux' && !contains(matrix.name, 'docker')"
run : |
sudo apt-get install -y ${{ matrix.arch }}
Expand Down
6 changes: 4 additions & 2 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ def __init__(self, *args, **kwargs):
self.cflags.append('-fsycl-targets=spir64')

if language == 'openmp':
# To be switched to `-fiopenmp` or `-qopenmp` as soon as
# it is fixed in the new Intel OneAPI release
self.cflags.append('-fopenmp')
if platform is NVIDIAX:
self.cflags.append('-fopenmp-targets=nvptx64-cuda')
Expand All @@ -566,8 +568,8 @@ def __init__(self, *args, **kwargs):

# Make sure the MPI compiler uses `icx` underneath -- whatever the MPI distro is
if kwargs.get('mpi'):
ver = check_output([self.MPICC, "--version"]).decode("utf-8")
if not ver.startswith("Intel(R) oneAPI"):
mpi_distro = sniff_mpi_distro('mpiexec')
if not mpi_distro.startswith("Intel(R) oneAPI"):
warning("The MPI compiler `%s` doesn't use the Intel(R) oneAPI "
"DPC++/C++ compiler underneath" % self.MPICC)

Expand Down
8 changes: 8 additions & 0 deletions docker/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ ENV DEVITO_LANGUAGE="openmp"
# MPICC compiler for mpi4py
ENV MPICC=$I_MPI_ROOT/bin/mpiicc

##############################################################
# ICX image
##############################################################
FROM icc as icx

# Devito config
ENV DEVITO_ARCH="icx"

##############################################################
# Published image
##############################################################
Expand Down

0 comments on commit ce35a22

Please sign in to comment.