Skip to content

michaelwimmer/accwrp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Fortran wrappers for the OSX Accelerate framework.

The OSX Accelerate framework uses the g77 ABI conventions, as explained on the Apple developer website. This gives problems if the Accelerate framework is linked to code compiled with modern Fortran compilers such as gfortran.

The solution is to link a wrapper that does the necessary ABI translations. Unfortunately, the solution presented on the Apple website is quite incomplete, as many more functions (other than cdotc, cdotu, zdotc, zdotu) are affected.

accwrp is a complete wrapper containing all affected BLAS and LAPACK functions defined in Lapack 3.2. (Note that later versions of Lapack define additional functions, those are not implemented in Accelerate)

Build as

gfortran -fno-underscoring -c -O3 wrapper.f
libtool -static wrapper.o -o libaccwrp.a

(the -fno-underscoring flag is vital!) and link this code before the Accelerate framework, i.e. as

-laccwrap -Wl,-framework -Wl,Accelerate

About

Fortran wrappers for OSX Accelerate framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages