运行算例时不能正常结束“ls: cannot access processor*: No such file or directory”
问题现象描述
算例运行一般需要几分钟,如果在一分钟内结束需要查看日志文件确认计算是否正常运行。如果日志文件中出现错误信息:“mpirun has detected an attempt to run as root.”。
关键过程、根本原因分析
使用root账户运行mpirun需要增加参数。
结论、解决方案及效果
- 执行以下命令修改“RunFunctions”文件。
vi /path/to/OPENFOAM/OpenFOAM-v1906/bin/tools/RunFunctions
- 按“i”进入编辑模式,在mpirun命令后增加--allow-run-as-root。
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 执行以下命令重新运行算例。
./Allclean
./Allrun