Reduce
* Add a --cfg:tracing/smpi/internals option, to trace internal communications
happening inside a collective SMPI call.
- * Fix the behavior of complex data types handling
- * replace MPICH-1 test suite by the one from MPICH 3.0.4. Can be built using
+ * Fix the behavior of complex data types handling.
+ * Make MPI_Wtime another synchronization point to take computations into account.
+ * Replace MPICH-1 test suite by the one from MPICH 3.0.4. Can be built using
enable_smpi_MPICH3_testsuite flag in cmake. Run with ctest.
* Add all missing Fortran bindings, SMPI should work with Fortran 90
(no privatization of global variables yet)
MPI_Comm comm);
// utilities
+extern int smpi_sample_is_running;
void smpi_bench_destroy(void);
void smpi_bench_begin(void);
void smpi_bench_end(void);
int benching; /* 1: we are benchmarking; 0: we have enough data, no bench anymore */
} local_data_t;
+int smpi_sample_is_running = 0;
+
static char *sample_location(int global, const char *file, int line) {
if (global) {
return bprintf("%s:%d", file, line);
local_data_t *data;
smpi_bench_end(); /* Take time from previous, unrelated computation into account */
+ smpi_sample_is_running++;
+
if (!samples)
samples = xbt_dict_new_homogeneous(free);
data->count, data->iters, data->relstderr, data->threshold, data->mean);
smpi_execute(data->mean);
+ smpi_sample_is_running--;
smpi_bench_begin(); // prepare to capture future, unrelated computations
return 0;
}
double PMPI_Wtime(void)
{
double time;
- time = SIMIX_get_clock();
+ if (smpi_process_initialized() && !smpi_process_finalized() && !smpi_sample_is_running) {
+ smpi_bench_end();
+ time = SIMIX_get_clock();
+ smpi_bench_begin();
+ } else {
+ time = SIMIX_get_clock();
+ }
return time;
}