PaStiX Handbook  6.2.1
coeftab.c
Go to the documentation of this file.
1 /**
2  *
3  * @file coeftab.c
4  *
5  * PaStiX coefficient array initialization and free routines.
6  *
7  * @copyright 2015-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.2.0
11  * @author Xavier Lacoste
12  * @author Pierre Ramet
13  * @author Mathieu Faverge
14  * @author Esragul Korkmaz
15  * @author Gregoire Pichon
16  * @author Tony Delarue
17  * @date 2021-03-30
18  *
19  **/
20 #include "common.h"
21 #include "bcsc/bcsc.h"
22 #include "isched.h"
23 #include "blend/solver.h"
24 #include "sopalin/coeftab.h"
25 #include "pastix_zcores.h"
26 #include "pastix_ccores.h"
27 #include "pastix_dcores.h"
28 #include "pastix_scores.h"
29 #include "cpucblk_zpack.h"
30 #include "cpucblk_cpack.h"
31 #include "cpucblk_dpack.h"
32 #include "cpucblk_spack.h"
33 
34 #if defined(PASTIX_WITH_PARSEC)
36 #endif
37 
38 #if defined(PASTIX_WITH_STARPU)
40 #endif
41 
43 {
45 };
46 
47 /**
48  * @brief Internal structure specific to the parallel call of pcoeftabInit()
49  */
50 struct coeftabinit_s {
51  const SolverMatrix *datacode; /**< The sovler matrix */
52  const pastix_bcsc_t *bcsc; /**< The internal block CSC */
53  const char *dirname; /**< The pointer to the output directory */
54  pastix_coefside_t side; /**< The side of the matrix beeing initialized */
55 };
56 
57 /**
58  *******************************************************************************
59  *
60  * @brief Internal routine called by each static thread to Initialize the solver
61  * matrix structure.
62  *
63  * This routine is the routine called by each thread in the static scheduler and
64  * launched by the coeftabinit().
65  *
66  *******************************************************************************
67  *
68  * @param[inout] ctx
69  * The internal scheduler context
70  *
71  * @param[in] args
72  * The data structure specific to the function cpucblk_zinit()
73  *
74  *******************************************************************************/
75 void
76 pcoeftabInit( isched_thread_t *ctx,
77  void *args )
78 {
79  struct coeftabinit_s *ciargs = (struct coeftabinit_s*)args;
80  const SolverMatrix *datacode = ciargs->datacode;
81  const pastix_bcsc_t *bcsc = ciargs->bcsc;
82  const char *dirname = ciargs->dirname;
83  pastix_coefside_t side = ciargs->side;
84  pastix_int_t i, itercblk;
85  pastix_int_t task;
86  int rank = ctx->rank;
87 
88  void (*initfunc)( pastix_coefside_t, const SolverMatrix*,
89  const pastix_bcsc_t*, pastix_int_t, const char *) = NULL;
90 
91  switch( bcsc->flttype ) {
92  case PastixComplex32:
93  initfunc = cpucblk_cinit;
94  break;
95  case PastixComplex64:
96  initfunc = cpucblk_zinit;
97  break;
98  case PastixFloat:
99  initfunc = cpucblk_sinit;
100  break;
101  case PastixDouble:
102  case PastixPattern:
103  default:
104  initfunc = cpucblk_dinit;
105  }
106 
107  for (i=0; i < datacode->ttsknbr[rank]; i++)
108  {
109  task = datacode->ttsktab[rank][i];
110  itercblk = datacode->tasktab[task].cblknum;
111 
112  /* Init as full rank */
113  initfunc( side, datacode, bcsc, itercblk, dirname );
114  }
115 }
116 
117 /**
118  *******************************************************************************
119  *
120  * @brief Initialize the solver matrix structure
121  *
122  * This routine is a parallel routine to initialize the solver matrix structure
123  * through the internal static scheduler
124  *
125  *******************************************************************************
126  *
127  * @param[inout] pastix_data
128  * The pastix_data structure that hold the solver matrix to initialize.
129  *
130  * @param[in] side
131  * Describe the side(s) of the matrix that must be initialized.
132  * @arg PastixLCoef if lower part only
133  * @arg PastixUCoef if upper part only
134  * @arg PastixLUCoef if both sides.
135  *
136  *******************************************************************************/
137 void
138 coeftabInit( pastix_data_t *pastix_data,
139  pastix_coefside_t side )
140 {
141  struct coeftabinit_s args;
142 
143  args.datacode = pastix_data->solvmatr;
144  args.bcsc = pastix_data->bcsc;
145  args.side = side;
146 
147 #if defined(PASTIX_DEBUG_DUMP_COEFTAB)
148  /* Make sure dir_local is initialized before calling it with multiple threads */
149  pastix_gendirectories( pastix_data );
150 #endif
151  args.dirname = pastix_data->dir_local;
152 
153  /* Initialize ILU level block variables */
154  {
155  SolverCblk *cblk = pastix_data->solvmatr->cblktab;
156  SolverBlok *blok = pastix_data->solvmatr->bloktab;
157  pastix_int_t i;
158 
159  for (i=0; i<pastix_data->solvmatr->cblknbr; i++, cblk++) {
160  cblk->ctrbcnt = cblk[1].brownum - cblk[0].brownum;
161  }
162 
163  for (i=0; i<pastix_data->solvmatr->bloknbr; i++, blok++) {
164  blok->iluklvl = INT_MAX;
165  }
166  }
167  isched_parallel_call( pastix_data->isched, pcoeftabInit, &args );
168 }
169 
170 /**
171  *******************************************************************************
172  *
173  * @brief Free the solver matrix structure
174  *
175  * This routine free all data structure refereing to the solver matrix L, even
176  * the runtime descriptors if present.
177  *
178  *******************************************************************************
179  *
180  * @param[inout] solvmtx
181  * The solver matrix structure of the problem.
182  *
183  *******************************************************************************/
184 void
185 coeftabExit( SolverMatrix *solvmtx )
186 {
187  pastix_int_t i;
188 
189 #if defined(PASTIX_WITH_PARSEC)
190  {
191  if ( solvmtx->parsec_desc != NULL ) {
192  parsec_sparse_matrix_destroy( solvmtx->parsec_desc );
193  free( solvmtx->parsec_desc );
194  }
195  solvmtx->parsec_desc = NULL;
196  }
197 #endif
198 #if defined(PASTIX_WITH_STARPU)
199  {
200  if ( solvmtx->starpu_desc != NULL ) {
201  starpu_sparse_matrix_destroy( solvmtx->starpu_desc );
202  free( solvmtx->starpu_desc );
203  }
204  solvmtx->starpu_desc = NULL;
205  }
206 #endif
207 
208  /* Free arrays of solvmtx */
209  if( solvmtx->cblktab )
210  {
211  SolverCblk *cblk = solvmtx->cblktab;
212 
213  for ( i = 0; i < solvmtx->cblknbr; i++, cblk++ ) {
214  /* Free is precision independent, so we can use any version */
215  if( cblk->cblktype & (CBLK_FANIN|CBLK_RECV) ){
216  continue;
217  }
218  cpucblk_zfree( PastixLUCoef, cblk );
219  }
220  }
221 }
222 
223 /**
224  * @brief Internal structure specific to the parallel call of pcoeftabComp()
225  */
226 struct coeftabcomp_s {
227  SolverMatrix *solvmtx; /**< The sovler matrix */
228  pastix_coeftype_t flttype; /**< The arithmetic type */
229  pastix_atomic_lock_t lock; /**< Lock to protect the gain update */
230  pastix_int_t gain; /**< The memory gain on output */
231 };
232 
233 /**
234  *******************************************************************************
235  *
236  * @brief Internal routine called by each static thread to Initialize the solver
237  * matrix structure.
238  *
239  * This routine is the routine called by each thread in the static scheduler and
240  * launched by the coeftabCompress().
241  *
242  *******************************************************************************
243  *
244  * @param[inout] ctx
245  * The internal scheduler context
246  *
247  * @param[in] args
248  * The data structure specific to the function cpucblk_zcompress()
249  *
250  *******************************************************************************/
251 static void
252 pcoeftabComp( isched_thread_t *ctx,
253  void *args )
254 {
255  struct coeftabcomp_s *ccargs = (struct coeftabcomp_s*)args;
256  SolverMatrix *solvmtx = ccargs->solvmtx;
257  pastix_coeftype_t flttype = ccargs->flttype;
258  pastix_atomic_lock_t *lock = &(ccargs->lock);
259  pastix_int_t *fullgain = &(ccargs->gain);
260  SolverCblk *cblk;
261  pastix_coefside_t side = (solvmtx->factotype == PastixFactLU) ? PastixLUCoef : PastixLCoef;
262  pastix_int_t i, itercblk;
263  pastix_int_t task, gain = 0;
264  int rank = ctx->rank;
265 
266  pastix_int_t (*compfunc)( const SolverMatrix*, pastix_coefside_t, int, SolverCblk* ) = NULL;
267 
268  switch( flttype ) {
269  case PastixComplex32:
270  compfunc = cpucblk_ccompress;
271  break;
272  case PastixComplex64:
273  compfunc = cpucblk_zcompress;
274  break;
275  case PastixFloat:
276  compfunc = cpucblk_scompress;
277  break;
278  case PastixDouble:
279  case PastixPattern:
280  default:
281  compfunc = cpucblk_dcompress;
282  }
283 
284  for (i=0; i < solvmtx->ttsknbr[rank]; i++)
285  {
286  task = solvmtx->ttsktab[rank][i];
287  itercblk = solvmtx->tasktab[task].cblknum;
288  cblk = solvmtx->cblktab + itercblk;
289 
290  if ( cblk->cblktype & CBLK_COMPRESSED ) {
291  gain += compfunc( solvmtx, side, -1, cblk );
292  }
293  }
294 
295  pastix_atomic_lock( lock );
296  *fullgain += gain;
297  pastix_atomic_unlock( lock );
298 }
299 
300 /**
301  *******************************************************************************
302  *
303  * @brief Compress the factorized matrix structure if not already done.
304  *
305  * This routine compress all column blocks that are marked for compression, and
306  * return the amount of memory saved by the compression.
307  *
308  *******************************************************************************
309  *
310  * @param[inout] pastix_data
311  * The pastix_data structure that holds the problem
312  *
313  *******************************************************************************
314  *
315  * @return The memory gain resulting from the compression to low-rank format in
316  * number of elements.
317  *
318  *******************************************************************************/
319 pastix_int_t
320 coeftabCompress( pastix_data_t *pastix_data )
321 {
322  struct coeftabcomp_s args;
323  pastix_lr_t *lr;
324 
325  args.solvmtx = pastix_data->solvmatr;
326  args.flttype = pastix_data->bcsc->flttype;
327  args.lock = PASTIX_ATOMIC_UNLOCKED;
328  args.gain = 0;
329 
330  /* Set the lowrank properties */
331  lr = &(pastix_data->solvmatr->lowrank);
332  lr->compress_method = pastix_data->iparm[IPARM_COMPRESS_METHOD];
333  lr->compress_min_width = pastix_data->iparm[IPARM_COMPRESS_MIN_WIDTH];
334  lr->compress_min_height = pastix_data->iparm[IPARM_COMPRESS_MIN_HEIGHT];
335  lr->tolerance = pastix_data->dparm[DPARM_COMPRESS_TOLERANCE];
336 
337  isched_parallel_call( pastix_data->isched, pcoeftabComp, (void*)(&args) );
338 
339  return args.gain;
340 }
341 
342 #if defined(PASTIX_WITH_MPI)
343 /**
344  *******************************************************************************
345  *
346  * @brief Send all the cblk to their original nodes from the root node.
347  *
348  *******************************************************************************
349  *
350  * @param[inout] solvmtx
351  * The solver matrix to scatter.
352  *
353  * @param[in] comm
354  * MPI communicator
355  *
356  * @param[in] root
357  * Root node from which the solvmtx is scattered.
358  *
359  * @param[in] typesze
360  * Size of the data elements in the SolverMatrix.
361  *
362  ******************************************************************************/
363 void
364 coeftab_scatter( SolverMatrix *solvmtx,
365  PASTIX_Comm comm,
366  pastix_int_t root,
367  pastix_coeftype_t flttype )
368 {
369  static void (*free_fct_array[4])( pastix_coefside_t, SolverCblk * ) = {
371  };
372  void (*free_fct)( pastix_coefside_t, SolverCblk * ) = free_fct_array[ flttype - 2 ];
373  SolverCblk *cblk;
374  pastix_int_t i;
375  MPI_Status status;
376  size_t eltsize = pastix_size_of( flttype );
378 
379  if ( solvmtx->factotype == PastixFactLU ) {
380  side = PastixLUCoef;
381  eltsize *= 2;
382  }
383 
384  cblk = solvmtx->cblktab;
385  for(i=0; i<solvmtx->cblknbr; i++, cblk++)
386  {
387  size_t cblksize = eltsize * cblk->stride * cblk_colnbr( cblk );
388 
389  /* Data which does not belong to the root node must be sent */
390  if ( (solvmtx->clustnum == root) &&
391  (solvmtx->clustnum != cblk->ownerid) )
392  {
393  MPI_Send( cblk->lcoeftab, cblksize, MPI_CHAR,
394  cblk->ownerid, i, comm );
395  free_fct( side, cblk );
396  }
397 
398  /* Data which belongs locally must be received */
399  if ( (solvmtx->clustnum != root) &&
400  (solvmtx->clustnum == cblk->ownerid) )
401  {
402  MPI_Recv( cblk->lcoeftab, cblksize, MPI_CHAR,
403  root, i, comm, &status );
404  }
405  }
406 }
407 
408 /**
409  *******************************************************************************
410  *
411  * @brief Gather all the column blocks on the root node.
412  *
413  *******************************************************************************
414  *
415  * @param[inout] solvmtx
416  * The solver matrix to gather.
417  *
418  * @param[in] comm
419  * MPI communicator
420  *
421  * @param[in] root
422  * Root node on which the solvmtx is gathered.
423  *
424  * @param[in] typesze
425  * Size of the data elements in the SolverMatrix.
426  *
427  ******************************************************************************/
428 void
429 coeftab_gather( SolverMatrix *solvmtx,
430  PASTIX_Comm comm,
431  pastix_int_t root,
432  pastix_coeftype_t flttype )
433 {
434  static void (*alloc_fct_array[4])( pastix_coefside_t, SolverCblk * ) = {
436  };
437  void (*alloc_fct)( pastix_coefside_t, SolverCblk * ) = alloc_fct_array[ flttype - 2 ];
438  SolverCblk *cblk;
439  pastix_int_t i;
440  MPI_Status status;
441  size_t eltsize = pastix_size_of( flttype );
443  size_t bufsize = 0;
444  void *recvbuf = NULL;
445 
446  if ( solvmtx->factotype == PastixFactLU ) {
447  side = PastixLUCoef;
448  eltsize *= 2;
449  }
450 
451  cblk = solvmtx->cblktab;
452  for( i=0; i<solvmtx->cblknbr; i++, cblk++ )
453  {
454  size_t cblksize = eltsize * cblk->stride * cblk_colnbr( cblk );
455 
456  if ( (solvmtx->clustnum == root) &&
457  (solvmtx->clustnum != cblk->ownerid) )
458  {
459  if ( cblk->cblktype & CBLK_COMPRESSED ) {
460 
461  cblksize += (cblk[1].fblokptr - cblk[0].fblokptr) * sizeof(int);
462  if ( side != PastixLCoef ) {
463  cblksize *= 2;
464  }
465  MALLOC_INTERN( recvbuf, cblksize, char );
466  MPI_Recv( recvbuf, cblksize, MPI_CHAR,
467  cblk->ownerid, i, comm, &status );
468 
469  switch ( flttype ) {
470  case PastixComplex64:
471  cpucblk_zunpack_lr( side, cblk, recvbuf );
472  break;
473  case PastixComplex32:
474  cpucblk_cunpack_lr( side, cblk, recvbuf );
475  break;
476  case PastixDouble:
477  cpucblk_dunpack_lr( side, cblk, recvbuf );
478  break;
479  case PastixFloat:
480  cpucblk_sunpack_lr( side, cblk, recvbuf );
481  break;
482  default:
483  assert( 0 );
484  }
485  free( recvbuf );
486  }
487  else {
488  alloc_fct( side, cblk );
489  MPI_Recv( cblk->lcoeftab, cblksize, MPI_CHAR,
490  cblk->ownerid, i, comm, &status );
491  }
492  }
493 
494  if ( (solvmtx->clustnum != root) &&
495  (solvmtx->clustnum == cblk->ownerid) )
496  {
497  if ( cblk->cblktype & CBLK_COMPRESSED ) {
498  void *buffer = NULL;
499 
500  switch ( flttype ) {
501  case PastixComplex64:
502  bufsize = cpucblk_zcompute_size( side, cblk );
503  buffer = cpucblk_zpack_lr( side, cblk, bufsize );
504  break;
505 
506  case PastixComplex32:
507  bufsize = cpucblk_ccompute_size( side, cblk );
508  buffer = cpucblk_cpack_lr( side, cblk, bufsize );
509  break;
510 
511  case PastixDouble:
512  bufsize = cpucblk_dcompute_size( side, cblk );
513  buffer = cpucblk_dpack_lr( side, cblk, bufsize );
514  break;
515 
516  case PastixFloat:
517  bufsize = cpucblk_scompute_size( side, cblk );
518  buffer = cpucblk_spack_lr( side, cblk, bufsize );
519  break;
520 
521  default:
522  assert( 0 );
523  }
524 
525  MPI_Send( buffer, bufsize, MPI_CHAR,
526  root, i, comm );
527  free( buffer );
528  } else {
529  MPI_Send( cblk->lcoeftab, cblksize, MPI_CHAR,
530  root, i, comm );
531  }
532  }
533  }
534 }
535 
536 /**
537  *******************************************************************************
538  *
539  * @brief Nullify all the distant cblks.
540  *
541  *******************************************************************************
542  *
543  * @param[inout] solvmtx
544  * The solver matrix.
545  *
546  ******************************************************************************/
547 void
548 coeftab_nullify( SolverMatrix *solvmtx )
549 {
550  SolverCblk *cblk;
551  pastix_int_t i;
552  pastix_coefside_t side = ( solvmtx->factotype == PastixFactLU ) ? PastixLUCoef : PastixLCoef;
553 
554  cblk = solvmtx->cblktab;
555  for( i=0; i < solvmtx->cblknbr; i++, cblk++ )
556  {
557  if ( solvmtx->clustnum != cblk->ownerid )
558  {
559  cpucblk_zfree( side, cblk );
560  }
561  }
562 }
563 #endif /* PASTIX_WITH_MPI */
coeftab_cmemory
void coeftab_cmemory(SolverMatrix *solvmtx, pastix_fixdbl_t *dparm)
Compute the memory gain of the low-rank form over the full-rank form for the entire matrix.
Definition: coeftab_c.c:235
solver_cblk_s::ownerid
int ownerid
Definition: solver.h:146
solver.h
cpucblk_dpack.h
cblk_colnbr
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
Definition: solver.h:247
cpucblk_ccompute_size
size_t cpucblk_ccompute_size(pastix_coefside_t side, const SolverCblk *cblk)
Compute the size of the buffer to send.
Definition: cpucblk_cpack.c:131
pastix_lr_s
Structure to define the type of function to use for the low-rank kernels and their parameters.
Definition: pastix_lowrank.h:147
cpucblk_dcompress
pastix_int_t cpucblk_dcompress(const SolverMatrix *solvmtx, pastix_coefside_t side, int max_ilulvl, SolverCblk *cblk)
Compress a single column block from full-rank to low-rank format.
Definition: cpucblk_dcompress.c:110
solver_cblk_s::fblokptr
SolverBlok * fblokptr
Definition: solver.h:134
cpucblk_sfree
void cpucblk_sfree(pastix_coefside_t side, SolverCblk *cblk)
Free the cblk structure that store the coefficient.
Definition: cpucblk_sinit.c:317
DPARM_COMPRESS_TOLERANCE
@ DPARM_COMPRESS_TOLERANCE
Definition: api.h:175
cpucblk_zinit
void cpucblk_zinit(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk, const char *directory)
Fully initialize a single cblk.
Definition: coeftab_zinit.c:251
coeftab_fct_memory_t
void(* coeftab_fct_memory_t)(SolverMatrix *, pastix_fixdbl_t *)
Type of the memory gain functions.
Definition: coeftab.h:51
pastix_bcsc_s
Internal column block distributed CSC matrix.
Definition: bcsc.h:37
solver_cblk_s::stride
pastix_int_t stride
Definition: solver.h:135
coeftab_zmemory
void coeftab_zmemory(SolverMatrix *solvmtx, pastix_fixdbl_t *dparm)
Compute the memory gain of the low-rank form over the full-rank form for the entire matrix.
Definition: coeftab_z.c:235
cpucblk_sunpack_lr
void cpucblk_sunpack_lr(pastix_coefside_t side, SolverCblk *cblk, void *buffer)
Unpack low rank data and fill the column block concerned by the computation.
Definition: cpucblk_spack.c:299
solver_cblk_s
Solver column block structure.
Definition: solver.h:127
pastix_coefside_t
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
cpucblk_dfree
void cpucblk_dfree(pastix_coefside_t side, SolverCblk *cblk)
Free the cblk structure that store the coefficient.
Definition: cpucblk_dinit.c:317
cpucblk_scompute_size
size_t cpucblk_scompute_size(pastix_coefside_t side, const SolverCblk *cblk)
Compute the size of the buffer to send.
Definition: cpucblk_spack.c:131
cpucblk_spack_lr
void * cpucblk_spack_lr(pastix_coefside_t side, SolverCblk *cblk, size_t size)
Pack low-rank data for column block.
Definition: cpucblk_spack.c:213
pastix_gendirectories
void pastix_gendirectories(pastix_data_t *pastix_data)
Generate a unique temporary directory to store output files.
Definition: api.c:69
cpucblk_calloc
void cpucblk_calloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
Definition: cpucblk_cinit.c:264
pastix_parsec.h
solver_blok_s
Solver block structure.
Definition: solver.h:107
pastix_zcores.h
cpucblk_dinit
void cpucblk_dinit(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk, const char *directory)
Fully initialize a single cblk.
Definition: coeftab_dinit.c:251
coeftabCompress
pastix_int_t coeftabCompress(pastix_data_t *pastix_data)
Compress the factorized matrix structure if not already done.
Definition: coeftab.c:320
pcoeftabComp
static void pcoeftabComp(isched_thread_t *ctx, void *args)
Internal routine called by each static thread to Initialize the solver matrix structure.
Definition: coeftab.c:252
IPARM_COMPRESS_MIN_HEIGHT
@ IPARM_COMPRESS_MIN_HEIGHT
Definition: api.h:127
cpucblk_dpack_lr
void * cpucblk_dpack_lr(pastix_coefside_t side, SolverCblk *cblk, size_t size)
Pack low-rank data for column block.
Definition: cpucblk_dpack.c:213
cpucblk_zcompute_size
size_t cpucblk_zcompute_size(pastix_coefside_t side, const SolverCblk *cblk)
Compute the size of the buffer to send.
Definition: cpucblk_zpack.c:131
cpucblk_dalloc
void cpucblk_dalloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
Definition: cpucblk_dinit.c:264
IPARM_COMPRESS_METHOD
@ IPARM_COMPRESS_METHOD
Definition: api.h:129
parsec_sparse_matrix_destroy
void parsec_sparse_matrix_destroy(parsec_sparse_matrix_desc_t *desc)
Free the PaRSEC descriptor of the sparse matrix.
Definition: parsec_sparse_matrix.c:836
pastix_bcsc_s::flttype
int flttype
Definition: bcsc.h:41
solver_blok_s::iluklvl
int iluklvl
Definition: solver.h:118
bcsc.h
solver_cblk_s::lcoeftab
void * lcoeftab
Definition: solver.h:142
pastix_dcores.h
pastix_ccores.h
IPARM_COMPRESS_MIN_WIDTH
@ IPARM_COMPRESS_MIN_WIDTH
Definition: api.h:126
pastix_scores.h
cpucblk_dcompute_size
size_t cpucblk_dcompute_size(pastix_coefside_t side, const SolverCblk *cblk)
Compute the size of the buffer to send.
Definition: cpucblk_dpack.c:131
cpucblk_scompress
pastix_int_t cpucblk_scompress(const SolverMatrix *solvmtx, pastix_coefside_t side, int max_ilulvl, SolverCblk *cblk)
Compress a single column block from full-rank to low-rank format.
Definition: cpucblk_scompress.c:110
solver_cblk_s::brownum
pastix_int_t brownum
Definition: solver.h:137
PastixLCoef
@ PastixLCoef
Definition: api.h:456
coeftab_dmemory
void coeftab_dmemory(SolverMatrix *solvmtx, pastix_fixdbl_t *dparm)
Compute the memory gain of the low-rank form over the full-rank form for the entire matrix.
Definition: coeftab_d.c:235
cpucblk_spack.h
cpucblk_cpack.h
cpucblk_ccompress
pastix_int_t cpucblk_ccompress(const SolverMatrix *solvmtx, pastix_coefside_t side, int max_ilulvl, SolverCblk *cblk)
Compress a single column block from full-rank to low-rank format.
Definition: cpucblk_ccompress.c:110
solver_cblk_s::ctrbcnt
volatile int32_t ctrbcnt
Definition: solver.h:129
cpucblk_dunpack_lr
void cpucblk_dunpack_lr(pastix_coefside_t side, SolverCblk *cblk, void *buffer)
Unpack low rank data and fill the column block concerned by the computation.
Definition: cpucblk_dpack.c:299
cpucblk_salloc
void cpucblk_salloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
Definition: cpucblk_sinit.c:264
cpucblk_sinit
void cpucblk_sinit(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk, const char *directory)
Fully initialize a single cblk.
Definition: coeftab_sinit.c:251
cpucblk_zalloc
void cpucblk_zalloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
Definition: cpucblk_zinit.c:264
cpucblk_cinit
void cpucblk_cinit(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk, const char *directory)
Fully initialize a single cblk.
Definition: coeftab_cinit.c:251
coeftabExit
void coeftabExit(SolverMatrix *solvmtx)
Free the solver matrix structure.
Definition: coeftab.c:185
coeftab_smemory
void coeftab_smemory(SolverMatrix *solvmtx, pastix_fixdbl_t *dparm)
Compute the memory gain of the low-rank form over the full-rank form for the entire matrix.
Definition: coeftab_s.c:235
cpucblk_zpack_lr
void * cpucblk_zpack_lr(pastix_coefside_t side, SolverCblk *cblk, size_t size)
Pack low-rank data for column block.
Definition: cpucblk_zpack.c:213
pcoeftabInit
void pcoeftabInit(isched_thread_t *ctx, void *args)
Internal routine called by each static thread to Initialize the solver matrix structure.
Definition: coeftab.c:76
cpucblk_cpack_lr
void * cpucblk_cpack_lr(pastix_coefside_t side, SolverCblk *cblk, size_t size)
Pack low-rank data for column block.
Definition: cpucblk_cpack.c:213
coeftabMemory
coeftab_fct_memory_t coeftabMemory[4]
List of functions to compute the memory gain in low-rank per precision.
Definition: coeftab.c:42
solver_cblk_s::cblktype
int8_t cblktype
Definition: solver.h:130
PastixLUCoef
@ PastixLUCoef
Definition: api.h:458
coeftab.h
cpucblk_zpack.h
pastix_starpu.h
PastixFactLU
@ PastixFactLU
Definition: api.h:304
cpucblk_cunpack_lr
void cpucblk_cunpack_lr(pastix_coefside_t side, SolverCblk *cblk, void *buffer)
Unpack low rank data and fill the column block concerned by the computation.
Definition: cpucblk_cpack.c:299
cpucblk_zcompress
pastix_int_t cpucblk_zcompress(const SolverMatrix *solvmtx, pastix_coefside_t side, int max_ilulvl, SolverCblk *cblk)
Compress a single column block from full-rank to low-rank format.
Definition: cpucblk_zcompress.c:110
coeftabInit
void coeftabInit(pastix_data_t *pastix_data, pastix_coefside_t side)
Initialize the solver matrix structure.
Definition: coeftab.c:138
pastix_coeftype_t
#define pastix_coeftype_t
Arithmetic types.
Definition: api.h:283
cpucblk_cfree
void cpucblk_cfree(pastix_coefside_t side, SolverCblk *cblk)
Free the cblk structure that store the coefficient.
Definition: cpucblk_cinit.c:317
cpucblk_zfree
void cpucblk_zfree(pastix_coefside_t side, SolverCblk *cblk)
Free the cblk structure that store the coefficient.
Definition: cpucblk_zinit.c:317
cpucblk_zunpack_lr
void cpucblk_zunpack_lr(pastix_coefside_t side, SolverCblk *cblk, void *buffer)
Unpack low rank data and fill the column block concerned by the computation.
Definition: cpucblk_zpack.c:299
starpu_sparse_matrix_destroy
void starpu_sparse_matrix_destroy(starpu_sparse_matrix_desc_t *desc)
Free the StarPU descriptor of the sparse matrix.
Definition: starpu_sparse_matrix.c:414