23#ifndef DOXYGEN_SHOULD_SKIP_THIS
28#include "sopalin/sopalin_data.h"
37struct cl_blok_sgetrfsp_args_s {
39 sopalin_data_t *sopalin_data;
43#if defined(PASTIX_STARPU_PROFILING)
51starpu_profile_t blok_sgetrfsp_profile = {
53 .name =
"blok_sgetrfsp"
59void blok_sgetrfsp_profile_register(
void ) __attribute__( ( constructor ) );
61blok_sgetrfsp_profile_register(
void )
63 profiling_register_cl( &blok_sgetrfsp_profile );
66#ifndef DOXYGEN_SHOULD_SKIP_THIS
67#if defined(PASTIX_STARPU_PROFILING_LOG)
69cl_profiling_cb_blok_sgetrfsp(
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_sgetrfsp_args_s *args = (
struct cl_blok_sgetrfsp_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_sgetrfsp", N, 0, 0, flops, speed );
92#if defined(PASTIX_STARPU_PROFILING_LOG)
93static void (*blok_sgetrfsp_callback)(
void*) = cl_profiling_cb_blok_sgetrfsp;
95static void (*blok_sgetrfsp_callback)(
void*) = cl_profiling_callback;
101#if defined(PASTIX_STARPU_COST_PER_ARCH)
127fct_blok_sgetrfsp_cost(
struct starpu_task *task,
128 struct starpu_perfmodel_arch *arch,
131 struct cl_blok_sgetrfsp_args_s *args = (
struct cl_blok_sgetrfsp_args_s *)(task->cl_arg);
137 switch( arch->devices->type ) {
138 case STARPU_CPU_WORKER:
139 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixFloat-2][
PastixKernelGETRF][0]);
141 case STARPU_CUDA_WORKER:
142 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixFloat-2][
PastixKernelGETRF][0]);
150 cost = modelsGetCost1Param( coefs, N );
157#ifndef DOXYGEN_SHOULD_SKIP_THIS
158static struct starpu_perfmodel starpu_blok_sgetrfsp_model = {
159#if defined(PASTIX_STARPU_COST_PER_ARCH)
160 .type = STARPU_PER_ARCH,
161 .arch_cost_function = fct_blok_sgetrfsp_cost,
163 .type = STARPU_HISTORY_BASED,
165 .symbol =
"blok_sgetrfsp",
170#if !defined(PASTIX_STARPU_SIMULATION)
188 struct cl_blok_sgetrfsp_args_s *args = (
struct cl_blok_sgetrfsp_args_s *)cl_arg;
191 L = pastix_starpu_blok_get_ptr( descr[0] );
192 U = pastix_starpu_blok_get_ptr( descr[1] );
194 assert( args->cblk->cblktype & CBLK_TASKS_2D );
200#ifndef DOXYGEN_SHOULD_SKIP_THIS
201CODELETS_CPU( blok_sgetrfsp, 2 );
226 struct cl_blok_sgetrfsp_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 ) {
250 if ( !need_submit ) {
260 cl_arg = malloc(
sizeof(
struct cl_blok_sgetrfsp_args_s) );
261 cl_arg->sopalin_data = sopalin_data;
262#if defined(PASTIX_STARPU_PROFILING)
263 cl_arg->profile_data.measures = blok_sgetrfsp_profile.measures;
264 cl_arg->profile_data.flops = NAN;
269#if defined(PASTIX_DEBUG_STARPU)
271 asprintf( &task_name,
"%s( %ld )",
272 cl_blok_sgetrfsp_cpu.name,
273 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
276 pastix_starpu_insert_task(
277 &cl_blok_sgetrfsp_cpu,
278 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_sgetrfsp_args_s ),
279#
if defined(PASTIX_STARPU_PROFILING)
280 STARPU_CALLBACK_WITH_ARG_NFREE, blok_sgetrfsp_callback, cl_arg,
284#
if defined(PASTIX_DEBUG_STARPU)
285 STARPU_NAME, task_name,
287#
if defined(PASTIX_STARPU_HETEROPRIO)
288 STARPU_PRIORITY, BucketFacto2D,
290 STARPU_PRIORITY, prio,
BEGIN_C_DECLS typedef int pastix_int_t
int cpucblk_sgetrfsp1d_getrf(SolverMatrix *solvmtx, SolverCblk *cblk, void *dataL, void *dataU)
Compute the LU factorization of the diagonal block in a panel.
static void fct_blok_sgetrfsp_cpu(void *descr[], void *cl_arg)
StarPU CPU implementation.
void starpu_task_blok_sgetrf(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.