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