Skip to content

RapidCFD 安装

简要介绍

RapidCFD 是我在搜索 OpenFOAM 的 GPU 解决方案时,在 OpenFOAM wiki 看到的,RapidCFD 基于 OpenFOAM v2.3 版本,最后一次更新是在 May 13, 2020,可以说有些年份了。

编译步骤

服务器配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
$ screenfetch
                          ./+o+-       iydon@iydon-HP-Z240-Tower-Workstation
                  yyyyy- -yyyyyy+      OS: Ubuntu 20.04 focal
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 5.11.0-38-generic
           .++ .:/++++++/-.+sss/`      Uptime: 12d 17h 9m
         .:++o:  /++++++++/:--:/-      Packages: 2111
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 5.0.17
       .:+o:+o/.          `+sssoo+/    Disk: 44G / 933G (5%)
  .++/+:+oo+o:`             /sssooo.   CPU: Intel Xeon E3-1225 v5 @ 4x 3.7GHz [33.0°C]
 /+++//+:`oo+o               /::--:.   GPU: Quadro K2200
 \+/+o+++`o++o               ++////.   RAM: 1436MiB / 32036MiB
  .++.o+++oo+:`             /dddhhh.
       .+.o+oo:.          `oddhhhh+
        \+.++o+o``-````.:ohdhhhhh+
         `:o+++ `ohhhhhhhhyo++os:
           .o:`.syhhhhhhh/.oo++o`
               /osyyyyyyo++ooo+++/
                   ````` +oo+++o\:
                          `oo++.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$ nvidia-smi
Mon Nov  1 12:33:38 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.74       Driver Version: 470.74       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro K2200        Off  | 00000000:01:00.0 Off |                  N/A |
| 42%   44C    P0     2W /  39W |      0MiB /  4043MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

安装 CUDA

参考 How do I install NVIDIA and CUDA drivers into Ubuntu

值得注意的是,虽然有人在 Issue: 92 报告 RapidCFD 可以在 CUDA v11.1 编译成功,但是在我的服务器上实际使用 CUDA v10.0(也可能是之前架构选择错误,导致编译成功后不能正常运行)。

安装依赖

参考 CPU 版本的 OpenFOAM v2.3.0 安装依赖。

此外由于 RapidCFD 较老,还需要指定 gccg++ 版本,太高的版本会导致编译失败,具体需要的版本忘记从哪里查看了,不过当前服务器上的 major 版本(major.minor)应该是能使用的最高版本:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-6ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-6ubuntu2)

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

编译 RapidCFD

最好直接下载仓库到 ~/RapidCFD 文件夹中,否则需要使用 ln,以软链接的形式,将仓库实际位置链接到 ~/RapidCFD/RapidCFD-dev。因为配置文件 etc/bashrc 中硬编码了仓库位置,我尝试修改后仍然存在错误,可能是另外的配置文件中同样使用了 $HOME 环境变量,所以还是按照配置文件来最简单。

1
2
3
4
$ pwd
/home/<username>/RapidCFD

$ git clone https://github.com/Atizar/RapidCFD-dev

为了让 OpenFOAM 多版本并存,可以利用 alias 命令惰性加载配置文件。

1
2
3
alias ofc="source /home/<username>/RapidCFD/RapidCFD-dev/etc/bashrc"
export  PATH="/usr/local/cuda-<version>/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-<version>/lib64:$LD_LIBRARY_PATH"

下载完后,需要根据实际情况修改以下文件,否则即使编译成功,也会因为架构差异遇到显存分配的问题,而无法正常运行。

最后就可以编译 RapidCFD,如果遇到问题,可以去查看 Issues 寻找解决方案,注意到大部分问题虽然解决了,但是没有 close。

1
2
source /home/<username>/RapidCFD/RapidCFD-dev/etc/bashrc  # ofc
./Allwmake

stdout + stderr
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
make: Nothing to be done for 'all'.
no ThirdParty sources found - skipping
+ wmakePrintBuild -check
same version as previous build
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/dummy/libPstream.so' is up to date.
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers

wmake libso mpi
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/openmpi-4.0.2/libPstream.so' is up to date.
+ OSspecific/POSIX/Allwmake
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libOSspecific.o' is up to date.
+ wmake libso OpenFOAM
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libOpenFOAM.so' is up to date.
+ wmake libso fileFormats
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfileFormats.so' is up to date.
+ wmake libso surfMesh
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsurfMesh.so' is up to date.
+ wmake libso triSurface
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libtriSurface.so' is up to date.
+ wmake libso meshTools
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libmeshTools.so' is up to date.
+ wmake libso edgeMesh
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libedgeMesh.so' is up to date.
+ wmake libso finiteVolume
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfiniteVolume.so' is up to date.
+ wmake libso lagrangian/basic
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/liblagrangian.so' is up to date.
+ wmake libso genericPatchFields
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libgenericPatchFields.so' is up to date.
+ wmake libso sampling
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsampling.so' is up to date.
+ wmake libso dynamicFvMesh
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libdynamicFvMesh.so' is up to date.
+ thermophysicalModels/Allwmake
+ wmake libso specie
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libspecie.so' is up to date.
+ wmake libso solidSpecie
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsolidSpecie.so' is up to date.
+ wmake libso thermophysicalFunctions
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libthermophysicalFunctions.so' is up to date.
+ ./properties/Allwmake
+ wmake libso liquidProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libliquidProperties.so' is up to date.+ wmake libso liquidMixtureProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libliquidMixtureProperties.so' is up to date.
+ wmake libso solidProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsolidProperties.so' is up to date. + wmake libso solidMixtureProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsolidMixtureProperties.so' is up to date.
+ wmake libso basic
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfluidThermophysicalModels.so' is up to date.
+ wmake libso barotropicCompressibilityModel
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libbarotropicCompressibilityModel.so' is up to date.
+ wmake libso solidThermo
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsolidThermo.so' is up to date.
+ wmake libso radiationModels
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libradiationModels.so' is up to date. + transportModels/Allwmake
+ wmake libso twoPhaseMixture
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libtwoPhaseMixture.so' is up to date. + wmake libso interfaceProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libinterfaceProperties.so' is up to date.
+ wmake libso twoPhaseProperties
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libtwoPhaseProperties.so' is up to date.
+ wmake libso incompressible
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libincompressibleTransportModels.so' is up to date.
+ wmake libso compressible
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libcompressibleTransportModels.so' is up to date.
+ wmake libso immiscibleIncompressibleTwoPhaseMixture
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libimmiscibleIncompressibleTwoPhaseMixture.so' is up to date.
+ turbulenceModels/Allwmake
+ LES/Allwmake
+ wmakeLnInclude ../incompressible/LES
+ wmake libso LESfilters
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libLESfilters.so' is up to date.
+ wmake libso LESdeltas
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libLESdeltas.so' is up to date.
+ incompressible/Allwmake
+ wmake libso turbulenceModel
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libincompressibleTurbulenceModel.so' is up to date.
+ wmake libso RAS
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libincompressibleRASModels.so' is up to date.
+ wmake libso LES
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libincompressibleLESModels.so' is up to date.
+ compressible/Allwmake
+ wmake libso turbulenceModel
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libcompressibleTurbulenceModel.so' is up to date.
+ wmake libso RAS
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libcompressibleRASModels.so' is up to date.
+ wmake libso LES
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libcompressibleLESModels.so' is up to date.
+ wmake libso derivedFvPatchFields
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libturbulenceDerivedFvPatchFields.so' is up to date.
+ TurbulenceModels/Allwmake
+ wmake libso turbulenceModels
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libturbulenceModels.so' is up to date.+ wmake libso incompressible
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libincompressibleTurbulenceModels.so' is up to date.
+ wmake libso compressible
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libcompressibleTurbulenceModels.so' is up to date.
+ wmakeLnInclude phaseIncompressible
+ wmakeLnInclude phaseCompressible
+ wmake libso regionModels/regionModel
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libregionModels.so' is up to date.
+ wmake libso fvMotionSolver
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfvMotionSolvers.so' is up to date. + wmake libso fvOptions
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfvOptions.so' is up to date.
+ postProcessing/Allwmake
+ wmake libo postCalc
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/postCalc.o' is up to date.
+ wmake libso foamCalcFunctions
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfoamCalcFunctions.so' is up to date.
+ functionObjects/Allwmake
+ wmake libso field
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libfieldFunctionObjects.so' is up to date.
+ wmake libso forces
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libforces.so' is up to date.
+ wmake libso fvTools
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libFVFunctionObjects.so' is up to date.
+ wmake libso IO
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libIOFunctionObjects.so' is up to date.
+ wmake libso jobControl
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libjobControl.so' is up to date.
+ wmake libso systemCall
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsystemCall.so' is up to date.
+ wmake libso utilities
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libutilityFunctionObjects.so' is up to date.
+ wmake libso sixDoFRigidBodyMotion
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libsixDoFRigidBodyMotion.so' is up to date.
+ wmake all solvers/basic
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/laplacianFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/laplacianFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/laplacianFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/potentialFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/potentialFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/potentialFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/scalarTransportFoam' make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/scalarTransportFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/basic/scalarTransportFoam'
+ wmake all solvers/incompressible
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/adjointShapeOptimizationFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/adjointShapeOptimizationFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/adjointShapeOptimizationFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/icoFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/icoFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/icoFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/nonNewtonianIcoFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/nonNewtonianIcoFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/nonNewtonianIcoFoam'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam' make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/pimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam'
+ wmake SRFPimpleFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/SRFPimpleFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam'
+ wmake pimpleDyMFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/pimpleDyMFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pisoFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/pisoFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/pisoFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/shallowWaterFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/shallowWaterFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/shallowWaterFoam'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam' make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/simpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam'
+ wmake SRFSimpleFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/SRFSimpleFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam'
+ wmake porousSimpleFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam/porousSimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/porousSimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/incompressible/simpleFoam/porousSimpleFoam'
+ wmake all solvers/compressible
+ wmake libso BCs
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam/BCs'
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/librhoCentralFoam.so' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam/BCs'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoCentralFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam'+ wmake rhoCentralDyMFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoCentralDyMFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam'make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoPimpleFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam' + wmake rhoPimplecFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoPimplecFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam'
+ wmake rhoPimpleDyMFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoPimpleDyMFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam'make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoSimpleFoam' is up to date.make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam' + wmake rhoPorousSimpleFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoPorousSimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam'
+ wmake rhoSimplecFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/rhoSimplecFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam'
+ wmake
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/sonicFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam'
+ wmake sonicDyMFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam/sonicDyMFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/sonicDyMFoam' is up to date. make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam/sonicDyMFoam'
+ wmake sonicLiquidFoam
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam/sonicLiquidFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/sonicLiquidFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/compressible/sonicFoam/sonicLiquidFoam'
+ wmake all solvers/heatTransfer
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/buoyantBoussinesqPimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/buoyantBoussinesqSimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantPimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/buoyantPimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantPimpleFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantSimpleFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/buoyantSimpleFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/buoyantSimpleFoam'
make[1]: Entering directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/thermoFoam'
make[1]: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/thermoFoam' is up to date.
make[1]: Leaving directory '/opt/OpenFOAM/RapidCFD-dev/applications/solvers/heatTransfer/thermoFoam'
+ wmake all solvers/multiphase/interFoam
+ wmake
make: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/interFoam' is up to date.
+ wmake interDyMFoam
make: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/interDyMFoam' is up to date.
+ wmake porousInterFoam
make: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/porousInterFoam' is up to date. + wmake all solvers/multiphase/driftFluxFoam
+ wmake libso mixtureViscosityModels
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libdriftFluxTransportModels.so' is up to date.
+ wmake libso relativeVelocityModels
'/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/lib/libdriftFluxRelativeVelocityModels.so' is up to date.
+ wmake
make: '/home/<username>/RapidCFD/RapidCFD-dev/platforms/linux64NvccDPOpt/bin/driftFluxFoam' is up to date.

测试案例

案例 cavity 已经使用 blockMesh 构建网格,只需要使用 icoFoam 计算即可。

踩过的坑

Windows Subsystem for Linux (WSL)

本来参考 CUDA on WSL User Guide 想在 WSL 中安装 RapidCFD,但是最后才从文章中看到,WSL 是从 CUDA v11.x 开始支持的。

Package Suggested Versions
NVIDIA Windows Driver x86 - CUDA, Video
Nvidia-smi (Limited Feature Set)
R495 and later Windows production drivers will officially support WSL2 on Pascal and later GPUs.
For the latest features use WSL2 driver published on CUDA Developer Zone.
NVIDIA Container Toolkit Minimum versions - v2.6.0 with libnvidia-container - 1.5.1+
CUDA toolkit Latest CUDA toolkit from 11.x releases can be used. Developer tools: Debuggers and Profilers are not supported yet.
NCCL 2.11.4+

前处理、后处理

RapidCFD 并没有编译前处理、后处理软件,所以需要编译配套的 CPU 版本,而 OpenFOAM v2.3 需要的 gccg++ 的 major 版本更低,v2.3 又与更高版本 OpenFOAM 的案例结构有些许差异,这是需要注意的。