Skip to content

Commit

Permalink
sagemathgh-36671: build/pkgs/openblas: Stop openblas from using expli…
Browse files Browse the repository at this point in the history
…cit `make -j N`; but use `make -j 1` on `ubuntu-trusty`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
OpenMathLib/OpenBLAS#828

<!-- Why is this change required? What problem does it solve? -->
Fixes part of
sagemath#34899 (comment)

Tests at https://github.com/mkoeppe/sage/actions/runs/6779033300:
openblas finishes successfully in https://github.com/mkoeppe/sage/action
s/runs/6779033300/job/18425453802#step:11:3863
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36671
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri, Matthias Köppe
  • Loading branch information
Release Manager committed Nov 12, 2023
2 parents 405e166 + 6d1a957 commit a0872be
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build/pkgs/openblas/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ fi

echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE"

if $MAKE --version | grep -q -F '3.81'; then
# Work around https://savannah.gnu.org/bugs/?15919
OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=1"
else
# Do not emit "-j" options; use jobserver
OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0"
fi

# Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256
OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1"

if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then
if ! (sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE); then
if [[ $OPENBLAS_CONFIGURE == *"TARGET"* ]]; then
sdh_die "Error building OpenBLAS"
else
Expand All @@ -47,7 +55,7 @@ if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then
echo "Error building OpenBLAS"
echo "Retrying building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE"
sdh_make clean
sdh_make libs netlib shared $OPENBLAS_CONFIGURE
sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE
fi
fi

Expand Down

0 comments on commit a0872be

Please sign in to comment.