23 #ifndef DOXYGEN_SHOULD_SKIP_THIS
28 #include "sopalin/sopalin_data.h"
37 struct cl_blok_sgetrfsp_args_s {
39 sopalin_data_t *sopalin_data;
43 #if defined(PASTIX_STARPU_PROFILING)
51 starpu_profile_t blok_sgetrfsp_profile = {
53 .name =
"blok_sgetrfsp"
59 void blok_sgetrfsp_profile_register(
void ) __attribute__( ( constructor ) );
61 blok_sgetrfsp_profile_register(
void )
63 profiling_register_cl( &blok_sgetrfsp_profile );
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 #if defined(PASTIX_STARPU_PROFILING_LOG)
69 cl_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)
93 static void (*blok_sgetrfsp_callback)(
void*) = cl_profiling_cb_blok_sgetrfsp;
95 static void (*blok_sgetrfsp_callback)(
void*) = cl_profiling_callback;
127 struct starpu_perfmodel_arch *arch,
130 struct cl_blok_sgetrfsp_args_s *args = (
struct cl_blok_sgetrfsp_args_s *)(task->cl_arg);
136 switch( arch->devices->type ) {
137 case STARPU_CPU_WORKER:
138 coefs = &(args->sopalin_data->cpu_models->coefficients[PastixFloat-2][
PastixKernelGETRF][0]);
140 case STARPU_CUDA_WORKER:
141 coefs = &(args->sopalin_data->gpu_models->coefficients[PastixFloat-2][
PastixKernelGETRF][0]);
149 cost = modelsGetCost1Param( coefs, N );
155 #ifndef DOXYGEN_SHOULD_SKIP_THIS
156 static struct starpu_perfmodel starpu_blok_sgetrfsp_model = {
157 #if defined(PASTIX_STARPU_COST_PER_ARCH)
158 .type = STARPU_PER_ARCH,
161 .type = STARPU_HISTORY_BASED,
163 .symbol =
"blok_sgetrfsp",
168 #if !defined(PASTIX_STARPU_SIMULATION)
186 struct cl_blok_sgetrfsp_args_s *args = (
struct cl_blok_sgetrfsp_args_s *)cl_arg;
189 L = pastix_starpu_blok_get_ptr( descr[0] );
190 U = pastix_starpu_blok_get_ptr( descr[1] );
192 assert( args->cblk->cblktype & CBLK_TASKS_2D );
198 #ifndef DOXYGEN_SHOULD_SKIP_THIS
199 CODELETS_CPU( blok_sgetrfsp, 2 );
224 struct cl_blok_sgetrfsp_args_s *cl_arg = NULL;
226 #if defined(PASTIX_DEBUG_STARPU)
233 #if defined(PASTIX_WITH_MPI)
236 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
248 if ( !need_submit ) {
258 cl_arg = malloc(
sizeof(
struct cl_blok_sgetrfsp_args_s) );
259 cl_arg->sopalin_data = sopalin_data;
260 #if defined(PASTIX_STARPU_PROFILING)
261 cl_arg->profile_data.measures = blok_sgetrfsp_profile.measures;
262 cl_arg->profile_data.flops = NAN;
267 #if defined(PASTIX_DEBUG_STARPU)
269 asprintf( &task_name,
"%s( %ld )",
270 cl_blok_sgetrfsp_cpu.name,
271 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
274 pastix_starpu_insert_task(
275 &cl_blok_sgetrfsp_cpu,
276 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_blok_sgetrfsp_args_s ),
277 #
if defined(PASTIX_STARPU_PROFILING)
278 STARPU_CALLBACK_WITH_ARG_NFREE, blok_sgetrfsp_callback, cl_arg,
282 #
if defined(PASTIX_DEBUG_STARPU)
283 STARPU_NAME, task_name,
285 #
if defined(PASTIX_STARPU_HETEROPRIO)
286 STARPU_PRIORITY, BucketFacto2D,
288 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 pastix_fixdbl_t fct_blok_sgetrfsp_cost(struct starpu_task *task, struct starpu_perfmodel_arch *arch, unsigned nimpl)
Cost model function.
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.