howto:compile_with_cuda
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| howto:compile_with_cuda [2019/04/09 09:49] – [Libcusmm] alazzaro | howto:compile_with_cuda [2026/10/14 12:11] (current) – fstein | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== How to Compile CP2K with CUDA Support ====== | ====== How to Compile CP2K with CUDA Support ====== | ||
| - | Currently three major operations in CP2K support CUDA-acceleration: | ||
| - | * Anything that uses '' | + | This has been moved to [[https://manual.cp2k.org/trunk/technologies/accelerators/index.html]]. |
| - | * FFTs, when compiled with '' | + | |
| - | * If linked against an accelerated scalapack/ | + | |
| - | + | ||
| - | To enable all CUDA acceleration options the following lines have to be added to the ARCH-file: | + | |
| - | < | + | |
| - | NVCC = / | + | |
| - | DFLAGS += -D__ACC -D__DBCSR_ACC -D__PW_CUDA | + | |
| - | LIBS += -lcudart -lcublas -lcufft -lrt | + | |
| - | </ | + | |
| - | + | ||
| - | See [[https:// | + | |
| - | As a prerequisite the [[https:// | + | |
| - | + | ||
| - | + | ||
| - | ===== Libcusmm ===== | + | |
| - | The acceleration of DBCSR is performed by libcusmm. This library provides a number of kernels. Each of these kernels can multiply blocks of specific blocksizes. The blocksizes of a simulation are determined by the employed basis-set. As of DBCSR 1.1, by default libcusmm is able to generate any kernel for {m,n,k}< =80, see [[ https://github.com/cp2k/ | + | |
| - | + | ||
| - | < | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ... | + | |
| - | flops total | + | |
| - | | + | |
| - | | + | |
| - | </ | + | |
| - | + | ||
| - | More supported GPUs can be added, please refer to the description [[ https:// | + | |
| - | + | ||
| - | New kernel parameters have to be optimized, which [[howto: | + | |
| - | + | ||
| - | ===== Profiling ===== | + | |
| - | If you are interested in profiling CP2K with nvprof have a look at [[dev: | + | |
howto/compile_with_cuda.1554803349.txt.gz · Last modified: (external edit)
