Thanks to visit codestin.com
Credit goes to github.com

Skip to content

radiolok/RapidCFD-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RapidCFD

Developed by SimFlow CFD
https://sim-flow.com

CFD toolbox running on CUDA

OpenFOAM solvers ported to Nvidia CUDA. All the calculations are done on the GPU giving a huge speed-up. Still in development stage, waiting for your contribution!

Features:

  • most incompressible and compressible solvers on static mesh are available
  • all the calculations are done on the GPU
  • no overhead for GPU-CPU memory copy
  • can run in parallel on multiple GPUs

Compilation instructions for Ubuntu 20.04

Rewroted issue #93

Install CUDA toolkit

  • Download CUDA toolkit here
  • Install CUDA toolkit per instructions provided at time of download
  • Instructions for WSL here

Also check and remember compute capability of your GPU here

e.g. for GeForce 3070ti Compute capability 8.6

Check CUDA:

$nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0

If nvcc not found, you may need to set environment variables, e.g.,

export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
export PATH=$PATH:$CUDA_HOME/bin

After executing these export statements try nvcc --version again. If it does not work, then you will need to find the location of CUDA on your system and edit the paths above as required for your individual setup. If it works, proceed to next step

Install RapidCFD [Under issues on my side]

#as dirpath is hardcoded and I don't want to fix it:
cd ~
mkdir RapidCFD
cd RapidCFD
git clone https://github.com/Atizar/RapidCFD-dev
cd RapidCFD-dev

Update compute capability in local files

vim wmake/rules/linux64Nvcc/c:10

cc = nvcc -m64 -arch=sm_86

## 86 means compute capability 8.6 Set your own 

vim wmake/rules/linux64Nvcc/c++:10

CC = nvcc -Xptxas -dlcm=cg -std=c++17 -m64 -arch=sm_86

Now, start compilation

#to run compilation in parallel:
export WM_NCOMPPROCS=10 # where 10 - is number of CPU's on your host
source etc/bashrc
./Allwmake

If you have multiple GPU's then you will need to install ThirdParty-dev. I placed a copy of the ThirdParty-dev that I use here. To the best of my recollection (because I haven't rebuilt this ThirdParty-dev directory in years), you can place this material in /opt/ThirdParty-dev and compilation fo RapidCFD-dev should automatically find openmpi.

About

RapidCFD is an OpenFOAM fork running fully on CUDA platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 56.5%
  • C++ 41.8%
  • Shell 1.6%
  • Other 0.1%