~ubuntu-branches/ubuntu/raring/simgrid/raring

« back to all changes in this revision

Viewing changes to teshsuite/simdag/basic6.c

  • Committer: Package Import Robot
  • Author(s): Martin Quinson
  • Date: 2013-01-31 00:24:51 UTC
  • mfrom: (10.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130131002451-krejhf7w7h24lpsc
Tags: 3.9~rc1-1
* New upstream release: the "Grasgory" release. Major changes:
  - Gras was completely removed from this version.
  - Documentation reorganization to ease browsing it.
  - New default value for the TCP_gamma parameter: 4MiB

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* test scheduling 2 tasks at the same time without artificial dependencies */
2
 
 
3
 
/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
 
1
/* Copyright (c) 2007-2012. The SimGrid Team.
4
2
 * All rights reserved.                                                     */
5
3
 
6
4
/* This program is free software; you can redistribute it and/or modify it
13
11
#include "xbt/log.h"
14
12
 
15
13
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic6, sd, "SimDag test basic6");
 
14
/* test scheduling 2 tasks at the same time without artificial dependencies */
 
15
 
 
16
/* Basic SimDag Test 6
 
17
 * Scenario:
 
18
 *   - Schedule two parallel tasks concurrently on a P2P platform
 
19
 *   - Hosts computes 1B per second
 
20
 * Computing power is shared between tasks.
 
21
 * Simulated time should be:
 
22
 *          1/(1/2) = 2 seconds
 
23
 */
16
24
 
17
25
int main(int argc, char **argv)
18
26
{
34
42
 
35
43
  ret = SD_simulate(-1.0);
36
44
  xbt_assert(xbt_dynar_length(ret) == 2,
37
 
      "I was expecting the terminaison of 2 tasks, but I got %lu instead", xbt_dynar_length(ret));
 
45
      "I was expecting the terminaison of 2 tasks, but I got %lu instead",
 
46
      xbt_dynar_length(ret));
38
47
  xbt_dynar_free(&ret);
39
48
  SD_task_destroy(taskA);
40
49
  SD_task_destroy(taskB);