Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions SRC/cpanel_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,14 @@ cpanel_bmod (
CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#else
ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#endif
#else
#else
clsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
#endif

Expand Down Expand Up @@ -428,10 +432,14 @@ cpanel_bmod (
CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#else
ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ctrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#endif

luptr += segsze; /* Dense matrix-vector */
tempv1 = &tempv[segsze];
alpha = one;
Expand Down
15 changes: 8 additions & 7 deletions SRC/cpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,14 @@ if ( jcol == MIN_COL ) {

/* Test for singularity */
if ( pivmax == 0.0 ) {
#if 0
// There is no valid pivot.
// jcol represents the rank of U,
// report the rank, let dgstrf handle the pivot
*pivrow = lsub_ptr[pivptr];
perm_r[*pivrow] = jcol;
#endif
/* There is no valid pivot. jcol represents the rank of U,
report the rank, let cgstrf handle the pivot. */
if (pivptr < nsupr) {
*pivrow = lsub_ptr[pivptr];
}
else {
*pivrow = diagind;
}
*usepr = 0;
return (jcol+1);
}
Expand Down
6 changes: 5 additions & 1 deletion SRC/csnode_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ csnode_bmod (
CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
#else
ctrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
if (nsupr < nsupc) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ctrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
&lusup[ufirst], &incx );
cgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
Expand Down
14 changes: 11 additions & 3 deletions SRC/dpanel_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,14 @@ dpanel_bmod (
STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#else
dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#endif
#else
#else
dlsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
#endif

Expand Down Expand Up @@ -400,7 +404,11 @@ dpanel_bmod (
STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#else
dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
dtrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#endif

Expand Down
15 changes: 8 additions & 7 deletions SRC/dpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@ if ( jcol == MIN_COL ) {

/* Test for singularity */
if ( pivmax == 0.0 ) {
#if 0
// There is no valid pivot.
// jcol represents the rank of U,
// report the rank, let dgstrf handle the pivot
*pivrow = lsub_ptr[pivptr];
perm_r[*pivrow] = jcol;
#endif
/* There is no valid pivot. jcol represents the rank of U,
report the rank, let dgstrf handle the pivot. */
if (pivptr < nsupr) {
*pivrow = lsub_ptr[pivptr];
}
else {
*pivrow = diagind;
}
*usepr = 0;
return (jcol+1);
}
Expand Down
6 changes: 5 additions & 1 deletion SRC/dsnode_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ dsnode_bmod (
SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
#else
dtrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
if (nsupr < nsupc) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
dtrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
&lusup[ufirst], &incx );
dgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
Expand Down
12 changes: 2 additions & 10 deletions SRC/ilu_cpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ ilu_cpivotL(

/* Test for singularity */
if (pivmax < 0.0) {
/*fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[0]: matrix is singular");
}
if ( pivmax == 0.0 ) {
if (diag != SLU_EMPTY)
Expand All @@ -164,11 +160,7 @@ ilu_cpivotL(
for (icol = jcol; icol < n; icol++)
if (marker[swap[icol]] <= jcol) break;
if (icol >= n) {
/* fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[1]: matrix is singular");
}

*pivrow = swap[icol];
Expand Down
12 changes: 2 additions & 10 deletions SRC/ilu_dpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ ilu_dpivotL(

/* Test for singularity */
if (pivmax < 0.0) {
/*fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[0]: matrix is singular");
}
if ( pivmax == 0.0 ) {
if (diag != SLU_EMPTY)
Expand All @@ -162,11 +158,7 @@ ilu_dpivotL(
for (icol = jcol; icol < n; icol++)
if (marker[swap[icol]] <= jcol) break;
if (icol >= n) {
/* fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[1]: matrix is singular");
}

*pivrow = swap[icol];
Expand Down
12 changes: 2 additions & 10 deletions SRC/ilu_spivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ ilu_spivotL(

/* Test for singularity */
if (pivmax < 0.0) {
/*fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[0]: matrix is singular");
}
if ( pivmax == 0.0 ) {
if (diag != SLU_EMPTY)
Expand All @@ -162,11 +158,7 @@ ilu_spivotL(
for (icol = jcol; icol < n; icol++)
if (marker[swap[icol]] <= jcol) break;
if (icol >= n) {
/* fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[1]: matrix is singular");
}

*pivrow = swap[icol];
Expand Down
12 changes: 2 additions & 10 deletions SRC/ilu_zpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ ilu_zpivotL(

/* Test for singularity */
if (pivmax < 0.0) {
/*fprintf(stderr, "[0]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[0]: matrix is singular");
}
if ( pivmax == 0.0 ) {
if (diag != SLU_EMPTY)
Expand All @@ -164,11 +160,7 @@ ilu_zpivotL(
for (icol = jcol; icol < n; icol++)
if (marker[swap[icol]] <= jcol) break;
if (icol >= n) {
/* fprintf(stderr, "[1]: jcol=%d, SINGULAR!!!\n", jcol);
fflush(stderr);
exit(1); */
*usepr = 0;
return (jcol+1);
ABORT("[1]: matrix is singular");
}

*pivrow = swap[icol];
Expand Down
14 changes: 11 additions & 3 deletions SRC/spanel_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,14 @@ spanel_bmod (
STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#else
strsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
strsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#endif
#else
#else
slsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
#endif

Expand Down Expand Up @@ -400,7 +404,11 @@ spanel_bmod (
STRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#else
strsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
strsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#endif

Expand Down
15 changes: 8 additions & 7 deletions SRC/spivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@ if ( jcol == MIN_COL ) {

/* Test for singularity */
if ( pivmax == 0.0 ) {
#if 0
// There is no valid pivot.
// jcol represents the rank of U,
// report the rank, let dgstrf handle the pivot
*pivrow = lsub_ptr[pivptr];
perm_r[*pivrow] = jcol;
#endif
/* There is no valid pivot. jcol represents the rank of U,
report the rank, let sgstrf handle the pivot. */
if (pivptr < nsupr) {
*pivrow = lsub_ptr[pivptr];
}
else {
*pivrow = diagind;
}
*usepr = 0;
return (jcol+1);
}
Expand Down
6 changes: 5 additions & 1 deletion SRC/ssnode_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ ssnode_bmod (
SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
#else
strsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
if (nsupr < nsupc) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
strsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
&lusup[ufirst], &incx );
sgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
Expand Down
16 changes: 12 additions & 4 deletions SRC/zpanel_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,14 @@ zpanel_bmod (
CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#else
ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, TriTmp, &incx );
#endif
#else
#else
zlsolve ( nsupr, segsze, &lusup[luptr], TriTmp );
#endif

Expand Down Expand Up @@ -428,10 +432,14 @@ zpanel_bmod (
CTRSV( ftcs1, ftcs2, ftcs3, &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#else
ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
if (nsupr < segsze) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ztrsv_( "L", "N", "U", &segsze, &lusup[luptr],
&nsupr, tempv, &incx );
#endif

luptr += segsze; /* Dense matrix-vector */
tempv1 = &tempv[segsze];
alpha = one;
Expand Down
15 changes: 8 additions & 7 deletions SRC/zpivotL.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,14 @@ if ( jcol == MIN_COL ) {

/* Test for singularity */
if ( pivmax == 0.0 ) {
#if 0
// There is no valid pivot.
// jcol represents the rank of U,
// report the rank, let dgstrf handle the pivot
*pivrow = lsub_ptr[pivptr];
perm_r[*pivrow] = jcol;
#endif
/* There is no valid pivot. jcol represents the rank of U,
report the rank, let zgstrf handle the pivot. */
if (pivptr < nsupr) {
*pivrow = lsub_ptr[pivptr];
}
else {
*pivrow = diagind;
}
*usepr = 0;
return (jcol+1);
}
Expand Down
6 changes: 5 additions & 1 deletion SRC/zsnode_bmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ zsnode_bmod (
CGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
#else
ztrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
if (nsupr < nsupc) {
/* Fail early rather than passing in invalid parameters to TRSV. */
ABORT("failed to factorize matrix");
}
ztrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
&lusup[ufirst], &incx );
zgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
Expand Down