For Programmers: Free Programming Magazines  


Home > Archive > Matlab > May 2005 > Attention: AMD Athlon/Matlab users: upgrade your BLAS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Attention: AMD Athlon/Matlab users: upgrade your BLAS
news.optonline.net

2005-05-22, 3:58 pm

The BLAS (basic linear algebra software, I think) shipped with Matlab for
many (most?) AMD processors is archaic. This is the foundation upon which
much of Matlab rests.

To create a BLAS specific for YOUR processor in YOUR environment:

Check here:
http://www.kevinsheppard.com/resear...tlab_atlas.aspx>

(Courtesy of "parnac")

You will also need the latest and greatest ACML (AMD Core Math Library)

http://www.developwithamd.com

The easiest way to set your BLAS_VERSION is like this:

You need to use a "blas" specific for your AMD processor. BLAS is Basic
Linear Algebra System.

Anyhow, it is not so have to fix (but poorly documented in Matlab):

Right click on "My Computer"
Click on "properties"
(This just opens the Sytem Properties dialog in Windows XP; there are other
ways to get there)
Click on "Advanced"
Click on "Environmental Variables"
There are two sets: The lower set is for "System Variables"
Click "New"
Under "Variable" type "BLAS_VERSION" (don't put the quotes ;-)
Under value put "c:\Matlab7\bin\win32\atlas_Athlon.dll"
(Check to make sure that there is a file by that name, otherwise look in
your Matlab folder for a "dll" folder that has the letters "Athlon" in it
and should also have "atlas" in it. Then place the path this THIS under
"value")
You do not need to reboot.
Matlab should now work.

If it STILL doesn't work, in the "path" variable under system variables add
"c:\Matlab7\bin\win32"


news.optonline.net

2005-05-22, 3:58 pm

PS:
Please post any performance improvements (or lack thereof!) so that we may
all benefit from your experience.

I found minimal improvement (439 seconds vs 443 seconds) in a NON-matrix
oriented/ IO intensive program I use frequently.



"news.optonline.net" <forge666spamisbad@spamisbadhotmail.com> wrote in
message news:jt2ke.14123$yx.3426@fe08.lga...
> The BLAS (basic linear algebra software, I think) shipped with Matlab for
> many (most?) AMD processors is archaic. This is the foundation upon which
> much of Matlab rests.
>
> To create a BLAS specific for YOUR processor in YOUR environment:
>
> Check here:
> http://www.kevinsheppard.com/resear...tlab_atlas.aspx>
>
> (Courtesy of "parnac")
>
> You will also need the latest and greatest ACML (AMD Core Math Library)
>
> http://www.developwithamd.com
>
> The easiest way to set your BLAS_VERSION is like this:
>
> You need to use a "blas" specific for your AMD processor. BLAS is Basic
> Linear Algebra System.
>
> Anyhow, it is not so have to fix (but poorly documented in Matlab):
>
> Right click on "My Computer"
> Click on "properties"
> (This just opens the Sytem Properties dialog in Windows XP; there are
> other
> ways to get there)
> Click on "Advanced"
> Click on "Environmental Variables"
> There are two sets: The lower set is for "System Variables"
> Click "New"
> Under "Variable" type "BLAS_VERSION" (don't put the quotes ;-)
> Under value put "c:\Matlab7\bin\win32\atlas_Athlon.dll"
> (Check to make sure that there is a file by that name, otherwise look in
> your Matlab folder for a "dll" folder that has the letters "Athlon" in it
> and should also have "atlas" in it. Then place the path this THIS under
> "value")
> You do not need to reboot.
> Matlab should now work.
>
> If it STILL doesn't work, in the "path" variable under system variables
> add
> "c:\Matlab7\bin\win32"
>
>



SeBy

2005-05-23, 8:59 am

news.optonline.net wrote:
>
>
> The BLAS (basic linear algebra software, I think) shipped with
> Matlab for
> many (most?) AMD processors is archaic. This is the foundation
> upon which
> much of Matlab rests.
>
> To create a BLAS specific for YOUR processor in YOUR environment:
>
> Check here:
> <http://www.kevinsheppard.com/resear...tlab_atlas.aspx>>
>
> (Courtesy of "parnac")
>
> You will also need the latest and greatest ACML (AMD Core Math
> Library)
>
> <http://www.developwithamd.com>
>
> The easiest way to set your BLAS_VERSION is like this:
>
> You need to use a "blas" specific for your AMD processor. BLAS is
> Basic
> Linear Algebra System.
>
> Anyhow, it is not so have to fix (but poorly documented in Matlab):
>
> Right click on "My Computer"
> Click on "properties"
> (This just opens the Sytem Properties dialog in Windows XP; there
> are other
> ways to get there)
> Click on "Advanced"
> Click on "Environmental Variables"
> There are two sets: The lower set is for "System Variables"
> Click "New"
> Under "Variable" type "BLAS_VERSION" (don't put the quotes ;-)
> Under value put "c:\Matlab7\bin\win32\atlas_Athlon.dll"
> (Check to make sure that there is a file by that name, otherwise
> look in
> your Matlab folder for a "dll" folder that has the letters "Athlon"
> in it
> and should also have "atlas" in it. Then place the path this THIS
> under
> "value")
> You do not need to reboot.
> Matlab should now work.
>
> If it STILL doesn't work, in the "path" variable under system
> variables add
> "c:\Matlab7\bin\win32"
>
>
>


Hi,

Can you describe more in detail how to build a Matlab ACLM lib for
windows based on the kevin sheppard script ?. I would like too to use
ACML and compared it with ATLAS.

Did you take the linux lib to rebuild a matlab compatable lib for
windows with this script ? Or simply take directly the dll provided
in ACML 2.6 and modify blas.spec ?

Sébastien
news.optonline.net

2005-05-23, 4:00 pm

Hi Sébastien-

I thought you would find this of interest (I have seen your many posts
sing on this topic).

Don't touch the blas.spec. Matlab can find the correct BLAS by setting an
environmental variable called "BLAS_VERSION". See my original post to see
how to do this, or ask again if this was not clear.
---------------------------------------------------------------

Brief Overview (not as hard as it sounds!)

In plain old Windows XP, Linux scripts are run using something called
"cygwin". Cygwin uses ATLAS (Automatically Tuned Linear Algebra Software)
together with ACML (AMD Core Math Library) to make a NEW dll for Matlab7
that has been optimally tuned on your processor to run as fast as possible.

________________________________________
___________

From Kevin's page you will be directed to:

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

where you will find the source could for ATLAS (Automatically Tuned Linear
Algebra Software). There is a very nice postscript paper on how ATLAS
automatically tests numerous algorithms, each of them, and selects the best
for your system.
You will need cygwin from:

http://www.cygwin.com

Kevin's page will tell you exactly how to use cygwin's Linux to run Atlas on
you machine, using the ACML 2.6.0 (or any other) BLAS.

NOTE: ATHLON64 is choice "7", PIII (Why an Athlon64 should act like a
Pentium III in the Atlas setup I have no idea, but if you pick "1" unknown,
like I did the first time, you get an error.)

The Atlas program takes a while to run (30 minutes, or more). Kevin's
"bash" file is then used to link the output files to form a NEW dll. It is
this dll that you will use with Matlab. You can edit Kevin's "bash" file if
you know that Matlab 7 uses BLAS or LAPACK functions that may be different
then version 6.5.

Good Luck!

It is actually quite ridiculously simple.

Bob





> Can you describe more in detail how to build a Matlab ACLM lib for
> windows based on the kevin sheppard script ?. I would like too to use
> ACML and compared it with ATLAS.
>
> Did you take the linux lib to rebuild a matlab compatable lib for
> windows with this script ? Or simply take directly the dll provided
> in ACML 2.6 and modify blas.spec ?
>
> Sébastien



SeBy

2005-05-23, 8:59 pm

news.optonline.net wrote:
>
>
> I get 7.718 seconds with the Atlas_Athlon.dll from Matlab and 5.453
> seconds
> with the AMD 2.6, Atlas 3.6 (I think) dll.
>
> (This is a 29% improvement)
>
> Atlas 3.7 is "beta" and I have not tested it. I believe that I
> used 3.6
> which is the most recent "stable" release.
>
> Bob
>
> "SeBy" <SeBy@DocKy.fr> wrote in message
> news:ef06bee.5@webx.raydaftYaTP...
instructions[color=darkred]
To[color=darkred]
> get
bash[color=darkred]
the[color=darkred]
beginning[color=darkred]
> of
> following
compare[color=darkred]
> the
basic[color=darkred]
>
>
>


Matlab 6.5x is based on 3.41 (slower than 3.6). 3.7.x is even a
little bit faster than 3.6.
SpetzNatz

2008-01-22, 11:15 pm

quote:
Originally posted by news.optonline.net
The BLAS (basic linear algebra software, I think) shipped with Matlab for
many (most?) AMD processors is archaic. This is the foundation upon which
much of Matlab rests.

To create a BLAS specific for YOUR processor in YOUR environment:

Check here:
http://www.kevinsheppard.com/resear...tlab_atlas.aspx>

(Courtesy of "parnac")

You will also need the latest and greatest ACML (AMD Core Math Library)

http://www.developwithamd.com

The easiest way to set your BLAS_VERSION is like this:

You need to use a "blas" specific for your AMD processor. BLAS is Basic
Linear Algebra System.

Anyhow, it is not so have to fix (but poorly documented in Matlab):

Right click on "My Computer"
Click on "properties"
(This just opens the Sytem Properties dialog in Windows XP; there are other
ways to get there)
Click on "Advanced"
Click on "Environmental Variables"
There are two sets: The lower set is for "System Variables"
Click "New"
Under "Variable" type "BLAS_VERSION" (don't put the quotes ;-)
Under value put "c:\Matlab7\bin\win32\atlas_Athlon.dll"
(Check to make sure that there is a file by that name, otherwise look in
your Matlab folder for a "dll" folder that has the letters "Athlon" in it
and should also have "atlas" in it. Then place the path this THIS under
"value")
You do not need to reboot.
Matlab should now work.

If it STILL doesn't work, in the "path" variable under system variables add
"c:\Matlab7\bin\win32"




More solutions? see the blog: http://jhproject.wordpress.com/2007...b-7-en-amd-y-xp

In spanish.

Regards!.

http://jhproject.wordpress.com
SpetzNatz

2008-01-22, 11:26 pm

See more solutions for the "matlab on amd, problem" in: http://jhproject.wordpress.com/2007...b-7-en-amd-y-xp

Blog in spanish.

Regards!.


http://jhproject.wordpress.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com