Commits

Shlomi Fish committed 5284c6b

Add traces.

We need those to debug the bug on Amadiro's HPC node where the program
exited with status 0.

Comments (0)

Files changed (1)

fc-solve/source/dbm_solver.c

 
 #endif
 
+#define T
+
+#ifdef T
+#define TRACE0(message) \
+        { \
+            fprintf(out_fh, "%s\n", message); \
+            fflush(out_fh); \
+        }
+#endif
 
 #ifndef FCS_DBM_WITHOUT_CACHES
 
     derived_list = NULL;
     out_fh = instance->out_fh;
 
+#ifdef T
+    TRACE0("instance_run_solver_thread start");
+#endif
 #ifdef DEBUG_OUT
     fc_solve_init_locs(&locs);
 #endif
 
     fc_solve_compact_allocator_finish(&(derived_list_allocator));
 
+#ifdef T
+    TRACE0("instance_run_solver_thread end");
+#endif
+
     return NULL;
 }
 
     int i, check;
     main_thread_item_t * threads;
 
+#ifdef T
+    FILE * out_fh = instance->out_fh;
+#endif
+
     threads = malloc(sizeof(threads[0]) * num_threads);
 
+#ifdef T
+    TRACE0("instance_run_all_threads start");
+#endif
+
     for (i=0; i < num_threads ; i++)
     {
         threads[i].thread.instance = instance;
     }
     free(threads);
 
+#ifdef T
+    TRACE0("instance_run_all_threads end");
+#endif
     return;
 }
 
     fcs_offloading_queue_item_t token;
 #endif
 
+#ifdef T
+    TRACE0("handle_and_destroy_instance_solution start");
+#endif
     instance_print_stats(instance, out_fh);
 
     if (instance->queue_solution_was_found)
         fprintf (out_fh, "%s\n", "Could not solve successfully.");
     }
 
+#ifdef T
+    TRACE0("handle_and_destroy_instance_solution end");
+#endif
+
     instance_destroy(instance);
 
     return ret;