PaStiX Handbook  6.2.1
pastix_subtask_order.c
Go to the documentation of this file.
1 /**
2  *
3  * @file pastix_subtask_order.c
4  *
5  * PaStiX ordering task.
6  * Contains wrappers to build a good ordering for sparse direct solvers.
7  * Affected by the compilation time options:
8  * - PASTIX_ORDERING_SCOTCH: Enable Scotch graph partitioning library.
9  * - PASTIX_ORDERING_PTSCOTCH: Enable PT-Scotch graph partitioning library.
10  * - PASTIX_ORDERING_METIS: Enable Metis graph partitioning library.
11  *
12  * @copyright 2015-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
13  * Univ. Bordeaux. All rights reserved.
14  *
15  * @version 6.2.1
16  * @author Xavier Lacoste
17  * @author Pierre Ramet
18  * @author Mathieu Faverge
19  * @author Gregoire Pichon
20  * @author Tony Delarue
21  * @date 2021-06-28
22  *
23  **/
24 #include "common.h"
25 #include <spm.h>
26 #include "graph/graph.h"
27 #include "blend/elimintree.h"
28 #include "order_internal.h"
29 
30 /**
31  *******************************************************************************
32  *
33  * @ingroup pastix_analyze
34  *
35  * @brief Computes the ordering of the given graph in parameters.
36  *
37  * The graph given by the user is used to generate a graph that can be used by
38  * ordering tools and symbolic factorization. This graph is stored in the
39  * pastix_data->graph to be pass over to the symbolic factorization. If it exists
40  * before to call this routine, then the current structure is cleaned and a new
41  * one is created. From this structure, an ordering is computed by the ordering
42  * tool chosen by IPARM_ORDERING and stored in pastix_data->ordemesh. At the end
43  * the full ordering stucture: pemutation, inverse permutation, partition, and
44  * partion tree is generated such that it can be used by any symbolic
45  * factorization algorithm.
46  * The user can get back the permutation generated by providing allocated ordering
47  * structure where the results is stored after computation.
48  *
49  * This routine is affected by the following parameters:
50  * IPARM_VERBOSE, IPARM_ORDERING, IPARM_IO_STRATEGY
51  *
52  *******************************************************************************
53  *
54  * @param[inout] pastix_data
55  * The pastix_data structure that describes the solver instance.
56  * On exit, the field ordemesh is initialize with the result of the
57  * ordering.
58  * - IPARM_ORDERING will determine which ordering tool is used.
59  * - IPARM_IO_STRATEGY:
60  * - If set to PastixIOSave, the results will be written on files on
61  * exit.
62  * - If set to PastixIOLoad and IPARM_ORDERING is set to personal,
63  * then the ordering is loaded from files and no ordering is
64  * called.
65  * - If the function pastix_setSchurUnknownList() function has been
66  * previously called to set the list of vertices to isolate in the
67  * schur complement, those vertices are isolated at the end of the
68  * matrix in a dedicated supernode..
69  * - If the function pastix_setZerosUnknownList() function has been
70  * previously called to set the list of diagonal elements that may
71  * cause problem during the factorization, those vertices are isolated
72  * at the end of the matrix in a dedicated supernode..
73  *
74  * @param[in] spm
75  * The sparse matrix given by the user on which the ordering will be
76  * computed.
77  *
78  *
79  * @param[inout] myorder
80  * On entry, the permutation provide by the user if IPARM_ORDERING
81  * parameter set to PastixOrderPersonal. Not read otherwise.
82  * On exit, if the structure attributs != NULL and IPARM_ORDERING parameter
83  * is not set to PastixOrderPersonal, contains the permutation generated.
84  * Otherwise, it is not referenced.
85  *
86  *******************************************************************************
87  *
88  * @retval PASTIX_SUCCESS on successful exit,
89  * @retval PASTIX_ERR_BADPARAMETER if one parameter is incorrect,
90  * @retval PASTIX_ERR_OUTOFMEMORY if one allocation failed,
91  * @retval PASTIX_ERR_INTEGER_TYPE if Scotch integer type is not the
92  * same size as PaStiX ones,
93  * @retval PASTIX_ERR_INTERNAL if an error occurs internally to Scotch.
94  *
95  *******************************************************************************/
96 int
97 pastix_subtask_order( pastix_data_t *pastix_data,
98  const spmatrix_t *spm,
99  pastix_order_t *myorder )
100 {
101  pastix_int_t schur_gN;
102  pastix_int_t *schur_perm = NULL;
103  pastix_int_t *zeros_perm = NULL;
104  pastix_int_t *iparm;
105  pastix_graph_t *subgraph;
106  pastix_graph_t schurgraph;
107  pastix_graph_t zerosgraph;
108  pastix_graph_t *graph;
109  pastix_order_t *ordemesh;
110  Clock timer;
111  int procnum;
112  int retval = PASTIX_SUCCESS;
113  int retval_rcv;
114  int do_schur = 1;
115  int do_zeros = 1;
116  int subgraph_is_a_copy = 0;
117  int spmbase;
118 
119  /*
120  * Check parameters
121  */
122  if ( pastix_data == NULL ) {
123  pastix_print_error( "pastix_subtask_order: wrong pastix_data parameter" );
125  }
126  if ( spm == NULL ) {
127  pastix_print_error( "pastix_subtask_order: wrong spm parameter" );
129  }
130  if ( !(pastix_data->steps & STEP_INIT) ) {
131  pastix_print_error( "pastix_subtask_order: pastixInit() has to be called before calling this function" );
133  }
134 
135  iparm = pastix_data->iparm;
136  /* Backup flttype from the spm into iparm[IPARM_FLOAT] for later use */
137  iparm[IPARM_FLOAT] = spm->flttype;
138 
139  if ( pastix_data->schur_n > 0 )
140  {
141  /*
142  * If ordering is set to PastixOrderPersonal, we consider that the schur
143  * complement is already isolated at the end of the permutation array.
144  */
145  if ( iparm[IPARM_ORDERING] == PastixOrderPersonal ) {
146  do_schur = 0;
147  }
148  }
149  else {
150  do_schur = 0;
151  }
152 
153  if ( pastix_data->zeros_n > 0 )
154  {
155  /*
156  * If ordering is set to PastixOrderPersonal, we consider that the zeros
157  * on diagonal are already isolated at the end of the permutation array.
158  */
159  if ( iparm[IPARM_ORDERING] == PastixOrderPersonal ) {
160  do_zeros = 0;
161  }
162  }
163  else {
164  do_zeros = 0;
165  }
166 
167  /*
168  * Clean ordering if it exists
169  */
170  if ( pastix_data->ordemesh != NULL ) {
171  pastixOrderExit(pastix_data->ordemesh);
172  }
173  else {
174  MALLOC_INTERN( pastix_data->ordemesh, 1, pastix_order_t );
175  }
176 
177  ordemesh = pastix_data->ordemesh;
178  procnum = pastix_data->procnum;
179  pastixOrderAlloc( ordemesh, 0, 0 );
180 
181  if ( iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
182  pastix_print( procnum, 0, "%s", OUT_STEP_ORDER );
183  }
184 
185  /*
186  * Prepare a copy of user's SPM
187  * Copy the given spm in pastix_data structure and performs basic required
188  * operations as symmetrizing the graph and removing the diagonal
189  * coefficients
190  */
191  graphPrepare( pastix_data, spm, &(pastix_data->graph) );
192  graph = pastix_data->graph;
193  spmbase = spmFindBase( spm );
194 
195  graphBase( graph, 0 );
196  subgraph = graph;
197 
198  /*
199  * Isolate Shur elements
200  */
201  if ( do_schur )
202  {
203  assert( pastix_data->schur_list != NULL );
204 
205  if ( spmbase != 0 ) {
206  /* We need to rebase the schur unknown list */
207  pastix_int_t i;
208 
209  for( i=0; i<pastix_data->schur_n; i++ ) {
210  pastix_data->schur_list[i] -= spmbase;
211  }
212  }
213 
214  graphIsolate( graph, &schurgraph,
215  pastix_data->schur_n,
216  pastix_data->schur_list,
217  &schur_perm,
218  NULL );
219 
220  subgraph_is_a_copy = 1;
221  subgraph = &schurgraph;
222  }
223 
224  /* Backup only the needed part */
225  schur_gN = subgraph->gN;
226 
227  /*
228  * Isolate diagonal elements close to 0.
229  */
230  if ( do_zeros )
231  {
232  assert( pastix_data->zeros_list != NULL );
233 
234  if ( spmbase != 0 ) {
235  /* We need to rebase the zeros unknown list */
236  pastix_int_t i;
237 
238  for( i=0; i<pastix_data->zeros_n; i++ ) {
239  pastix_data->zeros_list[i] -= spmbase;
240  }
241  }
242 
243  graphIsolate( subgraph, &zerosgraph,
244  pastix_data->zeros_n,
245  pastix_data->zeros_list,
246  &zeros_perm,
247  NULL );
248 
249  if ( subgraph_is_a_copy ) {
250  /* We do not longer require arrays from the schur subgraph */
251  graphExit( subgraph );
252  }
253  subgraph_is_a_copy = 1;
254  subgraph = &zerosgraph;
255  }
256 
257  if ( iparm[IPARM_VERBOSE] > PastixVerboseYes ) {
258  pastix_print( procnum, 0, "%s", OUT_ORDER_INIT );
259  }
260 
261  clockStart(timer);
262 
263  /* Select the ordering method chosen by the user */
264  switch ( iparm[IPARM_ORDERING] ) {
265  /*
266  * Scotch Ordering
267  */
268  case PastixOrderScotch:
269  if ( iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
270  pastix_print( procnum, 0, OUT_ORDER_METHOD, "Scotch" );
271  }
272 #if defined(PASTIX_ORDERING_SCOTCH)
273  graphGatherInPlace( subgraph );
274  retval = orderComputeScotch( pastix_data, subgraph );
275 #else
276  pastix_print_error( "pastix_subtask_order: Ordering with Scotch requires to enable -DPASTIX_ORDERING_SCOTCH option" );
277  retval = PASTIX_ERR_BADPARAMETER;
278 #endif
279  break;
280 
281  /*
282  * PT-Scotch Ordering
283  */
284  case PastixOrderPtScotch:
285  if (iparm[IPARM_VERBOSE] > PastixVerboseNot) {
286  pastix_print(procnum, 0, OUT_ORDER_METHOD, "PT-Scotch" );
287  }
288 #if defined(PASTIX_ORDERING_PTSCOTCH)
289  graphScatterInPlace( subgraph, pastix_data->pastix_comm );
290  retval = orderComputePTScotch( pastix_data, subgraph );
291 #else
292  pastix_print_error( "pastix_subtask_order: Ordering with PT-Scotch requires to enable -DPASTIX_ORDERING_PTSCOTCH option" );
293  retval = PASTIX_ERR_BADPARAMETER;
294 #endif
295  break;
296 
297  /*
298  * METIS ordering
299  */
300  case PastixOrderMetis:
301  if (iparm[IPARM_VERBOSE] > PastixVerboseNot) {
302  pastix_print(procnum, 0, OUT_ORDER_METHOD, "Metis" );
303  }
304 #if defined(PASTIX_ORDERING_METIS)
305  graphGatherInPlace( subgraph );
306  retval = orderComputeMetis( pastix_data, subgraph );
307  assert( ordemesh->rangtab == NULL );
308 #else
309  pastix_print_error( "pastix_subtask_order: Ordering with Metis requires -DPASTIX_ORDERING_METIS flag at compile time" );
310  retval = PASTIX_ERR_BADPARAMETER;
311 #endif
312  break;
313 
314  /*
315  * Personal Ordering
316  */
317  case PastixOrderPersonal:
318  if ( iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
319  pastix_print( procnum, 0, OUT_ORDER_METHOD, "Personal" );
320  }
321  retval = orderComputePersonal( pastix_data, subgraph, myorder );
322  break;
323 
324  default:
325  pastix_print_error( "pastix_subtask_order: Ordering not available (iparm[IPARM_ORDERING]=%d)\n",
326  (int)iparm[IPARM_ORDERING] );
327  retval = PASTIX_ERR_BADPARAMETER;
328  break;
329  }
330 
331  /*
332  * Reduce the error code
333  */
334  MPI_Allreduce( &retval, &retval_rcv, 1, MPI_INT, MPI_MAX,
335  pastix_data->pastix_comm );
336  if (retval_rcv != PASTIX_SUCCESS) {
337 
338  /* Cleanup memory */
339  if ( do_zeros ) {
340  graphExit( &zerosgraph );
341  memFree_null( zeros_perm );
342  }
343  if ( do_schur ) {
344  graphExit( &schurgraph );
345  memFree_null( schur_perm );
346  }
347 
348  return retval_rcv;
349  }
350 
351  /* Rebase the ordering to 0 (for orderFindSupernodes) */
352  pastixOrderBase( ordemesh, 0 );
353 
354  /*
355  * If the rangtab or the treetab are not initialized, let's find it ourself
356  */
357  if (( ordemesh->rangtab == NULL ) ||
358  ( ordemesh->treetab == NULL ) )
359  {
360  /* The ordering step may be distributed, but supernodes routines are not */
361  graphGatherInPlace( subgraph );
362 
363  /* TODO: if rangtab is provided, treetab could be easily calculated */
364  orderFindSupernodes( subgraph, ordemesh );
365 
366 #if !defined(NDEBUG) && defined(PASTIX_DEBUG_ORDERING)
367  assert( pastixOrderCheck( ordemesh ) == PASTIX_SUCCESS );
368 #endif
369 
371  iparm[IPARM_INCOMPLETE],
372  iparm[IPARM_LEVEL_OF_FILL],
375  subgraph,
376  ordemesh,
377  pastix_data->pastix_comm );
378  }
379 
380 #if !defined(NDEBUG) && defined(PASTIX_DEBUG_ORDERING)
381  assert( pastixOrderCheck( ordemesh ) == PASTIX_SUCCESS );
382 #endif
383 
384  /*
385  * The subgraph is no longer needed, let's free it if it was a copy
386  */
387  if ( subgraph_is_a_copy ) {
388  graphExit( subgraph );
389  }
390 
391  /*
392  * Reorder supernodes by level to get a better order for runtime systems,
393  * and for the reordering algorithm
394  */
395  orderApplyLevelOrder( ordemesh,
396  iparm[IPARM_TASKS2D_LEVEL],
397  iparm[IPARM_TASKS2D_WIDTH] );
398 
399 #if !defined(NDEBUG) && defined(PASTIX_DEBUG_ORDERING)
400  assert( pastixOrderCheck( ordemesh ) == PASTIX_SUCCESS );
401 #endif
402 
403  /*
404  * Add the isolated elements to the ordering structure
405  */
406  if ( do_zeros )
407  {
408  orderAddIsolate( ordemesh, schur_gN, zeros_perm );
409 
410  if ( zeros_perm != NULL ) { memFree_null( zeros_perm ); }
411  }
412 
413  /*
414  * Add the isolated elements to the ordering structure
415  */
416  if ( do_schur )
417  {
418  orderAddIsolate( ordemesh, graph->gN, schur_perm );
419 
420  if ( schur_perm != NULL ) { memFree_null( schur_perm ); }
421  }
422 
423  /*
424  * Backup of the original supernodes
425  */
426  ordemesh->sndenbr = ordemesh->cblknbr;
427  ordemesh->sndetab = malloc( (ordemesh->sndenbr+1) * sizeof(pastix_int_t) );
428  memcpy( ordemesh->sndetab, ordemesh->rangtab, (ordemesh->sndenbr+1) * sizeof(pastix_int_t) );
429 
430  /*
431  * Block Low-Rank clustering
432  */
433  if ( ( iparm[IPARM_COMPRESS_WHEN] != PastixCompressNever ) &&
435  {
436 #if !defined(PASTIX_ORDERING_SCOTCH)
437  pastix_print_warning( "Clustering is not available yet when Scotch is disabled" );
438 #else
439  EliminTree *etree;
440  pastix_int_t min_cblk = ordemesh->rangtab[ordemesh->cblknbr-1];
441  pastix_int_t ret;
442 
443  graphBase( graph, 0 );
444 
445  etree = orderBuildEtree( ordemesh );
446 
447  ret = orderSupernodes( graph, ordemesh,
448  etree, iparm, do_schur );
449 
450  eTreeExit( etree );
451 
452  (void)ret;
453  (void)min_cblk;
454 #endif /* !defined(PASTIX_ORDERING_SCOTCH) */
455  }
456 
457 #if defined(PASTIX_ORDER_DRAW_LASTSEP)
458  /*
459  * Draw last separator graph and xyz
460  */
461  orderDraw( pastix_data, NULL, ordemesh->sndenbr-1,
462  orderDrawGraph | orderDrawCoordinates );
463 #endif
464 
465  /* Reduce the error code */
466  MPI_Allreduce( &retval, &retval_rcv, 1, MPI_INT, MPI_MAX,
467  pastix_data->pastix_comm );
468  if ( retval_rcv != PASTIX_SUCCESS ) {
469  return retval_rcv;
470  }
471 
472  clockStop(timer);
473  pastix_data->dparm[DPARM_ORDER_TIME] = clockVal(timer);
474  if ( iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
475  pastix_print(procnum, 0, OUT_ORDER_TIME, clockVal(timer));
476  }
477 
478  /*
479  * Save i/o strategy
480  */
481  if ( iparm[IPARM_IO_STRATEGY] & PastixIOSave ) {
482  if ( procnum == 0 ) {
483  retval = pastixOrderSave( pastix_data, ordemesh );
484  }
485 
486  MPI_Allreduce( &retval, &retval_rcv, 1, MPI_INT, MPI_MAX,
487  pastix_data->pastix_comm );
488  if ( retval_rcv != PASTIX_SUCCESS ) {
489  return retval_rcv;
490  }
491  }
492 
493  /*
494  * Return the ordering to user if structure is not NULL
495  * Remark: No need to copy back for personal
496  */
497  if ( ( iparm[IPARM_ORDERING] != PastixOrderPersonal ) &&
498  ( myorder != NULL ) )
499  {
500  if ( graph->loc2glob == NULL )
501  {
502  retval = pastixOrderCopy( myorder, ordemesh );
503  MPI_Allreduce( &retval, &retval_rcv, 1, MPI_INT, MPI_MAX,
504  pastix_data->pastix_comm );
505  if ( retval_rcv != PASTIX_SUCCESS ) {
506  return retval_rcv;
507  }
508  }
509  else
510  {
511  pastix_int_t *loc2glob;
512  pastix_int_t baseval = graph->baseval;
513  pastix_int_t i, n;
514 
515  n = graph->n;
516  if ( myorder->permtab != NULL ) {
517  pastix_int_t *permtab = ordemesh->permtab - baseval;
518 
519  loc2glob = graph->loc2glob;
520  for( i = 0; i < n; i++, loc2glob++ ) {
521  myorder->permtab[i] = permtab[*loc2glob];
522  }
523  }
524  if (myorder->peritab != NULL) {
525  pastix_int_t *peritab = ordemesh->peritab - baseval;
526  pastix_int_t i;
527 
528  loc2glob = graph->loc2glob;
529  for( i = 0; i < n; i++, loc2glob++ ) {
530  myorder->peritab[i] = peritab[*loc2glob];
531  }
532  }
533  /* TODO: Copy also rangtab and treetab ? */
534  }
535  }
536 
537  /*
538  * For now, what the rank 0 has will overwrite what the others have, even if
539  * they all computed something
540  */
541  pastixOrderBcast( pastix_data->ordemesh, 0, pastix_data->pastix_comm );
542 
543 #if !defined(NDEBUG)
544  assert( pastixOrderCheck( pastix_data->ordemesh ) == PASTIX_SUCCESS );
545 #endif
546 
547  /* Backup the spm pointer for further information */
548  pastix_data->csc = spm;
549 
550  /* Invalidate following steps, and add order step to the ones performed */
551  pastix_data->steps &= ~( STEP_SYMBFACT |
552  STEP_ANALYSE |
553  STEP_CSC2BCSC |
554  STEP_BCSC2CTAB |
555  STEP_NUMFACT |
556  STEP_SOLVE |
557  STEP_REFINE );
558  pastix_data->steps |= STEP_ORDERING;
559 
560  return PASTIX_SUCCESS;
561 }
graphBase
void graphBase(pastix_graph_t *graph, pastix_int_t baseval)
Rebase the graph to the given value.
Definition: graph.c:100
orderDraw
void orderDraw(pastix_data_t *pastix_data, const char *extname, pastix_int_t sndeidx, int dump)
Dump the last separator into an ivview file.
Definition: order_draw.c:50
orderApplyLevelOrder
int orderApplyLevelOrder(pastix_order_t *order, pastix_int_t level_tasks2d, pastix_int_t width_tasks2d)
This routine reorder the elimination tree nodes per level.
Definition: order_apply_level_order.c:95
orderComputeScotch
int orderComputeScotch(pastix_data_t *pastix_data, pastix_graph_t *graph)
Compute the ordering of the graph given as parameter with Scotch library.
Definition: order_compute_scotch.c:341
pastix_order_s::cblknbr
pastix_int_t cblknbr
Definition: order.h:48
pastixOrderSave
int pastixOrderSave(pastix_data_t *pastix_data, const pastix_order_t *ordeptr)
Save an ordering to a file.
Definition: order_io.c:293
etree_s
Elimination tree.
Definition: elimintree.h:39
orderComputePTScotch
int orderComputePTScotch(pastix_data_t *pastix_data, pastix_graph_t *graph)
Compute the ordering of the graph given as parameter with PT-Scotch library.
Definition: order_compute_ptscotch.c:304
IPARM_ORDERING
@ IPARM_ORDERING
Definition: api.h:50
pastix_order_s::peritab
pastix_int_t * peritab
Definition: order.h:50
pastix_order_s::permtab
pastix_int_t * permtab
Definition: order.h:49
pastixOrderExit
void pastixOrderExit(pastix_order_t *ordeptr)
Free the arrays initialized in the order structure.
Definition: order.c:273
IPARM_LEVEL_OF_FILL
@ IPARM_LEVEL_OF_FILL
Definition: api.h:96
pastix_order_s::treetab
pastix_int_t * treetab
Definition: order.h:52
pastix_order_s
Order structure.
Definition: order.h:45
orderAmalgamate
int orderAmalgamate(int verbose, int ilu, int levelk, int rat_cblk, int rat_blas, pastix_graph_t *csc, pastix_order_t *orderptr, PASTIX_Comm pastix_comm)
Update the order structure with an amalgamation algorithm.
Definition: order_amalgamate.c:82
PastixCompressNever
@ PastixCompressNever
Definition: api.h:364
IPARM_TASKS2D_WIDTH
@ IPARM_TASKS2D_WIDTH
Definition: api.h:91
pastixOrderBcast
void pastixOrderBcast(pastix_order_t *ordemesh, int root, PASTIX_Comm pastix_comm)
This routine broadcast the ordemesh structure from node root to all the other nodes.
Definition: order.c:605
PastixIOSave
@ PastixIOSave
Definition: api.h:220
PastixOrderMetis
@ PastixOrderMetis
Definition: api.h:325
graphPrepare
int graphPrepare(pastix_data_t *pastix_data, const spmatrix_t *spm, pastix_graph_t **graph)
This routine initializes the graph.
Definition: graph_prepare.c:115
pastixOrderCopy
int pastixOrderCopy(pastix_order_t *ordedst, const pastix_order_t *ordesrc)
This routine copy a given ordering in a new one.
Definition: order.c:496
IPARM_AMALGAMATION_LVLCBLK
@ IPARM_AMALGAMATION_LVLCBLK
Definition: api.h:75
pastixOrderCheck
int pastixOrderCheck(const pastix_order_t *ordeptr)
This routine checks the correctness of the ordering structure.
Definition: order_check.c:39
pastixOrderBase
void pastixOrderBase(pastix_order_t *ordeptr, pastix_int_t baseval)
This routine sets the base of the given ordering structure to the given base value.
Definition: order.c:319
orderComputeMetis
int orderComputeMetis(pastix_data_t *pastix_data, pastix_graph_t *graph)
Compute the ordering of the graph given as parameter with Metis library.
Definition: order_compute_metis.c:60
IPARM_SPLITTING_STRATEGY
@ IPARM_SPLITTING_STRATEGY
Definition: api.h:80
PastixVerboseNot
@ PastixVerboseNot
Definition: api.h:209
PASTIX_SUCCESS
@ PASTIX_SUCCESS
Definition: api.h:346
graphGatherInPlace
int graphGatherInPlace(pastix_graph_t *graph)
This routine gather a distributed graph on each note in place.
Definition: graph.c:240
IPARM_COMPRESS_WHEN
@ IPARM_COMPRESS_WHEN
Definition: api.h:128
elimintree.h
PastixOrderPersonal
@ PastixOrderPersonal
Definition: api.h:326
pastixOrderAlloc
int pastixOrderAlloc(pastix_order_t *ordeptr, pastix_int_t vertnbr, pastix_int_t cblknbr)
Allocate the order structure.
Definition: order.c:55
IPARM_FLOAT
@ IPARM_FLOAT
Definition: api.h:142
eTreeExit
void eTreeExit(EliminTree *)
Free the elimination tree structure.
Definition: elimintree.c:85
orderAddIsolate
int orderAddIsolate(pastix_order_t *ordemesh, pastix_int_t new_n, const pastix_int_t *perm)
This routine combines two permutation arrays when a subset of vertices has been isolated from the ori...
Definition: order_add_isolate.c:56
orderComputePersonal
int orderComputePersonal(pastix_data_t *pastix_data, pastix_graph_t *graph, pastix_order_t *myorder)
Computes the personal ordering of the PaStiX instance.
Definition: order_compute_personal.c:56
graph.h
IPARM_AMALGAMATION_LVLBLAS
@ IPARM_AMALGAMATION_LVLBLAS
Definition: api.h:74
orderBuildEtree
EliminTree * orderBuildEtree(const pastix_order_t *order)
This routine build the elimination tree associated to an ordering.
Definition: order_apply_level_order.c:41
orderSupernodes
pastix_int_t orderSupernodes(const pastix_graph_t *graph, pastix_order_t *order, EliminTree *etree, pastix_int_t *iparm, int do_schur)
Order the supernodes with one of the clustering strategies.
Definition: order_supernodes.c:59
DPARM_ORDER_TIME
@ DPARM_ORDER_TIME
Definition: api.h:157
graphIsolate
int graphIsolate(const pastix_graph_t *ingraph, pastix_graph_t *outgraph, pastix_int_t isolate_n, pastix_int_t *isolate_list, pastix_int_t **new_perm, pastix_int_t **new_invp)
Isolate a subset of vertices from a given graph.
Definition: graph_isolate.c:287
IPARM_VERBOSE
@ IPARM_VERBOSE
Definition: api.h:36
pastix_order_s::rangtab
pastix_int_t * rangtab
Definition: order.h:51
PastixSplitNot
@ PastixSplitNot
Definition: api.h:395
PastixOrderScotch
@ PastixOrderScotch
Definition: api.h:324
IPARM_INCOMPLETE
@ IPARM_INCOMPLETE
Definition: api.h:95
IPARM_TASKS2D_LEVEL
@ IPARM_TASKS2D_LEVEL
Definition: api.h:90
graphScatterInPlace
int graphScatterInPlace(pastix_graph_t *graph, PASTIX_Comm comm)
This routine scatter a graph from node root to the other nodes.
Definition: graph.c:192
pastix_order_s::sndenbr
pastix_int_t sndenbr
Definition: order.h:54
PastixOrderPtScotch
@ PastixOrderPtScotch
Definition: api.h:327
pastix_subtask_order
int pastix_subtask_order(pastix_data_t *pastix_data, const spmatrix_t *spm, pastix_order_t *myorder)
Computes the ordering of the given graph in parameters.
Definition: pastix_subtask_order.c:97
graphExit
void graphExit(pastix_graph_t *graph)
Free the content of the graph structure.
Definition: graph.c:71
pastix_order_s::sndetab
pastix_int_t * sndetab
Definition: order.h:55
orderFindSupernodes
void orderFindSupernodes(const pastix_graph_t *graph, pastix_order_t *const ordeptr)
Computes the set of supernodes for a given permutation.
Definition: order_find_supernodes.c:360
IPARM_IO_STRATEGY
@ IPARM_IO_STRATEGY
Definition: api.h:37
PASTIX_ERR_BADPARAMETER
@ PASTIX_ERR_BADPARAMETER
Definition: api.h:353
PastixVerboseYes
@ PastixVerboseYes
Definition: api.h:211