Skip to content
Back to formatted view

Raw Message

Message-ID: <CAFDcVCRLjHzopwjVBP8=ye1e1B1M0eqLB5tn0JM_d7QGvb8njA@mail.gmail.com>
Date: 2016-01-15T19:38:44Z
From: Henrik Bengtsson
Subject: Multiple cores are used in simple for loop
In-Reply-To: <1452881746.6790.5@physik.uni-freiburg.de>

On Fri, Jan 15, 2016 at 10:15 AM, Daniel Kaschek
<daniel.kaschek at physik.uni-freiburg.de> wrote:
> Dear Martyn,
>
>
> On Fr, Jan 15, 2016 at 4:01 , Martyn Plummer <plummerm at iarc.fr> wrote:
>>
>>
>> Alternatively, you may be able to control the maximum number of threads
>> by setting and exporting an appropriate environment variable depending
>> on what backend you are using, e.g. OPENBLAS_NUM_THREADS or
>> MKL_NUM_THREADS.
>
>
>
> Thanks a lot. Running
>
> export OPENBLAS_NUM_THREADS = 1
>
> in the bash before starting R solves both problems!

I don't have builds so I can try myself, but as an alternative, is it
possible to set this environment variable in ~/.Renviron, or is that
too late in the R startup process?  What about
Sys.setenv(OPENBLAS_NUM_THREADS=1) in ~/.Rprofile?

/Henrik

>
>
>
> Cheers,
> Daniel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel