[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OpenBlas Pthread issue with R

> 1) We provide extra shared objects, libopenblasp, libopenblaso, etc
>    and let R link against libopenblaso (o=openmp)
>    Drawback: too ugly and makes the blas ecosystem overly complex.
>    Also breaks the alternative mechanism
> 2) Add RPATH=/usr/lib/<..>/blas-pthread/ to all the corresponding
>    ELFs of R.
>    Drawback: ELFs of external packages might be linked against
>    libblas.so.3 without RPATH.
> 3) ...

3) export LD_PRELOAD=/usr/lib/<..>/blas-pthread/ in the /usr/bin/R

   This may look ungraceful, but if /usr/bin/R is the only entrance
   for normal R users, this LD_PRELOAD var may help override the
   libblas.so.3 required by all the ELF binaries.

For us the BLAS/LAPACK maintainers, creating the following new
alternative groups should be relatively easy:

* /usr/lib/<triplet>/blas-pthread/libblas.so.3: candidates are
  + libopenblas0-pthread
  + libblis3-pthread
  + netlib (fallback)

* /usr/lib/<triplet>/blas-openmp/libblas.so.3: canddiates are
  + libopenblas0-openmp
  + libblis3-openmp
  + netlib (fallback)

* /usr/lib/<triplet>/blas-serial/libblas.so.3: candidates are
  + libopenblas0-serial
  + libblis3-serial
  + netlib (fallback)
Because we won't have to build new shared objects, or to introduce new

Reply to: