OpenMP and Blas

Use this forum to discuss the book: Using OpenMP - Portable Shared Memory Parallel Programming, by Barbara Chapman, Gabriele Jost and Ruud van der Pas Read the http://openmp.org/forum/viewtopic.php?f=8&t=465 for book info and to download the examples. Post your feedback about the book and examples to this forum
Post Reply
kerbero

OpenMP and Blas

Post by kerbero »

Hi, i need some information about use OpenMP and Blas. Have you got same examples code ?
Thanks

jostg

Re: OpenMP and Blas

Post by jostg »

Hi!
Please provide more information on what you are trying to do. Calling a pre-built BLAS library within and OpenMP region? Parallel loop? Or do you want to parallelize a BLAS routine with OpenMP?
Greetings,
Gabriele

ruud

Re: OpenMP and Blas

Post by ruud »

Hi,

As Gabriele said, we need more information to help.

There are several vendors that supply an optimized BLAS library. In many cases these have already been parallelized for you. Especially if it is BLAS-2 or BLAS-3. Most likely, OpenMP is used for that so you'll only need to set OMP_NUM_THREADS to use multiple threads.

You could still call such routines from within a parallel region as well, but that implies nested parallelism. You need to check whether this is supported and may have to set OMP_NESTED to TRUE to enable it.

In case you want to parallelize BLAS routines yourself, you may want to leverage what others have done. Some are trivial, but other routines can be pretty complicated.

Kind regards, Ruud

Post Reply