コード例 #1
0
ファイル: dot_test.c プロジェクト: RockyMeadow/simgrid
int main(int argc, char **argv)
{
  xbt_dynar_t dot;
  unsigned int cursor;
  SD_task_t task;

  /* initialization of SD */
  SD_init(&argc, argv);

  /* Check our arguments */
  xbt_assert(argc > 2, "Usage: %s platform_file dot_file [trace_file]"
             "example: %s ../2clusters.xml dag.dot dag.mytrace", argv[0], argv[0]);

  /* creation of the environment */
  SD_create_environment(argv[1]);

  /* load the DOT file */
  dot = SD_dotload(argv[2]);
  if(dot == NULL){
    XBT_CRITICAL("No dot loaded. Do you have a cycle in your graph?");
    SD_exit();
    exit(2);
  }

  char *tracefilename;
  char *last = strrchr(argv[2], '.');
  tracefilename = bprintf("%.*s.trace", (int) (last == NULL ? strlen(argv[2]) : last - argv[2]),argv[2]);
  if (argc == 4) 
    tracefilename = xbt_strdup(argv[3]);

  /* Display all the tasks */
  XBT_INFO("------------------- Display all tasks of the loaded DAG ---------------------------");
  xbt_dynar_foreach(dot, cursor, task) {
    SD_task_dump(task);
  }
コード例 #2
0
ファイル: dot_test2.c プロジェクト: adegomme/simgrid
int main(int argc, char **argv)
{
  xbt_dynar_t dot;
  unsigned int cursor;
  SD_task_t task, *dot_as_array=NULL;

  /* SD initialization */
  SD_init(&argc, argv);

  /* Check our arguments */
  xbt_assert(argc > 1, "Usage: %s dot_file", argv[0]);

  /* load the DOT file */
  dot = SD_dotload(argv[1]);

  /* Display all the tasks */
  XBT_INFO("------------------- Display all tasks of the loaded DAG ---------------------------");
  xbt_dynar_foreach(dot, cursor, task) {
      SD_task_dump(task);
    }
コード例 #3
0
ファイル: sd_dotloader.cpp プロジェクト: simgrid/simgrid
xbt_dynar_t SD_PTG_dotload(const char * filename) {
  return SD_dotload(filename);
}
コード例 #4
0
ファイル: sd_dotloader.cpp プロジェクト: simgrid/simgrid
xbt_dynar_t SD_dotload_with_sched(const char *filename) {
  return SD_dotload(filename);
}