25 #ifndef _pastix_starpu_h_
26 #define _pastix_starpu_h_
31 #if defined(PASTIX_WITH_MPI)
32 #include <starpu_mpi.h>
37 #include <starpu_profiling.h>
39 #if defined(PASTIX_WITH_CUDA) && !defined(PASTIX_STARPU_SIMULATION)
40 #include <starpu_scheduler.h>
41 #include <starpu_cuda.h>
44 #include <starpu_cublas.h>
45 #if defined(PASTIX_WITH_CUBLAS_V2)
46 #include <cublas_v2.h>
47 #include <starpu_cublas_v2.h>
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 typedef struct starpu_conf starpu_conf_t;
54 #if defined(PASTIX_WITH_MPI)
56 #if defined(PASTIX_STARPU_SYNC)
57 #define pastix_starpu_insert_task( _codelet_, ... ) \
58 starpu_mpi_insert_task( sopalin_data->solvmtx->solv_comm, _codelet_, STARPU_TASK_SYNCHRONOUS, 1, ##__VA_ARGS__ )
60 #define pastix_starpu_insert_task( _codelet_, ... ) \
61 starpu_mpi_insert_task( sopalin_data->solvmtx->solv_comm, _codelet_, ##__VA_ARGS__ )
66 #if defined(PASTIX_STARPU_SYNC)
67 #define pastix_starpu_insert_task( _codelet_, ... ) \
68 starpu_insert_task( _codelet_, STARPU_TASK_SYNCHRONOUS, 1, ##__VA_ARGS__ )
70 #define pastix_starpu_insert_task( _codelet_, ... ) \
71 starpu_insert_task( _codelet_, ##__VA_ARGS__ )
76 #if defined( PASTIX_STARPU_HETEROPRIO )
77 typedef enum heteroprio_bucket_order_e {
89 } heteroprio_bucket_order_t;
136 int typesze,
int nodes,
int myrank );
142 int *argc,
char **argv[],
143 const int *bindtab );
153 #ifndef DOXYGEN_SHOULD_SKIP_THIS
155 typedef struct measure_s measure_t;
166 struct starpu_profile_s;
167 typedef struct starpu_profile_s starpu_profile_t;
172 struct starpu_profile_s {
173 starpu_profile_t *next;
175 measure_t measures[STARPU_NMAXWORKERS];
183 #if defined( PASTIX_STARPU_PROFILING )
189 #if defined( PASTIX_STARPU_PROFILING )
190 void cl_profiling_callback(
void *callback_arg );
191 void profiling_register_cl( starpu_profile_t *codelet );
204 #if defined( PASTIX_STARPU_PROFILING_LOG )
205 void profiling_log_init(
const char* dirname );
206 void cl_profiling_log_register(
const char *task_name,
const char* cl_name,
207 int m,
int n,
int k,
double flops,
double speed );
209 void profiling_log_fini();
211 #ifndef DOXYGEN_SHOULD_SKIP_THIS
212 static inline void profiling_log_init(
const char* dirname ) {
215 static inline void profiling_log_fini() {}
219 #ifndef DOXYGEN_SHOULD_SKIP_THIS
220 #ifdef PASTIX_STARPU_STATS
222 print_stats(
double sub,
double com, __attribute__((unused))
SolverMatrix *solvmtx )
225 MPI_Comm_rank( solvmtx->solv_comm, &src );
226 fprintf( stderr,
" Time to submit tasks on node %d %e s\n", src, clockVal( sub ) );
227 fprintf( stderr,
" Time to execute tasks on node %d %e s\n", src, clockVal( com ) );
228 fprintf( stderr,
" Total time on node %d %e s\n", src, clockVal( sub ) + clockVal( com ) );
241 #define PASTIX_STARPU_INTERFACE_ID pastix_starpu_interface_ops.interfaceid
247 enum starpu_data_interface_id
id;
256 #ifndef DOXYGEN_SHOULD_SKIP_THIS
258 pastix_starpu_cblk_get_ptr(
void *interf ) {
263 pastix_starpu_blok_get_ptr(
void *interf ) {
292 void pastix_starpu_register_ws( starpu_data_handle_t *handleptr,
296 void pastix_starpu_register_blok( starpu_data_handle_t *handleptr,
BEGIN_C_DECLS typedef int pastix_int_t
spm_coeftype_t pastix_coeftype_t
Arithmetic types.
spm_mtxtype_t pastix_mtxtype_t
Matrix symmetry type property.
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.
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
starpu_data_handle_t * handletab
starpu_cblk_t * cblktab_handle
starpu_data_handle_t * handletab
enum starpu_data_interface_id id
pastix_coeftype_t flttype
void starpu_dense_matrix_init(SolverMatrix *solvmtx, pastix_int_t ncol, char *A, pastix_int_t lda, int typesze, int nodes, int myrank)
Generate the StarPU descriptor of the dense matrix.
void starpu_sparse_matrix_getoncpu(starpu_sparse_matrix_desc_t *desc)
Submit asynchronous calls to retrieve the data on main memory.
struct starpu_cblk_s starpu_cblk_t
Additional StarPU handlers for a column-block when using 2D kernels.
int64_t pastix_starpu_tag_book(int64_t nbtags)
Book a range of StarPU unique tags of size nbtags.
struct starpu_data_interface_ops pastix_starpu_interface_ops
StarPU Interface to handle cblks and bloks.
struct starpu_codelet cl_fanin_init_cpu
Main structure for all tasks of fanin_init type.
void pastix_starpu_interface_init()
Initialize the interface ID.
void starpu_sparse_matrix_init(SolverMatrix *solvmtx, pastix_mtxtype_t mtxtype, int nodes, int myrank, pastix_coeftype_t flttype)
Generate the StarPU descriptor of the sparse matrix.
void pastix_starpu_init(pastix_data_t *pastix, int *argc, char **argv[], const int *bindtab)
Startup the StarPU runtime system.
void pastix_starpu_tag_release(int64_t min)
Release the set of tags starting by min.
void pastix_starpu_interface_fini()
Finalize the interface and reset the ID.
void starpu_dense_matrix_destroy(starpu_dense_matrix_desc_t *desc)
Free the StarPU descriptor of the dense matrix.
struct profile_data_s profile_data_t
Base structure to all codelet arguments that include the profiling data.
void pastix_starpu_finalize(pastix_data_t *pastix)
Finalize the StarPU runtime system.
void starpu_sparse_cblk_wont_use(pastix_coefside_t coef, SolverCblk *cblk)
Submit asynchronous calls to retrieve the data on main memory.
void starpu_dense_matrix_getoncpu(starpu_dense_matrix_desc_t *desc)
Submit asynchronous calls to retrieve the data on main memory.
struct pastix_starpu_interface_s pastix_starpu_interface_t
Interface data structure to register the pieces of data in StarPU.
struct starpu_sparse_matrix_desc_s starpu_sparse_matrix_desc_t
StarPU descriptor stucture for the sparse matrix.
struct starpu_dense_matrix_desc_s starpu_dense_matrix_desc_t
StarPU descriptor for the vectors linked to a given sparse matrix.
int pastix_starpu_tag_init(pastix_data_t *pastix)
Initialize the StarPU tags manager.
void pastix_starpu_register(starpu_data_handle_t *handleptr, const SolverCblk *cblk, pastix_coefside_t side, pastix_coeftype_t flttype)
Register a cblk at the StarPU level.
static void profiling_display_allinfo()
Displays all profiling data collected into all measurements tables of the profile_list.
void starpu_sparse_matrix_destroy(starpu_sparse_matrix_desc_t *desc)
Free the StarPU descriptor of the sparse matrix.
Interface data structure to register the pieces of data in StarPU.
Base structure to all codelet arguments that include the profiling data.
Additional StarPU handlers for a column-block when using 2D kernels.
StarPU descriptor for the vectors linked to a given sparse matrix.
StarPU descriptor stucture for the sparse matrix.
Main PaStiX data structure.
Solver column block structure.
Solver column block structure.