Message-ID: <C4DE5409-5FFB-4255-860C-7161EA1E4A11@collocations.de>
Date: 2013-12-01T15:42:32Z
From: Stefan Evert
Subject: GotoBLAS2 with multiple cores
In-Reply-To: <CAJRSaT_6ZWNAdfUdrSvS_i5g6g0roq3TjFmkq3hALSLBGmhA4w@mail.gmail.com>
Your report sounds somewhat similar to problems I encountered with OpenBLAS on Ubuntu Linux (which is a maintained version of GotoBLAS; I couldn't get the latter to compile properly).
OpenBLAS uses OpenMP for parallelization. Once linked into R, other OpenMP-based code would only use a single core any more. I have never used foreach, but I can imagine that something similar might be going on.
The workaround I found was to compile OpenBLAS with the setting NO_AFFINITY=1. In addition, if you're running parallel code, I'd very much recommend to limit the number of threads within each parallel process by setting the OMP_NUM_THREADS environment variable (or in some other way).
Hope this helps,
Stefan
On 24 Nov 2013, at 10:03, Safiye Celik <safisce at gmail.com> wrote:
> So, is it possible to use many cores at the same time with GotoBLAS2, do
> you have any ideas?