PaStiX Handbook 6.4.0
Loading...
Searching...
No Matches
solver.c
Go to the documentation of this file.
1/**
2 * @file solver.c
3 *
4 * PaStiX solver structure basic functions.
5 *
6 * @copyright 2004-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
7 * Univ. Bordeaux. All rights reserved.
8 *
9 * @version 6.4.0
10 * @author Mathieu Faverge
11 * @author Pierre Ramet
12 * @author Xavier Lacoste
13 * @author Tony Delarue
14 * @date 2024-07-05
15 *
16 **/
17#include "common.h"
18#include "blend/solver.h"
20#include "sopalin/coeftab.h"
21
22#if defined(PASTIX_WITH_PARSEC)
24#endif
25
26#if defined(PASTIX_WITH_STARPU)
28#endif
29
30/**
31 *******************************************************************************
32 *
33 * @ingroup blend_dev_solver_null
34 *
35 * @brief Compute the memory size used by the solver sturcture itself.
36 *
37 * This function doesn't count the memory space of the numerical information,
38 * but only the sapce of the data structure that describes the matrix.
39 *
40 *******************************************************************************
41 *
42 * @param[in] solvptr
43 * The pointer to the solver matrix structure.
44 *
45 *******************************************************************************
46 *
47 * @return the memory size in octet of the solver structure.
48 *
49 *******************************************************************************/
50static inline size_t
51solver_size( const SolverMatrix *solvptr )
52{
53 size_t mem = sizeof(SolverMatrix);
54
55 /* cblk and blocks arrays */
56 if ( solvptr->cblktab ) {
57 mem += solvptr->cblknbr * sizeof( SolverCblk );
58 }
59 if ( solvptr->bloktab ) {
60 mem += solvptr->bloknbr * sizeof( SolverBlok );
61 }
62 if ( solvptr->browtab ) {
63 mem += solvptr->brownbr * sizeof( pastix_int_t );
64 }
65#if defined(PASTIX_WITH_PARSEC)
66 if ( solvptr->parsec_desc ) {
67 mem += sizeof( parsec_sparse_matrix_desc_t );
68 }
69#endif
70#if defined(PASTIX_WITH_STARPU)
71 if ( solvptr->starpu_desc ) {
72 mem += sizeof( starpu_sparse_matrix_desc_t );
73 }
74#endif
75
76 /* /\* BubbleTree *\/ */
77 /* if ( solvptr->btree ) { */
78 /* mem += solvptr->bublnbr * sizeof( BubbleTree ); */
79 /* mem += solvptr->btree->nodemax * sizeof( BubbleTreeNode ); */
80 /* mem += solvptr->btree->nodemax * sizeof( int ); */
81 /* } */
82
83 /* Tasks */
84 if ( solvptr->tasktab ) {
85 mem += solvptr->tasknbr * sizeof(Task);
86 }
87 if ( solvptr->ttsknbr ) {
88 int i;
89 mem += solvptr->thrdnbr * sizeof(pastix_int_t);
90 mem += solvptr->thrdnbr * sizeof(pastix_int_t*);
91
92 for( i=0; i<solvptr->thrdnbr; i++ ) {
93 mem += solvptr->ttsknbr[i] * sizeof(pastix_int_t);
94 }
95 }
96
97 return mem;
98}
99
100/**
101 * @addtogroup blend_dev_solver
102 * @{
103 *
104 */
105
106/**
107 *******************************************************************************
108 *
109 * @brief Initialize the solver structure.
110 *
111 *******************************************************************************
112 *
113 * @param[inout] solvmtx
114 * The solver structure to initialize.
115 *
116 *******************************************************************************/
117void
119{
120 memset(solvmtx, 0, sizeof (SolverMatrix));
121 solvmtx->cblkmax1d = -1;
122 solvmtx->cblkmaxblk = 1;
123 return;
124}
125
126/**
127 *******************************************************************************
128 *
129 * @brief Free the content of the solver matrix structure.
130 *
131 * All the arrays from the structure are freed and the structure is memset to 0
132 * at exit, but the solver itself is not freed. It will require a new call to
133 * solverInit if the memory space area needs to be reused for a new solver
134 * matrix.
135 *
136 *******************************************************************************
137 *
138 * @param[inout] solvmtx
139 * The pointer to the structure to free.
140 *
141 *******************************************************************************/
142void
144{
145 pastix_int_t i;
146
147 coeftabExit( solvmtx );
148
149 /* Free arrays of solvmtx */
150 if(solvmtx->cblktab) {
151 memFree_null(solvmtx->cblktab);
152 }
153 if(solvmtx->bloktab) {
154 memFree_null(solvmtx->bloktab);
155 }
156 if(solvmtx->browtab) {
157 memFree_null(solvmtx->browtab);
158 }
159 if(solvmtx->gcbl2loc) {
160 memFree_null(solvmtx->gcbl2loc);
161 }
162 if(solvmtx->tasktab) {
163 memFree_null(solvmtx->tasktab);
164 }
165 memFree_null(solvmtx->ttsknbr);
166 for (i=0;i<solvmtx->bublnbr;i++)
167 {
168 if (solvmtx->ttsktab[i] != NULL) {
169 memFree_null(solvmtx->ttsktab[i]);
170 }
171 }
172 memFree_null(solvmtx->ttsktab);
173}
174
175/**
176 *******************************************************************************
177 *
178 * @brief Print statistical information about the solver matrix structure.
179 *
180 *******************************************************************************
181 *
182 * @param[in] solvptr
183 * The pointer to the solver matrix structure.
184 *
185 *******************************************************************************/
186void
188{
189 SolverCblk *cblk;
190 SolverBlok *blok;
191 size_t memstruct, memcoef;
192 pastix_int_t itercblk;
193 int64_t cblknbr;
194
195 /* 0: Total, 1: 1d, 2: 2d */
196 int64_t fcol[3], lcol[3];
197 /* Average width of cblks, and height of off-diagonal blocks */
198 int64_t width[3] = { 0, 0, 0 };
199 int64_t height[3] = { 0, 0, 0 };
200 /* Number of cblks, and of blocks without diagonal blocks */
201 int64_t nbcblk[3] = { 0, 0, 0 };
202 int64_t nbblok[3] = { 0, 0, 0 };
203 int64_t fblok[3], lblok[3];
204 /* Number of blocks with teh regular diagonal partion of the matrix that includes subblocks */
205 int64_t nbpartblok[3] = { 0, 0, 0 };
206
207 /* Compute the number of GEMM tasks in the multiple cases */
208 int64_t gemm_dense = 0;
209 int64_t gemm_nopart_full2 = 0;
210 int64_t gemm_nopart_hybrid = 0;
211 int64_t gemm_parsec_full2 = 0;
212 int64_t gemm_parsec_hybrid = 0;
213 int64_t gemm_starpu_full2 = 0;
214 int64_t gemm_starpu_hybrid = 0;
215 int64_t gemm_full1 = 0;
216
217 cblknbr = solvptr->cblknbr;
218 cblk = solvptr->cblktab;
219 memcoef = 0;
220 for(itercblk=0; itercblk<cblknbr; itercblk++, cblk++)
221 {
222 pastix_int_t colnbr = cblk->lcolnum - cblk->fcolnum + 1;
223 pastix_int_t rownbr = cblk->stride;
224 int64_t bcol_size = cblk[1].fblokptr - cblk[0].fblokptr;
225 int64_t brow_size[3];
226 int64_t nbpblok = 0;
227
228 brow_size[0] = cblk[1].brownum - cblk[0].brownum;
229 brow_size[1] = cblk[0].brown2d - cblk[0].brownum;
230 brow_size[2] = cblk[1].brownum - cblk[0].brown2d;
231 assert( brow_size[0] == (brow_size[1] + brow_size[2]) );
232
233 memcoef += colnbr * rownbr;
234
235 /* Update counters when no diagonal partitionning is considered and all blocks are considers */
236 gemm_nopart_full2 += brow_size[0] * bcol_size;
237 gemm_nopart_hybrid += brow_size[1] + (brow_size[2] * bcol_size);
238
239 /* Compute the compressed version of the brow size */
240#if !defined(NDEBUG)
241 {
242 pastix_int_t b;
243 pastix_int_t lcblk = -1;
244 pastix_int_t *browptr = solvptr->browtab + cblk[0].brownum;
245 int64_t brow_csze[3] = { 0, 0, 0 };
246
247 for ( b = cblk[0].brownum; b < cblk[1].brownum; b++, browptr++ ) {
248 blok = solvptr->bloktab + (*browptr);
249 if ( blok->lcblknm != lcblk ) {
250 lcblk = blok->lcblknm;
251
252 brow_csze[0]++;
253 if ( (solvptr->cblktab + lcblk)->cblktype & CBLK_TASKS_2D ) {
254 brow_csze[2]++;
255 }
256 else {
257 brow_csze[1]++;
258 }
259 }
260 }
261 assert( brow_csze[0] == (brow_csze[1] + brow_csze[2]) );
262 assert( brow_csze[0] <= brow_size[0] );
263 assert( brow_csze[1] <= brow_size[1] );
264 assert( brow_csze[2] <= brow_size[2] );
265 }
266#endif
267
268 /*
269 * Compute the compressed version of the bcol size
270 * The algorithm goes backward to avoid a double pass to compute StarPU
271 * number of tasks.
272 */
273 blok = cblk->fblokptr + 1;
274 while( blok < cblk[1].fblokptr ) {
275 while( (blok < cblk[1].fblokptr-1) &&
276 (blok[0].fcblknm == blok[1].fcblknm) &&
277 (blok[0].lcblknm == blok[1].lcblknm) )
278 {
279 blok++;
280 }
281 nbpblok++;
282 blok++;
283 }
284
285 /* Compute the number of PaRSEC GEMM tasks in a left looking manner */
286 gemm_parsec_full2 += (nbpblok+1) * brow_size[0];
287 gemm_parsec_hybrid += ((nbpblok+1) * brow_size[2]) + brow_size[1];
288
289 /* Compute the number of StarPU GEMM tasks in a right looking manner */
290 gemm_starpu_full2 += (nbpblok * (nbpblok+1)) / 2;
291
292 if (cblk->cblktype & CBLK_TASKS_2D) {
293 gemm_starpu_hybrid += (nbpblok * (nbpblok+1)) / 2;
294
295 nbpartblok[2] += nbpblok;
296 width[2] += colnbr;
297 height[2] += rownbr - colnbr;
298 }
299 else {
300 gemm_starpu_hybrid += bcol_size - 1;
301
302 nbpartblok[1] += nbpblok;
303 width[1] += colnbr;
304 height[1] += rownbr - colnbr;
305 }
306
307 nbpartblok[0] += nbpblok;
308 width[0] += colnbr;
309 height[0] += rownbr - colnbr;
310 }
311
312 assert( (width[1] + width[2]) == solvptr->nodenbr );
313 assert( (width[1] + width[2]) == width[0] );
314 assert( (height[1] + height[2]) == height[0] );
315
316 memstruct = solver_size( solvptr );
317
318 gemm_dense = (cblknbr * ( cblknbr * cblknbr - 1 )) / 6;
319 gemm_full1 = solvptr->bloknbr - solvptr->cblknbr;
320
321 fcol[0] = 0;
322 fcol[1] = 0;
323 fcol[2] = (solvptr->cblktab + solvptr->cblkmin2d)->fcolnum;
324
325 lcol[0] = (solvptr->cblktab + solvptr->cblknbr )->fcolnum;
326 lcol[1] = (solvptr->cblktab + solvptr->cblkmax1d)->lcolnum + 1;
327 lcol[2] = (solvptr->cblktab + solvptr->cblknbr )->fcolnum;
328
329 nbcblk[0] = cblknbr;
330 nbcblk[1] = (cblknbr - solvptr->nb2dcblk);
331 nbcblk[2] = solvptr->nb2dcblk;
332
333 nbblok[0] = solvptr->bloknbr - cblknbr;
334 nbblok[1] = (solvptr->bloknbr - cblknbr) - (solvptr->nb2dblok - solvptr->nb2dcblk);
335 nbblok[2] = solvptr->nb2dblok - solvptr->nb2dcblk;
336
337 fblok[0] = 0;
338 fblok[1] = 0;
339 fblok[2] = ((solvptr->cblktab + solvptr->cblkmin2d)->fblokptr - solvptr->bloktab);
340
341 lblok[0] = solvptr->bloknbr;
342 lblok[1] = (solvptr->cblktab + solvptr->cblkmax1d + 1)->fblokptr - solvptr->bloktab;
343 lblok[2] = solvptr->bloknbr;
344
345 fprintf( stdout,
346 " Solver Matrix statistics: | %-12s | %-12s | %-12s |\n"
347 " --------------------------------------------------------------------------------\n"
348 " Number of cblk | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
349 " Number of block | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
350 " Number of block (diag part.) | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
351 " Cblk: first | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
352 " last | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
353 " Block: first | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
354 " last | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
355 " rownum: first | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
356 " last | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
357 " Average width | %12.2lf | %12.2lf | %12.2lf |\n"
358 " Average height | %12.2lf | %12.2lf | %12.2lf |\n"
359 " Structure memory space %11.2lf %co\n"
360 " Number of coeficients stored %10ld\n",
361 /* Header */
362 "All", "1d", "2d",
363 /* Number of cblk */
364 nbcblk[0], nbcblk[1], nbcblk[2],
365 /* Number of blok without diagonal blocks (Add cblknbr to get the total) */
366 nbblok[0], nbblok[1], nbblok[2],
367 /*
368 * Number of block in the compressed version (count 1 per block in
369 * the matrix partition following the diagonal blocks
370 */
371 nbpartblok[0], nbpartblok[1], nbpartblok[2],
372 /* Cblk */
373 (int64_t)0, (int64_t)0, (int64_t)(solvptr->cblkmin2d),
374 (int64_t)(cblknbr), (int64_t)(solvptr->cblkmax1d + 1), (int64_t)(cblknbr),
375 /* Blok */
376 fblok[0], fblok[1], fblok[2],
377 lblok[0], lblok[1], lblok[2],
378 /* Rownum/Colnum */
379 fcol[0], fcol[1], fcol[2],
380 lcol[0], lcol[1], lcol[2],
381 /* Average width */
382 (double)(width[0]) / (double)(nbcblk[0]),
383 (double)(width[1]) / (double)(nbcblk[1]),
384 (double)(width[2]) / (double)(nbcblk[2]),
385 /* Average height */
386 (double)(height[0]) / (double)(nbblok[0]),
387 (double)(height[1]) / (double)(nbblok[1]),
388 (double)(height[2]) / (double)(nbblok[2]),
389 /* Memory space */
390 pastix_print_value( memstruct ),
391 pastix_print_unit( memstruct ),
392 /* Memory coefficient */
393 (long)memcoef );
394
395 fprintf( stdout,
396 " Number of GEMM tasks: | %-12s | %-12s | %-12s | %-12s |\n"
397 " - All blocks | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
398 " - PaRSEC | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n"
399 " - StarPU | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " | %12" PRIi64 " |\n",
400 "Dense", "Full2d", "Hybrid", "Full1d",
401 gemm_dense, gemm_nopart_full2, gemm_nopart_hybrid, gemm_full1,
402 gemm_dense, gemm_parsec_full2, gemm_parsec_hybrid, gemm_full1,
403 gemm_dense, gemm_starpu_full2, gemm_starpu_hybrid, gemm_full1 );
404}
405
406/**
407 *******************************************************************************
408 *
409 * @brief Instanciate the arrays for the requests according to the scheduler.
410 *
411 *******************************************************************************
412 *
413 * @param[in] solve_step
414 * Define which step of the solve is concerned.
415 * @arg PastixSolveForward
416 * @arg PastixSolveBackward
417 * @arg PastixFacto
418 *
419 * @param[inout] solvmtx
420 * The pointer to the solver matrix structure.
421 *
422 *******************************************************************************/
423void
425 SolverMatrix *solvmtx )
426{
427 MPI_Request *request;
428 pastix_int_t *reqindx;
429 pastix_int_t i, reqnbr;
430
431 if ( solve_step == PastixSolveBackward ) {
432 reqnbr = solvmtx->recvnbr + 1;
433 }
434 else {
435 reqnbr = solvmtx->faninnbr + 1;
436 }
437
438 /* Restore recv and fanin nbr */
439 solvmtx->fanincnt = solvmtx->faninnbr;
440 solvmtx->recvcnt = solvmtx->recvnbr;
441
442 solvmtx->reqnbr = reqnbr;
443 solvmtx->reqlock = PASTIX_ATOMIC_UNLOCKED;
444
445 MALLOC_INTERN( solvmtx->reqtab, reqnbr, MPI_Request );
446 MALLOC_INTERN( solvmtx->reqidx, reqnbr, pastix_int_t );
447
448 request = solvmtx->reqtab;
449 reqindx = solvmtx->reqidx;
450 for ( i = 0; i < reqnbr; i++, request++, reqindx++ )
451 {
452 *request = MPI_REQUEST_NULL;
453 *reqindx = -1;
454 }
455 solverComMatrixInit( solvmtx );
456
457 return;
458}
459
460/**
461 *******************************************************************************
462 *
463 * @brief Free the arrays related to the requests
464 *
465 *******************************************************************************
466 *
467 * @param[inout] solvmtx
468 * The pointer to the solver matrix structure.
469 *
470 *******************************************************************************/
471void
473{
474 assert( solvmtx->reqnum == 0 );
475 assert( solvmtx->reqlock == PASTIX_ATOMIC_UNLOCKED );
476
477 if( solvmtx->reqtab ) {
478 memFree_null( solvmtx->reqtab );
479 }
480 if( solvmtx->reqidx ) {
481 memFree_null( solvmtx->reqidx );
482 }
483 solverComMatrixGather( solvmtx );
484 solverComMatrixExit( solvmtx );
485}
486
487/**
488 *******************************************************************************
489 *
490 * @brief Allocate the reception buffer, and initiate the first persistant
491 * reception
492 *
493 *******************************************************************************
494 *
495 * @param[in] side
496 * Define which side of the cblk must be tested.
497 * @arg PastixLCoef if lower part only
498 * @arg PastixUCoef if upper part only
499 * @arg PastixLUCoef if both sides.
500 *
501 * @param[inout] solvmtx
502 * The pointer to the solver matrix structure.
503 *
504 * @param[in] flttype
505 * Define which type are the coefficients.
506 * @arg PastixFloat
507 * @arg PastixDouble
508 * @arg PastixComplex32
509 * @arg PastixComplex64
510 *
511 *******************************************************************************/
512void
514 SolverMatrix *solvmtx,
515 pastix_coeftype_t flttype )
516{
517 /* Compute the max size (in bytes) for the communication buffer */
518 pastix_int_t size = pastix_size_of(flttype) * solvmtx->maxrecv;
519 size *= (side == PastixLUCoef) ? 2 : 1;
520
521 if( solvmtx->recvnbr == 0 ) {
522 return;
523 }
524
525 assert( solvmtx->maxrecv > 0 );
526
527 /* Init communication */
528 MALLOC_INTERN( solvmtx->rcoeftab, size, char );
529 MPI_Recv_init( solvmtx->rcoeftab, size,
530 MPI_CHAR, MPI_ANY_SOURCE, MPI_ANY_TAG,
531 solvmtx->solv_comm, solvmtx->reqtab );
532 MPI_Start( solvmtx->reqtab );
533
534 assert( solvmtx->reqnum == 0 );
535 solvmtx->reqnum++;
536#if defined(PASTIX_DEBUG_MPI)
537 fprintf( stderr, "[%2d] Start persistant recv from any source\n",
538 solvmtx->clustnum );
539#endif
540}
541
542/**
543 *******************************************************************************
544 *
545 * @brief Free the array linked to pending reception.
546 *
547 *******************************************************************************
548 *
549 * @param[inout] solvmtx
550 * The pointer to the solver matrix structure.
551 *
552 *******************************************************************************/
553void
555{
556 /* In fact, the pointer should never been freed by this call */
557 assert( solvmtx->reqtab == NULL );
558 if( solvmtx->rcoeftab ) {
559 memFree_null( solvmtx->rcoeftab );
560 }
561}
562
563/**
564 *******************************************************************************
565 *
566 * @brief Computes the max size of recv cblk.
567 *
568 *******************************************************************************
569 *
570 * @param[inout] solvmtx
571 * The pointer to the solver matrix structure.
572 *
573 *******************************************************************************
574 *
575 * @return maximun recv size
576 *
577 *******************************************************************************/
578static inline pastix_int_t
580{
581 pastix_int_t cblknbr = solvmtx->cblknbr;
582 const SolverCblk *cblk;
583 pastix_int_t k, max = 0;
584
585 cblk = solvmtx->cblktab;
586 for ( k = 0; k < cblknbr; k++, cblk++ ) {
587 if ( cblk->cblktype & (CBLK_RECV | CBLK_FANIN) ) {
588 max = pastix_imax( max, cblk_colnbr( cblk ) );
589 }
590 }
591
592 return max;
593}
594
595/**
596 *******************************************************************************
597 *
598 * @brief Allocates the reception buffer, and initiate the first persistant
599 * reception
600 *
601 *******************************************************************************
602 *
603 * @param[in] solve_step
604 * Define which step of the solve is concerned.
605 * @arg PastixSolveForward
606 * @arg PastixSolveBackward
607 *
608 * @param[inout] solvmtx
609 * The pointer to the solver matrix structure.
610 *
611 * @param[in] flttype
612 * Define which type are the coefficients.
613 * @arg PastixFloat
614 * @arg PastixDouble
615 * @arg PastixComplex32
616 * @arg PastixComplex64
617 *
618 * @param[inout] rhsb
619 * The pointer to the rhs data structure that holds the vectors of the
620 * right hand side.
621 *
622 *******************************************************************************/
623void
625 SolverMatrix *solvmtx,
626 pastix_coeftype_t flttype,
627 pastix_rhs_t rhsb )
628{
629 /* Computes the max size (in bytes) for the communication buffer */
630 pastix_int_t size;
631
632 if ( ( ( solve_step == PastixSolveForward ) && ( solvmtx->recvnbr == 0 ) ) ||
633 ( ( solve_step == PastixSolveBackward ) && ( solvmtx->faninnbr == 0 ) ) )
634 {
635 return;
636 }
637
638 size = pastix_size_of(flttype) * solverRhsRecvMax( solvmtx ) * rhsb->n;
639
640 /* Init communication */
641 MALLOC_INTERN( solvmtx->rcoeftab, size, char );
642 MPI_Recv_init( solvmtx->rcoeftab, size,
643 MPI_CHAR, MPI_ANY_SOURCE, MPI_ANY_TAG,
644 solvmtx->solv_comm, solvmtx->reqtab );
645 MPI_Start( solvmtx->reqtab );
646
647 assert( solvmtx->reqnum == 0 );
648 solvmtx->reqnum++;
649#if defined(PASTIX_DEBUG_MPI)
650 fprintf( stderr, "[%2d] Start persistant recv from any source (max = %ld B)\n",
651 solvmtx->clustnum, (long)size );
652#endif
653}
654
655/**
656 *******************************************************************************
657 *
658 * @brief Frees the array linked to pending reception.
659 *
660 *******************************************************************************
661 *
662 * @param[inout] solvmtx
663 * The pointer to the solver matrix structure.
664 *
665 *******************************************************************************/
666void
668{
669 solverRecvExit( solvmtx );
670}
671
672/**
673 *@}
674 */
BEGIN_C_DECLS typedef int pastix_int_t
Definition datatypes.h:51
void solverRecvExit(SolverMatrix *solvmtx)
Free the array linked to pending reception.
Definition solver.c:554
void solverRequestExit(SolverMatrix *solvmtx)
Free the arrays related to the requests.
Definition solver.c:472
static pastix_int_t solverRhsRecvMax(SolverMatrix *solvmtx)
Computes the max size of recv cblk.
Definition solver.c:579
void solverRhsRecvExit(SolverMatrix *solvmtx)
Frees the array linked to pending reception.
Definition solver.c:667
void solverRecvInit(pastix_coefside_t side, SolverMatrix *solvmtx, pastix_coeftype_t flttype)
Allocate the reception buffer, and initiate the first persistant reception.
Definition solver.c:513
void solverRhsRecvInit(solve_step_t solve_step, SolverMatrix *solvmtx, pastix_coeftype_t flttype, pastix_rhs_t rhsb)
Allocates the reception buffer, and initiate the first persistant reception.
Definition solver.c:624
void solverPrintStats(const SolverMatrix *solvptr)
Print statistical information about the solver matrix structure.
Definition solver.c:187
void solverRequestInit(solve_step_t solve_step, SolverMatrix *solvmtx)
Instanciate the arrays for the requests according to the scheduler.
Definition solver.c:424
void solverInit(SolverMatrix *solvmtx)
Initialize the solver structure.
Definition solver.c:118
void solverExit(SolverMatrix *solvmtx)
Free the content of the solver matrix structure.
Definition solver.c:143
void coeftabExit(SolverMatrix *solvmtx)
Free the solver matrix structure.
Definition coeftab.c:268
spm_coeftype_t pastix_coeftype_t
Arithmetic types.
Definition api.h:294
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
@ PastixLUCoef
Definition api.h:480
struct parsec_sparse_matrix_desc_s parsec_sparse_matrix_desc_t
PaRSEC descriptor stucture for the sparse matrix.
struct starpu_sparse_matrix_desc_s starpu_sparse_matrix_desc_t
StarPU descriptor stucture for the sparse matrix.
pastix_int_t n
Definition pastixdata.h:159
Main PaStiX RHS structure.
Definition pastixdata.h:155
static size_t solver_size(const SolverMatrix *solvptr)
Compute the memory size used by the solver sturcture itself.
Definition solver.c:51
pastix_int_t nodenbr
Definition solver.h:208
pastix_int_t reqnbr
Definition solver.h:271
pastix_int_t nb2dcblk
Definition solver.h:222
pastix_atomic_lock_t reqlock
Definition solver.h:273
pastix_int_t maxrecv
Definition solver.h:215
pastix_int_t cblkmin2d
Definition solver.h:219
pastix_int_t brownum
Definition solver.h:171
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
Definition solver.h:329
pastix_int_t brown2d
Definition solver.h:172
struct task_s Task
The task structure for the numerical factorization.
pastix_int_t nb2dblok
Definition solver.h:223
MPI_Request * reqtab
Definition solver.h:269
pastix_int_t recvcnt
Definition solver.h:217
void * rcoeftab
Definition solver.h:274
pastix_int_t cblknbr
Definition solver.h:211
pastix_int_t * gcbl2loc
Definition solver.h:234
pastix_int_t cblkmaxblk
Definition solver.h:220
SolverBlok *restrict bloktab
Definition solver.h:229
pastix_int_t cblkmax1d
Definition solver.h:218
pastix_int_t brownbr
Definition solver.h:227
pastix_int_t faninnbr
Definition solver.h:213
pastix_int_t fanincnt
Definition solver.h:214
struct solver_cblk_s SolverCblk
Solver column block structure.
struct solver_blok_s SolverBlok
Solver block structure.
SolverBlok * fblokptr
Definition solver.h:168
pastix_int_t bloknbr
Definition solver.h:224
pastix_int_t recvnbr
Definition solver.h:216
pastix_int_t *restrict browtab
Definition solver.h:230
volatile int32_t reqnum
Definition solver.h:272
pastix_int_t lcblknm
Definition solver.h:143
SolverCblk *restrict cblktab
Definition solver.h:228
pastix_int_t stride
Definition solver.h:169
int8_t cblktype
Definition solver.h:164
enum solve_step_e solve_step_t
Tags used in MPI communications.
pastix_int_t * reqidx
Definition solver.h:270
pastix_int_t lcolnum
Definition solver.h:167
pastix_int_t fcolnum
Definition solver.h:166
Solver block structure.
Definition solver.h:141
Solver column block structure.
Definition solver.h:161
Solver column block structure.
Definition solver.h:203
void solverComMatrixExit(SolverMatrix *solvmtx)
Free the communication matrix.
void solverComMatrixGather(SolverMatrix *solvmtx)
Gather the volume of communication and save it as a csv.
void solverComMatrixInit(SolverMatrix *solvmtx)
Initialize the communication matrix.