bugGNU Octave - Bugs: bug #43246, On Mac, should use the Accelerate...

 
 

bug #43246: On Mac, should use the Accelerate BLAS by default

Submitter:  None
Submitted:  Thu 18 Sep 2014 07:20:27 AM UTC
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Invalid Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * Mac OS Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Fri 19 Sep 2014 04:57:01 AM UTC, comment #3: 

  > I'm trying to help you.

Your help is very welcome, but *** PLEASE PLEASE PLEASE ***
Stop using the bug tracker as aforum for discussion, use

   <octave-maintainers@octave.org>

for this kind of discussion.

Carlo de Falco <cdf>
Project Member
Thu 18 Sep 2014 08:35:14 PM UTC, comment #2: 

Results of make check with Apple BLAS:

Summary:

  PASS     11535
  FAIL         2
  XFAIL        7
  SKIPPED     60

Results of make check with Octave's built-in BLAS (which appears to be reference, not ATLAS):

Summary:

  PASS     11535
  FAIL         2
  XFAIL        7
  SKIPPED     60

The blas issues you mention appear to date from 2008.  More recent reports of segfaults say that the same segfaults occur with Apple's BLAS and with Atlas.

Given that Apple's BLAS has been around for years and is vastly more widely adopted than octave, I suspect segfaults in make check are more likely to relate to bugs in octave than bugs in the BLAS.

As for benchmarking -- I've benchmarked them all outside of octave (MKL > Apple BLAS > Open Blas > Atlas > Reference); I can't get octave to compile consistently enough to benchmark here.

As I said in the other report comment, there are massive problems in the mac distribution of octave right now. 

I'm trying to help you.

If you look at the tone of your responses to me, I think you may start to see why these issues with octave haven't been fixed.

Anonymous
Thu 18 Sep 2014 08:49:31 AM UTC, comment #1: 

> 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.


Do you have experimental evidence to confirm these figures in Octave?
Are you comparing to reference BLAS/LAPACK or to ATLAS/OpenBLAS?

If you want to run comparisons you could use the binary Octave 3.8.0 distribution available on OctaveForge which is linked against ATLAS.

Anyway, framework Accelerate has been known for years to not
work properly when linked to Octave, causing a large number
of tests to fail when running "make check". What is the result of
"make check" for your build?

Finally, you have been submitting to this tracker a whole bunch of comments/suggestions that are not really bugs, please stop!

If you want to discuss these topics further please use the maintainers mailing list.

Carlo de Falco <cdf>
Project Member
Thu 18 Sep 2014 07:20:27 AM UTC, original submission:  

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' \
'LDFLAGS=-L/usr/local/lib/gcc/x86_64-apple-darwin13.3.0/4.9.1 -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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-18 cdf StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9