Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6586 Discussions

Error trying to run compiled Fortran code

fixitben
Beginner
142 Views

HI

I am running on fortran on a Linux box. When I compile it seems to compile fine. Using this command.

 ifort -mkl -o sesame1 *.f90

Then I try and run sesame1 using ./sesame1. I get the error below.

./sesame1: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory

 

 I am not sure why. I have manually exported the library to the LD_LIBRARY_PATH.

export LD_LIBRARY_PATH=/opt/intel/composerxe/mkl/lib/ia64/:$LD_LIBRARY_PATH

I have ran the command compilervars.sh. Still the same. I am not sure why it won't see the library.

 

Thanks

 

0 Kudos
3 Replies
mecej4
Black Belt
142 Views

The command

     export LD_LIBRARY_PATH=/opt/intel/composerxe/mkl/lib/ia64/:$LD_LIBRARY_PATH

is incorrect unless you really have a Linux box with an Itanium CPU. Check the directory where the shared libraries are actually installed. The path will probably contain intel64, not ia64.

fixitben
Beginner
142 Views

Thanks for your help. Soon after I posted this I realized my error. I am still not sure why the compilervars.sh​ and mklvar.sh doesn't load this path. Either way It works now. Thanks

Ying_H_Intel
Employee
142 Views

Hello, 

Right, you may set it manually, or run the script  with the CPU type option 

>source mklvars.sh [intel64|ia32]

as MKL user guide https://software.intel.com/en-us/node/528500 mentioned: 

It can set the INCLUDE, MKLROOT, LD_LIBRARY_PATH, MIC_LD_LIBRARY_PATH, MANPATH, LIBRARY_PATH, CPATH, and NLSPATH environment variables in the command shell using one of the script files in the bin subdirectory of the Intel MKL installation directory. The environment variable MIC_LD_LIBRARY_PATH specifies locations of shared objects for Intel® Many Integrated Core (Intel® MIC) Architecture

Best Regards,

Ying 

 

Reply