Skip to content

Commit

Permalink
SYCL CI: download dpcpp instead of building it
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Oct 27, 2023
1 parent 24bda58 commit d79301e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
11 changes: 7 additions & 4 deletions .jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ pipeline {
steps {
sh 'ccache --zero-stats'
sh '''
. /opt/intel/oneapi/setvars.sh --include-intel-llvm && \
rm -rf build && mkdir -p build && cd build && \
cmake \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_CXX_COMPILER=${DPCPP} \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wno-unknown-cuda-version -fsycl -fsycl-targets=nvptx64-nvidia-cuda-sycldevice" \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wno-unknown-cuda-version -fp-model=precise" \
-D CMAKE_PREFIX_PATH="$KOKKOS_DIR" \
-D MPIEXEC_MAX_NUMPROCS=1 \
-D MPIEXEC_PREFLAGS="--allow-run-as-root" \
Expand All @@ -125,8 +126,10 @@ pipeline {
-D Cabana_ENABLE_CAJITA=ON \
.. && \
make -j8 && \
# Exclude current failing tests (core MPI and partial Cajita)
ctest --output-on-failure -E "Cabana.*MPI|Cabana_Performance_Comm|Grid_IndexConversion|Grid_Halo|Grid_ParticleGridDistributor|Grid_Interpolation|Grid_BovWriter|valgrind"
'''
sh '''
. /opt/intel/oneapi/setvars.sh --include-intel-llvm && \
ctest --output-on-failure -E valgrind
'''
}
post {
Expand Down
36 changes: 18 additions & 18 deletions docker/Dockerfile.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@ RUN CMAKE_KEY=2D2CEF1034921684 && \
rm cmake*
ENV PATH=${CMAKE_DIR}/bin:$PATH

ENV SYCL_DIR=/opt/sycl
RUN SYCL_VERSION=20220112 && \
SYCL_ARCHIVE=${SYCL_VERSION}.tar.gz && \
SYCL_URL=https://github.com/intel/llvm/archive/sycl-nightly/${SYCL_ARCHIVE} && \
export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda && \
export CUDA_LIB_PATH=${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs && \
SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \
wget --quiet ${SYCL_URL} && \
mkdir llvm && \
tar -xf ${SYCL_ARCHIVE} -C llvm --strip-components=1 && \
cd llvm && \
python3 buildbot/configure.py --cuda && \
python3 buildbot/compile.py && \
mkdir -p ${SYCL_DIR} && \
mv ${SCRATCH_DIR}/llvm/build/install/* ${SYCL_DIR} && \
echo "${SYCL_DIR}/lib" > /etc/ld.so.conf.d/sycl.conf && ldconfig && \
rm -rf ${SCRATCH_DIR}
ENV PATH=${SYCL_DIR}/bin:$PATH
# Install the dpcpp compiler, see
# https://www.intel.com/content/www/us/en/docs/vtune-profiler/installation-guide/2023-1/package-managers.html
ARG DPCPP_VERSION=2023.0.0
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB && \
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB && \
echo "deb https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
apt-get update -o Dir::Etc::sourcelist="sources.list.d/oneAPI.list" -o APT::Get::List-Cleanup="0" && \
apt-get install -y intel-oneapi-compiler-dpcpp-cpp-${DPCPP_VERSION} && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV DPCPP=/opt/intel/oneapi/compiler/${DPCPP_VERSION}/linux/bin-llvm/clang++

# Install Codeplay's oneAPI for NVIDIA GPUs, see
# https://developer.codeplay.com/products/oneapi/nvidia/2023.0.0/guides/get-started-guide-nvidia
RUN wget https://cloud.cees.ornl.gov/download/oneapi-for-nvidia-gpus-${DPCPP_VERSION}-linux.sh && \
chmod +x oneapi-for-nvidia-gpus-${DPCPP_VERSION}-linux.sh && \
./oneapi-for-nvidia-gpus-${DPCPP_VERSION}-linux.sh -y && \
rm oneapi-for-nvidia-gpus-${DPCPP_VERSION}-linux.sh

# Install Kokkos
ARG KOKKOS_VERSION=3.7.02
Expand Down

0 comments on commit d79301e

Please sign in to comment.