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)
47#include <starpu_cublas_v2.h>
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
52typedef 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 )
77typedef enum heteroprio_bucket_order_e {
89} heteroprio_bucket_order_t;
148 const int *bindtab );
158#ifndef DOXYGEN_SHOULD_SKIP_THIS
160typedef struct measure_s measure_t;
171struct starpu_profile_s;
172typedef struct starpu_profile_s starpu_profile_t;
177struct starpu_profile_s {
178 starpu_profile_t *next;
180 measure_t measures[STARPU_NMAXWORKERS];
188#if defined( PASTIX_STARPU_PROFILING )
194#if defined( PASTIX_STARPU_PROFILING )
195void cl_profiling_callback(
void *callback_arg );
196void profiling_register_cl( starpu_profile_t *codelet );
209#if defined( PASTIX_STARPU_PROFILING_LOG )
210void profiling_log_init(
const char* dirname );
211void cl_profiling_log_register(
const char *task_name,
const char* cl_name,
212 int m,
int n,
int k,
double flops,
double speed );
214void profiling_log_fini();
216#ifndef DOXYGEN_SHOULD_SKIP_THIS
217static inline void profiling_log_init(
const char* dirname ) {
220static inline void profiling_log_fini() {}
224#ifndef DOXYGEN_SHOULD_SKIP_THIS
225#ifdef PASTIX_STARPU_STATS
227print_stats(
double sub,
double com, __attribute__((unused))
SolverMatrix *solvmtx )
230 MPI_Comm_rank( solvmtx->solv_comm, &src );
231 fprintf( stderr,
" Time to submit tasks on node %d %e s\n", src, clockVal( sub ) );
232 fprintf( stderr,
" Time to execute tasks on node %d %e s\n", src, clockVal( com ) );
233 fprintf( stderr,
" Total time on node %d %e s\n", src, clockVal( sub ) + clockVal( com ) );
246#define PASTIX_STARPU_INTERFACE_ID pastix_starpu_interface_ops.interfaceid
252 enum starpu_data_interface_id
id;
261#ifndef DOXYGEN_SHOULD_SKIP_THIS
263pastix_starpu_cblk_get_ptr(
void *interf ) {
268pastix_starpu_blok_get_ptr(
void *interf ) {
297void pastix_starpu_register_ws( starpu_data_handle_t *handleptr,
301void 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_data_handle_t * handletab
starpu_cblk_t * cblktab_handle
enum starpu_data_interface_id id
pastix_coeftype_t flttype
struct starpu_codelet cl_rhs_init_cpu
Main structure for all tasks of rhs_init type.
void starpu_sparse_matrix_getoncpu(starpu_sparse_matrix_desc_t *desc)
Submit asynchronous calls to retrieve the data on main memory.
void starpu_rhs_getoncpu(starpu_rhs_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 starpu_rhs_init(SolverMatrix *solvmtx, pastix_rhs_t rhsb, int typesze, int nodes, int myrank)
Generate the StarPU descriptor of the dense matrix.
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.
struct starpu_rhs_desc_s starpu_rhs_desc_t
StarPU descriptor for the vectors linked to a given sparse matrix.
void pastix_starpu_interface_fini()
Finalize the interface and reset the ID.
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.
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.
int pastix_starpu_tag_init(pastix_data_t *pastix)
Initialize the StarPU tags manager.
void starpu_rhs_destroy(starpu_rhs_desc_t *desc)
Free the StarPU descriptor of the dense matrix.
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.
Main PaStiX RHS structure.
Solver column block structure.
Solver column block structure.