SuperLU Distributed 8.2.1
Distributed memory sparse direct solver
psymbfact.h
Go to the documentation of this file.
1
21#ifndef __SUPERLU_DIST_PSYMBFACT /* allow multiple inclusions */
22#define __SUPERLU_DIST_PSYMBFACT
23
24/*
25 * File name: psymbfact.h
26 * Purpose: Definitions for parallel symbolic factorization routine
27 */
28
57typedef struct {
58 int_t *xlsub; /* pointer to the beginning of each column of L */
59 int_t *lsub; /* compressed L subscripts, stored by columns */
60 int_t szLsub; /* current max size of lsub */
61
62 int_t *xusub; /* pointer to the beginning of each row of U */
63 int_t *usub; /* compressed U subscripts, stored by rows */
64 int_t szUsub; /* current max size of usub */
65
69 int_t nvtcs_loc; /* number of local vertices */
70 int_t *globToLoc; /* global to local indexing */
71 int_t maxNvtcsPProc; /* max number of vertices on the processors */
72 int64_t nnzLU; /* number of nonzeros in L+U*/
74
75
106typedef struct {
107 int_t *xlsubPr; /* pointer to pruned structure of L */
108 int_t *lsubPr; /* pruned structure of L */
109 int_t szLsubPr; /* size of lsubPr array */
110 int_t indLsubPr; /* current index in lsubPr */
111 int_t *xusubPr; /* pointer to pruned structure of U */
112 int_t *usubPr; /* pruned structure of U */
113 int_t szUsubPr; /* size of usubPr array */
114 int_t indUsubPr; /* current index in usubPr */
115
117 int_t *xlsub; /* pointer to structure of L, stored by columns */
118 int_t *lsub; /* structure of L, stored by columns */
119 int_t szLsub; /* current max size of lsub */
120 int_t nextl; /* pointer to current computation in lsub */
121
123 int_t *xusub; /* pointer to structure of U, stored by rows */
124 int_t *usub; /* structure of U, stored by rows */
125 int_t szUsub; /* current max size of usub */
126 int_t nextu; /* pointer to current computation in usub */
127
128 int_t *cntelt_vtcs; /* size of column/row for each vertex */
129 int_t *cntelt_vtcsA_lvl; /* size of column/row of A for each vertex at the
130 current level */
131
132 LU_space_t MemModel; /* 0 - system malloc'd; 1 - user provided */
133 int_t no_expand; /* Number of memory expansions */
134 int_t no_expand_pr; /* Number of memory expansions of the pruned structures */
135 int_t no_expcp; /* Number of memory expansions due to the right looking
136 overestimation approach */
138
140typedef struct {
141 int_t maxSzBlk; /* Max no of vertices in a block */
142 int_t maxNvtcsNds_loc; /* Max number of vertices of a node distributed on one
143 processor. The maximum is computed among all the nodes
144 of the sep arator tree and among all the processors */
145 int_t maxNeltsVtx; /* Max number of elements of a vertex,
146 that is condisering that the matrix is
147 dense */
148 int_t nblks_loc; /* Number of local blocks */
149 int_t *begEndBlks_loc; /* Begin and end vertex of each local block.
150 Array of size 2 * nblks_loc */
151 int_t curblk_loc; /* Index of current block in the level under computation */
152 int_t nvtcs_loc; /* Number of local vertices distributed on a processor */
153 int_t nvtcsLvl_loc; /* Number of local vertices for current
154 level under computation */
155 int filledSep; /* determines if curent or all separators are filled */
156 int_t nnz_asup_loc; /* Number of nonzeros in asup not yet consumed. Used during
157 symbolic factorization routine to determine how much
158 of xusub, usub is still used to store the input matrix AS */
159 int_t nnz_ainf_loc; /* Number of nonzeros in ainf. Similar to nnz_asup_loc. */
160 int_t xusub_nextLvl; /* Pointer to usub of the next level */
161 int_t xlsub_nextLvl; /* Pointer to lsub of the next level */
162 int_t fstVtx_nextLvl; /* First vertex of the next level */
164
166typedef struct {
167 int_t *x_ainf; /* pointers to columns of Ainf */
168 int_t *ind_ainf; /* column indices of Ainf */
169 int_t *x_asup; /* pointers to rows of Asup */
170 int_t *ind_asup; /* row indices of Asup */
172
173typedef struct {
174 int_t *rcv_interLvl; /* from which processors iam receives data */
175 int_t *snd_interLvl; /* to which processors iam sends data */
176 int_t *snd_interSz; /* size of data to be send */
177 int_t *snd_LinterSz; /* size of data in L part to be send */
178 int_t *snd_vtxinter; /* first vertex from where to send data */
179
180 /* inter level data structures */
181 int_t *snd_intraLvl; /* to which processors iam sends data */
182 int_t snd_intraSz; /* size of data to send */
183 int_t snd_LintraSz; /* size of data to send */
184 int_t *rcv_intraLvl; /* from which processors iam receives data */
185 int_t *rcv_buf; /* buffer to receive data */
186 int_t rcv_bufSz; /* size of the buffer to receive data */
187 int_t *snd_buf; /* buffer to send data */
188 int_t snd_bufSz; /* size of the buffer to send data */
189 int_t *ptr_rcvBuf; /* pointer to rcv_buf, the buffer to receive data */
191
192/* relaxation parameters used in the algorithms - for future release */
194typedef struct {
195 int_t fill_par; /* Estimation of fill. It corresponds to sp_ienv_dist(6) */
196 float relax_seps; /* relaxation parameter -not used in this version */
197 float relax_curSep; /* relaxation parameter -not used in this version */
198 float relax_gen; /* relaxation parameter -not used in this version */
199
200 /* number of operations performed during parallel symbolic factorization */
201 float nops;
202
203 /* no of dense current separators per proc */
205 /* no of dense separators up per proc */
207
208 float no_shmSnd; /* Number of auxiliary messages for send data */
209 float no_msgsSnd; /* Number of messages sending data */
210 int_t maxsz_msgSnd; /* Max size of messages sending data */
211 float sz_msgsSnd; /* Average size of messages sending data */
212 float no_shmRcvd; /* Number of auxiliary messages for rcvd data */
213 float no_msgsRcvd; /* Number of messages receiving data */
214 int_t maxsz_msgRcvd;/* Max size of messages receiving data */
215 float sz_msgsRcvd; /* Average size of messages receiving data */
216 float no_msgsCol; /* Number of messages sent for estimating size
217 of rows/columns, setup information
218 interLvl_symbfact, */
219 int_t maxsz_msgCol; /* Average size of messages counted in
220 no_msgsCol */
221 float sz_msgsCol; /* Max size of messages counted in no_msgsCol */
222
223 /* statistics on fill-in */
224 float fill_pelt[6];
225 /*
226 0 - average fill per elt added during right-looking factorization
227 1 - max fill per elt added during right-looking factorization
228 2 - number vertices modified during right-looking factorization
229 3 - average fill per elt
230 4 - max fill per elt
231 5 - number vertices computed in upper levels of separator tree
232 */
233
234 /* Memory usage */
235 int_t estimLSz; /* size of lsub due to right looking overestimation */
236 int_t estimUSz; /* size of usub due to right looking overestimation */
237 int_t maxSzLPr; /* maximum size of pruned L */
238 int_t maxSzUPr; /* maximum size of pruned U */
239 int_t maxSzBuf; /* maximum size of the send and receive buffers */
240 int_t szDnsSep; /* size of memory used when there are dense separators */
241 float allocMem; /* size of the total memory allocated (in bytes) */
243
244/* MACROS */
245
246/*
247 Macros for comptuting the owner of a vertex and the local index
248 corresponding to a vertex
249*/
250#define OWNER(x) ((x) / maxNvtcsPProc)
251#define LOCAL_IND(x) ((x) % maxNvtcsPProc)
252
253/* Macros for computing the available memory in lsub, usub */
254#define MEM_LSUB(Llu, VInfo) (Llu->szLsub - VInfo->nnz_ainf_loc)
255#define MEM_USUB(Llu, VInfo) (Llu->szUsub - VInfo->nnz_asup_loc)
256
257#define tag_interLvl 2
258#define tag_interLvl_LData 0
259#define tag_interLvl_UData 1
260#define tag_intraLvl_szMsg 1000
261#define tag_intraLvl_LData 1001
262#define tag_intraLvl_UData 1002
263/* tag_intraLvl has to be the last tag number */
264#define tag_intraLvl 1003
265
266/*
267 * Index of diagonal element, no of elements preceding each column/row
268 * of L/U send to another processor
269 */
270#define DIAG_IND 0
271#define NELTS_IND 1
272#define RCVD_IND 2
273
274#define SUCCES_RET 0 /* successful return from a routine */
275#define ERROR_RET 1 /* error return code from a routine */
276#define FILLED_SEP 2 /* the current separator is dense */
277#define FILLED_SEPS 3 /* all the separators situated on the path from the current
278 separator to the root separator are dense */
279
280/* Code for the type of the memory to expand */
281#define USUB_PR 0
282#define LSUB_PR 1
283/* Sherry: the following are already defined in superlu_enum_const.h
284#define USUB 0
285#define LSUB 1
286*/
287
288/*
289 * Code for the type of computation - right looking (RL_SYMB); left
290 * looking (LL_SYMB); symbolic factorization of an independent domain
291 * (DOMAIN_SYMB); current separator is dense (DNS_CURSEP); all the
292 * separators from the current one to the root of the tree are dense
293 * (DNS_UPSEPS).
294 */
295#define RL_SYMB 0
296#define DOMAIN_SYMB 1
297#define LL_SYMB 2
298#define DNS_UPSEPS 3
299#define DNS_CURSEP 4
300
301
302#endif /* __SUPERLU_DIST_PSYMBFACT */
int int_t
Definition: superlu_defs.h:114
LU_space_t
Definition: superlu_enum_consts.h:40
Definition: psymbfact.h:106
int_t nextu
Definition: psymbfact.h:126
int_t szLsubPr
Definition: psymbfact.h:109
int_t * lsub
Definition: psymbfact.h:118
int_t * xlsub
Definition: psymbfact.h:117
int_t * xlsubPr
Definition: psymbfact.h:107
int_t szUsubPr
Definition: psymbfact.h:113
int_t * xusubPr
Definition: psymbfact.h:111
LU_space_t MemModel
Definition: psymbfact.h:132
int_t * usubPr
Definition: psymbfact.h:112
int_t szLsub
Definition: psymbfact.h:119
int_t * xusub_rcvd
Definition: psymbfact.h:122
int_t * cntelt_vtcs
Definition: psymbfact.h:128
int_t * xusub
Definition: psymbfact.h:123
int_t * lsubPr
Definition: psymbfact.h:108
int_t szUsub
Definition: psymbfact.h:125
int_t no_expcp
Definition: psymbfact.h:135
int_t * cntelt_vtcsA_lvl
Definition: psymbfact.h:129
int_t * xlsub_rcvd
Definition: psymbfact.h:116
int_t no_expand_pr
Definition: psymbfact.h:134
int_t nextl
Definition: psymbfact.h:120
int_t no_expand
Definition: psymbfact.h:133
int_t indLsubPr
Definition: psymbfact.h:110
int_t indUsubPr
Definition: psymbfact.h:114
int_t * usub
Definition: psymbfact.h:124
Definition: psymbfact.h:57
int_t nvtcs_loc
Definition: psymbfact.h:69
int_t * xlsub
Definition: psymbfact.h:58
int_t * supno_loc
Definition: psymbfact.h:66
int_t * xsup_beg_loc
Definition: psymbfact.h:67
int64_t nnzLU
Definition: psymbfact.h:72
int_t * globToLoc
Definition: psymbfact.h:70
int_t * lsub
Definition: psymbfact.h:59
int_t * xsup_end_loc
Definition: psymbfact.h:68
int_t szLsub
Definition: psymbfact.h:60
int_t maxNvtcsPProc
Definition: psymbfact.h:71
int_t * xusub
Definition: psymbfact.h:62
int_t * usub
Definition: psymbfact.h:63
int_t szUsub
Definition: psymbfact.h:64
Definition: psymbfact.h:173
int_t * snd_intraLvl
Definition: psymbfact.h:181
int_t * snd_vtxinter
Definition: psymbfact.h:178
int_t snd_intraSz
Definition: psymbfact.h:182
int_t * rcv_intraLvl
Definition: psymbfact.h:184
int_t snd_bufSz
Definition: psymbfact.h:188
int_t * snd_interLvl
Definition: psymbfact.h:175
int_t * rcv_buf
Definition: psymbfact.h:185
int_t * ptr_rcvBuf
Definition: psymbfact.h:189
int_t rcv_bufSz
Definition: psymbfact.h:186
int_t * snd_LinterSz
Definition: psymbfact.h:177
int_t * snd_buf
Definition: psymbfact.h:187
int_t snd_LintraSz
Definition: psymbfact.h:183
int_t * snd_interSz
Definition: psymbfact.h:176
int_t * rcv_interLvl
Definition: psymbfact.h:174
Structure used for redistributing A for the symbolic factorization algorithm.
Definition: psymbfact.h:166
int_t * ind_asup
Definition: psymbfact.h:170
int_t * ind_ainf
Definition: psymbfact.h:168
int_t * x_ainf
Definition: psymbfact.h:167
int_t * x_asup
Definition: psymbfact.h:169
statistics collected during parallel symbolic factorization
Definition: psymbfact.h:194
float sz_msgsCol
Definition: psymbfact.h:221
float relax_seps
Definition: psymbfact.h:196
int_t nDnsUpSeps
Definition: psymbfact.h:206
int_t szDnsSep
Definition: psymbfact.h:240
float allocMem
Definition: psymbfact.h:241
float no_msgsRcvd
Definition: psymbfact.h:213
int_t estimLSz
Definition: psymbfact.h:235
int_t nDnsCurSep
Definition: psymbfact.h:204
float sz_msgsRcvd
Definition: psymbfact.h:215
float no_msgsSnd
Definition: psymbfact.h:209
float no_shmRcvd
Definition: psymbfact.h:212
int_t fill_par
Definition: psymbfact.h:195
float sz_msgsSnd
Definition: psymbfact.h:211
float no_msgsCol
Definition: psymbfact.h:216
int_t estimUSz
Definition: psymbfact.h:236
float relax_curSep
Definition: psymbfact.h:197
int_t maxSzUPr
Definition: psymbfact.h:238
int_t maxSzBuf
Definition: psymbfact.h:239
float nops
Definition: psymbfact.h:201
int_t maxSzLPr
Definition: psymbfact.h:237
int_t maxsz_msgSnd
Definition: psymbfact.h:210
int_t maxsz_msgCol
Definition: psymbfact.h:219
int_t maxsz_msgRcvd
Definition: psymbfact.h:214
float relax_gen
Definition: psymbfact.h:198
float no_shmSnd
Definition: psymbfact.h:208
Local information on vertices distribution.
Definition: psymbfact.h:140
int_t nnz_ainf_loc
Definition: psymbfact.h:159
int_t maxNeltsVtx
Definition: psymbfact.h:145
int_t xusub_nextLvl
Definition: psymbfact.h:160
int_t curblk_loc
Definition: psymbfact.h:151
int filledSep
Definition: psymbfact.h:155
int_t xlsub_nextLvl
Definition: psymbfact.h:161
int_t * begEndBlks_loc
Definition: psymbfact.h:149
int_t maxSzBlk
Definition: psymbfact.h:141
int_t maxNvtcsNds_loc
Definition: psymbfact.h:142
int_t nnz_asup_loc
Definition: psymbfact.h:156
int_t nvtcsLvl_loc
Definition: psymbfact.h:153
int_t nvtcs_loc
Definition: psymbfact.h:152
int_t fstVtx_nextLvl
Definition: psymbfact.h:162
int_t nblks_loc
Definition: psymbfact.h:148