[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43246] On Mac, should use the Accelerate BLAS

From: anonymous
Subject: [Octave-bug-tracker] [bug #43246] On Mac, should use the Accelerate BLAS by default
Date: Thu, 18 Sep 2014 07:20:29 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0


                 Summary: On Mac, should use the Accelerate BLAS by default
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 18 Sep 2014 07:20:27 AM UTC
                Category: Configuration and Build System
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Mac OS



The Apple BLAS is several times faster on Apple hardware than OpenBLAS, and
more than 10x faster (on those operations where the BLAS or lapack are used)
than without an external BLAS.

There may have been bugs in the Apple BLAS some time ago, but at this point
its difficult to think of any reason why the default build of octave (or any
other scientific package) would try to provide its own BLAS/lapack instead of
the Apple default.  

The relevant configure line changes (I haven't worked-through what this does
to the makefiles) are "--with-blas='-framework Accelerate' --with-lapack" and
to add "-D__ACCELERATE__" to CPPFLAGS.  

While I'm at it, below is a configure line that builds properly on Mac OS X,
with the BLAS, using gcc (homebrew install), and disabling the libraries that
don't work with octave on Mac OS.  I provide this because it took *days* to
try to get octave to build on the Mac, so the defaults in configure could
definitely be improved:

'CC=/usr/local/bin/gcc-4.9' 'CXX=/usr/local/bin/g++-4.9'\
'CFLAGS=-I/usr/local/include -Ofast -m64 -march=native -mtune=native' \
'CPPFLAGS=-I/usr/local/include -D__ACCELERATE__' \
'F77=/usr/local/bin/gfortran-4.9' 'FFLAGS=-I/usr/local/include -Ofast -m64
-march=native -mtune=native' \
-L/usr/local/lib' \  #note that these link paths ARE necessary
'FLIBS=-lgfortran -lquadmath -lm' \
'--with-framework-carbon' '--without-x' \ #workaround a bug
'LLVM_CONFIG=/usr/local/bin/llvm-config-3.5' \ #or whatever the user has --
its important to try to detect a non-Apple llvm when compiling octave with a
non-Apple compiler
'--with-blas=-framework Accelerate' '--with-lapack' \
'--without-opengl' '--without-fltk' # work around another bug


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]