Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Free exception, and fix warnings about variables possibly clobbered by longjmp.
[simgrid.git] / src / smpi / colls / smpi_automatic_selector.c
index 95a7ce4..54bdcc1 100644 (file)
@@ -24,8 +24,8 @@
     ret smpi_coll_tuned_ ## cat ## _ ## automatic(COLL_UNPAREN args)\
 {\
   double time1, time2, time_min=DBL_MAX;\
-  int min_coll=-1, global_coll=-1;\
-  int i;\
+  volatile int min_coll=-1, global_coll=-1;\
+  volatile int i;\
   xbt_ex_t ex;\
   double buf_in, buf_out, max_min=DBL_MAX;\
   for (i = 0; mpi_coll_##cat##_description[i].name; i++){\
@@ -39,6 +39,7 @@
           mpi_coll_##cat##_description[i].coll) args2 ;\
       }\
       CATCH(ex) {\
+        xbt_ex_free(ex);\
         continue;\
       }\
       time2 = SIMIX_get_clock();\