lwang-astro / PeTar

PeTar is a high-performance N-body code for modelling the evolution of star clusters and tidal streams, including the effect of galactic potential, dynamics of binary and hierarchical system, single and binary stellar evolution.
MIT License
71 stars 19 forks source link

Cuda version > 8 : changing the configuration #17

Closed christianboily closed 3 years ago

christianboily commented 3 years ago

Hi, I am trying to compile PeTar against a recent cuda library v. 10.2 : this line

checking CUDA version... 7.5 checking for "/usr/local/cuda/cuda-7.5/samples/common/inc/helper_cuda.h"... yes

at the configuration of the code environment, here for v. 7.5, finds the correct header file, but that file, and in fact the directory structure samples/common/inc/ do not exist in version 10.2. Is it possible to identify what new header file is referenced for the newer versions of cuda ? Perhaps I am forgetting a configuration option (autoconf?) ?

Many thanks for your help - and the great code !

lwang-astro commented 3 years ago

The configure have detected the CUDA version 7.5, but not 10.2. So 10.2 is not the default CUDA version in your system. I suggest to change the default CUDA version in the system level instead of using configure of petar. Because in the running time, the cuda library need to be loaded. If the system default is 7.5, you will probably get running time error due to the wrong loading of libraries if petar is compiled by CUDA version 10.2.