PaStiX Handbook 6.4.0
Loading...
Searching...
No Matches
pastixdata.h
Go to the documentation of this file.
1/**
2 *
3 * @file pastixdata.h
4 *
5 * @copyright 2004-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
6 * Univ. Bordeaux. All rights reserved.
7 *
8 * @version 6.4.0
9 * @author Mathieu Faverge
10 * @author Pierre Ramet
11 * @author Xavier Lacoste
12 * @author Tony Delarue
13 * @author Alycia Lisito
14 * @date 2024-07-05
15 *
16 **/
17#ifndef _pastixdata_h_
18#define _pastixdata_h_
19
20#include "common/isched.h"
21#include "symbol/symbol.h"
22#include "kernels/queue.h"
23
24/*
25 * Steps of the pastix solver
26 */
27#ifndef DOXYGEN_SHOULD_SKIP_THIS
28#define STEP_INIT (1 << 0)
29#define STEP_ORDERING (1 << 1)
30#define STEP_SYMBFACT (1 << 2)
31#define STEP_ANALYSE (1 << 3)
32#define STEP_CSC2BCSC (1 << 4)
33#define STEP_BCSC2CTAB (1 << 5)
34#define STEP_NUMFACT (1 << 6)
35#define STEP_SOLVE (1 << 7)
36#define STEP_REFINE (1 << 8)
37#endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39/*
40 * Scheduler family
41 */
42#ifndef DOXYGEN_SHOULD_SKIP_THIS
43#define PASTIX_SCHED_FAMILY_RUNTIME ((1 << PastixSchedParsec))
44#define PASTIX_SCHED_FAMILY_PTHREAD ((1 << PastixSchedSequential) | (1 << PastixSchedStatic) | (1 << PastixSchedDynamic) | (1 << PastixSchedStarPU))
45
46#define isSchedRuntime( _runtime_ ) ( (1 << (_runtime_)) & PASTIX_SCHED_FAMILY_RUNTIME )
47#define isSchedPthread( _runtime_ ) ( (1 << (_runtime_)) & PASTIX_SCHED_FAMILY_PTHREAD )
48#define isSchedValid( _runtime_, _family_ ) ( (1 << (_runtime_)) & (_family_) )
49
50struct pastix_bcsc_s;
51typedef struct pastix_bcsc_s pastix_bcsc_t;
52
53struct pastix_model_s;
54typedef struct pastix_model_s pastix_model_t;
55#endif /* DOXYGEN_SHOULD_SKIP_THIS */
56
57/**
58 *
59 * @ingroup pastix_users
60 *
61 * @brief Main PaStiX data structure
62 *
63 * This structure holds all informations related to the library and problem
64 * instance. It stores information from one step to another.
65 * @warning This structure should not be modified directly by the user.
66 *
67 */
69 pastix_int_t id; /**< Unique identifier of the pastix instance */
70 pastix_int_t *iparm; /**< Store integer parameters (input/output) */
71 double *dparm; /**< Store floating parameters (input/output) */
72
73 pastix_int_t steps; /**< Bitmask of the steps performed or not */
74 pastix_scheduler_t sched; /**< Indicates the scheduler used for the factorization step */
75
76 PASTIX_Comm pastix_comm; /**< PaStiX MPI communicator used for the ordering step */
77 PASTIX_Comm intra_node_comm; /**< PaStiX intra node MPI communicator used for synchronizations */
78 PASTIX_Comm inter_node_comm; /**< PaStiX inter node MPI communicator used for the factorization */
79 int procnbr; /**< Total number of MPI processes */
80 int procnum; /**< Local MPI rank */
81 int intra_node_procnbr; /**< Number of MPI tasks in intra node communicator */
82 int intra_node_procnum; /**< Local MPI rank in intra node communicator */
83 int inter_node_procnbr; /**< Number of MPI tasks in inter node communicator */
84 int inter_node_procnum; /**< Local MPI rank in inter node communicator */
85
86 isched_t *isched; /**< Internal scheduler structure that is always available */
87 void *parsec; /**< PaRSEC context if available */
88 void *starpu; /**< StarPU context if available */
89
90 const spmatrix_t *csc; /**< Pointer to the user csc structure used as input */
91
92 pastix_graph_t *graph; /**< Symmetrized graph of the problem used within ordering
93 and symbolic factorization steps. */
94 pastix_int_t schur_n; /**< Number of entries for the Schur complement */
95 pastix_int_t *schur_list; /**< List of entries for the schur complement */
96 pastix_int_t zeros_n; /**< Number of diagonal entries considered as zeros */
97 pastix_int_t *zeros_list; /**< List of diagonal entries considered as zeros */
98 pastix_order_t *ordemesh; /**< Ordering structure */
99
100 symbol_matrix_t *symbmtx; /**< Symbol Matrix */
101
102 pastix_bcsc_t *bcsc; /**< Csc after reordering grouped by cblk */
103 SolverMatrix *solvmatr; /**< Solver informations associated to the matrix problem */
104 SolverMatrix *solvloc; /**< Solver informations associated to the matrix problem - Local */
105 SolverMatrix *solvglob; /**< Solver informations associated to the matrix problem - Global */
106
107 pastix_model_t *cpu_models; /**< CPU model coefficients for the kernels */
108 pastix_model_t *gpu_models; /**< GPU model coefficients for the kernels */
109
110 char *dir_global; /**< Unique directory name to store output files */
111 char *dir_local; /**< Unique directory name to store output specific to a MPI process */
112
113 /* Backup for old pastix interface */
114 void *b;
115 void *x0;
116
117 /**
118 * Former fields that are no longer used for now
119 */
120 int *bindtab; /*+ Tabular giving for each thread a CPU to bind it too */
121 void *schur_tab;
122 pastix_int_t schur_tab_set;
123 int cscInternFilled;
124 int scaling; /*+ Indicates if the matrix has been scaled */
125 void *scalerowtab; /*+ Describes how the matrix has been scaled */
126 void *iscalerowtab;
127 void *scalecoltab;
128 void *iscalecoltab;
129#ifdef WITH_SEM_BARRIER
130 sem_t *sem_barrier; /*+ Semaphore used for AUTOSPLIT_COMM barrier */
131#endif
132 pastix_int_t pastix_id; /*+ Id of the pastix instance (PID of first MPI task) */
133};
134
135#ifndef DOXYGEN_SHOULD_SKIP_THIS
136struct bvec_handle_comm_s;
138
139#if defined(PASTIX_WITH_STARPU)
140struct starpu_rhs_desc_s;
142#endif
143#endif /* DOXYGEN_SHOULD_SKIP_THIS */
144/**
145 *
146 * @ingroup pastix_users
147 *
148 * @brief Main PaStiX RHS structure
149 *
150 * This structure holds all informations about a set of permuted
151 * right-hand-sides to be used in the solve/refinement steps.
152 * @warning This structure should not be modified directly by the user.
153 *
154 */
156 int8_t allocated; /**< Flag to know if the vector b is allocated internally or not. */
157 pastix_coeftype_t flttype; /**< Floating type of the vector. */
158 pastix_int_t m; /**< Local number of rows in the right hand sides. */
159 pastix_int_t n; /**< Number of columns in the right hand sides. */
160 pastix_int_t ld; /**< Leading dimension of the right hand side matrix. */
161 void *b; /**< Right hand sides of size ldb-by-n. */
162 void **cblkb; /**< Array to store the temporary buffers associated to fanin/recv. */
163 bvec_handle_comm_t *rhs_comm; /**< Structure which handles the MPI communication (= NULL if PASTIX_WITH_MPI=OFF). */
164 pastix_int_t *Ploc2Pglob; /**< Array containing the local permuted index corresponding to the global permuted index. */
165#if defined(PASTIX_WITH_STARPU)
166 starpu_rhs_desc_t *starpu_desc; /**< StarPU strcuture to store all the rhs data and handles. */
167#endif
168};
169
170#endif /* _pastixdata_h_ */
BEGIN_C_DECLS typedef int pastix_int_t
Definition datatypes.h:51
Structure to manage communications with distributed rhs.
Definition bvec.h:66
Internal column block distributed CSC matrix.
Definition bcsc.h:119
spm_coeftype_t pastix_coeftype_t
Arithmetic types.
Definition api.h:294
enum pastix_scheduler_e pastix_scheduler_t
Scheduler.
Order structure.
Definition order.h:47
StarPU descriptor for the vectors linked to a given sparse matrix.
Symbol matrix structure.
Definition symbol.h:77
PASTIX_Comm pastix_comm
Definition pastixdata.h:76
int inter_node_procnum
Definition pastixdata.h:84
pastix_model_t * cpu_models
Definition pastixdata.h:107
pastix_model_t * gpu_models
Definition pastixdata.h:108
void ** cblkb
Definition pastixdata.h:162
SolverMatrix * solvmatr
Definition pastixdata.h:103
int inter_node_procnbr
Definition pastixdata.h:83
pastix_scheduler_t sched
Definition pastixdata.h:74
void * starpu
Definition pastixdata.h:88
SolverMatrix * solvglob
Definition pastixdata.h:105
void * parsec
Definition pastixdata.h:87
SolverMatrix * solvloc
Definition pastixdata.h:104
pastix_int_t zeros_n
Definition pastixdata.h:96
int intra_node_procnbr
Definition pastixdata.h:81
pastix_int_t * Ploc2Pglob
Definition pastixdata.h:164
pastix_order_t * ordemesh
Definition pastixdata.h:98
pastix_int_t * iparm
Definition pastixdata.h:70
pastix_int_t ld
Definition pastixdata.h:160
char * dir_local
Definition pastixdata.h:111
pastix_int_t id
Definition pastixdata.h:69
double * dparm
Definition pastixdata.h:71
bvec_handle_comm_t * rhs_comm
Definition pastixdata.h:163
const spmatrix_t * csc
Definition pastixdata.h:90
pastix_coeftype_t flttype
Definition pastixdata.h:157
pastix_int_t schur_n
Definition pastixdata.h:94
pastix_graph_t * graph
Definition pastixdata.h:92
pastix_int_t * schur_list
Definition pastixdata.h:95
isched_t * isched
Definition pastixdata.h:86
symbol_matrix_t * symbmtx
Definition pastixdata.h:100
pastix_int_t * zeros_list
Definition pastixdata.h:97
PASTIX_Comm intra_node_comm
Definition pastixdata.h:77
PASTIX_Comm inter_node_comm
Definition pastixdata.h:78
pastix_int_t m
Definition pastixdata.h:158
pastix_bcsc_t * bcsc
Definition pastixdata.h:102
int intra_node_procnum
Definition pastixdata.h:82
char * dir_global
Definition pastixdata.h:110
pastix_int_t steps
Definition pastixdata.h:73
pastix_int_t n
Definition pastixdata.h:159
int8_t allocated
Definition pastixdata.h:156
Main PaStiX data structure.
Definition pastixdata.h:68
Main PaStiX RHS structure.
Definition pastixdata.h:155
Solver column block structure.
Definition solver.h:203