elif [ ${TRILINOS_MAJOR_VERSION} = "11" ]; then
SOURCE=https://trilinos.org/oldsite/download/files/
- VERSION=11.14.3
- CHECKSUM=b6e5d6b71f6e554de220aeda51794ffb
+# VERSION=11.14.3
+# CHECKSUM=b6e5d6b71f6e554de220aeda51794ffb
+ VERSION=11.12.1
+ CHECKSUM=13ec45c895d1c12b87f2d2286b27e09a
#Note: For Trilinos v11 we need to force SuperLUDist=OFF,
# since only the deprecated SuperLUDist v3.3 together with an Amesos patch
#Note: This issue is resolved by setting
# -D HAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG
# for Trilinos v12; this is neglegted by Trilinos v11 since it is unknown.
- cecho ${BAD} "trilinos: warning: forcing unset SUPERLU_DIR (not supported)"
- unset SUPERLU_DIR
+# cecho ${BAD} "trilinos: warning: forcing unset SUPERLU_DIR (not supported)"
+# unset SUPERLU_DIR
else
cecho ${BAD} "Unknown Trilinos version ${TRILINOS_MAJOR_VERSION} forced, please use AUTO|12|11."
-D Trilinos_ENABLE_Sacado:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
- -D Trilinos_ENABLE_MueLu:BOOL=ON \
- -D Trilinos_ENABLE_Amesos2:BOOL=ON \
+ -D Trilinos_ENABLE_MueLu:BOOL=OFF \
+ -D Trilinos_ENABLE_Amesos2:BOOL=OFF \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE \
-D Trilinos_VERBOSE_CONFIGURE:BOOL=FALSE \
-D BUILD_SHARED_LIBS:BOOL=ON"
+package_specific_setup() {
+ if [ ${TRILINOS_MAJOR_VERSION} = "11" ]; then
+ # Apply patch to let Trilinos/Amesos work with SuperLUDist_3.3
+ cd ${UNPACK_PATH}/${EXTRACTSTO}/packages/amesos/src
+ patch --forward Amesos_Superludist.cpp < ${ORIG_DIR}/${PROJECT}/patches/Trilinos-v11-Amesos_Superludist-v3.3.cpp.patch || true
+ fi
+}
+
package_specific_register () {
export TRILINOS_DIR=${INSTALL_PATH}
}
--- /dev/null
+diff -u -r -N SuperLU_DIST_3.3/SRC/dreadMM.c SuperLU_DIST_3.3.patched/SRC/dreadMM.c
+--- SuperLU_DIST_3.3/SRC/dreadMM.c 2013-04-01 02:25:32.000000000 +0200
++++ SuperLU_DIST_3.3.patched/SRC/dreadMM.c 2014-07-11 00:50:25.225586000 +0200
+@@ -8,6 +8,7 @@
+ */
+ #include <stdio.h>
+ #include "superlu_ddefs.h"
++#include "dreadrhs.h"
+
+ #undef EXPAND_SYM
+
+@@ -211,22 +212,3 @@
+ #endif
+
+ }
+-
+-
+-void dreadrhs(int m, double *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "dreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf\n", &b[i]);
+- /*fscanf(fp, "%d%lf\n", &j, &b[i]);*/
+- /* readpair_(j, &b[i]);*/
+- fclose(fp);
+-}
+-
+-
+diff -u -r -N SuperLU_DIST_3.3/SRC/dreadrhs.c SuperLU_DIST_3.3.patched/SRC/dreadrhs.c
+--- SuperLU_DIST_3.3/SRC/dreadrhs.c 1970-01-01 01:00:00.000000000 +0100
++++ SuperLU_DIST_3.3.patched/SRC/dreadrhs.c 2014-07-11 00:50:25.220586000 +0200
+@@ -0,0 +1,17 @@
++#include "dreadrhs.h"
++
++void dreadrhs(int m, double *b)
++{
++ FILE *fp, *fopen();
++ int i, j;
++
++ if ( !(fp = fopen("b.dat", "r")) ) {
++ fprintf(stderr, "dreadrhs: file does not exist\n");
++ exit(-1);
++ }
++ for (i = 0; i < m; ++i)
++ fscanf(fp, "%lf\n", &b[i]);
++ /*fscanf(fp, "%d%lf\n", &j, &b[i]);*/
++ /* readpair_(j, &b[i]);*/
++ fclose(fp);
++}
+diff -u -r -N SuperLU_DIST_3.3/SRC/dreadrhs.h SuperLU_DIST_3.3.patched/SRC/dreadrhs.h
+--- SuperLU_DIST_3.3/SRC/dreadrhs.h 1970-01-01 01:00:00.000000000 +0100
++++ SuperLU_DIST_3.3.patched/SRC/dreadrhs.h 2014-07-11 00:50:25.215586000 +0200
+@@ -0,0 +1,10 @@
++#ifndef _dreadrhs_h
++#define _dreadrhs_h
++
++#include <stdio.h>
++#include "superlu_ddefs.h"
++
++#undef EXPAND_SYM
++
++void dreadrhs(int m, double *b);
++#endif
+diff -u -r -N SuperLU_DIST_3.3/SRC/dreadtriple.c SuperLU_DIST_3.3.patched/SRC/dreadtriple.c
+--- SuperLU_DIST_3.3/SRC/dreadtriple.c 2013-04-01 02:25:31.000000000 +0200
++++ SuperLU_DIST_3.3.patched/SRC/dreadtriple.c 2014-07-11 00:50:25.219586000 +0200
+@@ -6,6 +6,7 @@
+ */
+ #include <stdio.h>
+ #include "superlu_ddefs.h"
++#include "dreadrhs.h"
+
+ #undef EXPAND_SYM
+
+@@ -149,22 +150,3 @@
+
+ }
+
+-
+-void dreadrhs(int m, double *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "dreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf\n", &b[i]);
+- /*fscanf(fp, "%d%lf\n", &j, &b[i]);*/
+- /* readpair_(j, &b[i]);*/
+-
+- fclose(fp);
+-}
+-
+-
+diff -u -r -N SuperLU_DIST_3.3/SRC/Makefile SuperLU_DIST_3.3.patched/SRC/Makefile
+--- SuperLU_DIST_3.3/SRC/Makefile 2013-04-01 02:25:31.000000000 +0200
++++ SuperLU_DIST_3.3.patched/SRC/Makefile 2014-07-11 00:50:25.218586000 +0200
+@@ -43,12 +43,12 @@
+ DSLUSRC = dlangs.o dgsequ.o dlaqgs.o dutil.o \
+ dmemory.o dmyblas2.o dsp_blas2.o dsp_blas3.o
+ ZSLUSRC = dcomplex.o zlangs.o zgsequ.o zlaqgs.o zutil.o \
+- zmemory.o zmyblas2.o dmemory.o zsp_blas2.o zsp_blas3.o
++ zmemory.o zmyblas2.o zsp_blas2.o zsp_blas3.o
+
+ #
+ # Routines for double precision parallel SuperLU
+ # DPLUSRC = dldperm.o ddistribute.o pdgstrf.o pdgstrs_Bglobal.o
+-DPLUSRC = dldperm.o ddistribute.o pdgstrf.o pdgstrs_Bglobal.o \
++DPLUSRC = dreadrhs.o dldperm.o ddistribute.o pdgstrf.o pdgstrs_Bglobal.o \
+ pdgstrs1.o pdgssvx_ABglobal.o pdgsrfs_ABXglobal.o pdgsmv_AXglobal.o\
+ pdgssvx.o pdgstrs.o pddistribute.o pdlangs.o pdutil.o \
+ pdgsequ.o pdlaqgs.o pdgsrfs.o pdgsmv.o pdgstrs_lsum.o \
+@@ -57,23 +57,28 @@
+ #
+ # Routines for double complex parallel SuperLU
+ # ZPLUSRC = zldperm.o zdistribute.o pzgssvx_ABglobal.o pzgstrf_irecv.o
+-ZPLUSRC = zldperm.o zdistribute.o pzgssvx_ABglobal.o pzgstrf.o \
++ZPLUSRC = zreadrhs.o zldperm.o zdistribute.o pzgssvx_ABglobal.o pzgstrf.o \
+ pzgstrs1.o pzgstrs_Bglobal.o pzgsrfs_ABXglobal.o pzgsmv_AXglobal.o \
+ pzgssvx.o pzgstrs.o pzdistribute.o pzlangs.o pzutil.o \
+ pzgsequ.o pzlaqgs.o pzgsrfs.o pzgsmv.o pzgstrs_lsum.o \
+ pzsymbfact_distdata.o zreadhb.o zreadtriple.o zreadMM.o
+
+-all: double complex16
++all: double complex16 shared
+
+ double: $(DSLUSRC) $(DPLUSRC) $(ALLAUX) $(LAAUX)
+- $(ARCH) $(ARCHFLAGS) $(DSUPERLULIB) \
++ $(ARCH) $(ARCHFLAGS) $(DSUPERLULIB).a \
+ $(DSLUSRC) $(DPLUSRC) $(ALLAUX) $(LAAUX)
+- $(RANLIB) $(DSUPERLULIB)
++ $(RANLIB) $(DSUPERLULIB).a
+
+ complex16: $(ZSLUSRC) $(ZPLUSRC) $(ALLAUX) $(LAAUX)
+- $(ARCH) $(ARCHFLAGS) $(DSUPERLULIB) \
+- $(ZSLUSRC) $(ZPLUSRC) $(ALLAUX) $(LAAUX)
+- $(RANLIB) $(DSUPERLULIB)
++ $(ARCH) $(ARCHFLAGS) $(DSUPERLULIB).a \
++ $(ZSLUSRC) dmemory.o $(ZPLUSRC) $(ALLAUX) $(LAAUX)
++ $(RANLIB) $(DSUPERLULIB).a
++
++# link shared library
++shared: $(DSLUSRC) $(DPLUSRC) $(ZSLUSRC) $(ZPLUSRC) $(ALLAUX) $(LAAUX)
++ $(CC) -shared -Wl,-soname,$(DSUPERLULIBNAME).so -o $(DSUPERLULIB).so \
++ $(DSLUSRC) $(DPLUSRC) $(ZSLUSRC) $(ZPLUSRC) $(ALLAUX) $(LAAUX)
+
+
+ ##################################
+@@ -90,6 +95,6 @@
+ $(FORTRAN) $(FFLAGS) -c $< $(VERBOSE)
+
+ clean:
+- rm -f *.o $(DSUPERLULIB)
++ rm -f *.o $(DSUPERLULIB).a $(DSUPERLULIB).so
+
+
+diff -u -r -N SuperLU_DIST_3.3/SRC/zreadMM.c SuperLU_DIST_3.3.patched/SRC/zreadMM.c
+--- SuperLU_DIST_3.3/SRC/zreadMM.c 2013-04-01 02:25:31.000000000 +0200
++++ SuperLU_DIST_3.3.patched/SRC/zreadMM.c 2014-07-11 00:50:25.222586000 +0200
+@@ -7,6 +7,7 @@
+ */
+ #include <stdio.h>
+ #include "superlu_zdefs.h"
++#include "zreadrhs.h"
+
+ #undef EXPAND_SYM
+
+@@ -210,20 +211,3 @@
+ #endif
+
+ }
+-
+-
+-void zreadrhs(int m, doublecomplex *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "zreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf\n", &b[i].r, &b[i].i);
+- fclose(fp);
+-}
+-
+-
+diff -u -r -N SuperLU_DIST_3.3/SRC/zreadrhs.c SuperLU_DIST_3.3.patched/SRC/zreadrhs.c
+--- SuperLU_DIST_3.3/SRC/zreadrhs.c 1970-01-01 01:00:00.000000000 +0100
++++ SuperLU_DIST_3.3.patched/SRC/zreadrhs.c 2014-07-11 00:50:25.224586000 +0200
+@@ -0,0 +1,16 @@
++#include "zreadrhs.h"
++
++void zreadrhs(int m, doublecomplex *b)
++{
++ FILE *fp, *fopen();
++ int i, j;
++
++ if ( !(fp = fopen("b.dat", "r")) ) {
++ fprintf(stderr, "zreadrhs: file does not exist\n");
++ exit(-1);
++ }
++ for (i = 0; i < m; ++i)
++ fscanf(fp, "%lf%lf\n", &(b[i].r), &(b[i].i));
++
++ fclose(fp);
++}
+diff -u -r -N SuperLU_DIST_3.3/SRC/zreadrhs.h SuperLU_DIST_3.3.patched/SRC/zreadrhs.h
+--- SuperLU_DIST_3.3/SRC/zreadrhs.h 1970-01-01 01:00:00.000000000 +0100
++++ SuperLU_DIST_3.3.patched/SRC/zreadrhs.h 2014-07-11 00:50:25.226586000 +0200
+@@ -0,0 +1,10 @@
++#ifndef _zreadrhs_h
++#define _zreadrhs_h
++
++#include <stdio.h>
++#include "superlu_zdefs.h"
++
++#undef EXPAND_SYM
++
++void zreadrhs(int m, doublecomplex *b);
++#endif
+diff -u -r -N SuperLU_DIST_3.3/SRC/zreadtriple.c SuperLU_DIST_3.3.patched/SRC/zreadtriple.c
+--- SuperLU_DIST_3.3/SRC/zreadtriple.c 2013-04-01 02:25:32.000000000 +0200
++++ SuperLU_DIST_3.3.patched/SRC/zreadtriple.c 2014-07-11 00:50:25.225586000 +0200
+@@ -5,6 +5,7 @@
+ */
+ #include <stdio.h>
+ #include "superlu_zdefs.h"
++#include "zreadrhs.h"
+
+ #undef EXPAND_SYM
+
+@@ -147,21 +148,3 @@
+ #endif
+
+ }
+-
+-
+-void zreadrhs(int m, doublecomplex *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "zreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf%lf\n", &(b[i].r), &(b[i].i));
+-
+- fclose(fp);
+-}
+-
+-