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

Linking MKL libraries in MacOSX 10.7.2 (Lion)

Jump to solution
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

Accepted Solutions
Highlighted
New Contributor II
28 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
Highlighted
28 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
Highlighted
New Contributor II
29 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
Highlighted
28 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
Highlighted
Beginner
28 Views

Hello!

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

Cheers!

Luca

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