Install CUDA 10.2 with foam-extend-3.1 on CentOS 7 (64bit)

cd $FOAM_INSTALL_DIR/etc
cp prefs.sh-EXAMPLE prefs.sh
vi prefs.sh

uncomment the CUDA-related parameters and point the real fold for CUDA_DIR
set CUDA_ARCH=sm_75

like

# System installed CUDA
export CUDA_SYSTEM=1
export CUDA_DIR=/usr/local/cuda
export CUDA_BIN_DIR=$CUDA_DIR/bin
export CUDA_LIB_DIR=$CUDA_DIR/lib64
export CUDA_INCLUDE_DIR=$CUDA_DIR/include
export CUDA_ARCH=sm_75

update the head file

cd /usr/local/cuda-10.2/include/thrust/detail
sudo vi config/config.h

after the line

#include <thrust/detail/config/compiler.h>

add


#include <thrust/detail/config/compiler_fence.h>

Download cups library


cd $WM_THIRD_PARTY_DIR/LocalDev
git clone https://github.com/cusplibrary/cusplibrary.git
vi $FOAM_SRC/cudaSolvers/Make/options

like this


EXE_INC = \
    -I$(CUDA_INCLUDE_DIR) \
    -I$(WM_THIRD_PARTY_DIR)/LocalDev/cusplibrary

LIB_LIBS = \
    -L$(CUDA_LIB_DIR) -lcudart
   Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.