---
title: 运行算例时不能正常结束“ls: cannot access processor*: No such file or directory”
description: "算例运行一般需要几分钟，如果在一分钟内结束需要查看日志文件确认计算是否正常运行。如果日志文件中出现错误信息：“mpirun has detected an attempt to run as root.”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0097.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0097.html
indexId: ddb9a77ad2859462c4d6c7492f840ddbfada547a6ac03272bb132a7c4752571074
---
# 运行算例时不能正常结束“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
