问题描述1:
win10的Ubuntu子系统下并行运行OpenFOAM时,出现如下警告:

WARNING: Linux kernel CMA support was requested via the
btl_vader_single_copy_mechanism MCA variable, but CMA support is
not available due to restrictive ptrace settings.

The vader shared memory BTL will fall back on another single-copy
mechanism if one is available. This may result in lower performance.

  Local host: DESKTOP-T3NTM25
--------------------------------------------------------------------------
[DESKTOP-T3NTM25:01860] 3 more processes have sent help message help-btl-vader.txt / cma-permission-denied
[DESKTOP-T3NTM25:01860] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

解决
root用户,终端运行如下命令:

  echo 0 > /proc/sys/kernel/yama/ptrace_scope

"ptrace_scope"文件中原来的值为“1”,改成“0”就可以了。

链接 https://www.jianshu.com/p/fe9649f9596e\

再次开机后"ptrace_scope"文件中的值又恢复为1了。

cd /etc/sysctl.d/10-ptrace.conf
修改使得 kernel.yama.ptrace_scope=0
修改后用sysctl -p /etc/sysctl.d/10-ptrace.conf执行生效

问题描述2:
使用新装的电脑,WSL并行运行时,出现权限问题无法并行,如下:

[[13102,1],0][btl_tcp_component.c:945:mca_btl_tcp_component_crea te_listen] bind() failed: Permission denied (13)

Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[13102,1],11]
Exit code: 145

解决
以管理员身份运行 WSL,进入 Ubuntu 后,在 root 用户下,

echo 0 > /proc/sys/kernel/yama/ptrace_scope

解决。

Logo

更多推荐