Skip to content
Prev 1914 / 2152 Next

Disabling implicit parallelism of multithreaded BLAS from an R package

I hope it won't be viewed as highjacking this thread if I mention that 
disabling implicit parallelism can be an issue in a variety of other contexts
as well.  I've recently experienced this on our cluster with simulations that
used foreach  and doMPI in an embarrassingly parallel way, but use Rmosek/Mosek
in the innermost loop to solve convex optimization problems.  By default Mosek
tries to use multicore capabilities of the cluster nodes and this results in rather
poor performance as different instances of the foreach loop fight with one another
for cpu resources.  Fortunately, this can be controlled in Rmosek so the foreach
instances are single threaded as illustrated in the new release of my REBayes
package.  How common such "features" are,  I have no clue, but it can be 
significant.  In my application it cut elapsed time of my simulations from about 
14 hours to about 5.


url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    rkoenker at uiuc.edu            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Urbana, IL 61801
On Aug 13, 2014, at 9:28 AM, Ei-ji Nakama <nakama at ki.rim.or.jp> wrote: