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

Intel Parallel Studio XE clashing with MATLAB R2017b

Dear all,

I am facing an extremely weird problem with MATLAB R2017b on Ubuntu 18.04 (64-bits architecture). The installation of MATLAB proceeds without errors, but as I launch it i receive this error 

MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2017b/bin/glnxa64/MATLAB: symbol lookup error: /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so: undefined symbol: __intel_skx_avx512_memcpy

For some reason it seems that MATLAB is trying to use the Intel Compilers libiring and I do not understand why or what can I do to avoid such behaviour. Does this happen even when installing other apps? Is it workaround-able?

UPDATE: The symbol is actually undefined in libirng.so! 

$ nm -D /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so | grep __intel_skx_avx512_memcpy
                 U __intel_skx_avx512_memcpy

What the hell?!

Thank you

0 Kudos
9 Replies
Highlighted
Employee
41 Views

Hello,

As far as I can tell, this symbol is defined in libirc.so.

Could you please find libirc.so in your Intel compiler installation, and then add that directory to LD_LIBRARY_PATH before you start Matlab?

Thank you,

--Eugene

 

0 Kudos
Highlighted
41 Views

Eugene Epshteyn (Intel) wrote:

Hello,

As far as I can tell, this symbol is defined in libirc.so.

Could you please find libirc.so in your Intel compiler installation, and then add that directory to LD_LIBRARY_PATH before you start Matlab?

Thank you,

--Eugene

 

Dear Eugene, 

Thank you for your reply! I did as you suggested, adding this to my .bashrc and sourcing it: 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin/

I still get the same error. It really does seem that that symbol is undefined in libirng.so: is there any way I can test this (for example by compiling a simple "Hello World" that calls that library)?

Regards

 

0 Kudos
Highlighted
41 Views

It is possible that the symbol is undefined in libirng.so.  If you do "ldd libirng.so" you'll see the other shared libraries that it is expecting, including libintlc.so where I can find the symbol.

Before you added to LD_LIBRARY_PATH, was there an older Intel compiler installation directory there by any chance?   If so, then it is possible that the reference to "libintlc.so" was resolved in an earlier compiler installation directory, one that pre-dated adding this entry point.

              --Lorri

 

PS: I don't know if this will completely reproduce the failure on the command line, but create a program that looks like this:
call random_number(x)
print *, x
end

Invoke the /opt/intel/bin/compilervars.sh or (.csh, depending on your shell) and try compiling this program with:
ifort foo.f90 -lirng

Does the resulting executable run?   Again, you can use "ldd" to look at the dependent shared libraries.

0 Kudos
Highlighted
Beginner
41 Views

easy, but dirty

do

export LD_PRELOAD=/opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/TheNameOfTheLibYouAreLookingFor

before opening MATLAB

0 Kudos
Highlighted
41 Views

Dear all,

Thank you for all of your assistance! I will reply to all your answers and report my workaround as well:

1a) @Lorri, the ldd output is the following, but I do not know exactly how to interpret it

modelstation@modelstation:/opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64$ ldd libirng.so
	linux-vdso.so.1 (0x00007fffcb7fd000)
	libintlc.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libintlc.so.5 (0x00007fdb33aec000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdb336fb000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fdb340ce000)

1b) @Lorri, if i write down a program like you suggested, the compilation works and the output is a random number (well, it's the same number every time I call it even if I recompile it...is that normal?). It seems to be working fine. Here's the output from ldd, that, again, I am not sure how to interpret: 

ldd a.out
	linux-vdso.so.1 (0x00007f2d72aa5000)
	/opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so (0x00007f2d7250c000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2d7216e000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2d71f4f000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d71b5e000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2d71946000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2d71742000)
	libintlc.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libintlc.so.5 (0x00007f2d714d4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2d72880000)

2) @Mathieu, LD_PRELOAD does not do the trick. I get the same error. 

3) My workaround. My .bashrc file is written so that it sources intel compilers and sets the default compilers variables: 

source /opt/intel/parallel_studio_xe_2018.2.046/bin/psxevars.sh
export CC='/opt/intel/bin/icc'
export CXX='/opt/intel/bin/icpc'
export FC='/opt/intel/bin/ifort'
export F77='/opt/intel/bin/ifort'
export CFLAGS='-O3 -xHost -ip'
export CXXFLAGS='-O3 -xHost -ip'
export FCFLAGS='-O3 -xHost -ip'
export CPPFLAGS="-I$INTELSOFT/hdf5/include -I$INTELSOFT/zlib/include -I$INTELSOFT/netcdf/include"
export LDFLAGS="-L$INTELSOFT/hdf5/lib -L$INTELSOFT/zlib/lib -L$INTELSOFT/netcdf/lib"
export NETCDF='/home/modelstation/Software/Intel_Compiled/merged_netcdfs'

If I comment them out, MATLAB starts.

Of course this is not a feasible workaround, I cannot go and change .bashrc constantly, but I do not know what else to do.

Regards!

0 Kudos
Highlighted
Beginner
41 Views

I am very surprised, because I get the same issue again and again, and for the moment it's always working.

 

You need to preload the library where the symbol is defined in your case I think it's libirc.so

 

Mathieu

0 Kudos
Highlighted
41 Views

Mathieu Gravey wrote:

I am very surprised, because I get the same issue again and again, and for the moment it's always working.

 

You need to preload the library where the symbol is defined in your case I think it's libirc.so

 

Mathieu

Mathieu, the problem is that the symbol appears *truly* undefined: 

$ nm -D /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so | grep __intel_skx_avx512_memcpy
               U __intel_skx_avx512_memcpy

In the end my final workaround was creating this .desktop file:

[Desktop Entry]
Name=Matlab R2017b
Exec=bash --noprofile --norc -c 'exec PathToMatlab/matlab -desktop'
Icon=/home/modelstation/Pictures/matlab-icon.png
Terminal=false
Type=Application

 

0 Kudos
Highlighted
Beginner
41 Views

It's exactly what I wrote, you should add libirc and not libirng

nm -D /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirc.so | grep __intel_skx_avx512_memcpy
0000000000046bc0 T __intel_skx_avx512_memcpy

 

0 Kudos
Highlighted
41 Views

Mathieu Gravey wrote:

It's exactly what I wrote, you should add libirc and not libirng

nm -D /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirc.so | grep __intel_skx_avx512_memcpy
0000000000046bc0 T __intel_skx_avx512_memcpy

 

Sorry I did miss that part! Preloading libirc works!

0 Kudos