Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29568 토론

How get intel libraries on linux path so users can run programs without running setvars.sh?

crobar
초보자
3,748 조회수

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?

0 포인트
7 응답
Keith_R_1
초보자
3,701 조회수

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.

 

0 포인트
Umar__Sait
초보자
3,684 조회수

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.

0 포인트
crobar
초보자
3,631 조회수

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?

0 포인트
andrew_4619
명예로운 기여자 III
3,618 조회수

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.

crobar
초보자
3,615 조회수

@andrew_4619 great you have a solution, could you point me to the Linux redistributable packages and the instructions for installing them please?

0 포인트
jimdempseyatthecove
명예로운 기여자 III
3,532 조회수

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

0 포인트
응답