|Re: [eigen] If Eigen code is compiled with -fopenmp when is multi-threading used and how is it controlled?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] If Eigen code is compiled with -fopenmp when is multi-threading used and how is it controlled?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 1 Nov 2011 21:47:10 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=GSicOKvj5fui3ooHmMJtAAPjiamDXxAlvNKMhkfEg08=; b=DZrd8Gcc3HQdbI21nZu0f+NssDbLnSfjXX1pv9IWcK9G2AzAcD6DswacMICi0pfGkH AUAF8r1nAJnYavbDXcK85xp0OilhNc2x3f6c2ubu6jZDe1RKnJXJA+W/2SUe3SECK9/e zS6EUxFmsfs98EpopHVu4P3hi7b8az5vJahgY=
Currently, it is only used for gemm like operations, not rankUpdate.
Since it is based on OpenMP you can control it with OMP_NUM_THREADS.
By default we use openmp default which is the number of cores.
You can also control it at runtime with Eigen::internal::setNbThreads(n);
On Tue, Nov 1, 2011 at 8:14 PM, Douglas Bates <bates@xxxxxxxxxxxxx> wrote:
> Is there documentation on when multi-threading is used and how it is
> controlled. I see that various symbols associated with openmp are
> incorporated in the executable and it appears from
> Eigen/src/Core/products/Parallelizer.h that they will be used in a
> gemm operation. I am particularly interested in whether the
> .rankUpdate() method for SelfAdjointView's would use the parallel code
> and, if so, how I would control it. I would prefer to use an
> environment variable if possible instead of hard-wiring a call into
> the code because the executable will be used in different