Skip to content

Commit 1c33e67

Browse files
committed
Default PETSc BLAS/LAPACK to vecLib on macOS
1 parent 419a3b2 commit 1c33e67

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

autoibamr.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,11 @@ IBAMR_VERSION=0.19.0
140140
JOBS=1
141141
NATIVE_OPTIMIZATIONS=OFF
142142
NATIVE_OPTIMIZATION_FLAGS="-march=native"
143-
PETSC_LAPACK_LIBRARY=openblas
144-
PETSC_LAPACK_LIBRARY_USER_SET=OFF
143+
if [ "$(guess_ostype)" = "macos" ]; then
144+
PETSC_LAPACK_LIBRARY=veclib
145+
else
146+
PETSC_LAPACK_LIBRARY=openblas
147+
fi
145148
PREFIX=~/autoibamr
146149
USER_PREFIX_SET=OFF
147150
USER_INTERACTION=ON
@@ -308,12 +311,10 @@ while [ -n "$1" ]; do
308311
--lapack-library)
309312
shift
310313
PETSC_LAPACK_LIBRARY="${1}"
311-
PETSC_LAPACK_LIBRARY_USER_SET=ON
312314
;;
313315

314316
--lapack-library=*)
315317
PETSC_LAPACK_LIBRARY="${param#*=}"
316-
PETSC_LAPACK_LIBRARY_USER_SET=ON
317318
;;
318319

319320
#####################################
@@ -444,11 +445,6 @@ if [ -z "${PLATFORM_OSTYPE}" ]; then
444445
exit 1
445446
fi
446447

447-
# Default PETSc BLAS/LAPACK backend to Apple's vecLib on macOS.
448-
if [ "${PLATFORM_OSTYPE}" = "macos" ] && [ "${PETSC_LAPACK_LIBRARY_USER_SET}" = "OFF" ]; then
449-
PETSC_LAPACK_LIBRARY=veclib
450-
fi
451-
452448
# Guess dynamic shared library file extension -> LDSUFFIX
453449
if [ ${PLATFORM_OSTYPE} == "linux" ]; then
454450
LDSUFFIX=so

0 commit comments

Comments
 (0)