Skip to content

Commit 1be9cbe

Browse files
committed
adding symmetric pattern option to the python interface
1 parent 3703527 commit 1be9cbe

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

EXAMPLE/pddrive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def setup_pdbridge(sp,INT64):
7575

7676

7777
####################### create the matrix
78-
INT64 = 0 # whether to use 64bit integer (requring superlu_dist to be compiled with 64-bit indexing)
78+
INT64 = 1 # whether to use 64bit integer (requring superlu_dist to be compiled with 64-bit indexing)
7979
rng = np.random.default_rng()
8080
n = 1000
8181
nrhs = 1
@@ -110,6 +110,7 @@ def setup_pdbridge(sp,INT64):
110110
argv.extend(['-q', '2']) # column permutation
111111
argv.extend(['-s', '0']) # parallel symbolic factorization, needs -q to be 5
112112
argv.extend(['-i', '0']) # whether to use iterative refinement 0, 1, 2
113+
argv.extend(['-m', '0']) # whether to use symmetric pattern 0 or 1
113114
argc = len(argv)
114115
if(rank==0):
115116
print('SuperLU options: ',argv[1:])

SRC/double/pdbridge.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void pdbridge_init(int_t m, int_t n, int_t nnz, int_t *rowind, int_t *colptr , d
3232
double *berr;
3333
double *b, *xtrue;
3434
int m1, n1;
35-
int nprow, npcol, lookahead, colperm, rowperm, ir, symbfact, batch;
35+
int nprow, npcol, lookahead, colperm, rowperm, ir, symbfact, batch, sympattern;
3636
int iam, info, ldb, ldx;
3737
char **cpp, c, *postfix;;
3838
FILE *fp, *fopen();
@@ -56,6 +56,7 @@ void pdbridge_init(int_t m, int_t n, int_t nnz, int_t *rowind, int_t *colptr , d
5656
rowperm = -1;
5757
ir = -1;
5858
symbfact = -1;
59+
sympattern=0;
5960
batch = 0;
6061

6162
/* ------------------------------------------------------------
@@ -104,6 +105,7 @@ void pdbridge_init(int_t m, int_t n, int_t nnz, int_t *rowind, int_t *colptr , d
104105
switch (c) {
105106
case 'h':
106107
printf("Options:\n");
108+
printf("\t-m <int>: symmetric pattern (default %4d)\n", sympattern);
107109
printf("\t-r <int>: process rows (default %4d)\n", nprow);
108110
printf("\t-c <int>: process columns (default %4d)\n", npcol);
109111
printf("\t-p <int>: row permutation (default %4d)\n", (slu_obj->options).RowPerm);
@@ -130,6 +132,8 @@ void pdbridge_init(int_t m, int_t n, int_t nnz, int_t *rowind, int_t *colptr , d
130132
break;
131133
case 'b': batch = atoi(*cpp);
132134
break;
135+
case 'm': sympattern = atoi(*cpp);
136+
break;
133137
}
134138
} else { /* Last arg is considered a filename */
135139
if ( !(fp = fopen(*cpp, "r")) ) {
@@ -145,6 +149,7 @@ void pdbridge_init(int_t m, int_t n, int_t nnz, int_t *rowind, int_t *colptr , d
145149
if (lookahead != -1) (slu_obj->options).num_lookaheads = lookahead;
146150
if (ir != -1) (slu_obj->options).IterRefine = ir;
147151
if (symbfact != -1) (slu_obj->options).ParSymbFact = symbfact;
152+
if (sympattern==1) (slu_obj->options).SymPattern = YES;
148153

149154
int superlu_acc_offload = sp_ienv_dist(10, &(slu_obj->options)); //get_acc_offload();
150155

example_scripts/batch_script_mpi_runit_perlmutter_python_gcc_nvshmem.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ export MPICH_MAX_THREAD_SAFETY=multiple
9393

9494

9595
cd ../EXAMPLE/
96-
srun -n $NCORE_VAL_TOT2D -c $TH_PER_RANK --cpu_bind=cores python ./pddrive.py -c $NCOL -r $NROW
96+
srun -n $NCORE_VAL_TOT2D -c $TH_PER_RANK --cpu_bind=cores python ./pddrive.py -c $NCOL -r $NROW -s 1 -q 5 -m 1
9797

9898

0 commit comments

Comments
 (0)