Repository navigation
Latest Build Instructions
The workspace interface branch allows gpuintegration to be built with three different parallel programming models: CUDA, Kokkos, and oneAPI.
To build, set one or more of the following variables to TRUE in the cmake configuration command:
- GPUINTEGRATION_BUILD_CUDA
- GPUINTEGRATION_BUILD_KOKKOS
- GPUINTEGRATION_BUILD_ONEAPI
CMake automates the building process but requires setting a few variables in order to determine the location of certain libraries and directories.
To set a variable use export VARNAME=VAR_VALUE on the command line.
Then, when supplying the cmake command, append -DVARNAME=${VARNAME}
These variables must be set regardless of which programming model (CUDA, Kokkos, oneAPI) you use.
- TOP_DIR: full path to gpuinteration i.e if I cloned gpuintegration in the following location: /home/isaki001/numint/gpuintegration
export TOP_DIR="/home/isaki001/numint/gpuintegration"
TARGET_ARCH=70-real
This assumes that Kokkos and Kokkos kernels have both been built.
-
Kokkos_DIR: location of Kokkos installation, it helps to to locate the cmake directory and supply it at that level, eg.export Kokkos_DIR="/home/isaki001/numint/kokkos/kokkos-build/lib64/cmake/Kokkos" -
KokkosKernels_DIR=: location of KokkosKernels installation e.gexport KokkosKernels_DIR="/home/isaki001/numint/kokkos-kernels/build/lib64/cmake/KokkosKernels/"
example
Kokkos_DIR:/home/isaki001/numint/kokkos/kokkos-build/lib64/cmake/Kokkos
KokkosKernels_DIR:/home/isaki001/numint/kokkos-kernels/build/lib64/cmake/KokkosKernels
-
DPL_DIR: location of oneDPL library -
DPCT_DIR: location of DPCT conversion tool installation -
SYCL_DIR: location of SYCL header
examples
DPL_DIR:/opt/intel/dpl/latest/linux/include
DPCT_DIR:/home/isaki001/intel/oneapi/dpcpp-ct/latest/include
SYCL_DIR:/opt/intel/compiler/2022.0.2/linux/include/sycl
Due to experimental support of CUDA in oneAPI, through the CUDA backend for SYCL, users must set the following flag.
Replace the cuda-gpu-arch flag appropriately based on the GPU architecture. The example given below is for NVIDIA V100 GPU.
You must first enable oneAPI for CUDA devices by following instructions: [https://developer.codeplay.com/products/oneapi/nvidia/2023.0.0/guides/get-started-guide-nvidia#set-up-your-environment]
- must have clang-compiler installed
CUDA_BACKEND=TRUEexport LDFLAGS='-L/opt/intel/mkl/latest/lib/intel64/ -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -lpthread -lmkl_sycl -ltbb'export ONEAPI_TARGET_ARCH='sm_70'
cmake ../ -DGPUINTEGRATION_BUILD_CUDA=TRUE -DGPUINTEGRATION_BUILD_KOKKOS=TRUE -DGPUINTEGRATION_BUILD_ONEAPI=TRUE -DTARGET_ARCH=70-real -DTOP_DIR=${TOP_DIR} -DKokkosKernels_DIR=${KokkosKernels_DIR} -DKokkos_DIR=${Kokkos_DIR} -DDPCT_DIR=${DPCT_DIR} -DDPL_DIR=${DPL_DIR} -DCUDA_BACKEND=TRUE -DSYCL_DIR=${SYCL_DIR} -DONEAPI_TARGET_ARCH="sm_70" -DCMAKE_BUILD_TYPE=Release
KokkosKernels_DIR: /home/isaki001/numint/kokkos-kernels/build/lib64/cmake/KokkosKernels
DPCT_DIR: /home/isaki001/intel/oneapi/dpcpp-ct/latest/include
export SYCL_DIR="/opt/intel/compiler/2022.0.2/linux/include/sycl"
cmake ../ -DGPUINTEGRATION_BUILD_CUDA=TRUE -DGPUINTEGRATION_BUILD_KOKKOS=TRUE -DGPUINTEGRATION_BUILD_ONEAPI=TRUE -DTARGET_ARCH=70-real -DTOP_DIR=${TOP_DIR} -DKokkosKernels_DIR=${KokkosKernels_DIR} -DKokkos_DIR=${Kokkos_DIR} -DDPCT_DIR=${DPCT_DIR} -DDPL_DIR=${DPL_DIR} -DCUDA_BACKEND=TRUE -DSYCL_DIR=${SYCL_DIR} -DONEMKL_DIR=${ONEMKL_DIR} -DONEAPI_TARGET_ARCH="sm_70" -DCMAKE_BUILD_TYPE=Release