Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

weird symlinks in /opt/intel after parallel_studio_xe_2016.0.047 install

$
0
0

After two days wasted looking for some bad code, I realized the root of my issue was incorrect symlinks in /opt/intel install direcory in Linux.

I build some softwares with shared libraries. Thus I added this in my shell environment:

export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries/mkl/lib/intel64

My first thought was that compilers_and_libraries was a convenient way to symlink to the actual version of compilers_and_libraries_2016.0.10. This makes sens as I will not have to change my config file after each update, and will only care of the root name of the package.

BUT here comes the issue:

% ls /opt/intel/compilers_and_libraries/linux/compiler/lib/intel64
ls: cannot access /opt/intel/compilers_and_libraries/linux/compiler/lib/intel64: No such file or directory

bad, very bad. I understood why I couldn't build my package with the shared libraries.

Now let me tell what would be best indeed.

ls -al /opt/intel/
......
lrwxrwxrwx 1 root root  28 Aug 31 08:52 compilers_and_libraries -> compilers_and_libraries_2016/
.......

Now let's remove and change the compilers_and_libraries symlink

# rm -r /opt/intel/compilers_and_libraries
# ln -s /opt/intel/compilers_and_libraries_2016.0.109 compilers_and_libraries
$ ls /opt/intel
.....
lrwxrwxrwx 1 root root  34 Sep 14 16:06 compilers_and_libraries -> compilers_and_libraries_2016.0.109/
.....

Now let's see if my LD_LIBRARY_PATH is correct:

% ls -al /opt/intel.bck/compilers_and_libraries/linux/compiler/lib/intel64/
total 82M
drwxr-xr-x 1 root root 1.7K Sep 14 15:48 ./
drwxr-xr-x 1 root root  124 Sep 14 16:22 ../
drwxr-xr-x 1 root root   36 Sep 14 15:48 crt/
drwxr-xr-x 1 root root  112 Sep 14 15:48 irml/
drwxr-xr-x 1 root root   10 Sep 14 15:48 locale/
-rwxr-xr-x 1 root root  49K Sep 14 15:48 cilk_db.so*
-rwxr-xr-x 1 root root 1.4K Sep 14 15:48 for_main.o*
............................

And at the end my software build fine as it can find the shared library!

The same changes can be apply for symlink of  compilers_and_libraries_2016

*******************************************

Now another weird practice about intel64 and intel64_lin symlinks.

% ls /opt/intel/compilers_and_libraries/linux/compiler/lib/intel64
/opt/intel/compilers_and_libraries/linux/compiler/lib/intel64@

Not very satisfaisant

% ls /opt/intel/compilers_and_libraries/linux/compiler/lib/intel64/
crt/                   libchkpwrap.a*      libifcore_pic.a*          libiomp5.a*        libmpx.so*
irml/                  libchkpwrap_h.a*    libifcore.so*             libiomp5.dbg*      liboffload.so*
..............................

much better, but you need to use the backslach after intel64, wich is not obvious.

What about this?

% ls -al /opt/intel/compilers_and_libraries/linux/compiler/lib/
total 12K
drwxr-xr-x 1 root root  124 Sep 14 16:22 ./
drwxr-xr-x 1 root root   44 Sep 14 15:48 ../
drwxr-xr-x 1 root root 1.7K Sep 14 15:48 intel64_lin/
drwxr-xr-x 1 root root   30 Sep 14 15:48 intel64_lin_gfx/
drwxr-xr-x 1 root root 1.2K Sep 14 15:48 intel64_lin_mic/
lrwxrwxrwx 1 root root   12 Sep 14 16:22 intel64 -> intel64_lin//
lrwxrwxrwx 1 root root   16 Sep 14 15:48 intel64_gfx -> intel64_lin_gfx//
lrwxrwxrwx 1 root root   16 Sep 14 15:48 mic -> intel64_lin_mic//
# rm opt/intel/compilers_and_libraries/linux/compiler/lib/intel64
# mkdir opt/intel/compilers_and_libraries/linux/compiler/lib/intel64
# ln -s opt/intel/compilers_and_libraries/linux/compiler/lib/intel64_lin/* opt/intel/compilers_and_libraries/linux/compiler/lib/intel64

and now :

$ ls /opt/intel/compilers_and_libraries/linux/compiler/lib/intel64
cilk_db.so@            i_ofldend_host.o@    libchkpwrap_w.a@   libifcoremt_pic.a@  libifport.so.5@         libioffload_target.so.5@  libirc_s.a@      liboffload.so@    libsvml.so@
crt@                   i_ofldend_target.o@  libcilkrts.so@     libifcoremt.so@     libimf.a@               libiomp5.a@               libirc.so@       liboffload.so.5@  locale@
for_main.o@            irml@                libcilkrts.so.5@
......................................

 

Thank you for revisitng your symlink implementation, especially the compilers_and_libraries.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>