23#include <starpu_data.h>
77 int home_node = STARPU_MAIN_RAM;
78 uintptr_t ptr = (uintptr_t)A;
79 int64_t tag_cblk = -1;
81 if ( cblk->
cblktype & ( CBLK_FANIN | CBLK_RECV ) ) {
91 starpu_matrix_data_register( handleptr, home_node, ptr, lda, m, n, typesize );
93#if defined(PASTIX_WITH_MPI)
95 starpu_data_set_reduction_methods( *handleptr, NULL, &
cl_rhs_init_cpu );
97 starpu_mpi_data_register( *handleptr, tag_cblk, clustnum );
101 starpu_data_set_reduction_methods( *handleptr, NULL, &
cl_rhs_init_cpu );
107 starpu_mpi_data_register( *handleptr, tag_cblk, cblk->
ownerid );
111#if defined(PASTIX_DEBUG_STARPU)
112 fprintf( stderr,
"[%2d][pastix][%s] Solve cblk=%d, owner=%d, tag=%ld, size=%ld\n",
114 n *
cblk_colnbr( cblk ) * pastix_size_of( solvmtx->flttype ) );
158 starpu_data_handle_t *handler;
164 if ( rhsdesc != NULL ) {
165 if ( ( ncol == rhsdesc->
ncol ) &&
177#if defined(PASTIX_WITH_MPI)
183 rhsdesc->
ncol = ncol;
184 rhsdesc->
typesze = pastix_size_of( typesize );
186 rhsdesc->
handletab = malloc( cblknbr *
sizeof(starpu_data_handle_t) );
192 for( cblknum = 0; cblknum < cblknbr; cblknum++, cblk++, handler++ ) {
199 rhsb->starpu_desc = rhsdesc;
219 starpu_data_handle_t *handler = rhsdesc->
handletab;
225 for(cblknum=0; cblknum<cblknbr; cblknum++, cblk++, handler++)
229#if defined(PASTIX_WITH_MPI)
230 starpu_mpi_cache_flush( rhsdesc->
solvmtx->solv_comm, *handler );
233 starpu_data_acquire_cb( *handler, STARPU_R,
234 (
void (*)(
void*))&starpu_data_release,
257 starpu_data_handle_t *handler = rhsdesc->
handletab;
263 for( cblknum = 0; cblknum < cblknbr; cblknum++, cblk++, handler++ ) {
265 starpu_data_unregister( *handler );
BEGIN_C_DECLS typedef int pastix_int_t
starpu_data_handle_t * handletab
struct starpu_codelet cl_rhs_init_cpu
Main structure for all tasks of rhs_init type.
void starpu_rhs_getoncpu(starpu_rhs_desc_t *rhsdesc)
Submit asynchronous calls to retrieve the data on main memory.
int64_t pastix_starpu_tag_book(int64_t nbtags)
Book a range of StarPU unique tags of size nbtags.
void starpu_rhs_init(SolverMatrix *solvmtx, pastix_rhs_t rhsb, int typesize, int nodes, int myrank)
Generate the StarPU descriptor of the dense matrix.
void pastix_starpu_tag_release(int64_t min)
Release the set of tags starting by min.
void starpu_rhs_destroy(starpu_rhs_desc_t *rhsdesc)
Free the StarPU descriptor of the dense matrix.
StarPU descriptor for the vectors linked to a given sparse matrix.
Main PaStiX RHS structure.
pastix_int_t gfanincblknbr
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.
void pastix_starpu_rhs_data_register(starpu_data_handle_t *handleptr, int64_t mpitag, int clustnum, const SolverCblk *cblk, size_t typesize, pastix_int_t m, pastix_int_t n, char *A, pastix_int_t lda)
Generate the StarPU descriptor of the dense matrix.