OpenMPIをインストールした後、mpirunで実行ファイルを走らせると、以下のような警告文が出た。
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.
折角MPIで走らせているのに、"lower perfomance"とか言われると、何とかしたくなる。
以下のコマンドで、ファイルの中身を0に置き換える。
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
参考:OpenMPI security paranoia about ptrace · Issue #3397 · microsoft/WSL · GitHub
元々ファイルの中には"1"しか書かれていないので、この上書きで"0"に置き換えたことになる
もしくは、以下のファイルの中身を変更する。
/etc/sysctl.d/10-ptrace.conf
参考:https://code-examples.net/ja/q/1253349
とりあえず警告は消えたので、"higher perfomance"になることを願う。