A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Documentation fixups: Marc was a bit quick at copy/pasting (+ DTD renamed)
[simgrid.git]
/
src
/
simdag
/
sd_global.c
diff --git
a/src/simdag/sd_global.c
b/src/simdag/sd_global.c
index
df22d65
..
ce76515
100644
(file)
--- a/
src/simdag/sd_global.c
+++ b/
src/simdag/sd_global.c
@@
-4,6
+4,7
@@
#include "surf/surf.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include "surf/surf.h"
#include "xbt/ex.h"
#include "xbt/log.h"
+#include "xbt/str.h"
#include "xbt/config.h"
XBT_LOG_NEW_CATEGORY(sd,"Logging specific to SimDag");
#include "xbt/config.h"
XBT_LOG_NEW_CATEGORY(sd,"Logging specific to SimDag");
@@
-65,6
+66,10
@@
static void _sd_cfg_cb__network_model(const char *name, int pos)
surf_network_model_description_size, val);
}
surf_network_model_description_size, val);
}
+XBT_LOG_EXTERNAL_CATEGORY(sd_kernel);
+XBT_LOG_EXTERNAL_CATEGORY(sd_task);
+XBT_LOG_EXTERNAL_CATEGORY(sd_workstation);
+
/* create the config set and register what should be */
static void sd_config_init(void)
{
/* create the config set and register what should be */
static void sd_config_init(void)
{
@@
-72,6
+77,11
@@
static void sd_config_init(void)
if (_sd_init_status)
return; /* Already inited, nothing to do */
if (_sd_init_status)
return; /* Already inited, nothing to do */
+ /* Connect our log channels: that must be done manually under windows */
+ XBT_LOG_CONNECT(sd_kernel, sd);
+ XBT_LOG_CONNECT(sd_task, sd);
+ XBT_LOG_CONNECT(sd_workstation, sd);
+
_sd_init_status = 1;
_sd_cfg_set = xbt_cfg_new();
_sd_init_status = 1;
_sd_cfg_set = xbt_cfg_new();
@@
-280,7
+290,7
@@
void SD_application_reinit(void) {
*
* The XML file follows this DTD:
*
*
* The XML file follows this DTD:
*
- * \include s
urfxml
.dtd
+ * \include s
imgrid
.dtd
*
* Here is a small example of such a platform:
*
*
* Here is a small example of such a platform:
*
@@
-391,7
+401,7
@@
SD_task_t* SD_simulate(double how_long)
{
double total_time = 0.0; /* we stop the simulation when total_time >= how_long */
double elapsed_time = 0.0;
{
double total_time = 0.0; /* we stop the simulation when total_time >= how_long */
double elapsed_time = 0.0;
- SD_task_t task, dst;
+ SD_task_t task,
task_safe,
dst;
SD_dependency_t dependency;
surf_action_t action;
SD_task_t *changed_tasks = NULL;
SD_dependency_t dependency;
surf_action_t action;
SD_task_t *changed_tasks = NULL;
@@
-420,7
+430,7
@@
SD_task_t* SD_simulate(double how_long)
sd_global->watch_point_reached = 0;
/* explore the ready tasks */
sd_global->watch_point_reached = 0;
/* explore the ready tasks */
- xbt_swag_foreach
(task
, sd_global->ready_task_set) {
+ xbt_swag_foreach
_safe(task, task_safe
, sd_global->ready_task_set) {
INFO1("Executing task '%s'", SD_task_get_name(task));
if ((task->state_changed = __SD_task_try_to_run(task))) {
changed_tasks[changed_task_number++] = task; /* replace NULL by the task */
INFO1("Executing task '%s'", SD_task_get_name(task));
if ((task->state_changed = __SD_task_try_to_run(task))) {
changed_tasks[changed_task_number++] = task; /* replace NULL by the task */