- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a program using MKL on Linux (Centos 7.3 1611) that runs fine without any setcap capabilities. I would like to adjust thread priorities, so I added CAP_SYS_NICE using setcap. When I run the program, it starts fine. As soon as it tries to run any MKL functions, it fails with an error saying it failed to load mkl_loader. The program runs fine as root with CAP_SYS_NICE set. I have googled around, and have not found a solution that works yet.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"error saying it failed to load mkl_loader". Alex, what is the full message do you see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
I second Gennady's question.
If I understand things right you run the application with root privileges. Could you please confirm the application works fine if you simply run it with root privileges, but w/o any setcap stuff?
If yes, could you please try running your application with
LD_DEBUG=libs
and look for a hint why it can't load mkl_loader or put the trace here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry to put this question on hold for so long, but project priorities changed...
The exact error message I get is:
Intel MKL FATAL ERROR: Cannot load <mkl-loader>.
I get this when I run the program (linked to MKL, Linux, x64) as a standard user with CAP_SYS_NICE set. With CAP_SYS_NICE not set, a call to change the scheduler priority (to SCHED_FIFO in a different thread) and policy fails, but MKL still loads. The goal is to get it to run as a standard user, be able to change priority and use MKL.
The kernel version was 3.10.0-514.6.1.el7.x86_64. I tried this exact same program on a Fedora 27 install using a 4.13 kernel, and I had no problems loading MKL, with or without CAP_SYS_NICE set.
Running the program as root allows the program to run with CAP_SYS_NICE set. It is not desirable to run as root permanently.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page