23 #ifndef DOXYGEN_SHOULD_SKIP_THIS
28 #include "sopalin/sopalin_data.h"
37 struct cl_blok_zhetrfsp_args_s {
39 sopalin_data_t *sopalin_data;
50 #if defined(PASTIX_STARPU_PROFILING)
51 starpu_profile_t blok_zhetrfsp_profile = {
53 .name =
"blok_zhetrfsp"
59 void blok_zhetrfsp_profile_register(
void ) __attribute__( ( constructor ) );
61 blok_zhetrfsp_profile_register(
void )
63 profiling_register_cl( &blok_zhetrfsp_profile );
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 #if defined(PASTIX_STARPU_PROFILING_LOG)
69 cl_profiling_cb_blok_zhetrfsp(
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_zhetrfsp_args_s *args = (
struct cl_blok_zhetrfsp_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_zhetrfsp", N, 0, 0, flops, speed );
92 #if defined(PASTIX_STARPU_PROFILING_LOG)
93 static void (*blok_zhetrfsp_callback)(
void*) = cl_profiling_cb_blok_zhetrfsp;
95 static void (*blok_zhetrfsp_callback)(
void*) = cl_profiling_callback;
127 struct starpu_perfmodel_arch *arch,
130 struct cl_blok_zhetrfsp_args_s *args = (
struct cl_blok_zhetrfsp_args_s *)(task->cl_arg);
136 switch( arch->devices->type ) {
137 case STARPU_CPU_WORKER:
138 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixComplex64-2][
PastixKernelHETRF][0]);
140 case STARPU_CUDA_WORKER:
141 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixComplex64-2][
PastixKernelHETRF][0]);
149 cost = modelsGetCost1Param( coefs, N );
155 #ifndef DOXYGEN_SHOULD_SKIP_THIS
156 static struct starpu_perfmodel starpu_blok_zhetrfsp_model = {
157 #if defined(PASTIX_STARPU_COST_PER_ARCH)
158 .type = STARPU_PER_ARCH,
161 .type = STARPU_HISTORY_BASED,
163 .symbol =
"blok_zhetrfsp",
167 #if !defined(PASTIX_STARPU_SIMULATION)
185 struct cl_blok_zhetrfsp_args_s *args = (
struct cl_blok_zhetrfsp_args_s *)cl_arg;
188 L = pastix_starpu_blok_get_ptr( descr[0] );
190 assert( args->cblk->cblktype & CBLK_TASKS_2D );
196 #ifndef DOXYGEN_SHOULD_SKIP_THIS
197 CODELETS_CPU( blok_zhetrfsp, 1 );
222 struct cl_blok_zhetrfsp_args_s *cl_arg = NULL;
224 #if defined(PASTIX_DEBUG_STARPU)
231 #if defined(PASTIX_WITH_MPI)
234 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
243 if ( !need_submit ) {
253 cl_arg = malloc(
sizeof(
struct cl_blok_zhetrfsp_args_s) );
254 cl_arg->sopalin_data = sopalin_data;
255 #if defined(PASTIX_STARPU_PROFILING)
256 cl_arg->profile_data.measures = blok_zhetrfsp_profile.measures;
257 cl_arg->profile_data.flops = NAN;
262 #if defined(PASTIX_DEBUG_STARPU)
264 asprintf( &task_name,
"%s( %ld )",
265 cl_blok_zhetrfsp_cpu.name,
266 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
269 pastix_starpu_insert_task(
270 &cl_blok_zhetrfsp_cpu,
271 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_zhetrfsp_args_s ),
272 #
if defined(PASTIX_STARPU_PROFILING)
273 STARPU_CALLBACK_WITH_ARG_NFREE, blok_zhetrfsp_callback, cl_arg,
276 #
if defined(PASTIX_DEBUG_STARPU)
277 STARPU_NAME, task_name,
279 #
if defined(PASTIX_STARPU_HETEROPRIO)
280 STARPU_PRIORITY, BucketFacto2D,
282 STARPU_PRIORITY, prio,
int cpucblk_zhetrfsp1d_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
static void fct_blok_zhetrfsp_cpu(void *descr[], void *cl_arg)
StarPU CPU implementation.
void starpu_task_blok_zhetrf(sopalin_data_t *sopalin_data, SolverCblk *cblk, int prio)
TODO.
static pastix_fixdbl_t fct_blok_zhetrfsp_cost(struct starpu_task *task, struct starpu_perfmodel_arch *arch, unsigned nimpl)
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.