1 /* simple test trying to load a DAX file. */
3 /* Copyright (c) 2009 Da SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "simdag/simdag.h"
13 XBT_LOG_NEW_DEFAULT_CATEGORY(test,
14 "Logging specific to this SimDag example");
17 int main(int argc, char **argv) {
22 /* initialisation of SD */
25 /* Check our arguments */
27 INFO1("Usage: %s platform_file dax_file", argv[0]);
28 INFO1("example: %s ../sd_platform.xml Montage_50.xml", argv[0]);
32 /* creation of the environment */
33 SD_create_environment(argv[1]);
35 /* load the DAX file */
36 dax=SD_daxload(argv[2]);
38 /* Display all the tasks */
39 xbt_dynar_foreach(dax,cursor,task) {
43 FILE *out = fopen("dax.dot","w");
44 fprintf(out,"digraph A {\n");
45 xbt_dynar_foreach(dax,cursor,task) {
46 SD_task_dotty(task,out);