Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6977 Discussions

Linking MKL libraries in MacOSX 10.7.2 (Lion)

Laura_De_Lorenzis
555 Views
Hallo all,
I'm linking the MKL libraries using the loading option
-L /Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/lib -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_solver_lp64 -lmkl_core -lmkl_intel_thread
but I get the following error message while running the program:
dyld: Library not loaded: libmkl_intel_lp64.dylib
Referenced from: /Users/Work/my_dir/program_folder/main/./program_name
Reason: image not found
Trace/BPT trap: 5
I thought the problem was the setting of the environment variables. I did this by running the scriptmklvars_intel64.sh, but nothing changed. I also tried editing the .bash_profile and adding the lines
source /Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/bin/intel64/mklvars_intel64.sh
export DYLD_LIBRARY_PATH='/Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/lib'
but this also didn't work. Anybody can please help?
Thanks a lot in advance.
0 Kudos
1 Solution
Hirchert__Kurt_W
New Contributor II
555 Views
I found out that if I type

source /Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/bin/mklvars.sh intel64
in the command line, the program starts working!
But I don't like to have to type this anytime I open a new terminal window...I thought having this line in the .bash_profile would suffice, instead it does not.
Anybody can help?

Short answer: move it from .bash_profile to .bashrc !

In the original design of Unix shells, putting this kind of command in .bash_profile should have sufficed, but there are now so many ways to start shells that bypass the effects of .bash_profile (or its equivalent for other shell programs) that it is more practical to put things in the more ubiquitous .bashrc (or its equivalent for other shell programs).

-Kurt

View solution in original post

0 Kudos
5 Replies
Laura_De_Lorenzis
555 Views
I found out that if I type

source /Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/bin/mklvars.sh intel64
in the command line, the program starts working!
But I don't like to have to type this anytime I open a new terminal window...I thought having this line in the .bash_profile would suffice, instead it does not.
Anybody can help?
0 Kudos
Hirchert__Kurt_W
New Contributor II
556 Views
I found out that if I type

source /Developer/opt/intel/composer_xe_2011_sp1.6.038/mkl/bin/mklvars.sh intel64
in the command line, the program starts working!
But I don't like to have to type this anytime I open a new terminal window...I thought having this line in the .bash_profile would suffice, instead it does not.
Anybody can help?

Short answer: move it from .bash_profile to .bashrc !

In the original design of Unix shells, putting this kind of command in .bash_profile should have sufficed, but there are now so many ways to start shells that bypass the effects of .bash_profile (or its equivalent for other shell programs) that it is more practical to put things in the more ubiquitous .bashrc (or its equivalent for other shell programs).

-Kurt

0 Kudos
Laura_De_Lorenzis
555 Views
Thanks Kurt, but actually I had already tried that, and it doesn't work...is there a way I can find out which file is used as profile for my shell?
Thanks
Laura
0 Kudos
Wich
Beginner
555 Views

Hello!

Try putting it in your ~/.profile(it works for me).

Cheers!

Luca

0 Kudos
Laura_De_Lorenzis
555 Views
unfortunately it doesn't work for me :-(
anyway thanks for trying to help!
Laura
0 Kudos
Reply