Accepting request 149218 from devel:libraries:c_c++

- repackage original source tarball in order to remove the
  HSL mc64ad routine that caonnt be redistributed bnc#796236
- add README.SUSE file in the %%doci in order to explain 
  that change

- add patch superlu-4.3-disable-hsl.patch in order to disable HSL
  code from the library
- update patch superlu-4.3.diff so that test routines are run
  against the  shared library
- build tests routines in %%check section

- 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

OBS-URL: https://build.opensuse.org/request/show/149218
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/superlu?expand=0&rev=13
This commit is contained in:
Stephan Kulow 2013-01-21 17:29:40 +00:00 committed by Git OBS Bridge
commit 7407ce7905
17 changed files with 353 additions and 3113 deletions

7
README.SUSE Normal file
View File

@ -0,0 +1,7 @@
This version of SuperLU is slightly different form the original SuperLU
available on http://crd.lbl.gov/~xiaoye/SuperLU/. For legal reasons the
routine mc64ad from the Harwell Subroutine Library cannot be redistributed
by openSUSE and have been removed form the sources.
However the SuperLU library provided by openSUSE is fully functionnal
except that the mc64ad routine is not used.

View File

@ -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

View File

@ -0,0 +1,48 @@
diff -aruN SuperLU_4.3.orig/SRC/Makefile SuperLU_4.3/SRC/Makefile
--- SuperLU_4.3.orig/SRC/Makefile 2011-10-27 21:49:47.000000000 +0200
+++ SuperLU_4.3/SRC/Makefile 2013-01-08 21:59:19.495919213 +0100
@@ -51,7 +51,7 @@
sp_coletree.o sp_preorder.o sp_ienv.o relax_snode.o \
heap_relax_snode.o colamd.o \
ilu_relax_snode.o ilu_heap_relax_snode.o mark_relax.o \
- mc64ad.o qselect.o
+ qselect.o
SLUSRC = \
sgssv.o sgssvx.o \
@@ -63,7 +63,7 @@
sreadhb.o sreadrb.o sreadtriple.o \
scolumn_dfs.o scolumn_bmod.o spivotL.o spruneL.o \
smemory.o sutil.o smyblas2.o \
- sgsisx.o sgsitrf.o sldperm.o \
+ sgsitrf.o \
ilu_sdrop_row.o ilu_ssnode_dfs.o \
ilu_scolumn_dfs.o ilu_spanel_dfs.o ilu_scopy_to_ucol.o \
ilu_spivotL.o sdiagonal.o
@@ -77,7 +77,7 @@
dreadhb.o dreadrb.o dreadtriple.o \
dcolumn_dfs.o dcolumn_bmod.o dpivotL.o dpruneL.o \
dmemory.o dutil.o dmyblas2.o \
- dgsisx.o dgsitrf.o dldperm.o \
+ dgsitrf.o \
ilu_ddrop_row.o ilu_dsnode_dfs.o \
ilu_dcolumn_dfs.o ilu_dpanel_dfs.o ilu_dcopy_to_ucol.o \
ilu_dpivotL.o ddiagonal.o
@@ -92,7 +92,7 @@
creadhb.o creadrb.o creadtriple.o \
ccolumn_dfs.o ccolumn_bmod.o cpivotL.o cpruneL.o \
cmemory.o cutil.o cmyblas2.o \
- cgsisx.o cgsitrf.o cldperm.o \
+ cgsitrf.o \
ilu_cdrop_row.o ilu_csnode_dfs.o \
ilu_ccolumn_dfs.o ilu_cpanel_dfs.o ilu_ccopy_to_ucol.o \
ilu_cpivotL.o cdiagonal.o
@@ -106,7 +106,7 @@
zreadhb.o zreadrb.o zreadtriple.o \
zcolumn_dfs.o zcolumn_bmod.o zpivotL.o zpruneL.o \
zmemory.o zutil.o zmyblas2.o \
- zgsisx.o zgsitrf.o zldperm.o \
+ zgsitrf.o \
ilu_zdrop_row.o ilu_zsnode_dfs.o \
ilu_zcolumn_dfs.o ilu_zpanel_dfs.o ilu_zcopy_to_ucol.o \
ilu_zpivotL.o zdiagonal.o

View 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
View 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 */

94
superlu-4.3.diff Normal file
View File

@ -0,0 +1,94 @@
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 2013-01-08 21:28:11.755985160 +0100
@@ -21,14 +21,15 @@
#
# 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
+SUPERLUSLIB = -L../lib -lsuperlu
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 +47,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 +69,5 @@
#
# The directory in which Matlab is installed
#
-MATLAB = /usr/sww/matlab
+#MATLAB = /usr/sww/matlab
diff -aruN SuperLU_4.3.orig/TESTING/Makefile SuperLU_4.3/TESTING/Makefile
--- SuperLU_4.3.orig/TESTING/Makefile 2011-10-27 21:49:47.000000000 +0200
+++ SuperLU_4.3/TESTING/Makefile 2013-01-08 21:12:51.444017656 +0100
@@ -54,7 +54,7 @@
./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) $(SUPERLUSLIB) $(BLASLIB) -lm -o $@
stest.out: stest stest.csh
@echo Testing SINGLE PRECISION linear equation routines
@@ -64,7 +64,7 @@
./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) $(SUPERLUSLIB) $(BLASLIB) -lm -o $@
dtest.out: dtest dtest.csh
@echo Testing DOUBLE PRECISION linear equation routines
@@ -74,7 +74,7 @@
./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) $(SUPERLUSLIB) $(BLASLIB) -lm -o $@
ctest.out: ctest ctest.csh
@echo Testing SINGLE COMPLEX linear equation routines
@@ -84,7 +84,7 @@
./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
+ $(TMGLIB) $(SUPERLUSLIB) $(BLASLIB) -lm -o $@
ztest.out: ztest ztest.csh
@echo Testing DOUBLE COMPLEX linear equation routines

View File

@ -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. ){

View File

@ -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

View File

@ -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'};

View File

@ -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

View File

@ -1,3 +1,68 @@
-------------------------------------------------------------------
Tue Jan 15 21:14:51 UTC 2013 - scorot@free.fr
- repackage original source tarball in order to remove the
HSL mc64ad routine that caonnt be redistributed bnc#796236
- add README.SUSE file in the %%doci in order to explain
that change
-------------------------------------------------------------------
Tue Jan 8 20:47:13 UTC 2013 - scorot@free.fr
- add patch superlu-4.3-disable-hsl.patch in order to disable HSL
code from the library
- update patch superlu-4.3.diff so that test routines are run
against the shared library
- build tests routines in %%check section
-------------------------------------------------------------------
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

View File

@ -1,7 +1,7 @@
#
# spec file for package superlu
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,24 +16,32 @@
#
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
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
Version: 4.3
Release: 0
#Source: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz
Source: superlu_%{version}-bsd.tar.bz2
Source1: superlu_ug.pdf
Source2: README.SUSE
# 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
# PATCH-FIX-OPENSUSE superlu-4.3-remove-hsl.patch [bnc#796236]
# The Harwell Subroutine Library (HSL) routine m64ad.c have been removed
# from the original sources for legal reasons. This patch disables the inclusion of
# this routine in the library which, however, remains fully functionnal
Patch3: superlu-4.3-disable-hsl.patch
Url: http://crd.lbl.gov/~xiaoye/SuperLU/
BuildRequires: blas
BuildRequires: fdupes
BuildRequires: gcc-fortran
BuildRequires: tcsh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -43,45 +51,86 @@ 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 %SOURCE2 ./
%build
#cd ../SuperLU
make -C CBLAS #%{?_smp_mflags}
make #%{?_smp_mflags}
make lib
mkdir tmp
(cd tmp; ar -x ../lib/libsuperlu_%{version}.a)
gfortran -shared -Wl,-soname,libsuperlu.so.4 -o lib/libsuperlu.so 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 lib/libsuperlu.so %{buildroot}%{_libdir}/libsuperlu.so.%{version}
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
ln -s examples/ EXAMPLE
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
make testing
echo -ne "\nTest results\n"
for i in stest dtest ctest ztest; do
cat TESTING/$i.out
done
%post -n libsuperlu4 -p /sbin/ldconfig
%postun -n libsuperlu4 -p /sbin/ldconfig
%files -n libsuperlu4
%defattr(-,root,root,-)
%doc README MATLAB README.SUSE
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%doc DOC/html examples README.fortran superlu_ug.pdf
%{_includedir}/*.h
%{_libdir}/*.so
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da1781b3376809be733884cda341c14bfeaffbc82a41b2a82565028d57907b16
size 867019

3
superlu_4.3-bsd.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7147d51d0218ada61ef190397595f77df7de42ff4f84087b81918ec6a2564039
size 2159982

3
superlu_ug.pdf Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb9b6dca641582b8346fdb58f22bc0b1284b5cbf99a322f8094f824059be8e6a
size 382387

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e22d349f1f5288cfce768909b2e91ad3b95ee656d546cbbbacc3bf1a6ff1f76
size 204281