Opened 4 years ago

Closed 13 months ago

#21736 closed enhancement (duplicate)

Offer openblas's lapack to programs run under Sage

Reported by: charpent Owned by:
Priority: trivial Milestone: sage-duplicate/invalid/wontfix
Component: numerical Keywords:
Cc: fbissey, dimpase Merged in:
Authors: Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: u/charpent/offer_openblas_s_lapack_to_programs_run_under_sage (Commits, GitHub, GitLab) Commit: cb5df83339637bc894b3c328ee9dcc381daf3fe2
Dependencies: Stopgaps:

Status badges

Description

Rationale : Openblas offers LAPACK, but there is no lapack.so file available in the current installation. Programs called by (something in) Sage can't use it.

Case in point : jags (an MCMC sampler of some use to Bayesian users of R) doesn't install under the Sage shell ; however, this is necessary : a system installation called from Sage (i. e. from Sage's R) will detect a conflict between system's LAPACK and Sage's Openblas.

The simple expedient of linking libopenblas.so to liblapack.so in $SAGE_ROOT is suffocient for installing and using JAGS.

Plan : patch Openblas' spkg-install to create this link.

Timetable : whenever I can recreate a distinct Sage installation for creation of a "clean" patch (i. e. not on the next few days...).

Change History (7)

comment:1 Changed 4 years ago by charpent

  • Branch set to u/charpent/offer_openblas_s_lapack_to_programs_run_under_sage

comment:2 Changed 4 years ago by charpent

  • Cc fbissey added
  • Commit set to cb5df83339637bc894b3c328ee9dcc381daf3fe2
  • Status changed from new to needs_review

Builds OK. Passes ptestlong with two transient failures (both tests pass when run standalone) :

----------------------------------------------------------------------
sage -t --long --warn-long 97.7 src/sage/homology/simplicial_complex.py  # 1 doctest failed
sage -t --long --warn-long 97.7 src/sage/matrix/matrix_integer_dense.pyx  # Timed out (and interrupt failed)
----------------------------------------------------------------------
Total time for all tests: 3819.2 seconds
    cpu time: 17189.6 seconds
    cumulative wall time: 20998.4 seconds
Makefile:112 : la recette pour la cible « ptestlong » a échouée
make: *** [ptestlong] Erreur 5

real	128m40,205s
user	683m11,124s
sys	76m18,572s
charpent@asus16-ec:/usr/local/sage-exp$ sage -t --long --warn-long 97.7 src/sage/homology/simplicial_complex.py  # 1 doctest failed
Running doctests with ID 2016-10-21-09-52-12-a6e288e2.
Git branch: mabranche
Using --optional=database_gap,mpir,python2,sage
Doctesting 1 file.
sage -t --long --warn-long 97.7 src/sage/homology/simplicial_complex.py
    [588 tests, 5.88 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 6.1 seconds
    cpu time: 3.1 seconds
    cumulative wall time: 5.9 seconds
charpent@asus16-ec:/usr/local/sage-exp$ sage -t --long --warn-long 97.7 src/sage/matrix/matrix_integer_dense.pyx  # Timed out (and interrupt failed)
Running doctests with ID 2016-10-21-09-52-35-de03d437.
Git branch: mabranche
Using --optional=database_gap,mpir,python2,sage
Doctesting 1 file.
sage -t --long --warn-long 97.7 src/sage/matrix/matrix_integer_dense.pyx
    [573 tests, 13.34 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 13.5 seconds
    cpu time: 23.3 seconds
    cumulative wall time: 13.3 seconds

Forgot to add : the same patch in another private branch allows the normal use of LAPACK : jags buils and runs fine.

==> needs_review


New commits:

cb5df83Trivially symlink liblapack.so to libopenblas.so.
Last edited 4 years ago by charpent (previous) (diff)

comment:3 Changed 13 months ago by mkoeppe

  • Cc dimpase added

Is this ticket still relevant?

comment:4 Changed 13 months ago by dimpase

I guess not, our (or system) lapack.pc should take care of this.

comment:5 Changed 13 months ago by mkoeppe

  • Milestone changed from sage-7.5 to sage-duplicate/invalid/wontfix

comment:6 Changed 13 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

comment:7 Changed 13 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.