[CP2K-user] Where is cuda_cublas.F?

Alfio Lazzaro alfio.... at gmail.com
Fri May 17 10:16:15 UTC 2019


Dear David,
I think you are referring to this arch file:

https://github.com/cp2k/cp2k/blob/a354d490d65c3531557e90ea57b370097596ff64/arch/Linux-x86-64-cudadp.sopt

This is pretty old and it should be removed (sorry about that).

Ideally, the arch files are only there as an example, you should follow the 
instructions on INSTALL.md (also available at 
https://www.cp2k.org/howto:compile?s[]=build ), in particular the part for 
the GPU:

https://www.cp2k.org/howto:compile?s[]=build#j_cuda_optional_improved_performance_on_gpu_systems
 

That said, you can get the arch file you are using for the CPU and add (I 
assume that you are using a new CP2K version from github):

NVCC        = nvcc
FCFLAGS    += -D__DBCSR_ACC
GPUVER      = <your GPU type>
NVFLAGS     = -O3 -g -w --std=c++11
CXXFLAGS   += -I${CUDA_PATH}/include
LIBS       += -lstdc++ -lcudart -lnvrtc -lcuda

This is the for sopt test.

You could post your arch file to have more assistance.

Alfio

Il giorno giovedì 16 maggio 2019 19:46:21 UTC+2, David Gunter ha scritto:
>
> In several of the arch files in the current dev branch I see these lines 
> at the end:
>
> cuda_cublas.o: cuda_cublas.F 
>   $(CPP) $(CPPFLAGSCU) $< > cuda_cublas.f90 
>   $(FC) -c $(FCFLAGSCU) cuda_cublas.f90
>
> However, I do not find cuda_cublas.F anywhere in the tree.
>
> The reason I'm asking is that I am having zero luck getting a cuda-enabled 
> version of CP2K to compile. I've tried various options found in this forum 
> and elsewhere, many dated back to 2012. 
>
> Looking at my compiler options from the cuda arch files given, these flags 
> are causing errors:
> DFLAGS = $(DFLAGSBASE) -DDGEMM=cuda_d_gemm -Ddgemm=cuda_d_gemm 
> -DDSYMM=gpu_d_symm -Ddsymm=gpu_d_symmEnter code here...
>
> Namely countless "undefined reference to `cuda_d_gemm_'" errors.  I was 
> wondering where "cuda_d_gemm" is defined.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190517/4eabbe63/attachment.htm>


More information about the CP2K-user mailing list