Skip to content

OpenBLAS - alterations for TARGET #23272

@thecaligarmo

Description

@thecaligarmo

On purchasing a new laptop, I attempted to MAKE sage as I normally have and ran into the following error:

Error building Sage. 

The following package(s) may have failed to build (not necessarily during this run of 'make all'):

* package: openblas-0.2.19.p0 
  log file: /sage/sage/logs/pkgs/openblas-0.2.19.p0.log
  build directory: /sage/sage/local/var/tmp/sage/build/openblas-0.2.19.p0

The error seemed to be really coming from:

make[3]: *** [getarch_2nd] Error 1
Makefile:123: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail..  Stop.
make[3]: Leaving directory '/sage/sage/local/var/tmp/sage/build/openblas-0.2.19.p0/src'
Error building OpenBLAS

It turned out that this error has been seen multiple times in Sage:

etc.

I noticed that updating the config (as mentioned in the threads above) accurately solved the problem, but I wanted to try and fix the problem head on rather than just temporarily solve it. With that in mind, I conversed with the OpenBLAS people:
OpenMathLib/OpenBLAS#1204
and they suggested I update the cpu file for the build, which I have included.

Additionally, I wanted to fix this problem for future users and thus I wanted to add a fail-safe for the code so that if this error happens again, then we automatically try the TARGET=ATOM method. But, I want to create this with the caveat that a user can change the method.

Before finalizing these changes, we should note a few things, but as I've not worked that long with sage I don't know how to address them. In essence:

  • Are the changes I made appropriate for the make?
  • I'm adding documentation on this as there is no documentation.
  • There was questions on why we have "p0" at the end of our version? I assume this is from the patch, but I don't know.
  • The programmer suggested we change the " top level option to use -lblas (debian/ubuntu) -lopenblas (suse/fedora/epel)". I don't know what that means in regards to us, but figured someone might be able to answer this question and maybe we can ensure this is happening.

If there are any questions feel free to ask, and if you believe this is not necessarily or if something else is better practice, let me know. I've never done a bash alteration so not sure what the details for that.

The tarball is here https://github.com/xianyi/OpenBLAS/archive/v0.2.20.tar.gz
(using the browser to download it will give it correct name)

CC: @jpflori @vbraun @jdemeyer @mo271

Component: packages: standard

Keywords: openblas

Author: Aram Dermenjian

Branch: 895b48f

Reviewer: Volker Braun, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/23272

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy