Re: [Rd] Multiple cores are used in simple for loop

2016-01-15 Thread Martyn Plummer
On Fri, 2016-01-15 at 15:03 +0100, Daniel Kaschek wrote: > Dear all, > > I run different R versions (3.2.1, 3.2.2 and 3.2.3) on different > platforms (Arch, Ubuntu, Debian) with a different number of available > cores (24, 4, 24). The following line produces very different behavior > on the

[Rd] Multiple cores are used in simple for loop

2016-01-15 Thread Daniel Kaschek
Dear all, I run different R versions (3.2.1, 3.2.2 and 3.2.3) on different platforms (Arch, Ubuntu, Debian) with a different number of available cores (24, 4, 24). The following line produces very different behavior on the three machines: for(i in 1:1e6) {n <- 100; M <- matrix(rnorm(n^2),

Re: [Rd] Multiple cores are used in simple for loop

2016-01-15 Thread Henrik Bengtsson
On Fri, Jan 15, 2016 at 10:15 AM, Daniel Kaschek wrote: > Dear Martyn, > > > On Fr, Jan 15, 2016 at 4:01 , Martyn Plummer wrote: >> >> >> Alternatively, you may be able to control the maximum number of threads >> by setting and exporting

Re: [Rd] Multiple cores are used in simple for loop

2016-01-15 Thread Daniel Kaschek
Dear Martyn, On Fr, Jan 15, 2016 at 4:01 , Martyn Plummer 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