【问题解决】并行时出现WARNING: CMA surpport is not available due to restrictive ptrace settings

问题描述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

解决。

  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 9
    评论
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ou_no

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值