24#ifndef DOXYGEN_SHOULD_SKIP_THIS
29#include "sopalin/sopalin_data.h"
38struct cl_cblk_ssytrfsp_args_s {
40 sopalin_data_t *sopalin_data;
44#if defined(PASTIX_STARPU_PROFILING)
52starpu_profile_t cblk_ssytrfsp_profile = {
54 .name =
"cblk_ssytrfsp"
60void cblk_ssytrfsp_profile_register(
void ) __attribute__( ( constructor ) );
62cblk_ssytrfsp_profile_register(
void )
64 profiling_register_cl( &cblk_ssytrfsp_profile );
67#ifndef DOXYGEN_SHOULD_SKIP_THIS
68#if defined(PASTIX_STARPU_PROFILING_LOG)
70cl_profiling_cb_cblk_ssytrfsp(
void *callback_arg )
72 cl_profiling_callback( callback_arg );
74 struct starpu_task *task = starpu_task_get_current();
75 struct starpu_profiling_task_info *info = task->profiling_info;
82 struct cl_cblk_ssytrfsp_args_s *args = (
struct cl_cblk_ssytrfsp_args_s *) callback_arg;
84 pastix_fixdbl_t duration = starpu_timing_timespec_delay_us( &info->start_time, &info->end_time );
91 cl_profiling_log_register( task->name,
"cblk_ssytrfsp", M, N, 0, flops, speed );
95#if defined(PASTIX_STARPU_PROFILING_LOG)
96static void (*cblk_ssytrfsp_callback)(
void*) = cl_profiling_cb_cblk_ssytrfsp;
98static void (*cblk_ssytrfsp_callback)(
void*) = cl_profiling_callback;
104#if defined(PASTIX_STARPU_COST_PER_ARCH)
130fct_cblk_ssytrfsp_cost(
struct starpu_task *task,
131 struct starpu_perfmodel_arch *arch,
134 struct cl_cblk_ssytrfsp_args_s *args = (
struct cl_cblk_ssytrfsp_args_s *)(task->cl_arg);
142 switch( arch->devices->type ) {
143 case STARPU_CPU_WORKER:
144 coefs1 = &(args->sopalin_data->cpu_models->coefficients[PastixFloat-2][
PastixKernelSYTRF][0]);
147 case STARPU_CUDA_WORKER:
148 coefs1 = &(args->sopalin_data->gpu_models->coefficients[PastixFloat-2][
PastixKernelSYTRF][0]);
157 cost = modelsGetCost1Param( coefs1, N );
158 cost += modelsGetCost2Param( coefs2, M, N );
165#ifndef DOXYGEN_SHOULD_SKIP_THIS
166static struct starpu_perfmodel starpu_cblk_ssytrfsp_model = {
167#if defined( PASTIX_STARPU_COST_PER_ARCH )
168 .type = STARPU_PER_ARCH,
169 .arch_cost_function = cblk_sytrf_cost,
171 .type = STARPU_HISTORY_BASED,
173 .symbol =
"cblk_ssytrfsp",
176#if !defined(PASTIX_STARPU_SIMULATION)
192fct_cblk_ssytrfsp_cpu(
void *descr[],
void *cl_arg )
194 struct cl_cblk_ssytrfsp_args_s *args = (
struct cl_cblk_ssytrfsp_args_s *)cl_arg;
198 L = pastix_starpu_cblk_get_ptr( descr[0] );
199 DL = pastix_starpu_cblk_get_ptr( descr[1] );
201 if ( (args->cblk->cblktype & CBLK_COMPRESSED) && (DL != NULL) ) {
203 ws += (args->cblk[1].fblokptr - args->cblk[0].fblokptr) *
sizeof(
pastix_lrblock_t );
210CODELETS_CPU( cblk_ssytrfsp, 2 );
235 struct cl_cblk_ssytrfsp_args_s *cl_arg = NULL;
237#if defined(PASTIX_DEBUG_STARPU)
241 starpu_data_handle_t *handler = (starpu_data_handle_t *)( cblk->
handler );
243 pastix_starpu_register_ws( handler + 1, cblk, PastixFloat );
245#if defined(PASTIX_WITH_MPI)
247 int64_t tag_desc = sopalin_data->solvmtx->starpu_desc->mpitag;
248 int64_t tag_cblk = 2 * cblk->
gcblknum + 1;
250 starpu_mpi_data_register( *(handler + 1),
259#if defined(PASTIX_WITH_MPI)
262 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
268 if ( starpu_mpi_cached_receive( cblk->
handler[0] ) ) {
271 if ( !need_submit ) {
281 cl_arg = malloc(
sizeof(
struct cl_cblk_ssytrfsp_args_s) );
282 cl_arg->sopalin_data = sopalin_data;
283#if defined(PASTIX_STARPU_PROFILING)
284 cl_arg->profile_data.measures = cblk_ssytrfsp_profile.measures;
285 cl_arg->profile_data.flops = NAN;
290#if defined(PASTIX_DEBUG_STARPU)
292 asprintf( &task_name,
"%s( %ld )",
293 cl_cblk_ssytrfsp_cpu.name,
294 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
297 pastix_starpu_insert_task(
298 &cl_cblk_ssytrfsp_cpu,
299 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_cblk_ssytrfsp_args_s ),
300#
if defined(PASTIX_STARPU_PROFILING)
301 STARPU_CALLBACK_WITH_ARG_NFREE, cblk_ssytrfsp_callback, cl_arg,
305#
if defined(PASTIX_DEBUG_STARPU)
306 STARPU_NAME, task_name,
308#
if defined(PASTIX_STARPU_HETEROPRIO)
309 STARPU_PRIORITY, BucketFacto1D,
311 STARPU_PRIORITY, prio,
BEGIN_C_DECLS typedef int pastix_int_t
void cpucblk_salloc_lrws(const SolverCblk *cblk, pastix_lrblock_t *lrblok, float *ws)
Initialize lrblock structure from a workspace for all blocks of the cblk associated.
int cpucblk_ssytrfsp1d_panel(SolverMatrix *solvmtx, SolverCblk *cblk, void *L, void *DLt)
Compute the LDL^t factorization of one panel.
The block low-rank structure to hold a matrix in low-rank form.
void starpu_task_cblk_ssytrfsp(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.