Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The KMP_DUPLICATE_LIB_OK problem is present also on Windows so document and apply the workaround also on Windows #1658

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions doc/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,30 @@ and again, specify your MATLAB installation directory and when there is the ques
If the problem persists even after following this steps, please [open a new issue in the robotology-superbuild issue tracker](https://github.com/robotology/robotology-superbuild/issues/new).


### How to I solved the "Initializing libomp.dylib, but found libiomp5.dylib already initialized." when using MATLAB libraries?
### How to I solved the "Initializing libomp.\*, but found libiomp5.\* already initialized." when using MATLAB libraries?

If you are on macOS and you encounter errors similar to:
~~~
OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
~~~

or you are on Windows if you encounter errors similar to:
~~~
OMP: Error https://github.com/ami-iit/element_aerodynamics-control/issues/15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program.
That is dangerous, since it can degrade performance or cause incorrect results.
The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library.
As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results.
For more information, please see http://www.intel.com/software/products/support/.
~~~

when running MATLAB libraries installed by the robotology-superbuild, a simple workaround is to install the netlib version of libblas via:
~~~
conda install libblas=*=*netlib
~~~

See https://github.com/robotology/idyntree/issues/1109 for more details.
See https://github.com/robotology/idyntree/issues/1109 for more details. The [One-line Installation of Robotology MATLAB/Simulink Packages](./matlab-one-line-install.md) installs `libblas=*=*netlib` to mitigate this problem.

### I want to install packages from the `robotology` conda channel that were built in 2021 but I am not finding them, where I can find them?

Expand Down
2 changes: 1 addition & 1 deletion scripts/install_robotology_packages.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function install_robotology_packages(varargin)
% Install all the robotology packages related to MATLAB or Simulink
fprintf('Installing robotology packages\n');
packages_to_install = 'yarp-matlab-bindings idyntree-matlab-bindings wb-toolbox osqp-matlab casadi-matlab-bindings whole-body-controllers matlab-whole-body-simulator icub-models';
if ismac
if ismac | ispc
% Workaround for https://github.com/robotology/idyntree/issues/1109
packages_to_install = packages_to_install + " libblas=*=*netlib";
end
Expand Down
Loading