-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build,scripts] Make OpenBLAS install check for gfortran; documentati…
…on fix (#3507)
- Loading branch information
Showing
3 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# OpenBLAS is downloaded and built by tools/Makefile, but not automatically by | ||
# its default 'all' target. | ||
make -j openblas | ||
|
||
OPENBLAS_VERSION=0.3.5 | ||
|
||
set -e | ||
|
||
if ! command -v gfortran 2>/dev/null; then | ||
echo "$0: gfortran is not installed. Please install it, e.g. by:" | ||
echo " apt-get install gfortran" | ||
echo "(if on Debian or Ubuntu), or:" | ||
echo " yum install fortran" | ||
echo "(if on RedHat/CentOS). On a Mac, if brew is installed, it's:" | ||
echo " brew install gfortran" | ||
exit 1 | ||
fi | ||
|
||
|
||
rm -rf xianyi-OpenBLAS-* OpenBLAS | ||
|
||
wget -t3 -nv -O- $(wget -qO- "https://api.github.com/repos/xianyi/OpenBLAS/releases/tags/v${OPENBLAS_VERSION}" | python -c 'import sys,json;print(json.load(sys.stdin)["tarball_url"])') | tar xzf - | ||
|
||
mv xianyi-OpenBLAS-* OpenBLAS | ||
|
||
make PREFIX=$(pwd)/OpenBLAS/install USE_THREAD=0 -C OpenBLAS all install |