00001 00012 #ifndef __SUPERLU_DEFS /* allow multiple inclusions */ 00013 #define __SUPERLU_DEFS 00014 00015 /* 00016 * File name: superlu_defs.h 00017 * Purpose: Definitions which are precision-neutral 00018 */ 00019 #ifdef _CRAY 00020 #include <fortran.h> 00021 #include <string.h> 00022 #endif 00023 #include <mpi.h> 00024 #include <stdlib.h> 00025 #include <stdio.h> 00026 00027 00028 /* Define my integer size int_t */ 00029 #ifdef _CRAY 00030 typedef short int_t; 00031 /*#undef int Revert back to int of default size. */ 00032 #define mpi_int_t MPI_SHORT 00033 #elif defined (_LONGINT) 00034 typedef long long int int_t; 00035 #define mpi_int_t MPI_LONG 00036 #else /* Default */ 00037 typedef int int_t; 00038 #define mpi_int_t MPI_INT 00039 #endif 00040 00041 #include "superlu_enum_consts.h" 00042 #include "Cnames.h" 00043 #include "supermatrix.h" 00044 #include "util_dist.h" 00045 #include "psymbfact.h" 00046 00047 00048 /*********************************************************************** 00049 * Constants 00050 ***********************************************************************/ 00051 /* 00052 * For each block column of L, the index[] array contains both the row 00053 * subscripts and the integers describing the size of the blocks. 00054 * The organization of index[] looks like: 00055 * 00056 * [ BLOCK COLUMN HEADER (size BC_HEADER) 00057 * number of blocks 00058 * number of row subscripts, i.e., LDA of nzval[] 00059 * BLOCK 0 <---- 00060 * BLOCK DESCRIPTOR (of size LB_DESCRIPTOR) | 00061 * block number (global) | 00062 * number of full rows in the block | 00063 * actual row subscripts | 00064 * BLOCK 1 | Repeat ... 00065 * BLOCK DESCRIPTOR | number of blocks 00066 * block number (global) | 00067 * number of full rows in the block | 00068 * actual row subscripts | 00069 * . | 00070 * . | 00071 * . <---- 00072 * ] 00073 * 00074 * For each block row of U, the organization of index[] looks like: 00075 * 00076 * [ BLOCK ROW HEADER (of size BR_HEADER) 00077 * number of blocks 00078 * number of entries in nzval[] 00079 * number of entries in index[] 00080 * BLOCK 0 <---- 00081 * BLOCK DESCRIPTOR (of size UB_DESCRIPTOR) | 00082 * block number (global) | 00083 * number of nonzeros in the block | 00084 * actual fstnz subscripts | 00085 * BLOCK 1 | Repeat ... 00086 * BLOCK DESCRIPTOR | number of blocks 00087 * block number (global) | 00088 * number of nonzeros in the block | 00089 * actual fstnz subscripts | 00090 * . | 00091 * . | 00092 * . <---- 00093 * ] 00094 * 00095 */ 00096 #define BC_HEADER 2 00097 #define LB_DESCRIPTOR 2 00098 #define BR_HEADER 3 00099 #define UB_DESCRIPTOR 2 00100 #define NBUFFERS 5 00101 00102 /* 00103 * Communication tags 00104 */ 00105 /* For numeric factorization. */ 00106 #define NTAGS 10000 00107 #define UjROW 10 00108 #define UkSUB 11 00109 #define UkVAL 12 00110 #define LkSUB 13 00111 #define LkVAL 14 00112 #define LkkDIAG 15 00113 /* For triangular solves. */ 00114 #define XK_H 2 /* The header preceeding each X block. */ 00115 #define LSUM_H 2 /* The header preceeding each MOD block. */ 00116 #define GSUM 20 00117 #define Xk 21 00118 #define Yk 22 00119 #define LSUM 23 00120 00121 /* 00122 * Communication scopes 00123 */ 00124 #define COMM_ALL 100 00125 #define COMM_COLUMN 101 00126 #define COMM_ROW 102 00127 00128 /* 00129 * Matrix distribution for sparse matrix-vector multiplication 00130 */ 00131 #define SUPER_LINEAR 11 00132 #define SUPER_BLOCK 12 00133 00134 /* 00135 * No of marker arrays used in the symbolic factorization, each of size n 00136 */ 00137 #define NO_MARKER 3 00138 00139 00140 00141 /*********************************************************************** 00142 * Macros 00143 ***********************************************************************/ 00144 #define IAM(comm) { int rank; MPI_Comm_rank ( comm, &rank ); rank}; 00145 #define MYROW(iam,grid) ( (iam) / grid->npcol ) 00146 #define MYCOL(iam,grid) ( (iam) % grid->npcol ) 00147 #define BlockNum(i) ( supno[i] ) 00148 #define FstBlockC(bnum) ( xsup[bnum] ) 00149 #define SuperSize(bnum) ( xsup[bnum+1]-xsup[bnum] ) 00150 #define LBi(bnum,grid) ( (bnum)/grid->nprow )/* Global to local block rowwise */ 00151 #define LBj(bnum,grid) ( (bnum)/grid->npcol )/* Global to local block columnwise*/ 00152 #define PROW(bnum,grid) ( (bnum) % grid->nprow ) 00153 #define PCOL(bnum,grid) ( (bnum) % grid->npcol ) 00154 #define PNUM(i,j,grid) ( (i)*grid->npcol + j ) /* Process number at coord(i,j) */ 00155 #define CEILING(a,b) ( ((a)%(b)) ? ((a)/(b) + 1) : ((a)/(b)) ) 00156 /* For triangular solves */ 00157 #define RHS_ITERATE(i) \ 00158 for (i = 0; i < nrhs; ++i) 00159 #define X_BLK(i) \ 00160 ilsum[i] * nrhs + (i+1) * XK_H 00161 #define LSUM_BLK(i) \ 00162 ilsum[i] * nrhs + (i+1) * LSUM_H 00163 00164 #define SuperLU_timer_ SuperLU_timer_dist_ 00165 #define LOG2(x) (log10((double) x) / log10(2.0)) 00166 00167 00168 #if ( VAMPIR>=1 ) 00169 #define VT_TRACEON VT_traceon() 00170 #define VT_TRACEOFF VT_traceoff() 00171 #else 00172 #define VT_TRACEON 00173 #define VT_TRACEOFF 00174 #endif 00175 00176 00177 /*********************************************************************** 00178 * New data types 00179 ***********************************************************************/ 00180 00181 /* 00182 * Define the 2D mapping of matrix blocks to process grid. 00183 * 00184 * Process grid: 00185 * Processes are numbered (0 : P-1). 00186 * P = Pr x Pc, where Pr, Pc are the number of process rows and columns. 00187 * (pr,pc) is the coordinate of IAM; 0 <= pr < Pr, 0 <= pc < Pc. 00188 * 00189 * Matrix blocks: 00190 * Matrix is partitioned according to supernode partitions, both 00191 * column and row-wise. 00192 * The k-th block columns (rows) contains columns (rows) (s:t), where 00193 * s=xsup[k], t=xsup[k+1]-1. 00194 * Block A(I,J) contains 00195 * rows from (xsup[I]:xsup[I+1]-1) and 00196 * columns from (xsup[J]:xsup[J+1]-1) 00197 * 00198 * Mapping of matrix entry (i,j) to matrix block (I,J): 00199 * (I,J) = ( supno[i], supno[j] ) 00200 * 00201 * Mapping of matrix block (I,J) to process grid (pr,pc): 00202 * (pr,pc) = ( MOD(I,NPROW), MOD(J,NPCOL) ) 00203 * 00204 * (xsup[nsupers],supno[n]) are replicated on all processors. 00205 * 00206 */ 00207 00208 /*-- Communication subgroup */ 00209 typedef struct { 00210 MPI_Comm comm; /* MPI communicator */ 00211 int Np; /* number of processes */ 00212 int Iam; /* my process number */ 00213 } superlu_scope_t; 00214 00215 /*-- Process grid definition */ 00216 typedef struct { 00217 MPI_Comm comm; /* MPI communicator */ 00218 superlu_scope_t rscp; /* row scope */ 00219 superlu_scope_t cscp; /* column scope */ 00220 int iam; /* my process number in this scope */ 00221 int_t nprow; /* number of process rows */ 00222 int_t npcol; /* number of process columns */ 00223 } gridinfo_t; 00224 00225 00226 /* 00227 *-- The structures are determined by SYMBFACT and used thereafter. 00228 * 00229 * (xsup,supno) describes mapping between supernode and column: 00230 * xsup[s] is the leading column of the s-th supernode. 00231 * supno[i] is the supernode no to which column i belongs; 00232 * e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12) 00233 * xsup 0 1 2 4 7 12 00234 * Note: dfs will be performed on supernode rep. relative to the new 00235 * row pivoting ordering 00236 * 00237 * This is allocated during symbolic factorization SYMBFACT. 00238 */ 00239 typedef struct { 00240 int_t *xsup; 00241 int_t *supno; 00242 } Glu_persist_t; 00243 00244 /* 00245 *-- The structures are determined by SYMBFACT and used by DDISTRIBUTE. 00246 * 00247 * (xlsub,lsub): lsub[*] contains the compressed subscript of 00248 * rectangular supernodes; xlsub[j] points to the starting 00249 * location of the j-th column in lsub[*]. Note that xlsub 00250 * is indexed by column. 00251 * Storage: original row subscripts 00252 * 00253 * During the course of sparse LU factorization, we also use 00254 * (xlsub,lsub) for the purpose of symmetric pruning. For each 00255 * supernode {s,s+1,...,t=s+r} with first column s and last 00256 * column t, the subscript set 00257 * lsub[j], j=xlsub[s], .., xlsub[s+1]-1 00258 * is the structure of column s (i.e. structure of this supernode). 00259 * It is used for the storage of numerical values. 00260 * Furthermore, 00261 * lsub[j], j=xlsub[t], .., xlsub[t+1]-1 00262 * is the structure of the last column t of this supernode. 00263 * It is for the purpose of symmetric pruning. Therefore, the 00264 * structural subscripts can be rearranged without making physical 00265 * interchanges among the numerical values. 00266 * 00267 * However, if the supernode has only one column, then we 00268 * only keep one set of subscripts. For any subscript interchange 00269 * performed, similar interchange must be done on the numerical 00270 * values. 00271 * 00272 * The last column structures (for pruning) will be removed 00273 * after the numercial LU factorization phase. 00274 * 00275 * (xusub,usub): xusub[i] points to the starting location of column i 00276 * in usub[]. For each U-segment, only the row index of first nonzero 00277 * is stored in usub[]. 00278 * 00279 * Each U column consists of a number of full segments. Each full segment 00280 * starts from a leading nonzero, running up to the supernode (block) 00281 * boundary. (Recall that the column-wise supernode partition is also 00282 * imposed on the rows.) Because the segment is full, we don't store all 00283 * the row indices. Instead, only the leading nonzero index is stored. 00284 * The rest can be found together with xsup/supno pair. 00285 * For example, 00286 * usub[xsub[j+1]] - usub[xsub[j]] = number of segments in column j. 00287 * for any i in usub[], 00288 * supno[i] = block number in which i belongs to 00289 * xsup[supno[i]+1] = first row of the next block 00290 * The nonzeros of this segment are: 00291 * i, i+1 ... xsup[supno[i]+1]-1 (only i is stored in usub[]) 00292 * 00293 */ 00294 typedef struct { 00295 int_t *lsub; /* compressed L subscripts */ 00296 int_t *xlsub; 00297 int_t *usub; /* compressed U subscripts */ 00298 int_t *xusub; 00299 int_t nzlmax; /* current max size of lsub */ 00300 int_t nzumax; /* " " " usub */ 00301 LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */ 00302 int_t *llvl; /* keep track of level in L for level-based ILU */ 00303 int_t *ulvl; /* keep track of level in U for level-based ILU */ 00304 } Glu_freeable_t; 00305 00306 00307 /* 00308 *-- The structure used to store matrix A of the linear system and 00309 * several vectors describing the transformations done to matrix A. 00310 * 00311 * A (SuperMatrix*) 00312 * Matrix A in A*X=B, of dimension (A->nrow, A->ncol). 00313 * The number of linear equations is A->nrow. The type of A can be: 00314 * Stype = SLU_NC; Dtype = SLU_D; Mtype = SLU_GE. 00315 * 00316 * DiagScale (DiagScale_t) 00317 * Specifies the form of equilibration that was done. 00318 * = NOEQUIL: No equilibration. 00319 * = ROW: Row equilibration, i.e., A was premultiplied by diag(R). 00320 * = COL: Column equilibration, i.e., A was postmultiplied by diag(C). 00321 * = BOTH: Both row and column equilibration, i.e., A was replaced 00322 * by diag(R)*A*diag(C). 00323 * 00324 * R double*, dimension (A->nrow) 00325 * The row scale factors for A. 00326 * If DiagScale = ROW or BOTH, A is multiplied on the left by diag(R). 00327 * If DiagScale = NOEQUIL or COL, R is not defined. 00328 * 00329 * C double*, dimension (A->ncol) 00330 * The column scale factors for A. 00331 * If DiagScale = COL or BOTH, A is multiplied on the right by diag(C). 00332 * If DiagScale = NOEQUIL or ROW, C is not defined. 00333 * 00334 * perm_r (int*) dimension (A->nrow) 00335 * Row permutation vector which defines the permutation matrix Pr, 00336 * perm_r[i] = j means row i of A is in position j in Pr*A. 00337 * 00338 * perm_c (int*) dimension (A->ncol) 00339 * Column permutation vector, which defines the 00340 * permutation matrix Pc; perm_c[i] = j means column i of A is 00341 * in position j in A*Pc. 00342 * 00343 */ 00344 typedef struct { 00345 DiagScale_t DiagScale; 00346 double *R; 00347 double *C; 00348 int_t *perm_r; 00349 int_t *perm_c; 00350 } ScalePermstruct_t; 00351 00352 /* 00353 *-- This contains the options used to control the solution process. 00354 * 00355 * Fact (fact_t) 00356 * Specifies whether or not the factored form of the matrix 00357 * A is supplied on entry, and if not, how the matrix A should 00358 * be factorizaed. 00359 * = DOFACT: The matrix A will be factorized from scratch, and the 00360 * factors will be stored in L and U. 00361 * = SamePattern: The matrix A will be factorized assuming 00362 * that a factorization of a matrix with the same sparsity 00363 * pattern was performed prior to this one. Therefore, this 00364 * factorization will reuse column permutation vector 00365 * ScalePermstruct->perm_c and the column elimination tree 00366 * LUstruct->etree. 00367 * = SamePattern_SameRowPerm: The matrix A will be factorized 00368 * assuming that a factorization of a matrix with the same 00369 * sparsity pattern and similar numerical values was performed 00370 * prior to this one. Therefore, this factorization will reuse 00371 * both row and column scaling factors R and C, both row and 00372 * column permutation vectors perm_r and perm_c, and the 00373 * data structure set up from the previous symbolic factorization. 00374 * = FACTORED: On entry, L, U, perm_r and perm_c contain the 00375 * factored form of A. If DiagScale is not NOEQUIL, the matrix 00376 * A has been equilibrated with scaling factors R and C. 00377 * 00378 * Equil (yes_no_t) 00379 * Specifies whether to equilibrate the system (scale A's row and 00380 * columns to have unit norm). 00381 * 00382 * ColPerm (colperm_t) 00383 * Specifies what type of column permutation to use to reduce fill. 00384 * = NATURAL: use the natural ordering 00385 * = MMD_ATA: use minimum degree ordering on structure of A'*A 00386 * = MMD_AT_PLUS_A: use minimum degree ordering on structure of A'+A 00387 * = COLAMD: use approximate minimum degree column ordering 00388 * = MY_PERMC: use the ordering specified by the user 00389 * 00390 * Trans (trans_t) 00391 * Specifies the form of the system of equations: 00392 * = NOTRANS: A * X = B (No transpose) 00393 * = TRANS: A**T * X = B (Transpose) 00394 * = CONJ: A**H * X = B (Transpose) 00395 * 00396 * IterRefine (IterRefine_t) 00397 * Specifies whether to perform iterative refinement. 00398 * = NO: no iterative refinement 00399 * = SINGLE: perform iterative refinement in single precision 00400 * = DOUBLE: perform iterative refinement in double precision 00401 * = EXTRA: perform iterative refinement in extra precision 00402 * 00403 * DiagPivotThresh (double, in [0.0, 1.0]) (only for sequential SuperLU) 00404 * Specifies the threshold used for a diagonal entry to be an 00405 * acceptable pivot. 00406 * 00407 * SymmetricMode (yest_no_t) 00408 * Specifies whether to use symmetric mode. Symmetric mode gives 00409 * preference to diagonal pivots, and uses an (A'+A)-based column 00410 * permutation algorithm. 00411 * 00412 * PivotGrowth (yes_no_t) 00413 * Specifies whether to compute the reciprocal pivot growth. 00414 * 00415 * ConditionNumber (ues_no_t) 00416 * Specifies whether to compute the reciprocal condition number. 00417 * 00418 * RowPerm (rowperm_t) (only for SuperLU_DIST or ILU) 00419 * Specifies whether to permute rows of the original matrix. 00420 * = NO: not to permute the rows 00421 * = LargeDiag: make the diagonal large relative to the off-diagonal 00422 * = MY_PERMR: use the permutation given by the user 00423 * 00424 * ILU_DropRule (int) 00425 * Specifies the dropping rule: 00426 * = DROP_BASIC: Basic dropping rule, supernodal based ILUTP(tau). 00427 * = DROP_PROWS: Supernodal based ILUTP(p,tau), p = gamma * nnz(A)/n. 00428 * = DROP_COLUMN: Variant of ILUTP(p,tau), for j-th column, 00429 * p = gamma * nnz(A(:,j)). 00430 * = DROP_AREA: Variation of ILUTP, for j-th column, use 00431 * nnz(F(:,1:j)) / nnz(A(:,1:j)) to control memory. 00432 * = DROP_DYNAMIC: Modify the threshold tau during factorizaion: 00433 * If nnz(L(:,1:j)) / nnz(A(:,1:j)) > gamma 00434 * tau_L(j) := MIN(tau_0, tau_L(j-1) * 2); 00435 * Otherwise 00436 * tau_L(j) := MAX(tau_0, tau_L(j-1) / 2); 00437 * tau_U(j) uses the similar rule. 00438 * NOTE: the thresholds used by L and U are separate. 00439 * = DROP_INTERP: Compute the second dropping threshold by 00440 * interpolation instead of sorting (default). 00441 * In this case, the actual fill ratio is not 00442 * guaranteed to be smaller than gamma. 00443 * Note: DROP_PROWS, DROP_COLUMN and DROP_AREA are mutually exclusive. 00444 * ( Default: DROP_BASIC | DROP_AREA ) 00445 * 00446 * ILU_DropTol (double) 00447 * numerical threshold for dropping. 00448 * 00449 * ILU_FillFactor (double) 00450 * Gamma in the secondary dropping. 00451 * 00452 * ILU_Norm (norm_t) 00453 * Specify which norm to use to measure the row size in a 00454 * supernode: infinity-norm, 1-norm, or 2-norm. 00455 * 00456 * ILU_FillTol (double) 00457 * numerical threshold for zero pivot perturbation. 00458 * 00459 * ILU_MILU (milu_t) 00460 * Specifies which version of MILU to use. 00461 * 00462 * ILU_MILU_Dim (double) 00463 * Dimension of the PDE if available. 00464 * 00465 * ReplaceTinyPivot (yes_no_t) (only for SuperLU_DIST) 00466 * Specifies whether to replace the tiny diagonals by 00467 * sqrt(epsilon)*||A|| during LU factorization. 00468 * 00469 * SolveInitialized (yes_no_t) (only for SuperLU_DIST) 00470 * Specifies whether the initialization has been performed to the 00471 * triangular solve. 00472 * 00473 * RefineInitialized (yes_no_t) (only for SuperLU_DIST) 00474 * Specifies whether the initialization has been performed to the 00475 * sparse matrix-vector multiplication routine needed in iterative 00476 * refinement. 00477 * 00478 * PrintStat (yes_no_t) 00479 * Specifies whether to print the solver's statistics. 00480 */ 00481 typedef struct { 00482 fact_t Fact; 00483 yes_no_t Equil; 00484 colperm_t ColPerm; 00485 trans_t Trans; 00486 IterRefine_t IterRefine; 00487 double DiagPivotThresh; 00488 yes_no_t SymmetricMode; 00489 yes_no_t PivotGrowth; 00490 yes_no_t ConditionNumber; 00491 rowperm_t RowPerm; 00492 int ILU_DropRule; 00493 double ILU_DropTol; /* threshold for dropping */ 00494 double ILU_FillFactor; /* gamma in the secondary dropping */ 00495 norm_t ILU_Norm; /* infinity-norm, 1-norm, or 2-norm */ 00496 double ILU_FillTol; /* threshold for zero pivot perturbation */ 00497 milu_t ILU_MILU; 00498 double ILU_MILU_Dim; /* Dimension of PDE (if available) */ 00499 yes_no_t ParSymbFact; 00500 yes_no_t ReplaceTinyPivot; /* used in SuperLU_DIST */ 00501 yes_no_t SolveInitialized; 00502 yes_no_t RefineInitialized; 00503 yes_no_t PrintStat; 00504 int nnzL, nnzU; /* used to store nnzs for now */ 00505 yes_no_t SymFact; /* symmetric factorization */ 00506 int num_lookaheads; /* numer of look-ahead */ 00507 yes_no_t lookahead_etree; /* try to use column-etree from serial symb */ 00508 00509 } superlu_options_t; 00510 00511 typedef struct { 00512 float for_lu; 00513 float total; 00514 int_t expansions; 00515 int_t nnzL, nnzU; 00516 } mem_usage_t; 00517 00518 00519 /*********************************************************************** 00520 * Function prototypes 00521 ***********************************************************************/ 00522 00523 #ifdef __cplusplus 00524 extern "C" { 00525 #endif 00526 00527 extern void set_default_options_dist(superlu_options_t *); 00528 extern void print_options_dist(superlu_options_t *); 00529 extern void Destroy_CompCol_Matrix_dist(SuperMatrix *); 00530 extern void Destroy_SuperNode_Matrix_dist(SuperMatrix *); 00531 extern void Destroy_SuperMatrix_Store_dist(SuperMatrix *); 00532 extern void Destroy_CompCol_Permuted_dist(SuperMatrix *); 00533 extern void Destroy_CompRowLoc_Matrix_dist(SuperMatrix *); 00534 extern void Destroy_CompRow_Matrix_dist(SuperMatrix *); 00535 extern void sp_colorder (superlu_options_t*, SuperMatrix*, int_t*, int_t*, 00536 SuperMatrix*); 00537 extern int_t sp_coletree_dist (int_t *, int_t *, int_t *, int_t, int_t, 00538 int_t *); 00539 extern void countnz_dist (const int_t, int_t *, int_t *, int_t *, 00540 Glu_persist_t *, Glu_freeable_t *); 00541 extern int_t fixupL_dist (const int_t, const int_t *, Glu_persist_t *, 00542 Glu_freeable_t *); 00543 extern int_t *TreePostorder_dist (int_t, int_t *); 00544 extern float slamch_(char *); 00545 extern double dlamch_(char *); 00546 extern void *superlu_malloc_dist (size_t); 00547 extern void superlu_free_dist (void*); 00548 extern int_t *intMalloc_dist (int_t); 00549 extern int_t *intCalloc_dist (int_t); 00550 00551 /* Auxiliary routines */ 00552 extern double SuperLU_timer_ (); 00553 extern void superlu_abort_and_exit_dist(char *); 00554 extern int_t sp_ienv_dist (int_t); 00555 extern int lsame_ (char *, char *); 00556 extern int xerbla_ (char *, int *); 00557 extern void ifill_dist (int_t *, int_t, int_t); 00558 extern void super_stats_dist (int_t, int_t *); 00559 extern void ScalePermstructInit(const int_t, const int_t, 00560 ScalePermstruct_t *); 00561 extern void ScalePermstructFree(ScalePermstruct_t *); 00562 extern void superlu_gridinit(MPI_Comm, int_t, int_t, gridinfo_t *); 00563 extern void superlu_gridmap(MPI_Comm, int_t, int_t, int_t [], int_t, 00564 gridinfo_t *); 00565 extern void superlu_gridexit(gridinfo_t *); 00566 extern void get_perm_c_dist(int_t, int_t, SuperMatrix *, int_t *); 00567 extern void a_plus_at_dist(const int_t, const int_t, int_t *, int_t *, 00568 int_t *, int_t **, int_t **); 00569 extern void bcast_tree(void *, int, MPI_Datatype, int, int, 00570 gridinfo_t *, int, int *); 00571 extern int_t symbfact(superlu_options_t *, int, SuperMatrix *, int_t *, 00572 int_t *, Glu_persist_t *, Glu_freeable_t *); 00573 extern int_t symbfact_SubInit(fact_t, void *, int_t, int_t, int_t, int_t, 00574 Glu_persist_t *, Glu_freeable_t *); 00575 extern int_t symbfact_SubXpand(int_t, int_t, int_t, MemType, int_t *, 00576 Glu_freeable_t *); 00577 extern int_t symbfact_SubFree(Glu_freeable_t *); 00578 extern void get_diag_procs(int_t, Glu_persist_t *, gridinfo_t *, int_t *, 00579 int_t **, int_t **); 00580 extern int_t QuerySpace_dist(int_t, int_t, Glu_freeable_t *, mem_usage_t *); 00581 extern int xerbla_ (char *, int *); 00582 extern void pxerbla (char *, gridinfo_t *, int_t); 00583 extern void PStatInit(SuperLUStat_t *); 00584 extern void PStatFree(SuperLUStat_t *); 00585 extern void PStatPrint(superlu_options_t *, SuperLUStat_t *, gridinfo_t *); 00586 00587 00588 /* Prototypes for parallel symbolic factorization */ 00589 extern float symbfact_dist 00590 (int, int, SuperMatrix *, int_t *, int_t *, int_t *, int_t *, 00591 Pslu_freeable_t *, MPI_Comm *, MPI_Comm *, mem_usage_t *); 00592 00593 /* Get the column permutation using parmetis */ 00594 extern float get_perm_c_parmetis 00595 (SuperMatrix *, int_t *, int_t *, int, int, 00596 int_t **, int_t **, gridinfo_t *, MPI_Comm *); 00597 00598 /* Auxiliary routines for memory expansions used during 00599 the parallel symbolic factorization routine */ 00600 00601 extern int_t psymbfact_LUXpandMem 00602 (int_t, int_t, int_t, int_t, int_t, int_t, int_t, int_t, 00603 Pslu_freeable_t *, Llu_symbfact_t *, vtcsInfo_symbfact_t *, psymbfact_stat_t *); 00604 00605 extern int_t psymbfact_LUXpand 00606 (int_t, int_t, int_t, int_t, int_t *, int_t, int_t, int_t, int_t, 00607 Pslu_freeable_t *, Llu_symbfact_t *, vtcsInfo_symbfact_t *, psymbfact_stat_t *); 00608 00609 extern int_t psymbfact_LUXpand_RL 00610 (int_t, int_t, int_t, int_t, int_t, int_t, 00611 Pslu_freeable_t *, Llu_symbfact_t *, vtcsInfo_symbfact_t *, psymbfact_stat_t *); 00612 00613 extern int_t psymbfact_prLUXpand 00614 (int_t, int_t, 00615 MemType, Llu_symbfact_t *, psymbfact_stat_t *); 00616 00617 /* Routines for debugging */ 00618 extern void print_panel_seg_dist(int_t, int_t, int_t, int_t, int_t *, int_t *); 00619 extern void check_repfnz_dist(int_t, int_t, int_t, int_t *); 00620 extern int_t CheckZeroDiagonal(int_t, int_t *, int_t *, int_t *); 00621 extern void PrintDouble5(char *, int_t, double *); 00622 extern void PrintInt10(char *, int_t, int_t *); 00623 extern int file_PrintInt10(FILE *, char *, int_t, int_t *); 00624 00625 #ifdef __cplusplus 00626 } 00627 #endif 00628 00629 #endif /* __SUPERLU_DEFS */