Browse code

Disable threading when flexiblas is found

Ben Bolstad authored on 25/02/2021 00:52:20
Showing 3 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: preprocessCore
2
-Version: 1.53.1
2
+Version: 1.53.2
3 3
 Title: A collection of pre-processing functions
4 4
 Author: Ben Bolstad <bmb@bmbolstad.com>
5 5
 Maintainer: Ben Bolstad <bmb@bmbolstad.com>
... ...
@@ -3338,6 +3338,17 @@ if test "x$use_pthread_stack_min" = xno; then
3338 3338
 fi
3339 3339
 
3340 3340
 
3341
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if R is using flexiblas" >&5
3342
+$as_echo_n "checking if R is using flexiblas... " >&6; }
3343
+BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS`
3344
+if echo "${BLAS_LIBS}" | grep flexiblas > /dev/null; then
3345
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: flexiblas found. preprocessCore specific threading will be disabled" >&5
3346
+$as_echo "flexiblas found. preprocessCore specific threading will be disabled" >&6; }
3347
+    use_pthreads=no
3348
+else
3349
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: flexiblas not found. preprocessCore threading will not be disabled" >&5
3350
+$as_echo "flexiblas not found. preprocessCore threading will not be disabled" >&6; }
3351
+fi
3341 3352
 
3342 3353
 # Check whether --enable-threading was given.
3343 3354
 if test "${enable_threading+set}" = set; then :
... ...
@@ -55,7 +55,14 @@ if test "x$use_pthread_stack_min" = xno; then
55 55
 fi
56 56
 
57 57
 
58
-
58
+AC_MSG_CHECKING([if R is using flexiblas])
59
+BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS`
60
+if echo "${BLAS_LIBS}" | grep flexiblas > /dev/null; then
61
+    AC_MSG_RESULT([flexiblas found. preprocessCore specific threading will be disabled])
62
+    use_pthreads=no
63
+else
64
+    AC_MSG_RESULT([flexiblas not found. preprocessCore threading will not be disabled])
65
+fi
59 66
 
60 67
 AC_ARG_ENABLE([threading],
61 68
 	AS_HELP_STRING([--disable-threading],[Disable threading]))