sd_global->recyclable_route = NULL;
sd_global->watch_point_reached = 0;
- sd_global->task_mallocator=xbt_mallocator_new(65536, SD_task_new_f,SD_task_free_f,SD_task_recycle_f);
+ sd_global->task_mallocator=xbt_mallocator_new(65536, SD_task_new_f,
+ SD_task_free_f,
+ SD_task_recycle_f);
sd_global->initial_task_set = xbt_dynar_new(sizeof(SD_task_t), NULL);
sd_global->executable_task_set = xbt_dynar_new(sizeof(SD_task_t), NULL);
/** \brief set a configuration variable
*
- * Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
+ * Do --help on any simgrid binary to see the list of currently existing
+ * configuration variables, and see Section @ref options.
*
* Example:
* SD_config("host/model","default");
*
* @warning: this function is still experimental and not perfect. For example,
* the simulation clock (and traces usage) is not reset. So, do not use it if
- * you use traces in your simulation, and do not use absolute timing after using it.
- * That being said, this function is still precious if you want to compare a bunch of
- * heuristics on the same platforms.
+ * you use traces in your simulation, and do not use absolute timing after
+ * using it.
+ * That being said, this function is still precious if you want to compare a
+ * bunch of heuristics on the same platforms.
*/
void SD_application_reinit(void)
{
* when no more task can be executed.
* Then you can call SD_simulate() again.
*
- * \param how_long maximum duration of the simulation (a negative value means no time limit)
+ * \param how_long maximum duration of the simulation (a negative value means
+ * no time limit)
* \return a dynar of \ref SD_task_t whose state has changed.
* \see SD_task_schedule(), SD_task_watch()
*/
}
xbt_swag_t SD_simulate_swag(double how_long) {
- double total_time = 0.0; /* we stop the simulation when total_time >= how_long */
+ /* we stop the simulation when total_time >= how_long */
+ double total_time = 0.0;
double elapsed_time = 0.0;
SD_task_t task, dst;
SD_dependency_t dependency;
SD_task_get_name(task));
/* the state has changed */
+ XBT_INFO("%d",xbt_swag_belongs(task, sd_global->return_set));
xbt_swag_insert(task,sd_global->return_set);
/* remove the dependencies after this task */
xbt_free(sd_global->link_list);
xbt_free(sd_global->recyclable_route);
- XBT_DEBUG("Destroying the swags...");
+ XBT_DEBUG("Destroying the dynars and swags...");
xbt_dynar_free_container(&(sd_global->initial_task_set));
xbt_dynar_free_container(&(sd_global->executable_task_set));
xbt_dynar_free_container(&(sd_global->completed_task_set));