[Scipy-tickets] [SciPy] #1321: scipy.sparse.linalg.isolve depends on cdotc and zdotc, which require wrappers on Mac OS X

SciPy Trac scipy-tickets@scipy....
Thu Oct 28 09:49:11 CDT 2010


#1321: scipy.sparse.linalg.isolve depends on cdotc and zdotc, which require
wrappers on Mac OS X
-----------------------------------------------------------------+----------
 Reporter:  commandant2k                                         |       Owner:  wnbell
     Type:  defect                                               |      Status:  new   
 Priority:  normal                                               |   Milestone:  0.9.0 
Component:  scipy.sparse.linalg                                  |     Version:  devel 
 Keywords:  BLAS, Accelerate, iterative, cdotc, zdotc, Mac OS X  |  
-----------------------------------------------------------------+----------
 The FORTRAN reverse communication routines for iterative solution of
 linear systems in the scipy.sparse.linalg.isolve module each depend on the
 BLAS routines cdotc and zdotc to compute complex inner products in single
 and double precision, respectively. On Mac OS X installations that use the
 Accelerate or vecLib frameworks for BLAS and LAPACK, these routines are
 known to have issues when called from FORTRAN. The cause is an ABI
 mismatch between the functions compiled into the Mac OS X frameworks and
 the executable code produced by gfortran.

 This problem exists in other modules of scipy, especially ARPACK in
 scipy.sparse.linalg.eigen. A workaround was implemented that defines local
 wrapper functions to call cblas_cdotc_sub and cblas_zdotc_sub, which
 provide subroutine versions of the BLAS functions that avoid the ABI
 issue. However, this accommodation was not made in
 scipy.sparse.linalg.isolve.

 Attached is a patch to SVN revision 6856 that adds the wrapper functions
 to the isolve module in the same fashion as the wrappers from
 scipy.lib.blas and scipy.sparse.linalg.eigen. If neither the Accelerate
 nor vecLib frameworks are used, a dummy wrapper is in place to directly
 call the BLAS functions. The FORTRAN reverse communication routines have
 been modified to call the wrapper routine rather than the BLAS routines.

 The patch has been tested on scipy 0.8.0 and SVN r6856 on an Intel
 Macintosh. More testing should be done on PPC Macs and non-Macintosh
 systems to confirm that the dummy wrapper behaves as expected on other
 platforms.

 Observe that the issues with cdotc and zdotc are only observed when
 attempting to solve linear systems involving single- or double-precision
 complex unknowns; for real-valued systems, the module does not invoke the
 problematic routines.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1321>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list