Commits

Abhishek Kulkarni committed ada3a44 Draft

make sure the coll grpcomm collective is cleaned up properly

  • Participants
  • Parent commits b881673

Comments (0)

Files changed (1)

File orte/mca/ess/env/ess_env_module.c

     orte_proc_type_t svtype;
     orte_grpcomm_collective_t coll;
 
+    OBJ_CONSTRUCT(&coll, orte_grpcomm_collective_t);
+    coll.id = orte_process_info.peer_init_barrier;
+
     /******** Checkpoint Prep ********/
     if(OPAL_CRS_CHECKPOINT == state) {
         /*
              * Barrier to make all processes have been successfully restarted before
              * we try to remove some restart only files.
              */
-            OBJ_CONSTRUCT(&coll, orte_grpcomm_collective_t);
-            coll.id = orte_process_info.peer_init_barrier;
             if (ORTE_SUCCESS != (ret = orte_grpcomm.barrier(&coll))) {
                 opal_output(0, "ess:env: ft_event(%2d): Failed in orte_grpcomm.barrier (%d)",
                             state, ret);
-                return ret;
+                exit_status = ret;
+                goto cleanup;
             }
             while (coll.active) {
                 opal_progress();
          * Barrier to make all processes have been successfully restarted before
          * we try to remove some restart only files.
          */
-        OBJ_CONSTRUCT(&coll, orte_grpcomm_collective_t);
-        coll.id = orte_process_info.peer_init_barrier;
         if (ORTE_SUCCESS != (ret = orte_grpcomm.barrier(&coll))) {
             opal_output(0, "ess:env ft_event(%2d): Failed in orte_grpcomm.barrier (%d)",
                         state, ret);
-            OBJ_DESTRUCT(&coll);
-            return ret;
+            exit_status = ret;
+            goto cleanup;
         }
         while (coll.active) {
             opal_progress();