1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
Description: Use LAPACKE instead of ATLAS
Author: Sébastien Villemot <sebastien@debian.org>
Bug-Debian: https://bugs.debian.org/1056671
Forwarded: no
Last-Update: 2023-12-22
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/makefile
+++ b/makefile
@@ -7,7 +7,7 @@ LIBFLAGS = -Wall
COMPFLAGS = ${INCFLAGS} -O2 -Wall -g $(CFLAGS) $(CPPFLAGS)
CC = gcc
-CLIBS = -L/usr/lib/atlas-base -L/usr/lib/lapack/ -llapack_atlas -llapack -lcblas -lblas -latlas -lcblas -lm -lz $(LDFLAGS)
+CLIBS = -llapacke -llapack -lblas -lm -lz $(LDFLAGS)
all: emmax emmax-kin
--- a/emmax.c
+++ b/emmax.c
@@ -7,7 +7,7 @@
#include <float.h>
#include <time.h>
#include <cblas.h>
-#include <clapack.h>
+#include <lapacke.h>
#include <zlib.h>
//#include "lapack_wrapper.h"
@@ -1629,15 +1629,10 @@ int dsyevd (char JOBZ, char UPLO, int N,
double *W,
double *WORK, int LWORK, int *IWORK, int LIWORK)
{
- extern void dsyevd_ (char *JOBZp, char *UPLOp, int *Np,
- double *A, int *LDAp,
- double *W,
- double *WORK, int *LWORKp, int *IWORK, int *LIWORKp,
- int *INFOp);
int INFO;
- dsyevd_ (&JOBZ, &UPLO, &N, A, &LDA,
- W,
- WORK, &LWORK, IWORK, &LIWORK, &INFO);
+ LAPACK_dsyevd (&JOBZ, &UPLO, &N, A, &LDA,
+ W,
+ WORK, &LWORK, IWORK, &LIWORK, &INFO);
return INFO;
}
@@ -1648,16 +1643,10 @@ int dsyevr (char JOBZ, char RANGE, char
double *W, double *Z, int LDZ, int *ISUPPZ,
double *WORK, int LWORK, int *IWORK, int LIWORK)
{
- extern void dsyevr_ (char *JOBZp, char *RANGEp, char *UPLOp, int *Np,
- double *A, int *LDAp, double *VLp, double *VUp,
- int *ILp, int *IUp, double *ABSTOLp, int *Mp,
- double *W, double *Z, int *LDZp, int *ISUPPZ,
- double *WORK, int *LWORKp, int *IWORK, int *LIWORKp,
- int *INFOp);
int INFO;
- dsyevr_ (&JOBZ, &RANGE, &UPLO, &N, A, &LDA, &VL, &VU,
- &IL, &IU, &ABSTOL, M, W, Z, &LDZ, ISUPPZ,
- WORK, &LWORK, IWORK, &LIWORK, &INFO);
+ LAPACK_dsyevr (&JOBZ, &RANGE, &UPLO, &N, A, &LDA, &VL, &VU,
+ &IL, &IU, &ABSTOL, M, W, Z, &LDZ, ISUPPZ,
+ WORK, &LWORK, IWORK, &LIWORK, &INFO);
return INFO;
}
@@ -1747,13 +1736,13 @@ int matrix_invert(int n, double *X, doub
}
/* Turn Y into its LU form, store pivot matrix */
- info = clapack_dgetrf (CblasColMajor, n, n, Y, n, ipiv);
+ info = LAPACKE_dgetrf (LAPACK_COL_MAJOR, n, n, Y, n, ipiv);
/* Don't bother continuing when illegal argument (info<0) or singularity (info>0) occurs */
if (info!=0) return info;
/* Feed this to the lapack inversion routine. */
- info = clapack_dgetri (CblasColMajor, n, Y, n, ipiv);
+ info = LAPACKE_dgetri (LAPACK_COL_MAJOR, n, Y, n, ipiv);
/* Cleanup and exit */
free(ipiv);
|