Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

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

Jump to solution

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.

0 Kudos

Accepted Solutions
Highlighted
Employee
23 Views

Hi @Amaud,
Thanks for your feedback. Well, with 2016 release, to enable co-existence of multiple installations and updates of the product and additionally to eliminate duplicate content across these updates, the 2016 release has a new directory layout changes for its compiler and libraries components as well. Please refer to the details at: http://intel.ly/1Nn2GjV.  This way it's easy to change quickly to a different version and update thereof as well. Please note the <version> suffix appended to the top level directories and the addition of the <target-OS> between the compiler and library directory contents. This way, with the new sub-dir, the product can share a common directory structure between its compiler and libraries component and other products installed as well on the same system. Your example scenarios don't reflect the changes in the layout release. Also, switching from one version or update to another through change in sym links and then sourcing the compilervars.sh script should set the compiler environment like before. Hope this helps....

_Kittur 

View solution in original post

0 Kudos
4 Replies
Highlighted
Employee
24 Views

Hi @Amaud,
Thanks for your feedback. Well, with 2016 release, to enable co-existence of multiple installations and updates of the product and additionally to eliminate duplicate content across these updates, the 2016 release has a new directory layout changes for its compiler and libraries components as well. Please refer to the details at: http://intel.ly/1Nn2GjV.  This way it's easy to change quickly to a different version and update thereof as well. Please note the <version> suffix appended to the top level directories and the addition of the <target-OS> between the compiler and library directory contents. This way, with the new sub-dir, the product can share a common directory structure between its compiler and libraries component and other products installed as well on the same system. Your example scenarios don't reflect the changes in the layout release. Also, switching from one version or update to another through change in sym links and then sourcing the compilervars.sh script should set the compiler environment like before. Hope this helps....

_Kittur 

View solution in original post

0 Kudos
Highlighted
Employee
23 Views

Hi Amaud, 
Is the directory structure clearer now after going over the layout details at http://intel.ly/1Nn2GjV.? Appreciate your input, thx.

_Kittur

0 Kudos
Highlighted
Beginner
23 Views

Kittur Ganesh (Intel) wrote:

Hi Amaud, 
Is the directory structure clearer now after going over the layout details at http://intel.ly/1Nn2GjV.? Appreciate your input, thx.

Yes

 

_Kittur

0 Kudos
Highlighted
Employee
23 Views

Great, thanks for the confirmation Amaud.

_Kittur

0 Kudos