Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > BLAS help

BLAS help
Thread Tools
Nsee
Fresh-Faced Recruit
Join Date: May 2003
Location: Just Outside of New York City
Status: Offline
Reply With Quote
May 24, 2003, 10:41 AM
 
Recently, I have been working on a project in Apple Computer�s Mac OS X 10.2, where I have been trying to implement Apple Computer�s version of BLAS (http://www.netlib.org/blas/), which is contained in its veclib framework (http://developer.apple.com/techpubs/...es/vecLib.html). I have been trying very hard to get it working, but I have extremely limited knowledge of compiling under UNIX and all instructions I have found assume some sort of advanced knowledge. One of the places I started understanding this is with the documentation for the PPC G4 Altivec unit (http://developer.apple.com/hardware/ve/index.html). One of the places that seemed to provide tantalizing information was at http://developer.apple.com/hardware/ve/quickstart.html, especially its mentioning of CBLAS, along with here, http://developer.apple.com/hardware/ve/algorithms.html.
One of the best system seems to be GSL, (http://sources.redhat.com/gsl/), but I am unsure if can accomplish the routines I need. I need to accomplish high speed fast fourier transforms in 2 dimensions, maybe even 3. If anyone has any commentary on that program or how to compile it, that would be great also.
Another good place to look is by searching for VBLAS, CBLAS, or BLAS on goggle along with the words �Mac OS X� or �Darwin� or �Terminal�. Another good thing to look up is the SUN supercomputing libraries. Another good place to look is SAL�s numerical analysis miselaneous software. It has many of the links to different BLAS and FFT processing programs. See : http://sal.kachinatech.com/B/0/
Basically, I wish to know how to get a BLAS or similar FFT processing system working in Mac OS X (which has Darwin underlying it) so I can input supercomputer style computations. Anyone willing to help me?
     
alien
Mac Enthusiast
Join Date: Jan 2002
Location: Trondhjem, Norway
Status: Offline
Reply With Quote
May 24, 2003, 05:53 PM
 
How much programming experience do you have? You might want to check out a book on C programming under Unix before you begin with BLAS and AltiVec. The ones I've read that offer an introduction to C is the following:

Practical C Programming, 3rd Edition, by Steve_Oualline (O'Reilly).

C, A Software Engineering Approach, by Darnell/Margolis (Springer).

It's not too hard to get some basic knowledge with programming and compiling with C under Unix. There are of course plenty of advanced stuff too, but you may not need to learn it.

Did you check out the code linked to at this Apple Dev Page? Both BLAS and vDSP examples there.

Ian Ollman's AltiVec Tutorial can be found at SIMDtech. There is also a mailing list you can subscribe to. As long as simple precision is enough, AltiVec is made for FFT and matrix/vector work. Depending on what you will be programming and whether you can use BLAS, Lapack etc, you may not need to program for AltiVec directly.

Apple has several mailing
lists. The SciTech and Cocoa lists should be good places to discuss these things.

I've just begun looking into BLAS programming myself. There are some pitfalls when it comes to array allocation, since you will have to make some decisions on row-wise vs. column-wise vs. "flattened" matrices. And also dynamically vs. statically allocated arrays. BLAS has a Fortran legacy, and Fortran and C have somewhat different takes on memory allocation, arrays, "leading dimensions", function calls etc. It takes some studying to fully understand all of this... I haven't yet
     
Nsee  (op)
Fresh-Faced Recruit
Join Date: May 2003
Location: Just Outside of New York City
Status: Offline
Reply With Quote
May 26, 2003, 04:48 PM
 
Thanks for the help, but from all the references I've gotten, its boiled down to a single realization. I do not know how to use GCC correctly. If someone could give me pointers on the correct commands, that would be helpful. Is this http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/ a good place to start? Thanks for any help!
     
Nsee  (op)
Fresh-Faced Recruit
Join Date: May 2003
Location: Just Outside of New York City
Status: Offline
Reply With Quote
May 26, 2003, 07:46 PM
 
should this work
gcc

Make
# include <veclib/veclib.h>
- include (all the blas files, unless they are already in there)
-E
-std=c89.
iso9899:199409
-I [/system/frameworks�.. or other places for all directories with needed files]
-I- [/ for directories that seem to conflict if placed first]
-o (somewhere)

compile (whatever somewhere was) -framework vecLib
     
Nsee  (op)
Fresh-Faced Recruit
Join Date: May 2003
Location: Just Outside of New York City
Status: Offline
Reply With Quote
May 29, 2003, 04:44 PM
 
Most of my questions have been answered, see http://forums.macosxhints.com/showth...&postid=61582. But if you have anything to add to what was said before, that would be helpful. Anyone that contributed, you all have been of great assistance.
     
alien
Mac Enthusiast
Join Date: Jan 2002
Location: Trondhjem, Norway
Status: Offline
Reply With Quote
May 29, 2003, 05:44 PM
 
I think the best advice is, like it seems you have done, to dive in and begin programming. I don't have anything else to add, my experience with BLAS is from an SGI Origin supercomputer, I haven't tried it on Macs, except looked at some code.
     
Nsee  (op)
Fresh-Faced Recruit
Join Date: May 2003
Location: Just Outside of New York City
Status: Offline
Reply With Quote
May 30, 2003, 03:34 PM
 
SEE this site, it will tell new developments today, need help!
http://forums.macosxhints.com/showth...threadid=12154
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:06 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,