SimWorks troubleshooting

SimWorks troubleshooting

In this page you can find solutions to most of the problems you can encounter using SimWorks. Most of the times the code will signal an error code and you will be able to find solutions or suggestions and best practices in the relevant section:

Error code 001: Linux kernel warning when running parallel simulations

Error description

When running parallel CFD Simulations with SimWorks using OpenFOAM(R) in Windows Sublayer for Linux (WSL), you may see a warning message as shown below

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.

The warning message is related to a security setting in Linux and is triggered by OpenMPI commands used to run OpenFOAM parallel applications. This setting has been updated in recent versions of Linux and it is related to the value of the ptrace_scope being set to 1. In simple terms, the default ptrace_scope value of 1 blocks one process from examining and modifying another process unless the second process (child) was started by the first process (parent). Previously, the ptrace_scope value was set to 0, which allows a more permissive behavior and is more appropriate for some development systems and servers with only admin accounts.

How to set ptrace_scope value to 0

It is possible to update the default setting of the ptrace_value so that the warning message will no longer be displayed. To do so, you need to modify the configuration file: 


Which needs to have a line as shown below:

kernel.yama.ptrace_scope = 0

You can check if the file exists by opening a Linux terminal in WSL. Start a terminal by typing “wsl” in the Windows search bar and then run the command

cat /etc/sysctl.d/99-sysctl.conf

If the file exists, the content will be displayed in the terminal window.

Please check in the output above whether the keyword kernel.yama.ptrace_scope is already defined. If the keyword is not in the output, you need to add it to the end of the file with the command:

sudo echo “kernel.yama.ptrace_scope = 0” >> /etc/sysctl.d/99-sysctl.conf

The system will ask for your Linux user password. 

If the keyword already exists but is set to “1”, it needs to be modified to “0”. You can do so by running the following command as administrator:

sudo sed -i “s/kernel.yama.ptrace_scope = 1/kernel.yama.ptrace_scope = 0/g” /etc/sysctl.d/99-sysctl.conf

You can double check the change has been applied correctly and display again the content of the file in the terminal window running the command:

cat /etc/sysctl.d/99-sysctl.conf

If the file does not exists, a warning message saying “No such file or directory” will be displayed. You can create a new one using the example below:

kernel.yama.ptrace_scope = 0

To create the file, copy the text above in a file called 99-sysctl.conf using Notepad and save it without any file extension (to a preferred location).

Once saved, start a Linux terminal by typing “wsl” in the windows search bar and navigate to the location where the file was saved. 

For example, if the file was saved on the Desktop folder, you can type:

cd /mnt/c/Users/username/Desktop

Where username is your Windows user name. Then you can copy the newly created file to the default location /etc/sysctl.d. This requires admin privileges and can be done using the sudo command:

sudo cp 99-sysctl.conf /etc/sysctl.d/

To apply this change permanently, a reboot of the Windows machine is required.

If you experience any difficulties in updating the ptrace_scope settings please contact us at

Try the free version of SimWorks or contact us to find out more