int iters, double threshold);
XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line);
XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line);
-XBT_PUBLIC(void) smpi_sample_flops(double flops);
#define SMPI_SAMPLE_LOCAL(iters,thres) for(smpi_sample_1(0, __FILE__, __LINE__, iters, thres); \
smpi_sample_2(0, __FILE__, __LINE__); \
smpi_sample_2(1, __FILE__, __LINE__); \
smpi_sample_3(1, __FILE__, __LINE__))
-#define SMPI_SAMPLE_DELAY(flops) for(smpi_sample_flops(flops); 0; )
+#define SMPI_SAMPLE_DELAY(duration) for(smpi_execute(duration); 0; )
+#define SMPI_SAMPLE_FLOPS(flops) for(smpi_execute_flops(flops); 0; )
XBT_PUBLIC(void *) smpi_shared_malloc(size_t size, const char *file,
int line);
void smpi_bench_destroy(void);
void smpi_bench_begin(void);
void smpi_bench_end(void);
+void smpi_execute_flops(double flops);
// f77 wrappers
void mpi_init__(int*);
xbt_dict_free(&calls);
}
-static void smpi_execute_flops(double flops)
-{
+void smpi_execute_flops(double flops) {
smx_action_t action;
smx_host_t host;
host = SIMIX_host_self();
data->benching = 0;
}
-void smpi_sample_flops(double flops)
-{
- smpi_execute_flops(flops);
-}
-
void *smpi_shared_malloc(size_t size, const char *file, int line)
{
char *loc = bprintf("%zu_%s_%d", (size_t)getpid(), file, line);
static void action_compute(const char *const *action)
{
XBT_DEBUG("Start to compute %.0f flops", parse_double(action[2]));
- smpi_sample_flops(parse_double(action[2]));
+ smpi_execute_flops(parse_double(action[2]));
}
static void action_send(const char *const *action)