LAPACK + BLAS = multi-core?

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

LAPACK + BLAS = multi-core?

Postby bniclas » Fri Dec 20, 2013 5:19 am

Hello everbody,

I use Armadillo in my Visual Studio 2012 project to interface LAPACK and BLAS routines. The performance of my program depends directly on the matrix solver DGESV. So I want to get the best speed on that function.

I have done some research, but there are still a lot of things, which are not really clear to me. I have read that LAPACK uses fast BLAS routines in order to use multi-threading technologies and get a better speed. That implies to me, that LAPACK is not using multi-cores by nature. I have read that there are BLAS compilations, which are optimized and use multi-cores (Intel MKL, AMD ACML, OpenBLAS).

1) Does my LAPACK.dll depend on my external BLAS.dll?
2) Or is BLAS already compiled into LAPACK with linking?
3) Does DGESV uses multiple-cores? (Or how can I find out, if a LAPACK routine is optimized?)

In the 2nd case, I have compile my own LAPACK.dll with several BLAS compilations, right? In the first case, I can just link them, and LAPACK automatically gets profit from the BLAS speed(I don't think that it works that way) ? Excuse me, if the question is too stupid for you, but I am new to using third party dll's.

Cheers,
Niclas
bniclas
 
Posts: 2
Joined: Fri Dec 20, 2013 4:36 am

Re: LAPACK + BLAS = multi-core?

Postby admin » Mon Dec 23, 2013 3:24 pm

1) Does my LAPACK.dll depend on my external BLAS.dll?

No, LAPACK and BLAS are two different libraries
2) Or is BLAS already compiled into LAPACK with linking?

Almost, you compile you BLAS, you compile your LAPACK and you just plug them together when linking your own program.
3) Does DGESV uses multiple-cores? (Or how can I find out, if a LAPACK routine is optimized?)

If you want the BLAS layer to be multi-core, just use a multicore blas: ATLAS, MKL, etc. and stays with the LAPACK library.
If you want Multicore LAPACK, you need to use PLASMA - see http://icl.cs.utk.edu/plasma/

In the 2nd case, I have compile my own LAPACK.dll with several BLAS compilations, right? In the first case, I can just link them, and LAPACK automatically gets profit from the BLAS speed(I don't think that it works that way) ? Excuse me, if the question is too stupid for you, but I am new to using third party dll's.

You are right! This is the way it works, LAPACK automatically gets profit from the BLAS speed. Most of the speed comes from the BLAS library.
Under Windows, I think the best vendor library for multicore is Intel MKL.
Hope it helps
Julie
admin
Site Admin
 
Posts: 616
Joined: Wed Dec 08, 2004 7:07 pm

Re: LAPACK + BLAS = multi-core?

Postby bniclas » Mon Jan 06, 2014 6:56 am

Thank you very much! That helps me a lot!
bniclas
 
Posts: 2
Joined: Fri Dec 20, 2013 4:36 am


Return to Algorithm / Data

Who is online

Users browsing this forum: No registered users and 2 guests

cron