From 755dd4ea37b2b116a6c0301d27366667ab10238d Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Wed, 23 Aug 2023 14:45:34 -0500 Subject: Add Intel oneAPI actions (#2949) (#2977) * ci: add Intel oneAPI actions (#2949) * ci: fix CMake installation * ci: use absolute paths for libtool installation * ci(oneAPI): update compiler versions and use cron --- .github/workflows/linux-icx-auto.yml | 53 ++++++++++++++++++++++++++++ .github/workflows/linux-icx.yml | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 .github/workflows/linux-icx-auto.yml create mode 100644 .github/workflows/linux-icx.yml diff --git a/.github/workflows/linux-icx-auto.yml b/.github/workflows/linux-icx-auto.yml new file mode 100644 index 0000000..0ef0f9e --- /dev/null +++ b/.github/workflows/linux-icx-auto.yml @@ -0,0 +1,53 @@ +name: linux autotools icx + +on: + workflow_dispatch: + schedule: + - cron: "6 0 * * *" + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install autoconf automake libtool libtool-bin + - name: Add oneAPI to apt + shell: bash + run: | + cd /tmp + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main" + + - name: Install oneAPI dpcpp and fortran compiler + shell: bash + run: | + sudo apt update + sudo apt install -y intel-oneapi-compiler-dpcpp-cpp + sudo apt install -y intel-oneapi-compiler-fortran + sudo apt install -y intel-oneapi-mpi-devel + + - name: Install oneAPI MKL library + shell: bash + run: | + sudo apt install -y intel-oneapi-mkl-devel + + - name: Test parallel + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + export PATH=$PATH:/opt/intel/oneapi/mpi/2021.10.0/bin:/opt/intel/oneapi/compiler/2023.2.1/linux/bin + ./autogen.sh + ./configure --enable-fortran --enable-parallel CXX="$(which mpiicpc) -cc=$(which icpx)" CC="$(which mpiicc) -cc=$(which icx)" FC="$(which mpiifort) -fc=$(which ifx)" LDFLAGS="-L/opt/intel/oneapi/mpi/2021.10.0/lib -L/opt/intel/oneapi/mpi/2021.10.0/lib/release/" + make -j + export SYCL_DEVICE_FILTER=opencl.cpu + make check -j + sudo make install + sudo make uninstall diff --git a/.github/workflows/linux-icx.yml b/.github/workflows/linux-icx.yml new file mode 100644 index 0000000..983ef70 --- /dev/null +++ b/.github/workflows/linux-icx.yml @@ -0,0 +1,67 @@ +name: linux CMake icx + +on: + workflow_dispatch: + schedule: + - cron: "6 0 * * *" + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: add oneAPI to apt + shell: bash + run: | + cd /tmp + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main" + + - name: install oneAPI dpcpp and fortran compiler + shell: bash + run: | + sudo apt update + sudo apt install -y intel-oneapi-compiler-dpcpp-cpp + sudo apt install -y intel-oneapi-compiler-fortran + sudo apt install -y intel-oneapi-mpi-devel + + - name: install oneAPI MKL library + shell: bash + run: | + sudo apt install -y intel-oneapi-mkl-devel + + - name: configure + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + export PATH=$PATH:/opt/intel/oneapi/mpi/2021.10.0/bin:/opt/intel/oneapi/compiler/2023.2.1/linux/bin + cmake -S . -B build \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_INSTALL_PREFIX=install \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_ENABLE_PARALLEL=ON \ + -DHDF5_BUILD_HL_LIB=ON \ + -DCMAKE_CXX_COMPILER=dpcpp \ + -DCMAKE_C_COMPILER=icx \ + -DCMAKE_Fortran_COMPILER=ifx \ + -DMKL_ROOT="/opt/intel/oneapi/mkl/latest" \ + -DTBB_ROOT="/opt/intel/oneapi/tbb/latest" + + - name: build + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + cmake --build build + + - name: test + shell: bash + run: | + source /opt/intel/oneapi/setvars.sh + export SYCL_DEVICE_FILTER=opencl.cpu + ctest --test-dir build --output-on-failure \ No newline at end of file -- cgit v0.12