Permalink
Browse files

BUG: sparse/arpack: add veclib wrappers also for SDOT (fixes #1523)

Another Fortran ABI mismatch in OSX/Veclib.
  • Loading branch information...
1 parent 37d1c4b commit 600e81f485f0a6b15dc6601b172b59a537af79d9 @pv pv committed Oct 10, 2011
View
10 scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/dummy.f
@@ -38,6 +38,16 @@ complex function wcdotu(n, cx, incx, cy, incy)
return
end
+ real function wsdot(n, x, incx, y, incy)
+ real x(*), y(*), s, sdot
+ integer n, incx, incy
+
+ s = sdot(n, x, incx, y, incy)
+ wsdot = s
+
+ return
+ end
+
complex function wcladiv(x, y)
complex x, y, z
complex cladiv
View
6 scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c
@@ -24,3 +24,9 @@ void WRAP_F77(veclib_zdotu)(const int *N, const double complex *X, const int
{
cblas_zdotu_sub(*N, X, *incX, Y, *incY, dotu);
}
+void WRAP_F77(veclib_sdot)(const int *N, const float *X, const int
+*incX, const float *Y, const int *incY, float *dot)
+{
+ *dot = cblas_sdot(*N, X, *incX, Y, *incY);
+}
+
View
10 scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_f.f
@@ -38,6 +38,16 @@ complex function wcdotu(n, cx, incx, cy, incy)
return
end
+ real function wsdot(n, x, incx, y, incy)
+ real x(*), y(*), s
+ integer n, incx, incy
+
+ call veclib_sdot(n, x, incx, y, incy, s)
+
+ wsdot = s
+ return
+ end
+
complex function wcladiv(x, y)
complex x, y, z
View
12 scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/snaitr.f
@@ -143,7 +143,7 @@
c saxpy Level 1 BLAS that computes a vector triad.
c sscal Level 1 BLAS that scales a vector.
c scopy Level 1 BLAS that copies one vector to another .
-c sdot Level 1 BLAS that computes the scalar product of two vectors.
+c wsdot Level 1 BLAS that computes the scalar product of two vectors.
c snrm2 Level 1 BLAS that computes the norm of a vector.
c
c\Author
@@ -275,8 +275,8 @@ subroutine snaitr
c %--------------------%
c
Real
- & sdot, snrm2, slanhs, slamch
- external sdot, snrm2, slanhs, slamch
+ & wsdot, snrm2, slanhs, slamch
+ external wsdot, snrm2, slanhs, slamch
c
c %---------------------%
c | Intrinsic Functions |
@@ -543,7 +543,7 @@ subroutine snaitr
c %-------------------------------------%
c
if (bmat .eq. 'G') then
- wnorm = sdot (n, resid, 1, workd(ipj), 1)
+ wnorm = wsdot (n, resid, 1, workd(ipj), 1)
wnorm = sqrt(abs(wnorm))
else if (bmat .eq. 'I') then
wnorm = snrm2(n, resid, 1)
@@ -615,7 +615,7 @@ subroutine snaitr
c %------------------------------%
c
if (bmat .eq. 'G') then
- rnorm = sdot (n, resid, 1, workd(ipj), 1)
+ rnorm = wsdot (n, resid, 1, workd(ipj), 1)
rnorm = sqrt(abs(rnorm))
else if (bmat .eq. 'I') then
rnorm = snrm2(n, resid, 1)
@@ -714,7 +714,7 @@ subroutine snaitr
c %-----------------------------------------------------%
c
if (bmat .eq. 'G') then
- rnorm1 = sdot (n, resid, 1, workd(ipj), 1)
+ rnorm1 = wsdot (n, resid, 1, workd(ipj), 1)
rnorm1 = sqrt(abs(rnorm1))
else if (bmat .eq. 'I') then
rnorm1 = snrm2(n, resid, 1)
View
8 scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/snaup2.f
@@ -149,7 +149,7 @@
c slamch LAPACK routine that determines machine constants.
c slapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c scopy Level 1 BLAS that copies one vector to another .
-c sdot Level 1 BLAS that computes the scalar product of two vectors.
+c wsdot Level 1 BLAS that computes the scalar product of two vectors.
c snrm2 Level 1 BLAS that computes the norm of a vector.
c sswap Level 1 BLAS that swaps two vectors.
c
@@ -243,8 +243,8 @@ subroutine snaup2
c %--------------------%
c
Real
- & sdot, snrm2, slapy2, slamch
- external sdot, snrm2, slapy2, slamch
+ & wsdot, snrm2, slapy2, slamch
+ external wsdot, snrm2, slapy2, slamch
c
c %---------------------%
c | Intrinsic Functions |
@@ -800,7 +800,7 @@ subroutine snaup2
end if
c
if (bmat .eq. 'G') then
- rnorm = sdot (n, resid, 1, workd, 1)
+ rnorm = wsdot (n, resid, 1, workd, 1)
rnorm = sqrt(abs(rnorm))
else if (bmat .eq. 'I') then
rnorm = snrm2(n, resid, 1)
View
6 scipy/sparse/linalg/eigen/arpack/ARPACK/SRC/sneupd.f
@@ -245,7 +245,7 @@
c strmm Level 3 BLAS matrix times an upper triangular matrix.
c sger Level 2 BLAS rank one update to a matrix.
c scopy Level 1 BLAS that copies one vector to another .
-c sdot Level 1 BLAS that computes the scalar product of two vectors.
+c wsdot Level 1 BLAS that computes the scalar product of two vectors.
c snrm2 Level 1 BLAS that computes the norm of a vector.
c sscal Level 1 BLAS that scales a vector.
c
@@ -373,8 +373,8 @@ subroutine sneupd(rvec , howmny, select, dr , di,
c %--------------------%
c
Real
- & slapy2, snrm2, slamch, sdot
- external slapy2, snrm2, slamch, sdot
+ & slapy2, snrm2, slamch, wsdot
+ external slapy2, snrm2, slamch, wsdot
c
c %---------------------%
c | Intrinsic Functions |

0 comments on commit 600e81f

Please sign in to comment.