Speed up R language calculation using Openblas in Windows

Source: Internet
Author: User
Tags intel mkl

When using R, you will find that R CPU utilization is not very high, anyway, when I use R, no matter what r does the CPU utilization of the R is only hundred molecules, which leads to a very long calculation time when the computation is large, it will give an illusion (r really in the calculation?). Will my program die? )。 Today, I saw a blog introduction of the method, can't wait to try, can only say: too good! Here is my test:

Ago:

After:

As you can see, the calculation time is reduced from 247.97s (that is, 4.14min) to 11.22S,CPU utilization when the R calculation is 100%.

Implementing the above performance needs to install Openblas,blas is a standard for linear algebra operations, and it has many implementations. In R, whether explicit or implicit, we tend to perform a large number of linear algebra operations. However, the default invocation of R is often called ref BLAS, which is a very low-efficiency BLAS that only implements functionality. The business-supported revolution R is fast, and one of the reasons it's important is that it uses Intel's optimized MKL BLAS (MATLAB is also used for MKL fast). Blas has an open source implementation that is Openblas, which evolved from Gotoblas and can do it faster than Intel MKL.

Method: Download the following Baidu cloud network disk files → unzip → copy all dll files to the R installation directory under the bin x64 (sorry My computer is 64-bit, 32-bit system click the reference link in the following) folder (for example, my is: D:\R\R-3.3.1\bin\x64 , remember to save the Rblas.dll file before copying x64) →ok

Http://pan.baidu.com/s/1sl1XqkX

Reference: http://blog.csdn.net/a358463121/article/details/42713307

Openblas Download Network: https://sourceforge.net/projects/openblas/files/

This article link: http://www.cnblogs.com/homewch/p/5954177.html

Speed up R language calculation using Openblas in Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.