103 assert( symbmtx->
baseval == 0 );
107 #ifdef PASTIX_DYNSCHED
108 solvmtx->btree = ctrl->btree;
115 solvmtx->solv_comm = comm;
126 cblklocalnum, bloklocalnum, tasklocalnum,
158 for ( i = 0; i < symbmtx->
cblknbr; i++, symbcblk++, candcblk++ ) {
162 int tasks2D, flaglocal;
164 flaglocal = ( simuctrl->
cblktab[i].
owned ) || ( ftgttab[i] != NULL );
169 tasks2D = candcblk->
cblktype & CBLK_TASKS_2D;
179 ftgtcblk = ftgttab[i];
180 while( ftgtcblk != NULL ) {
181 assert( (ftgtcblk->ownerid != -1) &&
182 (ftgtcblk->ownerid != ctrl->
clustnum) );
185 candcblk, cblklocalnum,
187 cblknum, brownum, i );
195 solvmtx->colmax = pastix_imax( solvmtx->colmax,
cblk_colnbr(solvcblk) );
200 if ( solvcblk->
cblktype & CBLK_COMPRESSED ) {
201 cblksize += (solvblok - solvcblk->
fblokptr);
225 ftgtcblk = ftgtcblk->next;
236 cblknum, brownum, i, ctrl->
clustnum );
244 assert( ((solvmtx->clustnbr > 1) && (nodenbr <= solvcblk->fcolnum)) ||
245 ((solvmtx->clustnbr == 1) && (nodenbr == solvcblk->
fcolnum)) );
250 coefnbr += solvcblk->
stride * nbcols;
256 ftgtcblk = ftgttab[i];
258 assert( ftgtcblk != NULL );
259 assert( (ftgtcblk->ownerid != -1) &&
260 (ftgtcblk->ownerid != ctrl->
clustnum) );
263 candcblk, cblklocalnum,
265 cblknum, brownum, i );
277 solvmtx->colmax = pastix_imax( solvmtx->colmax, nbcols );
285 (solvblok - solvcblk->
fblokptr), tasks2D, cblknum );
287 #if defined(PASTIX_WITH_MPI)
288 if ( solvmtx->clustnbr > 1 ) {
289 #if defined(PASTIX_BLEND_FANIN_FR)
290 if ( ( solvcblk->
cblktype & CBLK_COMPRESSED ) &&
291 ( solvcblk->
cblktype & ( CBLK_FANIN | CBLK_RECV ) ) ) {
292 solvcblk->
cblktype &= ( ~CBLK_COMPRESSED );
296 if( solvcblk->
cblktype & CBLK_IN_SCHUR ) {
297 static int warning_schur = 1;
298 if ( warning_schur && (solvmtx->clustnum == 0) ) {
300 "Warning: Schur complement support is not yet available with multiple MPI processes\n"
301 " It is thus disabled and the factorization will be fully performed\n" );
304 solvcblk->
cblktype &= (~CBLK_IN_SCHUR);
310 if ( (cblknum < solvmtx->cblkschur) &&
311 (solvcblk->
cblktype & CBLK_IN_SCHUR) )
317 assert( cblknum == (solvcblk - solvmtx->
cblktab) );
333 browtmp, cblklocalnum, bloklocalnum, brownum );
337 fblokptr = solvcblk[-recvcnt].
fblokptr;
338 solvmtx->
browtab[brownum + brownbr] = fblokptr - solvmtx->
bloktab;
339 fblokptr->
browind = brownum + brownbr;
349 assert( brownum <= solvmtx->brownbr );
361 solvcblk[-1].lcolnum + 1, solvcblk[-1].lcolnum + 1,
362 brownum, 0, -1, solvmtx->clustnum );
380 assert( solvmtx->
brownbr == brownum );
381 assert( solvmtx->
cblknbr == cblknum );
386 memFree_null( browtmp );
390 tasklocalnum, cblklocalnum,
393 memFree_null(cblklocalnum);
394 memFree_null(bloklocalnum);
395 memFree_null(tasklocalnum);
396 memFree_null(ftgttab);
468 assert( symbmtx->
baseval == 0 );
477 solvmtx->solv_comm = comm;
480 solvmtx->tasknbr = simuctrl->
tasknbr;
511 for(i=0; i<symbmtx->
cblknbr; i++, symbcblk++, candcblk++)
514 int tasks2D = candcblk->
cblktype & CBLK_TASKS_2D;
529 assert( nodenbr == solvcblk->
fcolnum );
532 coefnbr += solvcblk->
stride * nbcols;
535 (solvblok - solvcblk->
fblokptr), tasks2D, cblknum );
537 #if defined(PASTIX_WITH_MPI)
538 if ( (solvcblk->
cblktype & CBLK_COMPRESSED) &&
539 (solvcblk->
cblktype & (CBLK_FANIN | CBLK_RECV)) )
541 solvcblk->
cblktype &= (~CBLK_COMPRESSED);
546 if ( (cblknum < solvmtx->cblkschur) &&
547 (solvcblk->
cblktype & CBLK_IN_SCHUR) )
566 browtmp, NULL, NULL, brownum );
570 assert( brownum <= solvmtx->brownbr );
581 solvcblk[-1].lcolnum + 1, solvcblk[-1].lcolnum + 1,
600 assert( solvmtx->
cblknbr == cblknum );
603 memFree_null( browtmp );
608 for(i=0; i<solvmtx->
brownbr; i++)
616 NULL, NULL, NULL, ctrl->
clustnum, is_dbg );
BEGIN_C_DECLS typedef int pastix_int_t
Processor candidate group to own a column blok.
pastix_int_t local_nbctxts
pastix_int_t local_nbthrds
pastix_int_t total_nbcores
The type and structure definitions.
Control structure for the simulation.
SolverBlok * solvMatGen_register_local_cblk(const symbol_matrix_t *symbmtx, const Cand *candcblk, const pastix_int_t *cblklocalnum, SolverCblk *solvcblk, SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t brownum, pastix_int_t gcblknm, pastix_int_t ownerid)
Register a local cblk from a symbol_cblk_t structure !(Fanin|Recv)
void solvMatGen_fill_localnums(const symbol_matrix_t *symbmtx, const SimuCtrl *simuctrl, SolverMatrix *solvmtx, pastix_int_t *cblklocalnum, pastix_int_t *bloklocalnum, pastix_int_t *tasklocalnum, solver_cblk_recv_t **ftgttab)
Fill the local numbering arrays to compress the symbol information into solver.
static pastix_int_t solvMatGen_supernode_index(const symbol_cblk_t *symbcblk, SolverCblk *solvcblk, pastix_int_t sndeidx, const pastix_order_t *ordeptr)
Register the original supernode index of the cblk.
SolverBlok * solvMatGen_register_remote_cblk(const symbol_matrix_t *symbmtx, const solver_cblk_recv_t *recvcblk, const Cand *candcblk, const pastix_int_t *cblklocalnum, SolverCblk *solvcblk, SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t brownum, pastix_int_t gcblknm)
Register a remote cblk from a solver_recv_cblk_t structure (Fanin|Recv)
static void solvMatGen_init_cblk(SolverCblk *solvcblk, SolverBlok *fblokptr, const Cand *candcblk, const symbol_cblk_t *symbcblk, pastix_int_t fcolnum, pastix_int_t lcolnum, pastix_int_t brownum, pastix_int_t stride, pastix_int_t cblknum, int ownerid)
Initialize a solver cblk.
void solvMatGen_fill_tasktab(SolverMatrix *solvmtx, isched_t *isched, const SimuCtrl *simuctrl, const pastix_int_t *tasklocalnum, const pastix_int_t *cblklocalnum, const pastix_int_t *bloklocalnum, pastix_int_t clustnum, int is_dbg)
Fill the global tasktab array, as well as the thread ttsktab arrays.
void solvMatGen_stats_last(SolverMatrix *solvmtx)
Mark blocks if they belong to the last supernode, or if they are facing it for statistical purpose on...
static void solvMatGen_cblkIs2D(SolverMatrix *solvmtx, pastix_int_t *nbcblk2d, pastix_int_t *nbblok2d, pastix_int_t nbbloks, pastix_int_t tasks2D, pastix_int_t cblknum)
Update the 1D/2D infos of the solver matrix through a cblk.
pastix_int_t solvMatGen_reorder_browtab(const symbol_matrix_t *symbmtx, const symbol_cblk_t *symbcblk, SolverMatrix *solvmtx, SolverCblk *solvcblk, pastix_int_t *browtmp, const pastix_int_t *cblklocalnum, const pastix_int_t *bloklocalnum, pastix_int_t brownum)
Reorder the browtab from the symbol structure in a distributed way. First stock the 1D blocks and the...
void solvMatGen_max_buffers(SolverMatrix *solvmtx)
Compute the maximum area of the temporary buffers used during computation.
static void solvMatGen_init_blok(SolverBlok *solvblok, pastix_int_t lcblknm, pastix_int_t fcblknm, pastix_int_t frownum, pastix_int_t lrownum, pastix_int_t stride, pastix_int_t nbcols, pastix_int_t layout2D)
Initialize a solver block.
void solverInit(SolverMatrix *solvmtx)
Initialize the solver structure.
int solverMatrixGen(SolverMatrix *solvmtx, const symbol_matrix_t *symbmtx, const pastix_order_t *ordeptr, const SimuCtrl *simuctrl, const BlendCtrl *ctrl, PASTIX_Comm comm, isched_t *isched)
Initialize the solver matrix structure.
int solverMatrixGenSeq(SolverMatrix *solvmtx, const symbol_matrix_t *symbmtx, const pastix_order_t *ordeptr, const SimuCtrl *simuctrl, const BlendCtrl *ctrl, PASTIX_Comm comm, isched_t *isched, pastix_int_t is_dbg)
Initialize the solver matrix structure in sequential.
static pastix_int_t symbol_cblk_get_colnum(const symbol_matrix_t *symbmtx, symbol_cblk_t *symbcblk, pastix_int_t *fcolnum, pastix_int_t *lcolnum)
Get the expanded column indexes of a symbol_cblk.
Symbol column block structure.
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
SolverBlok *restrict bloktab
pastix_int_t *restrict browtab
SolverCblk *restrict cblktab
Solver recv column block structure.
Solver column block structure.
Solver column block structure.