[MacPorts] #21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: Octave BLAS Accelerate | Port: Octave-3.2.2 ------------------------------------+--------------------------------------- Without the FFLAG '-ff2c' with gcc43 and gcc44 a check for whether certain BLAS routines are called correctly during configure will fail and as a result the build will use the reference BLAS rather than the optimized BLAS available in the Accelerate framework. Adding, configure.fflags='-ff2c' corrects this problem and allows Octave to compile against the optimized library. -- Ticket URL: <http://trac.macports.org/ticket/21797> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 -----------------------------------+---------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: BLAS Accelerate | Port: octave -----------------------------------+---------------------------------------- Changes (by macsforever2000@…): * cc: stechert@… (added) * keywords: Octave BLAS Accelerate => BLAS Accelerate * owner: macports-tickets@… => alakazam@… * port: Octave-3.2.2 => octave Old description:
Without the FFLAG '-ff2c' with gcc43 and gcc44 a check for whether certain BLAS routines are called correctly during configure will fail and as a result the build will use the reference BLAS rather than the optimized BLAS available in the Accelerate framework. Adding,
configure.fflags='-ff2c'
corrects this problem and allows Octave to compile against the optimized library.
New description: Without the FFLAG '-ff2c' with gcc43 and gcc44 a check for whether certain BLAS routines are called correctly during configure will fail and as a result the build will use the reference BLAS rather than the optimized BLAS available in the Accelerate framework. Adding, {{{ configure.fflags='-ff2c' }}} corrects this problem and allows Octave to compile against the optimized library. -- -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 -----------------------------------+---------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: BLAS Accelerate | Port: octave -----------------------------------+---------------------------------------- Changes (by alakazam@…): * status: new => assigned Comment: I have just added {{{ configure.fflags -ff2c }}} to the Portfile. The configure phase seems to show that this option is used, but doesn't fix the issue : {{{ (...) configure: defining FFLAGS to be -ff2c -m64 -mieee-fp (...) configure: WARNING: A BLAS library was detected but found incompatible with your Fortran 77 compiler. The reference BLAS implementation will be used. To improve performance, consider using a different Fortran compiler or a switch like -ff2c to make your Fortran compiler use a calling convention compatible with the way your BLAS library was compiled, or use a different BLAS library. (...) }}} -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 -----------------------------------+---------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: BLAS Accelerate | Port: octave -----------------------------------+---------------------------------------- Comment(by alakazam@…): Switching to having atlas as a dependency fixes this issue. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: fixed | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Changes (by alakazam@…): * status: assigned => closed * resolution: => fixed Comment: Fixed in r61160. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: fixed | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by todmorrison@…): Deleting the dependency on Atlas and adding configure.fflags="-ff2c" works for me and enables proper linking with vecLib. Linking to atlas is an inferior option, since one of the advantages of OSX is it's vendor optimized Blas/Lapack libraries. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Changes (by takeshi@…): * status: closed => reopened * resolution: fixed => Comment: Sorry to write to a closed ticket. I prefer Accelerate.framework because of 1) performance and 2) lack of +g95 in atlas. However, gfortran fails with sdot with -ff2c and with cdotu and zdotu without -ff2c. With trial and error I found that octave is configured to use Accelerate.framework with -fdefault-real-8 and explicit specification of type (real*4 for sdot and complex*8 for cdotu). I would think this problem pertains to x86_64 and ppc64 only but I have not tested. G95 does not have this problem. I will attach a patch. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: alakazam@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): Forgot to mention that arpack requires Accelerate. That is why -framework Accelerated is added to LIBS. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Changes (by alakazam@…): * owner: alakazam@… => * status: reopened => new -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Changes (by jmr@…): * owner: => stechert@… * cc: stechert@… (removed) -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by todmorrison@…): I believe the portfile patch to add a no_atlas variant in Ticket #22997 resolves this problem as well. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): I updated the patch and addressed the *dot* problem ([http://developer.apple.com/hardwaredrivers/ve/errata.html#fortran_convention... solution]). In order to build atlas free octave: 1. Install SuiteSparse with +accelerate (or simply +g95 if you prefer g95 to gfortran). 2. Use the patch #25186 and install arpack with +accelerate (or simply +g95 if you prefer g95 to gfortran). 3. Use the patch here to install octave ith +accelerate (or simply +g95 if you prefer g95 to gfortran). With g95 put dotwrp.f90 into files. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): Oops +accelerate of qrupdate has been renamed. use +no_atlas. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): Corrections to the procedure to build atlas free octave and formatting. * SuiteSparse does not have accelerate or g95 options. I confused it with arpack. 1. Use the patch #25186 and install arpack with +no_atlas (or simply +g95 if you prefer g95 to gfortran). 2. Use the patch here to install octave with +no_atlas (or simply +g95 if you prefer g95 to gfortran). With g95 put dotwrp.f90 into files. -- Ticket URL: <http://trac.macports.org/ticket/21797#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): I updated the patch. The previous one builds fine but mkoctfile had a bad reference to dotwrp.o in a temporary file and did not function. I made dotwrp a separate port. I am testing the same with octave-devel but I have a problem with liboctinterp.dylib. It has a reference to a function which does not exist in none of libstdc++ installed on my machine. With the stable octave-3.2.4 the patch works fine for me. -- Ticket URL: <https://trac.macports.org/ticket/21797#comment:21> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: fixed | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: Committed a variation on this patch in r74740. Unfortunately there is a bug with 64-bit SDOT in 10.6's Accelerate.framework, so the new variant can't be used there. -- Ticket URL: <https://trac.macports.org/ticket/21797#comment:22> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21797: octave-3.2.2 needs FFLAGs='-ff2c' to use system BLAS (-framework Accelerate) with gcc43/gcc44 ------------------------------------+--------------------------------------- Reporter: todmorrison@… | Owner: stechert@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: fixed | Keywords: BLAS Accelerate Port: octave | ------------------------------------+--------------------------------------- Comment(by takeshi@…): Great news! Thank you for the update. I look at the MacResearch [http://www.macresearch.org/lapackblas- fortran-106#comment-17217 webpage]. I was able to run that test successfully without -ff2c and with [https://github.com/tenomoto/dotwrp dotwrp]. {{{ $ gfortran-mp-4.5 -fno-underscoring dotwrp.f90 -c $ ar cru libdotwrp.a dotwrp.o $ gfortran-mp-4.5 my_conftest.f -L. -ldotwrp -framework Accelerate $ ./a.out 1.0000000 2.0000000 2.0000000 2.0000000 ( 1.0000000 , 1.0000000 ) ( 1.0000000 , 2.0000000 ) ( -1.0000000 , 3.0000000 ) ( -1.0000000 , 3.0000000 ) }}} I added gcc44 and gcc45 variants to dotwrp (r74749). The same approach as g95 might work as well for gcc44 and gcc45. -- Ticket URL: <https://trac.macports.org/ticket/21797#comment:23> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts