Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 364083
Collapse All | Expand All

(-)a/SRC/cpivotL.c (+9 lines)
Lines 125-131 if ( jcol == MIN_COL ) { Link Here
125
    /* Test for singularity */
125
    /* Test for singularity */
126
    if ( pivmax == 0.0 ) {
126
    if ( pivmax == 0.0 ) {
127
#if 1
127
#if 1
128
#if SCIPY_FIX
129
	if (pivptr < nsupr) {
130
	    *pivrow = lsub_ptr[pivptr];
131
	}
132
	else {
133
	    *pivrow = diagind;
134
	}
135
#else
128
	*pivrow = lsub_ptr[pivptr];
136
	*pivrow = lsub_ptr[pivptr];
137
#endif
129
	perm_r[*pivrow] = jcol;
138
	perm_r[*pivrow] = jcol;
130
#else
139
#else
131
	perm_r[diagind] = jcol;
140
	perm_r[diagind] = jcol;
(-)a/SRC/dlamch.c (-2 / +6 lines)
Lines 673-681 double dlamc3_(double *a, double *b) Link Here
673
{
673
{
674
/* >>Start of File<<   
674
/* >>Start of File<<   
675
       System generated locals */
675
       System generated locals */
676
    double ret_val;
676
    volatile double ret_val;
677
    volatile double x;
678
    volatile double y;
677
679
678
    ret_val = *a + *b;
680
    x = *a;
681
    y = *b;
682
    ret_val = x + y;
679
683
680
    return ret_val;
684
    return ret_val;
681
685
(-)a/SRC/dpivotL.c (+9 lines)
Lines 124-130 if ( jcol == MIN_COL ) { Link Here
124
    /* Test for singularity */
124
    /* Test for singularity */
125
    if ( pivmax == 0.0 ) {
125
    if ( pivmax == 0.0 ) {
126
#if 1
126
#if 1
127
#if SCIPY_FIX
128
	if (pivptr < nsupr) {
129
	    *pivrow = lsub_ptr[pivptr];
130
	}
131
	else {
132
	    *pivrow = diagind;
133
	}
134
#else
127
	*pivrow = lsub_ptr[pivptr];
135
	*pivrow = lsub_ptr[pivptr];
136
#endif
128
	perm_r[*pivrow] = jcol;
137
	perm_r[*pivrow] = jcol;
129
#else
138
#else
130
	perm_r[diagind] = jcol;
139
	perm_r[diagind] = jcol;
(-)a/SRC/ilu_cpivotL.c (+8 lines)
Lines 136-144 ilu_cpivotL( Link Here
136
136
137
    /* Test for singularity */
137
    /* Test for singularity */
138
    if (pivmax < 0.0) {
138
    if (pivmax < 0.0) {
139
#if SCIPY_FIX
140
	ABORT("[0]: matrix is singular");
141
#else
139
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
142
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
140
	fflush(stderr);
143
	fflush(stderr);
141
	exit(1);
144
	exit(1);
145
#endif
142
    }
146
    }
143
    if ( pivmax == 0.0 ) {
147
    if ( pivmax == 0.0 ) {
144
	if (diag != EMPTY)
148
	if (diag != EMPTY)
Lines 151-159 ilu_cpivotL( Link Here
151
	    for (icol = jcol; icol < n; icol++)
155
	    for (icol = jcol; icol < n; icol++)
152
		if (marker[swap[icol]] <= jcol) break;
156
		if (marker[swap[icol]] <= jcol) break;
153
	    if (icol >= n) {
157
	    if (icol >= n) {
158
#if SCIPY_FIX
159
		ABORT("[1]: matrix is singular");
160
#else
154
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
161
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
155
		fflush(stderr);
162
		fflush(stderr);
156
		exit(1);
163
		exit(1);
164
#endif
157
	    }
165
	    }
158
166
159
	    *pivrow = swap[icol];
167
	    *pivrow = swap[icol];
(-)a/SRC/ilu_dpivotL.c (+8 lines)
Lines 134-142 ilu_dpivotL( Link Here
134
134
135
    /* Test for singularity */
135
    /* Test for singularity */
136
    if (pivmax < 0.0) {
136
    if (pivmax < 0.0) {
137
#if SCIPY_FIX
138
	ABORT("[0]: matrix is singular");
139
#else
137
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
140
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
138
	fflush(stderr);
141
	fflush(stderr);
139
	exit(1);
142
	exit(1);
143
#endif
140
    }
144
    }
141
    if ( pivmax == 0.0 ) {
145
    if ( pivmax == 0.0 ) {
142
	if (diag != EMPTY)
146
	if (diag != EMPTY)
Lines 149-157 ilu_dpivotL( Link Here
149
	    for (icol = jcol; icol < n; icol++)
153
	    for (icol = jcol; icol < n; icol++)
150
		if (marker[swap[icol]] <= jcol) break;
154
		if (marker[swap[icol]] <= jcol) break;
151
	    if (icol >= n) {
155
	    if (icol >= n) {
156
#if SCIPY_FIX
157
		ABORT("[1]: matrix is singular");
158
#else
152
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
159
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
153
		fflush(stderr);
160
		fflush(stderr);
154
		exit(1);
161
		exit(1);
162
#endif
155
	    }
163
	    }
156
164
157
	    *pivrow = swap[icol];
165
	    *pivrow = swap[icol];
(-)a/SRC/ilu_spivotL.c (+8 lines)
Lines 134-142 ilu_spivotL( Link Here
134
134
135
    /* Test for singularity */
135
    /* Test for singularity */
136
    if (pivmax < 0.0) {
136
    if (pivmax < 0.0) {
137
#if SCIPY_FIX
138
	ABORT("[0]: matrix is singular");
139
#else
137
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
140
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
138
	fflush(stderr);
141
	fflush(stderr);
139
	exit(1);
142
	exit(1);
143
#endif
140
    }
144
    }
141
    if ( pivmax == 0.0 ) {
145
    if ( pivmax == 0.0 ) {
142
	if (diag != EMPTY)
146
	if (diag != EMPTY)
Lines 149-157 ilu_spivotL( Link Here
149
	    for (icol = jcol; icol < n; icol++)
153
	    for (icol = jcol; icol < n; icol++)
150
		if (marker[swap[icol]] <= jcol) break;
154
		if (marker[swap[icol]] <= jcol) break;
151
	    if (icol >= n) {
155
	    if (icol >= n) {
156
#if SCIPY_FIX
157
		ABORT("[1]: matrix is singular");
158
#else
152
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
159
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
153
		fflush(stderr);
160
		fflush(stderr);
154
		exit(1);
161
		exit(1);
162
#endif
155
	    }
163
	    }
156
164
157
	    *pivrow = swap[icol];
165
	    *pivrow = swap[icol];
(-)a/SRC/ilu_zpivotL.c (+8 lines)
Lines 136-144 ilu_zpivotL( Link Here
136
136
137
    /* Test for singularity */
137
    /* Test for singularity */
138
    if (pivmax < 0.0) {
138
    if (pivmax < 0.0) {
139
#if SCIPY_FIX
140
	ABORT("[0]: matrix is singular");
141
#else
139
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
142
	fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
140
	fflush(stderr);
143
	fflush(stderr);
141
	exit(1);
144
	exit(1);
145
#endif
142
    }
146
    }
143
    if ( pivmax == 0.0 ) {
147
    if ( pivmax == 0.0 ) {
144
	if (diag != EMPTY)
148
	if (diag != EMPTY)
Lines 151-159 ilu_zpivotL( Link Here
151
	    for (icol = jcol; icol < n; icol++)
155
	    for (icol = jcol; icol < n; icol++)
152
		if (marker[swap[icol]] <= jcol) break;
156
		if (marker[swap[icol]] <= jcol) break;
153
	    if (icol >= n) {
157
	    if (icol >= n) {
158
#if SCIPY_FIX
159
		ABORT("[1]: matrix is singular");
160
#else
154
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
161
		fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
155
		fflush(stderr);
162
		fflush(stderr);
156
		exit(1);
163
		exit(1);
164
#endif
157
	    }
165
	    }
158
166
159
	    *pivrow = swap[icol];
167
	    *pivrow = swap[icol];
(-)a/SRC/scipy_slu_config.h (+36 lines)
Line 0 Link Here
1
#ifndef SCIPY_SLU_CONFIG_H
2
#define SCIPY_SLU_CONFIG_H
3
4
#include <stdlib.h>
5
6
/*
7
 * Support routines
8
 */
9
void superlu_python_module_abort(char *msg);
10
void *superlu_python_module_malloc(size_t size);
11
void superlu_python_module_free(void *ptr);
12
13
#define USER_ABORT  superlu_python_module_abort
14
#define USER_MALLOC superlu_python_module_malloc
15
#define USER_FREE   superlu_python_module_free
16
17
#define SCIPY_FIX 1
18
19
/*
20
 * Fortran configuration
21
 */
22
#if defined(NO_APPEND_FORTRAN)
23
#if defined(UPPERCASE_FORTRAN)
24
#define UpCase 1
25
#else
26
#define NoChange 1
27
#endif
28
#else
29
#if defined(UPPERCASE_FORTRAN)
30
#error Uppercase and trailing slash in Fortran names not supported
31
#else
32
#define Add_ 1
33
#endif
34
#endif
35
36
#endif
(-)a/SRC/slamch.c (-4 / +6 lines)
Lines 684-694 double slamc3_(float *a, float *b) Link Here
684
684
685
/* >>Start of File<<   
685
/* >>Start of File<<   
686
       System generated locals */
686
       System generated locals */
687
    float ret_val;
687
    volatile float ret_val;
688
688
    volatile float x;
689
689
    volatile float y;
690
690
691
    ret_val = *a + *b;
691
    x = *a;
692
    y = *b;
693
    ret_val = x + y;
692
694
693
    return ret_val;
695
    return ret_val;
694
696
(-)a/SRC/slu_Cnames.h (+1 lines)
Lines 19-24 Link Here
19
#ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
19
#ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
20
#define __SUPERLU_CNAMES
20
#define __SUPERLU_CNAMES
21
21
22
#include "scipy_slu_config.h"
22
23
23
#define ADD_       0
24
#define ADD_       0
24
#define ADD__      1
25
#define ADD__      1
(-)a/SRC/slu_util.h (+2 lines)
Lines 22-27 Link Here
22
#include <assert.h>
22
#include <assert.h>
23
#include "superlu_enum_consts.h"
23
#include "superlu_enum_consts.h"
24
24
25
#include "scipy_slu_config.h"
26
25
/***********************************************************************
27
/***********************************************************************
26
 * Macros
28
 * Macros
27
 ***********************************************************************/
29
 ***********************************************************************/
(-)a/SRC/spivotL.c (+9 lines)
Lines 124-130 if ( jcol == MIN_COL ) { Link Here
124
    /* Test for singularity */
124
    /* Test for singularity */
125
    if ( pivmax == 0.0 ) {
125
    if ( pivmax == 0.0 ) {
126
#if 1
126
#if 1
127
#if SCIPY_FIX
128
	if (pivptr < nsupr) {
129
	    *pivrow = lsub_ptr[pivptr];
130
	}
131
	else {
132
	    *pivrow = diagind;
133
	}
134
#else
127
	*pivrow = lsub_ptr[pivptr];
135
	*pivrow = lsub_ptr[pivptr];
136
#endif
128
	perm_r[*pivrow] = jcol;
137
	perm_r[*pivrow] = jcol;
129
#else
138
#else
130
	perm_r[diagind] = jcol;
139
	perm_r[diagind] = jcol;
(-)a/SRC/util.c (-1 / +1 lines)
Lines 29-35 Link Here
29
29
30
void superlu_abort_and_exit(char* msg)
30
void superlu_abort_and_exit(char* msg)
31
{
31
{
32
    fprintf(stderr, msg);
32
    fprintf(stderr, "%s\n", msg);
33
    exit (-1);
33
    exit (-1);
34
}
34
}
35
35
(-)a/SRC/zpivotL.c (-6 / +18 lines)
Lines 125-131 if ( jcol == MIN_COL ) { Link Here
125
    /* Test for singularity */
125
    /* Test for singularity */
126
    if ( pivmax == 0.0 ) {
126
    if ( pivmax == 0.0 ) {
127
#if 1
127
#if 1
128
#if SCIPY_FIX
129
	if (pivptr < nsupr) {
130
	    *pivrow = lsub_ptr[pivptr];
131
	}
132
	else {
133
	    *pivrow = diagind;
134
	}
135
#else
128
	*pivrow = lsub_ptr[pivptr];
136
	*pivrow = lsub_ptr[pivptr];
137
#endif
129
	perm_r[*pivrow] = jcol;
138
	perm_r[*pivrow] = jcol;
130
#else
139
#else
131
	perm_r[diagind] = jcol;
140
	perm_r[diagind] = jcol;
132
-- a/SRC/Makefile.am
141
++ b/SRC/Makefile.am
Lines 16-22 Link Here
16
	slu_scomplex.h \
16
	slu_scomplex.h \
17
	slu_util.h \
17
	slu_util.h \
18
	superlu_enum_consts.h \
18
	superlu_enum_consts.h \
19
	supermatrix.h
19
	supermatrix.h \
20
	scipy_slu_config.h
20
21
21
### LAPACK 
22
### LAPACK 
22
LAAUX 	= lsame.c xerbla.c
23
LAAUX 	= lsame.c xerbla.c
23
-- a/TESTING/MATGEN/Makefile
24
++ b/TESTING/MATGEN/Makefile>
Lines 31-36 Link Here
31
#######################################################################
31
#######################################################################
32
ALLAUX  = lsamen.o
32
ALLAUX  = lsamen.o
33
33
34
HEADER  = ../../SRC
35
34
SCATGEN = slatm1.o slaran.o slarnd.o slaruv.o slabad.o slarnv.o
36
SCATGEN = slatm1.o slaran.o slarnd.o slaruv.o slabad.o slarnv.o
35
SLASRC  = slatb4.o slaset.o slartg.o
37
SLASRC  = slatb4.o slaset.o slartg.o
36
SMATGEN = slatms.o slatme.o slatmr.o \
38
SMATGEN = slatms.o slatme.o slatmr.o \
Lines 78-81 Link Here
78
clean:
80
clean:
79
	rm -f *.o ../$(TMGLIB)
81
	rm -f *.o ../$(TMGLIB)
80
82
81
.c.o: ; $(CC) $(CFLAGS) $(CDEFS) -c $<
83
.c.o: ; $(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -L$(HEADER) -c $<
82
-- a/TESTING/Makefile
84
++ b/TESTING/Makefile
Lines 98-104 Link Here
98
timer.o:  timer.c ; $(CC) -O -c $<
98
timer.o:  timer.c ; $(CC) -O -c $<
99
99
100
.c.o:
100
.c.o:
101
	$(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -c $< $(VERBOSE)
101
	$(CC) $(CFLAGS) $(CDEFS) -I$(HEADER) -L$(HEADER) -c $< $(VERBOSE)
102
102
103
clean:	
103
clean:	
104
	rm -f *.o *test *.out
104
	rm -f *.o *test *.out

Return to bug 364083