22#ifndef DOXYGEN_SHOULD_SKIP_THIS
27#include "sopalin/sopalin_data.h"
36struct cl_cblk_cpxtrfsp_args_s {
38 sopalin_data_t *sopalin_data;
42#if defined(PASTIX_STARPU_PROFILING)
50starpu_profile_t cblk_cpxtrfsp_profile = {
52 .name =
"cblk_cpxtrfsp"
58void cblk_cpxtrfsp_profile_register(
void ) __attribute__( ( constructor ) );
60cblk_cpxtrfsp_profile_register(
void )
62 profiling_register_cl( &cblk_cpxtrfsp_profile );
65#ifndef DOXYGEN_SHOULD_SKIP_THIS
66#if defined(PASTIX_STARPU_PROFILING_LOG)
68cl_profiling_cb_cblk_cpxtrfsp(
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_cblk_cpxtrfsp_args_s *args = (
struct cl_cblk_cpxtrfsp_args_s *) callback_arg;
82 pastix_fixdbl_t duration = starpu_timing_timespec_delay_us( &info->start_time, &info->end_time );
89 cl_profiling_log_register( task->name,
"cblk_cpxtrfsp", M, N, 0, flops, speed );
93#if defined(PASTIX_STARPU_PROFILING_LOG)
94static void (*cblk_cpxtrfsp_callback)(
void*) = cl_profiling_cb_cblk_cpxtrfsp;
96static void (*cblk_cpxtrfsp_callback)(
void*) = cl_profiling_callback;
102#if defined(PASTIX_STARPU_COST_PER_ARCH)
128fct_cblk_cpxtrfsp_cost(
struct starpu_task *task,
129 struct starpu_perfmodel_arch *arch,
132 struct cl_cblk_cpxtrfsp_args_s *args = (
struct cl_cblk_cpxtrfsp_args_s *)(task->cl_arg);
140 switch( arch->devices->type ) {
141 case STARPU_CPU_WORKER:
142 coefs1 = &(args->sopalin_data->cpu_models->coefficients[PastixComplex32-2][
PastixKernelPXTRF][0]);
145 case STARPU_CUDA_WORKER:
146 coefs1 = &(args->sopalin_data->gpu_models->coefficients[PastixComplex32-2][
PastixKernelPXTRF][0]);
155 cost = modelsGetCost1Param( coefs1, N );
156 cost += modelsGetCost2Param( coefs2, M, N );
163#ifndef DOXYGEN_SHOULD_SKIP_THIS
164static struct starpu_perfmodel starpu_cblk_cpxtrfsp_model = {
165#if defined( PASTIX_STARPU_COST_PER_ARCH )
166 .type = STARPU_PER_ARCH,
167 .arch_cost_function = cblk_pxtrf_cost,
169 .type = STARPU_HISTORY_BASED,
171 .symbol =
"cblk_cpxtrfsp",
174#if !defined(PASTIX_STARPU_SIMULATION)
190fct_cblk_cpxtrfsp_cpu(
void *descr[],
void *cl_arg )
192 struct cl_cblk_cpxtrfsp_args_s *args = (
struct cl_cblk_cpxtrfsp_args_s *)cl_arg;
195 L = pastix_starpu_cblk_get_ptr( descr[0] );
201CODELETS_CPU( cblk_cpxtrfsp, 1 );
226 struct cl_cblk_cpxtrfsp_args_s *cl_arg = NULL;
228#if defined(PASTIX_DEBUG_STARPU)
235#if defined(PASTIX_WITH_MPI)
238 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
244 if ( starpu_mpi_cached_receive( cblk->
handler[0] ) ) {
247 if ( !need_submit ) {
257 cl_arg = malloc(
sizeof(
struct cl_cblk_cpxtrfsp_args_s) );
258 cl_arg->sopalin_data = sopalin_data;
259#if defined(PASTIX_STARPU_PROFILING)
260 cl_arg->profile_data.measures = cblk_cpxtrfsp_profile.measures;
261 cl_arg->profile_data.flops = NAN;
266#if defined(PASTIX_DEBUG_STARPU)
268 asprintf( &task_name,
"%s( %ld )",
269 cl_cblk_cpxtrfsp_cpu.name,
270 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
273 pastix_starpu_insert_task(
274 &cl_cblk_cpxtrfsp_cpu,
275 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_cblk_cpxtrfsp_args_s ),
276#
if defined(PASTIX_STARPU_PROFILING)
277 STARPU_CALLBACK_WITH_ARG_NFREE, cblk_cpxtrfsp_callback, cl_arg,
280#
if defined(PASTIX_DEBUG_STARPU)
281 STARPU_NAME, task_name,
283#
if defined(PASTIX_STARPU_HETEROPRIO)
284 STARPU_PRIORITY, BucketFacto1D,
286 STARPU_PRIORITY, prio,
int cpucblk_cpxtrfsp1d_panel(SolverMatrix *solvmtx, SolverCblk *cblk, void *L)
Compute the LL^t factorization of one panel.
BEGIN_C_DECLS typedef int pastix_int_t
void starpu_task_cblk_cpxtrfsp(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.