SEARCH
TOOLBOX
LANGUAGES
CudaCompilation

CudaCompilation

From SOFAWiki

Jump to: navigation, search

Linux

  • mkdir share/cuda
  • Use Cuda 2.3
  • Cuda 2.3 is not compatible with gcc 4.4. Use gcc (and g++) 4.2 instead. gcc 4.3 may work but there are issues.
    • with gcc default set to gcc-4.4, you can use gcc-4.3 or gcc-4.2 instead specifying one of them in the sofa-local.cfg but in this case you also have to add CUDA_FLAGS *= --compiler-bindir=/usr/bin/gcc-4.3 in the sofa.cfg
  • Copy sofa-default.cfg to sofa-local.cfg. In sofa-local.cfg, uncomment DEFINES += SOFA_GPU_CUDA
  • In sofa.cfg, check that CUDA_DIR points to your local Cuda directory. Otherwise, overload it in your sofa-local.cfg file, e.g. CUDA_DIR = /usr/local/cuda