From: Martin Quinson Date: Sat, 4 Aug 2012 13:04:45 +0000 (+0200) Subject: stop being protective against things we cannot deal with. Let the segfault happen X-Git-Tag: v3_8~205 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fa427d220fd4ff69a3888d7dba97e8b502d8ce95 stop being protective against things we cannot deal with. Let the segfault happen --- diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index a985d30988..87d148a8ff 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -249,10 +249,8 @@ int smpi_sample_2(int global, const char *file, int line) local_data_t *data; xbt_assert(samples, "Y U NO use SMPI_SAMPLE_* macros? Stop messing directly with smpi_sample_* functions!"); - data = xbt_dict_get_or_null(samples, loc); - if (!data) { - xbt_assert(data, "Please, do thing in order"); - } + data = xbt_dict_get(samples, loc); + if (!data->running) { if ((data->iters > 0 && data->count >= data->iters) || (data->count > 1 && data->threshold > 0.0 && data->relstderr <= data->threshold)) { @@ -278,9 +276,9 @@ void smpi_sample_3(int global, const char *file, int line) double sample, n; xbt_assert(samples, "Y U NO use SMPI_SAMPLE_* macros? Stop messing directly with smpi_sample_* functions!"); - data = xbt_dict_get_or_null(samples, loc); + data = xbt_dict_get(samples, loc); smpi_bench_end(); - if(data && data->running && data->count < data->iters) { + if(data->running && data->count < data->iters) { sample = smpi_process_simulated_elapsed(); data->sum += sample; data->sum_pow2 += sample * sample;