23#ifndef DOXYGEN_SHOULD_SKIP_THIS
28#include "sopalin/sopalin_data.h"
37struct cl_cblk_zgetrfsp_args_s {
39 sopalin_data_t *sopalin_data;
43#if defined(PASTIX_STARPU_PROFILING)
51starpu_profile_t cblk_zgetrfsp_profile = {
53 .name =
"cblk_zgetrfsp"
59void cblk_zgetrfsp_profile_register(
void ) __attribute__( ( constructor ) );
61cblk_zgetrfsp_profile_register(
void )
63 profiling_register_cl( &cblk_zgetrfsp_profile );
66#ifndef DOXYGEN_SHOULD_SKIP_THIS
67#if defined(PASTIX_STARPU_PROFILING_LOG)
69cl_profiling_cb_cblk_zgetrfsp(
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_cblk_zgetrfsp_args_s *args = (
struct cl_cblk_zgetrfsp_args_s *) callback_arg;
83 pastix_fixdbl_t duration = starpu_timing_timespec_delay_us( &info->start_time, &info->end_time );
90 cl_profiling_log_register( task->name,
"cblk_zgetrfsp", M, N, 0, flops, speed );
94#if defined(PASTIX_STARPU_PROFILING_LOG)
95static void (*cblk_zgetrfsp_callback)(
void*) = cl_profiling_cb_cblk_zgetrfsp;
97static void (*cblk_zgetrfsp_callback)(
void*) = cl_profiling_callback;
103#if defined(PASTIX_STARPU_COST_PER_ARCH)
129fct_cblk_zgetrfsp_cost(
struct starpu_task *task,
130 struct starpu_perfmodel_arch *arch,
133 struct cl_cblk_zgetrfsp_args_s *args = (
struct cl_cblk_zgetrfsp_args_s *)(task->cl_arg);
141 switch( arch->devices->type ) {
142 case STARPU_CPU_WORKER:
143 coefs1 = &(args->sopalin_data->cpu_models->coefficients[PastixComplex64-2][
PastixKernelGETRF][0]);
146 case STARPU_CUDA_WORKER:
147 coefs1 = &(args->sopalin_data->gpu_models->coefficients[PastixComplex64-2][
PastixKernelGETRF][0]);
156 cost = modelsGetCost1Param( coefs1, N );
157 cost += modelsGetCost2Param( coefs2, M, N ) * 2.;
164#ifndef DOXYGEN_SHOULD_SKIP_THIS
165static struct starpu_perfmodel starpu_cblk_zgetrfsp_model = {
166#if defined( PASTIX_STARPU_COST_PER_ARCH )
167 .type = STARPU_PER_ARCH,
168 .arch_cost_function = cblk_getrf_cost,
170 .type = STARPU_HISTORY_BASED,
172 .symbol =
"cblk_zgetrfsp",
175#if !defined(PASTIX_STARPU_SIMULATION)
191fct_cblk_zgetrfsp_cpu(
void *descr[],
void *cl_arg )
193 struct cl_cblk_zgetrfsp_args_s *args = (
struct cl_cblk_zgetrfsp_args_s *)cl_arg;
197 L = pastix_starpu_cblk_get_ptr( descr[0] );
198 U = pastix_starpu_cblk_get_ptr( descr[1] );
204CODELETS_CPU( cblk_zgetrfsp, 2 );
229 struct cl_cblk_zgetrfsp_args_s *cl_arg = NULL;
231#if defined(PASTIX_DEBUG_STARPU)
238#if defined(PASTIX_WITH_MPI)
241 if ( cblk->
ownerid == sopalin_data->solvmtx->clustnum ) {
247 if ( starpu_mpi_cached_receive( cblk->
handler[0] ) ) {
250 if ( starpu_mpi_cached_receive( cblk->
handler[1] ) ) {
253 if ( !need_submit ) {
263 cl_arg = malloc(
sizeof(
struct cl_cblk_zgetrfsp_args_s) );
264 cl_arg->sopalin_data = sopalin_data;
265#if defined(PASTIX_STARPU_PROFILING)
266 cl_arg->profile_data.measures = cblk_zgetrfsp_profile.measures;
267 cl_arg->profile_data.flops = NAN;
272#if defined(PASTIX_DEBUG_STARPU)
274 asprintf( &task_name,
"%s( %ld )",
275 cl_cblk_zgetrfsp_cpu.name,
276 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
279 pastix_starpu_insert_task(
280 &cl_cblk_zgetrfsp_cpu,
281 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_cblk_zgetrfsp_args_s ),
282#
if defined(PASTIX_STARPU_PROFILING)
283 STARPU_CALLBACK_WITH_ARG_NFREE, cblk_zgetrfsp_callback, cl_arg,
287#
if defined(PASTIX_DEBUG_STARPU)
288 STARPU_NAME, task_name,
290#
if defined(PASTIX_STARPU_HETEROPRIO)
291 STARPU_PRIORITY, BucketFacto1D,
293 STARPU_PRIORITY, prio,
BEGIN_C_DECLS typedef int pastix_int_t
int cpucblk_zgetrfsp1d_panel(SolverMatrix *solvmtx, SolverCblk *cblk, void *L, void *U)
Compute the LU factorization of one panel.
void starpu_task_cblk_zgetrfsp(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.