Skip to content

Commit

Permalink
Add OPENBLAS_NO_F2C math library option
Browse files Browse the repository at this point in the history
  • Loading branch information
johngebbie committed Dec 4, 2022
1 parent 93ef001 commit 5f70761
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/configure
Original file line number Diff line number Diff line change
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

0 comments on commit 5f70761

Please sign in to comment.