[cpl-plugin-xsh] 02/02: use liblapacke

Ole Streicher olebole-guest at alioth.debian.org
Thu Oct 31 11:28:25 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-xsh.

commit 09614645379d4d4d1df6814508ae7e46a6bca32b
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Thu Oct 31 12:04:12 2013 +0100

    use liblapacke
---
 debian/control              |    2 +-
 debian/patches/lapack.patch |   45 ++++++++++++++++++++++++++++---------------
 2 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/debian/control b/debian/control
index 257743d..4245a0a 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9),
                dh-autoreconf,
                libcpl-dev (>= 5.3.1),
                libgsl0-dev,
-	       liblapack-dev,
+	       liblapacke-dev,
                python,
                python-cpl,
                python-pyfits,
diff --git a/debian/patches/lapack.patch b/debian/patches/lapack.patch
index da9dc70..aa670d8 100644
--- a/debian/patches/lapack.patch
+++ b/debian/patches/lapack.patch
@@ -2,43 +2,47 @@ Author: Ole Streicher <debian at liska.ath.cx>
 Description: Replace clapack by lapack
 --- a/acinclude.m4
 +++ b/acinclude.m4
-@@ -7,7 +7,7 @@
+@@ -6,8 +6,8 @@
+ 
      AC_MSG_CHECKING([for lapack])
  
-     xsh_lapack_check_header="clapack.h"
+-    xsh_lapack_check_header="clapack.h"
 -    xsh_lapack_check_lib="libclapack.a"
-+    xsh_lapack_check_lib="liblapack.so"
++    xsh_lapack_check_header="lapacke.h"
++    xsh_lapack_check_lib="liblapacke.so"
  
      xsh_lapack_includes=""
      xsh_lapack_libraries=""
-@@ -42,7 +42,7 @@
-         # Check for the lapack includes
- 
-         if test -z "$xsh_with_lapack_includes"; then
--            xsh_lapack_incdirs="/opt/clapack/include /usr/local/include /usr/include"
-+            xsh_lapack_incdirs="/opt/clapack/include /usr/local/include /usr/include /usr/include/atlas"
- 
-             test -n "$CPLDIR" && xsh_lapack_incdirs="$CPLDIR/include \
-                 $xsh_lapack_incdirs"
 @@ -100,7 +100,7 @@
          LAPACK_LDFLAGS="-L$xsh_lapack_libraries"
          LDFLAGS="$LDFLAGS $LAPACK_LDFLAGS"
          CPPFLAGS="$CPPFLAGS $LAPACK_INCLUDES"
 -        AC_CHECK_LIB([clapack], [main], [LIBLAPACKC="-lclapack"], AC_MSG_ERROR([Library clapack not found]))
-+        AC_CHECK_LIB([lapack], [main], [LIBLAPACKC="-llapack"], AC_MSG_ERROR([Library lapack not found]))
++        AC_CHECK_LIB([lapacke], [main], [LIBLAPACKC="-llapacke"], AC_MSG_ERROR([Library lapacke not found]))
          LIBS="$LIBS $LIBLAPACKC"
          LIBLAPACK="$LIBLAPACKC"
      else
 --- a/xsh/xsh_subtract_sky_single.c
 +++ b/xsh/xsh_subtract_sky_single.c
-@@ -67,7 +67,6 @@
+@@ -67,8 +67,7 @@
  #ifdef DARWIN
  	#include <vecLib/clapack.h>
  #else
 -	#include <f2c.h>
- 	#include <clapack.h>
+-	#include <clapack.h>
++	#include <lapacke.h>
  #endif 
  
+ #define REGDEBUG_MEDIAN_SPLINE 0
+@@ -245,7 +244,7 @@
+ 	
+    double kappa2 = kappa*kappa;
+    for (iii=0;iii<niter;iii++){
+-      int nfit=0, err;
++      int nfit=0;
+       char uplo='U';
+           
+       /* Mac OS X uses different clapack.h type definitions, 
 @@ -258,12 +257,12 @@
        __CLPK_integer ldb=ncoeffs;
        __CLPK_integer info=0;
@@ -58,3 +62,14 @@ Description: Replace clapack by lapack
  #endif
  
        /* Fill the basis function (Bn) and flux (y) matrices for the fitted lambda, 
+@@ -351,8 +350,8 @@
+       }
+ 		
+       /* Do the fit, by Cholesky decomposition, using Lapack functions sptrf and spdtrs */
+-      err=spbtrf_(&uplo,&clpk_n,&kd,Xtp,&ldab,&info);
+-      err=spbtrs_(&uplo,&clpk_n,&kd,&nrhs,Xtp,&ldab,c,&ldb,&info);
++      spbtrf_(&uplo,&clpk_n,&kd,Xtp,&ldab,&info);
++      spbtrs_(&uplo,&clpk_n,&kd,&nrhs,Xtp,&ldab,c,&ldb,&info);
+ 		
+       /* Fill y with the predicted flux from the fit, over all values (using Bn_full) */
+ 		

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-xsh.git



More information about the debian-science-commits mailing list