- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using OneAPi compilers installed on Ubuntu using APT as per the standard instructions. I have successfully build a program which uses the mkl and iomp libraries. However, I cannot run these programs (without sourcing setvars.sh) as the intel libraries are not in the path. What are the recommended steps for allowing all users on the system to be able to run the programs?
I tried adding source /opt/intel/oneapi/setvars.sh to a script in /etc/profile.d but this sets variables which interfere with gcc and is not acceptable. What is the best and most robust way to adjust my system so all users can run the programs created with the intel compiler suite and libraries?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would advise using the "environment modules" mechanism (https://modules.sourceforge.net/). This allows users to dynamically modify their shell and library paths using the commands "module load", "module unload" etc. The Intel installation provides a script modulefiles-setup.sh to create to create the entries for the oneAPI toolset. You should be able to install environment modules itself via APT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can put the bin paths into /etc/profile and /etc/bashrc. You can then put the location of the library directories for each one, e.g. compiler, mkl etc. into /etc/ld.so.conf.d directory.....you can create a file oneapi.conf file and list the directory paths in each line.After doing "ldconfig" and relogin everything should be available. When updates occur you need to modify these paths.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So installing dedicated software just to get the paths isn't really something I want to do, and I also don't want the actual users of the software to have to worry about this once I've installed it. It should 'just work' for them.
It seem that setting the paths manually in /etc/ld.so.conf.d seems like it might be the best way. The docs say there are symlinks in the 'latest' folder that always point to the latest version, so I think I need to add the following. What else might I need to add?
/opt/intel/oneapi/tbb/latest/lib/intel64/gcc4.8
/opt/intel/oneapi/mkl/latest/lib/intel64
/opt/intel/oneapi/mpi/latest/lib/release
I find it a bit disappointing that this presumably basic and common need is not really addressed anywhere, but maybe I have missed it in the documentation (I've not been super thorough)? I did wonder if the config option for setvars might be useful?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your problem is running a program? It seems it is redistributable packages that need to be installed on the target machine to make the runtime dynamic libraries available?? The setvars is to establish a build environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@andrew_4619 great you have a solution, could you point me to the Linux redistributable packages and the instructions for installing them please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Instead of directly running the application, make a script that sources the setvars then runs your application. This script can also perform additional preparatory actions and post run actions as well.
Jim Dempsey

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