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