Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPENBLAS_NO_F2C math library option #5

Open
wants to merge 1 commit into
base: vosk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/configure
Expand Up @@ -834,7 +834,7 @@ auto_lib= # Deduced lib name, used when $MATHLIB is not set.

# Validate the (optionally) provided MATHLIB value.
case $MATHLIB in
''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK) : ;;
''|ATLAS|CLAPACK|MKL|OPENBLAS|OPENBLAS_CLAPACK|OPENBLAS_NO_F2C) : ;;
*) failure "Unknown --mathlib='${MATHLIB}'. Supported libs: ATLAS CLAPACK MKL OPENBLAS" ;;
esac

Expand Down Expand Up @@ -1301,7 +1301,7 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
esac >> kaldi.mk

echo "Successfully configured for Linux with OpenBLAS from $OPENBLASROOT"
elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
elif [ "$MATHLIB" == "OPENBLAS_CLAPACK" ] || [ "$MATHLIB" == "OPENBLAS_NO_F2C" ]; then
if [[ ! $OPENBLASROOT ]]; then
# Either the user specified --mathlib=OPENBLAS or we've autodetected the
# system where OpenBLAS is the preferred option (the parser for
Expand Down Expand Up @@ -1345,7 +1345,11 @@ or try another math library, e.g. --mathlib=OPENBLAS (Kaldi may be slower)."
OPENBLASINCDIR="/usr/include"
fi
echo "Your math library seems to be OpenBLAS from $OPENBLASROOT. Configuring appropriately."
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
if [ "$MATHLIB" == "OPENBLAS_CLAPACK" ]; then
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a"
else
OPENBLASLIBS="-L$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a"
fi
echo "OPENBLASINC = $OPENBLASINCDIR" >> kaldi.mk
echo "OPENBLASLIBS = $OPENBLASLIBS" >> kaldi.mk
echo >> kaldi.mk
Expand Down