X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/80ec0e024974a5a921076e3a835b692733247177..60059959d6d517261ca7f4176b0267bc37caf04d:/src/simix/smx_private.h diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index 1cb5514f45..e6f00601ba 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -22,17 +22,18 @@ #include "smx_host_private.h" #include "smx_io_private.h" #include "smx_network_private.h" -#include "smx_smurf_private.h" +#include "popping_private.h" #include "smx_synchro_private.h" -/* ****************************************************************************************** */ -/* TUTORIAL: New API */ -/* ****************************************************************************************** */ -#include "smx_new_api_private.h" /* Define only for SimGrid benchmarking purposes */ -//#define TIME_BENCH_PER_SR /* this aims at measuring the time spent in each scheduling round per each thread. The code is thus run in sequential to bench separately each SSR */ -//#define TIME_BENCH_AMDAHL /* this aims at measuring the porting of time that could be parallelized at maximum (to get the optimal speedup by applying the amdahl law). */ +//#define TIME_BENCH_PER_SR /* this aims at measuring the time spent in each scheduling round per each thread. The code is thus run in sequential to bench separately each SSR */ +//#define TIME_BENCH_AMDAHL /* this aims at measuring the porting of time that could be parallelized at maximum (to get the optimal speedup by applying the amdahl law). */ +//#define ADAPTIVE_THRESHOLD /* this is to enable the adaptive threshold algorithm in raw contexts*/ +//#define TIME_BENCH_ENTIRE_SRS /* more general benchmark than TIME_BENCH_PER_SR. It aims to measure the total time spent in a whole scheduling round (including synchro costs)*/ +#ifdef TIME_BENCH_PER_SR +void smx_ctx_raw_new_sr(void); +#endif /********************************** Simix Global ******************************/ typedef struct s_smx_global { smx_context_factory_t context_factory; @@ -62,17 +63,17 @@ extern xbt_dict_t watched_hosts_lib; #ifdef __cplusplus extern "C" { #endif -void SIMIX_clean(void); +XBT_PUBLIC(void) SIMIX_clean(void); #ifdef __cplusplus } #endif /******************************** Exceptions *********************************/ - -#define SMX_EXCEPTION(issuer, c, v, m) \ +/** @brief Ask to the provided simix process to raise the provided exception */ +#define SMX_EXCEPTION(issuer, cat, val, msg) \ if (1) { \ - smx_process_t _smx_throw_issuer = (issuer); \ - THROW_PREPARE(_smx_throw_issuer->running_ctx, (c), (v), xbt_strdup(m)); \ + smx_process_t _smx_throw_issuer = (issuer); /* evaluate only once */\ + THROW_PREPARE(_smx_throw_issuer->running_ctx, (cat), (val), xbt_strdup(msg)); \ _smx_throw_issuer->doexception = 1; \ } else ((void)0) @@ -99,13 +100,10 @@ typedef enum { SIMIX_ACTION_EXECUTE, SIMIX_ACTION_PARALLEL_EXECUTE, SIMIX_ACTION_COMMUNICATE, + SIMIX_ACTION_JOIN, SIMIX_ACTION_SLEEP, SIMIX_ACTION_SYNCHRO, SIMIX_ACTION_IO, - /* ****************************************************************************************** */ - /* TUTORIAL: New API */ - /* ****************************************************************************************** */ - SIMIX_ACTION_NEW_API } e_smx_action_type_t; typedef enum { @@ -154,6 +152,7 @@ typedef struct s_smx_action { int (*match_fun)(void*,void*,smx_action_t); /* Filter function used by the other side. It is used when looking if a given communication matches my needs. For that, myself must match the expectations of the other side, too. See */ + void (*copy_data_fun) (smx_action_t, void*, size_t); /* Surf action data */ surf_action_t surf_comm; /* The Surf communication action encapsulated */ @@ -188,13 +187,6 @@ typedef struct s_smx_action { smx_host_t host; surf_action_t surf_io; } io; - - /* ****************************************************************************************** */ - /* TUTORIAL: New API */ - /* ****************************************************************************************** */ - struct { - surf_action_t surf_new_api; - } new_api; }; #ifdef HAVE_LATENCY_BOUND_TRACKING