Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using alternative BLAS on Matlab



Matlab is already using $MATLAB/bin/mac/atlas_G4.dylib for BLAS so I doubt using a newer atlas will make a real difference (I'm not sure vecLib will either). I suppose a threaded or a G5 specific version will make a diference for some cases. I doubt the effects will be as dramatic as on linux though (but I hope I'm wrong!).

At this point I'm stuck at converting vecLib into something that Matlab approves.

Paris

ps. For fun you can try: setenv BLAS_VERSION libmwrefblas.dylib to see how much better atlas is from the reference BLAS lib!


Brian Powell wrote:

I recently found out that you can setenv BLAS_VERSION blah.so on linux
and Matlab will use blah.so for the BLAS functions (which speeds up
things dramatically when using Intel's blas instead of mathworks's).
Hoping to recreate this glorious discovery on my Mac I stumbled on how
to get vecLib to become useful.  The vecLib file in the frameworks
directory is of mysterious format to me and I'm not quite sure how to
make it a dynamic library (or whatever Matlab on OS X might expect


That is an excellent find. If you find a direct answer, please let me know.

The only way I see to do it is to compile ATLAS which is optimized for Altivec. It says it provides a full BLAS implementation.

<http://math-atlas.sourceforge.net/>

I downloaded the binary and did:

% setenv BLAS_VERSION dir/libcblas.a
% matlab
dyld: /Applications/MATLAB6p5p1/bin/mac/MATLAB malformed library: /Users/powellb/Download/OSX_PPCG4AltiVec_2/lib/libcblas.a (not a Mach-O file, bad magic number)
Trace/BPT trap


So, setting the variable does work on MacOSX, I realize was pointing to a static (rather than dynamic library) so it failed, but, it appears matlab will work that way.

I don't have the time to compile ATLAS as a .so right now, but, if you get it working, please share!

Cheers,
Brian
_______________________________________________
scitech mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/scitech
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Using alternative BLAS on Matlab (From: Brian Powell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.