22#ifndef DOXYGEN_SHOULD_SKIP_THIS
27#include "sopalin/sopalin_data.h"
36struct cl_blok_ssytrfsp_args_s {
38 sopalin_data_t *sopalin_data;
42#if defined(PASTIX_STARPU_PROFILING)
50starpu_profile_t blok_ssytrfsp_profile = {
52 .name =
"blok_ssytrfsp"
58void blok_ssytrfsp_profile_register(
void ) __attribute__( ( constructor ) );
60blok_ssytrfsp_profile_register(
void )
62 profiling_register_cl( &blok_ssytrfsp_profile );
65#ifndef DOXYGEN_SHOULD_SKIP_THIS
66#if defined(PASTIX_STARPU_PROFILING_LOG)
68cl_profiling_cb_blok_ssytrfsp(
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_ssytrfsp_args_s *args = (
struct cl_blok_ssytrfsp_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_ssytrfsp", N, 0, 0, flops, speed );
91#if defined(PASTIX_STARPU_PROFILING_LOG)
92static void (*blok_ssytrfsp_callback)(
void*) = cl_profiling_cb_blok_ssytrfsp;
94static void (*blok_ssytrfsp_callback)(
void*) = cl_profiling_callback;
100#ifndef DOXYGEN_SHOULD_SKIP_THIS
102#if defined(PASTIX_STARPU_COST_PER_ARCH)
128fct_blok_ssytrfsp_cost(
struct starpu_task *task,
129 struct starpu_perfmodel_arch *arch,
132 struct cl_blok_ssytrfsp_args_s *args = (
struct cl_blok_ssytrfsp_args_s *)(task->cl_arg);
138 switch( arch->devices->type ) {
139 case STARPU_CPU_WORKER:
140 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixFloat-2][
PastixKernelSYTRF][0]);
142 case STARPU_CUDA_WORKER:
143 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixFloat-2][
PastixKernelSYTRF][0]);
151 cost = modelsGetCost1Param( coefs, N );
158static struct starpu_perfmodel starpu_blok_ssytrfsp_model = {
159#if defined(PASTIX_STARPU_COST_PER_ARCH)
160 .type = STARPU_PER_ARCH,
161 .arch_cost_function = fct_blok_ssytrfsp_cost,
163 .type = STARPU_HISTORY_BASED,
165 .symbol =
"blok_ssytrfsp",
168#if !defined(PASTIX_STARPU_SIMULATION)
184fct_blok_ssytrfsp_cpu(
void *descr[],
void *cl_arg )
186 struct cl_blok_ssytrfsp_args_s *args = (
struct cl_blok_ssytrfsp_args_s *)cl_arg;
189 L = pastix_starpu_blok_get_ptr( descr[0] );
191 assert( args->cblk->cblktype & CBLK_TASKS_2D );
197CODELETS_CPU( blok_ssytrfsp, 1 );
222 struct cl_blok_ssytrfsp_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_ssytrfsp_args_s) );
254 cl_arg->sopalin_data = sopalin_data;
255#if defined(PASTIX_STARPU_PROFILING)
256 cl_arg->profile_data.measures = blok_ssytrfsp_profile.measures;
257 cl_arg->profile_data.flops = NAN;
262#if defined(PASTIX_DEBUG_STARPU)
264 asprintf( &task_name,
"%s( %ld )",
265 cl_blok_ssytrfsp_cpu.name,
266 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
269 pastix_starpu_insert_task(
270 &cl_blok_ssytrfsp_cpu,
271 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_ssytrfsp_args_s ),
272#
if defined(PASTIX_STARPU_PROFILING)
273 STARPU_CALLBACK_WITH_ARG_NFREE, blok_ssytrfsp_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,
BEGIN_C_DECLS typedef int pastix_int_t
int cpucblk_ssytrfsp1d_sytrf(SolverMatrix *solvmtx, SolverCblk *cblk, void *dataL)
Computes the LDL^t factorization of the diagonal block in a panel.
void starpu_task_blok_ssytrf(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.