Loading...
Searching...
No Matches
sc_hypervisor_monitoring.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2011-2025 University of Bordeaux, CNRS (LaBRI UMR 5800), Inria
* Copyright (C) 2015-2015 Mathieu Lirzin
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef SC_HYPERVISOR_MONITORING_H
#define SC_HYPERVISOR_MONITORING_H
#include <sc_hypervisor.h>
#ifdef __cplusplus
extern "C" {
#endif
struct sc_hypervisor_resize_ack
{
int receiver_sched_ctx;
int *moved_workers;
int nmoved_workers;
int *acked_workers;
};
struct sc_hypervisor_wrapper
{
unsigned sched_ctx;
struct sc_hypervisor_policy_config *config;
double start_time_w[STARPU_NMAXWORKERS];
double current_idle_time[STARPU_NMAXWORKERS];
double idle_time[STARPU_NMAXWORKERS];
double idle_start_time[STARPU_NMAXWORKERS];
double exec_time[STARPU_NMAXWORKERS];
double exec_start_time[STARPU_NMAXWORKERS];
int worker_to_be_removed[STARPU_NMAXWORKERS];
int pushed_tasks[STARPU_NMAXWORKERS];
int poped_tasks[STARPU_NMAXWORKERS];
double total_flops;
double total_elapsed_flops[STARPU_NMAXWORKERS];
double elapsed_flops[STARPU_NMAXWORKERS];
size_t elapsed_data[STARPU_NMAXWORKERS];
int elapsed_tasks[STARPU_NMAXWORKERS];
double ref_speed[2];
double submitted_flops;
double remaining_flops;
double start_time;
double real_start_time;
double hyp_react_start_time;
struct sc_hypervisor_resize_ack resize_ack;
starpu_pthread_mutex_t mutex;
unsigned total_flops_available;
unsigned to_be_sized;
unsigned compute_idle[STARPU_NMAXWORKERS];
unsigned compute_partial_idle[STARPU_NMAXWORKERS];
unsigned consider_max;
};
struct sc_hypervisor_wrapper *sc_hypervisor_get_wrapper(unsigned sched_ctx);
unsigned *sc_hypervisor_get_sched_ctxs(void);
int sc_hypervisor_get_nsched_ctxs(void);
int sc_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_worker_archtype arch);
double sc_hypervisor_get_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w);
double sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w);
double sc_hypervisorsc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch);
double sc_hypervisor_get_speed(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch);
#ifdef __cplusplus
}
#endif
#endif
sc_hypervisor_resize_ack::acked_workers
int * acked_workers
Definition sc_hypervisor_monitoring.h:58
sc_hypervisor_resize_ack::moved_workers
int * moved_workers
Definition sc_hypervisor_monitoring.h:46
sc_hypervisor_resize_ack::nmoved_workers
int nmoved_workers
Definition sc_hypervisor_monitoring.h:51
sc_hypervisor_resize_ack::receiver_sched_ctx
int receiver_sched_ctx
Definition sc_hypervisor_monitoring.h:41
sc_hypervisor_get_sched_ctxs
unsigned * sc_hypervisor_get_sched_ctxs(void)
sc_hypervisor_get_elapsed_flops_per_sched_ctx
double sc_hypervisor_get_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w)
sc_hypervisorsc_hypervisor_get_speed_per_worker_type
double sc_hypervisorsc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch)
sc_hypervisor_get_total_elapsed_flops_per_sched_ctx
double sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w)
sc_hypervisor_get_nworkers_ctx
int sc_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_worker_archtype arch)
sc_hypervisor_get_wrapper
struct sc_hypervisor_wrapper * sc_hypervisor_get_wrapper(unsigned sched_ctx)
sc_hypervisor_get_nsched_ctxs
int sc_hypervisor_get_nsched_ctxs(void)
sc_hypervisor_get_speed
double sc_hypervisor_get_speed(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch)
sc_hypervisor_resize_ack
Definition sc_hypervisor_monitoring.h:37
starpu_worker_archtype
starpu_worker_archtype
Definition starpu_worker.h:66
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition starpu_config.h:305
sc_hypervisor.h
sc_hypervisor_policy_config
Definition sc_hypervisor_config.h:140
sc_hypervisor_wrapper::resize_ack
struct sc_hypervisor_resize_ack resize_ack
Definition sc_hypervisor_monitoring.h:191
sc_hypervisor_wrapper::pushed_tasks
int pushed_tasks[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:119
sc_hypervisor_wrapper::start_time_w
double start_time_w[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:83
sc_hypervisor_wrapper::start_time
double start_time
Definition sc_hypervisor_monitoring.h:173
sc_hypervisor_wrapper::elapsed_data
size_t elapsed_data[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:145
sc_hypervisor_wrapper::compute_partial_idle
unsigned compute_partial_idle[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:220
sc_hypervisor_wrapper::idle_start_time
double idle_start_time[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:98
sc_hypervisor_wrapper::submitted_flops
double submitted_flops
Definition sc_hypervisor_monitoring.h:162
sc_hypervisor_wrapper::elapsed_flops
double elapsed_flops[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:139
sc_hypervisor_wrapper::poped_tasks
int poped_tasks[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:124
sc_hypervisor_wrapper::current_idle_time
double current_idle_time[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:88
sc_hypervisor_wrapper::total_elapsed_flops
double total_elapsed_flops[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:134
sc_hypervisor_wrapper::exec_time
double exec_time[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:103
sc_hypervisor_wrapper::config
struct sc_hypervisor_policy_config * config
Definition sc_hypervisor_monitoring.h:77
sc_hypervisor_wrapper::exec_start_time
double exec_start_time[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:108
sc_hypervisor_wrapper::real_start_time
double real_start_time
Definition sc_hypervisor_monitoring.h:178
sc_hypervisor_wrapper::sched_ctx
unsigned sched_ctx
Definition sc_hypervisor_monitoring.h:72
sc_hypervisor_wrapper::hyp_react_start_time
double hyp_react_start_time
Definition sc_hypervisor_monitoring.h:183
sc_hypervisor_wrapper::elapsed_tasks
int elapsed_tasks[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:150
sc_hypervisor_wrapper::compute_idle
unsigned compute_idle[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:214
sc_hypervisor_wrapper::remaining_flops
double remaining_flops
Definition sc_hypervisor_monitoring.h:168
sc_hypervisor_wrapper::worker_to_be_removed
int worker_to_be_removed[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:114
sc_hypervisor_wrapper::total_flops_available
unsigned total_flops_available
Definition sc_hypervisor_monitoring.h:203
sc_hypervisor_wrapper::mutex
starpu_pthread_mutex_t mutex
Definition sc_hypervisor_monitoring.h:197
sc_hypervisor_wrapper::consider_max
unsigned consider_max
Definition sc_hypervisor_monitoring.h:225
sc_hypervisor_wrapper::total_flops
double total_flops
Definition sc_hypervisor_monitoring.h:129
sc_hypervisor_wrapper::ref_speed
double ref_speed[2]
Definition sc_hypervisor_monitoring.h:157
sc_hypervisor_wrapper::idle_time
double idle_time[STARPU_NMAXWORKERS]
Definition sc_hypervisor_monitoring.h:93
sc_hypervisor_wrapper::to_be_sized
unsigned to_be_sized
Definition sc_hypervisor_monitoring.h:208
sc_hypervisor_wrapper
Definition sc_hypervisor_monitoring.h:68