A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d94864f
)
better description of the basic simdag tests + cosmetics
author
suter
<frederic.suter@cc.in2p3.fr>
Mon, 26 Nov 2012 11:18:06 +0000
(12:18 +0100)
committer
suter
<frederic.suter@cc.in2p3.fr>
Mon, 26 Nov 2012 15:26:45 +0000
(16:26 +0100)
teshsuite/simdag/basic1.c
patch
|
blob
|
history
teshsuite/simdag/basic2.c
patch
|
blob
|
history
teshsuite/simdag/basic3.c
patch
|
blob
|
history
teshsuite/simdag/basic4.c
patch
|
blob
|
history
teshsuite/simdag/basic5.c
patch
|
blob
|
history
teshsuite/simdag/basic6.c
patch
|
blob
|
history
teshsuite/simdag/incomplete.c
patch
|
blob
|
history
diff --git
a/teshsuite/simdag/basic1.c
b/teshsuite/simdag/basic1.c
index
d7dcd82
..
a3dcd3a
100644
(file)
--- a/
teshsuite/simdag/basic1.c
+++ b/
teshsuite/simdag/basic1.c
@@
-11,7
+11,7
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic1, sd, "SimDag test basic1");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic1, sd, "SimDag test basic1");
-/* Basic SimDag Test
0
+/* Basic SimDag Test
1
* Scenario:
* - Create a no-op Init task
* - Create two communication tasks: 1GB and 1GB
* Scenario:
* - Create a no-op Init task
* - Create two communication tasks: 1GB and 1GB
diff --git
a/teshsuite/simdag/basic2.c
b/teshsuite/simdag/basic2.c
index
f1eef64
..
6e4ac83
100644
(file)
--- a/
teshsuite/simdag/basic2.c
+++ b/
teshsuite/simdag/basic2.c
@@
-11,7
+11,7
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2");
-/* Basic SimDag Test
0
+/* Basic SimDag Test
2
* Scenario:
* - Create a no-op Init task
* - Create two communication tasks: 1GB and 100MB
* Scenario:
* - Create a no-op Init task
* - Create two communication tasks: 1GB and 100MB
diff --git
a/teshsuite/simdag/basic3.c
b/teshsuite/simdag/basic3.c
index
9657e3a
..
7f747bc
100644
(file)
--- a/
teshsuite/simdag/basic3.c
+++ b/
teshsuite/simdag/basic3.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2012
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-11,6
+11,11
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic3, sd, "SimDag test basic3");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic3, sd, "SimDag test basic3");
+/* Basic SimDag Test 3
+ * Scenario:
+ * - Create a chain of tasks (Init, A, Fin)
+ * Verify that the tasks are actually simulated in the right order.
+ */
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
diff --git
a/teshsuite/simdag/basic4.c
b/teshsuite/simdag/basic4.c
index
ac09265
..
b6435cf
100644
(file)
--- a/
teshsuite/simdag/basic4.c
+++ b/
teshsuite/simdag/basic4.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2012
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-11,6
+11,13
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic4, sd, "SimDag test basic4");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic4, sd, "SimDag test basic4");
+/* Basic SimDag Test 4
+ * Scenario:
+ * - Create a chain of tasks (Init, A, Fin)
+ * - Have a 1B communication between two no-op tasks.
+ * Verify that the tasks are actually simulated in the right order.
+ * The simulated time should be equal to the network latency: 0.0001 seconds.
+ */
int main(int argc, char **argv)
{
/* creation of the tasks and their dependencies */
int main(int argc, char **argv)
{
/* creation of the tasks and their dependencies */
diff --git
a/teshsuite/simdag/basic5.c
b/teshsuite/simdag/basic5.c
index
b400701
..
1bf80b3
100644
(file)
--- a/
teshsuite/simdag/basic5.c
+++ b/
teshsuite/simdag/basic5.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2012
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-11,6
+11,15
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic5, sd, "SimDag test basic5");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic5, sd, "SimDag test basic5");
+/* Basic SimDag Test 5
+ * Scenario:
+ * - Create a no-op Init task
+ * - Create two tasks: send 100kB and compute 10Mflops
+ * - Schedule them concurrently
+ * The two tasks should overlap smoothly as they use different resources.
+ * Simulated time should be:
+ * MAX(1e5/(1.25e8), 1e7/4e9) = MAX(.0009, .0025) = 0.0025 seconds
+ */
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
diff --git
a/teshsuite/simdag/basic6.c
b/teshsuite/simdag/basic6.c
index
f48f761
..
66e2d34
100644
(file)
--- a/
teshsuite/simdag/basic6.c
+++ b/
teshsuite/simdag/basic6.c
@@
-1,6
+1,4
@@
-/* test scheduling 2 tasks at the same time without artificial dependencies */
-
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2012. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-13,6
+11,16
@@
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic6, sd, "SimDag test basic6");
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic6, sd, "SimDag test basic6");
+/* test scheduling 2 tasks at the same time without artificial dependencies */
+
+/* Basic SimDag Test 6
+ * Scenario:
+ * - Schedule two parallel tasks concurrently on a P2P platform
+ * - Hosts computes 1B per second
+ * Computing power is shared between tasks.
+ * Simulated time should be:
+ * 1/(1/2) = 2 seconds
+ */
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
@@
-34,7
+42,8
@@
int main(int argc, char **argv)
ret = SD_simulate(-1.0);
xbt_assert(xbt_dynar_length(ret) == 2,
ret = SD_simulate(-1.0);
xbt_assert(xbt_dynar_length(ret) == 2,
- "I was expecting the terminaison of 2 tasks, but I got %lu instead", xbt_dynar_length(ret));
+ "I was expecting the terminaison of 2 tasks, but I got %lu instead",
+ xbt_dynar_length(ret));
xbt_dynar_free(&ret);
SD_task_destroy(taskA);
SD_task_destroy(taskB);
xbt_dynar_free(&ret);
SD_task_destroy(taskA);
SD_task_destroy(taskB);
diff --git
a/teshsuite/simdag/incomplete.c
b/teshsuite/simdag/incomplete.c
index
76c346e
..
696ab7b
100644
(file)
--- a/
teshsuite/simdag/incomplete.c
+++ b/
teshsuite/simdag/incomplete.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2012
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-9,8
+9,18
@@
#include "simdag/simdag.h"
#include "xbt/log.h"
#include "simdag/simdag.h"
#include "xbt/log.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2");
-
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(incomplete, sd, "SimDag incomplete test");
+
+/* SimDag Incomplete Test
+ * Scenario:
+ * - Create a bunch of tasks
+ * - schedule only a subset of them (init, A and D)
+ * - run the simulation
+ * - Verify that we detect which tasks are not scheduled and show their state.
+ * The scheduled task A sends 1GB. Simulation time should be
+ * 1e9/1.25e8 + 1e-4 = 8.0001 seconds
+ * Task D is scheduled but depends on unscheduled task C.
+ */
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
@@
-20,7
+30,7
@@
int main(int argc, char **argv)
const SD_workstation_t *workstation;
const SD_workstation_t *workstation;
- double communication_amount1 = 1
000000000
;
+ double communication_amount1 = 1
e9
;
double no_cost = 0.0;
/* initialization of SD */
double no_cost = 0.0;
/* initialization of SD */