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

Leave a Reply

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

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

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