fix openblas installs

This commit is contained in:
edoapra 2023-11-14 22:06:36 -08:00
parent af17d8e045
commit 271dc07a6b
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0
2 changed files with 9 additions and 3 deletions

View file

@ -100,6 +100,9 @@ echo DISTR is "$DISTR"
fi
if [[ "$BLAS_ENV" == "brew_openblas" ]]; then
brew install openblas
if [ -z "$HOMEBREW_PREFIX" ] ; then
HOMEBREW_PREFIX=/usr/local
fi
PKG_CONFIG_PATH=$HOMEBREW_PREFIX/opt/openblas/lib/pkgconfig pkg-config --libs openblas
fi
# if [[ "$MPI_IMPL" == "openmpi" ]]; then
@ -131,9 +134,6 @@ if [[ "$os" == "Linux" ]]; then
which mpif90
mpif90 -show
else
if [[ "$BLAS_ENV" == "lib*openblas*" ]]; then
$MYSUDO apt-get install -y $BLAS_ENV
fi
if [[ "$MPI_IMPL" == "openmpi" ]]; then
mpi_bin="openmpi-bin" ; mpi_libdev="libopenmpi-dev" scalapack_libdev="libscalapack-openmpi-dev"
fi
@ -169,6 +169,9 @@ if [[ "$os" == "Linux" ]]; then
if [[ "$USE_LIBXC" == "-1" ]]; then
pkg_extra+=" libxc-dev"
fi
if [[ "$BLAS_ENV" == "lib*openblas*" ]]; then
pkg_extra+=" $BLAS_ENV"
fi
echo pkg to install: gfortran python3-dev make perl python3 rsync $mpi_libdev $mpi_bin $pkg_extra
tries=0 ; until [ "$tries" -ge 10 ] ; do \
$MYSUDO apt-get -y install gfortran python3-dev make perl python3 rsync $mpi_libdev $mpi_bin $pkg_extra \

View file

@ -139,6 +139,9 @@ elif [[ "$BLAS_ENV" == lib*openblas* ]] || [[ "$BLAS_ENV" == "brew_openblas" ]];
myob="openblas"
fi
if [[ "$BLAS_ENV" == "brew_openblas" ]]; then
if [ -z "$HOMEBREW_PREFIX" ] ; then
HOMEBREW_PREFIX=/usr/local
fi
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOMEBREW_PREFIX/opt/openblas/lib/pkgconfig
fi
export BLASOPT=$(pkg-config --libs $myob)