53 const SolverMatrix *solvmtx,
57 pastix_int_t itercblk;
67 for (itercblk=0; itercblk<solvmtx->cblknbr; itercblk++, cblk++)
69 if ( cblk->
cblktype & (CBLK_FANIN|CBLK_RECV) ) {
72 if ( solvmtx->clustnum != cblk->
ownerid ) {
76 sprintf( filename,
"%s_%ld.txt", prefix, (
long)cblk->
gcblknum );
77 stream =
pastix_fopenw( pastix_data->dir_global, filename,
"w" );
78 if ( stream == NULL ){
128 const SolverMatrix *solvA,
129 SolverMatrix *solvB )
133 pastix_int_t cblknum;
137 for(cblknum=0; cblknum<solvA->cblknbr; cblknum++, cblkA++, cblkB++) {
139 if ( rc != saved_rc ){
140 fprintf(stderr,
"CBLK %ld was not correctly compressed\n", (
long)cblknum);
179 pastix_int_t cblknum, gain = 0;
181 ilu_lvl = solvmtx->lowrank.compress_preselect ? -1 : solvmtx->lowrank.ilu_lvl;
183 for(cblknum=0; cblknum<solvmtx->cblknbr; cblknum++, cblk++) {
184 if ( cblk->
cblktype & CBLK_COMPRESSED ) {
206 pastix_int_t cblknum;
209 for(cblknum=0; cblknum<solvmtx->cblknbr; cblknum++, cblk++) {
210 if (cblk->
cblktype & CBLK_COMPRESSED) {
236 pastix_fixdbl_t *dparm )
241 pastix_int_t i, cblknum;
242 pastix_int_t gain[MEMORY_STATS_SIZE] = { 0 };
243 pastix_int_t orig[MEMORY_STATS_SIZE] = { 0 };
244 pastix_fixdbl_t memlr[MEMORY_STATS_SIZE] = { 0. };
245 pastix_fixdbl_t memfr[MEMORY_STATS_SIZE] = { 0. };
246 pastix_fixdbl_t totlr, totfr;
248 #if defined(PASTIX_SUPERNODE_STATS)
249 pastix_int_t last[3] = { 0 };
250 pastix_fixdbl_t memlast[4];
253 for(i=0; i<solvmtx->bloknbr; i++, solvblok++ ) {
257 pastix_int_t size = ncols * nrows;
260 if ( cblk->
ownerid != solvmtx->clustnum ) {
265 if ( lcblk->
cblktype & (CBLK_RECV|CBLK_FANIN) ) {
269 if ( !(lcblk->
cblktype & CBLK_COMPRESSED) ) {
271 last[solvblok->
inlast] += 2 * size;
274 last[solvblok->
inlast] += size;
281 assert( ((nrows+ncols) * solvblok->
LRblock[0].
rkmax) <= size );
285 last[solvblok->
inlast] += size;
292 assert( ((nrows+ncols) * solvblok->
LRblock[1].
rkmax) <= size );
296 last[solvblok->
inlast] += size;
301 for (i=0; i<3; i++) {
302 memlast[i] = last[i] * pastix_size_of( PastixFloat );
304 memlast[3] = memlast[0] + memlast[1] + memlast[2];
306 pastix_print( solvmtx->clustnum, 0,
307 " Compression on LAST\n"
308 " ------------------------------------------------\n"
313 pastix_print_value(memlast[0]), pastix_print_unit(memlast[0]),
314 pastix_print_value(memlast[1]), pastix_print_unit(memlast[1]),
315 pastix_print_value(memlast[2]), pastix_print_unit(memlast[2]),
316 pastix_print_value(memlast[3]), pastix_print_unit(memlast[3]));
319 for(cblknum=0; cblknum<solvmtx->cblknbr; cblknum++, cblk++) {
323 if ( cblk->
ownerid != solvmtx->clustnum ) {
328 if ( cblk->
cblktype & (CBLK_RECV|CBLK_FANIN) ) {
332 if ( !(cblk->
cblktype & CBLK_COMPRESSED) )
334 pastix_int_t in_height = 0;
335 pastix_int_t off_height = cblk->
stride;
339 while( (blok < cblk[1].fblokptr) &&
347 off_height -= in_height;
354 orig[
LR_DInD] += colnbr * colnbr;
370 for (i=0; i<MEMORY_STATS_SIZE; i++) {
371 memlr[i] = (orig[i] - gain[i]) * pastix_size_of( PastixFloat );
372 memfr[i] = orig[i] * pastix_size_of( PastixFloat );
377 pastix_print( solvmtx->clustnum, 0,
379 " ------------------------------------------------\n"
380 " Full-rank supernodes\n"
381 " Inside %8.3g %co\n"
382 " Outside %8.3g %co\n"
383 " Low-rank supernodes\n"
384 " Diag in diag %8.3g %co\n"
385 " Inside not selected %8.3g %co / %8.3g %co\n"
386 " Inside selected %8.3g %co / %8.3g %co\n"
387 " Outside %8.3g %co / %8.3g %co\n"
388 " ------------------------------------------------\n"
389 " Total %8.3g %co / %8.3g %co\n",
393 pastix_print_value(memfr[
LR_DInD]), pastix_print_unit(memfr[
LR_DInD]),
404 pastix_print_value(totlr), pastix_print_unit(totlr),
405 pastix_print_value(totfr), pastix_print_unit(totfr) );
436 float *S, pastix_int_t lds )
438 SolverCblk *cblk = solvmtx->cblktab + solvmtx->cblkschur;
440 pastix_int_t itercblk, fcolnum, nbcol;
444 nbcol = solvmtx->nodenbr - fcolnum;
445 assert( nbcol <= lds );
448 LAPACKE_slaset_work( LAPACK_COL_MAJOR,
'A', nbcol, nbcol, 0., 0., S, lds );
450 for (itercblk=solvmtx->cblkschur; itercblk<solvmtx->cblknbr; itercblk++, cblk++)
452 assert( cblk->
cblktype & CBLK_IN_SCHUR );
453 assert( lds >= cblk->
stride );
455 localS = S + (cblk->
fcolnum - fcolnum) * lds + (cblk->
fcolnum - fcolnum);
485 float *D, pastix_int_t incD )
489 pastix_int_t lda, itercblk, nbcol, i;
491 for (itercblk=0; itercblk<solvmtx->cblknbr; itercblk++, cblk++)
494 if ( cblk->
cblktype & CBLK_COMPRESSED ) {
502 if ( cblk->
cblktype & CBLK_LAYOUT_2D ) {
510 for (i=0; i<nbcol; i++, D += incD, A += lda ) {