Accepting request 146203 from home:scorot:branches:devel:libraries:c_c++
- Remove unneeded patches + superlu-overflow.patch : Applied upstream + superlu-initialize.diff : Applied upstream + superlu-undef-code.diff : Applied upstream - Updated patches + superlu-4.3.diff + superlu-4.3-include.patch + superlu-4.3-dont-opt-away.diff - Build shared libraries - Put shared libs and devel files in separate packages - Use rpm macros instead of plain directory names - Add %%ckeck - Update to SuperLU 4.3 - Update documentation file %%source1 and put html and examples files in %%doc - Spec file reformating OBS-URL: https://build.opensuse.org/request/show/146203 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/superlu?expand=0&rev=6
This commit is contained in:
parent
4406a29a46
commit
849e606914
@ -1,98 +0,0 @@
|
||||
Index: SuperLU_3.0/Makefile
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/Makefile
|
||||
+++ SuperLU_3.0/Makefile
|
||||
@@ -14,8 +14,12 @@
|
||||
# October 15, 2003 Version 3.0
|
||||
#
|
||||
############################################################################
|
||||
|
||||
+DESTDIR =
|
||||
+LIBDIR = $(prefix)/lib
|
||||
+DESTLIBDIR = $(DESTDIR)/$(LIBDIR)
|
||||
+
|
||||
include make.inc
|
||||
|
||||
all: install lib testing
|
||||
|
||||
@@ -36,8 +40,18 @@ superlulib:
|
||||
|
||||
tmglib:
|
||||
( cd TESTING/MATGEN; $(MAKE) )
|
||||
|
||||
+install_lib: superlulib
|
||||
+ $(INSTALL) -m 0755 -d $(DESTLIBDIR)
|
||||
+ $(INSTALL) -m 0644 superlu$(PLAT).a $(DESTLIBDIR)/libsuperlu.a
|
||||
+ ln -sf libsuperlu.a $(DESTLIBDIR)/superlu$(PLAT).a
|
||||
+
|
||||
+install_blas: blas$(PLAT).a
|
||||
+ $(INSTALL) -m 0755 -d $(DESTLIBDIR)
|
||||
+ $(INSTALL) -m 0644 blas$(PLAT).a $(DESTLIBDIR)/libblas2.a
|
||||
+ ln -sf libblas2.a $(DESTLIBDIR)/blas2$(PLAT).a
|
||||
+
|
||||
matlabmex:
|
||||
( cd MATLAB; $(MAKE) )
|
||||
|
||||
testing:
|
||||
Index: SuperLU_3.0/make.inc
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/make.inc
|
||||
+++ SuperLU_3.0/make.inc
|
||||
@@ -15,36 +15,49 @@
|
||||
############################################################################
|
||||
#
|
||||
# The machine (platform) identifier to append to the library names
|
||||
#
|
||||
-PLAT = _solaris
|
||||
+MACH := $(shell uname -m | tr A-Z a-z | sed s§i.86§i386§)
|
||||
+PLAT = _$(MACH)
|
||||
+prefix = /usr
|
||||
|
||||
#
|
||||
# The name of the libraries to be created/linked to
|
||||
#
|
||||
TMGLIB = tmglib$(PLAT).a
|
||||
SUPERLULIB = superlu$(PLAT).a
|
||||
BLASLIB = ../blas$(PLAT).a
|
||||
+#BLASBLIB = -lblas
|
||||
+#BLASDEF = -DUSE_VENDOR_BLAS
|
||||
|
||||
#
|
||||
# The archiver and the flag(s) to use when building archive (library)
|
||||
# If your system has no ranlib, set RANLIB = echo.
|
||||
#
|
||||
ARCH = ar
|
||||
ARCHFLAGS = cr
|
||||
RANLIB = ranlib
|
||||
+INSTALL = install
|
||||
|
||||
-CC = cc
|
||||
-CFLAGS = -xO3 -xcg92
|
||||
-FORTRAN = f77
|
||||
-FFLAGS = -O
|
||||
-LOADER = cc
|
||||
-LOADOPTS = -xO3
|
||||
+CC = gcc
|
||||
+CFLAGS = $(RPM_OPT_FLAGS) -fPIC -fschedule-insns2 \
|
||||
+ -funroll-loops -fstrict-aliasing -frerun-loop-opt \
|
||||
+ -ftree-vectorize -funit-at-a-time
|
||||
+ifeq ($(MACH),i386)
|
||||
+ CFLAGS += -mtune=pentium-m -momit-leaf-frame-pointer # -ffast-math -msse2 -mfpmath=sse
|
||||
+else
|
||||
+ CFLAGS += -O3 -finline-limit=720 --param max-inline-insns-auto=160
|
||||
+endif
|
||||
+NOOPTS = $(RPM_OPT_FLAGS) -Os -fPIC
|
||||
+FORTRAN = g77
|
||||
+FFLAGS = $(CFLAGS)
|
||||
+LOADER = gcc
|
||||
+LOADOPTS =
|
||||
|
||||
#
|
||||
# C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)
|
||||
#
|
||||
CDEFS = -DAdd_
|
||||
#
|
||||
# The directory in which Matlab is installed
|
||||
#
|
||||
-MATLAB = /usr/sww/pkg/matlab
|
||||
+#MATLAB = /usr/sww/pkg/matlab
|
20
superlu-4.3-dont-opt-away.diff
Normal file
20
superlu-4.3-dont-opt-away.diff
Normal file
@ -0,0 +1,20 @@
|
||||
diff -aruN SuperLU_4.3.orig/INSTALL/timertst.c SuperLU_4.3/INSTALL/timertst.c
|
||||
--- SuperLU_4.3.orig/INSTALL/timertst.c 2011-10-27 21:49:47.000000000 +0200
|
||||
+++ SuperLU_4.3/INSTALL/timertst.c 2012-12-20 21:55:13.954437737 +0100
|
||||
@@ -6,6 +6,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+volatile double _dummy;
|
||||
+
|
||||
int main()
|
||||
{
|
||||
/* Parameters */
|
||||
@@ -32,6 +34,7 @@
|
||||
for (j = 0; j < iters; ++j) {
|
||||
for (i = 0; i < NMAX; ++i) y[i] += alpha * x[i];
|
||||
alpha = -alpha;
|
||||
+ _dummy = y[j%NMAX];
|
||||
}
|
||||
t2 = SuperLU_timer_();
|
||||
tnotim = t2 - t1;
|
22
superlu-4.3-include.patch
Normal file
22
superlu-4.3-include.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -aruN SuperLU_4.3.orig/TESTING/ddrive.c SuperLU_4.3/TESTING/ddrive.c
|
||||
--- SuperLU_4.3.orig/TESTING/ddrive.c 2011-10-27 21:49:47.000000000 +0200
|
||||
+++ SuperLU_4.3/TESTING/ddrive.c 2012-12-20 22:14:43.026465899 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_ddefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
||||
diff -aruN SuperLU_4.3.orig/TESTING/sdrive.c SuperLU_4.3/TESTING/sdrive.c
|
||||
--- SuperLU_4.3.orig/TESTING/sdrive.c 2011-10-27 21:49:47.000000000 +0200
|
||||
+++ SuperLU_4.3/TESTING/sdrive.c 2012-12-20 22:14:43.030465752 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_sdefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
54
superlu-4.3.diff
Normal file
54
superlu-4.3.diff
Normal file
@ -0,0 +1,54 @@
|
||||
diff -aruN SuperLU_4.3.orig/make.inc SuperLU_4.3/make.inc
|
||||
--- SuperLU_4.3.orig/make.inc 2011-10-27 21:49:47.000000000 +0200
|
||||
+++ SuperLU_4.3/make.inc 2012-12-20 22:21:26.422475039 +0100
|
||||
@@ -21,14 +21,14 @@
|
||||
#
|
||||
# The name of the libraries to be created/linked to
|
||||
#
|
||||
-SuperLUroot = $(HOME)/Codes/SuperLU/SuperLU_4.2
|
||||
-SUPERLULIB = $(SuperLUroot)/lib/libsuperlu_4.2.a
|
||||
+SuperLUroot = ../
|
||||
+SUPERLULIB = $(SuperLUroot)/lib/libsuperlu_4.3.a
|
||||
TMGLIB = libtmglib.a
|
||||
|
||||
## BLASLIB = $(SuperLUroot)/lib/libblas.a
|
||||
|
||||
BLASDEF = -DUSE_VENDOR_BLAS
|
||||
-BLASLIB = -L$(HOME)/lib/GotoBLAS -lgoto
|
||||
+BLASLIB = -lblas
|
||||
|
||||
## ATLAS BLAS causes single-precision to fail
|
||||
#BLASLIB = -L/usr/lib/atlas -lblas
|
||||
@@ -46,12 +46,19 @@
|
||||
RANLIB = ranlib
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -DPRNTlevel=0 -O3
|
||||
-NOOPTS =
|
||||
-FORTRAN = g77
|
||||
-FFLAGS = -O2
|
||||
-LOADER = $(CC)
|
||||
-LOADOPTS =
|
||||
+CFLAGS = $(RPM_OPT_FLAGS) -fPIC -fschedule-insns2 \
|
||||
+ -funroll-loops -fstrict-aliasing -frerun-loop-opt \
|
||||
+ -ftree-vectorize -funit-at-a-time
|
||||
+ifeq ($(MACH),i386)
|
||||
+ CFLAGS += -mtune=pentium-m -momit-leaf-frame-pointer # -ffast-math -msse2 -mfpmath=sse
|
||||
+else
|
||||
+ CFLAGS += -O3 -finline-limit=720 --param max-inline-insns-auto=160
|
||||
+endif
|
||||
+NOOPTS = $(RPM_OPT_FLAGS) -Os -fPIC
|
||||
+FORTRAN = gfortran
|
||||
+FFLAGS = $(CFLAGS)
|
||||
+LOADER = gcc
|
||||
+LOADOPTS =
|
||||
|
||||
#
|
||||
# C preprocessor defs for compilation for the Fortran interface
|
||||
@@ -61,5 +68,5 @@
|
||||
#
|
||||
# The directory in which Matlab is installed
|
||||
#
|
||||
-MATLAB = /usr/sww/matlab
|
||||
+#MATLAB = /usr/sww/matlab
|
||||
|
@ -1,25 +0,0 @@
|
||||
Index: SuperLU_3.0/INSTALL/timertst.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/INSTALL/timertst.c
|
||||
+++ SuperLU_3.0/INSTALL/timertst.c
|
||||
@@ -5,8 +5,10 @@ void mysub(int n, double *x, double *y)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+volatile double _dummy;
|
||||
+
|
||||
main()
|
||||
{
|
||||
/* Parameters */
|
||||
#define NMAX 100
|
||||
@@ -32,8 +34,9 @@ main()
|
||||
for (j = 0; j < iters; ++j) {
|
||||
for (i = 0; i < NMAX; ++i)
|
||||
y[i] += alpha * x[i];
|
||||
alpha = -alpha;
|
||||
+ _dummy = y[j%NMAX];
|
||||
}
|
||||
t2 = SuperLU_timer_();
|
||||
tnotim = t2 - t1;
|
||||
if ( tnotim > 0. ){
|
@ -1,182 +0,0 @@
|
||||
Index: SuperLU_3.0/SRC/xerbla.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/SRC/xerbla.c
|
||||
+++ SuperLU_3.0/SRC/xerbla.c
|
||||
@@ -1,5 +1,5 @@
|
||||
-#include "stdio.h"
|
||||
+#include <stdio.h>
|
||||
|
||||
/* Subroutine */ int xerbla_(char *srname, int *info)
|
||||
{
|
||||
/* -- LAPACK auxiliary routine (version 2.0) --
|
||||
Index: SuperLU_3.0/TESTING/MATGEN/lsamen.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/MATGEN/lsamen.c
|
||||
+++ SuperLU_3.0/TESTING/MATGEN/lsamen.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "f2c.h"
|
||||
+#include <string.h>
|
||||
|
||||
logical lsamen_(integer *n, char *ca, char *cb)
|
||||
{
|
||||
/* -- LAPACK auxiliary routine (version 2.0) --
|
||||
Index: SuperLU_3.0/INSTALL/timertst.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/INSTALL/timertst.c
|
||||
+++ SuperLU_3.0/INSTALL/timertst.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
void mysub(int n, double *x, double *y)
|
||||
{
|
||||
return;
|
||||
Index: SuperLU_3.0/TESTING/sdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/sdrive.c
|
||||
+++ SuperLU_3.0/TESTING/sdrive.c
|
||||
@@ -10,8 +10,9 @@
|
||||
* File name: sdrive.c
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_sdefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
||||
#define NTYPES 11 /* Number of matrix types */
|
||||
@@ -21,8 +22,13 @@
|
||||
#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
|
||||
#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
|
||||
|
||||
|
||||
+static void
|
||||
+parse_command_line(int argc, char *argv[], char *matrix_type,
|
||||
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
|
||||
+ int *rowblk, int *colblk, int *lwork, double *u);
|
||||
+
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
* Purpose
|
||||
@@ -82,9 +88,8 @@ main(int argc, char *argv[])
|
||||
SamePattern_SameRowPerm};
|
||||
static trans_t transs[] = {NOTRANS, TRANS, CONJ};
|
||||
|
||||
/* Some function prototypes */
|
||||
- static void parse_command_line();
|
||||
extern int sp_sget01(int, int, SuperMatrix *, SuperMatrix *,
|
||||
SuperMatrix *, int *, float *);
|
||||
extern int sp_sget02(trans_t, int, int, int, SuperMatrix *, float *,
|
||||
int, float *, int, float *resid);
|
||||
Index: SuperLU_3.0/TESTING/ddrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/ddrive.c
|
||||
+++ SuperLU_3.0/TESTING/ddrive.c
|
||||
@@ -10,8 +10,9 @@
|
||||
* File name: ddrive.c
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_ddefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
||||
#define NTYPES 11 /* Number of matrix types */
|
||||
@@ -20,8 +21,12 @@
|
||||
#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
|
||||
#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
|
||||
#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
|
||||
|
||||
+static void
|
||||
+parse_command_line(int argc, char *argv[], char *matrix_type,
|
||||
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
|
||||
+ int *rowblk, int *colblk, int *lwork, double *u);
|
||||
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
@@ -82,9 +87,8 @@ main(int argc, char *argv[])
|
||||
SamePattern_SameRowPerm};
|
||||
static trans_t transs[] = {NOTRANS, TRANS, CONJ};
|
||||
|
||||
/* Some function prototypes */
|
||||
- static void parse_command_line();
|
||||
extern int sp_dget01(int, int, SuperMatrix *, SuperMatrix *,
|
||||
SuperMatrix *, int *, double *);
|
||||
extern int sp_dget02(trans_t, int, int, int, SuperMatrix *, double *,
|
||||
int, double *, int, double *resid);
|
||||
Index: SuperLU_3.0/TESTING/cdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/cdrive.c
|
||||
+++ SuperLU_3.0/TESTING/cdrive.c
|
||||
@@ -10,8 +10,9 @@
|
||||
* File name: cdrive.c
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_cdefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
||||
#define NTYPES 11 /* Number of matrix types */
|
||||
@@ -20,8 +21,12 @@
|
||||
#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
|
||||
#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
|
||||
#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
|
||||
|
||||
+static void
|
||||
+parse_command_line(int argc, char *argv[], char *matrix_type,
|
||||
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
|
||||
+ int *rowblk, int *colblk, int *lwork, double *u);
|
||||
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
@@ -82,9 +87,8 @@ main(int argc, char *argv[])
|
||||
SamePattern_SameRowPerm};
|
||||
static trans_t transs[] = {NOTRANS, TRANS, CONJ};
|
||||
|
||||
/* Some function prototypes */
|
||||
- static void parse_command_line();
|
||||
extern int sp_cget01(int, int, SuperMatrix *, SuperMatrix *,
|
||||
SuperMatrix *, int *, float *);
|
||||
extern int sp_cget02(trans_t, int, int, int, SuperMatrix *, complex *,
|
||||
int, complex *, int, float *resid);
|
||||
Index: SuperLU_3.0/TESTING/zdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/zdrive.c
|
||||
+++ SuperLU_3.0/TESTING/zdrive.c
|
||||
@@ -10,8 +10,9 @@
|
||||
* File name: zdrive.c
|
||||
* Purpose: MAIN test program
|
||||
*/
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
#include "slu_zdefs.h"
|
||||
|
||||
#define NTESTS 5 /* Number of test types */
|
||||
#define NTYPES 11 /* Number of matrix types */
|
||||
@@ -20,8 +21,12 @@
|
||||
#define FMT1 "%10s:n=%d, test(%d)=%12.5g\n"
|
||||
#define FMT2 "%10s:fact=%4d, trans=%4d, equed=%c, n=%d, imat=%d, test(%d)=%12.5g\n"
|
||||
#define FMT3 "%10s:info=%d, izero=%d, n=%d, nrhs=%d, imat=%d, nfail=%d\n"
|
||||
|
||||
+static void
|
||||
+parse_command_line(int argc, char *argv[], char *matrix_type,
|
||||
+ int *n, int *w, int *relax, int *nrhs, int *maxsuper,
|
||||
+ int *rowblk, int *colblk, int *lwork, double *u);
|
||||
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/*
|
||||
@@ -82,9 +87,8 @@ main(int argc, char *argv[])
|
||||
SamePattern_SameRowPerm};
|
||||
static trans_t transs[] = {NOTRANS, TRANS, CONJ};
|
||||
|
||||
/* Some function prototypes */
|
||||
- static void parse_command_line();
|
||||
extern int sp_zget01(int, int, SuperMatrix *, SuperMatrix *,
|
||||
SuperMatrix *, int *, double *);
|
||||
extern int sp_zget02(trans_t, int, int, int, SuperMatrix *, doublecomplex *,
|
||||
int, doublecomplex *, int, double *resid);
|
File diff suppressed because it is too large
Load Diff
@ -1,60 +0,0 @@
|
||||
Index: SuperLU_3.0/TESTING/ddrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/ddrive.c
|
||||
+++ SuperLU_3.0/TESTING/ddrive.c
|
||||
@@ -72,9 +72,9 @@ main(int argc, char *argv[])
|
||||
fact_t fact;
|
||||
trans_t trans;
|
||||
SuperLUStat_t stat;
|
||||
static char matrix_type[8];
|
||||
- static char equed[1], path[3], sym[1], dist[1];
|
||||
+ static char equed[1], path[4], sym[1], dist[1];
|
||||
|
||||
/* Fixed set of parameters */
|
||||
int iseed[] = {1988, 1989, 1990, 1991};
|
||||
static char equeds[] = {'N', 'R', 'C', 'B'};
|
||||
Index: SuperLU_3.0/TESTING/sdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/sdrive.c
|
||||
+++ SuperLU_3.0/TESTING/sdrive.c
|
||||
@@ -72,9 +72,9 @@ main(int argc, char *argv[])
|
||||
fact_t fact;
|
||||
trans_t trans;
|
||||
SuperLUStat_t stat;
|
||||
static char matrix_type[8];
|
||||
- static char equed[1], path[3], sym[1], dist[1];
|
||||
+ static char equed[1], path[4], sym[1], dist[1];
|
||||
|
||||
/* Fixed set of parameters */
|
||||
int iseed[] = {1988, 1989, 1990, 1991};
|
||||
static char equeds[] = {'N', 'R', 'C', 'B'};
|
||||
Index: SuperLU_3.0/TESTING/zdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/zdrive.c
|
||||
+++ SuperLU_3.0/TESTING/zdrive.c
|
||||
@@ -72,9 +72,9 @@ main(int argc, char *argv[])
|
||||
fact_t fact;
|
||||
trans_t trans;
|
||||
SuperLUStat_t stat;
|
||||
static char matrix_type[8];
|
||||
- static char equed[1], path[3], sym[1], dist[1];
|
||||
+ static char equed[1], path[4], sym[1], dist[1];
|
||||
|
||||
/* Fixed set of parameters */
|
||||
int iseed[] = {1988, 1989, 1990, 1991};
|
||||
static char equeds[] = {'N', 'R', 'C', 'B'};
|
||||
Index: SuperLU_3.0/TESTING/cdrive.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/TESTING/cdrive.c
|
||||
+++ SuperLU_3.0/TESTING/cdrive.c
|
||||
@@ -72,9 +72,9 @@ main(int argc, char *argv[])
|
||||
fact_t fact;
|
||||
trans_t trans;
|
||||
SuperLUStat_t stat;
|
||||
static char matrix_type[8];
|
||||
- static char equed[1], path[3], sym[1], dist[1];
|
||||
+ static char equed[1], path[4], sym[1], dist[1];
|
||||
|
||||
/* Fixed set of parameters */
|
||||
int iseed[] = {1988, 1989, 1990, 1991};
|
||||
static char equeds[] = {'N', 'R', 'C', 'B'};
|
@ -1,32 +0,0 @@
|
||||
Index: SuperLU_3.0/SRC/cutil.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/SRC/cutil.c
|
||||
+++ SuperLU_3.0/SRC/cutil.c
|
||||
@@ -239,9 +239,10 @@ cPrint_SuperNode_Matrix(char *what, Supe
|
||||
nsup = sup_to_col[k+1] - c;
|
||||
for (j = c; j < c + nsup; ++j) {
|
||||
d = Astore->nzval_colptr[j];
|
||||
for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
|
||||
- printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d++], dp[d++]);
|
||||
+ printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d], dp[d+1]);
|
||||
+ d += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
Index: SuperLU_3.0/SRC/zutil.c
|
||||
===================================================================
|
||||
--- SuperLU_3.0.orig/SRC/zutil.c
|
||||
+++ SuperLU_3.0/SRC/zutil.c
|
||||
@@ -239,9 +239,10 @@ zPrint_SuperNode_Matrix(char *what, Supe
|
||||
nsup = sup_to_col[k+1] - c;
|
||||
for (j = c; j < c + nsup; ++j) {
|
||||
d = Astore->nzval_colptr[j];
|
||||
for (i = rowind_colptr[c]; i < rowind_colptr[c+1]; ++i) {
|
||||
- printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d++], dp[d++]);
|
||||
+ printf("%d\t%d\t%e\t%e\n", rowind[i], j, dp[d], dp[d+1]);
|
||||
+ d += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if 0
|
@ -1,3 +1,51 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 18 22:21:27 UTC 2012 - scorot@free.fr
|
||||
|
||||
- Update to SuperLU 4.3:
|
||||
* Remove recursive DFS for postordering elimination tree in
|
||||
sp_coletree.c (The nonrecursive routine nr_etdfs() was
|
||||
contributed by Cedric Doucet, CEDRAT Group, Meylan, France.)
|
||||
* Make supermatrix.h the same for all three libraries
|
||||
* Include an on-line HTML documentation for the source code
|
||||
* Corrected backward error BERR formula when a component of the
|
||||
RHS and the residual are exactly zero
|
||||
* Change parameter "delta" to genmmd() from 1 to 0 in get_perm_c
|
||||
remove "static" declaration in EXAMPLE/xlinsolx*.c
|
||||
* Include threshold-based incomplete factorization (ILU)
|
||||
* Removed the static global variables so that it is thread-safe.
|
||||
* Make superlu_options_t{} structure and enum constants the same
|
||||
for both superlu & superlu_dist.
|
||||
* Replace qsort by "quick select" (qselect) in ILU's secondary
|
||||
dropping.
|
||||
* Replace mc64ad.f by mc64ad.c using f2c.
|
||||
* Bug fixes in ilu_sdrop_row.c.
|
||||
* Bug fixes in xgsisx.c, so that when mc64 permutation is used
|
||||
in ILU, the right-hand side is permuted properly.
|
||||
* Add parameter #7 in sp_ienv(), setting as the maxsuper for ILU
|
||||
code (smaller than parameter #3).
|
||||
* Update Users Guide.
|
||||
* Update doxygen code documentation.
|
||||
* Fix a bug in ILU driver routine dgsisx.c, so that on return,
|
||||
the initial row permutation is combined with perm_r[] from
|
||||
partial pivoting.
|
||||
* Modify 2 ILU examples: EXAMPLE/ditersol.c, EXAMPLE/ditersol1.c
|
||||
* Update superlu_timer.c
|
||||
- Remove unneeded patches
|
||||
+ superlu-overflow.patch : Applied upstream
|
||||
+ superlu-initialize.diff : Applied upstream
|
||||
+ superlu-undef-code.diff : Applied upstream
|
||||
- Updated patches
|
||||
+ superlu-4.3.diff
|
||||
+ superlu-4.3-include.patch
|
||||
+ superlu-4.3-dont-opt-away.diff
|
||||
- Build shared libraries
|
||||
- Put shared libs and devel files in separate packages
|
||||
- Use rpm macros instead of plain directory names
|
||||
- Add %%ckeck
|
||||
- Update documentation file %%source1 and put html and examples
|
||||
files in %%doc
|
||||
- Spec file reformating
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 29 01:48:27 UTC 2012 - jengelh@medozas.de
|
||||
|
||||
|
120
superlu.spec
120
superlu.spec
@ -16,24 +16,25 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: superlu
|
||||
BuildRequires: gcc-fortran tcsh
|
||||
Summary: A general purpose library for the direct solution of linear equations
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: blas2
|
||||
Summary: SuperLU matrix solver
|
||||
Version: 3.0
|
||||
Release: 141
|
||||
Version: 4.3
|
||||
Release: 0
|
||||
Source: ftp://ftp.netlib.org/scalapack/prototype/superlu_%{version}.tar.bz2
|
||||
Source1: superlu_ug.ps.gz
|
||||
Patch: superlu-3.0.diff
|
||||
Patch1: superlu-overflow.patch
|
||||
Patch2: superlu-include.patch
|
||||
Patch3: superlu-dont-opt-away.diff
|
||||
Patch4: superlu-initialize.diff
|
||||
Patch5: superlu-undef-code.diff
|
||||
Source1: superlu_ug.pdf
|
||||
# PATCH-FEATURE-OPENSUSE superlu-4.3.diff : add compiler and build flags in make.inc
|
||||
Patch: superlu-4.3.diff
|
||||
# PATCH-FIX-UPSTREAM superlu-4.3-include.patch : avoid implicit declaration warnings
|
||||
Patch1: superlu-4.3-include.patch
|
||||
# PATCH-FIX-UPSTREAM superlu-4.3-dont-opt-away.diff
|
||||
Patch2: superlu-4.3-dont-opt-away.diff
|
||||
Url: http://crd.lbl.gov/~xiaoye/SuperLU/
|
||||
BuildRequires: blas
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: tcsh
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -43,45 +44,82 @@ linear systems that the author is aware of.
|
||||
|
||||
Docu can be found on http://www.netlib.org.
|
||||
|
||||
%package -n libsuperlu4
|
||||
Summary: SuperLU matrix solver
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libsuperlu4
|
||||
SuperLU is an algorithm that uses group theory to optimize LU
|
||||
decomposition of sparse matrices. It's the fastest direct solver for
|
||||
linear systems that the author is aware of.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
xiaoye@nersc.gov
|
||||
Docu can be found on http://www.netlib.org.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: superlu = %{version}
|
||||
Obsoletes: superlu < %{version}
|
||||
Requires: libsuperlu4 = %{version}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -n SuperLU_%{version}
|
||||
%setup -q -n SuperLU_%{version}
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
# superlu_ug.pdf in %%doc
|
||||
cp %SOURCE1 ./
|
||||
|
||||
%build
|
||||
#cd ../SuperLU
|
||||
make -C CBLAS #%{?_smp_mflags}
|
||||
make #%{?_smp_mflags}
|
||||
make
|
||||
|
||||
mkdir tmp
|
||||
(cd tmp; ar -x ../lib/libsuperlu_%{version}.a)
|
||||
gfortran -shared -Wl,-soname,libsuperlu.so.4 -o libsuperlu.so.%{version} tmp/*.o
|
||||
|
||||
%install
|
||||
install -d $RPM_BUILD_ROOT/%{_docdir}/superlu
|
||||
make install_lib LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
|
||||
make install_blas LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/usr/include/superlu
|
||||
install -m 0644 SRC/*.h $RPM_BUILD_ROOT/usr/include/superlu/
|
||||
cp -pf README $RPM_BUILD_ROOT/%{_docdir}/superlu/README.SuperLU
|
||||
cp -pf %SOURCE1 $RPM_BUILD_ROOT/%{_docdir}/superlu/
|
||||
cp -ax EXAMPLE $RPM_BUILD_ROOT/%{_docdir}/superlu/
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_includedir}
|
||||
install -m644 SRC/*.h %{buildroot}%{_includedir}
|
||||
install -m755 *.so.* %{buildroot}%{_libdir}
|
||||
ln -s %{_libdir}/libsuperlu.so.%{version} %{buildroot}%{_libdir}/libsuperlu.so.4
|
||||
ln -s %{_libdir}/libsuperlu.so.4 %{buildroot}%{_libdir}/libsuperlu.so
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%docdir %{_docdir}/superlu
|
||||
%doc %{_docdir}/superlu
|
||||
%{_libdir}/libsuperlu.a
|
||||
%{_libdir}/superlu_*.a
|
||||
%{_libdir}/libblas2.a/
|
||||
%{_libdir}/blas2_*.a
|
||||
%dir /usr/include/superlu
|
||||
/usr/include/superlu/*
|
||||
#fix permissions
|
||||
chmod 644 MATLAB/*
|
||||
|
||||
# remove all build examples
|
||||
cd EXAMPLE
|
||||
make clean
|
||||
rm -rf *itersol*
|
||||
cd ..
|
||||
mv EXAMPLE examples
|
||||
cp FORTRAN/README README.fortran
|
||||
%fdupes -s examples
|
||||
|
||||
%check
|
||||
cd TESTING
|
||||
./stest
|
||||
./ztest
|
||||
cd ..
|
||||
|
||||
%post -n libsuperlu4 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libsuperlu4 -p /sbin/ldconfig
|
||||
|
||||
%files -n libsuperlu4
|
||||
%defattr(-,root,root,-)
|
||||
%doc README MATLAB
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc DOC/html examples README.fortran superlu_ug.pdf
|
||||
%{_includedir}/*.h
|
||||
%{_libdir}/*.so
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da1781b3376809be733884cda341c14bfeaffbc82a41b2a82565028d57907b16
|
||||
size 867019
|
3
superlu_4.3.tar.bz2
Normal file
3
superlu_4.3.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f6df0c9dd5025c6ff695cc274c76eedceb90b0feddabafc6ce6379145e00681
|
||||
size 2227499
|
3
superlu_ug.pdf
Normal file
3
superlu_ug.pdf
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cb9b6dca641582b8346fdb58f22bc0b1284b5cbf99a322f8094f824059be8e6a
|
||||
size 382387
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e22d349f1f5288cfce768909b2e91ad3b95ee656d546cbbbacc3bf1a6ff1f76
|
||||
size 204281
|
Loading…
Reference in New Issue
Block a user