summaryrefslogtreecommitdiff
path: root/libraries/trilinos
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/trilinos')
-rw-r--r--libraries/trilinos/trilinos-12.4.2_lapack-3.6.0.patch87
-rw-r--r--libraries/trilinos/trilinos.SlackBuild7
-rw-r--r--libraries/trilinos/trilinos.info8
3 files changed, 97 insertions, 5 deletions
diff --git a/libraries/trilinos/trilinos-12.4.2_lapack-3.6.0.patch b/libraries/trilinos/trilinos-12.4.2_lapack-3.6.0.patch
new file mode 100644
index 0000000000..b91b43c436
--- /dev/null
+++ b/libraries/trilinos/trilinos-12.4.2_lapack-3.6.0.patch
@@ -0,0 +1,87 @@
+diff -u -r trilinos-12.4.2-Source-orig/packages/epetra/src/Epetra_LAPACK.cpp trilinos-12.4.2-Source/packages/epetra/src/Epetra_LAPACK.cpp
+--- trilinos-12.4.2-Source-orig/packages/epetra/src/Epetra_LAPACK.cpp 2015-10-06 15:43:00.000000000 +0100
++++ trilinos-12.4.2-Source/packages/epetra/src/Epetra_LAPACK.cpp 2016-06-05 18:03:12.619388060 +0100
+@@ -365,8 +365,11 @@
+ double* A, const int LDA, double* B, const int LDB,
+ double* ALPHA, double* BETA, double* U, const int LDU, double* V, const int LDV, double* Q, const int LDQ, double* WORK, int* IWORK,
+ int* INFO) const {
+- DGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
+- ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
++ int LWORK;
++ LWORK = (3*N) > M ? 3*N : M;
++ LWORK = (LWORK > P ? LWORK : P) + N;
++ DGGSVD3_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
++ ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK, &LWORK, IWORK, INFO);
+ }
+
+ //=============================================================================
+@@ -374,8 +377,11 @@
+ float* A, const int LDA, float* B, const int LDB,
+ float* ALPHA, float* BETA, float* U, const int LDU, float* V, const int LDV, float* Q, const int LDQ, float* WORK, int* IWORK,
+ int* INFO) const {
+- SGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
+- ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK, IWORK, INFO);
++ int LWORK;
++ LWORK = (3*N) > M ? 3*N : M;
++ LWORK = (LWORK > P ? LWORK : P) + N;
++ SGGSVD3_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
++ ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK, &LWORK, IWORK, INFO);
+ }
+
+ //=============================================================================
+diff -u -r trilinos-12.4.2-Source-orig/packages/epetra/src/Epetra_LAPACK_wrappers.h trilinos-12.4.2-Source/packages/epetra/src/Epetra_LAPACK_wrappers.h
+--- trilinos-12.4.2-Source-orig/packages/epetra/src/Epetra_LAPACK_wrappers.h 2015-10-06 15:43:00.000000000 +0100
++++ trilinos-12.4.2-Source/packages/epetra/src/Epetra_LAPACK_wrappers.h 2016-06-05 17:34:26.411666128 +0100
+@@ -73,7 +73,7 @@
+ #define DGETRS_F77 SGETRS
+ #define DGGEV_F77 SGGEV
+ #define DGGLSE_F77 SGGLSE
+-#define DGGSVD_F77 SGGSVD
++#define DGGSVD3_F77 SGGSVD3
+ #define DHSEQR_F77 SHSEQR
+ #define DLAIC1_F77 SLAIC1
+ #define DLAMCH_F77 SLAMCH
+@@ -172,7 +172,7 @@
+ #define DGETRS_F77 F77_BLAS_MANGLE(dgetrs,DGETRS)
+ #define DGGEV_F77 F77_BLAS_MANGLE(dggev,DGGEV)
+ #define DGGLSE_F77 F77_BLAS_MANGLE(dgglse,DGGLSE)
+-#define DGGSVD_F77 F77_BLAS_MANGLE(dggsvd,DGGSVD)
++#define DGGSVD3_F77 F77_BLAS_MANGLE(dggsvd3,DGGSVD3)
+ #define DHSEQR_F77 F77_BLAS_MANGLE(dhseqr,DHSEQR)
+ #define DLAIC1_F77 F77_BLAS_MANGLE(dlaic1,DLAIC1)
+ #define DLAMCH_F77 F77_BLAS_MANGLE(dlamch,DLAMCH)
+@@ -227,7 +227,7 @@
+ #define SGETRS_F77 F77_BLAS_MANGLE(sgetrs,SGETRS)
+ #define SGGEV_F77 F77_BLAS_MANGLE(sggev,SGGEV)
+ #define SGGLSE_F77 F77_BLAS_MANGLE(sgglse,SGGLSE)
+-#define SGGSVD_F77 F77_BLAS_MANGLE(sggsvd,SGGSVD)
++#define SGGSVD3_F77 F77_BLAS_MANGLE(sggsvd3,SGGSVD3)
+ #define SHSEQR_F77 F77_BLAS_MANGLE(shseqr,SHSEQR)
+ #define SLAMCH_F77 F77_BLAS_MANGLE(slamch,SLAMCH)
+ #define SLARFT_F77 F77_BLAS_MANGLE(slarft,SLARFT)
+@@ -302,10 +302,10 @@
+ double * vr, const int * ldvr, double * work, const int * lwork, int * info);
+ void PREFIX DGGLSE_F77(const int * m, const int * n, const int * p, double * a, const int * lda, double * b, const int * ldb,
+ double * c, double * d, double * x, double * work, const int * lwork, int * info);
+- void PREFIX DGGSVD_F77(Epetra_fcd, Epetra_fcd, Epetra_fcd, const int * m, const int * n, const int * p, int * k, int * l,
++ void PREFIX DGGSVD3_F77(Epetra_fcd, Epetra_fcd, Epetra_fcd, const int * m, const int * n, const int * p, int * k, int * l,
+ double * a, const int * lda, double * b, const int * ldb, double * alpha, double * beta,
+ double * u, const int * ldu, double * v, const int * ldv, double * q, const int * ldq, double * work,
+- int * iwork, int * info);
++ int * lwork, int * iwork, int * info);
+ void PREFIX DHSEQR_F77(Epetra_fcd job, Epetra_fcd, const int * n, const int * ilo, const int * ihi, double * h, const int * ldh,
+ double * wr, double * wi, double * z, const int * ldz, double * work, const int * lwork, int * info);
+ double PREFIX DLAMCH_F77(Epetra_fcd);
+@@ -407,10 +407,10 @@
+ float * vr, const int * ldvr, float * work, const int * lwork, int * info);
+ void PREFIX SGGLSE_F77(const int * m, const int * n, const int * p, float * a, const int * lda, float * b, const int * ldb,
+ float * c, float * d, float * x, float * work, const int * lwork, int * info);
+- void PREFIX SGGSVD_F77(Epetra_fcd, Epetra_fcd, Epetra_fcd, const int * m, const int * n, const int * p, int * k, int * l,
++ void PREFIX SGGSVD3_F77(Epetra_fcd, Epetra_fcd, Epetra_fcd, const int * m, const int * n, const int * p, int * k, int * l,
+ float * a, const int * lda, float * b, const int * ldb, float * alpha, float * beta,
+ float * u, const int * ldu, float * v, const int * ldv, float * q, const int * ldq, float * work,
+- int * iwork, int * info);
++ int * lwork, int * iwork, int * info);
+ void PREFIX SHSEQR_F77(Epetra_fcd job, Epetra_fcd, const int * n, const int * ilo, const int * ihi, float * h, const int * ldh,
+ float * wr, float * wi, float * z, const int * ldz, float * work, const int * lwork, int * info);
+ float PREFIX SLAMCH_F77(Epetra_fcd);
diff --git a/libraries/trilinos/trilinos.SlackBuild b/libraries/trilinos/trilinos.SlackBuild
index 81808a8b31..650da5beb6 100644
--- a/libraries/trilinos/trilinos.SlackBuild
+++ b/libraries/trilinos/trilinos.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=trilinos
-VERSION=${VERSION:-11.10.2}
+VERSION=${VERSION:-12.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,6 +69,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/trilinos-12.4.2_lapack-3.6.0.patch
# Use CUDA SDK and CUSPARSE.
if [ "${CUDA:-no}" == "yes" ]; then
@@ -173,6 +174,10 @@ fi
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=RELEASE ..
+ for f in $(grep -r -l /usr//usr/lib .); do
+ sed -i -e 's:/usr//usr/lib:/usr/lib:g' $f
+ done
+
make
ctest
make install DESTDIR=$PKG
diff --git a/libraries/trilinos/trilinos.info b/libraries/trilinos/trilinos.info
index f1b725234a..fc4d71e9fc 100644
--- a/libraries/trilinos/trilinos.info
+++ b/libraries/trilinos/trilinos.info
@@ -1,10 +1,10 @@
PRGNAM="trilinos"
-VERSION="11.10.2"
+VERSION="12.4.2"
HOMEPAGE="http://trilinos.org/"
-DOWNLOAD="https://trilinos.org/oldsite/download/files/trilinos-11.10.2-Source.tar.bz2"
-MD5SUM="c8dd5012890140b1a98c704c111cddaa"
+DOWNLOAD="https://trilinos.org/oldsite/download/files/trilinos-12.4.2-Source.tar.bz2"
+MD5SUM="6256264c5c8bc47253dbb38eb6ba26d1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="atlas suitesparse"
+REQUIRES="lapack blas suitesparse"
MAINTAINER="Guilherme Calandrini"
EMAIL="g_calandrini[at]hotmail[dot]es"