How to compile cp2k with CUDA

Ole Schütt o... at schuett.name
Mon Jul 28 14:18:26 UTC 2014



Hi Mason,

to enable Cuda you should add the "-D__ACC" to the DFLAGS in your arch-file.
Furthermore, you should add "-D__DBCSR_ACC -D__HAS_smm_dnn" if you want to accelerate sparse matrix-multiplications and "-D__PW_CUDA" if you want to accelerate FFTs.
You should also add the following libraries "-lcudart -lcublas -lcufft -lrt" to the LIBS variable.

Finally, you have to point NVCC at the nvidia compiler and optionally set the NVFLAGS variable.

-Ole



On Friday, July 25, 2014 7:36:42 PM UTC+2, C Mason wrote:
>
> Dear everyone,
>
> I'm a new user of cp2k. I just got access to a CUDA machine but I don't 
> know how to compile cp2k with CUDA. Can someone give me a detailed tutorial 
> or tell me which file or variables to modify? BTW, the CUDA machine is 
> Linux(Fedora) x86_64.
>
> Thanks!
> Mason
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20140728/5c5aa66e/attachment.htm>


More information about the CP2K-user mailing list