A general purpose library for the direct solution of linear equations OBS-URL: https://build.opensuse.org/request/show/144828 OBS-URL: https://build.opensuse.org/package/show/science/superlu_dist?expand=0&rev=1
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
diff -aruN SuperLU_DIST_3.1.orig/SRC/util.c SuperLU_DIST_3.1/SRC/util.c
|
|
--- SuperLU_DIST_3.1.orig/SRC/util.c 2012-05-19 00:48:30.000000000 +0200
|
|
+++ SuperLU_DIST_3.1/SRC/util.c 2012-09-06 22:44:16.011904085 +0200
|
|
@@ -653,7 +653,7 @@
|
|
get_diag_procs(int_t n, Glu_persist_t *Glu_persist, gridinfo_t *grid,
|
|
int_t *num_diag_procs, int_t **diag_procs, int_t **diag_len)
|
|
{
|
|
- int_t i, j, k, knsupc, nprow, npcol, nsupers, pkk;
|
|
+ int_t i, i_next, j, j_next, k, knsupc, nprow, npcol, nsupers, pkk;
|
|
int_t *xsup;
|
|
|
|
i = j = *num_diag_procs = pkk = 0;
|
|
@@ -664,8 +664,10 @@
|
|
|
|
do {
|
|
++(*num_diag_procs);
|
|
- i = (++i) % nprow;
|
|
- j = (++j) % npcol;
|
|
+ i_next = i + 1;
|
|
+ i = (i_next) % nprow;
|
|
+ j_next = j +1;
|
|
+ j = (j_next) % npcol;
|
|
pkk = PNUM( i, j, grid );
|
|
} while ( pkk != 0 ); /* Until wrap back to process 0 */
|
|
if ( !(*diag_procs = intMalloc_dist(*num_diag_procs)) )
|
|
@@ -675,8 +677,10 @@
|
|
for (i = j = k = 0; k < *num_diag_procs; ++k) {
|
|
pkk = PNUM( i, j, grid );
|
|
(*diag_procs)[k] = pkk;
|
|
- i = (++i) % nprow;
|
|
- j = (++j) % npcol;
|
|
+ i_next = i + 1;
|
|
+ i = (i_next) % nprow;
|
|
+ j_next = j +1;
|
|
+ j = (j_next) % npcol;
|
|
}
|
|
for (k = 0; k < nsupers; ++k) {
|
|
knsupc = SuperSize( k );
|