00001 00011 #ifndef __SUPERLU_DIST_PSYMBFACT /* allow multiple inclusions */ 00012 #define __SUPERLU_DIST_PSYMBFACT 00013 00014 /* 00015 * File name: psymbfact.h 00016 * Purpose: Definitions for parallel symbolic factorization routine 00017 */ 00018 00047 typedef struct { 00048 int_t *xlsub; /* pointer to the beginning of each column of L */ 00049 int_t *lsub; /* compressed L subscripts, stored by columns */ 00050 int_t szLsub; /* current max size of lsub */ 00051 00052 int_t *xusub; /* pointer to the beginning of each row of U */ 00053 int_t *usub; /* compressed U subscripts, stored by rows */ 00054 int_t szUsub; /* current max size of usub */ 00055 00056 int_t *supno_loc; 00057 int_t *xsup_beg_loc; 00058 int_t *xsup_end_loc; 00059 int_t nvtcs_loc; /* number of local vertices */ 00060 int_t *globToLoc; /* global to local indexing */ 00061 int_t maxNvtcsPProc; /* max number of vertices on the processors */ 00062 } Pslu_freeable_t; 00063 00064 00095 typedef struct { 00096 int_t *xlsubPr; /* pointer to pruned structure of L */ 00097 int_t *lsubPr; /* pruned structure of L */ 00098 int_t szLsubPr; /* size of lsubPr array */ 00099 int_t indLsubPr; /* current index in lsubPr */ 00100 int_t *xusubPr; /* pointer to pruned structure of U */ 00101 int_t *usubPr; /* pruned structure of U */ 00102 int_t szUsubPr; /* size of usubPr array */ 00103 int_t indUsubPr; /* current index in usubPr */ 00104 00105 int_t *xlsub_rcvd; 00106 int_t *xlsub; /* pointer to structure of L, stored by columns */ 00107 int_t *lsub; /* structure of L, stored by columns */ 00108 int_t szLsub; /* current max size of lsub */ 00109 int_t nextl; /* pointer to current computation in lsub */ 00110 00111 int_t *xusub_rcvd; /* */ 00112 int_t *xusub; /* pointer to structure of U, stored by rows */ 00113 int_t *usub; /* structure of U, stored by rows */ 00114 int_t szUsub; /* current max size of usub */ 00115 int_t nextu; /* pointer to current computation in usub */ 00116 00117 int_t *cntelt_vtcs; /* size of column/row for each vertex */ 00118 int_t *cntelt_vtcsA_lvl; /* size of column/row of A for each vertex at the 00119 current level */ 00120 00121 LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */ 00122 int_t no_expand; /* Number of memory expansions */ 00123 int_t no_expand_pr; /* Number of memory expansions of the pruned structures */ 00124 int_t no_expcp; /* Number of memory expansions due to the right looking 00125 overestimation approach */ 00126 } Llu_symbfact_t; 00127 00129 typedef struct { 00130 int_t maxSzBlk; /* Max no of vertices in a block */ 00131 int_t maxNvtcsNds_loc; /* Max number of vertices of a node distributed on one 00132 processor. The maximum is computed among all the nodes 00133 of the sep arator tree and among all the processors */ 00134 int_t maxNeltsVtx; /* Max number of elements of a vertex, 00135 that is condisering that the matrix is 00136 dense */ 00137 int_t nblks_loc; /* Number of local blocks */ 00138 int_t *begEndBlks_loc; /* Begin and end vertex of each local block. 00139 Array of size 2 * nblks_loc */ 00140 int_t curblk_loc; /* Index of current block in the level under computation */ 00141 int_t nvtcs_loc; /* Number of local vertices distributed on a processor */ 00142 int_t nvtcsLvl_loc; /* Number of local vertices for current 00143 level under computation */ 00144 int filledSep; /* determines if curent or all separators are filled */ 00145 int_t nnz_asup_loc; /* Number of nonzeros in asup not yet consumed. Used during 00146 symbolic factorization routine to determine how much 00147 of xusub, usub is still used to store the input matrix AS */ 00148 int_t nnz_ainf_loc; /* Number of nonzeros in ainf. Similar to nnz_asup_loc. */ 00149 int_t xusub_nextLvl; /* Pointer to usub of the next level */ 00150 int_t xlsub_nextLvl; /* Pointer to lsub of the next level */ 00151 int_t fstVtx_nextLvl; /* First vertex of the next level */ 00152 } vtcsInfo_symbfact_t; 00153 00155 typedef struct { 00156 int_t *x_ainf; /* pointers to columns of Ainf */ 00157 int_t *ind_ainf; /* column indices of Ainf */ 00158 int_t *x_asup; /* pointers to rows of Asup */ 00159 int_t *ind_asup; /* row indices of Asup */ 00160 } matrix_symbfact_t; 00161 00162 typedef struct { 00163 int_t *rcv_interLvl; /* from which processors iam receives data */ 00164 int_t *snd_interLvl; /* to which processors iam sends data */ 00165 int_t *snd_interSz; /* size of data to be send */ 00166 int_t *snd_LinterSz; /* size of data in L part to be send */ 00167 int_t *snd_vtxinter; /* first vertex from where to send data */ 00168 00169 /* inter level data structures */ 00170 int_t *snd_intraLvl; /* to which processors iam sends data */ 00171 int_t snd_intraSz; /* size of data to send */ 00172 int_t snd_LintraSz; /* size of data to send */ 00173 int_t *rcv_intraLvl; /* from which processors iam receives data */ 00174 int_t *rcv_buf; /* buffer to receive data */ 00175 int_t rcv_bufSz; /* size of the buffer to receive data */ 00176 int_t *snd_buf; /* buffer to send data */ 00177 int_t snd_bufSz; /* size of the buffer to send data */ 00178 int_t *ptr_rcvBuf; /* pointer to rcv_buf, the buffer to receive data */ 00179 } comm_symbfact_t; 00180 00181 /* relaxation parameters used in the algorithms - for future release */ 00183 typedef struct { 00184 int_t fill_par; /* Estimation of fill. It corresponds to sp_ienv_dist(6) */ 00185 float relax_seps; /* relaxation parameter -not used in this version */ 00186 float relax_curSep; /* relaxation parameter -not used in this version */ 00187 float relax_gen; /* relaxation parameter -not used in this version */ 00188 00189 /* number of operations performed during parallel symbolic factorization */ 00190 float nops; 00191 00192 /* no of dense current separators per proc */ 00193 int_t nDnsCurSep; 00194 /* no of dense separators up per proc */ 00195 int_t nDnsUpSeps; 00196 00197 float no_shmSnd; /* Number of auxiliary messages for send data */ 00198 float no_msgsSnd; /* Number of messages sending data */ 00199 int_t maxsz_msgSnd; /* Max size of messages sending data */ 00200 float sz_msgsSnd; /* Average size of messages sending data */ 00201 float no_shmRcvd; /* Number of auxiliary messages for rcvd data */ 00202 float no_msgsRcvd; /* Number of messages receiving data */ 00203 int_t maxsz_msgRcvd;/* Max size of messages receiving data */ 00204 float sz_msgsRcvd; /* Average size of messages receiving data */ 00205 float no_msgsCol; /* Number of messages sent for estimating size 00206 of rows/columns, setup information 00207 interLvl_symbfact, */ 00208 int_t maxsz_msgCol; /* Average size of messages counted in 00209 no_msgsCol */ 00210 float sz_msgsCol; /* Max size of messages counted in no_msgsCol */ 00211 00212 /* statistics on fill-in */ 00213 float fill_pelt[6]; 00214 /* 00215 0 - average fill per elt added during right-looking factorization 00216 1 - max fill per elt added during right-looking factorization 00217 2 - number vertices modified during right-looking factorization 00218 3 - average fill per elt 00219 4 - max fill per elt 00220 5 - number vertices computed in upper levels of separator tree 00221 */ 00222 00223 /* Memory usage */ 00224 int_t estimLSz; /* size of lsub due to right looking overestimation */ 00225 int_t estimUSz; /* size of usub due to right looking overestimation */ 00226 int_t maxSzLPr; /* maximum size of pruned L */ 00227 int_t maxSzUPr; /* maximum size of pruned U */ 00228 int_t maxSzBuf; /* maximum size of the send and receive buffers */ 00229 int_t szDnsSep; /* size of memory used when there are dense separators */ 00230 float allocMem; /* size of the total memory allocated (in bytes) */ 00231 } psymbfact_stat_t; 00232 00233 /* MACROS */ 00234 00235 /* 00236 Macros for comptuting the owner of a vertex and the local index 00237 corresponding to a vertex 00238 */ 00239 #define OWNER(x) ((x) / maxNvtcsPProc) 00240 #define LOCAL_IND(x) ((x) % maxNvtcsPProc) 00241 00242 /* Macros for computing the available memory in lsub, usub */ 00243 #define MEM_LSUB(Llu, VInfo) (Llu->szLsub - VInfo->nnz_ainf_loc) 00244 #define MEM_USUB(Llu, VInfo) (Llu->szUsub - VInfo->nnz_asup_loc) 00245 00246 #define tag_interLvl 2 00247 #define tag_interLvl_LData 0 00248 #define tag_interLvl_UData 1 00249 #define tag_intraLvl_szMsg 1000 00250 #define tag_intraLvl_LData 1001 00251 #define tag_intraLvl_UData 1002 00252 /* tag_intraLvl has to be the last tag number */ 00253 #define tag_intraLvl 1003 00254 00255 /* 00256 * Index of diagonal element, no of elements preceding each column/row 00257 * of L/U send to another processor 00258 */ 00259 #define DIAG_IND 0 00260 #define NELTS_IND 1 00261 #define RCVD_IND 2 00262 00263 #define SUCCES_RET 0 /* successful return from a routine */ 00264 #define ERROR_RET 1 /* error return code from a routine */ 00265 #define FILLED_SEP 2 /* the current separator is dense */ 00266 #define FILLED_SEPS 3 /* all the separators situated on the path from the current 00267 separator to the root separator are dense */ 00268 00269 /* Code for the type of the memory to expand */ 00270 #define USUB_PR 0 00271 #define LSUB_PR 1 00272 #define USUB 0 00273 #define LSUB 1 00274 00275 /* 00276 * Code for the type of computation - right looking (RL_SYMB); left 00277 * looking (LL_SYMB); symbolic factorization of an independent domain 00278 * (DOMAIN_SYMB); current separator is dense (DNS_CURSEP); all the 00279 * separators from the current one to the root of the tree are dense 00280 * (DNS_UPSEPS). 00281 */ 00282 #define RL_SYMB 0 00283 #define DOMAIN_SYMB 1 00284 #define LL_SYMB 2 00285 #define DNS_UPSEPS 3 00286 #define DNS_CURSEP 4 00287 00288 00289 #endif /* __SUPERLU_DIST_PSYMBFACT */ 00290 00291 00292