aboutsummaryrefslogtreecommitdiff
path: root/libraries/OpenBLAS
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/OpenBLAS')
-rw-r--r--libraries/OpenBLAS/OpenBLAS.SlackBuild17
-rw-r--r--libraries/OpenBLAS/README5
2 files changed, 20 insertions, 2 deletions
diff --git a/libraries/OpenBLAS/OpenBLAS.SlackBuild b/libraries/OpenBLAS/OpenBLAS.SlackBuild
index b0773b1259333..5025a75415a16 100644
--- a/libraries/OpenBLAS/OpenBLAS.SlackBuild
+++ b/libraries/OpenBLAS/OpenBLAS.SlackBuild
@@ -17,7 +17,19 @@ if [ -z "$ARCH" ]; then
*) ARCH=$( uname -m ) ;;
esac
fi
-
+EXTRAPARMS=""
+if [ "x`uname -p|grep QEMU|wc -l`" = "x1" ]; then
+ #we are running in a vm with a QEMU cpu. OpenBLAS does not like this
+ EXTRAPARMS="DYNAMIC_ARCH=1"
+ if [ "x$TARGET" = "x" ]; then
+ echo "the cpu is not recognised by OpenBLAS. specify a target cpu"
+ echo "using variable TARGET=targetname"
+ echo "look at TargetList.txt in the source for valid TARGET types."
+ exit 2
+ else
+ EXTRAPARMS=$EXTRAPARMS" TARGET="$TARGET
+ fi
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -44,8 +56,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make
+make $EXTRAPARMS
make \
+ $EXTRAPARMS \
NO_STATIC=1 \
BUILD_RELAPACK=1 \
DESTDIR=$PKG \
diff --git a/libraries/OpenBLAS/README b/libraries/OpenBLAS/README
index f1a444a09eb06..7269fb158c308 100644
--- a/libraries/OpenBLAS/README
+++ b/libraries/OpenBLAS/README
@@ -2,3 +2,8 @@ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
Added symbolic link to install a generic blas library that can be used by
Octave and R.
+OpenBLAS has cpu specific targetted assembly code for speed optimisation.
+If running in a vm with QEMU cpu you need to specify a variable
+TARGET=cpuname to the script where cpuname is one from the list in the
+sourcecode file TargetList.txt
+examples are TARGET=NEHALEM for an Intel i7 or TARGET=ATHLON for AMD Athlon