Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prevent user from making call to MPI within a SMPI_SAMPLE_ bloc.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 31 Oct 2013 22:53:01 +0000 (23:53 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 31 Oct 2013 22:54:03 +0000 (23:54 +0100)
src/smpi/smpi_bench.c

index 3992750..7e69951 100644 (file)
@@ -171,8 +171,13 @@ void smpi_bench_begin(void)
 void smpi_bench_end(void)
 {
   xbt_os_timer_t timer = smpi_process_timer();
-
   xbt_os_threadtimer_stop(timer);
+  if (smpi_process_get_sampling()) {
+    XBT_CRITICAL("Cannot do recursive benchmarks.");
+    XBT_CRITICAL("Are you trying to make a call to MPI within a SMPI_SAMPLE_ block?");
+    xbt_backtrace_display_current();
+    xbt_die("Aborting.");
+  }
   smpi_execute(xbt_os_timer_elapsed(timer));
 }