PaStiX Handbook  6.3.2
api.c
Go to the documentation of this file.
1 /**
2  *
3  * @file api.c
4  *
5  * PaStiX API routines
6  *
7  * @copyright 2004-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.3.2
11  * @author Xavier Lacoste
12  * @author Pierre Ramet
13  * @author Mathieu Faverge
14  * @author Esragul Korkmaz
15  * @author Gregoire Pichon
16  * @author Matias Hastaran
17  * @author Tony Delarue
18  * @author Alycia Lisito
19  * @author Brieuc Nicolas
20  * @author Tom Moenne-Loccoz
21  * @date 2023-11-10
22  *
23  **/
24 #ifndef DOXYGEN_SHOULD_SKIP_THIS
25 #define _GNU_SOURCE 1
26 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
27 #include "common.h"
28 #if defined(PASTIX_ORDERING_METIS)
29 #include <metis.h>
30 #endif
31 #include "graph/graph.h"
32 #include "pastix/order.h"
33 #include "blend/solver.h"
34 #include "bcsc/bcsc.h"
35 #include "isched.h"
36 #include <sys/types.h>
37 #include <sys/stat.h>
38 #include "models.h"
39 #if defined(PASTIX_WITH_PARSEC)
41 #endif
42 #if defined(PASTIX_WITH_STARPU)
44 #endif
45 
46 #ifndef DOXYGEN_SHOULD_SKIP_THIS
47 #if defined(PASTIX_OS_WINDOWS)
48 #define pastix_mkdir( __str ) mkdir( (__str) )
49 #else
50 #define pastix_mkdir( __str ) mkdir( (__str), 0700 )
51 #endif
52 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
53 
54 #if defined(PASTIX_WITH_MPI)
55 static int pastix_mpi_in_use = 0; /**< Counter of the number of Pastix instances using MPI */
56 static int pastix_mpi_init = 0; /**< Boolean to know if MPI has been initialized by pastix or not */
57 static volatile pastix_atomic_lock_t pastix_mpi_lock = PASTIX_ATOMIC_UNLOCKED; /**< Lock to protect the MPI initialization */
58 #endif
59 
60 /**
61  *******************************************************************************
62  *
63  * @ingroup pastix_api
64  *
65  * @brief Generate a unique temporary directory to store output files
66  *
67  *******************************************************************************
68  *
69  * @param[inout] pastix_data
70  * On entry, the pastix_data structure associated to the pastix instance.
71  * On exit, if not already initialized, pastix_data->dir_global and
72  * pastix_data->dir_local are initialized.
73  *
74  *******************************************************************************/
75 void
77 {
78  char **dir_global = &(pastix_data->dir_global);
79  mode_t old_mask;
80  int rc, len;
81 
82  if ( *dir_global != NULL ) {
83  return;
84  }
85 
86  if ( pastix_data->procnum == 0 )
87  {
88  char *name = pastix_getenv_get_value_str( "PASTIX_OUTPUT_DIR", "pastix" );
89  rc = asprintf( dir_global, "%s-XXXXXX", name );
90  assert( rc != -1 );
91  free( name );
92 
93 #if !defined(HAVE_MKDTEMP)
94  {
95  *dir_global = mktemp( *dir_global );
96  if ( (*dir_global)[0] == '\0' ) {
97  perror( "pastix_gendirectories/global/mktemp" );
98  free( *dir_global );
99  *dir_global = NULL;
100  return;
101  }
102 
103  old_mask = umask(S_IWGRP | S_IWOTH);
104  rc = pastix_mkdir( *dir_global );
105  (void)umask(old_mask);
106 
107  if ( rc == -1 ) {
108  perror( "pastix_gendirectories/global/mkdir" );
109  free( *dir_global );
110  *dir_global = NULL;
111  return;
112  }
113  }
114 #else
115  {
116  old_mask = umask(S_IWGRP | S_IWOTH);
117  *dir_global = mkdtemp( *dir_global );
118  (void)umask(old_mask);
119  if ( *dir_global == NULL ) {
120  perror( "pastix_gendirectories/global/mkdtemp" );
121  return;
122  }
123  }
124 #endif
125  /* Broadcast the main directory to everyone */
126  len = strlen( *dir_global );
127 
128  MPI_Bcast( &len, 1, MPI_INT,
129  0, pastix_data->inter_node_comm );
130  MPI_Bcast( pastix_data->dir_global, len+1, MPI_CHAR,
131  0, pastix_data->inter_node_comm );
132 
133  fprintf( stdout, "OUTPUTDIR: %s\n", *dir_global );
134  }
135  else {
136  len = 0;
137  MPI_Bcast( &len, 1, MPI_INT,
138  0, pastix_data->inter_node_comm );
139  pastix_data->dir_global = malloc( (len+1) * sizeof(char) );
140  MPI_Bcast( pastix_data->dir_global, len+1, MPI_CHAR,
141  0, pastix_data->inter_node_comm );
142  }
143 
144  assert( pastix_data->dir_global != NULL );
145 
146  /*
147  * Create the local directory name
148  */
149 #if defined(PASTIX_WITH_MPI)
150  if (pastix_data->procnbr > 1)
151  {
152  char *localdir;
153  rc = asprintf( &localdir, "%s/%0*d",
154  pastix_data->dir_global,
155  (int)pastix_iceil( pastix_data->procnbr, 10 ),
156  pastix_data->procnum );
157 
158  old_mask = umask(S_IWGRP | S_IWOTH);
159  rc = pastix_mkdir( localdir );
160  (void)umask(old_mask);
161 
162  if ( rc == -1 ) {
163  perror( "pastix_gendirectories/local/mkdir" );
164  free( localdir );
165  return;
166  }
167  pastix_data->dir_local = localdir;
168  }
169  else
170 #endif
171  {
172  pastix_data->dir_local = strdup( *dir_global );
173  }
174  (void)rc;
175 }
176 
177 /**
178  *******************************************************************************
179  *
180  * @ingroup pastix_api
181  *
182  * @brief Generate the full filename within local or global directory.
183  *
184  *******************************************************************************
185  *
186  * @param[in] dirname
187  * The pointer to the directory string associated to the instance.
188  * It must have been initialized before calling.
189  *
190  * @param[in] filename
191  * The filename to create in the unique directory.
192  *
193  *******************************************************************************
194  *
195  * @return The filename to use. NULL if failed.
196  *
197  *******************************************************************************/
198 char *
199 pastix_fname( const char *dirname,
200  const char *filename )
201 {
202  char *fullname = NULL;
203  int rc;
204 
205  /* Make sure dirname has been initialized before calling fopen */
206  assert( dirname );
207 
208  rc = asprintf( &fullname, "%s/%s", dirname, filename );
209  if ( rc <= 0 ) {
210  pastix_print_error( "pastix_fname: Couldn't not generate the tempory filename for the output file" );
211  return NULL;
212  }
213 
214  return fullname;
215 }
216 
217 /**
218  *******************************************************************************
219  *
220  * @ingroup pastix_api
221  *
222  * @brief Open a file in the unique directory of the pastix instance
223  *
224  *******************************************************************************
225  *
226  * @param[in] dirname
227  * The pointer to the directory string associated to the instance.
228  * It must have been initialized before calling.
229  *
230  * @param[in] filename
231  * The filename to create in the unique directory.
232  *
233  * @param[in] mode
234  * Opening mode of the file as described by the fopen() function.
235  *
236  *******************************************************************************
237  *
238  * @return The FILE structure of the opened file. NULL if failed.
239  *
240  *******************************************************************************/
241 FILE *
242 pastix_fopenw( const char *dirname,
243  const char *filename,
244  const char *mode )
245 {
246  char *fullname;
247  FILE *f = NULL;
248 
249  /* Make sure dirname has been initialized before calling fopen */
250  assert( dirname );
251 
252  fullname = pastix_fname( dirname, filename );
253  if ( !fullname ) {
254  return NULL;
255  }
256 
257  f = fopen( fullname, mode );
258  free( fullname );
259 
260  if ( NULL == f )
261  {
262  perror( "pastix_fopenw" );
263  pastix_print_error( "pastix_fopenw: Couldn't open file: %s with mode %s\n",
264  filename, mode );
265  return NULL;
266  }
267 
268  return f;
269 }
270 
271 /**
272  *******************************************************************************
273  *
274  * @ingroup pastix_api
275  *
276  * @brief Open a file in the current directory in read only mode.
277  *
278  *******************************************************************************
279  *
280  * @param[in] filename
281  * The filename of the file to open.
282  *
283  *******************************************************************************
284  *
285  * @return The FILE structure of the opened file. NULL if failed.
286  *
287  *******************************************************************************/
288 FILE *
289 pastix_fopen( const char *filename )
290 {
291  FILE *f = fopen(filename, "r");
292 
293  if (NULL == f)
294  {
295  perror("pastix_fopen");
296  pastix_print_error( "pastix_fopen: Couldn't open file: %s with mode r\n",
297  filename );
298  return NULL;
299  }
300 
301  return f;
302 }
303 
304 /**
305  *******************************************************************************
306  *
307  * @ingroup pastix_api
308  *
309  * @brief Print information about the solver configuration
310  *
311  *******************************************************************************
312  *
313  * @param[in] pastix
314  * The main data structure.
315  *
316  *******************************************************************************/
317 void
319 {
320  pastix_print( pastix->procnum, 0, OUT_HEADER,
321  /* Version */ PASTIX_VERSION_MAJOR, PASTIX_VERSION_MINOR, PASTIX_VERSION_MICRO,
322  /* Sched. seq */ "Enabled",
323  /* Sched. sta */ (pastix->isched ? "Started" : "Disabled"),
324  /* Sched. dyn */ ( (pastix->iparm[IPARM_SCHEDULER] == PastixSchedDynamic) ? "Started" : "Disabled" ),
325  /* Sched. PaR */
326 #if defined(PASTIX_WITH_PARSEC)
327  (pastix->parsec == NULL ? "Enabled" : "Started" ),
328 #else
329  "Disabled",
330 #endif
331  /* Sched. SPU */
332 #if defined(PASTIX_WITH_STARPU)
333  (pastix->starpu == NULL ? "Enabled" : "Started" ),
334 #else
335  "Disabled",
336 #endif
337  /* MPI nbr */ pastix->procnbr,
338  /* Thrd nbr */ (int)(pastix->iparm[IPARM_THREAD_NBR]),
339  /* GPU nbr */ (int)(pastix->iparm[IPARM_GPU_NBR]),
340  /* MPI mode */ pastix_mpithreadmode_getstr( pastix->iparm[IPARM_MPI_THREAD_LEVEL] ),
341  /* Distrib */ ((pastix->iparm[IPARM_TASKS2D_LEVEL] == 0) ? "1D" : "2D"),
342  ((pastix->iparm[IPARM_TASKS2D_LEVEL] < 0) ? ((long)pastix->iparm[IPARM_TASKS2D_WIDTH]) :
343  -((long)pastix->iparm[IPARM_TASKS2D_LEVEL])),
344  /* Block size */ (long)pastix->iparm[IPARM_MIN_BLOCKSIZE],
345  (long)pastix->iparm[IPARM_MAX_BLOCKSIZE],
346  /* Model CPU */ pastix->cpu_models->name,
347  /* Model GPU */ pastix->gpu_models->name,
348  /* Strategy */ ((pastix->iparm[IPARM_COMPRESS_WHEN] == PastixCompressNever) ? "No compression" :
349  (pastix->iparm[IPARM_COMPRESS_WHEN] == PastixCompressWhenBegin) ? "Memory Optimal" : "Just-In-Time") );
350 
351 
353  pastix_print( pastix->procnum, 0, OUT_HEADER_LR,
354  /* Tolerance */ (double)pastix->dparm[DPARM_COMPRESS_TOLERANCE],
355  /* Compress method */ compmeth_shnames[pastix->iparm[IPARM_COMPRESS_METHOD]],
356  /* Compress width */ (long)pastix->iparm[IPARM_COMPRESS_MIN_WIDTH],
357  /* Compress height */ (long)pastix->iparm[IPARM_COMPRESS_MIN_HEIGHT],
358  /* Min ratio */ (double)pastix->dparm[DPARM_COMPRESS_MIN_RATIO],
359  /* Tolerance used */ pastix->iparm[IPARM_COMPRESS_RELTOL] ? "Relative" : "Absolute",
360  /* Ortho method */ ((pastix->iparm[IPARM_COMPRESS_ORTHO] == PastixCompressOrthoCGS) ? "CGS" :
361  (pastix->iparm[IPARM_COMPRESS_ORTHO] == PastixCompressOrthoQR) ? "QR" : "partialQR"),
362  /* Splitting strategy */ ((pastix->iparm[IPARM_SPLITTING_STRATEGY] == PastixSplitNot) ? "Not used" :
363  (pastix->iparm[IPARM_SPLITTING_STRATEGY] == PastixSplitKway) ? "KWAY" : "KWAY and projections"),
364  /* Levels of projections */ (long)pastix->iparm[IPARM_SPLITTING_LEVELS_PROJECTIONS],
365  /* Levels of kway */ (long)pastix->iparm[IPARM_SPLITTING_LEVELS_KWAY],
366  /* Projections distance */ (long)pastix->iparm[IPARM_SPLITTING_PROJECTIONS_DISTANCE],
367  /* Projections depth */ (long)pastix->iparm[IPARM_SPLITTING_PROJECTIONS_DEPTH],
368  /* Projections width */ (long)pastix->iparm[IPARM_SPLITTING_PROJECTIONS_WIDTH] );
369  }
370 }
371 
372 /**
373  *******************************************************************************
374  *
375  * @ingroup pastix_api
376  *
377  * @brief Print summary information
378  *
379  *******************************************************************************
380  *
381  * @param[in] pastix
382  * The main data structure.
383  *
384  *******************************************************************************/
385 void
387 {
388  (void)pastix;
389 }
390 
391 /**
392  *******************************************************************************
393  *
394  * @ingroup pastix_api
395  *
396  * @brief Initialize the iparm and dparm arrays to their default
397  * values.
398  *
399  * This is performed only if iparm[IPARM_MODIFY_PARAMETER] is set to 0.
400  *
401  *******************************************************************************
402  *
403  * @param[inout] iparm
404  * The integer array of parameters to initialize.
405  *
406  * @param[inout] dparm
407  * The floating point array of parameters to initialize.
408  *
409  *******************************************************************************/
410 void
412  double *dparm )
413 {
414  memset( iparm, 0, IPARM_SIZE * sizeof(pastix_int_t) );
415  memset( dparm, 0, DPARM_SIZE * sizeof(double) );
416 
418  iparm[IPARM_IO_STRATEGY] = PastixIONo;
419 
420  /* Stats */
421  iparm[IPARM_NNZEROS] = 0;
422  iparm[IPARM_NNZEROS_BLOCK_LOCAL] = 0;
423  iparm[IPARM_ALLOCATED_TERMS] = 0;
424  iparm[IPARM_PRODUCE_STATS] = 0;
425  iparm[IPARM_TRACE] = PastixTraceNot;
426 
427  /* Scaling */
428  iparm[IPARM_MC64] = 0;
429 
430  /*
431  * Ordering parameters
432  */
433  iparm[IPARM_ORDERING] = -1;
434 #if defined(PASTIX_ORDERING_METIS)
436 #endif
437 #if defined(PASTIX_ORDERING_SCOTCH)
439 #endif
440  iparm[IPARM_ORDERING_DEFAULT] = 1;
441 
442  /* Scotch */
443  {
444  iparm[IPARM_SCOTCH_MT] = 1;
445  iparm[IPARM_SCOTCH_SWITCH_LEVEL] = 120;
446  iparm[IPARM_SCOTCH_CMIN] = 0;
447  iparm[IPARM_SCOTCH_CMAX] = 100000;
448  iparm[IPARM_SCOTCH_FRAT] = 8;
449  }
450 
451  /* Metis */
452  {
453 #if defined(PASTIX_ORDERING_METIS)
454  iparm[IPARM_METIS_CTYPE ] = METIS_CTYPE_SHEM;
455  iparm[IPARM_METIS_RTYPE ] = METIS_RTYPE_SEP1SIDED;
456 #else
457  iparm[IPARM_METIS_CTYPE ] = -1;
458  iparm[IPARM_METIS_RTYPE ] = -1;
459 #endif
460  iparm[IPARM_METIS_NO2HOP ] = 0;
461  iparm[IPARM_METIS_NSEPS ] = 1;
462  iparm[IPARM_METIS_NITER ] = 10;
463  iparm[IPARM_METIS_UFACTOR ] = 200;
464  iparm[IPARM_METIS_COMPRESS] = 1;
465  iparm[IPARM_METIS_CCORDER ] = 0;
466  iparm[IPARM_METIS_PFACTOR ] = 0;
467  iparm[IPARM_METIS_SEED ] = 3452;
468  iparm[IPARM_METIS_DBGLVL ] = 0;
469  }
470 
471  /* Symbolic factorization */
472  iparm[IPARM_AMALGAMATION_LVLCBLK] = 5;
473  iparm[IPARM_AMALGAMATION_LVLBLAS] = 5;
474 
475  /* Reordering */
476  iparm[IPARM_REORDERING_SPLIT] = 0;
477  iparm[IPARM_REORDERING_STOP] = PASTIX_INT_MAX;
478 
479  /* Splitting */
482  iparm[IPARM_SPLITTING_LEVELS_KWAY] = PASTIX_INT_MAX;
486 
487  /* Analyze */
488  iparm[IPARM_MIN_BLOCKSIZE] = 160;
489  iparm[IPARM_MAX_BLOCKSIZE] = 320;
490  iparm[IPARM_TASKS2D_LEVEL] = -1;
492  iparm[IPARM_ALLCAND] = 0;
493 
494  /* Incomplete */
495  iparm[IPARM_INCOMPLETE] = 0;
496  iparm[IPARM_LEVEL_OF_FILL] = 0;
497 
498  /* Factorization */
501  iparm[IPARM_STATIC_PIVOTING] = 0;
502  iparm[IPARM_FREE_CSCUSER] = 0;
503  iparm[IPARM_SCHUR_FACT_MODE] = PastixFactModeLocal;
504 
505  /* Solve */
507  iparm[IPARM_SCHUR_SOLV_MODE] = PastixSolvModeLocal;
508  iparm[IPARM_APPLYPERM_WS] = 1;
509 
510  /* Refinement */
512  iparm[IPARM_NBITER] = 0;
513  iparm[IPARM_ITERMAX] = 250;
514  iparm[IPARM_GMRES_IM] = 25;
515 
516  /* Context */
518  iparm[IPARM_THREAD_NBR] = -1;
519  iparm[IPARM_SOCKET_NBR] = -1;
520  iparm[IPARM_AUTOSPLIT_COMM] = 0;
521 
522  /* GPU */
523  iparm[IPARM_GPU_NBR] = 0;
524  iparm[IPARM_GPU_MEMORY_PERCENTAGE] = 95;
525  iparm[IPARM_GPU_MEMORY_BLOCK_SIZE] = 32 * 1024;
526  iparm[IPARM_GLOBAL_ALLOCATION] = 0;
527 
528  /* Compression */
529  iparm[IPARM_COMPRESS_MIN_WIDTH] = 128;
530  iparm[IPARM_COMPRESS_MIN_HEIGHT] = 20;
534  iparm[IPARM_COMPRESS_PRESELECT] = 1;
535  iparm[IPARM_COMPRESS_ILUK] = -2;
536 
537  /* Mixed-Precision */
538  iparm[IPARM_MIXED] = 0;
539 
540  /* MPI modes */
542 
543  /* Subset for old pastix interface */
544  iparm[IPARM_MODIFY_PARAMETER] = 1;
547  iparm[IPARM_FLOAT] = -1;
548  iparm[IPARM_MTX_TYPE] = -1;
549  iparm[IPARM_DOF_NBR] = 1;
550 
551  dparm[DPARM_FILL_IN] = 0.;
552  dparm[DPARM_EPSILON_REFINEMENT] = -1.;
553  dparm[DPARM_RELATIVE_ERROR] = -1.;
554  dparm[DPARM_EPSILON_MAGN_CTRL] = 0.;
555  dparm[DPARM_ANALYZE_TIME] = 0.;
556  dparm[DPARM_PRED_FACT_TIME] = 0.;
557  dparm[DPARM_FACT_TIME] = 0.;
558  dparm[DPARM_SOLV_TIME] = 0.;
559  dparm[DPARM_FACT_FLOPS] = 0.;
560  dparm[DPARM_FACT_THFLOPS] = 0.;
561  dparm[DPARM_FACT_RLFLOPS] = 0.;
562  dparm[DPARM_FACT_ENERGY] = 0.;
563  dparm[DPARM_MEM_FR] = 0.;
564  dparm[DPARM_MEM_LR] = 0.;
565  dparm[DPARM_SOLV_FLOPS] = 0.;
566  dparm[DPARM_SOLV_THFLOPS] = 0.;
567  dparm[DPARM_SOLV_RLFLOPS] = 0.;
568  dparm[DPARM_SOLV_ENERGY] = 0.;
569  dparm[DPARM_REFINE_TIME] = 0.;
570  dparm[DPARM_A_NORM] = -1.;
571  dparm[DPARM_COMPRESS_TOLERANCE] = 1e-8;
572  dparm[DPARM_COMPRESS_MIN_RATIO] = 1.;
573 }
574 
575 /**
576  *******************************************************************************
577  *
578  * @ingroup pastix_internal
579  *
580  * @brief Internal function that setups the multiple communicators in order
581  * to perform the ordering step in MPI only mode, and the factorization in
582  * MPI+Thread mode with the same amount of ressources.
583  *
584  *******************************************************************************
585  *
586  * @param[inout] pastix
587  * The pastix datat structure to initialize.
588  *
589  * @param[in] comm
590  * The MPI communicator associated to the pastix data structure
591  *
592  * @param[in] autosplit
593  * Enable automatic split when multiple processes run on the same node
594  *
595  *******************************************************************************/
596 static inline void
598  PASTIX_Comm comm,
599  int autosplit )
600 {
601  /*
602  * Setup all communicators for autosplitmode and initialize number/rank of
603  * processes.
604  */
605  if ( comm == 0 ) {
606  comm = MPI_COMM_WORLD;
607  }
608  pastix->pastix_comm = comm;
609  MPI_Comm_size(pastix->pastix_comm, &(pastix->procnbr));
610  MPI_Comm_rank(pastix->pastix_comm, &(pastix->procnum));
611 
612 #if defined(PASTIX_WITH_MPI)
613  if ( autosplit )
614  {
615  int i, len;
616  char procname[MPI_MAX_PROCESSOR_NAME];
617  int rc, key = pastix->procnum;
618  int64_t color;
619  (void)rc;
620 
621  /*
622  * Get hostname to generate a hash that will be the color of each node
623  * MPI_Get_processor_name is not used as it can returned different
624  * strings for processes of a same physical node.
625  */
626  rc = gethostname(procname, MPI_MAX_PROCESSOR_NAME-1);
627  assert(rc == 0);
628  procname[MPI_MAX_PROCESSOR_NAME-1] = '\0';
629  len = strlen( procname );
630 
631  /* Compute hash */
632  color = 0;
633  for (i = 0; i < len; i++) {
634  color = color*256*sizeof(char) + procname[i];
635  }
636 
637  /* Create intra-node communicator */
638  MPI_Comm_split(pastix->pastix_comm, color, key, &(pastix->intra_node_comm));
639  MPI_Comm_size(pastix->intra_node_comm, &(pastix->intra_node_procnbr));
640  MPI_Comm_rank(pastix->intra_node_comm, &(pastix->intra_node_procnum));
641 
642  /* Create inter-node communicator */
643  MPI_Comm_split(pastix->pastix_comm, pastix->intra_node_procnum, key, &(pastix->inter_node_comm));
644  MPI_Comm_size(pastix->inter_node_comm, &(pastix->inter_node_procnbr));
645  MPI_Comm_rank(pastix->inter_node_comm, &(pastix->inter_node_procnum));
646  }
647  else
648 #endif
649  {
650  pastix->intra_node_comm = MPI_COMM_SELF;
651  pastix->intra_node_procnbr = 1;
652  pastix->intra_node_procnum = 0;
653  pastix->inter_node_comm = pastix->pastix_comm;
654  pastix->inter_node_procnbr = pastix->procnbr;
655  pastix->inter_node_procnum = pastix->procnum;
656  }
657 
658  assert( pastix->inter_node_procnbr * pastix->intra_node_procnbr == pastix->procnbr );
659  (void)autosplit;
660  (void)comm;
661 }
662 
663 /**
664  *******************************************************************************
665  *
666  * @ingroup pastix_api
667  *
668  * @brief Initialize the solver instance with a bintab array to specify the
669  * thread binding.
670  *
671  * @remark You should always prefer the pastixInit() function when hwloc is
672  * available, and use the pastixInitWithAffinity() function only if you know
673  * what you want to do with your threads.
674  *
675  *******************************************************************************
676  *
677  * @param[inout] pastix_data
678  * The main data structure.
679  *
680  * @param[in] pastix_comm
681  * The MPI communicator.
682  *
683  * @param[inout] iparm
684  * The integer array of parameters to initialize.
685  *
686  * @param[inout] dparm
687  * The floating point array of parameters to initialize.
688  *
689  * @param[in] bindtab
690  * Integer array of size iparm[IPARM_THREAD_NBR] that will specify the
691  * thread binding. NULL if let to the system.
692  * Each thread i will be bound to to the core bindtab[i] if
693  * bindtab[i] >= 0, or not bound if bindtab[i] < 0.
694  * If other libraries of the main application are spawning their own threads
695  * too (eg. OpenMP), we strongly recommend not to bind the main thread,
696  * and let bindtab[0] = -1 to avoid binding impact on other libraries.
697  *
698  *******************************************************************************/
699 void
701  PASTIX_Comm pastix_comm,
702  pastix_int_t *iparm,
703  double *dparm,
704  const int *bindtab )
705 {
707 
708  /*
709  * Allocate pastix_data structure when we enter PaStiX for the first time.
710  */
711  MALLOC_INTERN(pastix, 1, pastix_data_t);
712  memset( pastix, 0, sizeof(pastix_data_t) );
713 
714  /*
715  * Initialize iparm/dparm vectors and set them to default values if not set
716  * by the user.
717  */
718  if ( iparm[IPARM_MODIFY_PARAMETER] == 0 ) {
719  pastixInitParam( iparm, dparm );
720  }
721 
722  /*
723  * Check if MPI is initialized
724  */
725 #if defined(PASTIX_WITH_MPI)
726  {
727  int provided = MPI_THREAD_SINGLE;
728  int flag = 0;
729 
730  pastix_atomic_lock( &pastix_mpi_lock );
731  pastix_mpi_in_use++;
732 
733  MPI_Initialized(&flag);
734  if ( !flag ) {
735  MPI_Init_thread( NULL, NULL, MPI_THREAD_MULTIPLE, &provided );
736  pastix_mpi_init = 1;
737  }
738  else {
739  MPI_Query_thread( &provided );
740  }
741 
742  switch ( provided ) {
743  case MPI_THREAD_MULTIPLE:
745  break;
746  case MPI_THREAD_SERIALIZED:
748  break;
749  case MPI_THREAD_FUNNELED:
751  break;
752  case MPI_THREAD_SINGLE:
754  break;
755  default:
757  }
758  pastix_atomic_unlock( &pastix_mpi_lock );
759  }
760 #endif
761 
762  /*
763  * TODO : Replace this id by a list of ids to know
764  * which sub-problem this instance represents.
765  */
766  pastix->id = 953833;
767  pastix->iparm = iparm;
768  pastix->dparm = dparm;
769 
770  /*
771  * Set bits to flush subnormals in mixed-precision and avoid slow-downs
772  */
773  if ( pastix->iparm[IPARM_FTZ] ) {
774  set_ftz();
775  }
776 
777  pastix->steps = 0;
778  pastix->sched = PastixSchedDynamic;
779 
780  pastix->isched = NULL;
781 #if defined(PASTIX_WITH_PARSEC)
782  pastix->parsec = NULL;
783 #endif
784 #if defined(PASTIX_WITH_STARPU)
785  pastix->starpu = NULL;
786 #endif
787 
788  apiInitMPI( pastix, pastix_comm, iparm[IPARM_AUTOSPLIT_COMM] );
789 
790  if ( (pastix->intra_node_procnbr > 1) &&
791  (pastix->iparm[IPARM_THREAD_NBR] != -1 ) ) {
792  pastix_print( pastix->procnum, 0,
793  "WARNING: Thread number forced by MPI autosplit feature\n" );
794  iparm[IPARM_THREAD_NBR] = pastix->intra_node_procnbr;
795  }
796 
797 #if defined(PASTIX_GENERATE_MODEL)
798  pastix_print( pastix->procnum, 0,
799  "WARNING: PaStiX compiled with -DPASTIX_GENERATE_MODEL forces single thread computations\n" );
800  iparm[IPARM_THREAD_NBR] = 1;
801 #endif
802 
803  /*
804  * Start the internal threads
805  */
806  pastix->isched = ischedInit( pastix->iparm[IPARM_THREAD_NBR], bindtab );
807  pastix->iparm[IPARM_THREAD_NBR] = pastix->isched->world_size;
808 
809  if ( ( pastix->iparm[IPARM_SOCKET_NBR] == -1 ) ||
810  ( pastix->iparm[IPARM_SOCKET_NBR] > pastix->isched->socketsnbr ) ) {
811  pastix->iparm[IPARM_SOCKET_NBR] = pastix->isched->socketsnbr;
812  }
813 
814  /*
815  * Start PaRSEC if compiled with it and scheduler set to PaRSEC
816  */
817 #if defined(PASTIX_WITH_PARSEC)
818  if ( (pastix->parsec == NULL) &&
819  (iparm[IPARM_SCHEDULER] == PastixSchedParsec) ) {
820  int argc = 0;
821  pastix_parsec_init( pastix, &argc, NULL, bindtab );
822  }
823 #endif /* defined(PASTIX_WITH_PARSEC) */
824 
825  /*
826  * Start StarPU if compiled with it and scheduler set to StarPU
827  */
828 #if defined(PASTIX_WITH_STARPU)
829  if ( (pastix->starpu == NULL) &&
830  (iparm[IPARM_SCHEDULER] == PastixSchedStarPU) ) {
831  int argc = 0;
832  pastix_starpu_init( pastix, &argc, NULL, bindtab );
833  }
834 #endif /* defined(PASTIX_WITH_STARPU) */
835 
836  pastix->graph = NULL;
837  pastix->schur_n = 0;
838  pastix->schur_list = NULL;
839  pastix->zeros_n = 0;
840  pastix->zeros_list = NULL;
841  pastix->ordemesh = NULL;
842 
843  pastix->symbmtx = NULL;
844 
845  pastix->bcsc = NULL;
846  pastix->solvmatr = NULL;
847 
848  pastix->cpu_models = NULL;
849  pastix->gpu_models = NULL;
850 
851  pastix->dir_global = NULL;
852  pastix->dir_local = NULL;
853 
855 
856  if (iparm[IPARM_VERBOSE] > PastixVerboseNot) {
858  }
859 
860  /* Initialization step done, overwrite anything done before */
861  pastix->steps = STEP_INIT;
862 
863  papiEnergyInit( pastix->iparm[IPARM_SOCKET_NBR] );
864 
865  /* If PASTIX_WITH_EZTRACE starts (and pauses) trace. */
866 #if defined(PASTIX_WITH_EZTRACE)
868 #endif
869 
870  *pastix_data = pastix;
871 }
872 
873 /**
874  *******************************************************************************
875  *
876  * @ingroup pastix_api
877  *
878  * @brief Initialize the solver instance
879  *
880  *******************************************************************************
881  *
882  * @param[inout] pastix_data
883  * The main data structure.
884  *
885  * @param[in] pastix_comm
886  * The MPI communicator.
887  *
888  * @param[inout] iparm
889  * The integer array of parameters to initialize.
890  *
891  * @param[inout] dparm
892  * The floating point array of parameters to initialize.
893  *
894  *******************************************************************************/
895 void
896 pastixInit( pastix_data_t **pastix_data,
897  PASTIX_Comm pastix_comm,
898  pastix_int_t *iparm,
899  double *dparm )
900 {
901  pastixInitWithAffinity( pastix_data, pastix_comm,
902  iparm, dparm, NULL );
903 }
904 
905 /**
906  *******************************************************************************
907  *
908  * @ingroup pastix_api
909  *
910  * @brief Finalize the solver instance
911  *
912  *******************************************************************************
913  *
914  * @param[inout] pastix_data
915  * The main data structure.
916  *
917  *******************************************************************************/
918 void
920 {
921  pastix_data_t *pastix = *pastix_data;
922 
923  papiEnergyFinalize();
924 
925  /* If PASTIX_WITH_EZTRACE stops trace. */
926 #if defined(PASTIX_WITH_EZTRACE)
927  kernelsTraceFinalize( *pastix_data );
928 #endif
929 
930  pastixSummary( *pastix_data );
931 
932  ischedFinalize( pastix->isched );
933 
934  if ( pastix->graph != NULL )
935  {
936  graphExit( pastix->graph );
937  memFree_null( pastix->graph );
938  }
939 
940  if ( pastix->ordemesh != NULL )
941  {
942  pastixOrderExit( pastix->ordemesh );
943  memFree_null( pastix->ordemesh );
944  }
945 
946  if ( pastix->symbmtx != NULL )
947  {
948  pastixSymbolExit( pastix->symbmtx );
949  memFree_null( pastix->symbmtx );
950  }
951 
952  if ( pastix->solvloc != NULL )
953  {
954  solverExit( pastix->solvloc );
955  memFree_null( pastix->solvloc );
956  }
957 
958  if ( pastix->solvglob != NULL )
959  {
960  solverExit( pastix->solvglob );
961  memFree_null( pastix->solvglob );
962  }
963 
964  if ( pastix->solvmatr != NULL )
965  {
966  pastix->solvmatr = NULL;
967  }
968 
969  if ( pastix->bcsc != NULL )
970  {
971  bcscExit( pastix->bcsc );
972  memFree_null( pastix->bcsc );
973  }
974 
975  if (pastix->schur_list != NULL )
976  {
977  memFree_null( pastix->schur_list );
978  }
979 #if defined(PASTIX_WITH_PARSEC)
980  if (pastix->parsec != NULL) {
982  }
983 #endif /* defined(PASTIX_WITH_PARSEC) */
984 #if defined(PASTIX_WITH_STARPU)
985  if (pastix->starpu != NULL) {
987  }
988 #endif /* defined(PASTIX_WITH_STARPU) */
989 
990 #if defined(PASTIX_WITH_MPI)
991  pastix_atomic_lock( &pastix_mpi_lock );
992  pastix_mpi_in_use--;
993  if ( (pastix_mpi_in_use == 0) && pastix_mpi_init ) {
994  MPI_Finalize();
995  }
996  pastix_atomic_unlock( &pastix_mpi_lock );
997 #endif
998 
999  if ( pastix->cpu_models != NULL ) {
1000  pastixModelsFree( pastix->cpu_models );
1001  pastix->cpu_models = NULL;
1002  }
1003  if ( pastix->gpu_models != NULL ) {
1004  pastixModelsFree( pastix->gpu_models );
1005  pastix->gpu_models = NULL;
1006  }
1007 
1008  if ( pastix->dir_global != NULL ) {
1009  free( pastix->dir_global );
1010  }
1011  if ( pastix->dir_local != NULL ) {
1012  free( pastix->dir_local );
1013  }
1014  memFree_null(*pastix_data);
1015 }
1016 
1017 /**
1018  *******************************************************************************
1019  *
1020  * @ingroup pastix_api
1021  *
1022  * @brief Dump the iparm and dparm parameters in a CSV file.
1023  *
1024  *******************************************************************************
1025  *
1026  * @param[inout] pastix_data
1027  * The main data structure.
1028  *
1029  *******************************************************************************/
1030 void
1031 pastixDumpParam( const pastix_data_t *pastix_data )
1032 {
1033  FILE *csv = NULL;
1034  char *fullname = NULL;
1035  int rc;
1036  int32_t lidx;
1037  static volatile int32_t id = 0;
1038 
1039  if( pastix_data->inter_node_procnum != 0 ) {
1040  return;
1041  }
1042 
1043  lidx = pastix_atomic_add_32b( &id, 1 );
1044  rc = asprintf( &fullname, "idparam_%d.csv", lidx );
1045 
1046  if ( rc <= 0 ) {
1047  pastix_print_error( "pastixDumpParam: Couldn't not generate the filename for the output file" );
1048  return;
1049  }
1050 
1051  csv = pastix_fopenw( pastix_data->dir_global, fullname, "w" );
1052  pastix_param2csv( pastix_data, csv );
1053 
1054  fclose(csv);
1055  free(fullname);
1056 }
1057 
1058 /**
1059  *******************************************************************************
1060  *
1061  * @ingroup pastix_api
1062  *
1063  * @brief Check the values of iparm and dparm arrays.
1064  *
1065  *******************************************************************************
1066  *
1067  * @param[in] iparm
1068  * The iparm options array. Can be NULL.
1069  *
1070  * @param[in] dparm
1071  * The dparm options array. Can be NULL.
1072  *
1073  *******************************************************************************
1074  *
1075  * @return The amount of iparm/dparm with an incorrect value.
1076  *
1077  *******************************************************************************/
1078 int
1080  const double *dparm )
1081 {
1082  int irc = 0;
1083  int drc = 0;
1084 
1085  if ( iparm != NULL ) {
1086  irc = iparm_check_values( iparm );
1087  }
1088  if ( dparm != NULL ) {
1089  drc = dparm_check_values( dparm );
1090  }
1091 
1092  return irc + drc;
1093 }
static void apiInitMPI(pastix_data_t *pastix, PASTIX_Comm comm, int autosplit)
Internal function that setups the multiple communicators in order to perform the ordering step in MPI...
Definition: api.c:597
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
void bcscExit(pastix_bcsc_t *bcsc)
Frees the block csc structure but do not free the bcsc pointer.
Definition: bcsc.c:1917
void solverExit(SolverMatrix *solvmtx)
Free the content of the solver matrix structure.
Definition: solver.c:143
void kernelsTraceFinalize(const pastix_data_t *pastix_data)
Stops the trace module.
void kernelsTraceInit(const pastix_data_t *pastix_data, pastix_trace_t trace)
Starts the trace module.
const char * compmeth_shnames[PastixCompressMethodNbr]
List of short names for the compression kernels.
Definition: lowrank.c:27
void pastixDumpParam(const pastix_data_t *pastix_data)
Dump the iparm and dparm parameters in a CSV file.
Definition: api.c:1031
void pastixFinalize(pastix_data_t **pastix_data)
Finalize the solver instance.
Definition: api.c:919
void pastixSummary(const pastix_data_t *pastix)
Print summary information.
Definition: api.c:386
void pastixInitParam(pastix_int_t *iparm, double *dparm)
Initialize the iparm and dparm arrays to their default values.
Definition: api.c:411
void pastixModelsFree(pastix_model_t *model)
Free a model data structure.
Definition: models.c:520
FILE * pastix_fopenw(const char *dirname, const char *filename, const char *mode)
Open a file in the unique directory of the pastix instance.
Definition: api.c:242
void pastixModelsLoad(pastix_data_t *pastix_data)
Load the performance models that will be used by the solver.
Definition: models.c:549
void pastixInit(pastix_data_t **pastix_data, PASTIX_Comm pastix_comm, pastix_int_t *iparm, double *dparm)
Initialize the solver instance.
Definition: api.c:896
int pastixCheckParam(const pastix_int_t *iparm, const double *dparm)
Check the values of iparm and dparm arrays.
Definition: api.c:1079
BEGIN_C_DECLS int pastix(pastix_data_t **pastix_data, PASTIX_Comm pastix_comm, pastix_int_t n, pastix_int_t *colptr, pastix_int_t *rowptr, void *values, pastix_int_t *perm, pastix_int_t *invp, void *B, pastix_int_t nrhs, pastix_int_t *iparm, double *dparm)
Main function for compatibility with former releases.
Definition: pastix.c:103
char * pastix_fname(const char *dirname, const char *filename)
Generate the full filename within local or global directory.
Definition: api.c:199
void pastixWelcome(const pastix_data_t *pastix)
Print information about the solver configuration.
Definition: api.c:318
void pastixInitWithAffinity(pastix_data_t **pastix_data, PASTIX_Comm pastix_comm, pastix_int_t *iparm, double *dparm, const int *bindtab)
Initialize the solver instance with a bintab array to specify the thread binding.
Definition: api.c:700
FILE * pastix_fopen(const char *filename)
Open a file in the current directory in read only mode.
Definition: api.c:289
void pastix_gendirectories(pastix_data_t *pastix_data)
Generate a unique temporary directory to store output files.
Definition: api.c:76
@ PastixRefineGMRES
Definition: api.h:277
@ PastixIONo
Definition: api.h:229
@ PastixFactLU
Definition: api.h:317
@ DPARM_SOLV_RLFLOPS
Definition: api.h:180
@ DPARM_PRED_FACT_TIME
Definition: api.h:169
@ DPARM_FACT_THFLOPS
Definition: api.h:172
@ DPARM_EPSILON_MAGN_CTRL
Definition: api.h:163
@ DPARM_REFINE_TIME
Definition: api.h:182
@ DPARM_EPSILON_REFINEMENT
Definition: api.h:161
@ DPARM_A_NORM
Definition: api.h:183
@ DPARM_SOLV_FLOPS
Definition: api.h:178
@ DPARM_FILL_IN
Definition: api.h:160
@ DPARM_MEM_FR
Definition: api.h:175
@ DPARM_ANALYZE_TIME
Definition: api.h:168
@ DPARM_FACT_TIME
Definition: api.h:170
@ DPARM_FACT_RLFLOPS
Definition: api.h:173
@ DPARM_RELATIVE_ERROR
Definition: api.h:162
@ DPARM_MEM_LR
Definition: api.h:176
@ DPARM_COMPRESS_TOLERANCE
Definition: api.h:184
@ DPARM_FACT_FLOPS
Definition: api.h:171
@ DPARM_FACT_ENERGY
Definition: api.h:174
@ DPARM_COMPRESS_MIN_RATIO
Definition: api.h:185
@ DPARM_SOLV_TIME
Definition: api.h:177
@ DPARM_SOLV_THFLOPS
Definition: api.h:179
@ DPARM_SOLV_ENERGY
Definition: api.h:181
@ PastixCompressOrthoQR
Definition: api.h:408
@ PastixCompressOrthoCGS
Definition: api.h:407
@ PastixTaskOrdering
Definition: api.h:197
@ PastixTaskClean
Definition: api.h:203
@ PastixCompressWhenBegin
Definition: api.h:386
@ PastixCompressNever
Definition: api.h:385
@ IPARM_FACTORIZATION
Definition: api.h:99
@ IPARM_SCHUR_FACT_MODE
Definition: api.h:103
@ IPARM_MODIFY_PARAMETER
Definition: api.h:146
@ IPARM_COMPRESS_WHEN
Definition: api.h:131
@ IPARM_REFINEMENT
Definition: api.h:111
@ IPARM_COMPRESS_MIN_WIDTH
Definition: api.h:129
@ IPARM_METIS_SEED
Definition: api.h:70
@ IPARM_MIXED
Definition: api.h:139
@ IPARM_MPI_THREAD_LEVEL
Definition: api.h:143
@ IPARM_TASKS2D_LEVEL
Definition: api.h:90
@ IPARM_METIS_NO2HOP
Definition: api.h:63
@ IPARM_FREE_CSCUSER
Definition: api.h:102
@ IPARM_MTX_TYPE
Definition: api.h:150
@ IPARM_GPU_NBR
Definition: api.h:123
@ IPARM_APPLYPERM_WS
Definition: api.h:108
@ IPARM_METIS_NITER
Definition: api.h:65
@ IPARM_SCOTCH_FRAT
Definition: api.h:58
@ IPARM_SCOTCH_CMAX
Definition: api.h:57
@ IPARM_STATIC_PIVOTING
Definition: api.h:101
@ IPARM_FACTO_LOOK_SIDE
Definition: api.h:100
@ IPARM_START_TASK
Definition: api.h:147
@ IPARM_GPU_MEMORY_BLOCK_SIZE
Definition: api.h:125
@ IPARM_DOF_NBR
Definition: api.h:151
@ IPARM_COMPRESS_MIN_HEIGHT
Definition: api.h:130
@ IPARM_MIN_BLOCKSIZE
Definition: api.h:88
@ IPARM_COMPRESS_ILUK
Definition: api.h:136
@ IPARM_TASKS2D_WIDTH
Definition: api.h:91
@ IPARM_SCHEDULER
Definition: api.h:117
@ IPARM_COMPRESS_METHOD
Definition: api.h:132
@ IPARM_SCOTCH_MT
Definition: api.h:54
@ IPARM_AMALGAMATION_LVLBLAS
Definition: api.h:74
@ IPARM_FLOAT
Definition: api.h:149
@ IPARM_SPLITTING_PROJECTIONS_DISTANCE
Definition: api.h:84
@ IPARM_ORDERING
Definition: api.h:50
@ IPARM_ORDERING_DEFAULT
Definition: api.h:51
@ IPARM_GMRES_IM
Definition: api.h:114
@ IPARM_METIS_COMPRESS
Definition: api.h:67
@ IPARM_GPU_MEMORY_PERCENTAGE
Definition: api.h:124
@ IPARM_SCOTCH_SWITCH_LEVEL
Definition: api.h:55
@ IPARM_ITERMAX
Definition: api.h:113
@ IPARM_METIS_DBGLVL
Definition: api.h:71
@ IPARM_NNZEROS_BLOCK_LOCAL
Definition: api.h:41
@ IPARM_VERBOSE
Definition: api.h:36
@ IPARM_METIS_RTYPE
Definition: api.h:62
@ IPARM_REORDERING_STOP
Definition: api.h:79
@ IPARM_FTZ
Definition: api.h:140
@ IPARM_COMPRESS_ORTHO
Definition: api.h:133
@ IPARM_METIS_PFACTOR
Definition: api.h:69
@ IPARM_COMPRESS_RELTOL
Definition: api.h:134
@ IPARM_AUTOSPLIT_COMM
Definition: api.h:120
@ IPARM_ALLOCATED_TERMS
Definition: api.h:42
@ IPARM_SCOTCH_CMIN
Definition: api.h:56
@ IPARM_NBITER
Definition: api.h:112
@ IPARM_MAX_BLOCKSIZE
Definition: api.h:89
@ IPARM_SPLITTING_LEVELS_PROJECTIONS
Definition: api.h:81
@ IPARM_REORDERING_SPLIT
Definition: api.h:78
@ IPARM_NNZEROS
Definition: api.h:40
@ IPARM_END_TASK
Definition: api.h:148
@ IPARM_SOCKET_NBR
Definition: api.h:119
@ IPARM_METIS_NSEPS
Definition: api.h:64
@ IPARM_AMALGAMATION_LVLCBLK
Definition: api.h:75
@ IPARM_METIS_UFACTOR
Definition: api.h:66
@ IPARM_SPLITTING_STRATEGY
Definition: api.h:80
@ IPARM_ALLCAND
Definition: api.h:92
@ IPARM_SPLITTING_LEVELS_KWAY
Definition: api.h:82
@ IPARM_METIS_CCORDER
Definition: api.h:68
@ IPARM_SPLITTING_PROJECTIONS_WIDTH
Definition: api.h:85
@ IPARM_SPLITTING_PROJECTIONS_DEPTH
Definition: api.h:83
@ IPARM_IO_STRATEGY
Definition: api.h:37
@ IPARM_LEVEL_OF_FILL
Definition: api.h:96
@ IPARM_METIS_CTYPE
Definition: api.h:61
@ IPARM_SCHUR_SOLV_MODE
Definition: api.h:107
@ IPARM_PRODUCE_STATS
Definition: api.h:43
@ IPARM_INCOMPLETE
Definition: api.h:95
@ IPARM_MC64
Definition: api.h:47
@ IPARM_TRACE
Definition: api.h:44
@ IPARM_COMPRESS_PRESELECT
Definition: api.h:135
@ IPARM_GLOBAL_ALLOCATION
Definition: api.h:126
@ IPARM_TRANSPOSE_SOLVE
Definition: api.h:106
@ IPARM_THREAD_NBR
Definition: api.h:118
@ PastixOrderScotch
Definition: api.h:345
@ PastixOrderMetis
Definition: api.h:346
@ PastixNoTrans
Definition: api.h:445
@ PastixMpiNone
Definition: api.h:356
@ PastixMpiThreadSingle
Definition: api.h:357
@ PastixMpiThreadMultiple
Definition: api.h:360
@ PastixMpiThreadFunneled
Definition: api.h:358
@ PastixMpiThreadSerialized
Definition: api.h:359
@ PastixVerboseNot
Definition: api.h:220
@ PastixVerboseNo
Definition: api.h:221
@ PastixSchedDynamic
Definition: api.h:338
@ PastixSchedStarPU
Definition: api.h:337
@ PastixSchedParsec
Definition: api.h:336
@ PastixSplitNot
Definition: api.h:416
@ PastixSplitKway
Definition: api.h:417
@ PastixCompressMethodPQRCP
Definition: api.h:396
@ PastixFactRightLooking
Definition: api.h:327
@ PastixTraceNot
Definition: api.h:210
void graphExit(pastix_graph_t *graph)
Free the content of the graph structure.
Definition: graph.c:73
void pastixOrderExit(pastix_order_t *ordeptr)
Free the arrays initialized in the order structure.
Definition: order.c:273
void pastix_parsec_init(pastix_data_t *pastix, int *argc, char **argv[], const int *bindtab)
Startup the PaRSEC runtime system.
Definition: parsec.c:61
void pastix_parsec_finalize(pastix_data_t *pastix)
Finalize the PaRSEC runtime system.
Definition: parsec.c:178
void pastix_starpu_init(pastix_data_t *pastix, int *argc, char **argv[], const int *bindtab)
Startup the StarPU runtime system.
Definition: starpu.c:92
void pastix_starpu_finalize(pastix_data_t *pastix)
Finalize the StarPU runtime system.
Definition: starpu.c:227
void pastixSymbolExit(symbol_matrix_t *symbptr)
Free the content of symbolic matrix.
Definition: symbol.c:137
int inter_node_procnum
Definition: pastixdata.h:83
char * dir_local
Definition: pastixdata.h:110
PASTIX_Comm inter_node_comm
Definition: pastixdata.h:77
char * dir_global
Definition: pastixdata.h:109
Main PaStiX data structure.
Definition: pastixdata.h:67