13 #ifndef __SUPERLU_dDEFS
14 #define __SUPERLU_dDEFS
34 #define MAX_LOOKAHEADS 50
225 double *,
double *,
int_t *);
228 double,
double,
char *);
233 double,
double,
char *);
235 double [],
int,
double [],
int,
int,
241 int,
double,
double *,
int);
243 double *,
int,
double,
double *,
int);
266 double [],
int_t *,
double [],
double []);
281 extern void dlsum_fmod(
double *,
double *,
double *,
double *,
285 extern void dlsum_bmod(
double *,
double *,
double *,
300 double [],
double []);
302 double [],
double []);
306 double x[],
double ax[]);
331 double **,
int **,
int **);
352 #ifdef USE_VENDOR_BLAS
353 extern int dgemm_(
const char*,
const char*,
const int*,
const int*,
const int*,
354 const double*,
const double*,
const int*,
const double*,
355 const int*,
const double*,
double*,
const int*,
int,
int);
356 extern int dtrsv_(
char*,
char*,
char*,
int*,
double*,
int*,
357 double*,
int*,
int,
int,
int);
358 extern int dtrsm_(
char*,
char*,
char*,
char*,
int*,
int*,
359 double*,
double*,
int*,
double*,
360 int*,
int,
int,
int,
int);
361 extern int dgemv_(
char *,
int *,
int *,
double *,
double *a,
int *,
362 double *,
int *,
double *,
double *,
int *,
int);
364 extern int dgemm_(
const char*,
const char*,
const int*,
const int*,
const int*,
365 const double*,
const double*,
const int*,
366 const double*,
const int*,
const double*,
367 double*,
const int*);
368 extern int dtrsv_(
char*,
char*,
char*,
int*,
double*,
int*,
370 extern int dtrsm_(
char*,
char*,
char*,
char*,
int*,
int*,
371 double*,
double*,
int*,
double*,
int*);
372 extern int dgemv_(
char *,
int *,
int *,
double *,
double *a,
int *,
373 double *,
int *,
double *,
double *,
int *);
376 extern int dger_(
int*,
int*,
double*,
double*,
int*,
377 double*,
int*,
double*,
int*);
void * duser_malloc_dist(int_t bytes, int_t which_end)
Definition: dmemory.c:20
int dSolveInit(superlu_options_t *options, SuperMatrix *A, int_t perm_r[], int_t perm_c[], int_t nrhs, LUstruct_t *LUstruct, gridinfo_t *grid, SOLVEstruct_t *SOLVEstruct)
Initialize the data structure for the solution phase.
Definition: pdutil.c:393
void pdgsmv(int_t abs, SuperMatrix *A_internal, gridinfo_t *grid, pdgsmv_comm_t *gsmv_comm, double x[], double ax[])
Definition: pdgsmv.c:225
int_t * extern_start
Definition: superlu_ddefs.h:122
int_t n_utsendx
Definition: superlu_ddefs.h:97
int * ptr_to_ibuf
Definition: superlu_ddefs.h:145
void pdgsequ(SuperMatrix *A, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int_t *info, gridinfo_t *grid)
Definition: pdgsequ.c:76
void pdinf_norm_error(int iam, int_t n, int_t nrhs, double x[], int_t ldx, double xtrue[], int_t ldxtrue, gridinfo_t *grid)
Check the inf-norm of the error vector.
Definition: pdutil.c:499
void dCopy_CompCol_Matrix_dist(SuperMatrix *A, SuperMatrix *B)
Copy matrix A into matrix B.
Definition: dutil.c:113
int_t nfrecvmod
Definition: superlu_ddefs.h:109
void dFillRHS_dist(char *trans, int_t nrhs, double *x, int_t ldx, SuperMatrix *A, double *rhs, int_t ldb)
Let rhs[i] = sum of i-th row of A, so the solution vector is all 1's.
Definition: dutil.c:298
void dCompRow_to_CompCol_dist(int_t m, int_t n, int_t nnz, double *a, int_t *colind, int_t *rowptr, double **at, int_t **rowind, int_t **colptr)
Convert a row compressed storage into a column compressed storage.
Definition: dutil.c:75
int_t ** Ucb_valptr
Definition: superlu_ddefs.h:104
Definition: superlu_defs.h:250
Definition: psymbfact.h:47
int_t lbnum
Definition: superlu_ddefs.h:26
int_t n_utrecvx
Definition: superlu_ddefs.h:98
void * send_dbuf
Definition: superlu_ddefs.h:152
void pdlaqgs(SuperMatrix *A, double *r, double *c, double rowcnd, double colcnd, double amax, char *equed)
Definition: pdlaqgs.c:75
int * disp_ibuf
Definition: superlu_ddefs.h:150
pdgsmv_comm_t * gsmv_comm
Definition: superlu_ddefs.h:166
Definition: superlu_defs.h:501
int_t * fmod
Definition: superlu_ddefs.h:65
int ** ToSendR
Definition: superlu_ddefs.h:62
int_t nbrecvx
Definition: superlu_ddefs.h:73
int sp_dgemv_dist(char *trans, double alpha, SuperMatrix *A, double *x, int incx, double beta, double *y, int incy)
Definition: dsp_blas2.c:382
int * B_to_X_SendCnt
Definition: superlu_ddefs.h:143
double * ujrow
Definition: superlu_ddefs.h:50
int_t nfrecvx
Definition: superlu_ddefs.h:68
int_t SolveMsgVol
Definition: superlu_ddefs.h:82
void dreadrb_dist(FILE *fp, int_t *nrow, int_t *ncol, int_t *nonz, double **nzval, int **rowind, int **colptr)
Definition: dreadrb.c:273
Definition: superlu_ddefs.h:121
int dgemv_(char *, int *, int *, double *, double *a, int *, double *, int *, double *, double *, int *)
Definition: dgemv.c:9
void pdgsrfs_ABXglobal(int_t n, SuperMatrix *A, double anorm, LUstruct_t *LUstruct, gridinfo_t *grid, double *B, int_t ldb, double *X, int_t ldx, int nrhs, double *berr, SuperLUStat_t *stat, int *info)
Definition: pdgsrfs_ABXglobal.c:112
double dlangs_dist(char *norm, SuperMatrix *A)
Definition: dlangs.c:52
Definition: util_dist.h:72
double * doubleMalloc_dist(int_t n)
Definition: dmemory.c:142
int_t n_utrecvmod
Definition: superlu_ddefs.h:99
int_t * row_to_proc
Definition: superlu_ddefs.h:163
Definition: supermatrix.h:44
void pdgsmv_init(SuperMatrix *A, int_t *row_to_proc, gridinfo_t *grid, pdgsmv_comm_t *gsmv_comm)
Definition: pdgsmv.c:17
int_t * bmod
Definition: superlu_ddefs.h:70
fact_t
Definition: superlu_enum_consts.h:17
int_t * etree
Definition: superlu_ddefs.h:114
int_t TotalValSend
Definition: superlu_ddefs.h:137
int_t indpos
Definition: superlu_ddefs.h:27
Stype_t
Definition: supermatrix.h:12
int_t * ilsum
Definition: superlu_ddefs.h:78
Definition: superlu_ddefs.h:25
void pdgsrfs(int_t n, SuperMatrix *A, double anorm, LUstruct_t *LUstruct, ScalePermstruct_t *ScalePermstruct, gridinfo_t *grid, double *B, int_t ldb, double *X, int_t ldx, int nrhs, SOLVEstruct_t *SOLVEstruct, double *berr, SuperLUStat_t *stat, int *info)
Definition: pdgsrfs.c:107
void LUstructFree(LUstruct_t *)
Deallocate LUstruct.
Definition: util.c:205
int pdPermute_Dense_Matrix(int_t fst_row, int_t m_loc, int_t row_to_proc[], int_t perm[], double X[], int ldx, double B[], int ldb, int nrhs, gridinfo_t *grid)
Permute the distributed dense matrix: B <= perm(X). perm[i] = j means the i-th row of X is in the j-t...
Definition: pdutil.c:281
int_t * Urbs
Definition: superlu_ddefs.h:102
void Destroy_LU(int_t, gridinfo_t *, LUstruct_t *)
Destroy distributed L & U matrices.
Definition: util.c:101
void dldperm_dist(int_t job, int_t n, int_t nnz, int_t colptr[], int_t adjncy[], double nzval[], int_t *perm, double u[], double v[])
Definition: dldperm_dist.c:85
Definition: superlu_ddefs.h:162
double * val_torecv
Definition: superlu_ddefs.h:134
void dfill_dist(double *a, int_t alen, double dval)
Fills a double precision array with a given value.
Definition: dutil.c:311
int_t ** fsendx_plist
Definition: superlu_ddefs.h:66
int * ToSendD
Definition: superlu_ddefs.h:61
Glu_persist_t * Glu_persist
Definition: superlu_ddefs.h:115
int_t nfsendx
Definition: superlu_ddefs.h:69
void dGenXtrue_dist(int_t n, int_t nrhs, double *x, int_t ldx)
Definition: dutil.c:285
int_t UT_SOLVE
Definition: superlu_ddefs.h:89
double pdlangs(char *norm, SuperMatrix *A, gridinfo_t *grid)
Definition: pdlangs.c:55
int dtrsm_(char *, char *, char *, char *, int *, int *, double *, double *, int *, double *, int *)
Definition: dtrsm.c:9
float ddistribute(fact_t fact, int_t n, SuperMatrix *A, Glu_freeable_t *Glu_freeable, LUstruct_t *LUstruct, gridinfo_t *grid)
Definition: ddistribute.c:51
int dgemm_(const char *, const char *, const int *, const int *, const int *, const double *, const double *, const int *, const double *, const int *, const double *, double *, const int *)
#define NBUFFERS
Definition: superlu_defs.h:100
Definition: superlu_defs.h:355
int dcreate_matrix_dat(SuperMatrix *, int, double **, int *, double **, int *, FILE *, gridinfo_t *)
void dPrintLblocks(int iam, int_t nsupers, gridinfo_t *grid, Glu_persist_t *Glu_persist, LocalLU_t *Llu)
Print the blocks in the factored matrix L.
Definition: dutil.c:369
int_t * send_ibuf
Definition: superlu_ddefs.h:151
void dPrint_CompCol_Matrix_dist(SuperMatrix *A)
Definition: dutil.c:133
void dPrintUblocks(int iam, int_t nsupers, gridinfo_t *grid, Glu_persist_t *Glu_persist, LocalLU_t *Llu)
Print the blocks in the factored matrix U.
Definition: dutil.c:418
int pdgsmv_AXglobal_setup(SuperMatrix *A, Glu_persist_t *Glu_persist, gridinfo_t *grid, int_t *m, int_t *update[], double *val[], int_t *bindx[], int_t *mv_sup_to_proc)
Definition: pdgsmv_AXglobal.c:23
void dreadhb_dist(int iam, FILE *fp, int_t *nrow, int_t *ncol, int_t *nonz, double **nzval, int_t **rowind, int_t **colptr)
Definition: dreadhb.c:97
void dPrint_Dense_Matrix_dist(SuperMatrix *A)
Definition: dutil.c:157
void pdgstrs_Bglobal(int_t n, LUstruct_t *LUstruct, gridinfo_t *grid, double *B, int_t ldb, int nrhs, SuperLUStat_t *stat, int *info)
Definition: pdgstrs_Bglobal.c:94
Definition: superlu_defs.h:227
void dinf_norm_error_dist(int_t n, int_t nrhs, double *x, int_t ldx, double *xtrue, int_t ldxtrue, gridinfo_t *grid)
Check the inf-norm of the error vector.
Definition: dutil.c:321
void dlsum_fmod(double *lsum, double *x, double *xk, double *rtemp, int nrhs, int knsupc, int_t k, int_t *fmod, int_t nlb, int_t lptr, int_t luptr, int_t *xsup, gridinfo_t *grid, LocalLU_t *Llu, MPI_Request send_req[], SuperLUStat_t *stat)
Definition: pdgstrs_lsum.c:45
int_t * A_colind_gsmv
Definition: superlu_ddefs.h:168
int_t ldalsum
Definition: superlu_ddefs.h:80
double ** Unzval_br_ptr
Definition: superlu_ddefs.h:39
void dallocateA_dist(int_t n, int_t nnz, double **a, int_t **asub, int_t **xa)
Definition: dmemory.c:134
int_t FRECV
Definition: superlu_ddefs.h:91
int_t ** Lrowind_bc_ptr
Definition: superlu_ddefs.h:36
void dlaqgs_dist(SuperMatrix *A, double *r, double *c, double rowcnd, double colcnd, double amax, char *equed)
Definition: dlaqgs.c:71
int_t * utrecv
Definition: superlu_ddefs.h:96
int * RecvCounts
Definition: superlu_ddefs.h:131
int_t * mod_bit
Definition: superlu_ddefs.h:75
int_t * frecv
Definition: superlu_ddefs.h:67
Definition: superlu_defs.h:305
int_t nleaf
Definition: superlu_ddefs.h:108
int_t num_diag_procs
Definition: superlu_ddefs.h:165
void pdgssvx_ABglobal(superlu_options_t *options, SuperMatrix *A, ScalePermstruct_t *ScalePermstruct, double B[], int ldb, int nrhs, gridinfo_t *grid, LUstruct_t *LUstruct, double *berr, SuperLUStat_t *stat, int *info)
Definition: pdgssvx_ABglobal.c:455
void duser_free_dist(int_t bytes, int_t which_end)
Definition: dmemory.c:39
int_t * recv_ibuf2
Definition: superlu_ddefs.h:156
void pdgstrs(int_t n, LUstruct_t *LUstruct, ScalePermstruct_t *ScalePermstruct, gridinfo_t *grid, double *B, int_t m_loc, int_t fst_row, int_t ldb, int nrhs, SOLVEstruct_t *SOLVEstruct, SuperLUStat_t *stat, int *info)
Definition: pdgstrs.c:456
int_t x2b
Definition: superlu_ddefs.h:154
double ** Lnzval_bc_ptr
Definition: superlu_ddefs.h:37
int dPrint_CompRowLoc_Matrix_dist(SuperMatrix *A)
Definition: dutil.c:174
Definition: superlu_ddefs.h:142
Mtype_t
Definition: supermatrix.h:32
void dSolveFinalize(superlu_options_t *options, SOLVEstruct_t *SOLVEstruct)
Release the resources used for the solution phase.
Definition: pdutil.c:480
int static_schedule(superlu_options_t *options, int m, int n, LUstruct_t *LUstruct, gridinfo_t *grid, SuperLUStat_t *stat, int_t *perm_c_supno, int_t *iperm_c_supno, int *info)
Definition: static_schedule.c:36
int_t * send_ibuf2
Definition: superlu_ddefs.h:155
void dCopy_Dense_Matrix_dist(int_t M, int_t N, double *X, int_t ldx, double *Y, int_t ldy)
Definition: dutil.c:237
int_t * utmod
Definition: superlu_ddefs.h:94
int * ToRecv
Definition: superlu_ddefs.h:60
LocalLU_t * Llu
Definition: superlu_ddefs.h:116
int_t pdgstrf(superlu_options_t *options, int m, int n, double anorm, LUstruct_t *LUstruct, gridinfo_t *grid, SuperLUStat_t *stat, int *info)
Definition: pdgstrf_irecv.c:183
double * val_tosend
Definition: superlu_ddefs.h:133
int pdgsmv_AXglobal(int_t m, int_t update[], double val[], int_t bindx[], double X[], double ax[])
Definition: pdgsmv_AXglobal.c:249
void dCreate_SuperNode_Matrix_dist(SuperMatrix *L, int_t m, int_t n, int_t nnz, double *nzval, int_t *nzval_colptr, int_t *rowind, int_t *rowind_colptr, int_t *col_to_sup, int_t *sup_to_col, Stype_t stype, Dtype_t dtype, Mtype_t mtype)
Definition: dutil.c:257
int_t dQuerySpace_dist(int_t n, LUstruct_t *LUstruct, gridinfo_t *grid, SuperLUStat_t *stat, mem_usage_t *mem_usage)
Definition: dmemory.c:63
int int_t
Definition: superlu_defs.h:37
int_t * xrow_to_proc
Definition: superlu_ddefs.h:172
int dcreate_matrix(SuperMatrix *, int, double **, int *, double **, int *, FILE *, gridinfo_t *)
Definition: dcreate_matrix.c:56
int_t pxgstrs_init(int_t, int_t, int_t, int_t, int_t[], int_t[], gridinfo_t *grid, Glu_persist_t *, SOLVEstruct_t *)
Definition: util.c:415
int_t * ptr_ind_tosend
Definition: superlu_ddefs.h:125
int_t ** Ufstnz_br_ptr
Definition: superlu_ddefs.h:38
int sp_dgemm_dist(char *transa, int n, double alpha, SuperMatrix *A, double *b, int ldb, double beta, double *c, int ldc)
Definition: dsp_blas3.c:114
int_t * ind_tosend
Definition: superlu_ddefs.h:123
void * send_dbuf2
Definition: superlu_ddefs.h:157
void pdgsmv_finalize(pdgsmv_comm_t *gsmv_comm)
Definition: pdgsmv.c:361
int_t * ind_torecv
Definition: superlu_ddefs.h:124
float pddistribute(fact_t fact, int_t n, SuperMatrix *A, ScalePermstruct_t *ScalePermstruct, Glu_freeable_t *Glu_freeable, LUstruct_t *LUstruct, gridinfo_t *grid)
Definition: pddistribute.c:310
int_t L_SOLVE
Definition: superlu_ddefs.h:90
int_t nroot
Definition: superlu_ddefs.h:100
int * X_to_B_vSendCnt
Definition: superlu_ddefs.h:149
void LUstructInit(const int_t, LUstruct_t *)
Allocate storage in LUstruct.
Definition: util.c:192
int_t TotalIndSend
Definition: superlu_ddefs.h:135
Definition: superlu_ddefs.h:35
int * X_to_B_iSendCnt
Definition: superlu_ddefs.h:148
Dtype_t
Definition: supermatrix.h:25
int * X_to_B_SendCnt
Definition: superlu_ddefs.h:144
int sp_dtrsv_dist(char *uplo, char *trans, char *diag, SuperMatrix *L, SuperMatrix *U, double *x, int *info)
Definition: dsp_blas2.c:83
void dgsequ_dist(SuperMatrix *A, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int_t *info)
Definition: dgsequ.c:74
Definitions which are precision-neutral.
void dCreate_Dense_Matrix_dist(SuperMatrix *X, int_t m, int_t n, double *x, int_t ldx, Stype_t stype, Dtype_t dtype, Mtype_t mtype)
Definition: dutil.c:218
int pdCompRow_loc_to_CompCol_global(int_t need_value, SuperMatrix *A, gridinfo_t *grid, SuperMatrix *GA)
Gather A from the distributed compressed row format to global A in compressed column format...
Definition: pdutil.c:19
int dger_(int *, int *, double *, double *, int *, double *, int *, double *, int *)
Definition: dger.c:9
int_t ** ut_sendx_plist
Definition: superlu_ddefs.h:95
Definition: superlu_defs.h:531
int_t * inv_perm_c
Definition: superlu_ddefs.h:164
void pxgstrs_finalize(pxgstrs_comm_t *)
Definition: util.c:542
int file_PrintDouble5(FILE *fp, char *name, int_t len, double *x)
Definition: dutil.c:354
int_t ut_ldalsum
Definition: superlu_ddefs.h:92
Definition: superlu_ddefs.h:113
void dlsum_bmod(double *lsum, double *x, double *xk, int nrhs, int_t k, int_t *bmod, int_t *Urbs, Ucb_indptr_t **Ucb_indptr, int_t **Ucb_valptr, int_t *xsup, gridinfo_t *grid, LocalLU_t *Llu, MPI_Request send_req[], SuperLUStat_t *stat)
Definition: pdgstrs_lsum.c:208
int pdgsmv_AXglobal_abs(int_t m, int_t update[], double val[], int_t bindx[], double X[], double ax[])
Definition: pdgsmv_AXglobal.c:275
pxgstrs_comm_t * gstrs_comm
Definition: superlu_ddefs.h:167
void dreadtriple(FILE *fp, int_t *m, int_t *n, int_t *nonz, double **nzval, int_t **rowind, int_t **colptr)
Definition: dreadtriple.c:25
double * doubleCalloc_dist(int_t n)
Definition: dmemory.c:149
int_t * ut_modbit
Definition: superlu_ddefs.h:101
int dcreate_matrix_rb(SuperMatrix *, int, double **, int *, double **, int *, FILE *, gridinfo_t *)
void * recv_dbuf2
Definition: superlu_ddefs.h:158
void dCreate_CompCol_Matrix_dist(SuperMatrix *A, int_t m, int_t n, int_t nnz, double *nzval, int_t *rowind, int_t *colptr, Stype_t stype, Dtype_t dtype, Mtype_t mtype)
Definition: dutil.c:28
void pdgssvx(superlu_options_t *options, SuperMatrix *A, ScalePermstruct_t *ScalePermstruct, double B[], int ldb, int nrhs, gridinfo_t *grid, LUstruct_t *LUstruct, SOLVEstruct_t *SOLVEstruct, double *berr, SuperLUStat_t *stat, int *info)
Definition: pdgssvx.c:486
Ucb_indptr_t ** Ucb_indptr
Definition: superlu_ddefs.h:103
void dCreate_CompRowLoc_Matrix_dist(SuperMatrix *A, int_t m, int_t n, int_t nnz_loc, int_t m_loc, int_t fst_row, double *nzval, int_t *colind, int_t *rowptr, Stype_t stype, Dtype_t dtype, Mtype_t mtype)
Definition: dutil.c:49
int dtrsv_(char *, char *, char *, int *, double *, int *, double *, int *)
Definition: dtrsv.c:9
int_t nbsendx
Definition: superlu_ddefs.h:74
int_t ** bsendx_plist
Definition: superlu_ddefs.h:71
int_t * brecv
Definition: superlu_ddefs.h:72
int_t * ut_ilsum
Definition: superlu_ddefs.h:93
#define MAX_LOOKAHEADS
Definition: superlu_ddefs.h:34
int_t SolveMsgSent
Definition: superlu_ddefs.h:81
int_t n
Definition: superlu_ddefs.h:107
int * SendCounts
Definition: superlu_ddefs.h:129
float ddist_psymbtonum(fact_t fact, int_t n, SuperMatrix *A, ScalePermstruct_t *ScalePermstruct, Pslu_freeable_t *Pslu_freeable, LUstruct_t *LUstruct, gridinfo_t *grid)
Definition: pdsymbfact_distdata.c:1177
int_t * ptr_ind_torecv
Definition: superlu_ddefs.h:127