---
title: 故障排除
description: "现象描述："
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengopenfoam_02_0009.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengopenfoam_02_0009.html
indexId: 2ebbd4b533e7e8b3b6845d31965205abd54c89545202ff2fa67a7c33a720497c70
---
# 故障排除

#### 问题一：编译过程中提示“.fatal error: boost/config/compiler/gcc.hpp: No such file or directory”

现象描述：

在运行Allwmake编译CGAL时编译失败，提示“.fatal error: boost/config/compiler/gcc.hpp: No such file or directory”。

可能原因：

安装过程中因为环境变量或者CMake安装失败导致的CGAL安装失败。如果OpenFOAM某一模块在安装过程中报错，只需单独重复安装出错模块即可。

处理步骤：

1. 删除已安装的执行文件及路径。

```
rm -rf
/path/to/OPENFOAM
/OpenFOAM-v1906/platform/arch/boost_1_64_0
```


2. 运行Thirdparty-v1906时独立安装脚本。

```
cd
/path/to/OPENFOAM
/Thirdparty-v1906
./makeCGAL
```


#### 问题二：编译过程中提示“*esmump.h* No such file or directory”

现象描述：

在运行Allwmake编译SCOTCH时编译失败，提示“*esmump.h* No such file or directory”。

可能原因：

脚本运行中出现错误，导致esmump没有安装成功。

处理步骤：

1. 进入scotch目录并手动编译esmumps。

```
cd
/path/to/OPENFOAM
/ThirdParty-v1906/scotch_6.0.6/src
make esmumps
```


2. 重复运行Allwmake脚本继续编译安装。

```
foam
./Allwmake -j
```


#### 问题三：编译过程中提示“cannot stat `../bin/d[agm]*'”

现象描述：

在运行Allwmake编译SCOTCH时编译失败，提示：

“cp: cannot stat `../bin/d[agm]*': No such file or directory

make: [install] Error 1 (ignored)”

可能原因：

并非是d[agm]造成的，一般出现在重复运行安装程序时，scotch文件夹没有被清理，可以在scotch源码路径内运行make distclean后再手动安装scotch程序。

处理步骤：

1. 删除安装失败的文件路径。
  “linuxARM64GccDPInt32”是根据安装环境的架构及使用的编译器进行命名的，需要在具体安装过程中确认路径名称。

```
rm -rf
/path/to/OPENFOAM
/ThirdParty-v1906/platforms/
linuxARM64GccDPInt32
/scotch_6.0.6/
```


2. 进入scotch源码内手动编译安装。
  手动安装scotch需要将安装路径设置为对前面删除的安装路径。

```
make scotch
make esmumps
make ptscotch
make prefix=
/
path/to/OPENFOAM
/ThirdParty-v1906/platforms/linuxARM64GccDPInt32/scotch_6.0.6/ install
```


3. 再次执行Allwmake脚本继续编译安装。

```
foam
./Allwmake -j
```


#### 问题四：运行算例时不能正常结束“ls: cannot access processor*: No such file or directory”

现象描述：

算例运行一般需要几分钟，如果在一分钟内结束需要查看日志文件确认计算是否正常运行。如果日志文件中出现错误信息：“mpirun has detected an attempt to run as root.”。

可能原因：

使用root账户运行mpirun需要增加参数。

处理步骤：

1. 修改“RunFunctions”文件。

```
vi
/path/to/OPENFOAM
/OpenFOAM-v1906/bin/tools/RunFunctions
```


2. 按“i”进入编辑模式，在mpirun命令后增加--allow-run-as-root。
3. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
4. 重新运行算例。

```
./Allclean
./Allrun
```
