I am trying to build an R module linking statically OpenBLAS:
mypkg/
├── DESCRIPTION
├── NAMESPACE
├── R/
│ ├── check_openblas.R
│ ├── my_interface.R
│ └── openblas_init.R
├── inst/
│ └── libs/
│ ├── linux/
│ │ └── libopenblas.a
│ └── windows/
│ └── libopenblas.a
└── src/
├── Makevars
├── Makevars.win
├── Makevars.macos
└── openblas_probe.c
For now I am only testing on linux. Makevars contains:
PKG_LIBS = ../inst/libs/linux/libopenblas.a -lpthread -lm
and libopenblas.a built as
make BINARY=64 USE_OPENMP=1 NO_SHARED=1
Also, openblas_probe.c contains a call to "openblas_get_config()".
However, after loading my package succesfully into R and performing linear algebra operations, I can see only one core being used. Also,
> sessionInfo()$BLAS
[1] "/usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3"
Keeps returning the default BLAS.
I would greatly appreciate your help in understanding what is wrong with this idea, or how I could make it work.
lang-r
flexiblasis implemented for ideas, or end up simply using it. From authors ofsimmer. And if you can get it working on Windows, they might adopt you.