Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

What is the correct way to load the Library Path?

$
0
0

Greetings,

I have some code which I compiled like this on my host:
$ ifort -openmp -mmic -o test.phi test.f90 -O4

I copied it up to the mic and tried to run

mic0$ ./test.phi
./test.phi: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

Oh! I read about this in the docuentation, the library path is missing. Simple fix, right? I NFS mount the /opt/intel up to the mic so it should go smoothly.
mic0$ source /opt/intel/composer_xe_2015.2.164/bin/compilervars.sh intel64

Except...
mic0$ env |grep LD_LIB
MIC_LD_LIBRARY_PATH=/opt/intel/composer_xe_2015.2.164/compiler/lib/mic:/opt/intel/composer_xe_2015.2.164/mpirt/lib/mic:/opt/intel/mic/coi/device-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2015.2.164/ipp/lib/lib/mic:/opt/intel/mic/coi/device-linux-release/lib:/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2015.2.164/compiler/lib/mic:/opt/intel/composer_xe_2015.2.164/mkl/lib/mic:/opt/intel/composer_xe_2015.2.164/tbb/lib/mic

Huh...it doesn't set LD_LIBRARY_PATH, it sets MIC_LD_LIBRARY_PATH. Odd. But does the code run?
mic0$ ./test.phi
./test.phi: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

Nope! Well, I will set the path manually.
mic0$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/composer_xe_2015.2.164/compiler/lib/mic
mic0$ ./test.phi
[snip output, but it runs!]

So I went looking and I don't see anything that sets the LD_LIBRARY_PATH from the Intel tools on the Phi.

What am I missing? What file should I be sourcing for this to work?

Thanks!


Viewing all articles
Browse latest Browse all 1347

Trending Articles