22 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 #include "sopalin/sopalin_data.h"
36 struct cl_cblk_zpxtrfsp_args_s {
38 sopalin_data_t *sopalin_data;
42 #if defined(PASTIX_STARPU_PROFILING)
50 starpu_profile_t cblk_zpxtrfsp_profile = {
52 .name =
"cblk_zpxtrfsp"
58 void cblk_zpxtrfsp_profile_register(
void ) __attribute__( ( constructor ) );
60 cblk_zpxtrfsp_profile_register(
void )
62 profiling_register_cl( &cblk_zpxtrfsp_profile );
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 #if defined(PASTIX_STARPU_PROFILING_LOG)
68 cl_profiling_cb_cblk_zpxtrfsp(
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_zpxtrfsp_args_s *args = (
struct cl_cblk_zpxtrfsp_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_zpxtrfsp", M, N, 0, flops, speed );
93 #if defined(PASTIX_STARPU_PROFILING_LOG)
94 static void (*cblk_zpxtrfsp_callback)(
void*) = cl_profiling_cb_cblk_zpxtrfsp;
96 static void (*cblk_zpxtrfsp_callback)(
void*) = cl_profiling_callback;
128 struct starpu_perfmodel_arch *arch,
131 struct cl_cblk_zpxtrfsp_args_s *args = (
struct cl_cblk_zpxtrfsp_args_s *)(task->cl_arg);
139 switch( arch->devices->type ) {
140 case STARPU_CPU_WORKER:
141 coefs1 = &(args->sopalin_data->cpu_models->coefficients[PastixComplex64-2][
PastixKernelPXTRF][0]);
144 case STARPU_CUDA_WORKER:
145 coefs1 = &(args->sopalin_data->gpu_models->coefficients[PastixComplex64-2][
PastixKernelPXTRF][0]);
154 cost = modelsGetCost1Param( coefs1, N );
155 cost += modelsGetCost2Param( coefs2, M, N );
161 #ifndef DOXYGEN_SHOULD_SKIP_THIS
162 static struct starpu_perfmodel starpu_cblk_zpxtrfsp_model = {
163 #if defined( PASTIX_STARPU_COST_PER_ARCH )
164 .type = STARPU_PER_ARCH,
165 .arch_cost_function = cblk_pxtrf_cost,
167 .type = STARPU_HISTORY_BASED,
169 .symbol =
"cblk_zpxtrfsp",
172 #if !defined(PASTIX_STARPU_SIMULATION)
188 fct_cblk_zpxtrfsp_cpu(
void *descr[],
void *cl_arg )
190 struct cl_cblk_zpxtrfsp_args_s *args = (
struct cl_cblk_zpxtrfsp_args_s *)cl_arg;
193 L = pastix_starpu_cblk_get_ptr( descr[0] );
199 CODELETS_CPU( cblk_zpxtrfsp, 1 );
224 struct cl_cblk_zpxtrfsp_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 ) {
242 if ( starpu_mpi_cached_receive( cblk->
handler[0] ) ) {
245 if ( !need_submit ) {
255 cl_arg = malloc(
sizeof(
struct cl_cblk_zpxtrfsp_args_s) );
256 cl_arg->sopalin_data = sopalin_data;
257 #if defined(PASTIX_STARPU_PROFILING)
258 cl_arg->profile_data.measures = cblk_zpxtrfsp_profile.measures;
259 cl_arg->profile_data.flops = NAN;
264 #if defined(PASTIX_DEBUG_STARPU)
266 asprintf( &task_name,
"%s( %ld )",
267 cl_cblk_zpxtrfsp_cpu.name,
268 (
long)(cblk - sopalin_data->solvmtx->cblktab) );
271 pastix_starpu_insert_task(
272 &cl_cblk_zpxtrfsp_cpu,
273 STARPU_CL_ARGS, cl_arg,
sizeof(
struct cl_cblk_zpxtrfsp_args_s ),
274 #
if defined(PASTIX_STARPU_PROFILING)
275 STARPU_CALLBACK_WITH_ARG_NFREE, cblk_zpxtrfsp_callback, cl_arg,
278 #
if defined(PASTIX_DEBUG_STARPU)
279 STARPU_NAME, task_name,
281 #
if defined(PASTIX_STARPU_HETEROPRIO)
282 STARPU_PRIORITY, BucketFacto1D,
284 STARPU_PRIORITY, prio,
int cpucblk_zpxtrfsp1d_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_zpxtrfsp(sopalin_data_t *sopalin_data, SolverCblk *cblk, int prio)
TODO.
static pastix_fixdbl_t fct_cblk_zpxtrfsp_cost(struct starpu_task *task, struct starpu_perfmodel_arch *arch, unsigned nimpl)
Cost model function.
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.