Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Starting the SimDag revolution: Easter trimming
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 20 Jan 2016 15:05:35 +0000 (16:05 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 20 Jan 2016 16:03:14 +0000 (17:03 +0100)
  + Loose the SEQUENTIAL_ACCESS_MODE in the process

18 files changed:
examples/simdag/CMakeLists.txt
examples/simdag/dax/smalldax.tesh
examples/simdag/dot/test_simdag_dotload.tesh
examples/simdag/properties/sd_prop.c
examples/simdag/properties/test_prop.tesh
examples/simdag/sd_seq_access.c [deleted file]
examples/simdag/sd_test.c
examples/simdag/simdag_trace.c
examples/simdag/test_simdag_fail.tesh
examples/simdag/test_simdag_seq_access.tesh [deleted file]
examples/simdag/test_simdag_tracing.tesh
include/simgrid/simdag.h
src/simdag/sd_global.cpp
src/simdag/sd_task.cpp
src/simdag/sd_workstation.cpp
src/simdag/simdag_private.h
src/simgrid/host.cpp
tools/cmake/Tests.cmake

index 6a1d6d2..6d0a8a1 100644 (file)
@@ -6,7 +6,6 @@ add_executable(sd_fail sd_fail.c)
 add_executable(sd_avail sd_avail.c)
 add_executable(sd_typed_tasks_test sd_typed_tasks_test.c)
 add_executable(sd_comm_throttling sd_comm_throttling.c)
-add_executable(sd_seq_access sd_seq_access.c)
 
 add_executable(simdag_tracing simdag_trace.c)
 
@@ -18,7 +17,6 @@ if(NOT WIN32)
   target_link_libraries(sd_avail simgrid pthread )
   target_link_libraries(sd_typed_tasks_test simgrid pthread )
   target_link_libraries(sd_comm_throttling simgrid pthread )
-  target_link_libraries(sd_seq_access simgrid pthread )
   target_link_libraries(simdag_tracing simgrid pthread )
 
   add_custom_command(TARGET ex_sd_test
@@ -38,7 +36,6 @@ else()
   target_link_libraries(sd_avail simgrid)
   target_link_libraries(sd_typed_tasks_test simgrid)
   target_link_libraries(sd_comm_throttling simgrid)
-  target_link_libraries(sd_seq_access simgrid)
   target_link_libraries(simdag_tracing simgrid)
   
   add_custom_command(TARGET ex_sd_test
@@ -57,7 +54,6 @@ set(tesh_files
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag2.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_comm_throttling.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_seq_access.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_tracing.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_typed_tasks.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_avail.tesh
@@ -76,7 +72,6 @@ set(examples_src
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_avail.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_comm_throttling.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_fail.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/sd_seq_access.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test2.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sd_typed_tasks_test.c
index 92908c9..712f8b1 100644 (file)
@@ -7,7 +7,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_daxparse/WARNING] Ignoring file o2 size redefinition from 1000000 to 304
 > [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
 > [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:  schedulable  not runnable    
+> [0.000000] [sd_task/INFO]   - state: schedulable not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 0
@@ -16,7 +16,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]     root_i2_2@task2
 > [0.000000] [sd_task/INFO]     root_i1_1@task1
 > [0.000000] [sd_task/INFO] Displaying task 1@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: task1
 > [0.000000] [sd_task/INFO]   - amount: 42000000000
@@ -27,7 +27,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]     3@task1
 > [0.000000] [sd_task/INFO]     1@task1_o1_3@task1
 > [0.000000] [sd_task/INFO] Displaying task 2@task2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: task2
 > [0.000000] [sd_task/INFO]   - amount: 42000000000
@@ -38,7 +38,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]     3@task1
 > [0.000000] [sd_task/INFO]     2@task2_o2_3@task1
 > [0.000000] [sd_task/INFO] Displaying task 3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: task1
 > [0.000000] [sd_task/INFO]   - amount: 42000000000
@@ -51,7 +51,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     3@task1_o3_end
 > [0.000000] [sd_task/INFO] Displaying task root_i2_2@task2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: COMM_E2E
 > [0.000000] [sd_task/INFO]   - amount: 1000000
@@ -61,7 +61,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     2@task2
 > [0.000000] [sd_task/INFO] Displaying task 1@task1_o1_3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: task1
 > [0.000000] [sd_task/INFO]   - amount: 1000000
@@ -71,7 +71,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     3@task1
 > [0.000000] [sd_task/INFO] Displaying task 2@task2_o2_3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: task2
 > [0.000000] [sd_task/INFO]   - amount: 1000000
@@ -81,7 +81,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     3@task1
 > [0.000000] [sd_task/INFO] Displaying task 3@task1_o3_end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: task1
 > [0.000000] [sd_task/INFO]   - amount: 4167312
@@ -91,7 +91,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task root_i1_1@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: COMM_E2E
 > [0.000000] [sd_task/INFO]   - amount: 1000000
@@ -101,7 +101,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     1@task1
 > [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 0
index 2b8a811..b4993c1 100644 (file)
@@ -5,7 +5,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
 > [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
 > [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:  schedulable  not runnable    
+> [0.000000] [sd_task/INFO]   - state: schedulable not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 0
@@ -14,7 +14,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]     root->5
 > [0.000000] [sd_task/INFO]     0
 > [0.000000] [sd_task/INFO] Displaying task 0
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000129
@@ -24,7 +24,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     0->1
 > [0.000000] [sd_task/INFO] Displaying task 1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000131
@@ -34,7 +34,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     1->2
 > [0.000000] [sd_task/INFO] Displaying task 2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000121
@@ -44,7 +44,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     2->3
 > [0.000000] [sd_task/INFO] Displaying task 3
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000231
@@ -54,7 +54,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     4
 > [0.000000] [sd_task/INFO] Displaying task 4
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000005
@@ -64,7 +64,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     4->5
 > [0.000000] [sd_task/INFO] Displaying task 5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000046
@@ -75,7 +75,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     6
 > [0.000000] [sd_task/INFO] Displaying task 6
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000092
@@ -85,7 +85,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     6->7
 > [0.000000] [sd_task/INFO] Displaying task 7
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000041
@@ -96,7 +96,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]     7->8
 > [0.000000] [sd_task/INFO]     7->end
 > [0.000000] [sd_task/INFO] Displaying task 8
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskC
 > [0.000000] [sd_task/INFO]   - amount: 10000000250
@@ -106,7 +106,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     9
 > [0.000000] [sd_task/INFO] Displaying task 9
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskC
 > [0.000000] [sd_task/INFO]   - amount: 10000000079
@@ -116,7 +116,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task 0->1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10001
@@ -126,7 +126,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     1
 > [0.000000] [sd_task/INFO] Displaying task 1->2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10004
@@ -136,7 +136,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     2
 > [0.000000] [sd_task/INFO] Displaying task 2->3
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10002
@@ -146,7 +146,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     3
 > [0.000000] [sd_task/INFO] Displaying task 4->5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10029
@@ -156,7 +156,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     5
 > [0.000000] [sd_task/INFO] Displaying task 6->7
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10005
@@ -166,7 +166,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     7
 > [0.000000] [sd_task/INFO] Displaying task 7->8
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000
@@ -176,7 +176,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     8
 > [0.000000] [sd_task/INFO] Displaying task 7->end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10014000
@@ -186,7 +186,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task root->5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: COMM_E2E
 > [0.000000] [sd_task/INFO]   - amount: 10014000
@@ -196,7 +196,7 @@ $ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     5
 > [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
+> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 10000000129
@@ -248,7 +248,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
 > [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
 > [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:    runnable    
+> [0.000000] [sd_task/INFO]   - state: runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 0
@@ -258,7 +258,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     0
 > [0.000000] [sd_task/INFO]     1
 > [0.000000] [sd_task/INFO] Displaying task 0
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000129
@@ -269,7 +269,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     0->2
 > [0.000000] [sd_task/INFO]     2
 > [0.000000] [sd_task/INFO] Displaying task 1
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000131
@@ -280,7 +280,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     1->2
 > [0.000000] [sd_task/INFO]     4
 > [0.000000] [sd_task/INFO] Displaying task 2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000121
@@ -293,7 +293,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     2->3
 > [0.000000] [sd_task/INFO]     3
 > [0.000000] [sd_task/INFO] Displaying task 3
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10000000231
@@ -305,7 +305,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     4
 > [0.000000] [sd_task/INFO]     8
 > [0.000000] [sd_task/INFO] Displaying task 4
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000005
@@ -317,7 +317,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     4->5
 > [0.000000] [sd_task/INFO]     5
 > [0.000000] [sd_task/INFO] Displaying task 5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000046
@@ -329,7 +329,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     6
 > [0.000000] [sd_task/INFO] Displaying task 6
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000092
@@ -340,7 +340,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     6->7
 > [0.000000] [sd_task/INFO]     7
 > [0.000000] [sd_task/INFO] Displaying task 7
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000000041
@@ -353,7 +353,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]     7->end
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task 8
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskC
 > [0.000000] [sd_task/INFO]   - amount: 10000000250
@@ -364,7 +364,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     9
 > [0.000000] [sd_task/INFO] Displaying task 9
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: taskC
 > [0.000000] [sd_task/INFO]   - amount: 10000000079
@@ -374,7 +374,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task root->5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: COMM_E2E
 > [0.000000] [sd_task/INFO]   - amount: 10014000
@@ -384,7 +384,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     5
 > [0.000000] [sd_task/INFO] Displaying task 0->2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10001
@@ -394,7 +394,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     2
 > [0.000000] [sd_task/INFO] Displaying task 1->2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10004
@@ -404,7 +404,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     2
 > [0.000000] [sd_task/INFO] Displaying task 2->3
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskA
 > [0.000000] [sd_task/INFO]   - amount: 10002
@@ -414,7 +414,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     3
 > [0.000000] [sd_task/INFO] Displaying task 4->5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10029
@@ -424,7 +424,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     5
 > [0.000000] [sd_task/INFO] Displaying task 6->7
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10005
@@ -434,7 +434,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     7
 > [0.000000] [sd_task/INFO] Displaying task 7->8
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10000
@@ -444,7 +444,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     8
 > [0.000000] [sd_task/INFO] Displaying task 7->end
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
 > [0.000000] [sd_task/INFO]   - tracing category: taskB
 > [0.000000] [sd_task/INFO]   - amount: 10014000
@@ -454,7 +454,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${src
 > [0.000000] [sd_task/INFO]   - post-dependencies:
 > [0.000000] [sd_task/INFO]     end
 > [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
+> [0.000000] [sd_task/INFO]   - state: scheduled not runnable
 > [0.000000] [sd_task/INFO]   - kind: sequential computation
 > [0.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [0.000000] [sd_task/INFO]   - amount: 10000000129
index 72cbc00..f11a837 100644 (file)
@@ -39,7 +39,6 @@ int main(int argc, char **argv)
   /* init of platform elements */
   w1 = SD_workstation_get_by_name("host1");
   w2 = SD_workstation_get_by_name("host2");
-  SD_workstation_set_access_mode(w2, SD_WORKSTATION_SEQUENTIAL_ACCESS);
   name1 = SD_workstation_get_name(w1);
   name2 = SD_workstation_get_name(w2);
 
index 22c76d2..e554251 100755 (executable)
@@ -17,7 +17,5 @@ $ $SG_TEST_EXENV properties/sd_prop ${srcdir:=.}/../platforms/prop.xml
 > [0.000000] [sd_workstation/INFO] Displaying workstation host2
 > [0.000000] [sd_workstation/INFO]   - speed: 1000000000
 > [0.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [0.000000] [sd_workstation/INFO]   - access mode: Exclusive
-> [0.000000] [sd_workstation/INFO]     no task running
 > [0.000000] [sd_workstation/INFO]   - properties:
 > [0.000000] [sd_workstation/INFO]     Hdd->250
diff --git a/examples/simdag/sd_seq_access.c b/examples/simdag/sd_seq_access.c
deleted file mode 100644 (file)
index 4314ad6..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (c) 2006-2015. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "simgrid/simdag.h"
-#include "xbt/ex.h"
-#include "xbt/log.h"
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(sd_seq_access,
-                             "Logging specific to this SimDag example");
-
-int main(int argc, char **argv)
-{
-  int i;
-  const char *platform_file;
-  const SD_workstation_t *workstations;
-  SD_task_t taskA, taskB, taskC, taskD;
-
-  /* initialization of SD */
-  SD_init(&argc, argv);
-
-  /*  xbt_log_control_set("sd.thres=debug"); */
-
-  if (argc < 2) {
-    XBT_INFO("Usage: %s platform_file", argv[0]);
-    XBT_INFO("example: %s sd_platform.xml", argv[0]);
-    exit(1);
-  }
-
-  /* creation of the environment */
-  platform_file = argv[1];
-  SD_create_environment(platform_file);
-
-  /* Change the access mode of the workstations */
-  workstations = SD_workstation_get_list();
-  for (i = 0; i < 2; i++) {
-    SD_workstation_dump(workstations[i]);
-    
-    SD_workstation_set_access_mode(workstations[i],
-                                   SD_WORKSTATION_SEQUENTIAL_ACCESS);
-    XBT_INFO(" Change access mode of %s to %s",
-          SD_workstation_get_name(workstations[i]),
-          (SD_workstation_get_access_mode(workstations[i]) ==
-           SD_WORKSTATION_SEQUENTIAL_ACCESS) ? "sequential" : "shared");
-  }
-  /* Well I changed my mind, I want the second workstation to be shared */
-
-  SD_workstation_set_access_mode(workstations[1],
-                                     SD_WORKSTATION_SHARED_ACCESS);
-  XBT_INFO(" Change access mode of %s to %s",
-           SD_workstation_get_name(workstations[1]),
-           (SD_workstation_get_access_mode(workstations[1]) ==
-           SD_WORKSTATION_SEQUENTIAL_ACCESS) ? "sequential" : "shared");
-
-  /* creation of the tasks and their dependencies */
-  taskA = SD_task_create_comp_seq("Task A", NULL, 2e10);
-  taskB = SD_task_create_comm_e2e("Task B", NULL, 2e8);
-  taskC = SD_task_create_comp_seq("Task C", NULL, 1e10);
-  taskD = SD_task_create_comp_seq("Task D", NULL, 1e11);
-
-  SD_task_dependency_add("B->C", NULL,taskB, taskC);
-
-  /* watch points */
-  SD_task_watch(taskA, SD_RUNNING);
-  SD_task_watch(taskB, SD_RUNNING);
-  SD_task_watch(taskC, SD_RUNNING);
-  SD_task_watch(taskC, SD_DONE);
-  SD_task_watch(taskD, SD_DONE);
-
-
-  /* scheduling parameters */
-  SD_task_schedulel(taskA, 1, workstations[0]);
-  SD_task_schedulel(taskB, 2, workstations[0], workstations[1]);
-  SD_task_schedulel(taskC, 1, workstations[1]);
-  SD_task_schedulel(taskD, 1, workstations[1]);
-
-  /* let's launch the simulation! */
-  while (!xbt_dynar_is_empty(SD_simulate(-1.0))) {
-    XBT_INFO(" Simulation was suspended, check workstation states"); 
-    for (i = 0; i < 2; i++) {
-      SD_workstation_dump(workstations[i]);
-    }
-  }
-
-  XBT_DEBUG("Destroying tasks...");
-
-  SD_task_destroy(taskA);
-  SD_task_destroy(taskB);
-  SD_task_destroy(taskC);
-  SD_task_destroy(taskD);
-
-  XBT_DEBUG("Tasks destroyed. Exiting SimDag...");
-
-  SD_exit();
-  return 0;
-}
index 20f6c47..b56fe8b 100644 (file)
@@ -56,7 +56,6 @@ int main(int argc, char **argv)
   workstations = SD_workstation_get_list();
   w1 = workstations[0];
   w2 = workstations[1];
-  SD_workstation_set_access_mode(w2, SD_WORKSTATION_SEQUENTIAL_ACCESS);
   name1 = SD_workstation_get_name(w1);
   name2 = SD_workstation_get_name(w2);
   computation_amount1 = 2000000;
@@ -104,7 +103,7 @@ int main(int argc, char **argv)
   SD_task_dependency_add(NULL, NULL, taskC, taskA);
   SD_task_dependency_add(NULL, NULL, taskD, taskB);
   SD_task_dependency_add(NULL, NULL, taskD, taskC);
-  /*  SD_task_dependency_add(NULL, NULL, taskA, taskD); /\* deadlock */
+  SD_task_dependency_add(NULL, NULL, taskB, taskC);
 
 
 
index 72fb798..9786b1f 100644 (file)
@@ -15,12 +15,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(sd_seq_access,
 
 int main(int argc, char **argv)
 {
-  int i;
   const char *platform_file;
   const SD_workstation_t *workstations;
-  int kind;
-  SD_task_t task, taskA, taskB, taskC;
-  xbt_dynar_t changed_tasks;
+  SD_task_t taskA, taskB, taskC;
   SD_workstation_t workstation_list[2];
   double computation_amount[2];
   double communication_amount[4] = { 0 };
@@ -46,14 +43,6 @@ int main(int argc, char **argv)
   workstations = SD_workstation_get_list();
   w1 = workstations[0];
   w2 = workstations[1];
-  for (i = 0; i < 2; i++) {
-    SD_workstation_set_access_mode(workstations[i],
-                                   SD_WORKSTATION_SEQUENTIAL_ACCESS);
-    XBT_INFO("Access mode of %s is %s",
-          SD_workstation_get_name(workstations[i]),
-          (SD_workstation_get_access_mode(workstations[i]) ==
-           SD_WORKSTATION_SEQUENTIAL_ACCESS) ? "sequential" : "shared");
-  }
 
   /* creation of the tasks and their dependencies */
   taskA = SD_task_create_comp_seq("Task A", NULL, 2e9);
@@ -66,15 +55,6 @@ int main(int argc, char **argv)
   TRACE_sd_set_task_category (taskB, "taskB");
   TRACE_sd_set_task_category (taskC, "taskC");
 
-  /* if everything is ok, no exception is forwarded or rethrown by main() */
-
-  /* watch points */
-  SD_task_watch(taskA, SD_RUNNING);
-  SD_task_watch(taskB, SD_RUNNING);
-  SD_task_watch(taskC, SD_RUNNING);
-  SD_task_watch(taskC, SD_DONE);
-
-
   /* scheduling parameters */
   workstation_list[0] = w1;
   workstation_list[1] = w2;
@@ -92,37 +72,7 @@ int main(int argc, char **argv)
                    &(computation_amount[1]), SD_SCHED_NO_COST, rate);
 
   /* let's launch the simulation! */
-  while (!xbt_dynar_is_empty(changed_tasks = SD_simulate(-1.0))) {
-    for (i = 0; i < 2; i++) {
-      task = SD_workstation_get_current_task(workstations[i]);
-      if (task)
-        kind = SD_task_get_kind(task);
-      else {
-        XBT_INFO("There is no task running on %s",
-              SD_workstation_get_name(workstations[i]));
-        continue;
-      }
-
-      switch (kind) {
-      case SD_TASK_COMP_SEQ:
-        XBT_INFO("%s is currently running on %s (SD_TASK_COMP_SEQ)",
-              SD_task_get_name(task),
-              SD_workstation_get_name(workstations[i]));
-        break;
-      case SD_TASK_COMM_E2E:
-        XBT_INFO("%s is currently running on %s (SD_TASK_COMM_E2E)",
-              SD_task_get_name(task),
-              SD_workstation_get_name(workstations[i]));
-        break;
-      case SD_TASK_NOT_TYPED:
-        XBT_INFO("Task running on %s has no type",
-              SD_workstation_get_name(workstations[i]));
-        break;
-      default:
-        XBT_ERROR("Shouldn't be here");
-      }
-    }
-  }
+  SD_simulate(-1.0);
 
   XBT_DEBUG("Destroying tasks...");
 
index 6990010..324a4f2 100644 (file)
@@ -7,7 +7,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/sd_fail
 > [0.000000] [sd_fail/INFO] First test: COMP_SEQ task
 > [0.000000] [sd_fail/INFO] Schedule task 'Poor task' on workstation 'Faulty Host'
 > [10.000000] [sd_task/INFO] Displaying task Poor task
-> [10.000000] [sd_task/INFO]   - state:    not runnable    failed
+> [10.000000] [sd_task/INFO]   - state: not runnable failed
 > [10.000000] [sd_task/INFO]   - kind: sequential computation
 > [10.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [10.000000] [sd_task/INFO]   - amount: 20000000000
@@ -16,7 +16,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/sd_fail
 > [10.000000] [sd_fail/INFO] let's unschedule task 'Poor task' and reschedule it on the 'Safe Host'
 > [10.000000] [sd_fail/INFO] Run the simulation again
 > [50.000000] [sd_task/INFO] Displaying task Poor task
-> [50.000000] [sd_task/INFO]   - state:    not runnable   done 
+> [50.000000] [sd_task/INFO]   - state: not runnable done
 > [50.000000] [sd_task/INFO]   - kind: sequential computation
 > [50.000000] [sd_task/INFO]   - tracing category: COMP_SEQ
 > [50.000000] [sd_task/INFO]   - amount: 20000000000
@@ -25,14 +25,14 @@ $ $SG_TEST_EXENV ${bindir:=.}/sd_fail
 > [50.000000] [sd_fail/INFO] Second test: NON TYPED task
 > [50.000000] [sd_fail/INFO] Schedule task 'Poor parallel task' on workstation 'Faulty Host'
 > [60.000000] [sd_task/INFO] Displaying task Poor parallel task
-> [60.000000] [sd_task/INFO]   - state:    not runnable    failed
+> [60.000000] [sd_task/INFO]   - state: not runnable failed
 > [60.000000] [sd_task/INFO]   - amount: 20000000000
 > [60.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
 > [60.000000] [sd_fail/INFO] Task 'Poor parallel task' has failed. 20000000000 flops remain to be done
 > [60.000000] [sd_fail/INFO] let's unschedule task 'Poor parallel task' and reschedule it on the 'Safe Host'
 > [60.000000] [sd_fail/INFO] Run the simulation again
 > [100.000000] [sd_task/INFO] Displaying task Poor parallel task
-> [100.000000] [sd_task/INFO]   - state:    not runnable   done 
+> [100.000000] [sd_task/INFO]   - state: not runnable done
 > [100.000000] [sd_task/INFO]   - amount: 20000000000
 > [100.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
 > [100.000000] [sd_fail/INFO] Task 'Poor parallel task' start time: 60.000000, finish time: 100.000000
diff --git a/examples/simdag/test_simdag_seq_access.tesh b/examples/simdag/test_simdag_seq_access.tesh
deleted file mode 100644 (file)
index d7de480..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#! ./tesh
-
-p Simple test of simdag
-
-$ $SG_TEST_EXENV ./sd_seq_access ${srcdir:=.}/2clusters.xml
-> [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [0.000000] [sd_workstation/INFO]   - access mode: Space shared
-> [0.000000] [sd_seq_access/INFO]  Change access mode of C2-05 to sequential
-> [0.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [0.000000] [sd_workstation/INFO]   - access mode: Space shared
-> [0.000000] [sd_seq_access/INFO]  Change access mode of C2-06 to sequential
-> [0.000000] [sd_seq_access/INFO]  Change access mode of C2-06 to shared
-> [0.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
-> [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [0.000000] [sd_workstation/INFO]   - access mode: Exclusive
-> [0.000000] [sd_workstation/INFO]     current running task: Task A
-> [0.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [0.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [0.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [0.000000] [sd_workstation/INFO]   - access mode: Space shared
-> [4.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
-> [4.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [4.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [4.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [4.000000] [sd_workstation/INFO]   - access mode: Exclusive
-> [4.000000] [sd_workstation/INFO]     current running task: Task B
-> [4.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [4.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [4.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [4.000000] [sd_workstation/INFO]   - access mode: Space shared
-> [5.600300] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
-> [5.600300] [sd_workstation/INFO] Displaying workstation C2-05
-> [5.600300] [sd_workstation/INFO]   - speed: 5000000000
-> [5.600300] [sd_workstation/INFO]   - available speed: 1.00
-> [5.600300] [sd_workstation/INFO]   - access mode: Exclusive
-> [5.600300] [sd_workstation/INFO]     no task running
-> [5.600300] [sd_workstation/INFO] Displaying workstation C2-06
-> [5.600300] [sd_workstation/INFO]   - speed: 5000000000
-> [5.600300] [sd_workstation/INFO]   - available speed: 1.00
-> [5.600300] [sd_workstation/INFO]   - access mode: Space shared
-> [9.600300] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
-> [9.600300] [sd_workstation/INFO] Displaying workstation C2-05
-> [9.600300] [sd_workstation/INFO]   - speed: 5000000000
-> [9.600300] [sd_workstation/INFO]   - available speed: 1.00
-> [9.600300] [sd_workstation/INFO]   - access mode: Exclusive
-> [9.600300] [sd_workstation/INFO]     no task running
-> [9.600300] [sd_workstation/INFO] Displaying workstation C2-06
-> [9.600300] [sd_workstation/INFO]   - speed: 5000000000
-> [9.600300] [sd_workstation/INFO]   - available speed: 1.00
-> [9.600300] [sd_workstation/INFO]   - access mode: Space shared
-> [22.000000] [sd_seq_access/INFO]  Simulation was suspended, check workstation states
-> [22.000000] [sd_workstation/INFO] Displaying workstation C2-05
-> [22.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [22.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [22.000000] [sd_workstation/INFO]   - access mode: Exclusive
-> [22.000000] [sd_workstation/INFO]     no task running
-> [22.000000] [sd_workstation/INFO] Displaying workstation C2-06
-> [22.000000] [sd_workstation/INFO]   - speed: 5000000000
-> [22.000000] [sd_workstation/INFO]   - available speed: 1.00
-> [22.000000] [sd_workstation/INFO]   - access mode: Space shared
index 8c50b9f..0ed15bb 100644 (file)
@@ -7,16 +7,6 @@ $ $SG_TEST_EXENV ./simdag_tracing --cfg=tracing:yes --cfg=tracing/categorized:ye
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
 > [0.000000] [surf_host/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [sd_seq_access/INFO] Access mode of C2-05 is sequential
-> [0.000000] [sd_seq_access/INFO] Access mode of C2-06 is sequential
-> [0.000000] [sd_seq_access/INFO] Task A is currently running on C2-05 (SD_TASK_COMP_SEQ)
-> [0.000000] [sd_seq_access/INFO] There is no task running on C2-06
-> [0.400000] [sd_seq_access/INFO] Task B is currently running on C2-05 (SD_TASK_COMM_E2E)
-> [0.400000] [sd_seq_access/INFO] Task B is currently running on C2-06 (SD_TASK_COMM_E2E)
-> [8.400300] [sd_seq_access/INFO] Task C is currently running on C2-05 (SD_TASK_COMP_SEQ)
-> [8.400300] [sd_seq_access/INFO] There is no task running on C2-06
-> [8.800300] [sd_seq_access/INFO] There is no task running on C2-05
-> [8.800300] [sd_seq_access/INFO] There is no task running on C2-06
 
 $ tail -n +3 ./simgrid.trace
 > %EventDef PajeDefineContainerType 0
@@ -258,30 +248,30 @@ $ tail -n +3 ./simgrid.trace
 > 1 16 1 ptaskB "0.623917 0.040883 0.634111"
 > 1 17 3 btaskC "0.832485 0.956278 0.337734"
 > 1 18 1 ptaskC "0.832485 0.956278 0.337734"
-> 7 8.800300 1 10
-> 7 8.800300 1 1
-> 7 8.800300 1 3
-> 7 8.800300 1 6
-> 7 8.800300 1 4
-> 7 8.800300 1 9
-> 7 8.800300 3 24
-> 7 8.800300 1 7
-> 7 8.800300 3 12
-> 7 8.800300 1 5
-> 7 8.800300 3 16
-> 7 8.800300 1 2
-> 7 8.800300 3 23
-> 7 8.800300 1 8
-> 7 8.800300 3 18
-> 7 8.800300 3 22
-> 7 8.800300 3 20
-> 7 8.800300 3 17
-> 7 8.800300 3 13
-> 7 8.800300 3 21
-> 7 8.800300 3 25
-> 7 8.800300 3 11
-> 7 8.800300 3 14
-> 7 8.800300 3 19
-> 7 8.800300 3 15
+> 7 8.000300 1 10
+> 7 8.000300 1 1
+> 7 8.000300 1 3
+> 7 8.000300 1 6
+> 7 8.000300 1 4
+> 7 8.000300 1 9
+> 7 8.000300 3 24
+> 7 8.000300 1 7
+> 7 8.000300 3 12
+> 7 8.000300 1 5
+> 7 8.000300 3 16
+> 7 8.000300 1 2
+> 7 8.000300 3 23
+> 7 8.000300 1 8
+> 7 8.000300 3 18
+> 7 8.000300 3 22
+> 7 8.000300 3 20
+> 7 8.000300 3 17
+> 7 8.000300 3 13
+> 7 8.000300 3 21
+> 7 8.000300 3 25
+> 7 8.000300 3 11
+> 7 8.000300 3 14
+> 7 8.000300 3 19
+> 7 8.000300 3 15
 
 $ rm -f simgrid.trace
index bbd0734..dbd011f 100644 (file)
@@ -24,21 +24,6 @@ SG_BEGIN_DECL()
     @see SD_workstation_management */
 typedef sg_host_t SD_workstation_t;
 
-/** @brief Workstation access mode
-    @ingroup SD_datatypes_management
-
-    By default, a workstation resource is shared, i.e. several tasks
-    can be executed at the same time on a workstation. The CPU power of
-    the workstation is shared between the running tasks on the workstation.
-    In sequential mode, only one task can use the workstation, and the other
-    tasks wait in a FIFO.
-
-    @see SD_workstation_get_access_mode(), SD_workstation_set_access_mode() */
-typedef enum {
-  SD_WORKSTATION_SHARED_ACCESS,     /**< @brief Several tasks can be executed at the same time */
-  SD_WORKSTATION_SEQUENTIAL_ACCESS  /**< @brief Only one task can be executed, the others wait in a FIFO. */
-} e_SD_workstation_access_mode_t;
-
 /** @brief Link datatype
     @ingroup SD_datatypes_management
 
@@ -71,10 +56,9 @@ typedef enum {
   SD_SCHEDULED = 0x0002,     /**< @brief A task becomes SD_SCHEDULED when you call function
                                   SD_task_schedule. SD_simulate will execute it when it becomes SD_RUNNABLE. */
   SD_RUNNABLE = 0x0004,      /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
-  SD_IN_FIFO = 0x0008,       /**< @brief A runnable task can have to wait in a workstation fifo if the workstation is sequential */
-  SD_RUNNING = 0x0010,       /**< @brief An SD_RUNNABLE or SD_IN_FIFO becomes SD_RUNNING when it is launched. */
-  SD_DONE = 0x0020,          /**< @brief The task is successfully finished. */
-  SD_FAILED = 0x0040         /**< @brief A problem occurred during the execution of the task. */
+  SD_RUNNING = 0x0008,       /**< @brief An SD_RUNNABLE task becomes SD_RUNNING when it is launched. */
+  SD_DONE = 0x0010,          /**< @brief The task is successfully finished. */
+  SD_FAILED = 0x0020         /**< @brief A problem occurred during the execution of the task. */
 } e_SD_task_state_t;
 
 /** @brief Task kinds
@@ -138,12 +122,6 @@ XBT_PUBLIC(double) SD_workstation_get_speed(SD_workstation_t workstation);
 XBT_PUBLIC(double) SD_workstation_get_available_speed(SD_workstation_t
                                                       workstation);
 XBT_PUBLIC(int) SD_workstation_get_cores(SD_workstation_t workstation);
-XBT_PUBLIC(e_SD_workstation_access_mode_t)
-    SD_workstation_get_access_mode(SD_workstation_t workstation);
-XBT_PUBLIC(void) SD_workstation_set_access_mode(SD_workstation_t
-                                                workstation,
-                                                e_SD_workstation_access_mode_t
-                                                access_mode);
 
 XBT_PUBLIC(double) SD_workstation_get_computation_time(SD_workstation_t workstation,
                                                        double flops_amount);
@@ -155,7 +133,6 @@ XBT_PUBLIC(double) SD_route_get_communication_time(SD_workstation_t src,
                                                    SD_workstation_t dst,
                                                    double bytes_amount);
 
-XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dict_t)
     SD_workstation_get_mounted_storage_list(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dynar_t)
index 0eb1691..3119cfd 100644 (file)
@@ -235,10 +235,9 @@ xbt_dynar_t SD_simulate(double how_long) {
   /* explore the runnable tasks */
   xbt_dynar_foreach(sd_global->executable_task_set , iter, task) {
     XBT_VERB("Executing task '%s'", SD_task_get_name(task));
-    if (__SD_task_try_to_run(task)){
-      xbt_dynar_push(sd_global->return_set, &task);
-      iter--;
-    }
+    SD_task_run(task);
+    xbt_dynar_push(sd_global->return_set, &task);
+    iter--;
   }
 
   /* main loop */
@@ -265,10 +264,9 @@ xbt_dynar_t SD_simulate(double how_long) {
 
         task->finish_time = surf_get_clock();
         XBT_VERB("Task '%s' done", SD_task_get_name(task));
-        XBT_DEBUG("Calling __SD_task_just_done");
-        __SD_task_just_done(task);
-        XBT_DEBUG("__SD_task_just_done called on task '%s'",
-               SD_task_get_name(task));
+        SD_task_set_state(task, SD_DONE);
+        task->surf_action->unref();
+        task->surf_action = NULL;
 
         /* the state has changed. Add it only if it's the first change */
         if (xbt_dynar_search_or_negative(sd_global->return_set, &task) < 0) {
@@ -322,8 +320,8 @@ xbt_dynar_t SD_simulate(double how_long) {
           if (SD_task_get_state(dst) == SD_RUNNABLE
               && !sd_global->watch_point_reached) {
             XBT_VERB("Executing task '%s'", SD_task_get_name(dst));
-            if (__SD_task_try_to_run(dst))
-              xbt_dynar_push(sd_global->return_set, &dst);
+            SD_task_run(dst);
+            xbt_dynar_push(sd_global->return_set, &dst);
           }
         }
       }
@@ -351,7 +349,7 @@ xbt_dynar_t SD_simulate(double how_long) {
              (int) xbt_dynar_length(sd_global->completed_task_set)));
         static const char* state_names[] =
               { "SD_NOT_SCHEDULED", "SD_SCHEDULABLE", "SD_SCHEDULED",
-                "SD_RUNNABLE", "SD_IN_INFO", "SD_RUNNING", "SD_DONE",
+                "SD_RUNNABLE", "SD_RUNNING", "SD_DONE",
                 "SD_FAILED" };
         xbt_dynar_foreach(sd_global->initial_task_set, iter, task){
           XBT_WARN("%s is in %s state", SD_task_get_name(task),
index 1330804..655197b 100644 (file)
@@ -347,11 +347,6 @@ void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
       xbt_dynar_push(sd_global->initial_task_set,&task);
     }
     break;
-  case SD_IN_FIFO:
-    xbt_dynar_remove_at(sd_global->executable_task_set,
-       xbt_dynar_search(sd_global->executable_task_set, &task), NULL);
-    xbt_dynar_push(sd_global->initial_task_set,&task);
-    break;
   case SD_RUNNABLE:
     idx = xbt_dynar_search_or_negative(sd_global->initial_task_set, &task);
     if (idx >= 0) {
@@ -360,15 +355,8 @@ void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
     }
     break;
   case SD_RUNNING:
-    if (SD_task_get_state(task) == SD_RUNNABLE){
       xbt_dynar_remove_at(sd_global->executable_task_set,
          xbt_dynar_search(sd_global->executable_task_set, &task), NULL);
-    } else {
-      if (SD_task_get_state(task) == SD_IN_FIFO){
-        xbt_dynar_remove_at(sd_global->initial_task_set,
-            xbt_dynar_search(sd_global->initial_task_set, &task), NULL);
-      }
-    }
     break;
   case SD_DONE:
     xbt_dynar_push(sd_global->completed_task_set,&task);
@@ -545,18 +533,17 @@ void SD_task_dump(SD_task_t task)
   char *statename;
 
   XBT_INFO("Displaying task %s", SD_task_get_name(task));
-  statename = bprintf("%s %s %s %s %s %s %s %s",
-                      (task->state == SD_NOT_SCHEDULED ? "not scheduled" :
+  statename = bprintf("%s%s%s%s%s%s%s",
+                      (task->state == SD_NOT_SCHEDULED ? " not scheduled" :
                        ""),
-                      (task->state == SD_SCHEDULABLE ? "schedulable" : ""),
-                      (task->state == SD_SCHEDULED ? "scheduled" : ""),
-                      (task->state == SD_RUNNABLE ? "runnable" :
-                       "not runnable"),
-                      (task->state == SD_IN_FIFO ? "in fifo" : ""),
-                      (task->state == SD_RUNNING ? "running" : ""),
-                      (task->state == SD_DONE ? "done" : ""),
-                      (task->state == SD_FAILED ? "failed" : ""));
-  XBT_INFO("  - state: %s", statename);
+                      (task->state == SD_SCHEDULABLE ? " schedulable" : ""),
+                      (task->state == SD_SCHEDULED ? " scheduled" : ""),
+                      (task->state == SD_RUNNABLE ? " runnable" :
+                       " not runnable"),
+                      (task->state == SD_RUNNING ? " running" : ""),
+                      (task->state == SD_DONE ? " done" : ""),
+                      (task->state == SD_FAILED ? " failed" : ""));
+  XBT_INFO("  - state:%s", statename);
   free(statename);
 
   if (task->kind != 0) {
@@ -1065,10 +1052,9 @@ void SD_task_unschedule(SD_task_t task)
  */
 static void __SD_task_destroy_scheduling_data(SD_task_t task)
 {
-  if (!__SD_task_is_scheduled_or_runnable(task)
-      && SD_task_get_state(task) != SD_IN_FIFO)
+  if (!__SD_task_is_scheduled_or_runnable(task))
     THROWF(arg_error, 0,
-           "Task '%s' must be SD_SCHEDULED, SD_RUNNABLE or SD_IN_FIFO",
+           "Task '%s' must be SD_SCHEDULED or SD_RUNNABLE",
            SD_task_get_name(task));
 
   xbt_free(task->flops_amount);
@@ -1080,38 +1066,23 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task)
  * the task doesn't have to wait in FIFOs. Otherwise, it is called by
  * __SD_task_just_done when the task gets out of its FIFOs.
  */
-void __SD_task_really_run(SD_task_t task)
+void SD_task_run(SD_task_t task)
 {
 
   int i;
   sg_host_t *hosts;
 
-  xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
-              "Task '%s' is not runnable or in a fifo! Task state: %d",
+  xbt_assert(SD_task_get_state(task) == SD_RUNNABLE,
+             "Task '%s' is not runnable! Task state: %d",
              SD_task_get_name(task), (int)SD_task_get_state(task));
   xbt_assert(task->workstation_list != NULL,
               "Task '%s': workstation_list is NULL!",
               SD_task_get_name(task));
 
-  XBT_DEBUG("Really running task '%s'", SD_task_get_name(task));
-  int host_nb = task->workstation_nb;
-
-  /* set this task as current task for the workstations in sequential mode */
-  for (i = 0; i < host_nb; i++) {
-    if (SD_workstation_get_access_mode(task->workstation_list[i]) ==
-        SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-       sg_host_sd(task->workstation_list[i])->current_task = task;
-      xbt_assert(__SD_workstation_is_busy(task->workstation_list[i]),
-                  "The workstation should be busy now");
-    }
-  }
-
-  XBT_DEBUG("Task '%s' set as current task for its workstations",
-         SD_task_get_name(task));
-
-  /* start the task */
+  XBT_DEBUG("Running task '%s'", SD_task_get_name(task));
 
   /* Copy the elements of the task into the action */
+  int host_nb = task->workstation_nb;
   hosts = xbt_new(sg_host_t, host_nb);
 
   for (i = 0; i < host_nb; i++)
@@ -1120,10 +1091,8 @@ void __SD_task_really_run(SD_task_t task)
   double *flops_amount = xbt_new0(double, host_nb);
   double *bytes_amount = xbt_new0(double, host_nb * host_nb);
 
-
   if(task->flops_amount)
-    memcpy(flops_amount, task->flops_amount, sizeof(double) *
-           host_nb);
+    memcpy(flops_amount, task->flops_amount, sizeof(double) * host_nb);
   if(task->bytes_amount)
     memcpy(bytes_amount, task->bytes_amount,
            sizeof(double) * host_nb * host_nb);
@@ -1146,208 +1115,6 @@ void __SD_task_really_run(SD_task_t task)
 
 }
 
-/* Tries to run a task. This function is called by SD_simulate() when a
- * scheduled task becomes SD_RUNNABLE (i.e., when its dependencies are
- * satisfied).
- * If one of the workstations where the task is scheduled on is busy (in
- * sequential mode), the task doesn't start.
- * Returns whether the task has started.
- */
-int __SD_task_try_to_run(SD_task_t task)
-{
-
-  int can_start = 1;
-  int i;
-  SD_workstation_t workstation;
-
-  xbt_assert(SD_task_get_state(task) == SD_RUNNABLE,
-              "Task '%s' is not runnable! Task state: %d",
-             SD_task_get_name(task), (int)SD_task_get_state(task));
-
-
-  for (i = 0; i < task->workstation_nb; i++) {
-    can_start = can_start &&
-        !__SD_workstation_is_busy(task->workstation_list[i]);
-  }
-
-  XBT_DEBUG("Task '%s' can start: %d", SD_task_get_name(task), can_start);
-
-  if (!can_start) {             /* if the task cannot start and is not in the FIFOs yet */
-    for (i = 0; i < task->workstation_nb; i++) {
-      workstation = task->workstation_list[i];
-      if (sg_host_sd(workstation)->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-        XBT_DEBUG("Pushing task '%s' in the FIFO of workstation '%s'",
-               SD_task_get_name(task),
-               SD_workstation_get_name(workstation));
-        xbt_fifo_push(sg_host_sd(workstation)->task_fifo, task);
-      }
-    }
-    SD_task_set_state(task, SD_IN_FIFO);
-    XBT_DEBUG("Task '%s' state is now SD_IN_FIFO", SD_task_get_name(task));
-  } else {
-    __SD_task_really_run(task);
-  }
-
-  return can_start;
-}
-
-/* This function is called by SD_simulate when a task is done.
- * It updates task->state and task->action and executes if necessary the tasks
- * which were waiting in FIFOs for the end of `task'
- */
-void __SD_task_just_done(SD_task_t task)
-{
-  int i, j;
-  SD_workstation_t workstation;
-
-  SD_task_t candidate;
-  int candidate_nb = 0;
-  int candidate_capacity = 8;
-  SD_task_t *candidates;
-  int can_start = 1;
-
-  xbt_assert(SD_task_get_state(task)== SD_RUNNING,
-              "The task must be running! Task state: %d",
-              (int)SD_task_get_state(task));
-  xbt_assert(task->workstation_list != NULL,
-              "Task '%s': workstation_list is NULL!",
-              SD_task_get_name(task));
-
-
-  candidates = xbt_new(SD_task_t, 8);
-
-  SD_task_set_state(task, SD_DONE);
-  task->surf_action->unref();
-  task->surf_action = NULL;
-
-  XBT_DEBUG("Looking for candidates");
-
-  /* if the task was executed on sequential workstations,
-     maybe we can execute the next task of the FIFO for each workstation */
-  for (i = 0; i < task->workstation_nb; i++) {
-    workstation = task->workstation_list[i];
-    XBT_DEBUG("Workstation '%s': access_mode = %d",
-              SD_workstation_get_name(workstation),
-              (int)sg_host_sd(workstation)->access_mode);
-    if (sg_host_sd(workstation)->access_mode ==
-        SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-      xbt_assert(sg_host_sd(workstation)->task_fifo != NULL,
-                  "Workstation '%s' has sequential access but no FIFO!",
-                  SD_workstation_get_name(workstation));
-      xbt_assert(sg_host_sd(workstation)->current_task =
-                  task, "Workstation '%s': current task should be '%s'",
-                  SD_workstation_get_name(workstation),
-                  SD_task_get_name(task));
-
-      /* the task is over so we can release the workstation */
-      sg_host_sd(workstation)->current_task = NULL;
-
-      XBT_DEBUG("Getting candidate in FIFO");
-      candidate = (SD_task_t)
-          xbt_fifo_get_item_content(xbt_fifo_get_first_item
-                                    (sg_host_sd(workstation)->task_fifo));
-
-      if (candidate != NULL) {
-        XBT_DEBUG("Candidate: '%s'", SD_task_get_name(candidate));
-        xbt_assert(SD_task_get_state(candidate) == SD_IN_FIFO,
-                    "Bad state of candidate '%s': %d",
-                    SD_task_get_name(candidate),
-                    (int)SD_task_get_state(candidate));
-      }
-
-      XBT_DEBUG("Candidate in fifo: %p", candidate);
-
-      /* if there was a task waiting for my place */
-      if (candidate != NULL) {
-        /* Unfortunately, we are not sure yet that we can execute the task now,
-           because the task can be waiting more deeply in some other
-           workstation's FIFOs ...
-           So we memorize all candidate tasks, and then we will check for each
-           candidate whether or not all its workstations are available. */
-
-        /* realloc if necessary */
-        if (candidate_nb == candidate_capacity) {
-          candidate_capacity *= 2;
-          candidates = (SD_task_t*)
-              xbt_realloc(candidates,
-                          sizeof(SD_task_t) * candidate_capacity);
-        }
-
-        /* register the candidate */
-        candidates[candidate_nb++] = candidate;
-        candidate->fifo_checked = 0;
-      }
-    }
-  }
-
-  XBT_DEBUG("Candidates found: %d", candidate_nb);
-
-  /* now we check every candidate task */
-  for (i = 0; i < candidate_nb; i++) {
-    candidate = candidates[i];
-
-    if (candidate->fifo_checked) {
-      continue;                 /* we have already evaluated that task */
-    }
-
-    xbt_assert(SD_task_get_state(candidate) == SD_IN_FIFO,
-                "Bad state of candidate '%s': %d",
-               SD_task_get_name(candidate), (int)SD_task_get_state(candidate));
-
-    for (j = 0; j < candidate->workstation_nb && can_start; j++) {
-      workstation = candidate->workstation_list[j];
-
-      /* I can start on this workstation if the workstation is shared
-         or if I am the first task in the FIFO */
-      can_start = sg_host_sd(workstation)->access_mode == SD_WORKSTATION_SHARED_ACCESS
-          || candidate ==
-          xbt_fifo_get_item_content(xbt_fifo_get_first_item
-                                    (sg_host_sd(workstation)->task_fifo));
-    }
-
-    XBT_DEBUG("Candidate '%s' can start: %d", SD_task_get_name(candidate),
-           can_start);
-
-    /* now we are sure that I can start! */
-    if (can_start) {
-      for (j = 0; j < candidate->workstation_nb && can_start; j++) {
-        workstation = candidate->workstation_list[j];
-
-        /* update the FIFO */
-        if (sg_host_sd(workstation)->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-          candidate = (SD_task_t)xbt_fifo_shift(sg_host_sd(workstation)->task_fifo);   /* the return value is stored just for debugging */
-          XBT_DEBUG("Head of the FIFO: '%s' on workstation %s (%d task left)",
-                 (candidate !=
-                  NULL) ? SD_task_get_name(candidate) : "NULL",
-                  SD_workstation_get_name(workstation),
-                  xbt_fifo_size(sg_host_sd(workstation)->task_fifo));
-          xbt_assert(candidate == candidates[i],
-                      "Error in __SD_task_just_done: bad first task in the FIFO");
-
-        }
-      }                         /* for each workstation */
-
-      /* finally execute the task */
-      XBT_DEBUG("Task '%s' state: %d", SD_task_get_name(candidate),
-             (int)SD_task_get_state(candidate));
-      __SD_task_really_run(candidate);
-
-      XBT_DEBUG
-          ("Calling __SD_task_is_running: task '%s', state set: %d",
-           SD_task_get_name(candidate), candidate->state);
-      xbt_assert(SD_task_get_state(candidate) == SD_RUNNING,
-                  "Bad state of task '%s': %d",
-                  SD_task_get_name(candidate),
-                 (int)SD_task_get_state(candidate));
-      XBT_DEBUG("Okay, the task is running.");
-
-    }                           /* can start */
-    candidate->fifo_checked = 1;
-  }                             /* for each candidate */
-
-  xbt_free(candidates);
-}
-
 /* 
  * Remove all dependencies associated with a task. This function is called 
  * when the task is destroyed.
index d37cead..92bf84a 100644 (file)
@@ -20,16 +20,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_workstation, sd,
  */
 SD_workstation_t __SD_workstation_create(const char *name)
 {
-
-  SD_workstation_priv_t workstation;
-
-  workstation = xbt_new(s_SD_workstation_priv_t, 1);
-  workstation->access_mode = SD_WORKSTATION_SHARED_ACCESS;      /* default mode is shared */
-  workstation->task_fifo = NULL;
-  workstation->current_task = NULL;
-
   sg_host_t sg_host = sg_host_by_name(name);
-  sg_host_sd_set(sg_host,workstation);
   return sg_host;
 }
 
@@ -171,26 +162,10 @@ void SD_workstation_dump(SD_workstation_t ws)
   xbt_dict_t props;
   xbt_dict_cursor_t cursor=NULL;
   char *key,*data;
-  SD_task_t task = NULL;
-  
+
   XBT_INFO("Displaying workstation %s", SD_workstation_get_name(ws));
   XBT_INFO("  - speed: %.0f", SD_workstation_get_speed(ws));
   XBT_INFO("  - available speed: %.2f", SD_workstation_get_available_speed(ws));
-  switch (sg_host_sd(ws)->access_mode){
-  case SD_WORKSTATION_SHARED_ACCESS:
-      XBT_INFO("  - access mode: Space shared");
-      break;
-  case SD_WORKSTATION_SEQUENTIAL_ACCESS:
-      XBT_INFO("  - access mode: Exclusive");
-    task = SD_workstation_get_current_task(ws);
-    if(task)
-      XBT_INFO("    current running task: %s",
-               SD_task_get_name(task));
-    else
-      XBT_INFO("    no task running");
-      break;
-  default: break;
-  }
   props = SD_workstation_get_properties(ws);
   
   if (!xbt_dict_is_empty(props)){
@@ -393,58 +368,6 @@ double SD_route_get_communication_time(SD_workstation_t src,
   return latency + (bytes_amount / min_bandwidth);
 }
 
-/**
- * \brief Returns the access mode of this workstation.
- *
- * \param workstation a workstation
- * \return the access mode for the tasks running on this workstation:
- * SD_WORKSTATION_SHARED_ACCESS or SD_WORKSTATION_SEQUENTIAL_ACCESS
- *
- * \see SD_workstation_set_access_mode(), e_SD_workstation_access_mode_t
- */
-e_SD_workstation_access_mode_t
-SD_workstation_get_access_mode(SD_workstation_t workstation)
-{
-  return sg_host_sd(workstation)->access_mode;
-}
-
-/**
- * \brief Sets the access mode for the tasks that will be executed on a workstation
- *
- * By default, a workstation model is shared, i.e. several tasks
- * can be executed at the same time on a workstation. The CPU power of
- * the workstation is shared between the running tasks on the workstation.
- * In sequential mode, only one task can use the workstation, and the other
- * tasks wait in a FIFO.
- *
- * \param workstation a workstation
- * \param access_mode the access mode you want to set to this workstation:
- * SD_WORKSTATION_SHARED_ACCESS or SD_WORKSTATION_SEQUENTIAL_ACCESS
- *
- * \see SD_workstation_get_access_mode(), e_SD_workstation_access_mode_t
- */
-void SD_workstation_set_access_mode(SD_workstation_t workstation,
-                                    e_SD_workstation_access_mode_t
-                                    access_mode)
-{
-  xbt_assert(access_mode != SD_WORKSTATION_SEQUENTIAL_ACCESS ||
-             access_mode != SD_WORKSTATION_SHARED_ACCESS,
-             "Trying to set an invalid access mode");
-
-  if (access_mode == sg_host_sd(workstation)->access_mode) {
-    return;                     // nothing is changed
-  }
-
-  sg_host_sd(workstation)->access_mode = access_mode;
-
-  if (access_mode == SD_WORKSTATION_SHARED_ACCESS) {
-    xbt_fifo_free(sg_host_sd(workstation)->task_fifo);
-    sg_host_sd(workstation)->task_fifo = NULL;
-  } else {
-         sg_host_sd(workstation)->task_fifo = xbt_fifo_new();
-  }
-}
-
 /**
  * \brief Return the list of mounted storages on a workstation.
  *
@@ -475,68 +398,3 @@ const char *SD_storage_get_host(msg_storage_t storage) {
   SD_storage_priv_t priv = SD_storage_priv(storage);
   return priv->host;
 }
-
-/* Returns whether a task can start now on a workstation*/
-/*
-  int __SD_workstation_can_start(SD_workstation_t workstation, SD_task_t task) {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL && task != NULL, "Invalid parameter");
-
-  return !__SD_workstation_is_busy(workstation) &&
-  (xbt_fifo_size(workstation->task_fifo) == 0) || xbt_fifo_get_first_item(workstation->task_fifo) == task);
-  }
-*/
-
-/* Returns whether a workstation is busy. A workstation is busy is it is
- * in sequential mode and a task is running on it or the fifo is not empty.
- */
-int __SD_workstation_is_busy(SD_workstation_t workstation)
-{
-  XBT_DEBUG
-      ("Workstation '%s' access mode: '%s', current task: %s, fifo size: %d",
-       SD_workstation_get_name(workstation),
-       (sg_host_sd(workstation)->access_mode ==
-        SD_WORKSTATION_SHARED_ACCESS) ? "SHARED" : "FIFO",
-       (sg_host_sd(workstation)->current_task ?
-        SD_task_get_name(sg_host_sd(workstation)->current_task)
-        : "none"),
-       (sg_host_sd(workstation)->task_fifo ? xbt_fifo_size(sg_host_sd(workstation)->task_fifo) :
-        0));
-
-  return sg_host_sd(workstation)->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS &&
-      (sg_host_sd(workstation)->current_task != NULL
-       || xbt_fifo_size(sg_host_sd(workstation)->task_fifo) > 0);
-}
-
-/* Destroys a workstation.
- */
-void __SD_workstation_destroy(void *workstation)
-{
-
-  if (workstation==NULL)
-         return;
-  SD_workstation_priv_t w;
-
-  /* workstation->surf_workstation is freed by surf_exit and workstation->data is freed by the user */
-
-  w = (SD_workstation_priv_t) workstation;
-
-  if (w->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS) {
-    xbt_fifo_free(w->task_fifo);
-  }
-  xbt_free(w);
-}
-
-/** 
- * \brief Returns the kind of the task currently running on a workstation
- * Only call this with sequential access mode set
- * \param workstation a workstation */
-SD_task_t SD_workstation_get_current_task(SD_workstation_t workstation)
-{
-  xbt_assert(sg_host_sd(workstation)->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS,
-              "Access mode must be set to SD_WORKSTATION_SEQUENTIAL_ACCESS"
-              " to use this function");
-
-  return (sg_host_sd(workstation)->current_task);
-}
-
index 49377cf..300aa22 100644 (file)
@@ -10,7 +10,6 @@
 #include "xbt/base.h"
 #include "xbt/dict.h"
 #include "xbt/dynar.h"
-#include "xbt/fifo.h"
 #include "simgrid/simdag.h"
 #include "surf/surf.h"
 #include "xbt/mallocator.h"
@@ -44,12 +43,6 @@ extern XBT_PRIVATE SD_global_t sd_global;
 
 /* Workstation */
 typedef s_xbt_dictelm_t s_SD_workstation_t;
-typedef struct SD_workstation {
-  e_SD_workstation_access_mode_t access_mode;
-
-  xbt_fifo_t task_fifo;         /* only used in sequential mode */
-  SD_task_t current_task;       /* only used in sequential mode */
-} s_SD_workstation_priv_t, *SD_workstation_priv_t;
 
 /* Storage */
 typedef s_xbt_dictelm_t s_SD_storage_t;
@@ -76,8 +69,6 @@ typedef struct SD_task {
   surf_action_t surf_action;
   unsigned short watch_points;  /* bit field xor()ed with masks */
 
-  int fifo_checked;             /* used by SD_task_just_done to make sure we evaluate
-                                   the task only once */
   int marked;                   /* used to check if the task DAG has some cycle*/
 
   /* dependencies */
@@ -112,9 +103,7 @@ XBT_PRIVATE void __SD_workstation_destroy(void *workstation);
 XBT_PRIVATE int __SD_workstation_is_busy(SD_workstation_t workstation);
 
 XBT_PRIVATE void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state);
-XBT_PRIVATE void __SD_task_really_run(SD_task_t task);
-XBT_PRIVATE void __SD_task_just_done(SD_task_t task);
-XBT_PRIVATE int __SD_task_try_to_run(SD_task_t task);
+XBT_PRIVATE void SD_task_run(SD_task_t task);
 XBT_PRIVATE bool acyclic_graph_detail(xbt_dynar_t dag);
 XBT_PRIVATE void uniq_transfer_task_name(SD_task_t task);
 
@@ -137,12 +126,6 @@ static XBT_INLINE int __SD_task_is_schedulable_or_done(SD_task_t task)
   return task->state == SD_SCHEDULABLE || task->state == SD_DONE;
 }
 
-/* Returns whether the state of the given task is SD_RUNNABLE or SD_IN_FIFO. */
-static XBT_INLINE int __SD_task_is_runnable_or_in_fifo(SD_task_t task)
-{
-  return task->state == SD_RUNNABLE || task->state == SD_IN_FIFO;
-}
-
 /********** Storage **********/
 XBT_PRIVATE SD_storage_t __SD_storage_create(void *surf_storage, void *data);
 XBT_PRIVATE void __SD_storage_destroy(void *storage);
index 7b650aa..8e52780 100644 (file)
@@ -59,7 +59,6 @@ xbt_dynar_t sg_hosts_as_dynar(void)
 // ========= Layering madness ==============*
 
 #include "src/msg/msg_private.h" // MSG_host_priv_free. FIXME: killme by initializing that level in msg when used
-#include "src/simdag/simdag_private.h" // __SD_workstation_destroy. FIXME: killme by initializing that level in simdag when used
 #include "src/simix/smx_host_private.h" // SIMIX_host_destroy. FIXME: killme by initializing that level in simix when used
 #include "src/surf/cpu_interface.hpp"
 #include "src/surf/surf_routing.hpp"
@@ -74,7 +73,7 @@ void sg_host_init()
          delete static_cast<simgrid::surf::NetCard*>(p);
   });
 
-  SD_HOST_LEVEL = simgrid::s4u::Host::extension_create(__SD_workstation_destroy);
+  SD_HOST_LEVEL = simgrid::s4u::Host::extension_create(NULL);
   SIMIX_HOST_LEVEL = simgrid::s4u::Host::extension_create(SIMIX_host_destroy);
   USER_HOST_LEVEL = simgrid::s4u::Host::extension_create(NULL);
 }
index 949b761..44c079a 100644 (file)
@@ -330,7 +330,6 @@ IF(NOT enable_memcheck)
   ENDIF()
   ADD_TESH(simdag-simdag                         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag.tesh)
   ADD_TESH(simdag-simdag2                        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag2.tesh)
-  ADD_TESH(simdag-seq-access                     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_seq_access.tesh)
   ADD_TESH(simdag-typed-tasks                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_typed_tasks.tesh)
   ADD_TESH(simdag-fail                         --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_fail.tesh)
   ADD_TESH(simdag-avail                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_avail.tesh)