Download, Compile and Link 'OpenBLAS' Library with R
The 'ropenblas' package (<https://prdm0.github.io/ropenblas/>) is useful for users of any 'GNU/Linux' distribution. It will be possible to download, compile and link the 'OpenBLAS' library (<https://www.openblas.net/>) with the \R language, always by the same procedure, regardless of the 'GNU/Linux' distribution used. With the 'ropenblas' package it is possible to download, compile and link the latest version of the 'OpenBLAS' library (<https://www.openblas.net/>) even the repositories of the 'GNU/Linux' distribution used do not include the latest versions of 'OpenBLAS' (<https://www.openblas.net/>). If of interest, older versions of the 'OpenBLAS' library (<https://www.openblas.net/>) may be considered. Linking \R with an optimized version of 'BLAS' (<http://www.netlib.org/blas/>) may improve the computational performance of \R code. The 'OpenBLAS' library (<https://www.openblas.net/>) is an optimized implementation of 'BLAS' (<http://www.netlib.org/blas/>) that can be easily linked to \R with the 'ropenblas' package.
The ropenblas is a package designed to facilitate the linking of the library OpenBLAS with the language R. The package, which works only for Linux systems, will automatically download the latest source code from the OpenBLAS library and compile the code. The package will automatically bind the language R to use the OpenBLAS library. Everything will be done automatically regardless of the Linux distribution you are using.
Considering using the OpenBLAS library rather than the BLAS may bring extra optimizations for your code and improved computational performance for your simulations, since OpenBLAS is an optimized implementation of the library BLAS.
Some of the reasons why it is convenient to link R language to the use of BLAS optimized alternatives can be found here. Several other benchmarks that point to improved computing performance by considering the library OpenBLAS can be found on the internet.
You must install the following dependencies on your operating system (Linux):
1 - make: GNU make utility to maintain groups of programs;
2 - gcc: The GNU Compiler Collection - C and C++ frontends;
3 - gcc-fortran: The GNU Compiler Collection - Fortran frontends.
Installing the ropenblas library is easy and will require you to have installed the devtools package. This will allow you to install the ropenblas package directly from GitHub. To install, after installing the devtools package, do:
devtools::install_github(repo = "prdm0/ropenblas", force = TRUE)
library(ropenblas) ropenblas(x = "0.3.7")
OpenBLAS versions tested: 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6 and 0.3.7. These are the values that will be passed to
Your linux operating system may already be configured to use the OpenBLAS library. Therefore, most likely R will already be linked to this library. To find out if the R language is using the OpenBLAS library, at R, do:
ropenblas() function can identify that the R language is using the version of OpenBLAS you wish to configure, a warning message will be returned asking if you really would like to proceed with the configuration again.
ropenblas() function will download the desired version of the library OpenBLAS, compile and install the library in the
/opt directory of your operational system. If the directory does not exist, it will be created so that the installation can be completed. Subsequently, files from the version of BLAS used in R will be symbolically linked to the shared object files of the library version OpenBLAS compiled and installed in
You must be the operating system administrator to use this library. Therefore, do not attempt to use it without telling your system administrator. If you have the ROOT password, you will be responsible for everything you do on your operating system.
Some advantages of using the ropenblas library:
Everything is done within the R language;
The procedure will be the same for any Linux distribution;
If your GNU/Linux distribution does not have updated versions of OpenBLAS, it matters little. The ropenblas package fetches the latest stable release of the OpenBLAS library development account on GitHub;
It is much easier to direct a person to link OpenBLAS with R saying "run
ropenblas()within R" than asking that person to verify that an unoptimized version of BLAS installed on the system. Then you have to guide the removal of the unoptimized version of BLAS and guide it to the installation of the library OpenBLAS through the most diverse procedures depending on the GNU/Linux distribution used;
As stated earlier, the procedure works for any Linux and this includes Android. If your Android is capable of running privileged commands (ROOT) and if you have R installed via Termux with the required dependencies, you can compile and link OpenBLAS with R using ropenblas.
Functions in ropenblas
|ropenblas||Download, Compile and Link OpenBLAS Library with R|
Last month downloads
|URL||(GitHub Project) https://github.com/prdm0/ropenblas|
|SystemRequirements||make, gcc compiler suite (C and Fortran)|
|Packaged||2019-11-28 16:44:15 UTC; pedro|
|Date/Publication||2019-12-02 15:30:02 UTC|
Include our badge in your README