22 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 #include "sopalin/sopalin_data.h"
36 struct cl_blok_dsytrfsp_args_s {
38 sopalin_data_t *sopalin_data;
42 #if defined(PASTIX_STARPU_PROFILING)
50 starpu_profile_t blok_dsytrfsp_profile = {
52 .name =
"blok_dsytrfsp"
58 void blok_dsytrfsp_profile_register(
void ) __attribute__( ( constructor ) );
60 blok_dsytrfsp_profile_register(
void )
62 profiling_register_cl( &blok_dsytrfsp_profile );
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 #if defined(PASTIX_STARPU_PROFILING_LOG)
68 cl_profiling_cb_blok_dsytrfsp(
void *callback_arg )
70 cl_profiling_callback( callback_arg );
72 struct starpu_task *task = starpu_task_get_current();
73 struct starpu_profiling_task_info *info = task->profiling_info;
80 struct cl_blok_dsytrfsp_args_s *args = (
struct cl_blok_dsytrfsp_args_s *) callback_arg;
82 pastix_fixdbl_t duration = starpu_timing_timespec_delay_us( &info->start_time, &info->end_time );
87 cl_profiling_log_register( task->name,
"blok_dsytrfsp", N, 0, 0, flops, speed );
91 #if defined(PASTIX_STARPU_PROFILING_LOG)
92 static void (*blok_dsytrfsp_callback)(
void*) = cl_profiling_cb_blok_dsytrfsp;
94 static void (*blok_dsytrfsp_callback)(
void*) = cl_profiling_callback;
100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
127 fct_blok_dsytrfsp_cost(
struct starpu_task *task,
128 struct starpu_perfmodel_arch *arch,
131 struct cl_blok_dsytrfsp_args_s *args = (
struct cl_blok_dsytrfsp_args_s *)(task->cl_arg);
137 switch( arch->devices->type ) {
138 case STARPU_CPU_WORKER:
139 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixDouble-2][
PastixKernelSYTRF][0]);
141 case STARPU_CUDA_WORKER:
142 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixDouble-2][
PastixKernelSYTRF][0]);
150 cost = modelsGetCost1Param( coefs, N );
156 static struct starpu_perfmodel starpu_blok_dsytrfsp_model = {
157 #if defined(PASTIX_STARPU_COST_PER_ARCH)
158 .type = STARPU_PER_ARCH,
159 .arch_cost_function = fct_blok_dsytrfsp_cost,
161 .type = STARPU_HISTORY_BASED,
163 .symbol =
"blok_dsytrfsp",
166 #if !defined(PASTIX_STARPU_SIMULATION)
182 fct_blok_dsytrfsp_cpu(
void *descr[],
void *cl_arg )
184 struct cl_blok_dsytrfsp_args_s *args = (
struct cl_blok_dsytrfsp_args_s *)cl_arg;
187 L = pastix_starpu_blok_get_ptr( descr[0] );
189 assert( args->cblk->cblktype & CBLK_TASKS_2D );
195 CODELETS_CPU( blok_dsytrfsp, 1 );
220 struct cl_blok_dsytrfsp_args_s *cl_arg = NULL;
222 #if defined(PASTIX_DEBUG_STARPU)
229 #if defined(PASTIX_WITH_MPI)
232 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
241 if ( !need_submit ) {
251 cl_arg = malloc(
sizeof(
struct cl_blok_dsytrfsp_args_s) );
252 cl_arg->sopalin_data = sopalin_data;
253 #if defined(PASTIX_STARPU_PROFILING)
254 cl_arg->profile_data.measures = blok_dsytrfsp_profile.measures;
255 cl_arg->profile_data.flops = NAN;
260 #if defined(PASTIX_DEBUG_STARPU)
262 asprintf( &task_name,
"%s( %ld )",
263 cl_blok_dsytrfsp_cpu.name,
264 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
267 pastix_starpu_insert_task(
268 &cl_blok_dsytrfsp_cpu,
269 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_dsytrfsp_args_s ),
270 #
if defined(PASTIX_STARPU_PROFILING)
271 STARPU_CALLBACK_WITH_ARG_NFREE, blok_dsytrfsp_callback, cl_arg,
274 #
if defined(PASTIX_DEBUG_STARPU)
275 STARPU_NAME, task_name,
277 #
if defined(PASTIX_STARPU_HETEROPRIO)
278 STARPU_PRIORITY, BucketFacto2D,
280 STARPU_PRIORITY, prio,
BEGIN_C_DECLS typedef int pastix_int_t
int cpucblk_dsytrfsp1d_sytrf(SolverMatrix *solvmtx, SolverCblk *cblk, void *dataL)
Computes the LDL^t factorization of the diagonal block in a panel.
void starpu_task_blok_dsytrf(sopalin_data_t *sopalin_data, SolverCblk *cblk, int prio)
TODO.
Base structure to all codelet arguments that include the profiling data.
static double cost(symbol_cblk_t *cblk)
Computes the cost of a cblk.
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
Solver column block structure.