ropenblas

ropenblas: Download, Compile and Link OpenBLAS Library with R - Published in JOSS (2021)

https://github.com/prdm0/ropenblas

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

Package to link R language to OpenBLAS library

Basic Info
Statistics
  • Stars: 50
  • Watchers: 1
  • Forks: 5
  • Open Issues: 3
  • Releases: 3
Created over 6 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License

README.Rmd

---
title: "Download, Compile and Link OpenBLAS Library with R"
author: |
  |
  |
  |
  | **Package website**: ****
  |
  | **Summary**
output: 
  bookdown::github_document2:
    number_sections: false
    toc: true
    toc_depth: 2
toccolor: 'blue'
editor_options: 
  markdown: 
    wrap: 72
---

**ropenblas package**

[![DOI](https://joss.theoj.org/papers/10.21105/joss.02769/status.svg)](https://doi.org/10.21105/joss.02769)
[![Travis build status](https://travis-ci.com/prdm0/ropenblas.svg?branch=master)](https://travis-ci.com/prdm0/ropenblas)
[![last](https://www.r-pkg.org/badges/last-release/ropenblas)](https://CRAN.R-project.org/package=ropenblas)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ropenblas)](https://CRAN.R-project.org/package=ropenblas)
[![total](http://cranlogs.r-pkg.org/badges/grand-total/ropenblas)](https://CRAN.R-project.org/package=ropenblas)
[![month](https://cranlogs.r-pkg.org/badges/ropenblas)](https://CRAN.R-project.org/package=ropenblas)







# General aspects

The [**ropenblas**](https://prdm0.github.io/ropenblas/) is a package
designed to facilitate the linking of the library
[**OpenBLAS**](https://www.openblas.net/) with the language
[**R**](https://www.r-project.org/). The package, which works only for
Linux systems, will automatically download the latest source code from
the [**OpenBLAS**](https://www.openblas.net/) library and compile the
code. The package will automatically bind the language
[**R**](https://www.r-project.org/), through the `ropenblas()` function,
to use the [**OpenBLAS**](https://www.openblas.net/) library. Everything
will be done automatically regardless of the Linux distribution you are
using.

You can also specify older versions of the
[**OpenBLAS**](https://www.openblas.net/) library. Automatically, if no
version is specified, the
[**ropenblas**](https://prdm0.github.io/ropenblas/) package will
consider the latest version of the library
[**OpenBLAS**](https://www.openblas.net/).

Considering using the [**OpenBLAS**](https://www.openblas.net/) library
rather than the [**BLAS**](http://www.netlib.org/blas/) may bring extra
optimizations for your code and improved computational performance for
your simulations, since [**OpenBLAS**](https://www.openblas.net/) is an
optimized implementation of the library
[**BLAS**](http://www.netlib.org/blas/).

Some of the reasons why it is convenient to link
[**R**](https://www.r-project.org/) language to the use of
[**BLAS**](http://www.netlib.org/blas/) optimized alternatives can be
found [**here**](https://csantill.github.io/RPerformanceWBLAS/). Several
other [**benchmarks**](https://en.wikipedia.org/wiki/Benchmarking) that
point to improved computing performance by considering the library
[**OpenBLAS**](https://www.openblas.net/) can be found on the internet.

The ropenblas package, by `rcompiler()` function is also useful if you
want to install different versions of the
[**R**](https://www.r-project.org/) language. The different versions,
specified by the user of the [**R**](https://www.r-project.org/)
language, will be compiled and will also be linked to the
[**OpenBLAS**](https://www.openblas.net/) library. If you want to switch
between compiled versions of the [**R**](https://www.r-project.org/)
language, no compilation is needed anymore. This allows you to avoid
having to get your hands dirty with tedious operating system settings,
regardless of your GNU/Linux distribution. Another great use of the
`rcompiler()` function is that you will not be dependent on updating
your GNU/Linux distribution repositories and you can always have the
latest version of the [**R**](https://www.r-project.org/) language.

The use of the ropenblas package will return warnings that help you
proceed with the use of the functions. If your internet is not working
or if any dependency on the operating system is not present, the package
will let you know.

# Advantages of using ropenblas package

Some advantages of using the
[**ropenblas**](https://prdm0.github.io/ropenblas/) library:

-   Everything is done within the [**R**](https://www.r-project.org/)
    language;

-   The procedure will be the same for any Linux distribution;

-   The [**OpenBLAS**](https://www.openblas.net/) library will be
    compiled and you will choose which build version to bind to
    [**R**](https://www.r-project.org/), regardless of your Linux
    distribution;

-   If your GNU/Linux distribution does not have updated versions of
    [**OpenBLAS**](https://www.openblas.net/), it matters little. The
    ropenblas package fetches the latest stable release of the
    [**OpenBLAS**](https://www.openblas.net/) library development
    account on GitHub;

-   You do not need to know Linux well. In some distributions, it may
    not be so simple for a less experienced user to compile and link the
    library to the [**OpenBLAS**](https://www.openblas.net/) library
    with the [**R**](https://www.r-project.org/) language;

-   It is much easier to direct a person to link
    [**OpenBLAS**](https://www.openblas.net/) with
    [**R**](https://www.r-project.org/) saying "run `ropenblas()` within
    [**R**](https://www.r-project.org/)" than asking that person to
    verify that an unoptimized version of
    [**BLAS**](http://www.netlib.org/blas/) installed on the system.
    Then you have to guide the removal of the unoptimized version of
    [**BLAS**](http://www.netlib.org/blas/) and guide it to the
    installation of the library
    [**OpenBLAS**](https://www.openblas.net/) through the most diverse
    procedures depending on the GNU/Linux distribution used;



-   With the `rcompiler()` function you can build any version of
    [**R**](https://www.r-project.org/) into your computer architecture,
    which includes the most stable version of the language;

-   What is the latest stable version of
    [**R**](https://www.r-project.org/)? Are you too lazy to go to the
    [**R**](https://www.r-project.org/) site? Run
    `ropenblas::last_version_r(major = NULL)`.

# Dependencies

You must install the following dependencies on your operating system
(Linux):

1 - **GNU Make**: GNU Make utility to maintain groups of programs; 
2 - **GNU GCC Compiler (C and Fortran)**: The GNU Compiler Collection - C and Fortran frontends. Do not worry that you will be notified if any of these dependencies are not installed. # Installation Installing the [**ropenblas**](https://prdm0.github.io/ropenblas/) library is easy and will require you to have installed the **devtools** package. This will allow you to install the [**ropenblas**](https://prdm0.github.io/ropenblas/) package directly from GitHub. To install, after installing the **devtools** package, do: remotes::install_github(repo = "prdm0/ropenblas", force = TRUE) or install.packages("ropenblas") # Use The [**ropenblas**](https://prdm0.github.io/ropenblas/) package currently provides five functions: `ropenblas()`, `rcompiler()`, `last_version_openblas()`, `last_version_r()`, `link_again()` and `rnews()`. First of all, do: library(ropenblas) ## 'ropenblas' function Installing, compiling, and linking the [**OpenBLAS**](https://www.openblas.net/) version **0.3.13** library to the [**R**](https://www.r-project.org/) language: ```{r, fig.align='center', echo=FALSE} knitr::include_graphics(path = "https://raw.githubusercontent.com/prdm0/ropenblas/bce920c05f8daa13fc6568e6797d4b841e9d43ce/img/asciicast/ropenblas.svg") ``` ## 'last_version_r' function Given the higher version, the function will return the latest stable version of the [**R**](https://www.r-project.org/) language. See the following example: ```{r, echo=FALSE} knitr::include_graphics(path = "https://raw.githubusercontent.com/prdm0/ropenblas/bce920c05f8daa13fc6568e6797d4b841e9d43ce/img/asciicast/last_version_r.svg") ``` ## 'last_version_openblas' function The `last_version_openblas()` function automatically searches [**OpenBLAS**](https://www.openblas.net/) library versions in the official [**GitHub**](https://github.com/xianyi/OpenBLAS) project. ```{r, echo=FALSE} knitr::include_graphics(path = "https://raw.githubusercontent.com/prdm0/ropenblas/bce920c05f8daa13fc6568e6797d4b841e9d43ce/img/asciicast/last_version_openblas.svg") ``` ## 'rcompiler' function This function is responsible for compiling a version of the [**R**](https://www.r-project.org/) language. The `x` argument is the version of [**R**](https://www.r-project.org/) that you want to compile. For example, `x = "4.0.4"` will compile and link **R-4.0.4** version as the major version on your system. By default (`x = NULL`) will be compiled the latest stable version of the [**R**](https://www.r-project.org/). For example, to compile the latest stable version of the [**R**](https://www.r-project.org/) language, do: ```{r, echo=FALSE} knitr::include_graphics(path = "https://raw.githubusercontent.com/prdm0/ropenblas/bce920c05f8daa13fc6568e6797d4b841e9d43ce/img/asciicast/rcompiler.svg") ``` Regardless of your GNU/Linux distribution and what version of [**R**](https://www.r-project.org/) is in your repositories, you can have the latest stable version of the [**R**](https://www.r-project.org/) language compiled into your computer architecture. You can use the `rcompiler()` function to compile different versions of [**R**](https://www.r-project.org/). For example, running `rcompiler(x = "3.6.3")` and `rcompiler()` will install versions 3.6.3 and 4.0.0 on its GNU/Linux distribution, respectively. If you are in version 4.0.0 of [**R**](https://www.r-project.org/) and run the code `rcompiler(x = "3.6.3")` again, the function will identify the existence of version 3.6.3 in the system and give you the option to use the binaries that were built in a previous compilation. This avoids unnecessarys compilations. ## 'link_again' function The `link_again` function links again the [**OpenBLAS**](https://www.openblas.net/) library with the [**R**](https://www.r-project.org/) language, being useful to correct problems of untying the [**OpenBLAS**](https://www.openblas.net/) library that is common when the operating system is updated. The function `link_again` be able to link again the [**R**](https://www.r-project.org/) language with the [**OpenBLAS**](https://www.openblas.net/) library. Thus, link_again will only make the relinkagem when in some previous section of [**R**](https://www.r-project.org/) the ropenblas function has been used for the initial binding of the [**R**](https://www.r-project.org/) language with the [**OpenBLAS**](https://www.openblas.net/) library. For example, to relink the [**OpenBLAS**](https://www.openblas.net/) library with the [**R**](https://www.r-project.org/) language, do: ```{r, echo=FALSE} knitr::include_graphics(path = "https://raw.githubusercontent.com/prdm0/ropenblas/bce920c05f8daa13fc6568e6797d4b841e9d43ce/img/asciicast/link_again.svg") ``` If `restart_r = TRUE` (default), a new section of [**R**](https://www.r-project.org/) is started after linking the [**OpenBLAS**](https://www.openblas.net/) library. In situations where there was a disconnection due to an update of the operating system, the `ropenblas` function can be used to relink the [**OpenBLAS**](https://www.openblas.net/) library with the [**R**](https://www.r-project.org/) language, however, it will be necessary to compile the [**OpenBLAS**](https://www.openblas.net/) library again. If you are interested in recompiling the [**OpenBLAS**](https://www.openblas.net/) library and linking with [**R**](https://www.r-project.org/), use the `ropenblas` function. If the interest is to take advantage of a previous compilation of the [**OpenBLAS**](https://www.openblas.net/) library, the function `link_again` may be useful. ## 'rnews' function Returns the contents of the [**NEWS.html**](https://cran.r-project.org/doc/manuals/r-release/NEWS.html) file in the standard browser installed on the operating system. The [**NEWS.html**](https://cran.r-project.org/doc/manuals/r-release/NEWS.html) file contains the main changes from the recently released versions of the [**R**](https://www.r-project.org/) language. The goal is to facilitate the query by invoking it directly from the [**R**](https://www.r-project.org/) command prompt. The rnews function is analogous to the news function of the utils package. However, using the news command in a terminal style bash shell is possible to receive a message like: > news() starting httpd help server ... done Error in browseURL(url) : 'browser' must be a non-empty character string If `pdf = FALSE` (default), the [**NEWS.html**](https://cran.r-project.org/doc/manuals/r-release/NEWS.html) file will open in the browser, otherwise [**NEWS.pdf**](https://cran.r-project.org/doc/manuals/r-release/NEWS.pdf) will be opened. If `dev = FALSE` (default), it will not show changes made to the language development version. To see changes in the development version, do `dev = TRUE`.

Owner

  • Name: Pedro Rafael
  • Login: prdm0
  • Kind: user
  • Location: Joao Pessoa, Brazil
  • Company: UFPB

Dr. in Statistics and R Language Enthusiast

JOSS Publication

ropenblas: Download, Compile and Link OpenBLAS Library with R
Published
March 31, 2021
Volume 6, Issue 59, Page 2769
Authors
Pedro Rafael Diniz Marinho ORCID
Department of Statistics, Federal University of Paraíba, João Pessoa, Paraíba - PB, Brazil
Editor
Tim Tröndle ORCID
Tags
Compiling R and OpenBLAS Link OpenBLAS Switch between versions of R Fast algebraic computing

GitHub Events

Total
  • Watch event: 1
  • Push event: 4
Last Year
  • Watch event: 1
  • Push event: 4

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 401
  • Total Committers: 3
  • Avg Commits per committer: 133.667
  • Development Distribution Score (DDS): 0.005
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Pedro Rafael p****o@g****m 399
Kristen Thyng k****g@g****m 1
Enes Ahmeti e****i@j****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 22
  • Total pull requests: 18
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 18
  • Total pull request authors: 4
  • Average comments per issue: 3.55
  • Average comments per pull request: 0.06
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • waynelapierre (5)
  • sabato96 (1)
  • sixvable (1)
  • vikram-rawat (1)
  • chrisdane (1)
  • llrs (1)
  • paradigmfellow (1)
  • IdoBar (1)
  • kmiddleton (1)
  • mvt-oviedo (1)
  • ghost (1)
  • pratikvn (1)
  • bgerzoff (1)
  • JBGruber (1)
  • lolow (1)
Pull Request Authors
  • prdm0 (14)
  • IdoBar (2)
  • kthyng (1)
  • KryeKuzhinieri (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 513 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 14
  • Total maintainers: 1
cran.r-project.org: ropenblas

Download, Compile and Link 'OpenBLAS' Library with R

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 513 Last month
Rankings
Stargazers count: 8.3%
Forks count: 14.9%
Average: 22.5%
Downloads: 24.1%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.1.0 depends
  • RCurl * imports
  • XML * imports
  • cli * imports
  • fs * imports
  • getPass * imports
  • git2r * imports
  • glue * imports
  • magrittr * imports
  • pingr * imports
  • rlang * imports
  • rstudioapi * imports
  • rvest * imports
  • stringr * imports
  • withr * imports