23#ifndef DOXYGEN_SHOULD_SKIP_THIS
28#include "sopalin/sopalin_data.h"
37struct cl_blok_chetrfsp_args_s {
39 sopalin_data_t *sopalin_data;
50#if defined(PASTIX_STARPU_PROFILING)
51starpu_profile_t blok_chetrfsp_profile = {
53 .name =
"blok_chetrfsp"
59void blok_chetrfsp_profile_register(
void ) __attribute__( ( constructor ) );
61blok_chetrfsp_profile_register(
void )
63 profiling_register_cl( &blok_chetrfsp_profile );
66#ifndef DOXYGEN_SHOULD_SKIP_THIS
67#if defined(PASTIX_STARPU_PROFILING_LOG)
69cl_profiling_cb_blok_chetrfsp(
void *callback_arg )
71 cl_profiling_callback( callback_arg );
73 struct starpu_task *task = starpu_task_get_current();
74 struct starpu_profiling_task_info *info = task->profiling_info;
81 struct cl_blok_chetrfsp_args_s *args = (
struct cl_blok_chetrfsp_args_s *) callback_arg;
83 pastix_fixdbl_t duration = starpu_timing_timespec_delay_us( &info->start_time, &info->end_time );
88 cl_profiling_log_register( task->name,
"blok_chetrfsp", N, 0, 0, flops, speed );
92#if defined(PASTIX_STARPU_PROFILING_LOG)
93static void (*blok_chetrfsp_callback)(
void*) = cl_profiling_cb_blok_chetrfsp;
95static void (*blok_chetrfsp_callback)(
void*) = cl_profiling_callback;
101#if defined(PASTIX_STARPU_COST_PER_ARCH)
127fct_blok_chetrfsp_cost(
struct starpu_task *task,
128 struct starpu_perfmodel_arch *arch,
131 struct cl_blok_chetrfsp_args_s *args = (
struct cl_blok_chetrfsp_args_s *)(task->cl_arg);
137 switch( arch->devices->type ) {
138 case STARPU_CPU_WORKER:
139 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixComplex32-2][
PastixKernelHETRF][0]);
141 case STARPU_CUDA_WORKER:
142 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixComplex32-2][
PastixKernelHETRF][0]);
150 cost = modelsGetCost1Param( coefs, N );
157#ifndef DOXYGEN_SHOULD_SKIP_THIS
158static struct starpu_perfmodel starpu_blok_chetrfsp_model = {
159#if defined(PASTIX_STARPU_COST_PER_ARCH)
160 .type = STARPU_PER_ARCH,
161 .arch_cost_function = fct_blok_chetrfsp_cost,
163 .type = STARPU_HISTORY_BASED,
165 .symbol =
"blok_chetrfsp",
169#if !defined(PASTIX_STARPU_SIMULATION)
187 struct cl_blok_chetrfsp_args_s *args = (
struct cl_blok_chetrfsp_args_s *)cl_arg;
190 L = pastix_starpu_blok_get_ptr( descr[0] );
192 assert( args->cblk->cblktype & CBLK_TASKS_2D );
198#ifndef DOXYGEN_SHOULD_SKIP_THIS
199CODELETS_CPU( blok_chetrfsp, 1 );
224 struct cl_blok_chetrfsp_args_s *cl_arg = NULL;
226#if defined(PASTIX_DEBUG_STARPU)
233#if defined(PASTIX_WITH_MPI)
236 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
245 if ( !need_submit ) {
255 cl_arg = malloc(
sizeof(
struct cl_blok_chetrfsp_args_s) );
256 cl_arg->sopalin_data = sopalin_data;
257#if defined(PASTIX_STARPU_PROFILING)
258 cl_arg->profile_data.measures = blok_chetrfsp_profile.measures;
259 cl_arg->profile_data.flops = NAN;
264#if defined(PASTIX_DEBUG_STARPU)
266 asprintf( &task_name,
"%s( %ld )",
267 cl_blok_chetrfsp_cpu.name,
268 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
271 pastix_starpu_insert_task(
272 &cl_blok_chetrfsp_cpu,
273 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_chetrfsp_args_s ),
274#
if defined(PASTIX_STARPU_PROFILING)
275 STARPU_CALLBACK_WITH_ARG_NFREE, blok_chetrfsp_callback, cl_arg,
278#
if defined(PASTIX_DEBUG_STARPU)
279 STARPU_NAME, task_name,
281#
if defined(PASTIX_STARPU_HETEROPRIO)
282 STARPU_PRIORITY, BucketFacto2D,
284 STARPU_PRIORITY, prio,
int cpucblk_chetrfsp1d_hetrf(SolverMatrix *solvmtx, SolverCblk *cblk, void *dataL)
Computes the LDL^h factorization of the diagonal block in a panel.
BEGIN_C_DECLS typedef int pastix_int_t
void starpu_task_blok_chetrf(sopalin_data_t *sopalin_data, SolverCblk *cblk, int prio)
TODO.
static void fct_blok_chetrfsp_cpu(void *descr[], void *cl_arg)
Functions to profile the codelet.
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.