Blas & Lapack on Mac OSX (Leopard)
In my C++ program I need to call some functions that make use of Blas and Lapack. I ignore whether they are standard library provided with the operating system Leopard. If indeed they are a standard of OSX distribution, then in which directory are they installed ? I searched for keyword Blas and Lapack. I expected to fnd the respective .a or .so libraries but found nothing of this kind.
If they are not installed by default then where can I get them ?
The authors, of the functions that I am calling, strongly recommend to use optimized BLAS and LAPACK libraries. They mention the Intel library MKL.
Does anybody know of optimized BLAS and Lapack libraries specific for Mac OSX leopard ?
Thank you in advance,
Maura E.M.




veclib
The optimized blas and lapack routines on OSX are contained in the vecLib framework, so you want to link with "-framework vecLib".
optimized blas and lapack routines on OSX
Thank you.
I stil feel at a loss about how to link my code with the dimensionality reduction functions. My doubt arises from the compilation examples provided by DrL authors (pasted at the bottom). From your suggestion it sounds like in my case I should use:
g++ -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -framework vecLib
-o example example.cpp
From DrL authors' examples it looks like I have to include some updated header (-I),its directory path (-L),and expressively the libraries (-l).
I do not know which options, from DrL authors' compilation examples, are to be kept, and which ones are to be omitted when linking with
"-framework vecLib".
Thank you again,
Maura E.M.
*****************************************************************************
* Compilation examples from DrL documentation *
*****************************************************************************
Using Dr. L with BLAS and LAPACK
Dr. L does not require any additional libraries in order to be compiled, however, it is strongly recommended that you link your code with optimized BLAS and LAPACK libraries for your machine. To use these libraries with Dr. L, define YA_BLAS, YA_LAPACK, and YA_BLASMULT during compilation and specify the location of the BLAS and LAPACK libraries:
g++ -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -lblas -llapack -o example example.cpp
For the Intel MKL library, an optimized compile command will look like:
icpc -ansi-alias -O2 -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT \
-I/opt/intel/mkl/10.0.3.020/include \
-L/opt/intel/mkl/10.0.3.020/lib/em64t/ \
-lmkl_lapack -lmkl \
-o example example.cpp
Hmmm. From the snippet of
Hmmm. From the snippet of documentation you gave, I also would have tried this:
g++ -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -framework vecLib
-o example example.cpp
Doesn't it work? Can you post an error message? Maybe you need to add the include path for the veclib headers, so you could also try:
g++ -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -I/System/Library/Frameworks/vecLib.framework/Headers -framework vecLib
-o example example.cpp
Powerful debugger for Mac OSX
It works as follows:
g++ -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -lblas -llapack -framework vecLib -o get_AllVar_matrix get_AllVar_matrix.cc
Besides an EDE what I do need right away is a good debugger.
On Linux I use ddd which I do not like as it provides no clue for memory leakage.
Is there anything better for Mac OSX ?
Of course I love TotalView ...
Thanks,
Maura
Re: Powerful debugger for Mac OSX
Depending on what you mean by powerful... Xcode uses GDB and provides both the backend command line as well as a GUI for stepping through and analyzing the application state. In addition to that there is another program called Instruments.app which you can use to look for memory leaks and a host of other performance related issues.
Finally, for performance tuning, you can use Shark. All of these applications come with Xcode and are installed in /Developer/Applications.
Regards,
Dave
XCode
At the moment I would be happy if I could get my code running ... I mean achiving a multi-dimensional space reduction.
I do not worry about performances right now.
I'd just like to be able to use XCode debugger. That's it.
I see there are some menus for running, stopping, etc... that are grayed out, though.
I realize I am just using XCode editor ...
Any clue is welcome.
Thank you,
Maura