90 lines
2.6 KiB
Plaintext
90 lines
2.6 KiB
Plaintext
##################################################################
|
|
#
|
|
# Name: Dynamic Kernel Scheduler
|
|
# Version: 1.0
|
|
# Author: Uldis Locans
|
|
# Contacts: locans.uldis@psi.ch
|
|
#
|
|
##################################################################
|
|
|
|
Dynamic Kernel Scheduler is a library that provides a software layer between host application
|
|
and hardware accelerators. DKS handles communication between host and device and schedules task
|
|
execution using predefined algorithms writen using CUDA and OpenCL for GPUs, and OpenMP with
|
|
offload pragmas for IntelMIC. See DKSBase class documentation for full list of functions provided
|
|
by DKS.
|
|
|
|
#####Requirements#####
|
|
|
|
cmake 3.2 or higher
|
|
gcc 4.8.4 or higher
|
|
boost 1.55 or higher
|
|
|
|
#Optional
|
|
OpenMPI (Cuda aware OpenMPI enabled for full compatability)
|
|
icpc compiler for compatability with Intel MIC
|
|
Cuda 7.0 or higher (optional)
|
|
Nvidia or Intel OpenCL SDK (optional)
|
|
Intel MIC compilers (optional)
|
|
|
|
######Source######
|
|
https://gitlab.psi.ch/uldis_l/DKS
|
|
|
|
######Install######
|
|
|
|
#clone DKS
|
|
git clone git@gitlab.psi.ch:uldis_l/DKS.git DKS
|
|
|
|
#set compilers to use
|
|
#supported c++ compilers: g++, icpc, mpicxx whith g++
|
|
#supported c compilers: gcc, icc, mpicc whith gcc
|
|
export CXX_COMPILER=cpp_compiler_name
|
|
export CC_COMPILER=c_compiler_name
|
|
|
|
#set dks root directory directory
|
|
cd DKS
|
|
export DKS_ROOT = $PWD
|
|
|
|
#set build directory
|
|
mkdir $DKS_BUILD_DIR
|
|
cd $DKS_BUILD_DIR
|
|
|
|
#set install directory
|
|
export DKS_INSTALL_DIR = $DKS_BUILD_DIR #default is /usr/local/
|
|
|
|
CXX=$CXX_COMPILER CC=$CC_COMPILER cmake -DCMAKE_INSTALL_PREFIX=$DKS_BUILD_DIR $DKS_ROOT
|
|
|
|
make
|
|
make install
|
|
|
|
|
|
######DKS usage######
|
|
Make install copies the include files and library files to $DKS_BUILD_DIR/build folder, lib folder
|
|
in the build directory contains libdks.a and libdksshared.so, on of these libraries can be used to link
|
|
with DKS. All the necessary include files are located in $DKS_BUILD_DIR/build/include.
|
|
|
|
Additional flags needed for CUDA and OpenCL mode:
|
|
-lcudart -lcufft -lcublas -lnvToolsExt -lOpenCL -lnvrtc -lcuda -DDKS_CUDA -DDKS_OPENCL
|
|
|
|
Additional flags needed for IntelMIC and OpenCL mode:
|
|
-offload -mkl -openmp -lOpenCL -DDKS_MIC -DDKS_OPENCL
|
|
|
|
Note: always run make install, during runtime OpenCL and CUDA will search for kernel files in
|
|
$DKS_INSTALL_DIR/build/include directory for runtime compilation.
|
|
|
|
######Running DKS######
|
|
|
|
#running with cuda
|
|
#nvidia multi process service started for better CUDA and MPI execution
|
|
|
|
#to start mps service (if multiple users use DKS start MPS as root)
|
|
nvidia-cuda-mps-control -d
|
|
#to stop mps service
|
|
echo quit | nvidia-cuda-mps-control
|
|
|
|
|
|
#runnign dks with MIC
|
|
#Intel Manycore Platform Software Stack (mpss) service started
|
|
|
|
#to start mpss
|
|
service mpss start
|