Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.13 KB

README.rst

File metadata and controls

72 lines (52 loc) · 2.13 KB

oneapi-spack-tests

REUSE status

The files here test oneapi support in spack. It installs compilers, and uses icpc/icpx/ifort/ifx/g++/gfortran to build programs that use the oneapi libraries and SYCL. It uses a sample package that contains programs that use oneAPI components.

It tests the following:

  • intel-oneapi-* packages as dependencies
  • include directories are accessible
  • library directories are accessible
  • packages provide correct configuration when used as a virtual provider
  • environment variables are set

Install prerequisites for testing:

pip install -r requirements.txt

Setup tests:

# Install and activate spack
git clone https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
# Add the test packages
spack repo add ./repo
# Install and activate compilers
spack install intel-oneapi-compilers
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin

Run all tests:

pytest -s tests

Run pre-commit checks:

pre-commit run --all

The sample applications are in the samples directory. The spack package that downloads/builds/installs the sample applications is in the repo directory.

Adding samples

Add to samples, package.py, and test_packages.py.

Adding to CI

We divided the tests into groups because GitHub Actions runners do not have enough disk space to install all of oneAPI.