Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'upstream/master' into issue95
authorBruno Donassolo <bruno.donassolo@inria.fr>
Wed, 5 Jan 2022 14:41:42 +0000 (15:41 +0100)
committerBruno Donassolo <bruno.donassolo@inria.fr>
Wed, 5 Jan 2022 14:41:42 +0000 (15:41 +0100)
221 files changed:
.gitignore
CMakeLists.txt
COPYING
ChangeLog
MANIFEST.in
doc/doxygen/FAQ.doc
doc/doxygen/inside_cmake.doc
doc/doxygen/inside_extending.doc
doc/doxygen/module-index.doc
doc/doxygen/platform.doc
doc/doxygen/uhood_arch.doc [deleted file]
docs/source/Calibrating_the_models.rst [new file with mode: 0644]
docs/source/Deploying_your_application.rst
docs/source/Installing_SimGrid.rst
docs/source/Introduction.rst
docs/source/Modeling_howtos.rst [moved from docs/source/Platform_howtos.rst with 81% similarity]
docs/source/Models.rst
docs/source/Outcomes.rst
docs/source/Platform_examples.rst
docs/source/Platform_routing.rst
docs/source/XML_reference.rst
docs/source/app_s4u.rst
docs/source/app_smpi.rst
docs/source/conf.py
docs/source/img/vivaldi.svg
docs/source/index.rst
docs/source/tuto_disk/analysis.irst
docs/source/tuto_network_calibration/network_calibration_tutorial.rst
examples/README.rst
examples/cpp/CMakeLists.txt
examples/cpp/actor-exiting/s4u-actor-exiting.cpp
examples/cpp/actor-yield/s4u-actor-yield.cpp
examples/cpp/actor-yield/s4u-actor-yield_d.xml [deleted file]
examples/cpp/comm-ready/s4u-comm-ready.cpp
examples/cpp/comm-ready/s4u-comm-ready.tesh
examples/cpp/comm-ready/s4u-comm-ready_d.xml [deleted file]
examples/cpp/comm-suspend/s4u-comm-suspend.cpp
examples/cpp/comm-suspend/s4u-comm-suspend.tesh
examples/cpp/comm-suspend/s4u-comm-suspend_d.xml [deleted file]
examples/cpp/comm-wait/s4u-comm-wait.cpp
examples/cpp/comm-wait/s4u-comm-wait.tesh
examples/cpp/comm-wait/s4u-comm-wait_d.xml [deleted file]
examples/cpp/comm-waituntil/s4u-comm-waituntil.cpp
examples/cpp/comm-waituntil/s4u-comm-waituntil.tesh
examples/cpp/comm-waituntil/s4u-comm-waituntil_d.xml [deleted file]
examples/cpp/dag-comm/s4u-dag-comm.cpp
examples/cpp/dag-comm/s4u-dag-comm.tesh
examples/cpp/dag-failure/s4u-dag-failure.cpp
examples/cpp/dag-failure/s4u-dag-failure.tesh
examples/cpp/dag-from-dax/s4u-dag-from-dax.cpp [new file with mode: 0644]
examples/cpp/dag-from-dax/s4u-dag-from-dax.tesh [new file with mode: 0644]
examples/cpp/dag-from-dax/simple_dax_with_cycle.xml [moved from examples/deprecated/simdag/daxload/simple_dax_with_cycle.xml with 100% similarity]
examples/cpp/dag-from-dax/smalldax.xml [moved from examples/deprecated/simdag/daxload/smalldax.xml with 100% similarity]
examples/cpp/dag-from-dot/s4u-dag-from-dot.tesh
examples/cpp/dag-io/s4u-dag-io.cpp
examples/cpp/dag-io/s4u-dag-io.tesh
examples/cpp/dag-scheduling/Montage_25.xml [moved from examples/deprecated/simdag/scheduling/Montage_25.xml with 100% similarity]
examples/cpp/dag-scheduling/s4u-dag-scheduling.cpp [new file with mode: 0644]
examples/cpp/dag-scheduling/s4u-dag-scheduling.tesh [new file with mode: 0644]
examples/cpp/dag-simple/s4u-dag-simple.cpp
examples/cpp/dag-simple/s4u-dag-simple.tesh
examples/cpp/engine-run-partial/s4u-engine-run-partial.cpp
examples/cpp/exec-dependent/s4u-exec-dependent.cpp
examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp
examples/cpp/mc-bugged2-liveness/promela_bugged2_liveness [moved from examples/deprecated/msg/mc/promela_bugged2_liveness with 100% similarity]
examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.cpp [new file with mode: 0644]
examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.tesh [new file with mode: 0644]
examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.cpp [new file with mode: 0644]
examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.tesh [new file with mode: 0644]
examples/cpp/platform-failures/s4u-platform-failures.cpp
examples/deprecated/java/CMakeLists.txt
examples/deprecated/msg/mc/CMakeLists.txt [deleted file]
examples/deprecated/msg/mc/bugged2-liveness.tesh [deleted file]
examples/deprecated/msg/mc/bugged2_liveness.c [deleted file]
examples/deprecated/msg/mc/centralized_mutex.c [deleted file]
examples/deprecated/msg/mc/centralized_mutex.tesh [deleted file]
examples/deprecated/msg/mc/deploy_bugged2_liveness.xml [deleted file]
examples/deprecated/msg/mc/deploy_centralized_mutex.xml [deleted file]
examples/deprecated/simdag/CMakeLists.txt [deleted file]
examples/deprecated/simdag/daxload/sd_daxload.c [deleted file]
examples/deprecated/simdag/daxload/sd_daxload.tesh [deleted file]
examples/deprecated/simdag/scheduling/expected_output.jed [deleted file]
examples/deprecated/simdag/scheduling/sd_scheduling.c [deleted file]
examples/deprecated/simdag/scheduling/sd_scheduling.tesh [deleted file]
examples/platforms/cluster_backbone.svg [new file with mode: 0644]
examples/platforms/cluster_crossbar.svg [new file with mode: 0644]
examples/platforms/cluster_crossbar.xml
examples/python/actor-yield/actor-yield.py
examples/python/actor-yield/actor-yield.tesh
include/simgrid/config.h.in
include/simgrid/jedule/jedule.hpp [deleted file]
include/simgrid/jedule/jedule_events.hpp [deleted file]
include/simgrid/jedule/jedule_platform.hpp [deleted file]
include/simgrid/jedule/jedule_sd_binding.h [deleted file]
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Disk.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/simgrid/simdag.h [deleted file]
sonar-project.properties
src/bindings/java/jmsg.cpp
src/bindings/java/jmsg_as.cpp
src/bindings/java/jmsg_host.cpp
src/bindings/java/jmsg_process.cpp
src/bindings/java/jmsg_task.cpp
src/bindings/java/jmsg_vm.cpp
src/bindings/java/jtrace.cpp
src/bindings/java/jxbt_utilities.cpp
src/bindings/java/jxbt_utilities.hpp
src/dag/dax.dtd [moved from src/simdag/dax.dtd with 100% similarity]
src/dag/dax_dtd.c [moved from src/simdag/dax_dtd.c with 99% similarity]
src/dag/dax_dtd.h [moved from src/simdag/dax_dtd.h with 99% similarity]
src/dag/loaders.cpp [new file with mode: 0644]
src/instr/instr_config.cpp
src/instr/instr_paje_containers.hpp
src/instr/instr_paje_events.hpp
src/instr/instr_paje_types.hpp
src/instr/instr_paje_values.hpp
src/instr/instr_platform.cpp
src/instr/jedule/jedule.cpp [deleted file]
src/instr/jedule/jedule_events.cpp [deleted file]
src/instr/jedule/jedule_platform.cpp [deleted file]
src/instr/jedule/jedule_sd_binding.cpp [deleted file]
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/resource/VirtualMachineImpl.cpp
src/kernel/routing/NetZoneImpl.cpp
src/msg/msg_global.cpp
src/plugins/file_system/s4u_FileSystem.cpp
src/plugins/host_dvfs.cpp
src/plugins/host_energy.cpp
src/plugins/host_load.cpp
src/plugins/link_energy.cpp
src/plugins/link_energy_wifi.cpp
src/plugins/link_load.cpp
src/plugins/vm/VmLiveMigration.cpp
src/plugins/vm/dirty_page_tracking.cpp
src/s4u/s4u_Activity.cpp
src/s4u/s4u_Engine.cpp
src/simdag/sd_daxloader.cpp [deleted file]
src/simdag/sd_dotloader.cpp [deleted file]
src/simdag/sd_global.cpp [deleted file]
src/simdag/sd_task.cpp [deleted file]
src/simdag/simdag_private.hpp [deleted file]
src/simgrid/sg_version.cpp
src/smpi/bindings/smpi_f77_comm.cpp
src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/internals/smpi_global.cpp
src/surf/network_ib.cpp
src/surf/network_ns3.cpp
src/surf/sg_platf.cpp
src/surf/xml/simgrid.dtd
src/surf/xml/simgrid_dtd.c
src/surf/xml/surfxml_parseplatf.cpp
src/surf/xml/surfxml_sax_cb.cpp
src/xbt/automaton/parserPromela.tab.cacc
src/xbt/automaton/parserPromela.tab.hacc
src/xbt/xbt_replay.cpp
teshsuite/java/CMakeLists.txt
teshsuite/platforms/CMakeLists.txt [moved from teshsuite/simdag/CMakeLists.txt with 52% similarity]
teshsuite/platforms/Dijkstra.xml [moved from teshsuite/simdag/platforms/Dijkstra.xml with 100% similarity]
teshsuite/platforms/bob.trace [moved from teshsuite/simdag/platforms/bob.trace with 100% similarity]
teshsuite/platforms/bogus_missing_dst_gateway.xml [moved from teshsuite/simdag/platforms/bogus_missing_dst_gateway.xml with 100% similarity]
teshsuite/platforms/bogus_missing_gateway.tesh [new file with mode: 0644]
teshsuite/platforms/bogus_missing_src_gateway.xml [moved from teshsuite/simdag/platforms/bogus_missing_src_gateway.xml with 100% similarity]
teshsuite/platforms/bogus_two_hosts_asymetric.tesh [new file with mode: 0644]
teshsuite/platforms/bogus_two_hosts_asymetric.xml [moved from teshsuite/simdag/platforms/bogus_two_hosts_asymetric.xml with 100% similarity]
teshsuite/platforms/carol.fail [moved from teshsuite/simdag/platforms/carol.fail with 100% similarity]
teshsuite/platforms/cluster_dragonfly_noncontiguous_rad.xml [moved from teshsuite/simdag/platforms/cluster_dragonfly_noncontiguous_rad.xml with 100% similarity]
teshsuite/platforms/cluster_fat_tree_noncontiguous_rad.xml [moved from teshsuite/simdag/platforms/cluster_fat_tree_noncontiguous_rad.xml with 100% similarity]
teshsuite/platforms/cluster_torus_noncontiguous_rad.xml [moved from teshsuite/simdag/platforms/cluster_torus_noncontiguous_rad.xml with 100% similarity]
teshsuite/platforms/erin.avail [moved from teshsuite/simdag/platforms/erin.avail with 100% similarity]
teshsuite/platforms/flatifier.cpp [moved from teshsuite/simdag/flatifier/flatifier.cpp with 91% similarity]
teshsuite/platforms/flatifier.tesh [moved from teshsuite/simdag/flatifier/flatifier.tesh with 98% similarity]
teshsuite/platforms/four_hosts_floyd.xml [moved from teshsuite/simdag/platforms/four_hosts_floyd.xml with 100% similarity]
teshsuite/platforms/host_attributes.xml [moved from teshsuite/simdag/platforms/host_attributes.xml with 100% similarity]
teshsuite/platforms/link.bw [moved from teshsuite/simdag/platforms/link.bw with 100% similarity]
teshsuite/platforms/link.fail [moved from teshsuite/simdag/platforms/link.fail with 100% similarity]
teshsuite/platforms/link.lat [moved from teshsuite/simdag/platforms/link.lat with 100% similarity]
teshsuite/platforms/link_attributes.xml [moved from teshsuite/simdag/platforms/link_attributes.xml with 100% similarity]
teshsuite/platforms/one_cluster.xml [moved from teshsuite/simdag/platforms/one_cluster.xml with 100% similarity]
teshsuite/platforms/one_cluster_multicore.xml [moved from teshsuite/simdag/platforms/one_cluster_multicore.xml with 100% similarity]
teshsuite/platforms/one_cluster_router_id.xml [moved from teshsuite/simdag/platforms/one_cluster_router_id.xml with 100% similarity]
teshsuite/platforms/one_cluster_splitduplex.xml [moved from teshsuite/simdag/platforms/one_cluster_splitduplex.xml with 100% similarity]
teshsuite/platforms/properties.xml [moved from teshsuite/simdag/platforms/properties.xml with 100% similarity]
teshsuite/platforms/test_of_is_router.xml [moved from teshsuite/simdag/platforms/test_of_is_router.xml with 100% similarity]
teshsuite/platforms/three_hosts_non_symmetric_route.xml [moved from teshsuite/simdag/platforms/three_hosts_non_symmetric_route.xml with 100% similarity]
teshsuite/platforms/two_clusters.xml [moved from teshsuite/simdag/platforms/two_clusters.xml with 100% similarity]
teshsuite/platforms/two_clusters_one_name.xml [moved from teshsuite/simdag/platforms/two_clusters_one_name.xml with 100% similarity]
teshsuite/platforms/two_clusters_router_id.xml [moved from teshsuite/simdag/platforms/two_clusters_router_id.xml with 100% similarity]
teshsuite/platforms/two_hosts_multi_hop.xml [moved from teshsuite/simdag/platforms/two_hosts_multi_hop.xml with 100% similarity]
teshsuite/platforms/two_hosts_one_link.xml [moved from teshsuite/simdag/platforms/two_hosts_one_link.xml with 100% similarity]
teshsuite/platforms/two_hosts_one_link_splitduplex.xml [moved from teshsuite/simdag/platforms/two_hosts_one_link_splitduplex.xml with 100% similarity]
teshsuite/s4u/CMakeLists.txt
teshsuite/s4u/basic-link-test/basic-link-test.tesh
teshsuite/s4u/basic-parsing-test/basic-parsing-test-sym-full.tesh
teshsuite/s4u/basic-parsing-test/basic-parsing-test.cpp
teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh
teshsuite/s4u/dependencies/dependencies.cpp
teshsuite/s4u/is-router/is-router.tesh
teshsuite/simdag/flatifier/bogus_missing_gateway.tesh [deleted file]
teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh [deleted file]
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/Java.cmake
tools/cmake/MaintainerMode.cmake
tools/cmake/Option.cmake
tools/graphicator/graphicator.tesh
tools/internal/spell_dict.txt
tools/jenkins/Coverage.sh
tools/jenkins/DynamicAnalysis.sh
tools/jenkins/Flags.sh
tools/jenkins/Sanitizers.sh
tools/jenkins/build.sh

index a43677c..5a680b9 100644 (file)
@@ -34,11 +34,8 @@ CTestCustom.cmake
 CTestResults.xml
 
 ### Maintainer mode
-src/simdag/dax_dtd.l
+src/dag/dax_dtd.l
 src/surf/xml/simgrid_dtd.l
-### Jedule
-examples/deprecated/simdag/scheduling/sd_scheduling.jed
-teshsuite/simdag/platforms/simgrid.jed
 ### Libraries links
 [Ss]im[Gg]rid-*.tar.gz
 simgrid.jar
@@ -152,8 +149,6 @@ examples/c/platform-failures/c-platform-failures
 examples/c/platform-properties/c-platform-properties
 examples/c/plugin-host-load/c-plugin-host-load
 examples/c/synchro-semaphore/c-synchro-semaphore
-examples/deprecated/msg/mc/bugged2_liveness
-examples/deprecated/msg/mc/centralized_mutex
 examples/cpp/actor-create/s4u-actor-create
 examples/cpp/actor-daemon/s4u-actor-daemon
 examples/cpp/actor-exiting/s4u-actor-exiting
@@ -172,15 +167,26 @@ examples/cpp/app-token-ring/s4u-app-token-ring
 examples/cpp/cloud-capping/s4u-cloud-capping
 examples/cpp/cloud-migration/s4u-cloud-migration
 examples/cpp/cloud-simple/s4u-cloud-simple
+examples/cpp/clusters-multicpu/s4u-clusters-multicpu
 examples/cpp/comm-dependent/s4u-comm-dependent
+examples/cpp/comm-failure/s4u-comm-failure
 examples/cpp/comm-host2host/s4u-comm-host2host
 examples/cpp/comm-pingpong/s4u-comm-pingpong
 examples/cpp/comm-ready/s4u-comm-ready
+examples/cpp/comm-serialize/s4u-comm-serialize
 examples/cpp/comm-suspend/s4u-comm-suspend
+examples/cpp/comm-throttling/s4u-comm-throttling
 examples/cpp/comm-wait/s4u-comm-wait
 examples/cpp/comm-waitall/s4u-comm-waitall
 examples/cpp/comm-waitany/s4u-comm-waitany
 examples/cpp/comm-waituntil/s4u-comm-waituntil
+examples/cpp/dag-comm/s4u-dag-comm
+examples/cpp/dag-failure/s4u-dag-failure
+examples/cpp/dag-from-dax/s4u-dag-from-dax
+examples/cpp/dag-from-dot/s4u-dag-from-dot
+examples/cpp/dag-io/s4u-dag-io
+examples/cpp/dag-scheduling/s4u-dag-scheduling
+examples/cpp/dag-simple/s4u-dag-simple
 examples/cpp/dht-chord/s4u-dht-chord
 examples/cpp/dht-kademlia/s4u-dht-kademlia
 examples/cpp/energy-boot/s4u-energy-boot
@@ -190,10 +196,14 @@ examples/cpp/energy-link/s4u-energy-link
 examples/cpp/energy-vm/s4u-energy-vm
 examples/cpp/energy-wifi/s4u-energy-wifi
 examples/cpp/engine-filtering/s4u-engine-filtering
+examples/cpp/engine-run-partial/s4u-engine-run-partial
 examples/cpp/exec-async/s4u-exec-async
 examples/cpp/exec-basic/s4u-exec-basic
+examples/cpp/exec-cpu-factors/s4u-exec-cpu-factors
+examples/cpp/exec-cpu-nonlinear/s4u-exec-cpu-nonlinear
 examples/cpp/exec-dependent/s4u-exec-dependent
 examples/cpp/exec-dvfs/s4u-exec-dvfs
+examples/cpp/exec-failure/s4u-exec-failure
 examples/cpp/exec-ptask/s4u-exec-ptask
 examples/cpp/exec-ptask-multicore/s4u-exec-ptask-multicore
 examples/cpp/exec-ptask-multicore-latency/s4u-exec-ptask-multicore-latency
@@ -203,15 +213,21 @@ examples/cpp/exec-waitany/s4u-exec-waitany
 examples/cpp/exec-waitfor/s4u-exec-waitfor
 examples/cpp/io-async/s4u-io-async
 examples/cpp/io-dependent/s4u-io-dependent
+examples/cpp/io-degradation/s4u-io-degradation
 examples/cpp/io-disk-raw/s4u-io-disk-raw
 examples/cpp/io-file-remote/s4u-io-file-remote
 examples/cpp/io-file-system/s4u-io-file-system
+examples/cpp/io-priority/s4u-io-priority
 examples/cpp/maestro-set/s4u-maestro-set
 examples/cpp/mc-bugged1/s4u-mc-bugged1
 examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness
 examples/cpp/mc-bugged2/s4u-mc-bugged2
+examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness
+examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex
 examples/cpp/mc-electric-fence/s4u-mc-electric-fence
 examples/cpp/mc-failing-assert/s4u-mc-failing-assert
+examples/cpp/network-factors/s4u-network-factors
+examples/cpp/network-nonlinear/s4u-network-nonlinear
 examples/cpp/network-ns3/s4u-network-ns3
 examples/cpp/network-ns3-wifi/s4u-network-ns3-wifi
 examples/cpp/network-wifi/s4u-network-wifi
@@ -229,6 +245,7 @@ examples/cpp/synchro-condition-variable/s4u-synchro-condition-variable
 examples/cpp/synchro-condition-variable-waituntil/s4u-synchro-condition-variable-waituntil
 examples/cpp/synchro-mutex/s4u-synchro-mutex
 examples/cpp/synchro-semaphore/s4u-synchro-semaphore
+examples/cpp/torus-multicpu/
 examples/cpp/trace-categories/s4u-trace-categories
 examples/cpp/trace-host-user-variables/s4u-trace-host-user-variables
 examples/cpp/trace-link-user-variables/s4u-trace-link-user-variables
@@ -236,15 +253,6 @@ examples/cpp/trace-masterworkers/s4u-trace-masterworkers
 examples/cpp/trace-platform/s4u-trace-platform
 examples/cpp/trace-process-migration/s4u-trace-process-migration
 examples/cpp/trace-route-user-variables/s4u-trace-route-user-variables
-examples/deprecated/simdag/dag-dotload/sd_dag-dotload
-examples/deprecated/simdag/daxload/sd_daxload
-examples/deprecated/simdag/fail/sd_fail
-examples/deprecated/simdag/ptg-dotload/sd_ptg-dotload
-examples/deprecated/simdag/schedule-dotload/sd_schedule-dotload
-examples/deprecated/simdag/scheduling/sd_scheduling
-examples/deprecated/simdag/test/sd_test
-examples/deprecated/simdag/throttling/sd_throttling
-examples/deprecated/simdag/typed_tasks/sd_typed_tasks
 examples/smpi/ampi_test/smpi_ampi_test
 examples/smpi/energy/smpi_energy
 examples/smpi/gemm/smpi_gemm
@@ -291,6 +299,7 @@ teshsuite/models/ptask_L07_usage/ptask_L07_usage
 teshsuite/models/wifi_usage/wifi_usage
 teshsuite/models/wifi_usage_decay/wifi_usage_decay
 teshsuite/msg/task_destroy_cancel/task_destroy_cancel
+teshsuite/platforms/flatifier
 teshsuite/s4u/activity-lifecycle/activity-lifecycle
 teshsuite/s4u/actor/actor
 teshsuite/s4u/actor-autorestart/actor-autorestart
@@ -316,9 +325,6 @@ teshsuite/s4u/storage_client_server/storage_client_server
 teshsuite/s4u/trace-integration/trace-integration
 teshsuite/s4u/vm-live-migration/vm-live-migration
 teshsuite/s4u/wait-any-for/wait-any-for
-teshsuite/simdag/availability/availability
-teshsuite/simdag/flatifier/flatifier
-teshsuite/simdag/incomplete/incomplete
 teshsuite/smpi/auto-shared/auto-shared
 teshsuite/smpi/bug-17132/bug-17132
 teshsuite/smpi/coll-allgather/coll-allgather
index c3b459a..31b507b 100644 (file)
@@ -378,12 +378,6 @@ else()
   SET(enable_model-checking 0)
 endif()
 
-if(enable_jedule)
-  set(SIMGRID_HAVE_JEDULE 1)
-else()
-  set(SIMGRID_HAVE_JEDULE 0)
-endif()
-
 if(enable_mallocators)
   SET(SIMGRID_HAVE_MALLOCATOR 1)
 else()
@@ -967,7 +961,6 @@ message("")
 message("        Maintainer mode .............: ${enable_maintainer_mode}")
 message("        Documentation................: ${enable_documentation}")
 message("        Model checking ..............: ${SIMGRID_HAVE_MC}")
-message("        Jedule  mode ................: ${SIMGRID_HAVE_JEDULE}")
 message("        Graphviz mode ...............: ${HAVE_GRAPHVIZ}")
 message("        Mallocators .................: ${enable_mallocators}")
 message("")
diff --git a/COPYING b/COPYING
index de9cf75..1acb0f6 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -65,8 +65,8 @@ License: other
  privately owned rights.
 
 Files:
- src/simdag/dax_dtd.c
- src/simdag/dax_dtd.h
+ src/dag/dax_dtd.c
+ src/dag/dax_dtd.h
  src/surf/xml/simgrid_dtd.c
  src/surf/xml/simgrid_dtd.h
 Copyright:
index 2acddeb..52bbec7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,12 +2,31 @@
 
 SimGrid (3.29.1) NOT RELEASED YET (v3.30 expected December 21. 2021, 15:59 UTC)
 
+Main user-visible changes:
+ - The SimDag API for the simulation of the scheduling of Directed Acyclic 
+    Graphs has been dropped. It was marked as deprecated for a couple of years. 
+    We finally complete the implementation of what has been called SimDag++ 
+    internally, i.e., porting the different features of SimDag on top of S4U. 
+    The new way to simulate the execution of dependent activities directly by 
+    maestro (without any other actor) is details in the examples/cpp/dag-* series
+    of examples. 
+ - The removal of SimDag led us to also remove the export to Jedule files that 
+   was tightly coupled to SimDag. The instrumentation of DAG simulation is still 
+   possible through the regular instrumentation API based on the Paje format. 
+   
 S4U:
  - New function: Engine::run_until(date), to split the simulation.
  - New signal: Activity::on_veto, to detect when an activity fails to start.
  - New function: Engine::track_vetoed_activities() to interrupt run()
    when an activity fails to start, and to keep track of such activities.
    Please see the corresponding example for more info.
+ - Introduce on_X_cb() functions for all signals, to attach a new
+   callback to the signal X. The signal variables are now hidden and
+   only these functions should be used.
+   Rational: this enables the usual deprecation schema where functions
+   remain for 4 releases when we need to modify the signals, while the
+   current code with the signal variables directly visible prevent any
+   smooth transition.
 
 SMPI:
  - Dynamic costs for MPI operations: New API to allow users to dynamically
@@ -17,6 +36,7 @@ SMPI:
 Documentation:
  - New section: "SimGrid MPI calibration of a Grid5000 cluster"
    presenting how to properly calibrate MPI communications in SimGrid.
+ - Complete and reword the platform section, which is now completed.
 
 Python:
  - Thread contexts are used by default with Python bindings.  Other kinds of
@@ -26,6 +46,7 @@ Fixed bugs (FG#.. -> FramaGit bugs; FG!.. -> FG merge requests)
  (FG: issues on Framagit; GF: issues on GForge; GH: issues on GitHub)
  - FG#95: Wrong computation time for multicore execution after pstate change
  - FG#97: Wrong computation time for ptask+multicore+pstates
+ - FG#99: Weird segfault when not sealing an host
 ----------------------------------------------------------------------------
 
 SimGrid (3.29) October 7. 2021
index 8cfac90..29c5e33 100644 (file)
@@ -146,7 +146,6 @@ include examples/cpp/actor-suspend/s4u-actor-suspend.cpp
 include examples/cpp/actor-suspend/s4u-actor-suspend.tesh
 include examples/cpp/actor-yield/s4u-actor-yield.cpp
 include examples/cpp/actor-yield/s4u-actor-yield.tesh
-include examples/cpp/actor-yield/s4u-actor-yield_d.xml
 include examples/cpp/app-bittorrent/s4u-app-bittorrent.tesh
 include examples/cpp/app-bittorrent/s4u-app-bittorrent_d.xml
 include examples/cpp/app-bittorrent/s4u-bittorrent.cpp
@@ -182,17 +181,14 @@ include examples/cpp/comm-pingpong/s4u-comm-pingpong.tesh
 include examples/cpp/comm-pingpong/simix-breakpoint.tesh
 include examples/cpp/comm-ready/s4u-comm-ready.cpp
 include examples/cpp/comm-ready/s4u-comm-ready.tesh
-include examples/cpp/comm-ready/s4u-comm-ready_d.xml
 include examples/cpp/comm-serialize/s4u-comm-serialize.cpp
 include examples/cpp/comm-serialize/s4u-comm-serialize.tesh
 include examples/cpp/comm-suspend/s4u-comm-suspend.cpp
 include examples/cpp/comm-suspend/s4u-comm-suspend.tesh
-include examples/cpp/comm-suspend/s4u-comm-suspend_d.xml
 include examples/cpp/comm-throttling/s4u-comm-throttling.cpp
 include examples/cpp/comm-throttling/s4u-comm-throttling.tesh
 include examples/cpp/comm-wait/s4u-comm-wait.cpp
 include examples/cpp/comm-wait/s4u-comm-wait.tesh
-include examples/cpp/comm-wait/s4u-comm-wait_d.xml
 include examples/cpp/comm-waitall/s4u-comm-waitall.cpp
 include examples/cpp/comm-waitall/s4u-comm-waitall.tesh
 include examples/cpp/comm-waitall/s4u-comm-waitall_d.xml
@@ -201,17 +197,23 @@ include examples/cpp/comm-waitany/s4u-comm-waitany.tesh
 include examples/cpp/comm-waitany/s4u-comm-waitany_d.xml
 include examples/cpp/comm-waituntil/s4u-comm-waituntil.cpp
 include examples/cpp/comm-waituntil/s4u-comm-waituntil.tesh
-include examples/cpp/comm-waituntil/s4u-comm-waituntil_d.xml
 include examples/cpp/dag-comm/s4u-dag-comm.cpp
 include examples/cpp/dag-comm/s4u-dag-comm.tesh
 include examples/cpp/dag-failure/s4u-dag-failure.cpp
 include examples/cpp/dag-failure/s4u-dag-failure.tesh
+include examples/cpp/dag-from-dax/s4u-dag-from-dax.cpp
+include examples/cpp/dag-from-dax/s4u-dag-from-dax.tesh
+include examples/cpp/dag-from-dax/simple_dax_with_cycle.xml
+include examples/cpp/dag-from-dax/smalldax.xml
 include examples/cpp/dag-from-dot/dag.dot
 include examples/cpp/dag-from-dot/dag_with_cycle.dot
 include examples/cpp/dag-from-dot/s4u-dag-from-dot.cpp
 include examples/cpp/dag-from-dot/s4u-dag-from-dot.tesh
 include examples/cpp/dag-io/s4u-dag-io.cpp
 include examples/cpp/dag-io/s4u-dag-io.tesh
+include examples/cpp/dag-scheduling/Montage_25.xml
+include examples/cpp/dag-scheduling/s4u-dag-scheduling.cpp
+include examples/cpp/dag-scheduling/s4u-dag-scheduling.tesh
 include examples/cpp/dag-simple/s4u-dag-simple.cpp
 include examples/cpp/dag-simple/s4u-dag-simple.tesh
 include examples/cpp/dht-chord/s4u-dht-chord-node.cpp
@@ -300,8 +302,13 @@ include examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp
 include examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh
 include examples/cpp/mc-bugged1/s4u-mc-bugged1.cpp
 include examples/cpp/mc-bugged1/s4u-mc-bugged1.tesh
+include examples/cpp/mc-bugged2-liveness/promela_bugged2_liveness
+include examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.cpp
+include examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.tesh
 include examples/cpp/mc-bugged2/s4u-mc-bugged2.cpp
 include examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh
+include examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.cpp
+include examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.tesh
 include examples/cpp/mc-electric-fence/s4u-mc-electric-fence.cpp
 include examples/cpp/mc-electric-fence/s4u-mc-electric-fence.tesh
 include examples/cpp/mc-failing-assert/s4u-mc-failing-assert.cpp
@@ -487,21 +494,6 @@ include examples/deprecated/java/trace/pingpong/PingPongTask.java
 include examples/deprecated/java/trace/pingpong/Receiver.java
 include examples/deprecated/java/trace/pingpong/Sender.java
 include examples/deprecated/java/trace/pingpong/trace-pingpong.tesh
-include examples/deprecated/msg/mc/bugged2-liveness.tesh
-include examples/deprecated/msg/mc/bugged2_liveness.c
-include examples/deprecated/msg/mc/centralized_mutex.c
-include examples/deprecated/msg/mc/centralized_mutex.tesh
-include examples/deprecated/msg/mc/deploy_bugged2_liveness.xml
-include examples/deprecated/msg/mc/deploy_centralized_mutex.xml
-include examples/deprecated/msg/mc/promela_bugged2_liveness
-include examples/deprecated/simdag/daxload/sd_daxload.c
-include examples/deprecated/simdag/daxload/sd_daxload.tesh
-include examples/deprecated/simdag/daxload/simple_dax_with_cycle.xml
-include examples/deprecated/simdag/daxload/smalldax.xml
-include examples/deprecated/simdag/scheduling/Montage_25.xml
-include examples/deprecated/simdag/scheduling/expected_output.jed
-include examples/deprecated/simdag/scheduling/sd_scheduling.c
-include examples/deprecated/simdag/scheduling/sd_scheduling.tesh
 include examples/python/actor-create/actor-create.py
 include examples/python/actor-create/actor-create.tesh
 include examples/python/actor-daemon/actor-daemon.py
@@ -713,6 +705,39 @@ include teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
 include teshsuite/models/wifi_usage_decay/wifi_usage_decay.tesh
 include teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c
 include teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh
+include teshsuite/platforms/Dijkstra.xml
+include teshsuite/platforms/bob.trace
+include teshsuite/platforms/bogus_missing_dst_gateway.xml
+include teshsuite/platforms/bogus_missing_gateway.tesh
+include teshsuite/platforms/bogus_missing_src_gateway.xml
+include teshsuite/platforms/bogus_two_hosts_asymetric.tesh
+include teshsuite/platforms/bogus_two_hosts_asymetric.xml
+include teshsuite/platforms/carol.fail
+include teshsuite/platforms/cluster_dragonfly_noncontiguous_rad.xml
+include teshsuite/platforms/cluster_fat_tree_noncontiguous_rad.xml
+include teshsuite/platforms/cluster_torus_noncontiguous_rad.xml
+include teshsuite/platforms/erin.avail
+include teshsuite/platforms/flatifier.cpp
+include teshsuite/platforms/flatifier.tesh
+include teshsuite/platforms/four_hosts_floyd.xml
+include teshsuite/platforms/host_attributes.xml
+include teshsuite/platforms/link.bw
+include teshsuite/platforms/link.fail
+include teshsuite/platforms/link.lat
+include teshsuite/platforms/link_attributes.xml
+include teshsuite/platforms/one_cluster.xml
+include teshsuite/platforms/one_cluster_multicore.xml
+include teshsuite/platforms/one_cluster_router_id.xml
+include teshsuite/platforms/one_cluster_splitduplex.xml
+include teshsuite/platforms/properties.xml
+include teshsuite/platforms/test_of_is_router.xml
+include teshsuite/platforms/three_hosts_non_symmetric_route.xml
+include teshsuite/platforms/two_clusters.xml
+include teshsuite/platforms/two_clusters_one_name.xml
+include teshsuite/platforms/two_clusters_router_id.xml
+include teshsuite/platforms/two_hosts_multi_hop.xml
+include teshsuite/platforms/two_hosts_one_link.xml
+include teshsuite/platforms/two_hosts_one_link_splitduplex.xml
 include teshsuite/python/borken-context/borken-context.py
 include teshsuite/python/borken-context/borken-context.tesh
 include teshsuite/python/borken-context/borken-context_d.xml
@@ -807,39 +832,6 @@ include teshsuite/s4u/wait-all-for/wait-all-for.cpp
 include teshsuite/s4u/wait-all-for/wait-all-for.tesh
 include teshsuite/s4u/wait-any-for/wait-any-for.cpp
 include teshsuite/s4u/wait-any-for/wait-any-for.tesh
-include teshsuite/simdag/flatifier/bogus_missing_gateway.tesh
-include teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh
-include teshsuite/simdag/flatifier/flatifier.cpp
-include teshsuite/simdag/flatifier/flatifier.tesh
-include teshsuite/simdag/platforms/Dijkstra.xml
-include teshsuite/simdag/platforms/bob.trace
-include teshsuite/simdag/platforms/bogus_missing_dst_gateway.xml
-include teshsuite/simdag/platforms/bogus_missing_src_gateway.xml
-include teshsuite/simdag/platforms/bogus_two_hosts_asymetric.xml
-include teshsuite/simdag/platforms/carol.fail
-include teshsuite/simdag/platforms/cluster_dragonfly_noncontiguous_rad.xml
-include teshsuite/simdag/platforms/cluster_fat_tree_noncontiguous_rad.xml
-include teshsuite/simdag/platforms/cluster_torus_noncontiguous_rad.xml
-include teshsuite/simdag/platforms/erin.avail
-include teshsuite/simdag/platforms/four_hosts_floyd.xml
-include teshsuite/simdag/platforms/host_attributes.xml
-include teshsuite/simdag/platforms/link.bw
-include teshsuite/simdag/platforms/link.fail
-include teshsuite/simdag/platforms/link.lat
-include teshsuite/simdag/platforms/link_attributes.xml
-include teshsuite/simdag/platforms/one_cluster.xml
-include teshsuite/simdag/platforms/one_cluster_multicore.xml
-include teshsuite/simdag/platforms/one_cluster_router_id.xml
-include teshsuite/simdag/platforms/one_cluster_splitduplex.xml
-include teshsuite/simdag/platforms/properties.xml
-include teshsuite/simdag/platforms/test_of_is_router.xml
-include teshsuite/simdag/platforms/three_hosts_non_symmetric_route.xml
-include teshsuite/simdag/platforms/two_clusters.xml
-include teshsuite/simdag/platforms/two_clusters_one_name.xml
-include teshsuite/simdag/platforms/two_clusters_router_id.xml
-include teshsuite/simdag/platforms/two_hosts_multi_hop.xml
-include teshsuite/simdag/platforms/two_hosts_one_link.xml
-include teshsuite/simdag/platforms/two_hosts_one_link_splitduplex.xml
 include teshsuite/smpi/auto-shared/auto-shared.c
 include teshsuite/smpi/auto-shared/auto-shared.tesh
 include teshsuite/smpi/bug-17132/bug-17132.c
@@ -1814,7 +1806,6 @@ include doc/doxygen/module-surf.doc
 include doc/doxygen/outcomes_vizu.doc
 include doc/doxygen/platform.doc
 include doc/doxygen/uhood.doc
-include doc/doxygen/uhood_arch.doc
 include doc/doxygen/uhood_switch.doc
 include docs/Build.sh
 include docs/README.md
@@ -1828,6 +1819,7 @@ include docs/manpages/smpiff.1
 include docs/manpages/smpirun.1
 include docs/manpages/tesh.pod
 include docs/requirements.txt
+include docs/source/Calibrating_the_models.rst
 include docs/source/Configuring_SimGrid.rst
 include docs/source/Deploying_your_application.rst
 include docs/source/Design_goals.rst
@@ -1835,12 +1827,12 @@ include docs/source/Doxyfile
 include docs/source/Experimental_setup.rst
 include docs/source/Installing_SimGrid.rst
 include docs/source/Introduction.rst
+include docs/source/Modeling_howtos.rst
 include docs/source/Models.rst
 include docs/source/Outcomes.rst
 include docs/source/Platform.rst
 include docs/source/Platform_cpp.rst
 include docs/source/Platform_examples.rst
-include docs/source/Platform_howtos.rst
 include docs/source/Platform_routing.rst
 include docs/source/Plugins.rst
 include docs/source/Release_Notes.rst
@@ -1956,14 +1948,14 @@ include examples/README.rst
 include examples/c/CMakeLists.txt
 include examples/cpp/CMakeLists.txt
 include examples/deprecated/java/CMakeLists.txt
-include examples/deprecated/msg/mc/CMakeLists.txt
-include examples/deprecated/simdag/CMakeLists.txt
 include examples/platforms/CMakeLists.txt
 include examples/platforms/bypassRoute.xml
 include examples/platforms/bypassZoneRoute.xml
 include examples/platforms/cloud.xml
 include examples/platforms/cluster_and_one_host.xml
+include examples/platforms/cluster_backbone.svg
 include examples/platforms/cluster_backbone.xml
+include examples/platforms/cluster_crossbar.svg
 include examples/platforms/cluster_crossbar.xml
 include examples/platforms/cluster_dragonfly.svg
 include examples/platforms/cluster_dragonfly.xml
@@ -2062,10 +2054,6 @@ include include/simgrid/exec.h
 include include/simgrid/forward.h
 include include/simgrid/host.h
 include include/simgrid/instr.h
-include include/simgrid/jedule/jedule.hpp
-include include/simgrid/jedule/jedule_events.hpp
-include include/simgrid/jedule/jedule_platform.hpp
-include include/simgrid/jedule/jedule_sd_binding.h
 include include/simgrid/kernel/ProfileBuilder.hpp
 include include/simgrid/kernel/Timer.hpp
 include include/simgrid/kernel/future.hpp
@@ -2116,7 +2104,6 @@ include include/simgrid/s4u/NetZone.hpp
 include include/simgrid/s4u/Semaphore.hpp
 include include/simgrid/s4u/VirtualMachine.hpp
 include include/simgrid/semaphore.h
-include include/simgrid/simdag.h
 include include/simgrid/simix.h
 include include/simgrid/simix.hpp
 include include/simgrid/version.h.in
@@ -2220,6 +2207,10 @@ include src/bindings/lua/lua_utils.hpp
 include src/bindings/lua/simgrid_lua.cpp
 include src/bindings/lua/simgrid_lua.hpp
 include src/bindings/python/simgrid_python.cpp
+include src/dag/dax.dtd
+include src/dag/dax_dtd.c
+include src/dag/dax_dtd.h
+include src/dag/loaders.cpp
 include src/include/catch.hpp
 include src/include/mc/datatypes.h
 include src/include/mc/mc.h
@@ -2244,10 +2235,6 @@ include src/instr/instr_platform.cpp
 include src/instr/instr_private.hpp
 include src/instr/instr_resource_utilization.cpp
 include src/instr/instr_smpi.hpp
-include src/instr/jedule/jedule.cpp
-include src/instr/jedule/jedule_events.cpp
-include src/instr/jedule/jedule_platform.cpp
-include src/instr/jedule/jedule_sd_binding.cpp
 include src/internal_config.h.in
 include src/kernel/EngineImpl.cpp
 include src/kernel/EngineImpl.hpp
@@ -2452,14 +2439,6 @@ include src/s4u/s4u_Mutex.cpp
 include src/s4u/s4u_Netzone.cpp
 include src/s4u/s4u_Semaphore.cpp
 include src/s4u/s4u_VirtualMachine.cpp
-include src/simdag/dax.dtd
-include src/simdag/dax_dtd.c
-include src/simdag/dax_dtd.h
-include src/simdag/sd_daxloader.cpp
-include src/simdag/sd_dotloader.cpp
-include src/simdag/sd_global.cpp
-include src/simdag/sd_task.cpp
-include src/simdag/simdag_private.hpp
 include src/simgrid/Exception.cpp
 include src/simgrid/sg_config.cpp
 include src/simgrid/sg_version.cpp
@@ -2767,9 +2746,9 @@ include teshsuite/lua/lua_platforms.tesh
 include teshsuite/mc/CMakeLists.txt
 include teshsuite/models/CMakeLists.txt
 include teshsuite/msg/CMakeLists.txt
+include teshsuite/platforms/CMakeLists.txt
 include teshsuite/python/CMakeLists.txt
 include teshsuite/s4u/CMakeLists.txt
-include teshsuite/simdag/CMakeLists.txt
 include teshsuite/smpi/CMakeLists.txt
 include teshsuite/smpi/isp/umpire/CMakeLists.txt
 include teshsuite/smpi/mpich3-test/CMakeLists.txt
index ad1fe52..f38dfc9 100644 (file)
@@ -202,17 +202,6 @@ keep working on it. You may find inspiring ideas in it.
 
 @subsection faq_platform Platform building and Dynamic resources
 
-@subsubsection faq_platform_example Where can I find SimGrid platform files?
-
-There are several little examples in the archive, in the examples/platforms
-directory. From time to time, we are asked for other files, but we
-don't have much at hand right now.
-
-You should refer to the Platform Description Archive
-(http://pda.gforge.inria.fr) project to see the other platform file we
-have available, as well as the Simulacrum simulator, meant to generate
-SimGrid platforms using all classical generation algorithms.
-
 @subsubsection faq_platform_synthetic Generating synthetic but realistic platforms
 
 Another possibility to get a platform file is to generate synthetic
@@ -237,61 +226,6 @@ assessed. Please keep this fact in mind when using it.
 
 @section faq_troubleshooting Troubleshooting
 
-@subsection faq_trouble_compil User code compilation problems
-
-@subsubsection faq_trouble_err_logcat "gcc: _simgrid_this_log_category_does_not_exist__??? undeclared (first use in this function)"
-
-This is because you are using the log mechanism, but you didn't created
-any default category in this file. You should refer to @ref XBT_log
-for all the details, but you simply forgot to call one of
-XBT_LOG_NEW_DEFAULT_CATEGORY() or XBT_LOG_NEW_DEFAULT_SUBCATEGORY().
-
-@subsection faq_trouble_errors Runtime error messages
-
-@subsubsection faq_trouble_errors_big_fat_warning I'm told that my XML files are too old.
-
-The format of the XML platform description files is sometimes
-improved. For example, we decided to change the units used in SimGrid
-from MBytes, MFlops and seconds to Bytes, Flops and seconds to ease
-people exchanging small messages. We also reworked the route
-descriptions to allow more compact descriptions.
-
-That is why the XML files are versioned using the 'version' attribute
-of the root tag. Currently, it should read:
-@verbatim
-  <platform version="4">
-@endverbatim
-
-If your files are too old, you can use the simgrid_update_xml.pl
-script which can be found in the tools directory of the archive.
-
-@subsection faq_trouble_debug Debugging SMPI applications
-
-In order to debug SMPI programs, you can use the following options:
-
-- <b>-wrapper 'gdb --args'</b>: this option is used to use a wrapper
-  in order to call the SMPI process. Good candidates for this options
-  are "gdb --args", "valgrind", "rr record", "strace", etc;
-
-- <b>-foreground</b>: this options gives the debugger access to the terminal
-  which is needed in order to use an interactive debugger.
-
-Both options are needed in order to run the SMPI process under GDB.
-
-@subsection faq_deadlock There is a deadlock in my code!!!
-
-Unfortunately, we cannot debug every code written in SimGrid.  We
-furthermore believe that the framework provides ways enough
-information to debug such information yourself. If the textual output
-is not enough, Make sure to check the @ref faq_visualization FAQ entry to see
-how to get a graphical one.
-
-Now, if you come up with a really simple example that deadlocks and
-you're absolutely convinced that it should not, you can ask on the
-list. Just be aware that you'll be severely punished if the mistake is
-on your side... We have plenty of FAQ entries to redact and new
-features to implement for the impenitents! ;)
-
 @subsection faq_surf_network_latency I get weird timings when I play with the latencies.
 
 OK, first of all, remember that units should be Bytes, Flops and
@@ -333,23 +267,4 @@ that may make your result be unexpected. For example, two flows
 competing on a saturated link receive an amount of bandwidth inversely
 proportional to their round trip time.
 
-@subsection faq_bugrepport So I've found a bug in SimGrid. How to report it?
-
-We do our best to make sure to hammer away any bugs of SimGrid, but this is
-still an academic project so please be patient if/when you find bugs in it.
-If you do, the best solution is to drop an email either on the simgrid-user
-or the simgrid-devel mailing list and explain us about the issue.  You can
-also decide to open a formal bug report using the
-<a href="https://framagit.org/simgrid/simgrid/issues">relevant
-interface</a>. You need to login on the server to get the ability to submit
-bugs.
-
-We will do our best to solve any problem reported, but you need to help us
-finding the issue. Just telling "it segfault" isn't enough. Telling "It
-segfaults when running the attached simulator" doesn't really help either.
-You may find the following article interesting to see how to report
-informative bug repports:
-http://www.chiark.greenend.org.uk/~sgtatham/bugs.html (it is not SimGrid
-specific at all, but it's full of good advices).
-
 */
index f654352..25dbb36 100644 (file)
@@ -28,8 +28,6 @@ The examples/ directory is organized as  follows:
  - examples/cpp/ for examples using the S4U API
  - examples/smpi/ or examples using the SMPI API
  - examples/platforms/ only contains platforms descriptions in the XML format (see @ref platform for details)
- - examples/deprecated/msg/ for examples using the MSG API. Here the naming convention is package-example (e.g., app-masterworker).
- - examples/deprecated/simdag/ for examples using the SimDag API
  - examples/deprecated/java/ for examples using the Java bindings to the MSG API. This directory contains packages (app, async,
    cloud, ...) which in turn contain individual examples. If your new example fits in an existing package, add it here,
    or create a new package otherwise.
index 7668d26..24c8e8d 100644 (file)
@@ -3,119 +3,6 @@
 
 @tableofcontents
 
-@section simgrid_dev_guide_model How to add a new model?
-The figure below shows the architecture of the SURF layer. This layer is composed
-of different kinds of models representing the different systems we want to
-model (i.e., cpu, network, storage, workstation, virtual machine).
-
-A model in SimGrid is composed of three classes: Model, Resource and Action
-(@ref SURF_interface "surf_interface.hpp").
-
-@image html surf++.png
-@image latex surf++.pdf "surf++" width=\textwidth
-
-Actually there are five kind of models: CpuModel, NetworkModel, WorkstationModel,
-WorkstationVMModel and StorageModel. For each kind of model, there is an
-interface (e.g.: @ref SURF_cpu_interface "CpuImpl.hpp") and some implementations (e.g.: cpu_cas01.hpp,
-cpu_ti.hpp).
-
-The CPU model Cas01, for instance, is initialized by the function
-    void surf_cpu_model_init_Cas01()
-
-The different network models that are offered by simgrid are stored in the array
-that is defined as follows:
-
-s_surf_model_description_t surf_network_model_description[] = {
-
-@subsection simgrid_dev_guide_model_implem How to implement a new model?
-
-If you want to create a new implementation of a kind of model you must extend
-the classes of the corresponding interfaces.
-
-For instance, if you want to add a new cup model called `Plop`, create two files
-cpu_plop.hpp and cpu_plop_cpp which contains classes CpuPlopModel, CpuPlop and
-CpuPlopAction implementing respectively the interfaces CpuModel, Cpu and
-CpuAction. You also need to define an initializing function like this:
-
-~~~~
-void surf_cpu_model_init_plop()
-{
-  xbt_assert(!surf_cpu_model_pm);
-
-  surf_cpu_model_pm = new CpuPlopModel();
-
-  simgrid::kernel::resource::on_postparse.connect(cpu_add_traces);
-
-  xbt_dynar_push(model_list, &surf_cpu_model_pm);
-}
-~~~~
-
-and add an entry in the corresponding array in surf_interface.cpp
-
-~~~~
-s_surf_model_description_t surf_cpu_model_description[] = {
-  {"Cas01",
-   "Simplistic CPU model (time=size/speed).",
-   surf_cpu_model_init_Cas01},
-  {"Plop",
-   "The new plop CPU model.",
-   surf_cpu_model_init_plop},
-  {NULL, NULL, NULL}      // this array must be NULL terminated
-};
-~~~~
-
-@subsection simgrid_dev_guide_model_kind How to add a new kind of model?
-
-If you want to create a new kind of model, you must create a new interface
-where you extend the classes Model, Resource and Action, and then create an
-implementation of this interface.
-
-
-@section simgrid_dev_guide_surf_callbacks How to use surf callbacks?
-
-Adding features to surf could also be handle by using surf callbacks (instead
-of adding new implementation model). The list of available callbacks is
-accessible there @ref SURF_callbacks. An example of using surf callbacks is the
-energy plugin. If you want to add a plugin you need to define callback function
-and to connect them to callbacks handler in an initialization function.
-
-~~~~
-static void MyNetworkLinkCreatedCallback(NetworkLinkPtr cpu){
-  // your code
-}
-
-static void MyNetworkLinkDestructedCallback(NetworkLinkPtr cpu){
-  // your code
-}
-
-static void MyNetworkCommunicationCallback(NetworkActionPtr cpu,
-                                           RoutingEdgePtr src,
-                                           RoutingEdgePtr dst){
-  // your code
-}
-
-void sg_my_network_plugin_init() {
-  networkLinkCreatedCallbacks.connect(MyNetworkLinkCreatedCallback);
-  networkLinkDestructedCallbacks.connect(MyNetworkLinkDestructedCallback);
-  networkCommunicationCallbacks.connect(MyNetworkCommunicationCallback);
-}
-~~~~
-
-Then you need to add an entry in surf_interface.cpp referring to your
-initialization function.
-
-~~~~
-s_surf_model_description_t surf_plugin_description[] = {
-                  {"Energy",
-                   "Cpu energy consumption.",
-                   sg_host_energy_plugin_init},
-                  {"MyNetworkPlugin",
-                   "My network plugin.",
-                   sg_my_network_plugin_init},
-                  {NULL, NULL, NULL}      // this array must be NULL terminated
-};
-~~~~
-
 @section simgrid_dev_guide_simcall How to add a new simcall?
 
 First of all you might want to avoid defining a new simcall if possible:
index 83a5679..0f252d6 100644 (file)
@@ -99,20 +99,3 @@ working to make it possible from the C++ code (or even from bindings
 in other languages). Until then, please head to @ref platform.
 
 */
-
-/**
-@defgroup SURF_API SURF
-@brief Internal kernel of all the simulators used in SimGrid, and associated models.
-
-SURF provides the core functionalities to simulate a virtual
-platform. It is very low-level and is not intended to be used by end
-users, but rather to serve as a basis for higher-level simulators. Its
-interfaces are not frozen (and probably never will be), and the
-structure emphasis on performance over ease of use. This module
-contains the platform models. If you need a model that is not encoded
-yet, please come to the devel mailing list so that we can discuss on
-the feasibility of your idea.
-
-Please note that as it is not really intended for public use, this
-module is only partially documented.
-*/
index bbe78a7..83c8aab 100644 (file)
@@ -5,105 +5,6 @@
 
 @subsection pf_res_computing Computing Resources
 
-
-@subsubsection pf_tag_cluster &lt;cluster&gt;
-
-``<cluster />`` represents a machine-cluster. It is most commonly used
-when one wants to define many hosts and a network quickly. Technically,
-``cluster`` is a meta-tag: <b>from the inner SimGrid point of
-view, a cluster is a network zone where some optimized routing is defined</b>.
-The default inner organization of the cluster is as follow:
-
-@verbatim
-                 __________
-                |          |
-                |  router  |
-    ____________|__________|_____________ backbone
-      |   |   |              |     |   |
-    l0|        l1| l2|           l97| l96 |   | l99
-      |   |   |   ........   |     |   |
-      |                                |
-    c-0.me                             c-99.me
-@endverbatim
-
-Here, a set of <b>host</b>s is defined. Each of them has a <b>link</b>
-to a central backbone (backbone is a link itself, as a link can
-be used to represent a switch, see the switch / link section
-below for more details about it). A <b>router</b> allows one to connect a
-<b>cluster</b> to the outside world. Internally,
-SimGrid treats a cluster as a network zone containing all hosts: the router is the default
-gateway for the cluster.
-
-There is an alternative organization, which is as follows:
-@verbatim
-                 __________
-                |          |
-                |  router  |
-                |__________|
-                    / | @
-                   /  |  @
-               l0 / l1|   @l2
-                 /    |    @
-                /     |     @
-            host0   host1   host2
-@endverbatim
-
-The principle is the same, except that there is no backbone. This representation
-can be obtained easily: just do not set the bb_* attributes.
-
-
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | string | The identifier of the cluster. Facilitates referring to this cluster.
-prefix          | yes       | string | Each node of the cluster has to have a name. This name will be prefixed with this prefix.
-suffix          | yes       | string | Each node of the cluster will be suffixed with this suffix
-radical         | yes       | string | Regexp used to generate cluster nodes name. Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before. The produced number is concatenated between prefix and suffix to form machine names.
-speed           | yes       | int    | Same as the ``speed`` attribute of the ``@<host@>`` tag.
-core            | no        | int (default: 1) | Same as the ``core`` attribute of the ``@<host@>`` tag.
-bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the @ref pf_tag_link "link section" for syntax/details.
-lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
-sharing_policy  | no        | string | Sharing policy for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
-bb_bw           | no        | int    | Bandwidth for backbone (if any). See <b>link</b> section for syntax/details. If bb_bw and bb_lat (see below) attributes are omitted, no backbone is created (alternative cluster architecture <b>described before</b>).
-bb_lat          | no        | int    | Latency for backbone (if any). See <b>link</b> section for syntax/details. If bb_lat and bb_bw (see above) attributes are omitted, no backbone is created (alternative cluster architecture <b>described before</b>).
-bb_sharing_policy | no      | string | Sharing policy for the backbone (if any). See <b>link</b> section for syntax/details.
-limiter_link      | no        | int    | Bandwidth for limiter link (if any). This adds a specific link for each node, to set the maximum bandwidth reached when communicating in both directions at the same time. In theory this value should be 2*bw for splitduplex links, but in reality this might be less. This value will depend heavily on the communication model, and on the cluster's hardware, so no default value can be set, this has to be measured. More details can be obtained in <a href="https://hal.inria.fr/hal-00919507/"> "Toward Better Simulation of MPI Applications on Ethernet/TCP Networks"</a>
-loopback_bw       | no      | int    | Bandwidth for loopback (if any). See <b>link</b> section for syntax/details. If loopback_bw and loopback_lat (see below) attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node. Loopback link is a @ref pf_sharing_policy_fatpipe "@b FATPIPE".
-loopback_lat      | no      | int    | Latency for loopback (if any). See <b>link</b> section for syntax/details. See loopback_bw for more info.
-topology          | no      | FLAT@|TORUS@|FAT_TREE@|DRAGONFLY (default: FLAT) | Network topology to use. SimGrid currently supports FLAT (with or without backbone, as described before), <a href="http://en.wikipedia.org/wiki/Torus_interconnect">TORUS </a>, FAT_TREE, and DRAGONFLY attributes for this tag.
-topo_parameters   | no      | string | Specific parameters to pass for the topology defined in the topology tag. For torus networks, comma-separated list of the number of nodes in each dimension of the torus. Please refer to the specific documentation for @ref simgrid::kernel::routing::FatTreeZone "FatTree NetZone", @ref simgrid::kernel::routing::DragonflyZone "Dragonfly NetZone".
-
-
-the router name is defined as the resulting String in the following
-java line of code:
-
-@verbatim
-router_name = prefix + clusterId + "_router" + suffix;
-@endverbatim
-
-
-#### Cluster example ####
-
-Consider the following two (and independent) uses of the ``cluster`` tag:
-
-@verbatim
-<cluster id="my_cluster_1" prefix="" suffix="" radical="0-262144"
-         speed="1e9" bw="125e6" lat="5E-5"/>
-
-<cluster id="my_cluster_2" prefix="c-" suffix=".me" radical="0-99"
-         speed="1e9" bw="125e6" lat="5E-5"
-         bb_bw="2.25e9" bb_lat="5E-4"/>
-@endverbatim
-
-The second example creates one router and 100 machines with the following names:
-@verbatim
-c-my_cluster_2_router.me
-c-0.me
-c-1.me
-c-2.me
-...
-c-99.me
-@endverbatim
-
 @subsubsection pf_cabinet &lt;cabinet&gt;
 
 @note
@@ -165,11 +66,6 @@ There are two tags at all times available to represent network entities and
 several other tags that are available only in certain contexts.
 1. ``<link>``:
 
-2. ``<router/>``: Represents an entity that a message can be routed
-    to, but that is unable to execute any code. In SimGrid, routers have also
-    no impact on the performance: Routers do not limit any bandwidth nor
-    do they increase latency. As a matter of fact, routers are (almost) ignored
-    by the simulator when the simulation has begun.
 
 3. ``<backbone/>``: This tag is only available when the containing network zone is
                     used as a cluster (i.e., mode="Cluster")
@@ -189,209 +85,10 @@ Attribute name  | Mandatory | Values | Description
 --------------- | --------- | ------ | -----------
 id              | yes       | string | Name of the link that is supposed to act as a backbone.
 
-@subsection pf_storage Storage
-
-@note
-  This is a prototype version that should evolve quickly, hence this
-  is just some doc valuable only at the time of writing.
-  This section describes the storage management under SimGrid ; nowadays
-  it's only usable with MSG. It relies basically on linux-like concepts.
-  You also may want to have a look to its corresponding section in
-  @ref msg_file ; access functions are organized as a POSIX-like
-  interface.
 
 
 @section pf_routing Routing
 
-To achieve high performance, the routing tables used within SimGrid are
-static. This means that routing between two nodes is calculated once
-and will not change during execution. The SimGrid team chose to use this
-approach as it is rare to have a real deficiency of a resource;
-most of the time, a communication fails because the links experience too much
-congestion and hence, your connection stops before the timeout or
-because the computer designated to be the destination of that message
-is not responding.
-
-We also chose to use shortest paths algorithms in order to emulate
-routing. Doing so is consistent with the reality: [RIP](https://en.wikipedia.org/wiki/Routing_Information_Protocol),
-[OSPF](https://en.wikipedia.org/wiki/Open_Shortest_Path_First), [BGP](https://en.wikipedia.org/wiki/Border_Gateway_Protocol)
-are all calculating shortest paths. They do require some time to converge, but
-eventually, when the routing tables have stabilized, your packets will follow
-the shortest paths.
-
-@subsection  pf_tag_zone &lt;zone&gt;
-
-@subsection pf_rm Routing models
-
-For each network zone, you must define explicitly which routing model will
-be used. There are 3 different categories for routing models:
-
-1. @ref pf_routing_model_shortest_path "Shortest-path" based models: SimGrid calculates shortest
-   paths and manages them. Behaves more or less like most real life
-   routing mechanisms.
-2. @ref pf_routing_model_manual "Manually-entered" route models: you have to define all routes
-   manually in the platform description file; this can become
-   tedious very quickly, as it is very verbose.
-   Consistent with some manually managed real life routing.
-3. @ref pf_routing_model_simple "Simple/fast models": those models offer fast, low memory routing
-   algorithms. You should consider to use this type of model if
-   you can make some assumptions about your network zone.
-   Routing in this case is more or less ignored.
-
-@subsubsection pf_raf The router affair
-
-Using routers becomes mandatory when using shortest-path based
-models or when using the bindings to the ns-3 packet-level
-simulator instead of the native analytical network model implemented
-in SimGrid.
-
-For graph-based shortest path algorithms, routers are mandatory, because these
-algorithms require a graph as input and so we need to have source and
-destination for each edge.
-
-Routers are naturally an important concept ns-3 since the
-way routers run the packet routing algorithms is actually simulated.
-SimGrid's analytical models however simply aggregate the routing time
-with the transfer time.
-
-So why did we incorporate routers in SimGrid? Rebuilding a graph representation
-only from the route information turns out to be a very difficult task, because
-of the missing information about how routes intersect. That is why we
-introduced routers, which are simply used to express these intersection points.
-It is important to understand that routers are only used to provide topological
-information.
-
-To express this topological information, a <b>route</b> has to be
-defined in order to declare which link is connected to a router.
-
-
-@subsubsection pf_routing_model_shortest_path Shortest-path based models
-
-The following table shows all the models that compute routes using
-shortest-paths algorithms are currently available in SimGrid. More detail on how
-to choose the best routing model is given in the Section called @"@ref pf_routing_howto_choose_wisely@".
-
-| Name                                                | Description                                                                |
-| --------------------------------------------------- | -------------------------------------------------------------------------- |
-| @ref pf_routing_model_floyd "Floyd"                 | Floyd routing data. Pre-calculates all routes once                         |
-| @ref pf_routing_model_dijkstra "Dijkstra"           | Dijkstra routing data. Calculates routes only when needed                  |
-| @ref pf_routing_model_dijkstracache "DijkstraCache" | Dijkstra routing data. Handles some cache for already calculated routes.   |
-
-All those shortest-path models are instantiated in the same way and are
-completely interchangeable. Here are some examples:
-
-@anchor pf_routing_model_floyd
-### Floyd ###
-
-Floyd example:
-@verbatim
-<zone  id="zone0"  routing="Floyd">
-
-  <cluster id="my_cluster_1" prefix="c-" suffix=""
-           radical="0-1" speed="1000000000" bw="125000000" lat="5E-5"
-           router_id="router1"/>
-
-  <zone id="zone1" routing="None">
-    <host id="host1" speed="1000000000"/>
-  </zone>
-
-  <link id="link1" bandwidth="100000" latency="0.01"/>
-
-  <zoneroute src="my_cluster_1" dst="zone1"
-    gw_src="router1"
-    gw_dst="host1">
-    <link_ctn id="link1"/>
-  </zoneroute>
-
-</zone>
-@endverbatim
-
-zoneroute given at the end gives a topological information: link1 is
-between router1 and host1.
-
-#### Example platform files ####
-
-This is an automatically generated list of example files that use the Floyd
-routing model (the path is given relative to SimGrid's source directory)
-
-@verbinclude example_filelist_routing_floyd
-
-@anchor pf_routing_model_dijkstra
-### Dijkstra ###
-
-#### Example platform files ####
-
-This is an automatically generated list of example files that use the Dijkstra
-routing model (the path is given relative to SimGrid's source directory)
-
-@verbinclude example_filelist_routing_dijkstra
-
-Dijkstra example:
-@verbatim
- <zone id="zone_2" routing="Dijkstra">
-     <host id="zone_2_host1" speed="1000000000"/>
-     <host id="zone_2_host2" speed="1000000000"/>
-     <host id="zone_2_host3" speed="1000000000"/>
-     <link id="zone_2_link1" bandwidth="1250000000" latency="5E-4"/>
-     <link id="zone_2_link2" bandwidth="1250000000" latency="5E-4"/>
-     <link id="zone_2_link3" bandwidth="1250000000" latency="5E-4"/>
-     <link id="zone_2_link4" bandwidth="1250000000" latency="5E-4"/>
-     <router id="central_router"/>
-     <router id="zone_2_gateway"/>
-     <!-- routes providing topological information -->
-     <route src="central_router" dst="zone_2_host1"><link_ctn id="zone_2_link1"/></route>
-     <route src="central_router" dst="zone_2_host2"><link_ctn id="zone_2_link2"/></route>
-     <route src="central_router" dst="zone_2_host3"><link_ctn id="zone_2_link3"/></route>
-     <route src="central_router" dst="zone_2_gateway"><link_ctn id="zone_2_link4"/></route>
-  </zone>
-@endverbatim
-
-@anchor pf_routing_model_dijkstracache
-### DijkstraCache ###
-
-DijkstraCache example:
-@verbatim
-<zone id="zone_2" routing="DijkstraCache">
-     <host id="zone_2_host1" speed="1000000000"/>
-     ...
-(platform unchanged compared to upper example)
-@endverbatim
-
-#### Example platform files ####
-
-This is an automatically generated list of example files that use the DijkstraCache
-routing model (the path is given relative to SimGrid's source directory):
-
-Editor's note: At the time of writing, no platform file used this routing model - so
-if there are no example files listed here, this is likely to be correct.
-
-@verbinclude example_filelist_routing_dijkstra_cache
-
-@subsubsection pf_routing_model_manual Manually-entered route models
-
-| Name                               | Description                                                                    |
-| ---------------------------------- | ------------------------------------------------------------------------------ |
-| @ref pf_routing_model_full "Full"  | You have to enter all necessary routers manually; that is, every single route. This may consume a lot of memory when the XML is parsed and might be tedious to write; i.e., this is only recommended (if at all) for small platforms. |
-
-@anchor pf_routing_model_full
-### Full ###
-
-Full example:
-@verbatim
-<zone  id="zone0"  routing="Full">
-   <host id="host1" speed="1000000000"/>
-   <host id="host2" speed="1000000000"/>
-   <link id="link1" bandwidth="125000000" latency="0.000100"/>
-   <route src="host1" dst="host2"><link_ctn id="link1"/></route>
- </zone>
-@endverbatim
-
-#### Example platform files ####
-
-This is an automatically generated list of example files that use the Full
-routing model (the path is given relative to SimGrid's source directory):
-
-@verbinclude example_filelist_routing_full
 
 @subsubsection pf_routing_model_simple Simple/fast models
 
@@ -436,6 +133,8 @@ routing model (the path is given relative to SimGrid's source directory):
 @verbinclude example_filelist_routing_none
 
 
+
+
 @anchor pf_routing_model_vivaldi
 ### Vivaldi ###
 
diff --git a/doc/doxygen/uhood_arch.doc b/doc/doxygen/uhood_arch.doc
deleted file mode 100644 (file)
index ea0a3eb..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*! @page uhood_arch Project Architecture Overview
-
-This page presents the current code organization, as you will see it
-if you dig into the src/ directory. <b>But things will change during
-the current Gran Refactoring leading to SimGrid 4</b>. So take the
-information on this page with a grain of salt, and don't be afraid if
-things are not exactly as documented here.
-
-At some point, we at least extend this page to present the overall
-design that we are currently pursuing for SimGrid 4.
-
-If you need to extend SimGrid, then you probably need to head to @ref
-uhood_tech once you understant the overall design presented on this
-page.
-
-@htmlonly
-<center>
-<tt>htmlinclude simgrid_modules.map<tt>
-<br><b>SimGrid Components (click to jump to API)</b>
-</center>
-@endhtmlonly
-
-
-@section ug_overview Overview of the toolkit components
-
-
-@subsection ug_overview_envs Programming environments layer
-
-SimGrid provides several programming environments built on top of a unique
-simulation kernel. Each environment targets a specific audience and
-constitutes a different paradigm. To choose which of them you want to use,
-you have to think about what you want to do and what would be the result of
-your work.
-
- - If you want to study a theoretical problem and compare several
-   heuristics, you probably want to try <b>@ref MSG_API</b> (yet another
-   historical name). It was designed exactly to that extend and should allow
-   you to build easily rather realistic multi-agents simulation. Yet,
-   realism is not the main goal of this environment and the most annoying
-   technical issues of real platforms are masked here. Check the @ref
-   MSG_API section for more information.
-
- - If you want to study the behavior of an MPI application using emulation,
-   you should have a look at the <b>@ref SMPI_API</b> (Simulated
-   MPI) programming environment. Unfortunately, this work is still underway.
-   Check the @ref SMPI_API section for more information.
-
-If your favorite programming environment/model is not there (BSP,
-components, OpenMP, etc.) is not represented in the SimGrid toolkit yet, you may
-consider adding it. You should contact us first on the
-<a href=http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel>SimGrid
-developers mailing list</a>, though.
-
-@subsection ug_overview_kernel Simulation kernel layer
-
-The core functionalities to simulate a virtual platform are provided by a
-module called <b>@ref SURF_API</b>.  It is
-very low-level and is not intended to be used as such by end-users. Instead,
-it serve as a basis for the higher level layer.
-
-SURF main features are a fast max-min linear solver and the ability to
-change transparently the model used to describe the platform. This greatly
-eases the comparison of the several models existing in the literature.
-
-See the @ref SURF_API section for more details.
-
-@subsection ug_overview_fundation Base layer
-
-The base of the whole toolkit is constituted by the <b>@ref XBT_API
-(eXtended Bundle of Tools)</b>.
-
-It is a portable library providing some grounding features such as @ref
-XBT_log, @ref XBT_ex and @ref XBT_config.
-
-XBT also encompass the following convenient C data structures:
-@ref XBT_dynar and @ref XBT_dict.
-The code is being migrated in C++ so you should probably want
-to use standard C++ containers instead of them if possible.
-
-It contains some C++ polyfills and utilities as well.
-
-See the @ref XBT_API section for more details.
-
-
-@subsection ug_lucas_layer Tracing simulation
-Finally, a transversal module allows you to trace your simulation. More documentation in the section @ref TRACE_doc
-
-*/
diff --git a/docs/source/Calibrating_the_models.rst b/docs/source/Calibrating_the_models.rst
new file mode 100644 (file)
index 0000000..55e90ea
--- /dev/null
@@ -0,0 +1,44 @@
+.. raw:: html
+
+   <object id="TOC" data="graphical-toc.svg" type="image/svg+xml"></object>
+   <script>
+   window.onload=function() { // Wait for the SVG to be loaded before changing it
+     var elem=document.querySelector("#TOC").contentDocument.getElementById("PlatformBox")
+     elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
+   }
+   </script>
+   <br/>
+   <br/>
+
+.. _models_calibration:
+
+Calibrating the models
+######################
+
+The simulation models in SimGrid have been object of thorough validation/invalidation campaigns, but the default values may
+not be appropriate for simulating a particular system.
+
+They are configured
+through parameters from the :ref:`XML platform description file <platform>` and parameters passed via
+:ref:`--cfg=Item:Value command-line arguments <options>`. A simulator may also include any number of custom model
+parameters that are used to instantiate particular simulated activities (e.g., a simulator developed with the S4U API
+typically defines volumes of computation, communication, and time to pass to methods such as :cpp:func:`execute()
+<simgrid::s4u::this_actor::execute>`, :cpp:func:`put() <simgrid::s4u::Mailbox::put>`, or :cpp:func:`sleep_for()
+<simgrid::s4u::this_actor::sleep_for>`). Regardless of the potential accuracy of the simulation models, if they are
+instantiated with unrealistic parameter values, then the simulation will be inaccurate. 
+
+Given the above, an integral and crucial part of simulation-driven research is **simulation calibration**: the process by
+which one picks simulation parameter values based on observed real-world executions so that simulated executions have high
+accuracy. We then say that a simulator is "calibrated". Once a simulator is calibrated for a real-world system, it can be
+used to simulate that system accurately. But it can also be used to simulate different but structurally similar systems
+(e.g., different scales, different basic hardware characteristics, different application workloads) with high confidence.
+
+Research conclusions derived from simulation results obtained with an uncalibrated simulator are questionable in terms of
+their relevance for real-world systems. Unfortunately, because simulation calibration is often a painstaking process, is it
+often not performed sufficiently thoroughly (or at all!). We strongly urge SimGrid users to perform simulation calibration.
+Here is an example of a research publication in which the authors have calibrated their (SimGrid) simulators:
+https://hal.inria.fr/hal-01523608
+
+.. include:: tuto_network_calibration/network_calibration_tutorial.rst
+
+.. include:: tuto_disk/analysis.irst
index 7064655..e3cece2 100644 (file)
@@ -19,7 +19,7 @@ There is several ways to deploy the :ref:`application <application>` you want to
 study on your :ref:`simulated platform <platform>`, i.e. to specify which actor
 should be started on which host. You can do so directly in your program (as
 shown in :ref:`these examples <s4u_ex_actors>`), or using an XML deployment
-file. Unless you have a good reason, you should keep your application apart
+file. Either way, it is a good habit to keep your application apart
 from the deployment as it will :ref:`ease your experimental campaign afterward
 <howto_science>`.
 
index 0696f9c..8b02627 100644 (file)
@@ -261,10 +261,6 @@ enable_java (on/OFF)
   Generates the java bindings of SimGrid. You must also enable MSG for
   this to work.
 
-enable_jedule (on/OFF)
-  Produces execution traces from SimDag simulations, which can then be visualized with the
-  Jedule external tool.
-
 enable_lua (on/OFF)
   Generate the lua bindings to the SimGrid internals (requires lua-5.3).
 
index b99d1fe..4102473 100644 (file)
@@ -199,7 +199,7 @@ SimGrid Success Stories
 
 SimGrid was cited in over 3,000 scientific papers (according to Google
 Scholar). Among them,
-`over 500 publications <https://simgrid.org/Usages.html>`_
+`over 500 publications <https://simgrid.org/usages.html>`_
 (written by hundreds of individuals) use SimGrid as a scientific
 instrument to conduct their experimental evaluation. These
 numbers do not include the articles contributing to SimGrid.
@@ -215,7 +215,7 @@ This instrument was used in many research communities, such as
 `Network Architecture <http://dx.doi.org/10.1109/TPDS.2016.2613043>`_,
 `Fog Computing <http://ieeexplore.ieee.org/document/7946412/>`_, or
 `Batch Scheduling <https://hal.archives-ouvertes.fr/hal-01333471>`_
-`(more info) <https://simgrid.org/Usages.html>`_.
+`(more info) <https://simgrid.org/usages.html>`_.
 
 If your platform description is accurate enough (see
 `here <http://hal.inria.fr/hal-00907887>`_ or
similarity index 81%
rename from docs/source/Platform_howtos.rst
rename to docs/source/Modeling_howtos.rst
index d17d765..3772a67 100644 (file)
@@ -56,49 +56,6 @@ Unsupported claims, (6) Toy duck approach, and (7) The tunnel view. As
 you can see, this article is a must read. It's a pity that it's not
 freely available, though.
 
-.. _howto_calibration:
-
-Getting realistic results
-*************************
-
-The simulation models in SimGrid have been developed with care and the
-object of thorough validation/invalidation campaigns. These models
-come with parameters that configure their behaviors. The values of
-these parameters are set based on the :ref:`XML platform description
-file <platform>` and on parameters passed via :ref:`--cfg=Item:Value
-command-line arguments <options>`. A simulator may also include any
-number of custom model parameters that are used to instantiate
-particular simulated activities (e.g., a simulator developed with the
-S4U API typically defines volumes of computation, communication, and
-time to pass to methods such as :cpp:func:`execute()
-<simgrid::s4u::this_actor::execute>`, :cpp:func:`put()
-<simgrid::s4u::Mailbox::put>`, or :cpp:func:`sleep_for()
-<simgrid::s4u::this_actor::sleep_for>`).  Regardless of the potential
-accuracy of the simulation models, if they are instantiated with
-unrealistic parameter values, then the simulation will be inaccurate.
-The provided default values may or may not be appropriate for
-simulating a particular system.
-
-Given the above, an integral and crucial part of simulation-driven
-research is **simulation calibration**: the process by which one picks
-simulation parameter values based on observed real-world executions so
-that simulated executions have high accuracy.  We then say that a
-simulator is "calibrated".  Once a simulator is calibrated for a
-real-world system, it can be used to simulate that system accurately.
-But it can also be used to simulate different but structurally
-similar systems (e.g., different scales, different basic hardware
-characteristics, different application workloads) with high confidence.
-
-Research conclusions derived from simulation results obtained with an
-uncalibrated simulator are questionable in terms of their relevance
-for real-world systems. Unfortunately, because simulation calibration
-is often a painstaking process, is it often not performed sufficiently
-thoroughly (or at all!). We strongly urge SimGrid users to perform
-simulation calibration. Here is an example of a research publication
-in which the authors have calibrated their (SimGrid) simulators:
-https://hal.inria.fr/hal-01523608
-
-
 .. _howto_churn:
 
 Modeling churn (e.g., in P2P)
@@ -289,6 +246,3 @@ So the final platform for our example becomes :
         <link_ctn id="link2"/>
     </route>
 
-.. include:: tuto_disk/analysis.irst
-
-.. include:: tuto_network_calibration/network_calibration_tutorial.rst
index d175a95..2c87454 100644 (file)
@@ -32,7 +32,6 @@ If host `A` sends `100kB` (a hundred kilobytes) to host `B`, one could expect
 that this communication would take `0.81` seconds to complete according to a
 simple latency-plus-size-divided-by-bandwidth model (0.01 + 8e5/1e6 = 0.81).
 However, the default TCP model of SimGrid is a bit more complex than that. It
-
 accounts for three phenomena that directly impact the simulation time even
 on such a simple example:
 
index 9f4af11..152e8e2 100644 (file)
@@ -3,6 +3,18 @@
 Simulation outcomes
 ###################
 
+.. raw:: html
+
+   <object id="TOC" data="graphical-toc.svg" type="image/svg+xml"></object>
+   <script>
+   window.onload=function() { // Wait for the SVG to be loaded before changing it
+     //var elem=document.querySelector("#TOC").contentDocument.getElementById("DeployBox")
+     //elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
+   }
+   </script>
+   <br/>
+   <br/>
+
 .. _outcome_logs:
 
 Textual logging
index 272889b..4a2759e 100644 (file)
@@ -57,50 +57,46 @@ the example above.
 Cluster with a Crossbar
 -----------------------
 
-A very common parallel computing platform is a homogeneous cluster in
-which hosts are interconnected via a crossbar switch with as many
-ports as hosts, so that any disjoint pairs of hosts can communicate
-concurrently at full speed. For instance:
+A very common parallel computing platform is a homogeneous cluster in which hosts are interconnected via a crossbar switch
+with as many ports as hosts, so that any disjoint pairs of hosts can communicate concurrently at full speed. Because there
+is no contention on the switch, it is modeled as if there were a direct link from each host to the outgoing router. For
+instance:
+
 
 .. literalinclude:: ../../examples/platforms/cluster_crossbar.xml
    :language: xml
    :lines: 1-3,18-
 
-One specifies a name prefix and suffix for each host, and then give an
-integer range. In the example the cluster contains 65535 hosts (!),
-named ``node-0.simgrid.org`` to ``node-65534.simgrid.org``. All hosts
-have the same power (1 Gflop/sec) and are connected to the switch via
-links with same bandwidth (125 MBytes/sec) and latency (50
+One specifies a name prefix and suffix for each host, and then give an integer range. In the example the cluster contains
+65536 hosts (!), named ``node-0.simgrid.org`` to ``node-65535.simgrid.org``. All hosts have the same power (1 Gflop/sec)
+and are connected directly to the switch via private links with same bandwidth (125 MBytes/sec) and latency (50
 microseconds).
 
-.. todo::
+The outgoing router is named ``${prefix}${cluster_id}_router${suffix}`` so in this case, this is
+``node-cluster-crossbar_router.simgrid.org``.
 
-   Add the picture.
+.. image:: ../../examples/platforms/cluster_crossbar.svg
+   :align: center
 
 Cluster with a Shared Backbone
 ------------------------------
 
-Another popular model for a parallel platform is that of a set of
-homogeneous hosts connected to a shared communication medium, a
-backbone, with some finite bandwidth capacity and on which
-communicating host pairs can experience contention. For instance:
-
+Another popular model for a parallel platform is that of a set of homogeneous hosts connected to a shared communication
+medium, a backbone, with some limited bandwidth capacity and on which communicating host pairs can experience contention.
+For instance:
 
 .. literalinclude:: ../../examples/platforms/cluster_backbone.xml
    :language: xml
    :lines: 1-3,18-
 
-The only differences with the crossbar cluster above are the ``bb_bw``
-and ``bb_lat`` attributes that specify the backbone characteristics
-(here, a 500 microseconds latency and a 2.25 GByte/sec
-bandwidth). This link is used for every communication within the
-cluster. The route from ``node-0.simgrid.org`` to ``node-1.simgrid.org``
-counts 3 links: the private link of ``node-0.simgrid.org``, the backbone
-and the private link of ``node-1.simgrid.org``.
+The main differences with the crossbar cluster above are the ``bb_bw`` and ``bb_lat`` attributes that specify the backbone
+characteristics (here, a 500 microseconds latency and a 2.25 GBytes/sec bandwidth). This link is used for every
+communication within the cluster. The route from ``node-0.simgrid.org`` to ``node-1.simgrid.org`` counts 3 links: the
+private link of ``node-0.simgrid.org``, the backbone and the private link of ``node-1.simgrid.org``. The route from
+``node-0.simgrid.org`` to the outer internet counts 2 links: the private link of ``node-0.simgrid.org`` and the backbone.
 
-.. todo::
-
-   Add the picture.
+.. image:: ../../examples/platforms/cluster_backbone.svg
+   :align: center
 
 Torus Cluster
 -------------
@@ -197,10 +193,10 @@ For example, ``3,4 ; 3,2 ; 3,1 ; 2``:
 Star Zone
 ---------
 
-In a Star topology, as the name says, nodes are organized following a star.
-It's similar to a cluster topology but you have the flexibility to set
-different route for every component in the star.
-Unfortunately, it's only available in the C++ interface.
+A Star topology can be seen as a crossbar cluster that does not interconnect hosts, but subzones. It can for example be
+used to model a cluster of complex hosts, where each host is disaggregated, with CPUs, GPUs and maybe a network on chip. It
+is similar to a cluster topology, with the flexibility to set different route for every component in the star. Because of
+its complexity, this topology is only available from the C++ interface.
 
 .. image:: img/starzone.svg
     :scale: 80%
index 93156f2..f3cb3d5 100644 (file)
@@ -57,7 +57,7 @@ Shortest path
 =============
 
 SimGrid can compute automatically the paths between all pair of hosts in a zone. You just need to provide the one-hop routes to connect all hosts.
-Two algorithms are provided: 
+Several algorithms are provided: 
 
   - ``routing=Floyd``: use the number of hops to build shortest path. It is calculated only once at the beginning of the
     simulation.
@@ -92,14 +92,19 @@ computed automatically at startup. Another way to describe the same platform can
 .. image:: /tuto_smpi/3hosts.png
    :align: center
 
+.. _pf_rm_cluster:
+
 Clusters
 ========
 
-TODO
+Clusters constitute a fundamental building bricks of any cyberinfrastructure. SimGrid provides several kinds of clusters:
+crossbar clusters (contention-free internal network), backbone clusters (constrained internal network), fat-trees,
+DragonFly, Torus and generic Star clusters. Each of them are created through the :ref:`pf_tag_cluster` tag, and have a
+highly optimized implementation in SimGrid source code.
 
-  - **Cluster/Fat-Tree/DragonFly/Torus**: routing is defined by the topology, automatically created.
-    These zones must be defined through the :ref:`pf_tag_cluster` tag in the XML.
-  - **Star**: star-like topology. Users describe routes from/to every host in the zone.
+The documentation of each cluster kinds is given as :ref:`platform_examples`.
+
+.. _pf_rm_vivaldi:
 
 Vivaldi
 =======
@@ -150,6 +155,13 @@ Wi-Fi
 
 TODO
 
+ns-3
+====
+
+When using :ref:`model_ns3`, SimGrid does not uses its own platform or routing models. Your platform must be limited to one
+zone only, and any routing model will be ignored. Since ns-3 uses a shortest path algorithm on its side, all routes must be
+of length 1.
+
 .. _pf_routes:
 
 Describing routes
@@ -167,7 +179,10 @@ the common ancestor) and finally, move within zone ``dst`` from ``gw_dst`` to ``
 SimGrid enforces that each gateway is within its zone, either directly or in a sub-zone to ensure that the algorithm
 described in the next section actually works.
 
-TODO: bypassRoute
+One can also use :ref:`pf_tag_bypassRoute` and :ref:`pf_tag_bypassZoneRoute` to define exceptions to the classical routing
+algorithm. This advanced feature is also detailed in the next section.
+
+.. _pf_route_usage:
 
 Calculating network paths
 *************************
@@ -175,6 +190,9 @@ Calculating network paths
 Computing the path between two hosts is easy when they are located in the same zone. It is done directly by the routing
 algorithm of that zone. Full routing looks in its table, Vivaldi computes the distance between peers, etc.
 
+Another simple case is when a :ref:`pf_tag_bypassRoute` was provided. Such routes are used in priority, with no further
+routing computation. You can define a bypass between any hosts, even if they are not in the same zone.
+
 When communicating through several zones, a recursive algorithm is used. As an illustration, we will apply this
 algorithm to a communication between `host1` in `AS1` and `host2` in `AS5-4`, in our previous topology. This section
 only gives an overview of the algorithm used. You should refer to the source code for the full details, in
@@ -190,9 +208,9 @@ only gives an overview of the algorithm used. You should refer to the source cod
 
    .. code-block:: XML
 
-        <zoneRoute src="AS2" dst="AS5" gw_src="Host1" gw_dst"="gw1">
-            <link_ctn id="Link1">
-        </zoneRoute>
+      <zoneRoute src="AS2" dst="AS5" gw_src="Host1" gw_dst"="gw1">
+         <link_ctn id="Link1"/>
+      </zoneRoute>
 
 2. **Add the route up to the ancestor**, i.e. from ``src`` to the ``gw_src`` in the route between ancestor zones. This is a recursive call to the current algorithm.
 
@@ -207,10 +225,10 @@ only gives an overview of the algorithm used. You should refer to the source cod
    Here, we need the route from *gw1* and *host2*. The common ancestor is *AS5*, and the relative ancestors are *AS5-4* and *AS5-3*. This route is defined as follows (routes are symmetrical by default).
 
    .. code-block:: XML
-
-        <zoneRoute src="AS5-4" dst="AS5-3" gw_src="gw2" gw_dst"="gw1">
-            <link_ctn id="Link3">
-        </zoneRoute>
+      
+      <zoneRoute src="AS5-4" dst="AS5-3" gw_src="gw2" gw_dst"="gw1">
+         <link_ctn id="Link3"/>
+      </zoneRoute>
 
    So to compute the route from *gw1* to *Host2*, we need to add:
 
@@ -226,6 +244,9 @@ only gives an overview of the algorithm used. You should refer to the source cod
 
 In the end, our communication from *Host1@AS2* to *Host2@AS5-4* follows this path: ``{Link1, Link3, Link2}`` 
 
+It is possbile to use :ref:`pf_tag_bypassZoneRoute` to provide a path between two zones that are not necessarily sibilings.
+If such routes exist, SimGrid will try to match each of the ancestor zones of the source with each of the ancestor zone of
+the destination, looking for such a bypass to use intead of the common ancestor.
 
 Loopback links
 **************
index 0721840..9435ecf 100644 (file)
@@ -18,47 +18,92 @@ Complete XML Reference
 Your platform description should follow the specification presented in the
 `simgrid.dtd <https://simgrid.org/simgrid.dtd>`_ DTD file. The same DTD is used for both platform and deployment files.
 
+Here is the complete list of all existing tags in the DTD:
+
+:ref:`pf_tag_actor`: request the creation of an actor (deployment file, not in the platform). |br|
+:ref:`pf_tag_argument`: pass parameters to the created actors (deployment file, not in the platform). |br|
+:ref:`pf_tag_backbone`: building clusters manually from the XML (deprecated, please use the C++ API). |br|
+:ref:`pf_tag_bypassRoute`: tweeking the routing (advanced tag). |br|
+:ref:`pf_tag_bypassZoneRoute`: tweeking the routing (expert-only tag). |br|
+:ref:`pf_tag_cabinet`: building clusters manually from the XML (deprecated, please use the C++ API). |br|
+:ref:`pf_tag_config`: pass simulation parameters from the XML file. |br|
+:ref:`pf_tag_disk`: storage resource. |br|
+:ref:`pf_tag_host`: computing resource. |br|
+:ref:`pf_tag_host_link`: building clusters manually from the XML (deprecated, please use the C++ API). |br|
+:ref:`pf_tag_link`: communication resource. |br|
+:ref:`pf_tag_link_ctn`: name of a link to be included in a route. |br|
+:ref:`pf_tag_peer`: host located in a :ref:`pf_rm_vivaldi` zone. |br|
+:ref:`pf_tag_platform`: root tag of any platform description. |br|
+:ref:`pf_tag_prop`: attach used-defined properties to your :ref:`pf_tag_actor`, :ref:`pf_tag_disk`, :ref:`pf_tag_host`, :ref:`pf_tag_link` or :ref:`pf_tag_zone`. |br|
+:ref:`pf_tag_route`: intra-zone network path. |br|
+:ref:`pf_tag_router`: like an :ref:`pf_tag_host` that cannot host actors (for network routing algorithms). |br|
+:ref:`pf_tag_zone`: area of the network containing elements (:ref:`pf_tag_disk`, :ref:`pf_tag_host`, :ref:`pf_tag_link` and sub-:ref:`pf_tag_zone`). |br|
+:ref:`pf_tag_zoneRoute`: inter-zone network path.
+
 -------------------------------------------------------------------------------
 
-.. _pf_tag_disk:
+.. _pf_tag_cluster:
 
-<disk>
-------
+<cluster>
+---------
 
-SimGrid can simulate the time it takes to read or write data on disk, even if the stored data is not made persistent in
-any way by SimGrid. This means that your application will correctly be slowed down when doing simulated I/O, but there
-is no way to get the data stored this way.
+This complex tag builds a full zone, with some hosts, links, a router, and the relevant routing algorithm. There is several
+kind of specifically tailored cluster types: crossbar clusters (contention-free internal network), backbone clusters
+(constrained internal network), fat-trees, DragonFly and Torus (star clusters are similar, but can only be created from the
+C++ code). The ``topology`` attribute is used to choose the type of cluster while the ``topo_parameters`` attribute is used
+to configure the topology. Please refer to the  :ref:`examples in the documentation <platform_examples>` for all details.
 
-We decided to not model anything beyond raw access in SimGrid because we believe that there is not single way of doing so.
-We provide an example model of file system as a plugin, (sparsely) documented in :ref:`plugin_filesystem`.
+Regardless of its topology, each cluster comes with a router that can be used for inter-zone routing. Its name is defined
+as ``${prefix}${clusterId}_router${suffix}``.
 
-**Parent tags:** :ref:`pf_tag_host` |br|
-**Children tags:** :ref:`pf_tag_prop` |br|
+**Parent tags:** :ref:`pf_tag_platform`, :ref:`pf_tag_zone` |br|
+**Children tags:** none |br|
 **Attributes:**
 
-:``id``: A name of your choice (must be unique on this host).
-:``read_bw``: Read bandwidth for this disk. You must specify a unit as follows.
+:``id``: The identifier of the cluster. Facilitates referring to this cluster.
+:``prefix``: Each node of the cluster has to have a name. This name will be prefixed with this prefix.
+:``suffix``: Each node of the cluster will be suffixed with this suffix
+:``radical``: Regexp used to generate cluster nodes name.
 
-   **Units in bytes and powers of 2** (1 KiBps = 1,024 Bps):
-     Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps. |br|
-   **Units in bits  and powers of 2** (1 Bps = 8 bps):
-     bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps. |br|
-   **Units in bytes and powers of 10**  (1 KBps = 1,000 Bps):
-     Bps, KBps, MBps, GBps, TBps, PBps, or EBps. |br|
-   **Units in bits  and powers of 10:**
-     bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.
+    Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before.
 
-:``write_bw``: Write bandwidth for this disk. You must specify a unit as for the read bandwidth.
+    The produced number is concatenated between prefix and suffix to form machine names.
+:``speed``: Same as the ``speed`` attribute of the :ref:`pf_tag_host` tag.
+:``core``: Same as the ``core`` attribute of the :ref:`pf_tag_host` tag.
+:``bw``: Bandwidth for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
+:``lat``: Latency for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
+:``sharing_policy``: Sharing policy for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
+:``bb_bw``: Bandwidth for backbone (if any). See :ref:`pf_tag_link` for syntax/details.
 
-.. code-block:: xml
+    If bb_bw and bb_lat attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
+:``bb_lat``: Latency for backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
 
-    <host id="alice" speed="1Gf">
-      <disk id="Disk1" read_bw="200MBps" write_bw="80MBps">
-        <!-- you can add properties for anything you want: they are not used by SimGrid -->
-        <prop id="content" value="storage/content/small_content.txt"/>
-      </disk>
-      <prop id="ram" value="100B" />
-    </host>
+    If bb_lat and bb_bw attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
+:``bb_sharing_policy``: Sharing policy for the backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
+:``limiter_link``: Bandwidth for limiter link (if any).
+
+    This adds a specific link for each node, to set the maximum bandwidth reached when communicating in both directions at the same time.
+
+    In theory this value should be 2*bw for splitduplex links, but in reality this might be less. This value will depend heavily on the communication model, and on the cluster's hardware, so no default value can be set, this has to be measured.
+
+    More details can be obtained in `Toward Better Simulation of MPI Applications on Ethernet/TCP Networks <https://hal.inria.fr/hal-00919507/>`_
+:``loopback_bw``: Bandwidth for loopback (if any). See :ref:`pf_tag_link` section for syntax/details.
+
+    If loopback_bw and loopback_lat attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node.
+
+    The sharing policy of a loopback link is **FATPIPE** :ref:`pf_tag_link`.
+:``loopback_lat``: Latency for loopback (if any). See loopback_bw for more info.
+:``topology``: Network topology to use.
+
+    SimGrid currently supports FLAT (with or without backbone, as described before), TORUS, FAT_TREE and DRAGONFLY attributes for this tag.
+
+    See :ref:`platform_examples` for more details.
+
+:``topo_parameters``: Specific parameters to pass for the topology defined in the topology tag.
+
+    For torus networks, comma-separated list of the number of nodes in each dimension of the torus.
+
+    Please refer to :ref:`platform_examples`.
 
 -------------------------------------------------------------------------------
 
@@ -97,6 +142,48 @@ name of the flag and ``value`` is what it has to be set to.
 
 -------------------------------------------------------------------------------
 
+.. _pf_tag_disk:
+
+<disk>
+------
+
+SimGrid can simulate the time it takes to read or write data on disk, even if the stored data is not made persistent in
+any way by SimGrid. This means that your application will correctly be slowed down when doing simulated I/O, but there
+is no way to get the data stored this way.
+
+We decided to not model anything beyond raw access in SimGrid because we believe that there is not single way of doing so.
+We provide an example model of file system as a plugin, (sparsely) documented in :ref:`plugin_filesystem`.
+
+**Parent tags:** :ref:`pf_tag_host` |br|
+**Children tags:** :ref:`pf_tag_prop` |br|
+**Attributes:**
+
+:``id``: A name of your choice (must be unique on this host).
+:``read_bw``: Read bandwidth for this disk. You must specify a unit as follows.
+
+   **Units in bytes and powers of 2** (1 KiBps = 1,024 Bps):
+     Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps. |br|
+   **Units in bits  and powers of 2** (1 Bps = 8 bps):
+     bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps. |br|
+   **Units in bytes and powers of 10**  (1 KBps = 1,000 Bps):
+     Bps, KBps, MBps, GBps, TBps, PBps, or EBps. |br|
+   **Units in bits  and powers of 10:**
+     bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.
+
+:``write_bw``: Write bandwidth for this disk. You must specify a unit as for the read bandwidth.
+
+.. code-block:: xml
+
+    <host id="alice" speed="1Gf">
+      <disk id="Disk1" read_bw="200MBps" write_bw="80MBps">
+        <!-- you can add properties for anything you want: they are not used by SimGrid -->
+        <prop id="content" value="storage/content/small_content.txt"/>
+      </disk>
+      <prop id="ram" value="100B" />
+    </host>
+
+-------------------------------------------------------------------------------
+
 .. _pf_tag_host:
 
 <host>
@@ -371,9 +458,9 @@ following functions:
 
 - Actor: :cpp:func:`simgrid::s4u::Actor::get_property` or :cpp:func:`MSG_process_get_property_value`
 - Cluster: this is a zone, see below.
+- Disk: :cpp:func:`simgrid::s4u::Disk::get_property`
 - Host: :cpp:func:`simgrid::s4u::Host::get_property` or :cpp:func:`MSG_host_get_property_value`
 - Link: :cpp:func:`simgrid::s4u::Link::get_property`
-- Disk: :cpp:func:`simgrid::s4u::Disk::get_property`
 - Zone: :cpp:func:`simgrid::s4u::NetZone::get_property` of :cpp:func:`MSG_zone_get_property_value`
 
 **Parent tags:** :ref:`pf_tag_actor`, :ref:`pf_tag_config`, :ref:`pf_tag_cluster`, :ref:`pf_tag_host`,
@@ -391,12 +478,12 @@ following functions:
 <route>
 -------
 
-A path between two network locations, composed of several occurrences
-of :ref:`pf_tag_link` .
+A path between two network locations, composed of several occurrences of :ref:`pf_tag_link`. It is only relevant for
+intra-:ref:`pf_tag_zone` routes. Inter-zone routes must be declared with :ref:`pf_tag_zoneRoute`. More detail can be
+found in the following sections :ref:`pf_routes` and :ref:`pf_route_usage`.
 
 **Parent tags:** :ref:`pf_tag_zone` |br|
 **Children tags:** :ref:`pf_tag_link_ctn` |br|
-**See also:** :ref:`pf_tag_zoneRoute`, :ref:`pf_routes` |br|
 **Attributes:**
 
 :``src``: Host from which this route starts. Must be the name of an existing host.
@@ -413,10 +500,9 @@ of :ref:`pf_tag_link` .
 <router>
 --------
 
-A router is similar to a :ref:`pf_tag_host`, but it cannot contain
-any actor. It is only useful to some routing algorithms. In
-particular, they are useful when you want to use the NS3 bindings to
-break the routes that are longer than 1 hop.
+A router is similar to a :ref:`pf_tag_host`, but it cannot contain any actor. It is only useful to some routing
+algorithms. In particular, they are useful when you want to use the NS3 bindings to break the routes that are longer
+than 1 hop.
 
 **Parent tags:** :ref:`pf_tag_zone` (only leaf zones, i.e., zones containing neither inner zones nor clusters) |br|
 **Attributes:**
@@ -452,176 +538,108 @@ elements such as host or peer) |br|
 <zoneRoute>
 -----------
 
-The purpose of this entity is to define a route between two zones. Recall that
-all zones form a tree, so to connect two sibling zones, you must give such a
-zoneRoute specifying the source and destination zones, along with the gateway in
-each zone (i.e., the point to reach within that zone to reach the zone), and the
-list of links to go from one zone to another.
+All information to factorize the routes between two zones; intra-zone paths must be declared with :ref:`pf_tag_route`.
+Since zones form a tree, :ref:`pf_tag_zoneRoute` is probably best used to connect sibling zones.
+
+When declaring a zoneRoute, you must give the source and destination zones, along with the gateway in each zone (i.e.,
+the point to reach within that zone to reach the declared route), and the list of links to go from one zone to another.
+More detail can be found in the following sections :ref:`pf_routes` and :ref:`pf_route_usage`.
 
 **Parent tags:** :ref:`pf_tag_zone` |br|
 **Children tags:** :ref:`pf_tag_link_ctn` |br|
-**See also:** :ref:`pf_tag_route`, :ref:`pf_routes` |br|
 **Attributes:**
 
 :``src``: Zone from which this route starts. Must be an existing zone.
 :``dst``: Zone to which this route leads. Must be an existing zone.
 :``gw_src``: Netpoint (within src zone) from which this route starts. Must be an existing host/router.
 :``gw_dst``: Netpoint (within dst zone) to which this route leads. Must be an existing host/router.
-:``symmetrical``: Whether this route is symmetrical, ie, whether we
-                 are defining the route ``dst -> src`` at the same
-                 time. Valid values: ``yes``, ``no``, ``YES``, ``NO``.
-
+:``symmetrical``: Whether this route is symmetrical, ie, whether we are defining the route ``dst -> src`` at the same
+                 time. Valid values: ``yes``, ``no``, ``YES``, ``NO``. 
 
 -------------------------------------------------------------------------------
 
-.. _pf_tag_cluster:
+Advanced tags
+-------------
 
-<cluster>
----------
+The following list contains some tags that are less often used. They are still valid, but unless you know what you are
+doing, there is a good chance that you don't really want to use them.
 
-This tag is commonly used when one wants to define many hosts and a network quickly.
-Technically, cluster is a meta-tag: **from the inner SimGrid point of
-view, a cluster is a network zone where some optimized routing is defined**.
-The default inner organization of the cluster is as follow:
-
-.. code-block:: text
-
-                 __________
-                |          |
-                |  router  |
-    ____________|__________|_____________ backbone
-      |   |   |              |     |   |
-    l0|        l1| l2|           l97| l96 |   | l99
-      |   |   |   ........   |     |   |
-      |                                |
-    c-0.me                             c-99.me
-
-
-Here, a set of **hosts** is defined. Each of them has a **link**
-to a central backbone (backbone is a link itself, as a link can
-be used to represent a switch).
-A **router** allows to connect a **cluster** to the outside world. Internally,
-SimGrid treats a cluster as a network zone containing all hosts: the router is the
-gateway for the cluster.
-
-There is an alternative organization, which is as follows:
-
-.. code-block:: text
-
-         __________
-        |          |
-        |  router  |
-        |__________|
-            / | \
-           /  |  \
-       l0 / l1|   \l2
-         /    |    \
-        /     |     \
-    host0   host1   host2
-
-The principle is the same, except that there is no backbone. This representation
-can be obtained easily: just do not set the bb_* attributes.
 
-**Parent tags:** :ref:`pf_tag_platform`, :ref:`pf_tag_zone` |br|
-**Children tags:** none |br|
-**Attributes:**
-
-:``id``: The identifier of the cluster. Facilitates referring to this cluster.
-:``prefix``: Each node of the cluster has to have a name. This name will be prefixed with this prefix.
-:``suffix``: Each node of the cluster will be suffixed with this suffix
-:``radical``: Regexp used to generate cluster nodes name.
-
-    Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before.
-
-    The produced number is concatenated between prefix and suffix to form machine names.
-:``speed``: Same as the ``speed`` attribute of the :ref:`pf_tag_host` tag.
-:``core``: Same as the ``core`` attribute of the :ref:`pf_tag_host` tag.
-:``bw``: Bandwidth for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
-:``lat``: Latency for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
-:``sharing_policy``: Sharing policy for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
-:``bb_bw``: Bandwidth for backbone (if any). See :ref:`pf_tag_link` for syntax/details.
-
-    If bb_bw and bb_lat attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
-:``bb_lat``: Latency for backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
-
-    If bb_lat and bb_bw attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
-:``bb_sharing_policy``: Sharing policy for the backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
-:``limiter_link``: Bandwidth for limiter link (if any).
-
-    This adds a specific link for each node, to set the maximum bandwidth reached when communicating in both directions at the same time.
-
-    In theory this value should be 2*bw for splitduplex links, but in reality this might be less. This value will depend heavily on the communication model, and on the cluster's hardware, so no default value can be set, this has to be measured.
-
-    More details can be obtained in `Toward Better Simulation of MPI Applications on Ethernet/TCP Networks <https://hal.inria.fr/hal-00919507/>`_
-:``loopback_bw``: Bandwidth for loopback (if any). See :ref:`pf_tag_link` section for syntax/details.
-
-    If loopback_bw and loopback_lat attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node.
+-------------------------------------------------------------------------------
 
-    The sharing policy of a loopback link is **FATPIPE** :ref:`pf_tag_link`.
-:``loopback_lat``: Latency for loopback (if any). See loopback_bw for more info.
-:``topology``: Network topology to use.
+.. _pf_tag_bypassRoute:
 
-    SimGrid currently supports FLAT (with or without backbone, as described before), TORUS, FAT_TREE and DRAGONFLY attributes for this tag.
+<bypassRoute>
+^^^^^^^^^^^^^
 
-    See :ref:`platform_examples` for more details.
+This tag can be used to completely bypass the classical :ref:`routing algorithm <pf_route_usage>` for a pair of hosts. The
+provided list of links will be used directly, with no further routing computation. This is an advanced tag that is rarely
+used in practice.
 
-:``topo_parameters``: Specific parameters to pass for the topology defined in the topology tag.
-
-    For torus networks, comma-separated list of the number of nodes in each dimension of the torus.
+**Parent tags:** :ref:`pf_tag_zone` |br|
+**Children tags:** :ref:`pf_tag_link_ctn` |br|
+**Attributes:**
 
-    Please refer to :ref:`platform_examples`.
+:``src``: Host from which this route starts. Must be the name of an existing host.
+:``dst``: Host to which this route leads. Must be the name of an existing host.
+:``symmetrical``: Whether this route is symmetrical, ie, whether we are defining the route ``dst -> src`` at the same time.
+                 Valid values: ``yes``, ``no``, ``YES``, ``NO`` (default: YES).
 
+-------------------------------------------------------------------------------
 
-Cluster example
-^^^^^^^^^^^^^^^
+.. _pf_tag_bypassZoneRoute:
 
-Consider the following two (and independent) uses of the ``cluster`` tag:
+<bypassZoneRoute>
+^^^^^^^^^^^^^^^^^
 
-.. code-block:: xml
+This tag can be used to completely bypass the classical :ref:`routing algorithm <pf_route_usage>` between two zones. When
+provided, it breaks the recursive search and the provided links will be used instead. This tag should probably be reserved
+to experts.
 
-    <cluster id="my_cluster_1" prefix="" suffix="" radical="0-262144"
-         speed="1e9" bw="125e6" lat="5E-5"/>
+**Parent tags:** :ref:`pf_tag_zone` |br|
+**Children tags:** :ref:`pf_tag_link_ctn` |br|
+**Attributes:**
 
-    <cluster id="my_cluster_2" prefix="c-" suffix=".me" radical="0-99"
-         speed="1e9" bw="125e6" lat="5E-5"
-         bb_bw="2.25e9" bb_lat="5E-4"/>
+:``src``: Zone from which this route starts. Must be an existing zone.
+:``dst``: Zone to which this route leads. Must be an existing zone.
+:``gw_src``: Netpoint (within src zone) from which this route starts. Must be an existing host/router.
+:``gw_dst``: Netpoint (within dst zone) to which this route leads. Must be an existing host/router.
+:``symmetrical``: Whether this route is symmetrical, ie, whether we are defining the route ``dst -> src`` at the same
+                 time. Valid values: ``yes``, ``no``, ``YES``, ``NO``. 
 
+-------------------------------------------------------------------------------
 
-The second example creates one router and 100 machines with the following names:
+.. _pf_tag_backbone:
 
-.. code-block:: text
+<backbone>
+^^^^^^^^^^
 
-    c-my_cluster_2_router.me
-    c-0.me
-    c-1.me
-    c-2.me
-    ...
-    c-99.me
+Within a manually-built cluster, specify the backbone to use. See the documentation of :ref:`pf_tag_cabinet` for all
+details, even if you should probably stop using this tag and switch to the C++ interface.
 
-.. note::
+**Parent tags:** :ref:`pf_tag_zone` with ``routing="Cluster"`` attribute |br|
+**Children tags:** none |br|
+**Attributes:**
 
-    The router name is defined as the resulting string: prefix + clusterId + "_router" + suffix.
-    In this case: *my_cluster_1_router* and *my_cluster_2_router.me*.
+:``id``: No other link in the platform shall have the same identifier.
+:``bw``: Bandwidth, see the :ref:`pf_tag_link` for syntax/details.
+:``lat``: Latency, see the :ref:`pf_tag_link` for syntax/details.
 
 -------------------------------------------------------------------------------
 
 .. _pf_tag_cabinet:
 
 <cabinet>
----------
+^^^^^^^^^
 
-.. note::
-    This tag is only available when the routing mode of the network zone
-    is set to ``Cluster``.
+The cabinet tag is a shortcut for creating a set of (homogenous) hosts and links quickly, as in cabinets of data centers.
+This is mostly useful when manually describing a cluster, i.e. a ``<zone routing="Cluster">`` where you manually specify
+the content with :ref:`pf_tag_cabinet`, :ref:`pf_tag_backbone` and maybe :ref:`pf_tag_host_link`.
 
-The cabinet tag is, like the :ref:`pf_tag_cluster` tag,
-a meta-tag. This means that it is simply a shortcut for creating a set of (homogenous) hosts and links quickly;
-unsurprisingly, this tag was introduced to setup cabinets in data centers. Unlike
-:ref:`pf_tag_cluster`, however, the :ref:`pf_tag_cabinet` assumes that you create the backbone
-and routers yourself; see our examples below.
+But this approach is somewhat deprecated now, as the C++ interface is both more convinient and more powerful. For example,
+the core amount or link characteristics cannot be changed with this tag.
 
-**Parent tags:** :ref:`pf_tag_zone` |br|
+**Parent tags:** :ref:`pf_tag_zone` with ``routing="Cluster"`` attribute |br|
 **Children tags:** none |br|
 **Attributes:**
 
@@ -636,26 +654,31 @@ and routers yourself; see our examples below.
 :``bw``: Bandwidth for the links between nodes and backbone (if any). See the :ref:`pf_tag_link` for syntax/details.
 :``lat``: Latency for the links between nodes and backbone (if any). See the :ref:`pf_tag_link` for syntax/details.
 
-.. note::
-    Please note that as of now, it is impossible to change attributes such as,
-    amount of cores (always set to 1), the initial state of hosts/links
-    (always set to ON), the sharing policy of the links (always set to **SPLITDUPLEX** :ref:`pf_tag_link` ).
-
-
-Cabinet example
-^^^^^^^^^^^^^^^
-The following example shows how to use the cabinet tag.
+**Example**
 
 .. literalinclude:: ../../examples/platforms/meta_cluster.xml
 
-\note
-   Please note that you must specify the :ref:`pf_backbone` tag by yourself;
-   this is not done automatically and there are no checks
-   that ensure this backbone was defined.
-
 The hosts generated in the above example are named host-1.cluster, host-2.cluster1
 etc.
 
-.. |br| raw:: html
+-------------------------------------------------------------------------------
+
+.. _pf_tag_host_link:
+
+<host_link>
+^^^^^^^^^^^
+
+Specify the up and down private links of a given host, which must be in a Cluster zone.
 
+**Parent tags:** :ref:`pf_tag_zone` with ``routing="Cluster"`` attribute |br|
+**Children tags:** none |br|
+**Attributes:**
+
+:``id``: Identifier of the host to be connected.
+:``up``: Link id to be used for the outgoing communications.
+:``down``: Link id to be used for the incoming communications.
+
+
+.. |br| raw:: html
+     
    <br />
index d5c3d73..e2c61ed 100644 (file)
@@ -2129,7 +2129,8 @@ also start direct communications as shown below.
    .. group-tab:: C++
 
       .. doxygenfunction:: simgrid::s4u::Comm::sendto
-      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init
+      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init()
+      .. doxygenfunction:: simgrid::s4u::Comm::sendto_init(Host *from, Host *to)
       .. doxygenfunction:: simgrid::s4u::Comm::sendto_async
 
       .. doxygenfunction:: simgrid::s4u::Comm::cancel
index 801a244..ec72246 100644 (file)
@@ -209,257 +209,230 @@ MPI_Alltoall
 
 Most of these are best described in `STAR-MPI's white paper <https://doi.org/10.1145/1183401.1183431>`_.
 
- - default: naive one, by default
- - ompi: use openmpi selector for the alltoall operations
- - mpich: use mpich selector for the alltoall operations
- - mvapich2: use mvapich2 selector for the alltoall operations
- - impi: use intel mpi selector for the alltoall operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - bruck: Described by Bruck et.al. in `this paper <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949>`_
- - 2dmesh: organizes the nodes as a two dimensional mesh, and perform allgather
-   along the dimensions
- - 3dmesh: adds a third dimension to the previous algorithm
- - rdb: recursive doubling: extends the mesh to a nth dimension, each one
-   containing two nodes
- - pair: pairwise exchange, only works for power of 2 procs, size-1 steps,
-   each process sends and receives from the same process at each step
- - pair_light_barrier: same, with small barriers between steps to avoid
-   contention
- - pair_mpi_barrier: same, with MPI_Barrier used
- - pair_one_barrier: only one barrier at the beginning
- - ring: size-1 steps, at each step a process send to process (n+i)%size, and receives from (n-i)%size
- - ring_light_barrier: same, with small barriers between some phases to avoid contention
- - ring_mpi_barrier: same, with MPI_Barrier used
- - ring_one_barrier: only one barrier at the beginning
- - basic_linear: posts all receives and all sends,
-   starts the communications, and waits for all communication to finish
- - mvapich2_scatter_dest: isend/irecv with scattered destinations, posting only a few messages at the same time
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the alltoall operations. |br|
+``mpich``: use mpich selector for the alltoall operations. |br|
+``mvapich2``: use mvapich2 selector for the alltoall operations. |br|
+``impi``: use intel mpi selector for the alltoall operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``bruck``: Described by Bruck et. al. in `this paper <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949>`_. |br|
+``2dmesh``: organizes the nodes as a two dimensional mesh, and perform allgather along the dimensions. |br|
+``3dmesh``: adds a third dimension to the previous algorithm. |br|
+``rdb``: recursive doubling``: extends the mesh to a nth dimension, each one containing two nodes. |br|
+``pair``: pairwise exchange, only works for power of 2 procs, size-1 steps, each process sends and receives from the same process at each step. |br|
+``pair_light_barrier``: same, with small barriers between steps to avoid contention. |br|
+``pair_mpi_barrier``: same, with MPI_Barrier used. |br|
+``pair_one_barrier``: only one barrier at the beginning. |br|
+``ring``: size-1 steps, at each step a process send to process (n+i)%size, and receives from (n-i)%size. |br|
+``ring_light_barrier``: same, with small barriers between some phases to avoid contention. |br|
+``ring_mpi_barrier``: same, with MPI_Barrier used. |br|
+``ring_one_barrier``: only one barrier at the beginning. |br|
+``basic_linear``: posts all receives and all sends, starts the communications, and waits for all communication to finish. |br|
+``mvapich2_scatter_dest``: isend/irecv with scattered destinations, posting only a few messages at the same time. |br|
 
 MPI_Alltoallv
 ^^^^^^^^^^^^^
- - default: naive one, by default
- - ompi: use openmpi selector for the alltoallv operations
- - mpich: use mpich selector for the alltoallv operations
- - mvapich2: use mvapich2 selector for the alltoallv operations
- - impi: use intel mpi selector for the alltoallv operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - bruck: same as alltoall
- - pair: same as alltoall
- - pair_light_barrier: same as alltoall
- - pair_mpi_barrier: same as alltoall
- - pair_one_barrier: same as alltoall
- - ring: same as alltoall
- - ring_light_barrier: same as alltoall
- - ring_mpi_barrier: same as alltoall
- - ring_one_barrier: same as alltoall
- - ompi_basic_linear: same as alltoall
+
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the alltoallv operations. |br|
+``mpich``: use mpich selector for the alltoallv operations. |br|
+``mvapich2``: use mvapich2 selector for the alltoallv operations. |br|
+``impi``: use intel mpi selector for the alltoallv operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``bruck``: same as alltoall. |br|
+``pair``: same as alltoall. |br|
+``pair_light_barrier``: same as alltoall. |br|
+``pair_mpi_barrier``: same as alltoall. |br|
+``pair_one_barrier``: same as alltoall. |br|
+``ring``: same as alltoall. |br|
+``ring_light_barrier``: same as alltoall. |br|
+``ring_mpi_barrier``: same as alltoall. |br|
+``ring_one_barrier``: same as alltoall. |br|
+``ompi_basic_linear``: same as alltoall. |br|
 
 MPI_Gather
 ^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the gather operations
- - mpich: use mpich selector for the gather operations
- - mvapich2: use mvapich2 selector for the gather operations
- - impi: use intel mpi selector for the gather operations
- - automatic (experimental): use an automatic self-benchmarking algorithm which will iterate over all implemented versions and output the best
- - ompi_basic_linear: basic linear algorithm from openmpi, each process sends to the root
- - ompi_binomial: binomial tree algorithm
- - ompi_linear_sync: same as basic linear, but with a synchronization at the
-   beginning and message cut into two segments.
- - mvapich2_two_level: SMP-aware version from MVAPICH. Gather first intra-node (defaults to mpich's gather), and then exchange with only one process/node. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the gather operations. |br|
+``mpich``: use mpich selector for the gather operations. |br|
+``mvapich2``: use mvapich2 selector for the gather operations. |br|
+``impi``: use intel mpi selector for the gather operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm which will iterate over all implemented versions and output the best. |br|
+``ompi_basic_linear``: basic linear algorithm from openmpi, each process sends to the root. |br|
+``ompi_binomial``: binomial tree algorithm. |br|
+``ompi_linear_sync``: same as basic linear, but with a synchronization at the beginning and message cut into two segments. |br|
+``mvapich2_two_level``: SMP-aware version from MVAPICH. Gather first intra-node (defaults to mpich's gather), and then exchange with only one process/node. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster. |br|
 
 MPI_Barrier
 ^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the barrier operations
- - mpich: use mpich selector for the barrier operations
- - mvapich2: use mvapich2 selector for the barrier operations
- - impi: use intel mpi selector for the barrier operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - ompi_basic_linear: all processes send to root
- - ompi_two_procs: special case for two processes
- - ompi_bruck: nsteps = sqrt(size), at each step, exchange data with rank-2^k and rank+2^k
- - ompi_recursivedoubling: recursive doubling algorithm
- - ompi_tree: recursive doubling type algorithm, with tree structure
- - ompi_doublering: double ring algorithm
- - mvapich2_pair: pairwise algorithm
- - mpich_smp: barrier intra-node, then inter-node
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the barrier operations. |br|
+``mpich``: use mpich selector for the barrier operations. |br|
+``mvapich2``: use mvapich2 selector for the barrier operations. |br|
+``impi``: use intel mpi selector for the barrier operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``ompi_basic_linear``: all processes send to root. |br|
+``ompi_two_procs``: special case for two processes. |br|
+``ompi_bruck``: nsteps = sqrt(size), at each step, exchange data with rank-2^k and rank+2^k. |br|
+``ompi_recursivedoubling``: recursive doubling algorithm. |br|
+``ompi_tree``: recursive doubling type algorithm, with tree structure. |br|
+``ompi_doublering``: double ring algorithm. |br|
+``mvapich2_pair``: pairwise algorithm. |br|
+``mpich_smp``: barrier intra-node, then inter-node. |br|
 
 MPI_Scatter
 ^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the scatter operations
- - mpich: use mpich selector for the scatter operations
- - mvapich2: use mvapich2 selector for the scatter operations
- - impi: use intel mpi selector for the scatter operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - ompi_basic_linear: basic linear scatter
- - ompi_binomial: binomial tree scatter
- - mvapich2_two_level_direct: SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a basic linear inter node stage. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
- - mvapich2_two_level_binomial: SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a binomial phase. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the scatter operations. |br|
+``mpich``: use mpich selector for the scatter operations. |br|
+``mvapich2``: use mvapich2 selector for the scatter operations. |br|
+``impi``: use intel mpi selector for the scatter operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``ompi_basic_linear``: basic linear scatter. |br|
+``ompi_binomial``: binomial tree scatter. |br|
+``mvapich2_two_level_direct``: SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a basic linear inter node stage. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster. |br|
+``mvapich2_two_level_binomial``: SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a binomial phase. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster. |br|
 
 MPI_Reduce
 ^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the reduce operations
- - mpich: use mpich selector for the reduce operations
- - mvapich2: use mvapich2 selector for the reduce operations
- - impi: use intel mpi selector for the reduce operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - arrival_pattern_aware: root exchanges with the first process to arrive
- - binomial: uses a binomial tree
- - flat_tree: uses a flat tree
- - NTSL: Non-topology-specific pipelined linear-bcast function
-   0->1, 1->2 ,2->3, ....., ->last node: in a pipeline fashion, with segments
-   of 8192 bytes
- - scatter_gather: scatter then gather
- - ompi_chain: openmpi reduce algorithms are built on the same basis, but the
-   topology is generated differently for each flavor
-   chain = chain with spacing of size/2, and segment size of 64KB
- - ompi_pipeline: same with pipeline (chain with spacing of 1), segment size
-   depends on the communicator size and the message size
- - ompi_binary: same with binary tree, segment size of 32KB
- - ompi_in_order_binary: same with binary tree, enforcing order on the
-   operations
- - ompi_binomial: same with binomial algo (redundant with default binomial
-   one in most cases)
- - ompi_basic_linear: basic algorithm, each process sends to root
- - mvapich2_knomial: k-nomial algorithm. Default factor is 4 (mvapich2 selector adapts it through tuning)
- - mvapich2_two_level: SMP-aware reduce, with default set to mpich both for intra and inter communicators. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
- - rab: `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_'s reduce algorithm
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the reduce operations. |br|
+``mpich``: use mpich selector for the reduce operations. |br|
+``mvapich2``: use mvapich2 selector for the reduce operations. |br|
+``impi``: use intel mpi selector for the reduce operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``arrival_pattern_aware``: root exchanges with the first process to arrive. |br|
+``binomial``: uses a binomial tree. |br|
+``flat_tree``: uses a flat tree. |br|
+``NTSL``: Non-topology-specific pipelined linear-bcast function. |br| 0->1, 1->2 ,2->3, ....., ->last node: in a pipeline fashion, with segments of 8192 bytes. |br|
+``scatter_gather``: scatter then gather. |br|
+``ompi_chain``: openmpi reduce algorithms are built on the same basis, but the topology is generated differently for each flavor. chain = chain with spacing of size/2, and segment size of 64KB. |br|
+``ompi_pipeline``: same with pipeline (chain with spacing of 1), segment size depends on the communicator size and the message size. |br|
+``ompi_binary``: same with binary tree, segment size of 32KB. |br|
+``ompi_in_order_binary``: same with binary tree, enforcing order on the operations. |br|
+``ompi_binomial``: same with binomial algo (redundant with default binomial one in most cases). |br|
+``ompi_basic_linear``: basic algorithm, each process sends to root. |br|
+``mvapich2_knomial``: k-nomial algorithm. Default factor is 4 (mvapich2 selector adapts it through tuning). |br|
+``mvapich2_two_level``: SMP-aware reduce, with default set to mpich both for intra and inter communicators. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster. |br|
+``rab``: `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_'s reduce algorithm. |br|
 
 MPI_Allreduce
 ^^^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the allreduce operations
- - mpich: use mpich selector for the allreduce operations
- - mvapich2: use mvapich2 selector for the allreduce operations
- - impi: use intel mpi selector for the allreduce operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - lr: logical ring reduce-scatter then logical ring allgather
- - rab1: variations of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: reduce_scatter then allgather
- - rab2: variations of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: alltoall then allgather
- - rab_rsag: variation of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: recursive doubling
-   reduce_scatter then recursive doubling allgather
- - rdb: recursive doubling
- - smp_binomial: binomial tree with smp: binomial intra
-   SMP reduce, inter reduce, inter broadcast then intra broadcast
- - smp_binomial_pipeline: same with segment size = 4096 bytes
- - smp_rdb: intra: binomial allreduce, inter: Recursive
-   doubling allreduce, intra: binomial broadcast
- - smp_rsag: intra: binomial allreduce, inter: reduce-scatter,
-   inter:allgather, intra: binomial broadcast
- - smp_rsag_lr: intra: binomial allreduce, inter: logical ring
-   reduce-scatter, logical ring inter:allgather, intra: binomial broadcast
- - smp_rsag_rab: intra: binomial allreduce, inter: rab
-   reduce-scatter, rab inter:allgather, intra: binomial broadcast
- - redbcast: reduce then broadcast, using default or tuned algorithms if specified
- - ompi_ring_segmented: ring algorithm used by OpenMPI
- - mvapich2_rs: rdb for small messages, reduce-scatter then allgather else
- - mvapich2_two_level: SMP-aware algorithm, with mpich as intra algorithm, and rdb as inter (Change this behavior by using mvapich2 selector to use tuned values)
- - rab: default `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ implementation
+``default``: naive one, by defautl. |br|
+``ompi``: use openmpi selector for the allreduce operations. |br|
+``mpich``: use mpich selector for the allreduce operations. |br|
+``mvapich2``: use mvapich2 selector for the allreduce operations. |br|
+``impi``: use intel mpi selector for the allreduce operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``lr``: logical ring reduce-scatter then logical ring allgather. |br|
+``rab1``: variations of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: reduce_scatter then allgather. |br|
+``rab2``: variations of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: alltoall then allgather. |br|
+``rab_rsag``: variation of the  `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ algorithm: recursive doubling reduce_scatter then recursive doubling allgather. |br|
+``rdb``: recursive doubling. |br|
+``smp_binomial``: binomial tree with smp: binomial intra. |br| SMP reduce, inter reduce, inter broadcast then intra broadcast. |br|
+``smp_binomial_pipeline``: same with segment size = 4096 bytes. |br|
+``smp_rdb``: intra``: binomial allreduce, inter: Recursive doubling allreduce, intra``: binomial broadcast. |br|
+``smp_rsag``: intra: binomial allreduce, inter: reduce-scatter, inter:allgather, intra: binomial broadcast. |br|
+``smp_rsag_lr``: intra: binomial allreduce, inter: logical ring reduce-scatter, logical ring inter:allgather, intra: binomial broadcast. |br|
+``smp_rsag_rab``: intra: binomial allreduce, inter: rab reduce-scatter, rab inter:allgather, intra: binomial broadcast. |br|
+``redbcast``: reduce then broadcast, using default or tuned algorithms if specified. |br|
+``ompi_ring_segmented``: ring algorithm used by OpenMPI. |br|
+``mvapich2_rs``: rdb for small messages, reduce-scatter then allgather else. |br|
+``mvapich2_two_level``: SMP-aware algorithm, with mpich as intra algorithm, and rdb as inter (Change this behavior by using mvapich2 selector to use tuned values). |br|
+``rab``: default `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ implementation. |br|
 
 MPI_Reduce_scatter
 ^^^^^^^^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the reduce_scatter operations
- - mpich: use mpich selector for the reduce_scatter operations
- - mvapich2: use mvapich2 selector for the reduce_scatter operations
- - impi: use intel mpi selector for the reduce_scatter operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - ompi_basic_recursivehalving: recursive halving version from OpenMPI
- - ompi_ring: ring version from OpenMPI
- - mpich_pair: pairwise exchange version from MPICH
- - mpich_rdb: recursive doubling version from MPICH
- - mpich_noncomm: only works for power of 2 procs, recursive doubling for noncommutative ops
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the reduce_scatter operations. |br|
+``mpich``: use mpich selector for the reduce_scatter operations. |br|
+``mvapich2``: use mvapich2 selector for the reduce_scatter operations. |br|
+``impi``: use intel mpi selector for the reduce_scatter operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``ompi_basic_recursivehalving``: recursive halving version from OpenMPI. |br|
+``ompi_ring``: ring version from OpenMPI. |br|
+``mpich_pair``: pairwise exchange version from MPICH. |br|
+``mpich_rdb``: recursive doubling version from MPICH. |br|
+``mpich_noncomm``: only works for power of 2 procs, recursive doubling for noncommutative ops. |br|
 
 
 MPI_Allgather
 ^^^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the allgather operations
- - mpich: use mpich selector for the allgather operations
- - mvapich2: use mvapich2 selector for the allgather operations
- - impi: use intel mpi selector for the allgather operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - 2dmesh: see alltoall
- - 3dmesh: see alltoall
- - bruck: Described by Bruck et.al. in <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949">
-   Efficient algorithms for all-to-all communications in multiport message-passing systems</a>
- - GB: Gather - Broadcast (uses tuned version if specified)
- - loosely_lr: Logical Ring with grouping by core (hardcoded, default
-   processes/node: 4)
- - NTSLR: Non Topology Specific Logical Ring
- - NTSLR_NB: Non Topology Specific Logical Ring, Non Blocking operations
- - pair: see alltoall
- - rdb: see alltoall
- - rhv: only power of 2 number of processes
- - ring: see alltoall
- - SMP_NTS: gather to root of each SMP, then every root of each SMP node
-   post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message,
-   using logical ring algorithm (hardcoded, default processes/SMP: 8)
- - smp_simple: gather to root of each SMP, then every root of each SMP node
-   post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message,
-   using simple algorithm (hardcoded, default processes/SMP: 8)
- - spreading_simple: from node i, order of communications is i -> i + 1, i ->
-   i + 2, ..., i -> (i + p -1) % P
- - ompi_neighborexchange: Neighbor Exchange algorithm for allgather.
-   Described by Chen et.al. in  `Performance Evaluation of Allgather
-   Algorithms on Terascale Linux Cluster with Fast Ethernet <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=1592302>`_
- - mvapich2_smp: SMP aware algorithm, performing intra-node gather, inter-node allgather with one process/node, and bcast intra-node
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the allgather operations. |br|
+``mpich``: use mpich selector for the allgather operations. |br|
+``mvapich2``: use mvapich2 selector for the allgather operations. |br|
+``impi``: use intel mpi selector for the allgather operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``2dmesh``: see alltoall. |br|
+``3dmesh``: see alltoall. |br|
+``bruck``: Described by Bruck et.al. in <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949"> Efficient algorithms for all-to-all communications in multiport message-passing systems</a>. |br|
+``GB``: Gather - Broadcast (uses tuned version if specified). |br|
+``loosely_lr``: Logical Ring with grouping by core (hardcoded, default processes/node: 4). |br|
+``NTSLR``: Non Topology Specific Logical Ring. |br|
+``NTSLR_NB``: Non Topology Specific Logical Ring, Non Blocking operations. |br|
+``pair``: see alltoall. |br|
+``rdb``: see alltoall. |br|
+``rhv``: only power of 2 number of processes. |br|
+``ring``: see alltoall. |br|
+``SMP_NTS``: gather to root of each SMP, then every root of each SMP node. post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, using logical ring algorithm (hardcoded, default processes/SMP: 8). |br|
+``smp_simple``: gather to root of each SMP, then every root of each SMP node post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, using simple algorithm (hardcoded, default processes/SMP: 8). |br|
+``spreading_simple``: from node i, order of communications is i -> i + 1, i -> i + 2, ..., i -> (i + p -1) % P. |br|
+``ompi_neighborexchange``: Neighbor Exchange algorithm for allgather. Described by Chen et.al. in  `Performance Evaluation of Allgather Algorithms on Terascale Linux Cluster with Fast Ethernet <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=1592302>`_. |br|
+``mvapich2_smp``: SMP aware algorithm, performing intra-node gather, inter-node allgather with one process/node, and bcast intra-node
 
 MPI_Allgatherv
 ^^^^^^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the allgatherv operations
- - mpich: use mpich selector for the allgatherv operations
- - mvapich2: use mvapich2 selector for the allgatherv operations
- - impi: use intel mpi selector for the allgatherv operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - GB: Gatherv - Broadcast (uses tuned version if specified, but only for Bcast, gatherv is not tuned)
- - pair: see alltoall
- - ring: see alltoall
- - ompi_neighborexchange: see allgather
- - ompi_bruck: see allgather
- - mpich_rdb: recursive doubling algorithm from MPICH
- - mpich_ring: ring algorithm from MPICh - performs differently from the  one from STAR-MPI
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the allgatherv operations. |br|
+``mpich``: use mpich selector for the allgatherv operations. |br|
+``mvapich2``: use mvapich2 selector for the allgatherv operations. |br|
+``impi``: use intel mpi selector for the allgatherv operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``GB``: Gatherv - Broadcast (uses tuned version if specified, but only for Bcast, gatherv is not tuned). |br|
+``pair``: see alltoall. |br|
+``ring``: see alltoall. |br|
+``ompi_neighborexchange``: see allgather. |br|
+``ompi_bruck``: see allgather. |br|
+``mpich_rdb``: recursive doubling algorithm from MPICH. |br|
+``mpich_ring``: ring algorithm from MPICh - performs differently from the  one from STAR-MPI.
 
 MPI_Bcast
 ^^^^^^^^^
 
- - default: naive one, by default
- - ompi: use openmpi selector for the bcast operations
- - mpich: use mpich selector for the bcast operations
- - mvapich2: use mvapich2 selector for the bcast operations
- - impi: use intel mpi selector for the bcast operations
- - automatic (experimental): use an automatic self-benchmarking algorithm
- - arrival_pattern_aware: root exchanges with the first process to arrive
- - arrival_pattern_aware_wait: same with slight variation
- - binomial_tree: binomial tree exchange
- - flattree: flat tree exchange
- - flattree_pipeline: flat tree exchange, message split into 8192 bytes pieces
- - NTSB: Non-topology-specific pipelined binary tree with 8192 bytes pieces
- - NTSL: Non-topology-specific pipelined linear with 8192 bytes pieces
- - NTSL_Isend: Non-topology-specific pipelined linear with 8192 bytes pieces, asynchronous communications
- - scatter_LR_allgather: scatter followed by logical ring allgather
- - scatter_rdb_allgather: scatter followed by recursive doubling allgather
- - arrival_scatter: arrival pattern aware scatter-allgather
- - SMP_binary: binary tree algorithm with 8 cores/SMP
- - SMP_binomial: binomial tree algorithm with 8 cores/SMP
- - SMP_linear: linear algorithm with 8 cores/SMP
- - ompi_split_bintree: binary tree algorithm from OpenMPI, with message split in 8192 bytes pieces
- - ompi_pipeline: pipeline algorithm from OpenMPI, with message split in 128KB pieces
- - mvapich2_inter_node: Inter node default mvapich worker
- - mvapich2_intra_node: Intra node default mvapich worker
- - mvapich2_knomial_intra_node:  k-nomial intra node default mvapich worker. default factor is 4.
+``default``: naive one, by default. |br|
+``ompi``: use openmpi selector for the bcast operations. |br|
+``mpich``: use mpich selector for the bcast operations. |br|
+``mvapich2``: use mvapich2 selector for the bcast operations. |br|
+``impi``: use intel mpi selector for the bcast operations. |br|
+``automatic (experimental)``: use an automatic self-benchmarking algorithm. |br|
+``arrival_pattern_aware``: root exchanges with the first process to arrive. |br|
+``arrival_pattern_aware_wait``: same with slight variation. |br|
+``binomial_tree``: binomial tree exchange. |br|
+``flattree``: flat tree exchange. |br|
+``flattree_pipeline``: flat tree exchange, message split into 8192 bytes pieces. |br|
+``NTSB``: Non-topology-specific pipelined binary tree with 8192 bytes pieces. |br|
+``NTSL``: Non-topology-specific pipelined linear with 8192 bytes pieces. |br|
+``NTSL_Isend``: Non-topology-specific pipelined linear with 8192 bytes pieces, asynchronous communications. |br|
+``scatter_LR_allgather``: scatter followed by logical ring allgather. |br|
+``scatter_rdb_allgather``: scatter followed by recursive doubling allgather. |br|
+``arrival_scatter``: arrival pattern aware scatter-allgather. |br|
+``SMP_binary``: binary tree algorithm with 8 cores/SMP. |br|
+``SMP_binomial``: binomial tree algorithm with 8 cores/SMP. |br|
+``SMP_linear``: linear algorithm with 8 cores/SMP. |br|
+``ompi_split_bintree``: binary tree algorithm from OpenMPI, with message split in 8192 bytes pieces. |br|
+``ompi_pipeline``: pipeline algorithm from OpenMPI, with message split in 128KB pieces. |br|
+``mvapich2_inter_node``: Inter node default mvapich worker. |br|
+``mvapich2_intra_node``: Intra node default mvapich worker. |br|
+``mvapich2_knomial_intra_node``:  k-nomial intra node default mvapich worker. default factor is 4.
 
 Automatic Evaluation
 ^^^^^^^^^^^^^^^^^^^^
@@ -532,19 +505,14 @@ variables should be handled correctly on Linux systems.
 MPI coverage of SMPI
 ....................
 
-Our coverage of the interface is very decent, but still incomplete;
-Given the size of the MPI standard, we may well never manage to
-implement absolutely all existing primitives. Currently, we have
-almost no support for I/O primitives, but we still pass a very large
-amount of the MPICH coverage tests.
+SMPI support a large faction of the MPI interface: we pass many of the MPICH coverage tests, and many of the existing
+:ref:`proxy apps <SMPI_proxy_apps>` run almost unmodified on top of SMPI. But our support is still incomplete, with I/O
+primitives the being one of the major missing feature.
 
-The full list of not yet implemented functions is documented in the
-file `include/smpi/smpi.h
-<https://framagit.org/simgrid/simgrid/tree/master/include/smpi/smpi.h>`_
-in your version of SimGrid, between two lines containing the ``FIXME``
-marker. If you really miss a feature, please get in touch with us: we
-can guide you through the SimGrid code to help you implementing it, and
-we'd be glad to integrate your contribution to the main project.
+The full list of functions that remain to be implemented is documented in the file `include/smpi/smpi.h
+<https://framagit.org/simgrid/simgrid/tree/master/include/smpi/smpi.h>`_ in your version of SimGrid, between two lines
+containing the ``FIXME`` marker. If you miss a feature, please get in touch with us: we can guide you through the SimGrid
+code to help you implementing it, and we'd be glad to integrate your contribution to the main project.
 
 .. _SMPI_what_globals:
 
@@ -740,6 +708,8 @@ Finally, you may want to check `this article
 <https://hal.inria.fr/hal-00907887>`_ on the classical pitfalls in
 modeling distributed systems.
 
+.. _SMPI_proxy_apps:
+
 ----------------------
 Examples of SMPI Usage
 ----------------------
@@ -876,3 +846,7 @@ simulation and the replay, you will see that the behavior is
 unchanged. The simulation does not run much faster on this very
 example, but this becomes very interesting when your application
 is computationally hungry.
+
+.. |br| raw:: html
+
+   <br />
index 1b78ffd..3ad1480 100644 (file)
@@ -128,6 +128,7 @@ nitpick_ignore = [
   ('cpp:identifier', 'uint64_t'),
   ('cpp:identifier', 'xbt'),
   ('cpp:identifier', 'xbt_dynar_s'),
+  ('cpp:identifier', 'xbt::Extendable<Activity>'),
   ('cpp:identifier', 'xbt::Extendable<Actor>'),
   ('cpp:identifier', 'xbt::Extendable<Disk>'),
   ('cpp:identifier', 'xbt::Extendable<File>'),
index b0e79f4..946561f 100644 (file)
        id="text418"
        x="322.50092"
        y="-2255.2273"><tspan
-         x="322.50092 349.36172"
+         x="322.50092"
          y="-2255.2273"
          sodipodi:role="line"
          id="tspan416"
-         style="stroke-width:2.02122">+h</tspan></text><text
+         style="stroke-width:2.02122">+ z</tspan></text><text
        transform="scale(1,-1)"
        style="font-variant:normal;font-weight:normal;font-size:16.1093px;font-family:CMSSBX10;-inkscape-font-specification:CMSSBX10;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.02122"
        id="text422"
        id="text426"
        x="381.89651"
        y="-2255.2273"><tspan
-         x="381.89651 408.73312"
+         x="381.89651"
          y="-2255.2273"
          sodipodi:role="line"
          id="tspan424"
-         style="stroke-width:2.02122">+h</tspan></text><text
+         style="stroke-width:2.02122">+ z</tspan></text><text
        transform="scale(1,-1)"
        style="font-variant:normal;font-weight:normal;font-size:16.1093px;font-family:CMSSBX10;-inkscape-font-specification:CMSSBX10;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.02122"
        id="text430"
          id="tspan535311"
          style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18px;font-family:serif;-inkscape-font-specification:serif;stroke:none;stroke-width:0.749999px"
          x="76.447578"
-         y="-2383.0488">h</tspan></text><text
+         y="-2383.0488">z</tspan></text><text
        xml:space="preserve"
        style="font-weight:bold;font-size:18px;line-height:21.6px;font-family:serif;-inkscape-font-specification:'serif Bold';text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:#000000;stroke-width:0.749999px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
        x="81.32592"
index f72558d..79d0214 100644 (file)
@@ -14,7 +14,7 @@ Peer-to-Peer systems,
 Volunteer Computing (`🖹 <http://www.sciencedirect.com/science/article/pii/S1569190X17301028>`__)
 Fog Computing (`🖹 <http://ieeexplore.ieee.org/document/7946412/>`__),
 MapReduce (`🖹 <http://www.sciencedirect.com/science/article/pii/S0167819113000215>`__) and
-`much more <https://simgrid.org/Usages.html>`_.
+`much more <https://simgrid.org/usages.html>`_.
 
 The simulation models are **fast** (`🖹 <http://hal.inria.fr/hal-00650233>`__) and
 **highly scalable** (`🖹 <http://hal.inria.fr/inria-00602216/>`__) while
@@ -54,9 +54,9 @@ of every page. Bugs in the code should be reported
    :maxdepth: 1
    :caption: Tutorials:
 
-       Simulating Distributed Algorithms <Tutorial_Algorithms.rst>
-       Simulating MPI Applications <Tutorial_MPI_Applications.rst>
-       Model-checking algorithms and applications <Tutorial_Model-checking.rst>
+       Simulating distributed algorithms <Tutorial_Algorithms.rst>
+       Simulating MPI applications <Tutorial_MPI_Applications.rst>
+       Model-checking algorithms <Tutorial_Model-checking.rst>
 
 .. toctree::
    :hidden:
@@ -76,16 +76,16 @@ of every page. Bugs in the code should be reported
       Describing the simulated platform <Platform.rst>
       Â Â Â Network topology examples <Platform_examples.rst>
       Â Â Â Advanced routing <Platform_routing.rst>
-      Â Â Â Modeling hints <Platform_howtos.rst>
       Â Â Â XML reference <XML_reference.rst>
       Â Â Â C++ platforms <Platform_cpp.rst>
-      Describing the experimental setup <Experimental_setup.rst>
+      The SimGrid models <Models.rst>      
+      Â Â Â SimGrid plugins <Plugins.rst>
+      Â Â Â Modeling hints <Modeling_howtos.rst>
+      Â Â Â Calibrating the models <Calibrating_the_models.rst>   
+      Running an experiment <Experimental_setup.rst>
       Â Â Â Configuring SimGrid <Configuring_SimGrid.rst>
       Â Â Â Deploying your application <Deploying_your_application.rst>
-      Â Â Â The SimGrid models <Models.rst>
-      SimGrid plugins <Plugins.rst>
-      Simulation outcomes <Outcomes.rst>
-      Frequently asked questions <faq.rst>
+      Â Â Â Simulation outcomes <Outcomes.rst>
 
 .. toctree::
    :hidden:
index d782b38..2f564af 100644 (file)
@@ -1,8 +1,8 @@
 .. This file has "irst" as an extension to ensure that it's not parsed by sphinx as is. Instead, it's included in another file that is parsed.
 .. _howto_disk:
 
-Modeling I/O: the realistic way
-*******************************
+I/O calibration
+***************
 
 Introduction
 ============
index 202bd92..566b78f 100644 (file)
@@ -1,5 +1,5 @@
-SimGrid MPI calibration of a Grid5000 cluster
-*********************************************
+MPI Network calibration
+***********************
 
 This tutorial demonstrates how to properly calibrate SimGrid to reflect
 the performance of MPI operations in a Grid’5000 cluster. However, the same
index f28c77c..474aba8 100644 (file)
@@ -655,8 +655,6 @@ Interacting with the Platform
 
          .. showfile:: examples/platforms/profiles/jupiter_state.profile
 
-         .. showfile:: examples/platforms/profiles/bourassa_state.profile
-
          .. showfile:: examples/platforms/profiles/fafard_state.profile
 
  - **Specifying speed profiles:** shows how to specify an external
index 5899286..00e51b3 100644 (file)
@@ -31,7 +31,6 @@ if(SIMGRID_HAVE_MC)
   #foreach(example ) # no test to be build in any case
   #endforeach()
   
-
   if(HAVE_C_STACK_CLEANER)
     add_executable       (s4u-mc-bugged1-liveness-cleaner-on  EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
     target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on  simgrid)
@@ -49,9 +48,13 @@ if(SIMGRID_HAVE_MC)
     # liveness model-checking works only on 64bits (for now ...)
     set(_mc-bugged1-liveness_factories "ucontext") # Timeout
     add_dependencies(tests-mc s4u-mc-bugged1-liveness)
+    set(_mc-bugged2-liveness_factories "ucontext") # Timeout
   else()
     set(_mc-bugged1-liveness_disable 1)
   endif()
+
+  # This example never ends, disable it for now
+  set(_mc-bugged2-liveness_disable 1)
   
   # This example hit the 5' timeout on CI, disable it for now
   #    ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
@@ -74,8 +77,8 @@ if(SIMGRID_HAVE_MC)
   endif()
 
 else()
-  foreach (example mc-bugged1 mc-bugged2 mc-failing-assert mc-electric-fence 
-                   mc-bugged1-liveness)
+  foreach (example mc-bugged1 mc-bugged2  mc-centralized-mutex mc-failing-assert mc-electric-fence 
+                   mc-bugged1-liveness mc-bugged2-liveness)
     set(_${example}_disable 1)
   endforeach()
 endif()
@@ -98,14 +101,14 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
                  comm-pingpong comm-ready comm-serialize comm-suspend comm-wait comm-waitany comm-waitall comm-waituntil
                  comm-dependent comm-host2host comm-failure comm-throttling
                  cloud-capping cloud-migration cloud-simple
-                 dag-comm dag-from-dot dag-failure dag-io dag-simple
+                 dag-comm dag-from-dax dag-from-dot dag-failure dag-io dag-scheduling dag-simple
                  dht-chord dht-kademlia
                  energy-exec energy-boot energy-link energy-vm energy-exec-ptask energy-wifi
                  engine-filtering engine-run-partial
                  exec-async exec-basic exec-dvfs exec-remote exec-waitany exec-waitfor exec-dependent exec-unassigned
                  exec-ptask-multicore exec-ptask-multicore-latency exec-cpu-nonlinear exec-cpu-factors exec-failure
                  maestro-set
-                 mc-bugged1 mc-bugged1-liveness mc-bugged2 mc-electric-fence mc-failing-assert
+                 mc-bugged1 mc-bugged1-liveness mc-bugged2 mc-bugged2-liveness mc-centralized-mutex mc-electric-fence mc-failing-assert
                  network-ns3 network-ns3-wifi network-wifi
                  io-async io-priority io-degradation io-file-system io-file-remote io-disk-raw io-dependent
                  platform-failures platform-profile platform-properties
@@ -223,15 +226,11 @@ set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simi
                                   ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh  PARENT_SCOPE)
 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/comm-suspend/s4u-comm-suspend_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/s4u-comm-wait_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitany/s4u-comm-waitany_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitall/s4u-comm-waitall_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/comm-ready/s4u-comm-ready_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/comm-waituntil/s4u-comm-waituntil_d.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dag-scheduling/Montage_25.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml
@@ -250,11 +249,13 @@ set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/one_cluster_d.xml                PARENT_SCOPE)
 set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py
                                   ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness PARENT_SCOPE)
-set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged2-liveness/promela_bugged2_liveness PARENT_SCOPE)
+set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/simple_dax_with_cycle.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/smalldax.xml     
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag_with_cycle.dot
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-io/s4u-replay-io.txt                  PARENT_SCOPE)
-
index 0b61296..ae5e600 100644 (file)
@@ -77,10 +77,10 @@ int main(int argc, char* argv[])
   e.load_platform(argv[1]); /* - Load the platform description */
 
   /* Register a callback in the Actor::on_termination signal. It will be called for every terminated actors */
-  sg4::Actor::on_termination.connect(
+  sg4::Actor::on_termination_cb(
       [](sg4::Actor const& actor) { XBT_INFO("Actor %s terminates now", actor.get_cname()); });
   /* Register a callback in the Actor::on_destruction signal. It will be called for every destructed actors */
-  sg4::Actor::on_destruction.connect(
+  sg4::Actor::on_destruction_cb(
       [](sg4::Actor const& actor) { XBT_INFO("Actor %s gets destroyed now", actor.get_cname()); });
 
   /* Create some actors */
index b7e377a..710c6c4 100644 (file)
@@ -15,32 +15,22 @@ namespace sg4 = simgrid::s4u;
  * It can also be used to benchmark our context-switching mechanism.
  */
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_yield, "Messages specific for this s4u example");
-/* Main function of the Yielder actor */
-class yielder {
-  long number_of_yields;
-
-public:
-  explicit yielder(std::vector<std::string> args) { number_of_yields = std::stol(args[1]); }
-  void operator()() const
-  {
-    for (int i = 0; i < number_of_yields; i++)
-      sg4::this_actor::yield();
-    XBT_INFO("I yielded %ld times. Goodbye now!", number_of_yields);
-  }
-};
+
+static void yielder(long number_of_yields)
+{
+  for (int i = 0; i < number_of_yields; i++)
+    sg4::this_actor::yield();
+  XBT_INFO("I yielded %ld times. Goodbye now!", number_of_yields);
+}
 
 int main(int argc, char* argv[])
 {
   sg4::Engine e(&argc, argv);
 
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                       "\tExample: %s platform.xml deployment.xml\n",
-             argv[0], argv[0]);
-
   e.load_platform(argv[1]);             /* Load the platform description */
-  e.register_actor<yielder>("yielder"); /* Register the class representing the actors */
 
-  e.load_deployment(argv[2]);
+  sg4::Actor::create("yielder", e.host_by_name("Tremblay"), yielder, 10);
+  sg4::Actor::create("yielder", e.host_by_name("Ruby"), yielder, 15);
 
   e.run(); /* - Run the simulation */
 
diff --git a/examples/cpp/actor-yield/s4u-actor-yield_d.xml b/examples/cpp/actor-yield/s4u-actor-yield_d.xml
deleted file mode 100644 (file)
index 968055f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Tremblay" function="yielder">
-    <argument value="10"/>       <!-- Number of yields to do  -->
-  </actor>
-  <actor host="Ruby" function="yielder">
-    <argument value="15"/>       <!-- Number of yields to do  -->
-  </actor>
-</platform>
index 6cbe694..834c730 100644 (file)
@@ -26,14 +26,8 @@ namespace sg4 = simgrid::s4u;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_ready, "Messages specific for this s4u example");
 
-static void peer(int argc, char** argv)
+static void peer(int my_id, int messages_count, size_t payload_size, int peers_count)
 {
-  xbt_assert(argc == 5, "Expecting 4 parameters from the XML deployment file but got %d", argc);
-  int my_id           = std::stoi(argv[1]); /* - my id */
-  long messages_count = std::stol(argv[2]); /* - number of message */
-  long msg_size       = std::stol(argv[3]); /* - message size in bytes */
-  long peers_count    = std::stol(argv[4]); /* - number of peers */
-
   /* Set myself as the persistent receiver of my mailbox so that messages start flowing to me as soon as they are put
    * into it */
   sg4::Mailbox* my_mbox = sg4::Mailbox::by_name(std::string("peer-") + std::to_string(my_id));
@@ -45,15 +39,13 @@ static void peer(int argc, char** argv)
   for (int i = 0; i < messages_count; i++) {
     for (int peer_id = 0; peer_id < peers_count; peer_id++) {
       if (peer_id != my_id) {
-        std::string mboxName        = std::string("peer-") + std::to_string(peer_id);
-        sg4::Mailbox* mbox          = sg4::Mailbox::by_name(mboxName);
-        std::string msgName =
-            std::string("Message ") + std::to_string(i) + std::string(" from peer ") + std::to_string(my_id);
-        auto* payload = new std::string(msgName); // copy the data we send:
+        sg4::Mailbox* mbox  = sg4::Mailbox::by_name(std::string("peer-") + std::to_string(peer_id));
+        std::string message = std::string("Message ") + std::to_string(i) + " from peer " + std::to_string(my_id);
+        auto* payload       = new std::string(message); // copy the data we send:
         // 'msgName' is not a stable storage location
-        XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str());
+        XBT_INFO("Send '%s' to '%s'", message.c_str(), mbox->get_cname());
         /* Create a communication representing the ongoing communication */
-        pending_comms.push_back(mbox->put_async(payload, msg_size));
+        pending_comms.push_back(mbox->put_async(payload, payload_size));
       }
     }
   }
@@ -61,10 +53,9 @@ static void peer(int argc, char** argv)
   /* Start sending messages to let peers know that they should stop */
   for (int peer_id = 0; peer_id < peers_count; peer_id++) {
     if (peer_id != my_id) {
-      std::string mboxName        = std::string("peer-") + std::to_string(peer_id);
-      sg4::Mailbox* mbox          = sg4::Mailbox::by_name(mboxName);
-      auto* payload               = new std::string("finalize"); // Make a copy of the data we will send
-      pending_comms.push_back(mbox->put_async(payload, msg_size));
+      sg4::Mailbox* mbox = sg4::Mailbox::by_name(std::string("peer-") + std::to_string(peer_id));
+      auto* payload      = new std::string("finalize"); // Make a copy of the data we will send
+      pending_comms.push_back(mbox->put_async(payload, payload_size));
       XBT_INFO("Send 'finalize' to 'peer-%d'", peer_id);
     }
   }
@@ -100,13 +91,12 @@ static void peer(int argc, char** argv)
 
 int main(int argc, char* argv[])
 {
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
-
   sg4::Engine e(&argc, argv);
-  e.register_function("peer", &peer);
-
   e.load_platform(argv[1]);
-  e.load_deployment(argv[2]);
+
+  sg4::Actor::create("peer", e.host_by_name("Tremblay"), peer, 0, 2, 5e7, 3);
+  sg4::Actor::create("peer", e.host_by_name("Ruby"), peer, 1, 6, 2.5e5, 3);
+  sg4::Actor::create("peer", e.host_by_name("Perl"), peer, 2, 0, 5e7, 3);
 
   e.run();
 
index db7cb0f..8af42ea 100644 (file)
@@ -2,7 +2,7 @@
 
 p Test1 Peer sending and receiving
 
-$ ${bindir:=.}/s4u-comm-ready ${platfdir}/small_platform_fatpipe.xml s4u-comm-ready_d.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/s4u-comm-ready ${platfdir}/small_platform_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (1:peer@Tremblay) Send 'Message 0 from peer 0' to 'peer-1'
 > [  0.000000] (2:peer@Ruby) Send 'Message 0 from peer 1' to 'peer-0'
 > [  0.000000] (3:peer@Perl) Send 'finalize' to 'peer-0'
diff --git a/examples/cpp/comm-ready/s4u-comm-ready_d.xml b/examples/cpp/comm-ready/s4u-comm-ready_d.xml
deleted file mode 100644 (file)
index d19aa20..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <!-- Register some peers in different hosts -->
-  <actor host="Tremblay" function="peer">
-    <argument value="0"/>         <!-- My id -->
-    <argument value="2"/>         <!-- Number of tasks -->
-    <argument value="50000000"/>  <!-- Computation size of tasks -->
-    <argument value="3"/>         <!-- Number of peers -->
-  </actor>
-  <actor host="Ruby" function="peer">
-    <argument value="1"/>         <!-- My id -->
-    <argument value="6"/>         <!-- Number of tasks -->
-    <argument value="250000"/>    <!-- Computation size of tasks -->
-    <argument value="3"/>         <!-- Number of peers -->
-  </actor>
-  <actor host="Perl" function="peer">
-    <argument value="2"/>         <!-- My id -->
-    <argument value="0"/>         <!-- Number of tasks -->
-    <argument value="50000000"/>  <!-- Computation size of tasks -->
-    <argument value="3"/>         <!-- Number of peers -->
-  </actor>
-</platform>
index 7af40f9..1170ca3 100644 (file)
@@ -13,10 +13,8 @@ namespace sg4 = simgrid::s4u;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_wait, "Messages specific for this s4u example");
 
-static void sender(int argc, char**)
+static void sender()
 {
-  xbt_assert(argc == 1, "Expecting no parameter from the XML deployment file but got %d", argc - 1);
-
   sg4::Mailbox* mbox = sg4::Mailbox::by_name("receiver");
 
   // Copy the data we send: the 'msg_content' variable is not a stable storage location.
@@ -43,7 +41,7 @@ static void sender(int argc, char**)
   comm->suspend();
 }
 
-static void receiver(int, char**)
+static void receiver()
 {
   sg4::Mailbox* mbox = sg4::Mailbox::by_name("receiver");
   XBT_INFO("Wait for the message.");
@@ -54,14 +52,13 @@ static void receiver(int, char**)
 
 int main(int argc, char* argv[])
 {
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
-
   sg4::Engine e(&argc, argv);
-  e.register_function("sender", &sender);
-  e.register_function("receiver", &receiver);
 
   e.load_platform(argv[1]);
-  e.load_deployment(argv[2]);
+
+  sg4::Actor::create("sender", e.host_by_name("Tremblay"), sender);
+  sg4::Actor::create("receiver", e.host_by_name("Jupiter"), receiver);
+
   e.run();
 
   return 0;
index f572b6c..6fcc959 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ ${bindir:=.}/s4u-comm-suspend ${platfdir}/small_platform.xml s4u-comm-suspend_d.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/s4u-comm-suspend ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (1:sender@Tremblay) Suspend the communication before it starts (remaining: 13194230 bytes) and wait a second.
 > [  0.000000] (2:receiver@Jupiter) Wait for the message.
 > [  1.000000] (1:sender@Tremblay) Now, start the communication (remaining: 13194230 bytes) and wait another second.
diff --git a/examples/cpp/comm-suspend/s4u-comm-suspend_d.xml b/examples/cpp/comm-suspend/s4u-comm-suspend_d.xml
deleted file mode 100644 (file)
index 3c24900..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Tremblay" function="sender" />
-  <actor host="Jupiter" function="receiver" />
-</platform>
index 25cf806..99081f0 100644 (file)
@@ -19,11 +19,8 @@ namespace sg4 = simgrid::s4u;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_wait, "Messages specific for this s4u example");
 
-static void sender(int argc, char** argv)
+static void sender(int messages_count, size_t payload_size)
 {
-  xbt_assert(argc == 3, "Expecting 2 parameters from the XML deployment file but got %d", argc);
-  long messages_count     = std::stol(argv[1]); /* - number of messages */
-  long msg_size           = std::stol(argv[2]); /* - message size in bytes */
   double sleep_start_time = 5.0;
   double sleep_test_time  = 0;
 
@@ -39,7 +36,7 @@ static void sender(int argc, char** argv)
     auto* payload = new std::string(msg_content);
 
     /* Create a communication representing the ongoing communication and then */
-    sg4::CommPtr comm = mbox->put_async(payload, msg_size);
+    sg4::CommPtr comm = mbox->put_async(payload, payload_size);
     XBT_INFO("Send '%s' to '%s'", msg_content.c_str(), mbox->get_cname());
 
     if (sleep_test_time > 0) {   /* - "test_time" is set to 0, wait */
@@ -57,7 +54,7 @@ static void sender(int argc, char** argv)
 }
 
 /* Receiver actor expects 1 argument: its ID */
-static void receiver(int, char**)
+static void receiver()
 {
   double sleep_start_time = 1.0;
   double sleep_test_time  = 0.1;
@@ -89,14 +86,13 @@ static void receiver(int, char**)
 
 int main(int argc, char* argv[])
 {
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
-
   sg4::Engine e(&argc, argv);
-  e.register_function("sender", &sender);
-  e.register_function("receiver", &receiver);
 
   e.load_platform(argv[1]);
-  e.load_deployment(argv[2]);
+
+  sg4::Actor::create("sender", e.host_by_name("Tremblay"), sender, 3, 482117300);
+  sg4::Actor::create("receiver", e.host_by_name("Ruby"), receiver);
+
   e.run();
 
   return 0;
index 547bfc4..c616d41 100644 (file)
@@ -2,7 +2,7 @@
 
 p Test1 Sleep_sender > Sleep_receiver
 
-$ ${bindir:=.}/s4u-comm-wait ${platfdir}/small_platform_fatpipe.xml s4u-comm-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/s4u-comm-wait ${platfdir}/small_platform_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (1:sender@Tremblay) sleep_start_time : 5.000000 , sleep_test_time : 0.000000
 > [  0.000000] (2:receiver@Ruby) sleep_start_time : 1.000000 , sleep_test_time : 0.100000
 > [  1.000000] (2:receiver@Ruby) Wait for my first message
diff --git a/examples/cpp/comm-wait/s4u-comm-wait_d.xml b/examples/cpp/comm-wait/s4u-comm-wait_d.xml
deleted file mode 100644 (file)
index eb1320e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <!-- The sender actor (with some arguments) -->
-  <actor host="Tremblay" function="sender">
-    <argument value="3"/>       <!-- Number of messages -->
-    <argument value="482117300"/>  <!-- Message size -->
-  </actor>
-  <!-- The receiver actor -->
-  <actor host="Ruby" function="receiver">
-  </actor>
-</platform>
index 5ac7b1b..70f4277 100644 (file)
@@ -18,40 +18,30 @@ namespace sg4 = simgrid::s4u;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_waituntil, "Messages specific for this s4u example");
 
-static void sender(int argc, char** argv)
+static void sender(int messages_count, size_t payload_size)
 {
-  xbt_assert(argc == 4, "Expecting 3 parameters from the XML deployment file but got %d", argc);
-  long messages_count  = std::stol(argv[1]); /* - number of messages */
-  long msg_size        = std::stol(argv[2]); /* - message size in bytes */
-  long receivers_count = std::stol(argv[3]); /* - number of receivers */
-
   std::vector<sg4::CommPtr> pending_comms;
+  sg4::Mailbox* mbox = sg4::Mailbox::by_name("receiver-0");
 
-  /* Start dispatching all messages to receivers, in a round robin fashion */
+  /* Start dispatching all messages to the receiver */
   for (int i = 0; i < messages_count; i++) {
-    std::string mboxName        = std::string("receiver-") + std::to_string(i % receivers_count);
-    sg4::Mailbox* mbox          = sg4::Mailbox::by_name(mboxName);
-    std::string msgName         = std::string("Message ") + std::to_string(i);
-    auto* payload               = new std::string(msgName); // copy the data we send:
+    std::string message = std::string("Message ") + std::to_string(i);
+    auto* payload       = new std::string(message); // copy the data we send:
 
     // 'msgName' is not a stable storage location
-    XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str());
+    XBT_INFO("Send '%s' to '%s'", message.c_str(), mbox->get_cname());
     /* Create a communication representing the ongoing communication */
-    sg4::CommPtr comm = mbox->put_async(payload, msg_size);
+    sg4::CommPtr comm = mbox->put_async(payload, payload_size);
     /* Add this comm to the vector of all known comms */
     pending_comms.push_back(comm);
   }
 
-  /* Start sending messages to let the workers know that they should stop */
-  for (int i = 0; i < receivers_count; i++) {
-    std::string mboxName        = std::string("receiver-") + std::to_string(i % receivers_count);
-    sg4::Mailbox* mbox          = sg4::Mailbox::by_name(mboxName);
-    auto* payload               = new std::string("finalize"); // Make a copy of the data we will send
+  /* Start the finalize signal to the receiver*/
+  auto* payload     = new std::string("finalize"); // Make a copy of the data we will send
+  sg4::CommPtr comm = mbox->put_async(payload, 0);
+  pending_comms.push_back(comm);
+  XBT_INFO("Send 'finalize' to 'receiver-0'");
 
-    sg4::CommPtr comm = mbox->put_async(payload, 0);
-    pending_comms.push_back(comm);
-    XBT_INFO("Send 'finalize' to 'receiver-%ld'", i % receivers_count);
-  }
   XBT_INFO("Done dispatching all messages");
 
   /* Now that all message exchanges were initiated, wait for their completion, in order of creation. */
@@ -64,11 +54,9 @@ static void sender(int argc, char** argv)
   XBT_INFO("Goodbye now!");
 }
 
-/* Receiver actor expects 1 argument: its ID */
-static void receiver(int argc, char** argv)
+static void receiver()
 {
-  xbt_assert(argc == 2, "Expecting one parameter from the XML deployment file but got %d", argc);
-  sg4::Mailbox* mbox = sg4::Mailbox::by_name(std::string("receiver-") + argv[1]);
+  sg4::Mailbox* mbox = sg4::Mailbox::by_name("receiver-0");
 
   XBT_INFO("Wait for my first message");
   for (bool cont = true; cont;) {
@@ -81,14 +69,13 @@ static void receiver(int argc, char** argv)
 
 int main(int argc, char* argv[])
 {
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
-
   sg4::Engine e(&argc, argv);
-  e.register_function("sender", &sender);
-  e.register_function("receiver", &receiver);
 
   e.load_platform(argv[1]);
-  e.load_deployment(argv[2]);
+
+  sg4::Actor::create("sender", e.host_by_name("Tremblay"), sender, 3, 5e7);
+  sg4::Actor::create("receiver", e.host_by_name("Ruby"), receiver);
+
   e.run();
 
   return 0;
index 87d8794..3ca0564 100644 (file)
@@ -2,7 +2,7 @@
 
 p Test1 Sleep_sender > Sleep_receiver
 
-$ ${bindir:=.}/s4u-comm-waituntil ${platfdir}/small_platform_fatpipe.xml s4u-comm-waituntil_d.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/s4u-comm-waituntil ${platfdir}/small_platform_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0'
 > [  0.000000] (2:receiver@Ruby) Wait for my first message
 > [  0.000000] (1:sender@Tremblay) Send 'Message 1' to 'receiver-0'
diff --git a/examples/cpp/comm-waituntil/s4u-comm-waituntil_d.xml b/examples/cpp/comm-waituntil/s4u-comm-waituntil_d.xml
deleted file mode 100644 (file)
index be1dba6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <!-- The master actor (with some arguments) -->
-  <actor host="Tremblay" function="sender">
-    <argument value="3"/>       <!-- Number of tasks -->
-    <argument value="50000000"/>  <!-- Computation size of tasks -->
-    <argument value="1"/>         <!-- Number of receivers -->
-  </actor>
-  <!-- The receiver actors -->
-  <actor host="Ruby" function="receiver">
-    <argument value="0"/> <!-- id -->
-  </actor>
-</platform>
index 9401b8a..525fb68 100644 (file)
@@ -19,12 +19,12 @@ int main(int argc, char* argv[])
   auto jupiter  = e.host_by_name("Jupiter");
 
   // Display the details on vetoed activities
-  simgrid::s4u::Activity::on_veto.connect([](const simgrid::s4u::Activity& a) {
+  simgrid::s4u::Activity::on_veto_cb([](const simgrid::s4u::Activity& a) {
     XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", a.get_cname(),
              (a.dependencies_solved() ? "solved" : "NOT solved"), (a.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
-  simgrid::s4u::Activity::on_completion.connect([](simgrid::s4u::Activity& activity) {
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec != nullptr)
       XBT_INFO("Activity '%s' is complete (start time: %f, finish time: %f)", exec->get_cname(), exec->get_start_time(),
index 8c30e6f..04824f8 100644 (file)
@@ -8,11 +8,11 @@ $ ${bindir:=.}/s4u-dag-comm ${platfdir}/two_hosts.xml --log=s4u_activity.t:verbo
 > [  0.000000] (0:maestro@) Activity 'transfert' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
 > [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
 > [  0.000000] (0:maestro@) Activity 'transfert' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  1.000000] (0:maestro@) Activity 'parent' is complete (start time: 0.000000, finish time: 1.000000)
 > [  1.000000] (0:maestro@) Remove a dependency from 'parent' on 'transfert'
 > [  1.000000] (0:maestro@) 'transfert' is assigned to a resource and all dependencies are solved. Let's start
-> [  1.000000] (0:maestro@) Activity 'parent' is complete (start time: 0.000000, finish time: 1.000000)
+> [  2.083775] (0:maestro@) Activity 'transfert' is complete
 > [  2.083775] (0:maestro@) Remove a dependency from 'transfert' on 'child'
 > [  2.083775] (0:maestro@) 'child' is assigned to a resource and all dependencies are solved. Let's start
-> [  2.083775] (0:maestro@) Activity 'transfert' is complete
 > [  3.083775] (0:maestro@) Activity 'child' is complete (start time: 2.083775, finish time: 3.083775)
 > [  3.083775] (0:maestro@) Simulation time 3.08378
index 2c6bd2e..8b04b9d 100644 (file)
@@ -18,7 +18,7 @@ int main(int argc, char** argv)
 
   auto* faulty = e.host_by_name("Faulty Host");
   auto* safe   = e.host_by_name("Safe Host");
-  sg4::Activity::on_completion.connect([](sg4::Activity& activity) {
+  sg4::Activity::on_completion_cb([](sg4::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec == nullptr) // Only Execs are concerned here
       return;
index b47537d..aff6c32 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-p Test of the management of failed tasks simdag
+p Test of the management of failed dag activities 
 
 $ ${bindir:=.}/s4u-dag-failure ${platfdir}/faulty_host.xml --log=s4u_activity.t:verbose "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'ptask_L07'
@@ -13,9 +13,9 @@ $ ${bindir:=.}/s4u-dag-failure ${platfdir}/faulty_host.xml --log=s4u_activity.t:
 > [ 10.000000] (0:maestro@) let's unschedule Activity 'Poor task' and reschedule it on the 'Safe Host'
 > [ 10.000000] (0:maestro@) 'Poor task' is assigned to a resource and all dependencies are solved. Let's start
 > [ 10.000000] (0:maestro@) Run the simulation again
+> [ 50.000000] (0:maestro@) Activity 'Poor task' is complete (start time: 10.000000, finish time: 50.000000)
 > [ 50.000000] (0:maestro@) Remove a dependency from 'Poor task' on 'Child'
 > [ 50.000000] (0:maestro@) 'Child' is assigned to a resource and all dependencies are solved. Let's start
-> [ 50.000000] (0:maestro@) Activity 'Poor task' is complete (start time: 10.000000, finish time: 50.000000)
 > [ 90.000000] (0:maestro@) Activity 'Child' is complete (start time: 50.000000, finish time: 90.000000)
 > [ 90.000000] (0:maestro@) Second test: parallel Exec activity
 > [ 90.000000] (0:maestro@) Schedule Activity 'Poor parallel task' on 'Safe Host' and 'Faulty Host'
@@ -25,8 +25,8 @@ $ ${bindir:=.}/s4u-dag-failure ${platfdir}/faulty_host.xml --log=s4u_activity.t:
 > [100.000000] (0:maestro@) let's unschedule Activity 'Poor parallel task' and reschedule it only on the 'Safe Host'
 > [100.000000] (0:maestro@) 'Poor parallel task' is assigned to a resource and all dependencies are solved. Let's start
 > [100.000000] (0:maestro@) Run the simulation again
+> [180.000000] (0:maestro@) Activity 'Poor parallel task' is complete (start time: 100.000000, finish time: 180.000000)
 > [180.000000] (0:maestro@) Remove a dependency from 'Poor parallel task' on 'Child'
 > [180.000000] (0:maestro@) 'Child' is assigned to a resource and all dependencies are solved. Let's start
-> [180.000000] (0:maestro@) Activity 'Poor parallel task' is complete (start time: 100.000000, finish time: 180.000000)
 > [220.000000] (0:maestro@) Activity 'Child' is complete (start time: 180.000000, finish time: 220.000000)
 
diff --git a/examples/cpp/dag-from-dax/s4u-dag-from-dax.cpp b/examples/cpp/dag-from-dax/s4u-dag-from-dax.cpp
new file mode 100644 (file)
index 0000000..54c27ce
--- /dev/null
@@ -0,0 +1,79 @@
+/* simple test trying to load a DAX file.                                   */
+
+/* Copyright (c) 2009-2021. 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 "simgrid/s4u.hpp"
+
+#include <stdio.h>
+#include <string.h>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(dag_from_dax, "Logging specific to this example");
+
+int main(int argc, char** argv)
+{
+  simgrid::s4u::Engine e(&argc, argv);
+  e.load_platform(argv[1]);
+
+  std::vector<simgrid::s4u::ActivityPtr> dag = simgrid::s4u::create_DAG_from_DAX(argv[2]);
+
+  if (dag.empty()) {
+    XBT_ERROR("A problem occurred during DAX parsing (cycle or syntax). Do not continue this test");
+    exit(2);
+  }
+
+  XBT_INFO("--------- Display all activities of the loaded DAG -----------");
+  for (const auto& a : dag) {
+    std::string type = "an Exec";
+    std::string task = "flops to execute";
+    if (dynamic_cast<simgrid::s4u::Comm*>(a.get()) != nullptr) {
+      type = "a Comm";
+      task = "bytes to transfer";
+    }
+    XBT_INFO("'%s' is %s: %.0f %s. Dependencies: %s; Ressources: %s", a->get_cname(), type.c_str(), a->get_remaining(),
+             task.c_str(), (a->dependencies_solved() ? "solved" : "NOT solved"),
+             (a->is_assigned() ? "assigned" : "NOT assigned"));
+  }
+
+  XBT_INFO("------------------- Schedule tasks ---------------------------");
+  auto hosts = e.get_all_hosts();
+  auto count = e.get_host_count();
+  int cursor = 0;
+  // Schedule end first
+  static_cast<simgrid::s4u::Exec*>(dag.back().get())->set_host(hosts[0]);
+
+  for (const auto& a : dag) {
+    auto* exec = dynamic_cast<simgrid::s4u::Exec*>(a.get());
+    if (exec != nullptr && exec->get_name() != "end") {
+      exec->set_host(hosts[cursor % count]);
+      cursor++;
+    }
+    auto* comm = dynamic_cast<simgrid::s4u::Comm*>(a.get());
+    if (comm != nullptr) {
+      auto pred = dynamic_cast<simgrid::s4u::Exec*>((*comm->get_dependencies().begin()).get());
+      auto succ = dynamic_cast<simgrid::s4u::Exec*>(comm->get_successors().front().get());
+      comm->set_source(pred->get_host())->set_destination(succ->get_host());
+    }
+  }
+
+  XBT_INFO("------------------- Run the schedule -------------------------");
+  e.run();
+
+  XBT_INFO("-------------- Summary of executed schedule ------------------");
+  for (const auto& a : dag) {
+    const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(a.get());
+    if (exec != nullptr) {
+      XBT_INFO("[%f->%f] '%s' executed on %s", exec->get_start_time(), exec->get_finish_time(), exec->get_cname(),
+               exec->get_host()->get_cname());
+    }
+    const auto* comm = dynamic_cast<simgrid::s4u::Comm*>(a.get());
+    if (comm != nullptr) {
+      XBT_INFO("[%f->%f] '%s' transferred from %s to %s", comm->get_start_time(), comm->get_finish_time(),
+               comm->get_cname(), comm->get_source()->get_cname(), comm->get_destination()->get_cname());
+    }
+  }
+  return 0;
+}
diff --git a/examples/cpp/dag-from-dax/s4u-dag-from-dax.tesh b/examples/cpp/dag-from-dax/s4u-dag-from-dax.tesh
new file mode 100644 (file)
index 0000000..6728d9a
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/env tesh
+p Test the DAX loader on a small DAX instance
+
+$ ${bindir:=.}/s4u-dag-from-dax --log=no_loc ${platfdir}/cluster_backbone.xml ${srcdir:=.}/smalldax.xml
+> [0.000000] [dag_parsing/WARNING] Ignore file o1 size redefinition from 1000000 to 304
+> [0.000000] [dag_parsing/WARNING] Ignore file o2 size redefinition from 1000000 to 304
+> [0.000000] [dag_from_dax/INFO] --------- Display all activities of the loaded DAG -----------
+> [0.000000] [dag_from_dax/INFO] 'root' is an Exec: 0 flops to execute. Dependencies: solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '1@task1' is an Exec: 42000000000 flops to execute. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '2@task2' is an Exec: 42000000000 flops to execute. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '3@task1' is an Exec: 42000000000 flops to execute. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] 'root_i1_1@task1' is a Comm: 1000000 bytes to transfer. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] 'root_i2_2@task2' is a Comm: 1000000 bytes to transfer. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '1@task1_o1_3@task1' is a Comm: 1000000 bytes to transfer. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '2@task2_o2_3@task1' is a Comm: 1000000 bytes to transfer. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] '3@task1_o3_end' is a Comm: 4167312 bytes to transfer. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] 'end' is an Exec: 0 flops to execute. Dependencies: NOT solved; Ressources: NOT assigned
+> [0.000000] [dag_from_dax/INFO] ------------------- Schedule tasks ---------------------------
+> [0.000000] [dag_from_dax/INFO] ------------------- Run the schedule -------------------------
+> [84.090777] [dag_from_dax/INFO] -------------- Summary of executed schedule ------------------
+> [84.090777] [dag_from_dax/INFO] [0.000000->0.000000] 'root' executed on node-0.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [0.024301->42.024301] '1@task1' executed on node-1.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [0.024301->42.024301] '2@task2' executed on node-10.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [42.048602->84.048602] '3@task1' executed on node-11.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [0.000000->0.024301] 'root_i1_1@task1' transferred from node-0.simgrid.org to node-1.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [0.000000->0.024301] 'root_i2_2@task2' transferred from node-0.simgrid.org to node-10.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [42.024301->42.048602] '1@task1_o1_3@task1' transferred from node-1.simgrid.org to node-11.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [42.024301->42.048602] '2@task2_o2_3@task1' transferred from node-10.simgrid.org to node-11.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [84.048602->84.090777] '3@task1_o3_end' transferred from node-11.simgrid.org to node-0.simgrid.org
+> [84.090777] [dag_from_dax/INFO] [84.090777->84.090777] 'end' executed on node-0.simgrid.org
+
+p Test the DAX loader with a DAX comprising a cycle.
+
+! expect return 2
+$ ${bindir:=.}/s4u-dag-from-dax --log=no_loc ${platfdir}/cluster_backbone.xml ${srcdir:=.}/simple_dax_with_cycle.xml
+> [0.000000] [dag_parsing/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
+> [0.000000] [dag_from_dax/ERROR] A problem occurred during DAX parsing (cycle or syntax). Do not continue this test
index 04bb0cc..b8216cf 100644 (file)
@@ -48,5 +48,5 @@ $ ${bindir:=.}/s4u-dag-from-dot --log=no_loc ${platfdir}/cluster_backbone.xml ${
 
 ! expect return 2
 $ ${bindir:=.}/s4u-dag-from-dot --log=no_loc ${platfdir}/cluster_backbone.xml ${srcdir:=.}/dag_with_cycle.dot
-> [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
+> [0.000000] [dag_parsing/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
 > [0.000000] [dag_from_dot/CRITICAL] No dot loaded. Do you have a cycle in your graph?
index 9f1bee8..81e2e91 100644 (file)
@@ -19,12 +19,12 @@ int main(int argc, char* argv[])
   auto carl = e.host_by_name("carl");
 
   // Display the details on vetoed activities
-  simgrid::s4u::Activity::on_veto.connect([](const simgrid::s4u::Activity& a) {
+  simgrid::s4u::Activity::on_veto_cb([](const simgrid::s4u::Activity& a) {
     XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", a.get_cname(),
              (a.dependencies_solved() ? "solved" : "NOT solved"), (a.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
-  simgrid::s4u::Activity::on_completion.connect([](simgrid::s4u::Activity& activity) {
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec == nullptr) // Only Execs are concerned here
       return;
index 2dcac17..186126b 100644 (file)
@@ -5,9 +5,9 @@ $ ${bindir:=.}/s4u-dag-io ${platfdir}/hosts_with_disks.xml --log=s4u_activity.t:
 > [  0.000000] (0:maestro@) Activity 'write' vetoed. Dependencies: NOT solved; Ressources: assigned
 > [  0.000000] (0:maestro@) Activity 'read' vetoed. Dependencies: NOT solved; Ressources: assigned
 > [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: assigned
+> [  1.000000] (0:maestro@) Activity 'parent' is complete (start time: 0.000000, finish time: 1.000000)
 > [  1.000000] (0:maestro@) Remove a dependency from 'parent' on 'write'
 > [  1.000000] (0:maestro@) 'write' is assigned to a resource and all dependencies are solved. Let's start
-> [  1.000000] (0:maestro@) Activity 'parent' is complete (start time: 0.000000, finish time: 1.000000)
 > [ 26.000000] (0:maestro@) Remove a dependency from 'write' on 'read'
 > [ 26.000000] (0:maestro@) 'read' is assigned to a resource and all dependencies are solved. Let's start
 > [ 36.000000] (0:maestro@) Remove a dependency from 'read' on 'child'
diff --git a/examples/cpp/dag-scheduling/s4u-dag-scheduling.cpp b/examples/cpp/dag-scheduling/s4u-dag-scheduling.cpp
new file mode 100644 (file)
index 0000000..df88874
--- /dev/null
@@ -0,0 +1,273 @@
+/* Copyright (c) 2009-2021. 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. */
+
+/* simple test to schedule a DAX file with the Min-Min algorithm.           */
+#include <math.h>
+#include <simgrid/host.h>
+#include <simgrid/s4u.hpp>
+#include <string.h>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(dag_scheduling, "Logging specific to this example");
+
+typedef struct _HostAttribute* HostAttribute;
+struct _HostAttribute {
+  /* Earliest time at which a host is ready to execute a task */
+  double available_at;
+  simgrid::s4u::Exec* last_scheduled_task;
+};
+
+static double sg_host_get_available_at(const simgrid::s4u::Host* host)
+{
+  return static_cast<HostAttribute>(host->get_data())->available_at;
+}
+
+static void sg_host_set_available_at(simgrid::s4u::Host* host, double time)
+{
+  auto* attr         = static_cast<HostAttribute>(host->get_data());
+  attr->available_at = time;
+  host->set_data(attr);
+}
+
+static simgrid::s4u::Exec* sg_host_get_last_scheduled_task(const simgrid::s4u::Host* host)
+{
+  return static_cast<HostAttribute>(host->get_data())->last_scheduled_task;
+}
+
+static void sg_host_set_last_scheduled_task(simgrid::s4u::Host* host, simgrid::s4u::ExecPtr task)
+{
+  auto* attr                = static_cast<HostAttribute>(host->get_data());
+  attr->last_scheduled_task = task.get();
+  host->set_data(attr);
+}
+
+static bool dependency_exists(const simgrid::s4u::Exec* src, simgrid::s4u::Exec* dst)
+{
+  const auto& dependencies = src->get_dependencies();
+  const auto& successors   = src->get_successors();
+  return (std::find(successors.begin(), successors.end(), dst) != successors.end() ||
+          dependencies.find(dst) != dependencies.end());
+}
+
+static std::vector<simgrid::s4u::Exec*> get_ready_tasks(const std::vector<simgrid::s4u::ActivityPtr>& dax)
+{
+  std::vector<simgrid::s4u::Exec*> ready_tasks;
+  std::map<simgrid::s4u::Exec*, unsigned int> candidate_execs;
+
+  for (auto& a : dax) {
+    // Only loot at activity that have their dependencies solved but are not assigned
+    if (a->dependencies_solved() && not a->is_assigned()) {
+      // if it is an exec, it's ready
+      auto* exec = dynamic_cast<simgrid::s4u::Exec*>(a.get());
+      if (exec != nullptr)
+        ready_tasks.push_back(exec);
+      // if it a comm, we consider its successor as a candidate. If a candidate solves all its dependencies,
+      // i.e., get all its input data, it's ready
+      const auto* comm = dynamic_cast<simgrid::s4u::Comm*>(a.get());
+      if (comm != nullptr) {
+        auto* next_exec = static_cast<simgrid::s4u::Exec*>(comm->get_successors().front().get());
+        candidate_execs[next_exec]++;
+        if (next_exec->get_dependencies().size() == candidate_execs[next_exec])
+          ready_tasks.push_back(next_exec);
+      }
+    }
+  }
+  XBT_DEBUG("There are %zu ready tasks", ready_tasks.size());
+  return ready_tasks;
+}
+
+static double finish_on_at(const simgrid::s4u::ExecPtr task, const simgrid::s4u::Host* host)
+{
+  double result;
+
+  const auto& parents = task->get_dependencies();
+
+  if (not parents.empty()) {
+    double data_available = 0.;
+    double last_data_available;
+    /* compute last_data_available */
+    last_data_available = -1.0;
+    for (const auto& parent : parents) {
+      /* normal case */
+      const auto* comm = dynamic_cast<simgrid::s4u::Comm*>(parent.get());
+      if (comm != nullptr) {
+        auto source = comm->get_source();
+        XBT_DEBUG("transfer from %s to %s", source->get_cname(), host->get_cname());
+        /* Estimate the redistribution time from this parent */
+        double redist_time;
+        if (comm->get_remaining() <= 1e-6) {
+          redist_time = 0;
+        } else {
+          redist_time = sg_host_get_route_latency(source, host) +
+                        comm->get_remaining() / sg_host_get_route_bandwidth(source, host);
+        }
+        // We use the user data field to store the finish time of the predecessor of the comm, i.e., its potential start
+        // time
+        data_available = *(static_cast<double*>(comm->get_data())) + redist_time;
+      }
+
+      const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(parent.get());
+      /* no transfer, control dependency */
+      if (exec != nullptr) {
+        data_available = exec->get_finish_time();
+      }
+
+      if (last_data_available < data_available)
+        last_data_available = data_available;
+    }
+
+    result = fmax(sg_host_get_available_at(host), last_data_available) + task->get_remaining() / host->get_speed();
+  } else
+    result = sg_host_get_available_at(host) + task->get_remaining() / host->get_speed();
+
+  return result;
+}
+
+static simgrid::s4u::Host* get_best_host(const simgrid::s4u::ExecPtr exec)
+{
+  std::vector<simgrid::s4u::Host*> hosts = simgrid::s4u::Engine::get_instance()->get_all_hosts();
+  auto best_host                         = hosts.front();
+  double min_EFT                         = finish_on_at(exec, best_host);
+
+  for (const auto& h : hosts) {
+    double EFT = finish_on_at(exec, h);
+    XBT_DEBUG("%s finishes on %s at %f", exec->get_cname(), h->get_cname(), EFT);
+
+    if (EFT < min_EFT) {
+      min_EFT   = EFT;
+      best_host = h;
+    }
+  }
+  return best_host;
+}
+
+int main(int argc, char** argv)
+{
+  double min_finish_time            = -1.0;
+  simgrid::s4u::Exec* selected_task = nullptr;
+  simgrid::s4u::Host* selected_host = nullptr;
+
+  simgrid::s4u::Engine e(&argc, argv);
+  std::set<simgrid::s4u::Activity*> vetoed;
+  e.track_vetoed_activities(&vetoed);
+
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
+    // when an Exec completes, we need to set the potential start time of all its ouput comms
+    const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
+    if (exec == nullptr) // Only Execs are concerned here
+      return;
+    for (const auto& succ : exec->get_successors()) {
+      auto* comm = dynamic_cast<simgrid::s4u::Comm*>(succ.get());
+      if (comm != nullptr) {
+        auto* finish_time = new double(exec->get_finish_time());
+        // We use the user data field to store the finish time of the predecessor of the comm, i.e., its potential start
+        // time
+        comm->set_data(finish_time);
+      }
+    }
+  });
+
+  e.load_platform(argv[1]);
+
+  /*  Allocating the host attribute */
+  unsigned long total_nhosts = e.get_host_count();
+  const auto hosts          = e.get_all_hosts();
+
+  for (unsigned long i = 0; i < total_nhosts; i++)
+    hosts[i]->set_data(xbt_new0(struct _HostAttribute, 1));
+
+  /* load the DAX file */
+  std::vector<simgrid::s4u::ActivityPtr> dax = simgrid::s4u::create_DAG_from_DAX(argv[2]);
+
+  /* Schedule the root first */
+  auto* root = static_cast<simgrid::s4u::Exec*>(dax.front().get());
+  auto host  = get_best_host(root);
+  root->set_host(host);
+  // we can also set the source of all the output comms of the root node
+  for (const auto& succ : root->get_successors()) {
+    auto* comm = dynamic_cast<simgrid::s4u::Comm*>(succ.get());
+    if (comm != nullptr)
+      comm->set_source(host);
+  }
+
+  e.run();
+
+  while (not vetoed.empty()) {
+    XBT_DEBUG("Start new scheduling round");
+    /* Get the set of ready tasks */
+    auto ready_tasks = get_ready_tasks(dax);
+    vetoed.clear();
+
+    if (ready_tasks.empty()) {
+      ready_tasks.clear();
+      /* there is no ready task, let advance the simulation */
+      e.run();
+      continue;
+    }
+    /* For each ready task:
+     * get the host that minimizes the completion time.
+     * select the task that has the minimum completion time on its best host.
+     */
+    for (auto task : ready_tasks) {
+      XBT_DEBUG("%s is ready", task->get_cname());
+      host               = get_best_host(task);
+      double finish_time = finish_on_at(task, host);
+      if (min_finish_time < 0 || finish_time < min_finish_time) {
+        min_finish_time = finish_time;
+        selected_task   = task;
+        selected_host   = host;
+      }
+    }
+
+    XBT_INFO("Schedule %s on %s", selected_task->get_cname(), selected_host->get_cname());
+    selected_task->set_host(selected_host);
+    // we can also set the destination of all the input comms of the selected task
+    for (const auto& pred : selected_task->get_dependencies()) {
+      auto* comm = dynamic_cast<simgrid::s4u::Comm*>(pred.get());
+      if (comm != nullptr) {
+        comm->set_destination(selected_host);
+        delete static_cast<double*>(comm->get_data());
+      }
+    }
+    // we can also set the source of all the output comms of the selected task
+    for (const auto& succ : selected_task->get_successors()) {
+      auto* comm = dynamic_cast<simgrid::s4u::Comm*>(succ.get());
+      if (comm != nullptr)
+        comm->set_source(selected_host);
+    }
+
+    /*
+     * tasks can be executed concurrently when they can by default.
+     * Yet schedulers take decisions assuming that tasks wait for resource availability to start.
+     * The solution (well crude hack is to keep track of the last task scheduled on a host and add a special type of
+     * dependency if needed to force the sequential execution meant by the scheduler.
+     * If the last scheduled task is already done, has failed or is a predecessor of the current task, no need for a
+     * new dependency
+     */
+
+    auto last_scheduled_task = sg_host_get_last_scheduled_task(selected_host);
+    if (last_scheduled_task && (last_scheduled_task->get_state() != simgrid::s4u::Activity::State::FINISHED) &&
+        (last_scheduled_task->get_state() != simgrid::s4u::Activity::State::FAILED) &&
+        not dependency_exists(sg_host_get_last_scheduled_task(selected_host), selected_task))
+      last_scheduled_task->add_successor(selected_task);
+
+    sg_host_set_last_scheduled_task(selected_host, selected_task);
+    sg_host_set_available_at(selected_host, min_finish_time);
+
+    ready_tasks.clear();
+    /* reset the min_finish_time for the next set of ready tasks */
+    min_finish_time = -1.;
+    e.run();
+  }
+
+  XBT_INFO("Simulation Time: %f", simgrid_get_clock());
+
+  for (auto h : hosts) {
+    xbt_free(h->get_data());
+    h->set_data(nullptr);
+  }
+
+  return 0;
+}
diff --git a/examples/cpp/dag-scheduling/s4u-dag-scheduling.tesh b/examples/cpp/dag-scheduling/s4u-dag-scheduling.tesh
new file mode 100644 (file)
index 0000000..6abc5c7
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/s4u-dag-scheduling --log=dag_parsing.thresh:critical --log=no_loc ${platfdir}/simulacrum_7_hosts.xml ${srcdir:=.}/Montage_25.xml
+> [0.000000] [dag_scheduling/INFO] Schedule ID00002@mProjectPP on Host 27
+> [0.001301] [dag_scheduling/INFO] Schedule ID00000@mProjectPP on Host 26
+> [0.001301] [dag_scheduling/INFO] Schedule ID00003@mProjectPP on Host 30
+> [0.001306] [dag_scheduling/INFO] Schedule ID00004@mProjectPP on Host 27
+> [0.001736] [dag_scheduling/INFO] Schedule ID00001@mProjectPP on Host 32
+> [14.582104] [dag_scheduling/INFO] Schedule ID00010@mDiffFit on Host 26
+> [17.042829] [dag_scheduling/INFO] Schedule ID00008@mDiffFit on Host 27
+> [29.547201] [dag_scheduling/INFO] Schedule ID00013@mDiffFit on Host 26
+> [32.629864] [dag_scheduling/INFO] Schedule ID00009@mDiffFit on Host 30
+> [32.631165] [dag_scheduling/INFO] Schedule ID00011@mDiffFit on Host 27
+> [32.632466] [dag_scheduling/INFO] Schedule ID00005@mDiffFit on Host 26
+> [32.632466] [dag_scheduling/INFO] Schedule ID00006@mDiffFit on Host 32
+> [32.632469] [dag_scheduling/INFO] Schedule ID00012@mDiffFit on Host 31
+> [32.632896] [dag_scheduling/INFO] Schedule ID00007@mDiffFit on Host 28
+> [60.434831] [dag_scheduling/INFO] Schedule ID00014@mConcatFit on Host 27
+> [61.228672] [dag_scheduling/INFO] Schedule ID00015@mBgModel on Host 27
+> [62.772102] [dag_scheduling/INFO] Schedule ID00016@mBackground on Host 27
+> [62.772102] [dag_scheduling/INFO] Schedule ID00017@mBackground on Host 26
+> [62.773403] [dag_scheduling/INFO] Schedule ID00020@mBackground on Host 30
+> [62.773403] [dag_scheduling/INFO] Schedule ID00018@mBackground on Host 27
+> [62.773403] [dag_scheduling/INFO] Schedule ID00019@mBackground on Host 32
+> [88.573854] [dag_scheduling/INFO] Schedule ID00021@mImgTbl on Host 27
+> [90.158236] [dag_scheduling/INFO] Schedule ID00022@mAdd on Host 27
+> [93.450123] [dag_scheduling/INFO] Schedule ID00023@mShrink on Host 27
+> [97.646883] [dag_scheduling/INFO] Schedule ID00024@mJPEG on Host 27
+> [98.135775] [dag_scheduling/INFO] Schedule end on Host 27
+> [98.135796] [dag_scheduling/INFO] Simulation Time: 98.135796
index f377550..03445a4 100644 (file)
@@ -18,7 +18,7 @@ int main(int argc, char* argv[])
   auto fafard = e.host_by_name("Fafard");
 
   // Display the details on vetoed activities
-  simgrid::s4u::Activity::on_veto.connect([](const simgrid::s4u::Activity& a) {
+  simgrid::s4u::Activity::on_veto_cb([](const simgrid::s4u::Activity& a) {
     const auto& exec = static_cast<const simgrid::s4u::Exec&>(a); // all activities are execs in this example
 
     XBT_INFO("Activity '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(),
@@ -26,7 +26,7 @@ int main(int argc, char* argv[])
              (exec.is_assigned() ? "assigned" : "NOT assigned"));
   });
 
-  simgrid::s4u::Activity::on_completion.connect([](simgrid::s4u::Activity& activity) {
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec == nullptr) // Only Execs are concerned here
       return;
index c232dcc..e41d10e 100644 (file)
@@ -4,12 +4,12 @@ $ ${bindir:=.}/s4u-dag-simple ${platfdir}/small_platform.xml --log=s4u_activity.
 > [  0.000000] (0:maestro@) 'parent 1' is assigned to a resource and all dependencies are solved. Let's start
 > [  0.000000] (0:maestro@) 'parent 2' is assigned to a resource and all dependencies are solved. Let's start
 > [  0.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: NOT solved; Ressources: NOT assigned
-> [  2.000000] (0:maestro@) Remove a dependency from 'parent 1' on 'child'
 > [  2.000000] (0:maestro@) Activity 'parent 1' is complete (start time: 0.000000, finish time: 2.000000)
+> [  2.000000] (0:maestro@) Remove a dependency from 'parent 1' on 'child'
 > [  2.000000] (0:maestro@) Activity child not ready.
+> [  3.000000] (0:maestro@) Activity 'parent 2' is complete (start time: 0.000000, finish time: 3.000000)
 > [  3.000000] (0:maestro@) Remove a dependency from 'parent 2' on 'child'
 > [  3.000000] (0:maestro@) Activity 'child' vetoed. Dependencies: solved; Ressources: NOT assigned
-> [  3.000000] (0:maestro@) Activity 'parent 2' is complete (start time: 0.000000, finish time: 3.000000)
 > [  3.000000] (0:maestro@) Activity child's dependencies are resolved. Let's assign it to Fafard.
 > [  3.000000] (0:maestro@) 'child' is assigned to a resource and all dependencies are solved. Let's start
 > [  4.000000] (0:maestro@) Activity 'child' is complete (start time: 3.000000, finish time: 4.000000)
index ab7df14..0cc2b4e 100644 (file)
@@ -18,37 +18,6 @@ static void runner(simgrid::s4u::ExecPtr activity)
   XBT_INFO("Goodbye now!");
 }
 
-/* This actor tests the ongoing execution until its completion, and don't wait before it's terminated. */
-static void monitor()
-{
-  double computation_amount = simgrid::s4u::this_actor::get_host()->get_speed();
-  XBT_INFO("Execute %g flops, should take 1 second.", computation_amount);
-  simgrid::s4u::ExecPtr activity = simgrid::s4u::this_actor::exec_init(computation_amount);
-  activity->start();
-
-  while (not activity->test()) {
-    XBT_INFO("Remaining amount of flops: %g (%.0f%%)", activity->get_remaining(),
-             100 * activity->get_remaining_ratio());
-    simgrid::s4u::this_actor::sleep_for(0.3);
-  }
-
-  XBT_INFO("Goodbye now!");
-}
-
-/* This actor cancels the ongoing execution after a while. */
-static void canceller()
-{
-  double computation_amount = simgrid::s4u::this_actor::get_host()->get_speed();
-
-  XBT_INFO("Execute %g flops, should take 1 second.", computation_amount);
-  simgrid::s4u::ExecPtr activity = simgrid::s4u::this_actor::exec_async(computation_amount);
-  simgrid::s4u::this_actor::sleep_for(0.5);
-  XBT_INFO("I changed my mind, cancel!");
-  activity->cancel();
-
-  XBT_INFO("Goodbye now!");
-}
-
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
@@ -62,7 +31,7 @@ int main(int argc, char* argv[])
   while (activity->get_remaining() > 0) {
     XBT_INFO("Remaining amount of flops: %g (%.0f%%)", activity->get_remaining(),
              100 * activity->get_remaining_ratio());
-    e.run_until(e.get_clock() + 1);
+    e.run_until(simgrid::s4u::Engine::get_clock() + 1);
   }
 
   XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
index ada7e5e..dcff84c 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char* argv[])
 
   simgrid::s4u::Actor::create("worker", e.host_by_name("Fafard"), worker);
 
-  simgrid::s4u::Activity::on_veto.connect([&e](simgrid::s4u::Activity& a) {
+  simgrid::s4u::Activity::on_veto_cb([&e](simgrid::s4u::Activity& a) {
     auto& exec = static_cast<simgrid::s4u::Exec&>(a);
 
     // First display the situation
index aee134a..d7858c1 100644 (file)
@@ -46,7 +46,7 @@ static void garbage_stack(void)
 
 static void coordinator()
 {
-  int CS_used = 0;
+  bool CS_used = false;
   std::queue<simgrid::s4u::Mailbox*> requests;
 
   simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name("coordinator");
@@ -61,7 +61,7 @@ static void coordinator()
         if (m->return_mailbox->get_name() != "1") {
           XBT_INFO("CS idle. Grant immediately");
           m->return_mailbox->put(new Message(Message::Kind::GRANT, mbox), 1000);
-          CS_used = 1;
+          CS_used = true;
         }
       }
     } else {
@@ -73,11 +73,11 @@ static void coordinator()
           req->put(new Message(Message::Kind::GRANT, mbox), 1000);
         } else {
           requests.push(req);
-          CS_used = 0;
+          CS_used = false;
         }
       } else {
         XBT_INFO("CS release. resource now idle");
-        CS_used = 0;
+        CS_used = false;
       }
     }
   }
diff --git a/examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.cpp b/examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.cpp
new file mode 100644 (file)
index 0000000..48c39ff
--- /dev/null
@@ -0,0 +1,91 @@
+/* Copyright (c) 2012-2021. 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. */
+
+/***************************** Bugged2 ****************************************/
+/* This example implements a centralized mutual exclusion algorithm.          */
+/* One client stay always in critical section                                 */
+/* LTL property checked : !(GFcs)                                             */
+/******************************************************************************/
+
+#include <simgrid/modelchecker.h>
+#include <simgrid/s4u.hpp>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(bugged2_liveness, "my log messages");
+
+class Message {
+public:
+  enum class Kind { GRANT, NOT_GRANT, REQUEST };
+  Kind kind                             = Kind::GRANT;
+  simgrid::s4u::Mailbox* return_mailbox = nullptr;
+  explicit Message(Message::Kind kind, simgrid::s4u::Mailbox* mbox) : kind(kind), return_mailbox(mbox) {}
+};
+
+int cs = 0;
+
+static void coordinator()
+{
+  bool CS_used = false; // initially the CS is idle
+  std::queue<simgrid::s4u::Mailbox*> requests;
+
+  simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name("coordinator");
+
+  while (true) {
+    auto m = mbox->get_unique<Message>();
+    if (m->kind == Message::Kind::REQUEST) {
+      if (CS_used) {
+        XBT_INFO("CS already used.");
+        m->return_mailbox->put(new Message(Message::Kind::NOT_GRANT, mbox), 1000);
+      } else { // can serve it immediately
+        XBT_INFO("CS idle. Grant immediately");
+        m->return_mailbox->put(new Message(Message::Kind::GRANT, mbox), 1000);
+        CS_used = true;
+      }
+    } else { // that's a release. Check if someone was waiting for the lock
+      XBT_INFO("CS release. resource now idle");
+      CS_used = false;
+    }
+  }
+}
+
+static void client(int id)
+{
+  aid_t my_pid = simgrid::s4u::this_actor::get_pid();
+
+  simgrid::s4u::Mailbox* my_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(id));
+
+  while (true) {
+    XBT_INFO("Client (%d) asks the request", id);
+    simgrid::s4u::Mailbox::by_name("coordinator")->put(new Message(Message::Kind::REQUEST, my_mailbox), 1000);
+
+    auto grant = my_mailbox->get_unique<Message>();
+
+    if (grant->kind == Message::Kind::GRANT) {
+      XBT_INFO("Client (%d) got the answer (grant). Sleep a bit and release it", id);
+      if (id == 1)
+        cs = 1;
+    } else {
+      XBT_INFO("Client (%d) got the answer (not grant). Try again", id);
+    }
+
+    simgrid::s4u::this_actor::sleep_for(my_pid);
+  }
+}
+
+int main(int argc, char* argv[])
+{
+  simgrid::s4u::Engine e(&argc, argv);
+
+  MC_automaton_new_propositional_symbol_pointer("cs", &cs);
+
+  e.load_platform(argv[1]);
+
+  simgrid::s4u::Actor::create("coordinator", e.host_by_name("Tremblay"), coordinator);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Fafard"), client, 1);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Boivin"), client, 2);
+
+  e.run();
+
+  return 0;
+}
diff --git a/examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.tesh b/examples/cpp/mc-bugged2-liveness/s4u-mc-bugged2-liveness.tesh
new file mode 100644 (file)
index 0000000..a48a2ab
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env tesh
+
+! expect return 2
+! timeout 20
+! output ignore
+$ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/s4u-mc-bugged2-liveness ${platfdir:=.}/small_platform.xml --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=contexts/stack-size:256 --cfg=model-check/property:promela_bugged2_liveness
diff --git a/examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.cpp b/examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.cpp
new file mode 100644 (file)
index 0000000..288e6fb
--- /dev/null
@@ -0,0 +1,100 @@
+/* Copyright (c) 2010-2021. 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. */
+
+/***************** Centralized Mutual Exclusion Algorithm *********************/
+/* This example implements a centralized mutual exclusion algorithm.          */
+/* There is no bug on it, it is just provided to test the state space         */
+/* reduction of DPOR.                                                         */
+/******************************************************************************/
+
+#include "simgrid/s4u.hpp"
+
+#define AMOUNT_OF_CLIENTS 4
+#define CS_PER_PROCESS 2
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
+
+class Message {
+public:
+  enum class Kind { GRANT, REQUEST, RELEASE };
+  Kind kind                             = Kind::GRANT;
+  simgrid::s4u::Mailbox* return_mailbox = nullptr;
+  explicit Message(Message::Kind kind, simgrid::s4u::Mailbox* mbox) : kind(kind), return_mailbox(mbox) {}
+};
+
+static void coordinator()
+{
+  std::queue<simgrid::s4u::Mailbox*> requests;
+  simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name("coordinator");
+
+  bool CS_used = false;                              // initially the CS is idle
+  int todo     = AMOUNT_OF_CLIENTS * CS_PER_PROCESS; // amount of releases we are expecting
+
+  while (todo > 0) {
+    auto m = mbox->get_unique<Message>();
+    if (m->kind == Message::Kind::REQUEST) {
+      if (CS_used) { // need to push the request in the vector
+        XBT_INFO("CS already used. Queue the request");
+        requests.push(m->return_mailbox);
+      } else { // can serve it immediately
+        XBT_INFO("CS idle. Grant immediately");
+        m->return_mailbox->put(new Message(Message::Kind::GRANT, mbox), 1000);
+        CS_used = true;
+      }
+    } else { // that's a release. Check if someone was waiting for the lock
+      if (not requests.empty()) {
+        XBT_INFO("CS release. Grant to queued requests (queue size: %zu)", requests.size());
+        simgrid::s4u::Mailbox* req = requests.front();
+        requests.pop();
+        req->put(new Message(Message::Kind::GRANT, mbox), 1000);
+        todo--;
+      } else { // nobody wants it
+        XBT_INFO("CS release. resource now idle");
+        CS_used = false;
+        todo--;
+      }
+    }
+  }
+  XBT_INFO("Received all releases, quit now");
+}
+
+static void client()
+{
+  aid_t my_pid = simgrid::s4u::this_actor::get_pid();
+
+  simgrid::s4u::Mailbox* my_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(my_pid));
+
+  // request the CS 3 times, sleeping a bit in between
+  for (int i = 0; i < CS_PER_PROCESS; i++) {
+    XBT_INFO("Ask the request");
+    simgrid::s4u::Mailbox::by_name("coordinator")->put(new Message(Message::Kind::REQUEST, my_mailbox), 1000);
+    // wait for the answer
+    auto grant = my_mailbox->get_unique<Message>();
+    XBT_INFO("got the answer. Sleep a bit and release it");
+    simgrid::s4u::this_actor::sleep_for(1);
+
+    simgrid::s4u::Mailbox::by_name("coordinator")->put(new Message(Message::Kind::RELEASE, my_mailbox), 1000);
+    simgrid::s4u::this_actor::sleep_for(my_pid);
+  }
+  XBT_INFO("Got all the CS I wanted, quit now");
+}
+
+int main(int argc, char* argv[])
+{
+  simgrid::s4u::Engine e(&argc, argv);
+
+  e.load_platform(argv[1]);
+
+  simgrid::s4u::Actor::create("coordinator", e.host_by_name("Tremblay"), coordinator);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Fafard"), client);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Boivin"), client);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Jacquelin"), client);
+  simgrid::s4u::Actor::create("client", e.host_by_name("Ginette"), client);
+
+  e.run();
+
+  return 0;
+}
diff --git a/examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.tesh b/examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.tesh
new file mode 100644 (file)
index 0000000..e3dec00
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/s4u-mc-centralized-mutex ${platfdir:=.}/small_platform.xml "--log=root.fmt:[%5.2r]%e[%11P][%9h]%e%m%n"
+> [ 0.00] [     client][   Fafard] Ask the request
+> [ 0.00] [     client][   Boivin] Ask the request
+> [ 0.00] [     client][Jacquelin] Ask the request
+> [ 0.00] [     client][  Ginette] Ask the request
+> [ 0.03] [coordinator][ Tremblay] CS idle. Grant immediately
+> [ 0.05] [     client][   Fafard] got the answer. Sleep a bit and release it
+> [ 0.25] [coordinator][ Tremblay] CS already used. Queue the request
+> [ 1.12] [coordinator][ Tremblay] CS already used. Queue the request
+> [ 1.13] [coordinator][ Tremblay] CS already used. Queue the request
+> [ 1.16] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 3)
+> [ 1.36] [     client][   Boivin] got the answer. Sleep a bit and release it
+> [ 2.56] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 2)
+> [ 3.16] [     client][   Fafard] Ask the request
+> [ 3.42] [     client][Jacquelin] got the answer. Sleep a bit and release it
+> [ 3.45] [coordinator][ Tremblay] CS already used. Queue the request
+> [ 5.28] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 2)
+> [ 5.30] [     client][  Ginette] got the answer. Sleep a bit and release it
+> [ 5.56] [     client][   Boivin] Ask the request
+> [ 5.77] [coordinator][ Tremblay] CS already used. Queue the request
+> [ 6.32] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 2)
+> [ 6.34] [     client][   Fafard] got the answer. Sleep a bit and release it
+> [ 7.37] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 1)
+> [ 7.57] [     client][   Boivin] got the answer. Sleep a bit and release it
+> [ 8.78] [coordinator][ Tremblay] CS release. resource now idle
+> [ 9.28] [     client][Jacquelin] Ask the request
+> [ 9.37] [     client][   Fafard] Got all the CS I wanted, quit now
+> [10.15] [coordinator][ Tremblay] CS idle. Grant immediately
+> [11.01] [     client][Jacquelin] got the answer. Sleep a bit and release it
+> [11.32] [     client][  Ginette] Ask the request
+> [11.33] [coordinator][ Tremblay] CS already used. Queue the request
+> [11.78] [     client][   Boivin] Got all the CS I wanted, quit now
+> [12.87] [coordinator][ Tremblay] CS release. Grant to queued requests (queue size: 1)
+> [12.88] [     client][  Ginette] got the answer. Sleep a bit and release it
+> [13.90] [coordinator][ Tremblay] CS release. resource now idle
+> [13.90] [coordinator][ Tremblay] Received all releases, quit now
+> [16.87] [     client][Jacquelin] Got all the CS I wanted, quit now
+> [18.90] [     client][  Ginette] Got all the CS I wanted, quit now
index b47d78e..0417ef6 100644 (file)
@@ -104,7 +104,7 @@ int main(int argc, char* argv[])
   // This is how to attach a profile to an host that is created from the XML file.
   // This should be done before calling load_platform(), as the on_creation() event is fired when loading the platform.
   // You can never set a new profile to a resource that already have one.
-  sg4::Host::on_creation.connect([](sg4::Host& h) {
+  sg4::Host::on_creation_cb([](sg4::Host& h) {
     if (h.get_name() == "Bourrassa") {
       h.set_state_profile(simgrid::kernel::profile::ProfileBuilder::from_string("bourassa_profile", "67 0\n70 1\n", 0));
     }
@@ -116,9 +116,9 @@ int main(int argc, char* argv[])
   e.load_deployment(argv[2]);
 
   // Add a new host programatically, and attach a state profile to it
-  auto* root            = e.get_netzone_root();
-  auto* lilibeth        = root->create_host("Lilibeth", 1e15);
-  sg4::LinkInRoute link = sg4::LinkInRoute(e.link_by_name("10"));
+  auto* root     = e.get_netzone_root();
+  auto* lilibeth = root->create_host("Lilibeth", 1e15);
+  auto link      = sg4::LinkInRoute(e.link_by_name("10"));
   root->add_route(e.host_by_name("Tremblay")->get_netpoint(), lilibeth->get_netpoint(), nullptr, nullptr, {link}, true);
   lilibeth->set_state_profile(simgrid::kernel::profile::ProfileBuilder::from_string("lilibeth_profile", R"(
 4 0
index d08b5e7..4ebd21a 100644 (file)
@@ -26,8 +26,15 @@ set(hostload_files              Main  LoadRunner)
 if(enable_java)
   add_custom_target(java-all COMMENT "Building all Java examples...")
   add_dependencies(tests java-all)
+  add_dependencies(java-all simgrid-java) # useful when the libs are not included in the jar
 endif()
 
+if (WIN32)
+  set (path_separator ";")
+else()
+  set (path_separator ":")
+endif()
+    
 foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpong app-tokenring async-yield async-waitall async-dsend
          cloud-migration cloud-masterworker dht-chord dht-kademlia energy-consumption energy-pstate energy-vm hostload
          process-kill process-migration process-startkilltime process-suspend task-priority trace-pingpong)
@@ -38,17 +45,14 @@ foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpo
   endforeach()
 
   if(enable_java)
-    add_custom_command(
-      COMMENT "Building java-${example}..."
-      OUTPUT ${example_dir}/java-${example}_compiled
-      DEPENDS ${example_sources} simgrid-java_jar ${SIMGRID_JAR}
-      COMMAND ${CMAKE_COMMAND} -E make_directory ${example_dir}
-      COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_BINARY_DIR} ${${example}_sources}
-      COMMAND ${CMAKE_COMMAND} -E remove ${example_dir}/java-${example}_compiled
-      COMMAND ${CMAKE_COMMAND} -E touch ${example_dir}/java-${example}_compiled
-    )
-    add_custom_target(java-${example} ALL DEPENDS ${example_dir}/java-${example}_compiled)
+    add_jar(java-${example} SOURCES ${${example}_sources}
+            INCLUDE_JARS simgrid-java_jar
+           OUTPUT_NAME ${example}
+           OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
     add_dependencies(java-all java-${example})
+    
+    string (REPLACE "-" "/" example_dir ${example})
+    ADD_TESH(java-${example}  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/java --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=""${TESH_CLASSPATH}${path_separator}${example}.jar"" --cd ${CMAKE_BINARY_DIR}/examples/deprecated/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/examples/deprecated/java/${example_dir}/${example}.tesh)
   endif()
   set(examples_src  ${examples_src}  ${${example}_sources})
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example_dir}/${example}.tesh)
@@ -66,12 +70,3 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app/bittorrent/bi
                                    ${CMAKE_CURRENT_SOURCE_DIR}/dht/kademlia/kademlia.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/process/startkilltime/startkilltime.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/task/priority/priority.xml                  PARENT_SCOPE)
-
-if(enable_java)
-  foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpong app-tokenring async-yield async-waitall async-dsend
-           cloud-migration cloud-masterworker dht-chord dht-kademlia energy-consumption energy-pstate energy-vm hostload
-           process-kill process-migration process-startkilltime process-suspend task-priority trace-pingpong)
-    string (REPLACE "-" "/" example_dir ${example})
-    ADD_TESH(java-${example}  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/java --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/deprecated/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/examples/deprecated/java/${example_dir}/${example}.tesh)
-  endforeach()
-endif()
diff --git a/examples/deprecated/msg/mc/CMakeLists.txt b/examples/deprecated/msg/mc/CMakeLists.txt
deleted file mode 100644 (file)
index 35da574..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-foreach (x centralized_mutex bugged2_liveness)
-  if(SIMGRID_HAVE_MC AND SIMGRID_HAVE_MSG)
-    add_executable       (${x} EXCLUDE_FROM_ALL ${x}.c)
-    target_link_libraries(${x} simgrid)
-    add_dependencies(tests ${x})
-  endif()
-  set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c)
-  set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/deploy_${x}.xml)
-endforeach()
-
-set(tesh_files   ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/bugged2-liveness.tesh
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/centralized_mutex.tesh                PARENT_SCOPE)
-set(xml_files    ${xml_files}                                                                       PARENT_SCOPE)
-set(examples_src ${examples_src}                                                                    PARENT_SCOPE)
-set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_liveness              PARENT_SCOPE)
-
-#if(SIMGRID_HAVE_MC)
-#  IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...)
-#    ADD_TESH(mc-bugged2-liveness-ucontext     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}
-#                                              --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
-#                                              --cd ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/mc
-#                                              bugged2-liveness.tesh)
-#  ENDIF()
-#ENDIF()
\ No newline at end of file
diff --git a/examples/deprecated/msg/mc/bugged2-liveness.tesh b/examples/deprecated/msg/mc/bugged2-liveness.tesh
deleted file mode 100644 (file)
index 395b3a3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env tesh
-
-! expect return 2
-! timeout 20
-! output ignore
-$ ${bindir:=.}/../../../../bin/simgrid-mc ${bindir:=.}/bugged2_liveness ${platfdir:=.}/small_platform.xml ${srcdir:=.}/deploy_bugged2_liveness.xml --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=contexts/stack-size:256 --cfg=model-check/property:promela_bugged2_liveness
diff --git a/examples/deprecated/msg/mc/bugged2_liveness.c b/examples/deprecated/msg/mc/bugged2_liveness.c
deleted file mode 100644 (file)
index 834a8d6..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (c) 2012-2021. 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. */
-
-/***************************** Bugged2 ****************************************/
-/* This example implements a centralized mutual exclusion algorithm.          */
-/* One client stay always in critical section                                 */
-/* LTL property checked : !(GFcs)                                             */
-/******************************************************************************/
-
-#include <simgrid/modelchecker.h>
-#include <simgrid/msg.h>
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(bugged3, "my log messages");
-
-int cs = 0;
-
-static int coordinator(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  int CS_used = 0;              // initially the CS is idle
-
-  while (1) {
-    msg_task_t task = NULL;
-    MSG_task_receive(&task, "coordinator");
-    const char *kind = MSG_task_get_name(task); //is it a request or a release?
-    if (!strcmp(kind, "request")) {     // that's a request
-      const char* req = MSG_task_get_data(task);
-      if (CS_used) {
-        XBT_INFO("CS already used.");
-        msg_task_t answer = MSG_task_create("not grant", 0, 1000, NULL);
-        MSG_task_send(answer, req);
-      } else {                  // can serve it immediately
-        XBT_INFO("CS idle. Grant immediately");
-        msg_task_t answer = MSG_task_create("grant", 0, 1000, NULL);
-        MSG_task_send(answer, req);
-        CS_used = 1;
-      }
-    } else {                    // that's a release. Check if someone was waiting for the lock
-      XBT_INFO("CS release. resource now idle");
-      CS_used = 0;
-    }
-    MSG_task_destroy(task);
-    kind = NULL;
-  }
-
-  return 0;
-}
-
-static int client(int argc, char *argv[])
-{
-  xbt_assert(argc == 2);
-  int my_pid = MSG_process_get_PID(MSG_process_self());
-  char *my_mailbox = xbt_strdup(argv[1]);
-
-  while(1){
-    XBT_INFO("Client (%s) asks the request", my_mailbox);
-    MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox), "coordinator");
-
-    msg_task_t answer = NULL;
-    MSG_task_receive(&answer, my_mailbox);
-
-    const char* kind = MSG_task_get_name(answer);
-
-    if (!strcmp(kind, "grant")) {
-      XBT_INFO("Client (%s) got the answer (grant). Sleep a bit and release it", my_mailbox);
-      if(!strcmp(my_mailbox, "1"))
-        cs = 1;
-    }else{
-      XBT_INFO("Client (%s) got the answer (not grant). Try again", my_mailbox);
-    }
-
-    MSG_task_destroy(answer);
-    kind = NULL;
-
-    MSG_process_sleep(my_pid);
-  }
-  return 0;
-}
-
-int main(int argc, char *argv[])
-{
-  MSG_init(&argc, argv);
-
-  MC_automaton_new_propositional_symbol_pointer("cs", &cs);
-
-  MSG_create_environment(argv[1]);
-  MSG_function_register("coordinator", coordinator);
-  MSG_function_register("client", client);
-  MSG_launch_application(argv[2]);
-  MSG_main();
-
-  return 0;
-
-}
diff --git a/examples/deprecated/msg/mc/centralized_mutex.c b/examples/deprecated/msg/mc/centralized_mutex.c
deleted file mode 100644 (file)
index 0432e5c..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (c) 2010-2021. 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. */
-
-/***************** Centralized Mutual Exclusion Algorithm *********************/
-/* This example implements a centralized mutual exclusion algorithm.          */
-/* There is no bug on it, it is just provided to test the state space         */
-/* reduction of DPOR.                                                         */
-/******************************************************************************/
-
-#include "simgrid/msg.h"
-
-#define AMOUNT_OF_CLIENTS 4
-#define CS_PER_PROCESS 2
-XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
-
-static int coordinator(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  xbt_dynar_t requests = xbt_dynar_new(sizeof(char *), NULL);   // dynamic vector storing requests (which are char*)
-  int CS_used = 0;              // initially the CS is idle
-  int todo = AMOUNT_OF_CLIENTS * CS_PER_PROCESS;        // amount of releases we are expecting
-  while (todo > 0) {
-    msg_task_t task = NULL;
-    MSG_task_receive(&task, "coordinator");
-    const char *kind = MSG_task_get_name(task); //is it a request or a release?
-    if (!strcmp(kind, "request")) {     // that's a request
-      char *req = MSG_task_get_data(task);
-      if (CS_used) {            // need to push the request in the vector
-        XBT_INFO("CS already used. Queue the request");
-        xbt_dynar_push(requests, &req);
-      } else {                  // can serve it immediately
-        XBT_INFO("CS idle. Grant immediately");
-        msg_task_t answer = MSG_task_create("grant", 0, 1000, NULL);
-        MSG_task_send(answer, req);
-        CS_used = 1;
-      }
-    } else {                    // that's a release. Check if someone was waiting for the lock
-      if (!xbt_dynar_is_empty(requests)) {
-        XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
-        char *req;
-        xbt_dynar_shift(requests, &req);
-        MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
-        todo--;
-      } else {                  // nobody wants it
-        XBT_INFO("CS release. resource now idle");
-        CS_used = 0;
-        todo--;
-      }
-    }
-    MSG_task_destroy(task);
-  }
-  XBT_INFO("Received all releases, quit now");
-  return 0;
-}
-
-static int client(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  int my_pid = MSG_process_get_PID(MSG_process_self());
-  // use my pid as name of mailbox to contact me
-  char *my_mailbox = bprintf("%d", my_pid);
-  // request the CS 3 times, sleeping a bit in between
-  int i;
-  for (i = 0; i < CS_PER_PROCESS; i++) {
-    XBT_INFO("Ask the request");
-    MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox), "coordinator");
-    // wait the answer
-    msg_task_t grant = NULL;
-    MSG_task_receive(&grant, my_mailbox);
-    MSG_task_destroy(grant);
-    XBT_INFO("got the answer. Sleep a bit and release it");
-    MSG_process_sleep(1);
-    MSG_task_send(MSG_task_create("release", 0, 1000, NULL), "coordinator");
-    MSG_process_sleep(my_pid);
-  }
-  XBT_INFO("Got all the CS I wanted, quit now");
-  return 0;
-}
-
-int main(int argc, char *argv[])
-{
-  MSG_init(&argc, argv);
-  MSG_create_environment(argv[1]);
-  MSG_function_register("coordinator", coordinator);
-  MSG_function_register("client", client);
-  MSG_launch_application("deploy_centralized_mutex.xml");
-  MSG_main();
-  return 0;
-}
diff --git a/examples/deprecated/msg/mc/centralized_mutex.tesh b/examples/deprecated/msg/mc/centralized_mutex.tesh
deleted file mode 100644 (file)
index f2202c4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env tesh
-
-$ ${bindir:=.}/centralized_mutex ${platfdir:=.}/small_platform.xml
diff --git a/examples/deprecated/msg/mc/deploy_bugged2_liveness.xml b/examples/deprecated/msg/mc/deploy_bugged2_liveness.xml
deleted file mode 100644 (file)
index 4b4771b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Tremblay" function="coordinator" />
-  <actor host="Fafard"   function="client" >
-    <argument value="1"/>
-  </actor>
-  <actor host="Boivin" function="client" >
-    <argument value="2"/>
-  </actor>
-</platform>
diff --git a/examples/deprecated/msg/mc/deploy_centralized_mutex.xml b/examples/deprecated/msg/mc/deploy_centralized_mutex.xml
deleted file mode 100644 (file)
index 51dfff5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Tremblay" function="coordinator" />
-
-  <actor host="Fafard" function="client" />
-  <actor host="Boivin" function="client" />
-  <actor host="Jacquelin" function="client" />
-  <actor host="Ginette" function="client" />
-</platform>
diff --git a/examples/deprecated/simdag/CMakeLists.txt b/examples/deprecated/simdag/CMakeLists.txt
deleted file mode 100644 (file)
index 8d611f9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-foreach(x daxload scheduling)
-  add_executable       (sd_${x}  EXCLUDE_FROM_ALL  ${x}/sd_${x}.c)
-  target_link_libraries(sd_${x}     simgrid)
-  set_target_properties(sd_${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-  add_dependencies(tests sd_${x})
-  set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.c)
-  set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.tesh)
-endforeach()
-
-set(tesh_files   ${tesh_files}                                                                             PARENT_SCOPE)
-set(examples_src ${examples_src}                                                                           PARENT_SCOPE)
-set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/Montage_25.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/daxload/simple_dax_with_cycle.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/daxload/smalldax.xml                         PARENT_SCOPE)
-set(txt_files    ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/expected_output.jed               PARENT_SCOPE)
-
-foreach(x daxload scheduling)
-  ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag --cd ${CMAKE_BINARY_DIR}/examples/deprecated/simdag ${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag/${x}/sd_${x}.tesh)
-endforeach()
diff --git a/examples/deprecated/simdag/daxload/sd_daxload.c b/examples/deprecated/simdag/daxload/sd_daxload.c
deleted file mode 100644 (file)
index 8588c90..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* simple test trying to load a DAX file.                                   */
-
-/* Copyright (c) 2009-2021. 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 "simgrid/simdag.h"
-
-#include <stdio.h>
-#include <string.h>
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example");
-
-static int name_compare_hosts(const void *n1, const void *n2)
-{
-  return strcmp(sg_host_get_name(*(const sg_host_t*)n1), sg_host_get_name(*(const sg_host_t*)n2));
-}
-
-int main(int argc, char **argv)
-{
-  xbt_dynar_t dax;
-  unsigned int cursor;
-  SD_task_t task;
-
-  /* SD initialization */
-  SD_init(&argc, argv);
-
-  /* Check our arguments */
-  xbt_assert(argc > 2, "Usage: %s platform_file dax_file [jedule_file]\n"
-       "\tExample: %s simulacrum_7_hosts.xml Montage_25.xml Montage_25.jed", argv[0], argv[0]);
-
-  const char* last     = strrchr(argv[2], '.');
-  char * tracefilename = bprintf("%.*s.trace",(int) (last == NULL ? strlen(argv[2]):last - argv[2]), argv[2]);
-  if (argc == 4)
-    tracefilename = xbt_strdup(argv[3]);
-
-  /* creation of the environment */
-  SD_create_environment(argv[1]);
-
-  /* load the DAX file */
-  dax = SD_daxload(argv[2]);
-  if (!dax){
-    XBT_ERROR("A problem occurred during DAX parsing (cycle or syntax). Do not continue this test");
-    free(tracefilename);
-
-    exit(255);
-  }
-
-  /* Display all the tasks */
-  XBT_INFO("------------------- Display all tasks of the loaded DAG ---------------------------");
-  xbt_dynar_foreach(dax, cursor, task) {
-    SD_task_dump(task);
-  }
-
-  FILE *dotout = fopen("dax.dot", "w");
-  fprintf(dotout, "digraph A {\n");
-  xbt_dynar_foreach(dax, cursor, task) {
-    SD_task_dotty(task, dotout);
-  }
-  fprintf(dotout, "}\n");
-  fclose(dotout);
-
-  /* Schedule them all on the first host */
-  XBT_INFO("------------------- Schedule tasks ---------------------------");
-  sg_host_t *host_list = sg_host_list();
-  int hosts_count = sg_host_count();
-  qsort(host_list, hosts_count, sizeof(sg_host_t), name_compare_hosts);
-
-  xbt_dynar_foreach(dax, cursor, task) {
-    if (SD_task_get_kind(task) == SD_TASK_COMP_SEQ) {
-      if (!strcmp(SD_task_get_name(task), "end"))
-        SD_task_schedulel(task, 1, host_list[0]);
-      else
-        SD_task_schedulel(task, 1, host_list[cursor % hosts_count]);
-    }
-  }
-  xbt_free(host_list);
-
-  XBT_INFO("------------------- Run the schedule ---------------------------");
-  SD_simulate(-1);
-  XBT_INFO("------------------- Produce the trace file---------------------------");
-  const char* basename = strrchr(tracefilename, '/');
-  XBT_INFO("Producing the trace of the run into %s", basename ? basename + 1 : tracefilename);
-  FILE *out = fopen(tracefilename, "w");
-  xbt_assert(out, "Cannot write to %s", tracefilename);
-  free(tracefilename);
-
-  xbt_dynar_foreach(dax, cursor, task) {
-    int kind = SD_task_get_kind(task);
-    sg_host_t *wsl = SD_task_get_workstation_list(task);
-    switch (kind) {
-    case SD_TASK_COMP_SEQ:
-      fprintf(out, "[%f] %s compute %f # %s\n", SD_task_get_start_time(task), sg_host_get_name(wsl[0]),
-              SD_task_get_amount(task), SD_task_get_name(task));
-      break;
-    case SD_TASK_COMM_E2E:
-      fprintf(out, "[%f] %s send %s %f # %s\n", SD_task_get_start_time(task), sg_host_get_name(wsl[0]),
-              sg_host_get_name(wsl[1]), SD_task_get_amount(task), SD_task_get_name(task));
-      fprintf(out, "[%f] %s recv %s %f # %s\n", SD_task_get_finish_time(task), sg_host_get_name(wsl[1]),
-              sg_host_get_name(wsl[0]), SD_task_get_amount(task), SD_task_get_name(task));
-      break;
-    default:
-      xbt_die("Task %s is of unknown kind %u", SD_task_get_name(task), SD_task_get_kind(task));
-    }
-    SD_task_destroy(task);
-  }
-  fclose(out);
-  xbt_dynar_free_container(&dax);
-
-  return 0;
-}
diff --git a/examples/deprecated/simdag/daxload/sd_daxload.tesh b/examples/deprecated/simdag/daxload/sd_daxload.tesh
deleted file mode 100644 (file)
index 44fe501..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env tesh
-p Test the DAX loader on a small DAX instance
-
-! output sort
-$ ${bindir:=.}/daxload/sd_daxload --log=no_loc ${srcdir:=.}/../../platforms/cluster_backbone.xml ${srcdir:=.}/daxload/smalldax.xml
-> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [sd_daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304
-> [0.000000] [sd_daxparse/WARNING] Ignore 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]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     root_i1_1@task1
-> [0.000000] [sd_task/INFO]     root_i2_2@task2
-> [0.000000] [sd_task/INFO] Displaying task 1@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root_i1_1@task1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [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]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root_i2_2@task2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [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]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 4
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2@task2
-> [0.000000] [sd_task/INFO]     1@task1
-> [0.000000] [sd_task/INFO]     2@task2_o2_3@task1
-> [0.000000] [sd_task/INFO]     1@task1_o1_3@task1
-> [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]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [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]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1@task1
-> [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]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2@task2
-> [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]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 4167312
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [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]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [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]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1_o3_end
-> [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
-> [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
-> [84.067138] [test/INFO] ------------------- Produce the trace file---------------------------
-> [84.067138] [test/INFO] Producing the trace of the run into smalldax.trace
-
-$ cat ${srcdir:=.}/daxload/smalldax.trace
-> [0.000000] node-0.simgrid.org compute 0.000000 # root
-> [0.016600] node-1.simgrid.org compute 42000000000.000000 # 1@task1
-> [0.016600] node-10.simgrid.org compute 42000000000.000000 # 2@task2
-> [42.033200] node-11.simgrid.org compute 42000000000.000000 # 3@task1
-> [0.000000] node-0.simgrid.org send node-1.simgrid.org 1000000.000000 # root_i1_1@task1
-> [0.016600] node-1.simgrid.org recv node-0.simgrid.org 1000000.000000 # root_i1_1@task1
-> [0.000000] node-0.simgrid.org send node-10.simgrid.org 1000000.000000 # root_i2_2@task2
-> [0.016600] node-10.simgrid.org recv node-0.simgrid.org 1000000.000000 # root_i2_2@task2
-> [42.016600] node-1.simgrid.org send node-11.simgrid.org 1000000.000000 # 1@task1_o1_3@task1
-> [42.033200] node-11.simgrid.org recv node-1.simgrid.org 1000000.000000 # 1@task1_o1_3@task1
-> [42.016600] node-10.simgrid.org send node-11.simgrid.org 1000000.000000 # 2@task2_o2_3@task1
-> [42.033200] node-11.simgrid.org recv node-10.simgrid.org 1000000.000000 # 2@task2_o2_3@task1
-> [84.033200] node-11.simgrid.org send node-0.simgrid.org 4167312.000000 # 3@task1_o3_end
-> [84.067138] node-0.simgrid.org recv node-11.simgrid.org 4167312.000000 # 3@task1_o3_end
-> [84.067138] node-0.simgrid.org compute 0.000000 # end
-
-! output ignore
-$ cmake -E remove -f ${srcdir:=.}/dax.dot ${srcdir:=.}/daxload/smalldax.trace
-
-p Test the DAX loader with a DAX comprising a cycle.
-
-! expect return 255
-$ ${bindir:=.}/daxload/sd_daxload --log=no_loc ${srcdir:=.}/../../platforms/cluster_backbone.xml ${srcdir:=.}/daxload/simple_dax_with_cycle.xml
-> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [sd_daxparse/WARNING] the task root is not marked
-> [0.000000] [sd_daxparse/WARNING] the task 1@task1 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 3@task3 is in a cycle
-> [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
-> [0.000000] [test/ERROR] A problem occurred during DAX parsing (cycle or syntax). Do not continue this test
diff --git a/examples/deprecated/simdag/scheduling/expected_output.jed b/examples/deprecated/simdag/scheduling/expected_output.jed
deleted file mode 100644 (file)
index 0228c80..0000000
+++ /dev/null
@@ -1,1252 +0,0 @@
-<jedule>
-  <platform>
-    <res name="AS0">
-      <rset id="0" nb="7" names="Host 26|Host 27|Host 28|Host 29|Host 30|Host 31|Host 32" />
-    </res>
-  </platform>
-  <events>
-    <event>
-      <prop key="name" value="root" />
-      <prop key="start" value="0" />
-      <prop key="end" value="0" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00002@mProjectPP" />
-      <prop key="start" value="0" />
-      <prop key="end" value="0.000104864" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00000@mProjectPP" />
-      <prop key="start" value="0.000104864" />
-      <prop key="end" value="0.000120474" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00003@mProjectPP" />
-      <prop key="start" value="0.000120474" />
-      <prop key="end" value="0.000325338" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00004@mProjectPP" />
-      <prop key="start" value="0.000325338" />
-      <prop key="end" value="0.000432634" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00001@mProjectPP" />
-      <prop key="start" value="0.000432634" />
-      <prop key="end" value="0.00063993" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_2mass-atlas-ID00000s-jID00000.fits_ID00000@mProjectPP" />
-      <prop key="start" value="0.000104864" />
-      <prop key="end" value="0.00859794" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_2mass-atlas-ID00002s-jID00002.fits_ID00002@mProjectPP" />
-      <prop key="start" value="0" />
-      <prop key="end" value="0.0673352" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_2mass-atlas-ID00003s-jID00003.fits_ID00003@mProjectPP" />
-      <prop key="start" value="0.000120474" />
-      <prop key="end" value="0.0675689" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_2mass-atlas-ID00004s-jID00004.fits_ID00004@mProjectPP" />
-      <prop key="start" value="0.000325338" />
-      <prop key="end" value="0.0676581" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_2mass-atlas-ID00001s-jID00001.fits_ID00001@mProjectPP" />
-      <prop key="start" value="0.000432634" />
-      <prop key="end" value="0.0678786" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP" />
-      <prop key="start" value="0.0673352" />
-      <prop key="end" value="14.5763" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00010@mDiffFit" />
-      <prop key="start" value="14.5763" />
-      <prop key="end" value="14.5763" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002_area.fits_ID00010@mDiffFit" />
-      <prop key="start" value="14.5763" />
-      <prop key="end" value="14.6429" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002.fits_ID00010@mDiffFit" />
-      <prop key="start" value="14.5763" />
-      <prop key="end" value="14.6429" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP" />
-      <prop key="start" value="0.00859794" />
-      <prop key="end" value="17.0497" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00008@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="17.0498" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002_area.fits_ID00008@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="17.0581" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002.fits_ID00008@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="17.0581" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000_area.fits_ID00008@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="17.1165" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000.fits_ID00008@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="17.1165" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP" />
-      <prop key="start" value="0.0675689" />
-      <prop key="end" value="23.0827" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP" />
-      <prop key="start" value="14.5763" />
-      <prop key="end" value="29.5414" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00013@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="29.5414" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004_area.fits_ID00013@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="29.608" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004.fits_ID00013@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="29.608" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003_area.fits_ID00013@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="29.6084" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003.fits_ID00013@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="29.6084" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00010@mDiffFit" />
-      <prop key="start" value="17.0497" />
-      <prop key="end" value="30.4255" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP" />
-      <prop key="start" value="0.0678786" />
-      <prop key="end" value="32.6207" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00009@mDiffFit" />
-      <prop key="start" value="32.6207" />
-      <prop key="end" value="32.6209" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00011@mDiffFit" />
-      <prop key="start" value="32.6209" />
-      <prop key="end" value="32.621" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00005@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.621" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00006@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.6212" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00012@mDiffFit" />
-      <prop key="start" value="32.6212" />
-      <prop key="end" value="32.6213" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00007@mDiffFit" />
-      <prop key="start" value="32.6213" />
-      <prop key="end" value="32.6216" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[2-2]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000_area.fits_ID00005@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.6294" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000.fits_ID00005@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.6294" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00006@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.6294" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00006@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.6294" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00009@mDiffFit" />
-      <prop key="start" value="32.6207" />
-      <prop key="end" value="32.6876" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00009@mDiffFit" />
-      <prop key="start" value="32.6207" />
-      <prop key="end" value="32.6876" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004_area.fits_ID00012@mDiffFit" />
-      <prop key="start" value="32.6212" />
-      <prop key="end" value="32.6878" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004.fits_ID00012@mDiffFit" />
-      <prop key="start" value="32.6212" />
-      <prop key="end" value="32.6878" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00012@mDiffFit" />
-      <prop key="start" value="32.6212" />
-      <prop key="end" value="32.6881" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[5-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00012@mDiffFit" />
-      <prop key="start" value="32.6212" />
-      <prop key="end" value="32.6881" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[5-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003_area.fits_ID00007@mDiffFit" />
-      <prop key="start" value="32.6213" />
-      <prop key="end" value="32.6882" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[2-2]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003.fits_ID00007@mDiffFit" />
-      <prop key="start" value="32.6213" />
-      <prop key="end" value="32.6882" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[2-2]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002_area.fits_ID00009@mDiffFit" />
-      <prop key="start" value="32.6207" />
-      <prop key="end" value="32.7536" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002.fits_ID00009@mDiffFit" />
-      <prop key="start" value="32.6207" />
-      <prop key="end" value="32.7536" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003_area.fits_ID00011@mDiffFit" />
-      <prop key="start" value="32.6209" />
-      <prop key="end" value="32.7541" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003.fits_ID00011@mDiffFit" />
-      <prop key="start" value="32.6209" />
-      <prop key="end" value="32.7541" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00011@mDiffFit" />
-      <prop key="start" value="32.6209" />
-      <prop key="end" value="32.7542" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00011@mDiffFit" />
-      <prop key="start" value="32.6209" />
-      <prop key="end" value="32.7542" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000_area.fits_ID00006@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000.fits_ID00006@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00007@mDiffFit" />
-      <prop key="start" value="32.6213" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[2-2]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00007@mDiffFit" />
-      <prop key="start" value="32.6213" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[2-2]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00005@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00005@mDiffFit" />
-      <prop key="start" value="32.621" />
-      <prop key="end" value="32.7546" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00008@mDiffFit" />
-      <prop key="start" value="29.5414" />
-      <prop key="end" value="41.2811" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00013@mDiffFit" />
-      <prop key="start" value="30.4255" />
-      <prop key="end" value="43.6231" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00009@mDiffFit" />
-      <prop key="start" value="32.7536" />
-      <prop key="end" value="50.5058" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00011@mDiffFit" />
-      <prop key="start" value="41.2811" />
-      <prop key="end" value="52.695" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00005@mDiffFit" />
-      <prop key="start" value="43.6231" />
-      <prop key="end" value="57.1007" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00006@mDiffFit" />
-      <prop key="start" value="32.7546" />
-      <prop key="end" value="57.6812" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00012@mDiffFit" />
-      <prop key="start" value="32.6881" />
-      <prop key="end" value="57.8331" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00007@mDiffFit" />
-      <prop key="start" value="32.7546" />
-      <prop key="end" value="60.4112" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[2-2]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00008@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4112" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00011@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4112" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00012@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00009@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_fits_list.tbl_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00005@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00010@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00013@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4113" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00006@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4114" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00007@mDiffFit_fit.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4114" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-2]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00008@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.412" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00011@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.412" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00009@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4145" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00012@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4145" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[5-5]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00006@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4179" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00007@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4179" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-2]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00005@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4211" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00010@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4211" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00013@mDiffFit_diff.txt_ID00014@mConcatFit" />
-      <prop key="start" value="60.4112" />
-      <prop key="end" value="60.4211" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00014@mConcatFit" />
-      <prop key="start" value="60.4211" />
-      <prop key="end" value="61.203" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00014@mConcatFit_fits.tbl_ID00015@mBgModel" />
-      <prop key="start" value="61.203" />
-      <prop key="end" value="61.203" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_pimages.tbl_ID00015@mBgModel" />
-      <prop key="start" value="61.203" />
-      <prop key="end" value="61.2031" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel" />
-      <prop key="start" value="61.2031" />
-      <prop key="end" value="62.7452" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel_corrections.tbl_ID00016@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.7452" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel_corrections.tbl_ID00017@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.7453" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel_corrections.tbl_ID00020@mBackground" />
-      <prop key="start" value="62.7453" />
-      <prop key="end" value="62.7454" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel_corrections.tbl_ID00018@mBackground" />
-      <prop key="start" value="62.7454" />
-      <prop key="end" value="62.7455" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00015@mBgModel_corrections.tbl_ID00019@mBackground" />
-      <prop key="start" value="62.7455" />
-      <prop key="end" value="62.7457" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002_area.fits_ID00018@mBackground" />
-      <prop key="start" value="62.7454" />
-      <prop key="end" value="62.7538" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00002@mProjectPP_p2mass-atlas-ID00002s-jID00002.fits_ID00018@mBackground" />
-      <prop key="start" value="62.7454" />
-      <prop key="end" value="62.7538" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004_area.fits_ID00020@mBackground" />
-      <prop key="start" value="62.7453" />
-      <prop key="end" value="62.8119" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00004@mProjectPP_p2mass-atlas-ID00004s-jID00004.fits_ID00020@mBackground" />
-      <prop key="start" value="62.7453" />
-      <prop key="end" value="62.8119" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000_area.fits_ID00016@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.812" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00000@mProjectPP_p2mass-atlas-ID00000s-jID00000.fits_ID00016@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.812" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001_area.fits_ID00017@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.8122" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00001@mProjectPP_p2mass-atlas-ID00001s-jID00001.fits_ID00017@mBackground" />
-      <prop key="start" value="62.7452" />
-      <prop key="end" value="62.8122" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003_area.fits_ID00019@mBackground" />
-      <prop key="start" value="62.7455" />
-      <prop key="end" value="62.8123" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00003@mProjectPP_p2mass-atlas-ID00003s-jID00003.fits_ID00019@mBackground" />
-      <prop key="start" value="62.7455" />
-      <prop key="end" value="62.8123" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00016@mBackground" />
-      <prop key="start" value="62.812" />
-      <prop key="end" value="74.0956" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00017@mBackground" />
-      <prop key="start" value="62.8122" />
-      <prop key="end" value="76.3534" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-0]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00020@mBackground" />
-      <prop key="start" value="62.8119" />
-      <prop key="end" value="81.021" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00018@mBackground" />
-      <prop key="start" value="74.0956" />
-      <prop key="end" value="85.857" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00019@mBackground" />
-      <prop key="start" value="62.8123" />
-      <prop key="end" value="88.5392" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_cimages.tbl_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.5393" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00016@mBackground_c2mass-atlas-ID00000s-jID00000.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.5476" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00016@mBackground_c2mass-atlas-ID00000s-jID00000_area.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.5476" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00018@mBackground_c2mass-atlas-ID00002s-jID00002.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.5476" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00018@mBackground_c2mass-atlas-ID00002s-jID00002_area.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.5476" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00020@mBackground_c2mass-atlas-ID00004s-jID00004.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6058" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00020@mBackground_c2mass-atlas-ID00004s-jID00004_area.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6058" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[4-4]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00017@mBackground_c2mass-atlas-ID00001s-jID00001.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6059" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00017@mBackground_c2mass-atlas-ID00001s-jID00001_area.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6059" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00019@mBackground_c2mass-atlas-ID00003s-jID00003_area.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6061" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00019@mBackground_c2mass-atlas-ID00003s-jID00003.fits_ID00021@mImgTbl" />
-      <prop key="start" value="88.5392" />
-      <prop key="end" value="88.6061" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-        <select resources="0.[6-6]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00021@mImgTbl" />
-      <prop key="start" value="88.6061" />
-      <prop key="end" value="90.1157" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00021@mImgTbl_newcimages.tbl_ID00022@mAdd" />
-      <prop key="start" value="90.1157" />
-      <prop key="end" value="90.1157" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="root_region.hdr_ID00022@mAdd" />
-      <prop key="start" value="90.1157" />
-      <prop key="end" value="90.1158" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[0-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00022@mAdd" />
-      <prop key="start" value="90.1158" />
-      <prop key="end" value="93.4064" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00022@mAdd_mosaic_ID00022_ID00022.fits_ID00023@mShrink" />
-      <prop key="start" value="93.4064" />
-      <prop key="end" value="93.4998" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00022@mAdd_mosaic_ID00022_ID00022_area.fits_ID00023@mShrink" />
-      <prop key="start" value="93.4064" />
-      <prop key="end" value="93.4998" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00023@mShrink" />
-      <prop key="start" value="93.4998" />
-      <prop key="end" value="97.6917" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00023@mShrink_shrunken_ID00023_ID00023.fits_ID00024@mJPEG" />
-      <prop key="start" value="97.6917" />
-      <prop key="end" value="97.6955" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00024@mJPEG" />
-      <prop key="start" value="97.6955" />
-      <prop key="end" value="98.1842" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="ID00024@mJPEG_shrunken_ID00023_ID00023.jpg_end" />
-      <prop key="start" value="98.1842" />
-      <prop key="end" value="98.1846" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-    <event>
-      <prop key="name" value="end" />
-      <prop key="start" value="98.1846" />
-      <prop key="end" value="98.1846" />
-      <prop key="type" value="SD" />
-      <res_util>
-        <select resources="0.[1-1]" />
-      </res_util>
-    </event>
-  </events>
-</jedule>
diff --git a/examples/deprecated/simdag/scheduling/sd_scheduling.c b/examples/deprecated/simdag/scheduling/sd_scheduling.c
deleted file mode 100644 (file)
index 8c64253..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/* Copyright (c) 2009-2021. 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. */
-
-/* simple test to schedule a DAX file with the Min-Min algorithm.           */
-#include "simgrid/simdag.h"
-#include <math.h>
-#include <string.h>
-
-#if SIMGRID_HAVE_JEDULE
-#include "simgrid/jedule/jedule_sd_binding.h"
-#endif
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example");
-
-typedef struct _HostAttribute *HostAttribute;
-struct _HostAttribute {
-  /* Earliest time at which a host is ready to execute a task */
-  double available_at;
-  SD_task_t last_scheduled_task;
-};
-
-static double sg_host_get_available_at(const_sg_host_t host)
-{
-  const struct _HostAttribute* attr = (HostAttribute)sg_host_get_data(host);
-  return attr->available_at;
-}
-
-static void sg_host_set_available_at(sg_host_t host, double time)
-{
-  HostAttribute attr = (HostAttribute)sg_host_get_data(host);
-  attr->available_at = time;
-  sg_host_set_data(host, attr);
-}
-
-static SD_task_t sg_host_get_last_scheduled_task(const_sg_host_t host)
-{
-  const struct _HostAttribute* attr = (HostAttribute)sg_host_get_data(host);
-  return attr->last_scheduled_task;
-}
-
-static void sg_host_set_last_scheduled_task(sg_host_t host, SD_task_t task){
-  HostAttribute attr       = (HostAttribute)sg_host_get_data(host);
-  attr->last_scheduled_task=task;
-  sg_host_set_data(host, attr);
-}
-
-static xbt_dynar_t get_ready_tasks(const_xbt_dynar_t dax)
-{
-  unsigned int i;
-  xbt_dynar_t ready_tasks;
-  SD_task_t task;
-
-  ready_tasks = xbt_dynar_new(sizeof(SD_task_t), NULL);
-  xbt_dynar_foreach(dax, i, task) {
-    if (SD_task_get_kind(task) == SD_TASK_COMP_SEQ && SD_task_get_state(task) == SD_SCHEDULABLE) {
-      xbt_dynar_push(ready_tasks, &task);
-    }
-  }
-  XBT_DEBUG("There are %lu ready tasks", xbt_dynar_length(ready_tasks));
-
-  return ready_tasks;
-}
-
-static double finish_on_at(const_SD_task_t task, const_sg_host_t host)
-{
-  double result;
-
-  xbt_dynar_t parents = SD_task_get_parents(task);
-
-  if (!xbt_dynar_is_empty(parents)) {
-    unsigned int i;
-    double data_available = 0.;
-    double last_data_available;
-    /* compute last_data_available */
-    SD_task_t parent;
-    last_data_available = -1.0;
-    xbt_dynar_foreach(parents, i, parent) {
-      /* normal case */
-      if (SD_task_get_kind(parent) == SD_TASK_COMM_E2E) {
-        sg_host_t * parent_host= SD_task_get_workstation_list(parent);
-        /* Estimate the redistribution time from this parent */
-        double redist_time;
-        if (SD_task_get_amount(parent) <= 1e-6){
-          redist_time= 0;
-        } else {
-          redist_time = sg_host_get_route_latency(parent_host[0], host) +
-                        SD_task_get_amount(parent) / sg_host_get_route_bandwidth(parent_host[0], host);
-        }
-        data_available = SD_task_get_start_time(parent) + redist_time;
-      }
-
-      /* no transfer, control dependency */
-      if (SD_task_get_kind(parent) == SD_TASK_COMP_SEQ) {
-        data_available = SD_task_get_finish_time(parent);
-      }
-
-      if (last_data_available < data_available)
-        last_data_available = data_available;
-    }
-
-    xbt_dynar_free_container(&parents);
-
-    result =
-        fmax(sg_host_get_available_at(host), last_data_available) + SD_task_get_amount(task) / sg_host_get_speed(host);
-  } else {
-    xbt_dynar_free_container(&parents);
-
-    result = sg_host_get_available_at(host) + SD_task_get_amount(task) / sg_host_get_speed(host);
-  }
-  return result;
-}
-
-static sg_host_t SD_task_get_best_host(const_SD_task_t task)
-{
-  sg_host_t *hosts = sg_host_list();
-  int nhosts = sg_host_count();
-  sg_host_t best_host = hosts[0];
-  double min_EFT = finish_on_at(task, hosts[0]);
-
-  for (int i = 1; i < nhosts; i++) {
-    double EFT = finish_on_at(task, hosts[i]);
-    XBT_DEBUG("%s finishes on %s at %f", SD_task_get_name(task), sg_host_get_name(hosts[i]), EFT);
-
-    if (EFT < min_EFT) {
-      min_EFT = EFT;
-      best_host = hosts[i];
-    }
-  }
-  xbt_free(hosts);
-  return best_host;
-}
-
-int main(int argc, char **argv)
-{
-  unsigned int cursor;
-  double min_finish_time = -1.0;
-  SD_task_t task;
-  SD_task_t selected_task = NULL;
-  xbt_dynar_t ready_tasks;
-  sg_host_t selected_host = NULL;
-  char * tracefilename = NULL;
-
-  /* initialization of SD */
-  SD_init(&argc, argv);
-
-  /* Check our arguments */
-  xbt_assert(argc > 2, "Usage: %s platform_file dax_file [jedule_file]\n"
-             "\tExample: %s simulacrum_7_hosts.xml Montage_25.xml Montage_25.jed", argv[0], argv[0]);
-
-  if (argc == 4)
-    tracefilename = xbt_strdup(argv[3]);
-
-  /* creation of the environment */
-  SD_create_environment(argv[1]);
-
-  /*  Allocating the host attribute */
-  unsigned int total_nhosts = sg_host_count();
-  sg_host_t *hosts = sg_host_list();
-
-  for (cursor = 0; cursor < total_nhosts; cursor++)
-    sg_host_set_data(hosts[cursor], xbt_new0(struct _HostAttribute, 1));
-
-  /* load the DAX file */
-  xbt_dynar_t dax = SD_daxload(argv[2]);
-
-  xbt_dynar_foreach(dax, cursor, task) {
-    SD_task_watch(task, SD_DONE);
-  }
-
-  /* Schedule the root first */
-  xbt_dynar_get_cpy(dax, 0, &task);
-  sg_host_t host = SD_task_get_best_host(task);
-  SD_task_schedulel(task, 1, host);
-  xbt_dynar_t changed_tasks = xbt_dynar_new(sizeof(SD_task_t), NULL);
-  SD_simulate_with_update(-1.0, changed_tasks);
-
-  while (!xbt_dynar_is_empty(changed_tasks)) {
-    /* Get the set of ready tasks */
-    ready_tasks = get_ready_tasks(dax);
-    xbt_dynar_reset(changed_tasks);
-
-    if (xbt_dynar_is_empty(ready_tasks)) {
-      xbt_dynar_free_container(&ready_tasks);
-      /* there is no ready task, let advance the simulation */
-      SD_simulate_with_update(-1.0, changed_tasks);
-      continue;
-    }
-    /* For each ready task:
-     * get the host that minimizes the completion time.
-     * select the task that has the minimum completion time on its best host.
-     */
-    xbt_dynar_foreach(ready_tasks, cursor, task) {
-      XBT_DEBUG("%s is ready", SD_task_get_name(task));
-      host = SD_task_get_best_host(task);
-      double finish_time = finish_on_at(task, host);
-      if (min_finish_time < 0 || finish_time < min_finish_time) {
-        min_finish_time = finish_time;
-        selected_task = task;
-        selected_host = host;
-      }
-    }
-
-    XBT_INFO("Schedule %s on %s", SD_task_get_name(selected_task), sg_host_get_name(selected_host));
-    SD_task_schedulel(selected_task, 1, selected_host);
-
-    /*
-     * SimDag allows tasks to be executed concurrently when they can by default.
-     * Yet schedulers take decisions assuming that tasks wait for resource availability to start.
-     * The solution (well crude hack is to keep track of the last task scheduled on a host and add a special type of
-     * dependency if needed to force the sequential execution meant by the scheduler.
-     * If the last scheduled task is already done, has failed or is a predecessor of the current task, no need for a
-     * new dependency
-    */
-
-    SD_task_t last_scheduled_task = sg_host_get_last_scheduled_task(selected_host);
-    if (last_scheduled_task && (SD_task_get_state(last_scheduled_task) != SD_DONE) &&
-        (SD_task_get_state(last_scheduled_task) != SD_FAILED) &&
-        !SD_task_dependency_exists(sg_host_get_last_scheduled_task(selected_host), selected_task))
-      SD_task_dependency_add(last_scheduled_task, selected_task);
-
-    sg_host_set_last_scheduled_task(selected_host, selected_task);
-    sg_host_set_available_at(selected_host, min_finish_time);
-
-    xbt_dynar_free_container(&ready_tasks);
-    /* reset the min_finish_time for the next set of ready tasks */
-    min_finish_time = -1.;
-    xbt_dynar_reset(changed_tasks);
-    SD_simulate_with_update(-1.0, changed_tasks);
-  }
-
-  XBT_INFO("Simulation Time: %f", simgrid_get_clock());
-  XBT_INFO("------------------- Produce the trace file---------------------------");
-  XBT_INFO("Producing a jedule output (if active) of the run into %s", tracefilename?tracefilename:"minmin_test.jed");
-#if SIMGRID_HAVE_JEDULE
-  jedule_sd_dump(tracefilename);
-#endif
-  free(tracefilename);
-
-  xbt_dynar_free_container(&ready_tasks);
-  xbt_dynar_free(&changed_tasks);
-
-  xbt_dynar_foreach(dax, cursor, task) {
-    SD_task_destroy(task);
-  }
-  xbt_dynar_free_container(&dax);
-
-  for (cursor = 0; cursor < total_nhosts; cursor++) {
-    free(sg_host_get_data(hosts[cursor]));
-    sg_host_set_data(hosts[cursor], NULL);
-  }
-
-  xbt_free(hosts);
-  return 0;
-}
diff --git a/examples/deprecated/simdag/scheduling/sd_scheduling.tesh b/examples/deprecated/simdag/scheduling/sd_scheduling.tesh
deleted file mode 100644 (file)
index c2353d7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env tesh
-
-p Simple test of simdag
-
-$ ${bindir:=.}/scheduling/sd_scheduling --log=sd_daxparse.thresh:critical ${srcdir:=.}/../../platforms/simulacrum_7_hosts.xml ${srcdir:=.}/scheduling/Montage_25.xml
-> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [test/INFO] Schedule ID00002@mProjectPP on Host 27
-> [0.000105] [test/INFO] Schedule ID00000@mProjectPP on Host 26
-> [0.000105] [test/INFO] Schedule ID00003@mProjectPP on Host 30
-> [0.000310] [test/INFO] Schedule ID00004@mProjectPP on Host 27
-> [0.000417] [test/INFO] Schedule ID00001@mProjectPP on Host 32
-> [14.576327] [test/INFO] Schedule ID00010@mDiffFit on Host 26
-> [17.041620] [test/INFO] Schedule ID00008@mDiffFit on Host 27
-> [29.541425] [test/INFO] Schedule ID00013@mDiffFit on Host 26
-> [32.620694] [test/INFO] Schedule ID00009@mDiffFit on Host 30
-> [32.620897] [test/INFO] Schedule ID00011@mDiffFit on Host 27
-> [32.620999] [test/INFO] Schedule ID00005@mDiffFit on Host 26
-> [32.620999] [test/INFO] Schedule ID00006@mDiffFit on Host 32
-> [32.621211] [test/INFO] Schedule ID00012@mDiffFit on Host 31
-> [32.621314] [test/INFO] Schedule ID00007@mDiffFit on Host 28
-> [60.411150] [test/INFO] Schedule ID00014@mConcatFit on Host 27
-> [61.202981] [test/INFO] Schedule ID00015@mBgModel on Host 27
-> [62.745210] [test/INFO] Schedule ID00016@mBackground on Host 27
-> [62.745210] [test/INFO] Schedule ID00017@mBackground on Host 26
-> [62.745316] [test/INFO] Schedule ID00020@mBackground on Host 30
-> [62.745423] [test/INFO] Schedule ID00018@mBackground on Host 27
-> [62.745423] [test/INFO] Schedule ID00019@mBackground on Host 32
-> [88.539165] [test/INFO] Schedule ID00021@mImgTbl on Host 27
-> [90.115640] [test/INFO] Schedule ID00022@mAdd on Host 27
-> [93.406326] [test/INFO] Schedule ID00023@mShrink on Host 27
-> [97.602942] [test/INFO] Schedule ID00024@mJPEG on Host 27
-> [98.091829] [test/INFO] Schedule end on Host 27
-> [98.091849] [test/INFO] Simulation Time: 98.091849
-> [98.091849] [test/INFO] ------------------- Produce the trace file---------------------------
-> [98.091849] [test/INFO] Producing a jedule output (if active) of the run into minmin_test.jed
-
-
-! output ignore
-$ cmake -E remove -f ${srcdir:=.}/scheduling/sd_scheduling.jed
diff --git a/examples/platforms/cluster_backbone.svg b/examples/platforms/cluster_backbone.svg
new file mode 100644 (file)
index 0000000..a7cb48d
--- /dev/null
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="29.855295mm"
+   height="29.063147mm"
+   viewBox="0 0 29.855297 29.063145"
+   version="1.1"
+   id="svg8"
+   inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+   sodipodi:docname="cluster_backbone.svg"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <defs
+     id="defs2">
+    <rect
+       x="90.377945"
+       y="-29.622009"
+       width="20"
+       height="15"
+       id="rect8879" />
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1933"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       effect="powerstroke"
+       id="path-effect1302"
+       is_visible="true"
+       offset_points="0,0.13229166"
+       sort_points="true"
+       interpolator_type="CubicBezierJohan"
+       interpolator_beta="0.2"
+       start_linecap_type="zerowidth"
+       linejoin_type="extrp_arc"
+       miter_limit="4"
+       end_linecap_type="zerowidth"
+       lpeversion="0"
+       not_jump="false"
+       scale_width="1" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect1300"
+       is_visible="true"
+       lpeversion="0" />
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-6"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-7"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-2"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-2"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-5"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-3"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-28"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-6"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-25"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-30"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-4"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-8"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1933-4"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8-3"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1933-4-6"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-25-0"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-30-2"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.1891638"
+     inkscape:cx="-8.4507154"
+     inkscape:cy="-31.062089"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     showguides="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1023"
+     inkscape:window-x="0"
+     inkscape:window-y="33"
+     inkscape:window-maximized="1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:pagecheckerboard="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid815"
+       originx="-9.1604202"
+       originy="-362.17001" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata5">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-9.1604177,-56.519543)">
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-9"
+       d="m 18.520831,70.057843 10e-7,9.260404"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-9-6"
+       d="m 21.204021,60.519662 10e-7,9.260404"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0"
+       d="m 11.906248,70.057843 1e-6,9.260398"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-3"
+       d="M 30.324435,69.671791 H 10.567433"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-5"
+       d="M 29.104165,70.057843 V 79.31826"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <circle
+       r="2.6458333"
+       cy="79.177658"
+       cx="11.906251"
+       id="path834-9-5"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <circle
+       r="2.6458333"
+       cy="79.177658"
+       cx="18.520832"
+       id="path834-2-1"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <circle
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="path834-2-1-7"
+       cx="29.130888"
+       cy="79.473244"
+       r="2.6458333" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.64444px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="51.593746"
+       y="38.307831"
+       id="text1136"><tspan
+         sodipodi:role="line"
+         id="tspan1134"
+         x="51.593746"
+         y="38.307831"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583px" /></text>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1060"
+       style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
+       transform="translate(-2.645835,29.703665)"><flowRegion
+         id="flowRegion1062"><rect
+           id="rect1064"
+           width="252.33426"
+           height="299.23923"
+           x="-46.95631"
+           y="-219.23924" /></flowRegion><flowPara
+         id="flowPara1066" /></flowRoot>
+    <text
+       xml:space="preserve"
+       transform="matrix(0.26458333,0,0,0.26458333,9.1604177,63.343237)"
+       id="text8877"
+       style="font-weight:bold;font-size:53.3333px;line-height:64.0001px;font-family:serif;-inkscape-font-specification:'serif Bold';text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect8879);fill:#000000;stroke:#000000;stroke-width:0.999999px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000" />
+    <text
+       xml:space="preserve"
+       style="font-weight:bold;font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:'serif Bold';text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="22.103201"
+       y="79.406593"
+       id="text14847"><tspan
+         sodipodi:role="line"
+         style="stroke-width:0.264583px"
+         x="22.103201"
+         y="79.406593"
+         id="tspan14849">...</tspan></text>
+    <rect
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect821-4"
+       width="5.2916665"
+       height="5.2916665"
+       x="18.520832"
+       y="59.474514" />
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="21.640411"
+       y="68.453323"
+       id="text6237"><tspan
+         sodipodi:role="line"
+         id="tspan6235"
+         style="stroke:none;stroke-width:0.264583px"
+         x="21.640411"
+         y="68.453323">Backbone</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="29.889496"
+       y="74.204445"
+       id="text7391"><tspan
+         sodipodi:role="line"
+         id="tspan7389"
+         style="stroke:none;stroke-width:0.264583px"
+         x="29.889496"
+         y="74.204445">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan14739">n</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="19.100447"
+       y="74.204445"
+       id="text7391-7"><tspan
+         sodipodi:role="line"
+         id="tspan7389-5"
+         style="stroke:none;stroke-width:0.264583px"
+         x="19.100447"
+         y="74.204445">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan18162">2</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="12.289496"
+       y="74.204445"
+       id="text7391-5"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6"
+         style="stroke:none;stroke-width:0.264583px"
+         x="12.289496"
+         y="74.204445">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788">1</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="10.292629"
+       y="84.877136"
+       id="text7391-5-9"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1"
+         style="stroke:none;stroke-width:0.264583px"
+         x="10.292629"
+         y="84.877136">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2">1</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="16.739195"
+       y="84.877136"
+       id="text7391-5-9-3"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-6"
+         style="stroke:none;stroke-width:0.264583px"
+         x="16.739195"
+         y="84.877136">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2-0">2</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="27.490547"
+       y="84.877136"
+       id="text7391-5-9-6"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-2"
+         style="stroke:none;stroke-width:0.264583px"
+         x="27.490547"
+         y="84.877136">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2-6">n</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="14.954734"
+       y="59.091301"
+       id="text7391-5-9-6-1"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-2-8"
+         style="stroke:none;stroke-width:0.264583px"
+         x="14.954734"
+         y="59.091301">Router</tspan></text>
+  </g>
+</svg>
diff --git a/examples/platforms/cluster_crossbar.svg b/examples/platforms/cluster_crossbar.svg
new file mode 100644 (file)
index 0000000..1d91e48
--- /dev/null
@@ -0,0 +1,431 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="22.954163mm"
+   height="30.653582mm"
+   viewBox="0 0 22.954164 30.65358"
+   version="1.1"
+   id="svg8"
+   inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+   sodipodi:docname="cluster_crossbar.svg"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <defs
+     id="defs2">
+    <rect
+       x="90.377945"
+       y="-29.622009"
+       width="20"
+       height="15"
+       id="rect8879" />
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1933"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       effect="powerstroke"
+       id="path-effect1302"
+       is_visible="true"
+       offset_points="0,0.13229166"
+       sort_points="true"
+       interpolator_type="CubicBezierJohan"
+       interpolator_beta="0.2"
+       start_linecap_type="zerowidth"
+       linejoin_type="extrp_arc"
+       miter_limit="4"
+       end_linecap_type="zerowidth"
+       lpeversion="0"
+       not_jump="false"
+       scale_width="1" />
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect1300"
+       is_visible="true"
+       lpeversion="0" />
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-6"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-7"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-2"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-2"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-5"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1191-3"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-28"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-6"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-25"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-30"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-4"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-8"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1933-4"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mstart"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Mstart-8-3"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path1933-4-6"
+         d="M 0,0 5,-5 -12.5,0 5,5 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="matrix(0.4,0,0,0.4,4,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend-25-0"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path1191-30-2"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.5859181"
+     inkscape:cx="57.426414"
+     inkscape:cy="-11.601296"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     showguides="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1023"
+     inkscape:window-x="0"
+     inkscape:window-y="33"
+     inkscape:window-maximized="1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:pagecheckerboard="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid815"
+       originx="-9.1604204"
+       originy="-361.19916" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata5">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-9.1604177,-55.548683)">
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-9"
+       d="M 22.754166,63.443249 18.520832,79.318247"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0"
+       d="M 22.754165,63.443247 11.906249,79.318241"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path967-0-5"
+       d="m 22.754165,63.443253 6.614584,15.874994"
+       style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       sodipodi:nodetypes="cc" />
+    <circle
+       r="2.6458333"
+       cy="79.177658"
+       cx="11.906251"
+       id="path834-9-5"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <circle
+       r="2.6458333"
+       cy="79.177658"
+       cx="18.520832"
+       id="path834-2-1"
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+    <circle
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="path834-2-1-7"
+       cx="29.368748"
+       cy="79.442253"
+       r="2.6458333" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.64444px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="51.593746"
+       y="38.307831"
+       id="text1136"><tspan
+         sodipodi:role="line"
+         id="tspan1134"
+         x="51.593746"
+         y="38.307831"
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583px" /></text>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot1060"
+       style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
+       transform="translate(-2.645835,29.703665)"><flowRegion
+         id="flowRegion1062"><rect
+           id="rect1064"
+           width="252.33426"
+           height="299.23923"
+           x="-46.95631"
+           y="-219.23924" /></flowRegion><flowPara
+         id="flowPara1066" /></flowRoot>
+    <text
+       xml:space="preserve"
+       transform="matrix(0.26458333,0,0,0.26458333,9.1604177,63.343237)"
+       id="text8877"
+       style="font-weight:bold;font-size:53.3333px;line-height:64.0001px;font-family:serif;-inkscape-font-specification:'serif Bold';text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect8879);fill:#000000;stroke:#000000;stroke-width:0.999999px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000" />
+    <text
+       xml:space="preserve"
+       style="font-weight:bold;font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:'serif Bold';text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="22.103201"
+       y="79.406593"
+       id="text14847"><tspan
+         sodipodi:role="line"
+         style="stroke-width:0.264583px"
+         x="22.103201"
+         y="79.406593"
+         id="tspan14849">...</tspan></text>
+    <rect
+       style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#828282;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.95053;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect821-4"
+       width="5.2916665"
+       height="5.2916665"
+       x="20.108334"
+       y="59.2099" />
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="26.159363"
+       y="70.243706"
+       id="text7391"><tspan
+         sodipodi:role="line"
+         id="tspan7389"
+         style="stroke:none;stroke-width:0.264583px"
+         x="26.159363"
+         y="70.243706">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan14739">n</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="20.668068"
+       y="73.314293"
+       id="text7391-7"><tspan
+         sodipodi:role="line"
+         id="tspan7389-5"
+         style="stroke:none;stroke-width:0.264583px"
+         x="20.668068"
+         y="73.314293">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan18162">2</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="13.304093"
+       y="70.710693"
+       id="text7391-5"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6"
+         style="stroke:none;stroke-width:0.264583px"
+         x="13.304093"
+         y="70.710693">L<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788">1</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="10.347633"
+       y="85.496712"
+       id="text7391-5-9"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1"
+         style="stroke:none;stroke-width:0.264583px"
+         x="10.347633"
+         y="85.496712">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2">1</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="16.794199"
+       y="85.496712"
+       id="text7391-5-9-3"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-6"
+         style="stroke:none;stroke-width:0.264583px"
+         x="16.794199"
+         y="85.496712">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2-0">2</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="27.545551"
+       y="85.496712"
+       id="text7391-5-9-6"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-2"
+         style="stroke:none;stroke-width:0.264583px"
+         x="27.545551"
+         y="85.496712">H<tspan
+   style="font-size:65%;baseline-shift:sub"
+   id="tspan20788-2-6">n</tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:3.52777px;line-height:4.23333px;font-family:serif;-inkscape-font-specification:serif;text-decoration:none;text-decoration-line:none;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stop-color:#000000"
+       x="16.479395"
+       y="58.120441"
+       id="text7391-5-9-6-1"><tspan
+         sodipodi:role="line"
+         id="tspan7389-6-1-2-8"
+         style="stroke:none;stroke-width:0.264583px"
+         x="16.479395"
+         y="58.120441">Router</tspan></text>
+  </g>
+</svg>
index 9d79f9d..983b23b 100644 (file)
@@ -17,7 +17,7 @@
   -->
   <zone id="world" routing="Full">
     <cluster id="cluster-crossbar"
-             prefix="node-" radical="0-65536" suffix=".simgrid.org"
+             prefix="node-" radical="0-65535" suffix=".simgrid.org"
             speed="1Gf" bw="125MBps" lat="50us"/>
   </zone>
 </platform>
index cb0f3c1..337da86 100644 (file)
@@ -3,7 +3,7 @@
 # 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.
 
-from simgrid import Engine, this_actor
+from simgrid import Actor, Engine, Host, this_actor
 import sys
 
 # This example does not much: It just spans over-polite actor that yield a large amount
@@ -15,27 +15,17 @@ import sys
 # It can also be used to benchmark our context-switching mechanism.
 
 
-class Yielder:
-    """Main function of the Yielder actor"""
-    number_of_yields = 0
-
-    def __init__(self, *args):
-        self.number_of_yields = int(args[0])
-
-    def __call__(self):
-        for _ in range(self.number_of_yields):
-            this_actor.yield_()
-        this_actor.info("I yielded {:d} times. Goodbye now!".format(
-            self.number_of_yields))
-
+def yielder (number_of_yields):
+    for _ in range(number_of_yields):
+        this_actor.yield_()
+    this_actor.info("I yielded {:d} times. Goodbye now!".format(number_of_yields))
 
 if __name__ == '__main__':
     e = Engine(sys.argv)
 
     e.load_platform(sys.argv[1])             # Load the platform description
-    # Register the class representing the actors
-    e.register_actor("yielder", Yielder)
-
-    e.load_deployment(sys.argv[2])
+  
+    Actor.create("yielder", Host.by_name("Tremblay"), yielder, 10)
+    Actor.create("yielder", Host.by_name("Ruby"), yielder, 15)
 
     e.run()  # - Run the simulation
index 7348d31..8a6e0d3 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env tesh
 
-$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${srcdir:=.}/actor-yield.py ${platfdir}/small_platform_fatpipe.xml ${srcdir:=.}/../../cpp/actor-yield/s4u-actor-yield_d.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${srcdir:=.}/actor-yield.py ${platfdir}/small_platform_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (1:yielder@Tremblay) I yielded 10 times. Goodbye now!
 > [  0.000000] (2:yielder@Ruby) I yielded 15 times. Goodbye now!
index 3d4aa54..32e11df 100644 (file)
@@ -11,8 +11,6 @@
 
 /* Was MSG compiled in?  */
 #cmakedefine01 SIMGRID_HAVE_MSG
-/* Was Jedule compiled in?  */
-#cmakedefine01 SIMGRID_HAVE_JEDULE
 /* Was the Lua support compiled in? */
 #cmakedefine01 SIMGRID_HAVE_LUA
 /* Were mallocators (object pools) compiled in? */
diff --git a/include/simgrid/jedule/jedule.hpp b/include/simgrid/jedule/jedule.hpp
deleted file mode 100644 (file)
index d89c9a3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (c) 2010-2021. 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. */
-
-#ifndef JEDULE_HPP_
-#define JEDULE_HPP_
-
-#include <simgrid/jedule/jedule_events.hpp>
-#include <simgrid/jedule/jedule_platform.hpp>
-#include <simgrid/s4u/Engine.hpp>
-
-#include <cstdio>
-
-namespace simgrid {
-namespace jedule{
-
-class XBT_PUBLIC Jedule {
-  std::unordered_map<char*, char*> meta_info_;
-  std::vector<Event> event_set_;
-  Container root_container_;
-
-public:
-  explicit Jedule(const std::string& name) : root_container_(name)
-  {
-    root_container_.create_hierarchy(s4u::Engine::get_instance()->get_netzone_root());
-  }
-  void add_meta_info(char* key, char* value);
-  void add_event(const Event& event);
-  void cleanup_output();
-  void write_output(FILE* file);
-};
-
-} // namespace jedule
-} // namespace simgrid
-
-using jedule_t = simgrid::jedule::Jedule*;
-
-#endif /* JEDULE_HPP_ */
diff --git a/include/simgrid/jedule/jedule_events.hpp b/include/simgrid/jedule/jedule_events.hpp
deleted file mode 100644 (file)
index 413ebea..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) 2010-2021. 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. */
-
-#ifndef JEDULE_EVENTS_H_
-#define JEDULE_EVENTS_H_
-
-#include <simgrid/jedule/jedule_platform.hpp>
-
-#include <simgrid/forward.h>
-
-#include <vector>
-#include <string>
-#include <unordered_map>
-
-namespace simgrid {
-namespace jedule{
-
-class XBT_PUBLIC Event {
-public:
-  Event(const std::string& name, double start_time, double end_time, const std::string& type)
-      : name_(name), start_time_(start_time), end_time_(end_time), type_(type)
-  {
-  }
-  void add_characteristic(const char* characteristic);
-  void add_resources(const std::vector<sg_host_t>& host_selection);
-  void add_info(char* key, char* value);
-  void print(FILE* file) const;
-
-private:
-  std::string name_;
-  double start_time_;
-  double end_time_;
-  std::string type_;
-  std::vector<Subset> resource_subsets_;
-  std::vector<std::string> characteristics_list_;         /* just a list of names */
-  std::unordered_map<std::string, std::string> info_map_; /* key/value pairs */
-};
-}
-}
-
-using jed_event_t = simgrid::jedule::Event*;
-
-#endif /* JEDULE_EVENTS_H_ */
diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp
deleted file mode 100644 (file)
index 945f561..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (c) 2010-2021. 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. */
-
-#ifndef JED_SIMGRID_PLATFORM_H_
-#define JED_SIMGRID_PLATFORM_H_
-
-#include <simgrid/forward.h>
-
-#include <memory>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-namespace simgrid {
-namespace jedule{
-class XBT_PUBLIC Container {
-  int last_id_ = 0;
-  std::string name;
-  std::unordered_map<const char*, unsigned int> name2id;
-  Container* parent_ = nullptr;
-  std::vector<std::unique_ptr<Container>> children_;
-  std::vector<sg_host_t> resource_list;
-
-public:
-  explicit Container(const std::string& name);
-  Container(const Container&) = delete;
-  Container& operator=(const Container&) = delete;
-
-  const char* get_cname() const { return name.c_str(); }
-  void set_parent(Container* parent) { parent_ = parent; }
-  bool has_children() const { return not children_.empty(); }
-  int get_child_position(const Container* child) const;
-  unsigned int get_id_by_name(const char* name) const { return name2id.at(name); }
-
-  void add_child(Container* child);
-  void add_resources(const std::vector<sg_host_t>& hosts);
-  void create_hierarchy(const_sg_netzone_t from_as);
-  std::vector<int> get_hierarchy();
-  std::string get_hierarchy_as_string();
-  void print(FILE *file);
-  void print_resources(FILE* file);
-};
-
-class XBT_PUBLIC Subset {
-public:
-  Subset(int s, int n, Container* p);
-  int start_idx; // start idx in resource_list of container
-  int nres;      // number of resources spanning starting at start_idx
-  Container *parent;
-};
-
-} // namespace jedule
-} // namespace simgrid
-using jed_container_t = simgrid::jedule::Container*;
-void get_resource_selection_by_hosts(std::vector<simgrid::jedule::Subset>& subset_list,
-                                     const std::vector<sg_host_t>& host_list);
-
-#endif /* JED_SIMGRID_PLATFORM_H_ */
diff --git a/include/simgrid/jedule/jedule_sd_binding.h b/include/simgrid/jedule/jedule_sd_binding.h
deleted file mode 100644 (file)
index 874ec03..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 2010-2021. 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. */
-
-#ifndef JEDULE_SD_BINDING_H_
-#define JEDULE_SD_BINDING_H_
-
-#include <simgrid/simdag.h>
-
-SG_BEGIN_DECL
-XBT_PUBLIC void jedule_log_sd_event(const_SD_task_t task);
-XBT_PUBLIC void jedule_sd_init(void);
-XBT_PUBLIC void jedule_sd_exit(void);
-XBT_PUBLIC void jedule_sd_dump(const char* filename);
-SG_END_DECL
-
-#endif /* JEDULE_SD_BINDING_H_ */
index 6b4ceae..3235775 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef SIMGRID_S4U_ACTIVITY_HPP
 #define SIMGRID_S4U_ACTIVITY_HPP
 
-#include <xbt/asserts.h>
 #include <algorithm>
 #include <atomic>
 #include <set>
 #include <stdexcept>
 #include <string>
 #include <vector>
+#include <xbt/Extendable.hpp>
+#include <xbt/asserts.h>
 #include <xbt/signal.hpp>
 #include <xbt/utility.hpp>
 
 XBT_LOG_EXTERNAL_CATEGORY(s4u_activity);
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Activity>;
+
 namespace s4u {
 
 /** @brief Activities
@@ -27,12 +31,13 @@ namespace s4u {
  * This class is the ancestor of every activities that an actor can undertake.
  * That is, activities are all the things that do take time to the actor in the simulated world.
  */
-class XBT_PUBLIC Activity {
+class XBT_PUBLIC Activity : public xbt::Extendable<Activity> {
   friend Comm;
   friend Exec;
   friend Io;
 #ifndef DOXYGEN
   friend std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename);
+  friend std::vector<ActivityPtr> create_DAG_from_DAX(const std::string& filename);
 #endif
 
 public:
@@ -48,6 +53,7 @@ public:
 protected:
   Activity()  = default;
   virtual ~Activity() = default;
+  void destroy();
 
   void release_dependencies()
   {
@@ -89,13 +95,17 @@ protected:
 
   static std::set<Activity*>* vetoed_activities_;
 
-public:
-  /*! Signal fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
-   * resource assigned) */
+private:
   static xbt::signal<void(Activity&)> on_veto;
-  /*! Signal fired when theactivity completes  (either normally, cancelled or failed) */
   static xbt::signal<void(Activity&)> on_completion;
 
+public:
+  /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
+   * resource assigned) */
+  static void on_veto_cb(const std::function<void(Activity&)>& cb) { on_veto.connect(cb); }
+  /*! Add a callback fired when theactivity completes (either normally, cancelled or failed) */
+  static void on_completion_cb(const std::function<void(Activity&)> cb) { on_completion.connect(cb); }
+
   void vetoable_start()
   {
     state_ = State::STARTING;
@@ -112,9 +122,9 @@ public:
   void complete(Activity::State state)
   {
     state_ = state;
+    on_completion(*this);
     if (state == State::FINISHED)
       release_dependencies();
-    on_completion(*this);
   }
 
   static std::set<Activity*>* get_vetoed_activities() { return vetoed_activities_; }
index 935187e..3e1b38c 100644 (file)
@@ -68,32 +68,47 @@ public:
   /** Retrieve a reference to myself */
   static Actor* self();
 
-  /** Fired when a new actor has been created **/
+#ifndef DOXYGEN
   static xbt::signal<void(Actor&)> on_creation;
-  /** Signal to others that an actor has been suspended**/
   static xbt::signal<void(Actor const&)> on_suspend;
-  /** Signal to others that an actor has been resumed **/
   static xbt::signal<void(Actor const&)> on_resume;
-  /** Signal to others that an actor is sleeping **/
   static xbt::signal<void(Actor const&)> on_sleep;
-  /** Signal to others that an actor wakes up for a sleep **/
   static xbt::signal<void(Actor const&)> on_wake_up;
-  /** Signal to others that an actor is has been migrated to another host **/
   static xbt::signal<void(const Actor&, const Host& previous_location)> on_host_change;
+  static xbt::signal<void(Actor const&)> on_termination;
+  static xbt::signal<void(Actor const&)> on_destruction;
+#endif
+
+public:
+  /** Add a callback fired when a new actor has been created **/
+  static void on_creation_cb(const std::function<void(Actor&)>& cb) { on_creation.connect(cb); }
+  /** Add a callback fired when an actor has been suspended**/
+  static void on_suspend_cb(const std::function<void(Actor const&)> cb) { on_suspend.connect(cb); }
+  /** Add a callback fired when an actor has been resumed **/
+  static void on_resume_cb(const std::function<void(Actor const&)>& cb) { on_resume.connect(cb); }
+  /** Add a callback fired when an actor starts sleeping **/
+  static void on_sleep_cb(const std::function<void(Actor const&)>& cb) { on_sleep.connect(cb); }
+  /** Add a callback fired when an actor wakes up from a sleep **/
+  static void on_wake_up_cb(const std::function<void(Actor const&)>& cb) { on_wake_up.connect(cb); }
+  /** Add a callback fired when an actor is has been migrated to another host **/
+  static void on_host_change_cb(const std::function<void(const Actor&, const Host& previous_location)>& cb)
+  {
+    on_host_change.connect(cb);
+  }
 
-  /** Signal indicating that an actor terminated its code.
+  /** Add a callback fired when an actor terminates its code.
    *  @beginrst
    *  The actor may continue to exist if it is still referenced in the simulation, but it's not active anymore.
    *  If you want to free extra data when the actor's destructor is called, use :cpp:var:`Actor::on_destruction`.
    *  If you want to register to the termination of a given actor, use :cpp:func:`this_actor::on_exit()` instead.
    *  @endrst
    */
-  static xbt::signal<void(Actor const&)> on_termination;
-  /** Signal indicating that an actor is about to disappear (its destructor was called).
+  static void on_termination_cb(const std::function<void(Actor const&)>& cb) { on_termination.connect(cb); }
+  /** Add a callback fired when an actor is about to disappear (its destructor was called).
    *  This signal is fired for any destructed actor, which is mostly useful when designing plugins and extensions.
    *  If you want to react to the end of the actor's code, use Actor::on_termination instead.
    *  If you want to register to the termination of a given actor, use this_actor::on_exit() instead.*/
-  static xbt::signal<void(Actor const&)> on_destruction;
+  static void on_destruction_cb(const std::function<void(Actor const&)>& cb) { on_destruction.connect(cb); }
 
   /** Create an actor from a std::function<void()>.
    *  If the actor is restarted, it gets a fresh copy of the function. */
index bee49b3..68f5a8a 100644 (file)
@@ -63,10 +63,17 @@ public:
    */
   static void sendto(Host* from, Host* to, uint64_t simulated_size_in_bytes);
 
+  static void on_send_cb(const std::function<void(Comm const&)>& cb) { on_send.connect(cb); }
+  static void on_recv_cb(const std::function<void(Comm const&)>& cb) { on_recv.connect(cb); }
+  static void on_start_cb(const std::function<void(Comm const&)>& cb) { on_start.connect(cb); }
+  static void on_completion_cb(const std::function<void(Comm const&)>& cb) { on_completion.connect(cb); }
+#ifndef DOXYGEN
+  /* FIXME signals should be private */
   static xbt::signal<void(Comm const&)> on_send;
   static xbt::signal<void(Comm const&)> on_recv;
   static xbt::signal<void(Comm const&)> on_start;
   static xbt::signal<void(Comm const&)> on_completion;
+#endif
 
   /*! take a vector s4u::CommPtr and return when one of them is finished.
    * The return value is the rank of the first finished CommPtr. */
index 7364763..f6a7ea7 100644 (file)
@@ -126,11 +126,16 @@ public:
   Disk* seal();
 
   /* The signals */
-  /** @brief Callback signal fired when a new Disk is created */
+  /** @brief Add a callback fired when a new Disk is created */
+  static void on_creation_cb(const std::function<void(Disk&)>& cb) { on_creation.connect(cb); }
+  /** @brief Add a callback fired when a Disk is destroyed */
+  static void on_destruction_cb(const std::function<void(Disk const&)>& cb) { on_destruction.connect(cb); }
+  /** @brief Add a callback fired when a Disk's state changes */
+  static void on_state_change_cb(const std::function<void(Disk const&)>& cb) { on_state_change.connect(cb); }
+
+private:
   static xbt::signal<void(Disk&)> on_creation;
-  /** @brief Callback signal fired when a Disk is destroyed */
   static xbt::signal<void(Disk const&)> on_destruction;
-  /** @brief Callback signal fired when a Disk's state changes */
   static xbt::signal<void(Disk const&)> on_state_change;
 };
 
index e57c3b6..db83801 100644 (file)
@@ -58,6 +58,7 @@ public:
   static bool has_instance() { return instance_ != nullptr; }
 
   void load_platform(const std::string& platf) const;
+  void seal_platform() const;
 
   void register_function(const std::string& name, const std::function<void(int, char**)>& code);
   void register_function(const std::string& name, const std::function<void(std::vector<std::string>)>& code);
@@ -194,31 +195,39 @@ public:
   static void set_config(const std::string& name, const std::string& value);
 
   Engine* set_default_comm_data_copy_callback(void (*callback)(kernel::activity::CommImpl*, void*, size_t));
-  /** Callback fired when the platform is created (ie, the xml file parsed),
-   * right before the actual simulation starts. */
-  static xbt::signal<void()> on_platform_created;
 
-  /** Callback fired when the platform is about to be created
+  /** Add a callback fired when the platform is created (ie, the xml file parsed),
+   * right before the actual simulation starts. */
+  static void on_platform_created_cb(const std::function<void()>& cb) { on_platform_created.connect(cb); }
+  /** Add a callback fired when the platform is about to be created
    * (ie, after any configuration change and just before the resource creation) */
-  static xbt::signal<void()> on_platform_creation;
+  static void on_platform_creation_cb(const std::function<void()>& cb) { on_platform_creation.connect(cb); }
+  /** Add a callback fired when the main simulation loop ends, just before the end of Engine::run() */
+  static void on_simulation_end_cb(const std::function<void()>& cb) { on_simulation_end.connect(cb); }
 
-  /** Callback fired when the main simulation loop ends, just before the end of Engine::run() */
-  static xbt::signal<void()> on_simulation_end;
-
-  /** Callback fired when the time jumps into the future */
-  static xbt::signal<void(double)> on_time_advance;
+  /** Add a callback fired when the time jumps into the future */
+  static void on_time_advance_cb(const std::function<void(double)>& cb) { on_time_advance.connect(cb); }
 
-  /** Callback fired when the time cannot advance because of inter-actors deadlock. Note that the on_exit of each actor
-   * is also executed on deadlock. */
-  static xbt::signal<void(void)> on_deadlock;
+  /** Add a callback fired when the time cannot advance because of inter-actors deadlock. Note that the on_exit of each
+   * actor is also executed on deadlock. */
+  static void on_deadlock_cb(const std::function<void(void)>& cb) { on_deadlock.connect(cb); }
 
+#ifndef DOXYGEN
+  /* FIXME signals should be private */
+  static xbt::signal<void()> on_platform_created;
+  static xbt::signal<void()> on_platform_creation;
+#endif
 private:
+  static xbt::signal<void()> on_simulation_end;
+  static xbt::signal<void(double)> on_time_advance;
+  static xbt::signal<void(void)> on_deadlock;
   kernel::EngineImpl* const pimpl;
   static Engine* instance_;
   void initialize(int* argc, char** argv);
 };
 
 std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename);
+std::vector<ActivityPtr> create_DAG_from_DAX(const std::string& filename);
 
 #ifndef DOXYGEN /* Internal use only, no need to expose it */
 template <class T>
index 14c173b..1013fcf 100644 (file)
@@ -42,13 +42,15 @@ protected:
 
   void reset() const;
 
+  static xbt::signal<void(Exec const&)> on_start;
+
 public:
 #ifndef DOXYGEN
   Exec(Exec const&) = delete;
   Exec& operator=(Exec const&) = delete;
 #endif
   /*! Signal fired each time that an execution actually starts (no veto) */
-  static xbt::signal<void(Exec const&)> on_start;
+  static void on_start_cb(const std::function<void(Exec const&)>& cb) { on_start.connect(cb); }
 
   static ExecPtr init();
   Exec* start() override;
index e745232..b59ec85 100644 (file)
@@ -54,18 +54,23 @@ public:
 protected:
   virtual ~Host(); // Call destroy() instead of manually deleting it.
   Host* set_netpoint(kernel::routing::NetPoint* netpoint);
-#endif
 
-public:
-  /** Called on each newly created host */
   static xbt::signal<void(Host&)> on_creation;
-  /** Called when the machine is turned on or off (called AFTER the change) */
+  static xbt::signal<void(Host const&)> on_destruction;
+
+public:
+  static xbt::signal<void(Host const&)> on_speed_change;
   static xbt::signal<void(Host const&)> on_state_change;
-  /** Called when the speed of the machine is changed (called AFTER the change)
+#endif
+  /** Add a callback fired on each newly created host */
+  static void on_creation_cb(const std::function<void(Host&)>& cb) { on_creation.connect(cb); }
+  /** Add a callback fired when the machine is turned on or off (called AFTER the change) */
+  static void on_state_change_cb(const std::function<void(Host const&)>& cb) { on_state_change.connect(cb); }
+  /** Add a callback fired when the speed of the machine is changed (called AFTER the change)
    * (either because of a pstate switch or because of an external load event coming from the profile) */
-  static xbt::signal<void(Host const&)> on_speed_change;
-  /** Called just before destructing a host */
-  static xbt::signal<void(Host const&)> on_destruction;
+  static void on_speed_change_cb(const std::function<void(Host const&)>& cb) { on_speed_change.connect(cb); }
+  /** Add a callback fired just before destructing a host */
+  static void on_destruction_cb(const std::function<void(Host const&)>& cb) { on_destruction.connect(cb); }
 
   virtual void destroy();
 #ifndef DOXYGEN
index 5d89a0b..c473b10 100644 (file)
@@ -40,6 +40,9 @@ protected:
   virtual ~Link() = default;
   // The implementation that never changes
   kernel::resource::LinkImplIntf* const pimpl_;
+#ifndef DOXYGEN
+  friend kernel::resource::NetworkAction; // signal comm_state_changed
+#endif
 
 public:
   enum class SharingPolicy { NONLINEAR = 4, WIFI = 3, SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
@@ -137,22 +140,32 @@ public:
 
   Link* seal();
 
-  /* The signals */
-  /** @brief Callback signal fired when a new Link is created */
+private:
+#ifndef DOXYGEN
   static xbt::signal<void(Link&)> on_creation;
-
-  /** @brief Callback signal fired when the state of a Link changes (when it is turned on or off) */
   static xbt::signal<void(Link const&)> on_state_change;
-
-  /** @brief Callback signal fired when the bandwidth of a Link changes */
   static xbt::signal<void(Link const&)> on_bandwidth_change;
-
-  /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */
   static xbt::signal<void(kernel::resource::NetworkAction&, kernel::resource::Action::State)>
       on_communication_state_change;
-
-  /** @brief Callback signal fired when a Link is destroyed */
   static xbt::signal<void(Link const&)> on_destruction;
+#endif
+
+public:
+  /* The signals */
+  /** @brief Add a callback fired when a new Link is created */
+  static void on_creation_cb(const std::function<void(Link&)>& cb) { on_creation.connect(cb); }
+  /** @brief Add a callback fired when the state of a Link changes (when it is turned on or off) */
+  static void on_state_change_cb(const std::function<void(Link const&)>& cb) { on_state_change.connect(cb); }
+  /** @brief Add a callback fired when the bandwidth of a Link changes */
+  static void on_bandwidth_change_cb(const std::function<void(Link const&)>& cb) { on_bandwidth_change.connect(cb); }
+  /** @brief Add a callback fired when a communication changes it state (ready/done/cancel) */
+  static void on_communication_state_change_cb(
+      const std::function<void(kernel::resource::NetworkAction&, kernel::resource::Action::State)>& cb)
+  {
+    on_communication_state_change.connect(cb);
+  }
+  /** @brief Add a callback fired when a Link is destroyed */
+  static void on_destruction_cb(std::function<void(Link const&)> cb) { on_destruction.connect(cb); }
 };
 
 /**
index 6c0f3e7..4d37853 100644 (file)
@@ -116,10 +116,14 @@ public:
                           std::vector<kernel::resource::LinkImpl*> const& link_list)>
       on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should not be used by users, used by ns3.. if necessary,
                          // signal shouldn't use LinkImpl*
-#endif
 
+private:
   static xbt::signal<void(NetZone const&)> on_creation;
   static xbt::signal<void(NetZone const&)> on_seal;
+#endif
+public:
+  static void on_creation_cb(const std::function<void(NetZone const&)>& cb) { on_creation.connect(cb); }
+  static void on_seal_cb(const std::function<void(NetZone const&)>& cb) { on_seal.connect(cb); }
 
   /**
    * @brief Create a host
index d1c7a84..1292c46 100644 (file)
@@ -69,15 +69,34 @@ public:
   VirtualMachine* set_bound(double bound);
 
   State get_state() const;
+  static void on_creation_cb(const std::function<void(VirtualMachine&)>& cb) { on_creation.connect(cb); }
+  static void on_start_cb(const std::function<void(VirtualMachine const&)>& cb) { on_start.connect(cb); }
+  static void on_started_cb(const std::function<void(VirtualMachine const&)>& cb) { on_started.connect(cb); }
+  static void on_shutdown_cb(const std::function<void(VirtualMachine const&)>& cb) { on_shutdown.connect(cb); }
+  static void on_suspend_cb(const std::function<void(VirtualMachine const&)>& cb) { on_suspend.connect(cb); }
+  static void on_resume_cb(const std::function<void(VirtualMachine const&)>& cb) { on_resume.connect(cb); }
+  static void on_destruction_cb(const std::function<void(VirtualMachine const&)>& cb) { on_destruction.connect(cb); }
+  static void on_migration_start_cb(const std::function<void(VirtualMachine const&)>& cb)
+  {
+    on_migration_start.connect(cb);
+  }
+  static void on_migration_end_cb(const std::function<void(VirtualMachine const&)>& cb)
+  {
+    on_migration_end.connect(cb);
+  }
+#ifndef DOXYGEN
+  /* FIXME the signals should be private */
+  static xbt::signal<void(VirtualMachine const&)> on_migration_start;
+  static xbt::signal<void(VirtualMachine const&)> on_migration_end;
+  static xbt::signal<void(VirtualMachine const&)> on_destruction;
+#endif
+private:
   static xbt::signal<void(VirtualMachine&)> on_creation;
   static xbt::signal<void(VirtualMachine const&)> on_start;
   static xbt::signal<void(VirtualMachine const&)> on_started;
   static xbt::signal<void(VirtualMachine const&)> on_shutdown;
   static xbt::signal<void(VirtualMachine const&)> on_suspend;
   static xbt::signal<void(VirtualMachine const&)> on_resume;
-  static xbt::signal<void(VirtualMachine const&)> on_migration_start;
-  static xbt::signal<void(VirtualMachine const&)> on_migration_end;
-  static xbt::signal<void(VirtualMachine const&)> on_destruction;
 };
 } // namespace s4u
 } // namespace simgrid
diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h
deleted file mode 100644 (file)
index 5a274c2..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/* Copyright (c) 2006-2021. 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. */
-
-#ifndef SIMGRID_SIMDAG_H
-#define SIMGRID_SIMDAG_H
-
-#include <simgrid/engine.h>
-#include <simgrid/host.h>
-#include <simgrid/link.h>
-#include <simgrid/version.h>
-#include <xbt/log.h>
-#include <xbt/sysdep.h>
-
-#ifdef __cplusplus
-#include <set>
-
-namespace simgrid {
-namespace sd {
-class Task;
-XBT_PUBLIC std::set<Task*>* simulate(double how_long);
-} // namespace sd
-} // namespace simgrid
-
-using sg_sd_Task = simgrid::sd::Task;
-#else
-typedef struct sd_Task sg_sd_Task;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @brief Link opaque datatype
-    @ingroup SD_link_api
-
-    A link is a network node represented as a <em>name</em>, a <em>bandwidth</em> and a <em>latency</em>.
-    A route is a list of links between two hosts.
- */
-typedef sg_link_t SD_link_t;
-
-/** @brief Task opaque datatype
-    @ingroup SD_task_api
-
-    A task is some <em>computing amount</em> that can be executed in parallel on several hosts.
-    A task may depend on other tasks, which means that the task cannot start until the other tasks are done.
-    Each task has a <em>@ref e_SD_task_state_t "state"</em> indicating whether the task is scheduled, running, done, ...
-
-    */
-typedef sg_sd_Task* SD_task_t;
-typedef const sg_sd_Task* const_SD_task_t;
-
-/** @brief Task states
-    @ingroup SD_task_api */
-typedef enum {
-  SD_NOT_SCHEDULED = 0x0001,      /**< @brief Initial state (not valid for SD_watch and SD_unwatch). */
-  SD_SCHEDULABLE = 0x0002,   /**< @brief A task becomes SD_SCHEDULABLE as soon as its dependencies are satisfied */
-  SD_SCHEDULED = 0x0004,     /**< @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 = 0x0008,      /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
-  SD_RUNNING = 0x0010,       /**< @brief An SD_RUNNABLE task 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. */
-} e_SD_task_state_t;
-
-/** @brief Task kinds
-    @ingroup SD_task_api */
-typedef enum {
-  SD_TASK_NOT_TYPED = 0,      /**< @brief no specified type */
-  SD_TASK_COMM_E2E = 1,       /**< @brief end to end communication */
-  SD_TASK_COMP_SEQ = 2,        /**< @brief sequential computation */
-  SD_TASK_COMP_PAR_AMDAHL = 3, /**< @brief parallel computation (Amdahl's law) */
-  SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4 /**< @brief MxN data redistribution (1D Block distribution) */
-} e_SD_task_kind_t;
-
-/************************** Task handling ************************************/
-/** @defgroup SD_task_api Tasks
- *  @brief Functions for managing the tasks
- *
- *  This section describes the functions for managing the tasks.
- *
- *  A task is some <em>working amount</em> that can be executed in parallel on several hosts.
- *  A task may depend on other tasks, which means that the task cannot start until the other tasks are done.
- *  Each task has a <em>@ref e_SD_task_state_t "state"</em> indicating whether the task is scheduled, running, done, ...
- *
- *  @see SD_task_t, @see SD_task_dependency_api
- *  @{
- */
-XBT_PUBLIC SD_task_t SD_task_create(const char* name, void* data, double amount);
-XBT_PUBLIC void* SD_task_get_data(const_SD_task_t task);
-XBT_PUBLIC void SD_task_set_data(SD_task_t task, void* data);
-XBT_PUBLIC e_SD_task_state_t SD_task_get_state(const_SD_task_t task);
-XBT_PUBLIC const char* SD_task_get_name(const_SD_task_t task);
-XBT_PUBLIC void SD_task_set_name(SD_task_t task, const char* name);
-XBT_PUBLIC void SD_task_set_rate(SD_task_t task, double rate);
-
-XBT_PUBLIC void SD_task_watch(SD_task_t task, e_SD_task_state_t state);
-XBT_PUBLIC void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state);
-XBT_PUBLIC double SD_task_get_amount(const_SD_task_t task);
-XBT_PUBLIC void SD_task_set_amount(SD_task_t task, double amount);
-XBT_PUBLIC double SD_task_get_alpha(const_SD_task_t task);
-XBT_PUBLIC double SD_task_get_remaining_amount(const_SD_task_t task);
-XBT_PUBLIC double SD_task_get_execution_time(const_SD_task_t task, int host_count, const sg_host_t* host_list,
-                                             const double* flops_amount, const double* bytes_amount);
-XBT_PUBLIC e_SD_task_kind_t SD_task_get_kind(const_SD_task_t task);
-XBT_PUBLIC void SD_task_schedule(SD_task_t task, int host_count, const sg_host_t* host_list, const double* flops_amount,
-                                 const double* bytes_amount, double rate);
-XBT_PUBLIC void SD_task_unschedule(SD_task_t task);
-XBT_PUBLIC double SD_task_get_start_time(const_SD_task_t task);
-XBT_PUBLIC double SD_task_get_finish_time(const_SD_task_t task);
-XBT_PUBLIC xbt_dynar_t SD_task_get_parents(const_SD_task_t task);
-XBT_PUBLIC xbt_dynar_t SD_task_get_children(const_SD_task_t task);
-XBT_PUBLIC int SD_task_get_workstation_count(const_SD_task_t task);
-XBT_PUBLIC sg_host_t* SD_task_get_workstation_list(const_SD_task_t task);
-XBT_PUBLIC void SD_task_destroy(SD_task_t task);
-XBT_PUBLIC void SD_task_dump(const_SD_task_t task);
-XBT_PUBLIC void SD_task_dotty(const_SD_task_t task, void* out_FILE);
-
-XBT_PUBLIC SD_task_t SD_task_create_comp_seq(const char* name, void* data, double amount);
-XBT_PUBLIC SD_task_t SD_task_create_comp_par_amdahl(const char* name, void* data, double amount, double alpha);
-XBT_PUBLIC SD_task_t SD_task_create_comm_e2e(const char* name, void* data, double amount);
-XBT_PUBLIC SD_task_t SD_task_create_comm_par_mxn_1d_block(const char* name, void* data, double amount);
-
-XBT_PUBLIC void SD_task_distribute_comp_amdahl(SD_task_t task, int ws_count);
-XBT_PUBLIC void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb);
-XBT_PUBLIC void SD_task_schedulev(SD_task_t task, int count, const sg_host_t* list);
-XBT_PUBLIC void SD_task_schedulel(SD_task_t task, int count, ...);
-
-/** @brief A constant to use in SD_task_schedule to mean that there is no cost.
- *
- *  For example, create a pure computation task (i.e., with no communication) like this:
- *
- *  SD_task_schedule(task, my_host_count, my_host_list, my_flops_amount, SD_SCHED_NO_COST, my_rate)
- */
-#define SD_SCHED_NO_COST NULL
-
-/** @} */
-
-/** @addtogroup SD_task_dependency_api
- *
- *  This section describes the functions for managing the dependencies between the tasks.
- *
- *  @see SD_task_api
- *  @{
- */
-XBT_PUBLIC void SD_task_dependency_add(SD_task_t src, SD_task_t dst);
-XBT_PUBLIC void SD_task_dependency_remove(SD_task_t src, SD_task_t dst);
-XBT_PUBLIC int SD_task_dependency_exists(const_SD_task_t src, SD_task_t dst);
-/** @} */
-
-/************************** Global *******************************************/
-/** @addtogroup SD_simulation Simulation
- *
- *  This section describes the functions for initializing SimDag, launching the simulation and exiting SimDag.
- *
- *  @{
- */
-
-#define SD_init(argc, argv)                                                                                            \
-  do {                                                                                                                 \
-    sg_version_check(SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR, SIMGRID_VERSION_PATCH);                             \
-    SD_init_nocheck((argc), (argv));                                                                                   \
-  } while (0)
-
-XBT_PUBLIC void SD_init_nocheck(int* argc, char** argv);
-XBT_PUBLIC void SD_config(const char* key, const char* value);
-XBT_PUBLIC void SD_create_environment(const char* platform_file);
-XBT_PUBLIC void SD_simulate(double how_long);
-XBT_PUBLIC void SD_simulate_with_update(double how_long, xbt_dynar_t changed_tasks_dynar);
-XBT_PUBLIC xbt_dynar_t SD_daxload(const char* filename);
-/** @} */
-
-/* Support some backward compatibility */
-#define SD_get_clock simgrid_get_clock
-#define SD_workstation_t sg_host_t
-
-#define SD_link_get_name sg_link_get_name
-#define SD_link_get_current_latency sg_link_get_latency
-#define SD_link_get_current_bandwidth sg_link_get_bandwidth
-
-#define SD_route_get_current_latency SD_route_get_latency
-#define SD_route_get_current_bandwidth SD_route_get_bandwidth
-
-#define SD_workstation_get_list sg_host_list
-#define SD_workstation_get_number sg_host_count
-
-#define SD_workstation_get_name sg_host_get_name
-#define SD_workstation_get_by_name sg_host_by_name
-#define SD_workstation_dump sg_host_dump
-#define SD_workstation_get_data sg_host_get_data
-#define SD_workstation_set_data sg_host_set_data
-#define SD_workstation_get_properties sg_host_get_properties
-#define SD_workstation_get_property_value sg_host_get_property_value
-#define SD_workstation_get_power sg_host_get_speed
-#define SD_workstation_get_available_power sg_host_get_available_speed
-#define SD_route_get_latency sg_host_get_route_latency
-#define SD_route_get_bandwidth sg_host_get_route_bandwidth
-
-// Lost functions
-//SD_workstation_get_access_mode
-//SD_workstation_set_access_mode
-//SD_workstation_get_current_task
-//SD_route_get_communication_time => SD_route_get_latency() + amount / SD_route_get_bandwidth()
-//SD_workstation_get_computation_time => amount / sg_host_get_speed()
-//SD_route_get_size
-//SD_route_get_list
-//TRACE_sd_set_task_category
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index 895666e..827d704 100644 (file)
@@ -113,7 +113,7 @@ sonar.issue.ignore.multicriteria.c10a.resourceKey=teshsuite/s4u/evaluate-*-time/
 sonar.issue.ignore.multicriteria.c10b.ruleKey=cpp:S106
 sonar.issue.ignore.multicriteria.c10b.resourceKey=teshsuite/s4u/is-router/*.cpp
 sonar.issue.ignore.multicriteria.c10c.ruleKey=cpp:S106
-sonar.issue.ignore.multicriteria.c10c.resourceKey=teshsuite/simdag/flatifier/*.cpp
+sonar.issue.ignore.multicriteria.c10c.resourceKey=teshsuite/platforms/*.cpp
 
 # Declarations should be placed in a namespace
 # But examples are intended to remain small and simple
@@ -176,7 +176,7 @@ sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp
 #  - the NAS, that are included in our examples
 #  - The Catch2 library, that is included in our unit tests
 #  - The xxHash library, used by the MC
-#  - MSG along with its examples and teshsuite, and the simdag examples
+#  - MSG along with its examples and teshsuite
 sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/isp/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c,src/msg/**,include/msg/**,examples/deprecated/**,teshsuite/msg/**
 
 # Exclude our examples from the duplication detection.
index 010838b..bdc6661 100644 (file)
@@ -104,9 +104,8 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass, jobjec
   args.emplace_back("java");
   for (int index = 1; index < argc; index++) {
     auto jval       = (jstring)env->GetObjectArrayElement(jargs, index - 1);
-    const char* tmp = env->GetStringUTFChars(jval, nullptr);
-    args.emplace_back(tmp);
-    env->ReleaseStringUTFChars(jval, tmp);
+    jstring_wrapper tmp(env, jval);
+    args.emplace_back(tmp.value);
   }
 
   std::unique_ptr<char* []> argv(new char*[argc + 1]);
@@ -150,11 +149,8 @@ JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv* env, jclass)
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass, jstring jplatformFile)
 {
-  const char* platformFile = env->GetStringUTFChars(jplatformFile, nullptr);
-
+  jstring_wrapper platformFile(env, jplatformFile);
   simgrid_load_platform(platformFile);
-
-  env->ReleaseStringUTFChars(jplatformFile, platformFile);
 }
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv* env, jclass)
@@ -177,51 +173,45 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNI
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_DEBUG("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_DEBUG("%s", s.value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_VERB("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_VERB("%s", s.value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_INFO("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_INFO("%s", s.value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_WARN("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_WARN("%s", s.value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_ERROR("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_ERROR("%s", s.value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv* env, jclass, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
-  XBT_CRITICAL("%s", s);
-  env->ReleaseStringUTFChars(js, s);
+  jstring_wrapper s(env, js);
+  XBT_CRITICAL("%s", s.value);
 }
 
 static void java_main(int argc, char* argv[]);
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv* env, jclass, jstring jdeploymentFile)
 {
-  const char* deploymentFile = env->GetStringUTFChars(jdeploymentFile, nullptr);
+  jstring_wrapper deploymentFile(env, jdeploymentFile);
 
   simgrid_register_default(java_main);
   simgrid_load_deployment(deploymentFile);
index 44e0795..b040fd9 100644 (file)
@@ -102,7 +102,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobje
     jxbt_throw_notbound(env, "as", jas);
     return nullptr;
   }
-  const char* name = env->GetStringUTFChars(static_cast<jstring>(jname), nullptr);
+  jstring_wrapper name(env, static_cast<jstring>(jname));
 
   const char* property = sg_zone_get_property_value(as, name);
   if (not property) {
@@ -111,8 +111,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobje
 
   jobject jproperty = env->NewStringUTF(property);
 
-  env->ReleaseStringUTFChars(static_cast<jstring>(jname), name);
-
   return jproperty;
 }
 
index 68bc9a0..1b27606 100644 (file)
@@ -58,16 +58,14 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getByName(JNIEnv* env, jclas
     jxbt_throw_null(env, "No host can have a null name");
     return nullptr;
   }
-  const char* name = env->GetStringUTFChars(jname, nullptr);
+  jstring_wrapper name(env, jname);
   /* get the host by name       (the hosts are created during the grid resolution) */
   sg_host_t host = sg_host_by_name(name);
 
   if (not host) { /* invalid name */
     jxbt_throw_host_not_found(env, name);
-    env->ReleaseStringUTFChars(jname, name);
     return nullptr;
   }
-  env->ReleaseStringUTFChars(jname, name);
 
   if (not host->extension(JAVA_HOST_LEVEL)) { /* native host not associated yet with java host */
     /* Instantiate a new java host */
@@ -178,7 +176,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getProperty(JNIEnv *env, job
     jxbt_throw_notbound(env, "host", jhost);
     return nullptr;
   }
-  const char* name = env->GetStringUTFChars((jstring)jname, nullptr);
+  jstring_wrapper name(env, (jstring)jname);
 
   const char* property = sg_host_get_property_value(host, name);
   if (not property) {
@@ -187,8 +185,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getProperty(JNIEnv *env, job
 
   jobject jproperty = env->NewStringUTF(property);
 
-  env->ReleaseStringUTFChars((jstring) jname, name);
-
   return jproperty;
 }
 
@@ -200,14 +196,11 @@ Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname,
     jxbt_throw_notbound(env, "host", jhost);
     return;
   }
-  const char* name       = env->GetStringUTFChars((jstring)jname, nullptr);
-  const char* value_java = env->GetStringUTFChars((jstring)jvalue, nullptr);
+  jstring_wrapper name(env, (jstring)jname);
+  jstring_wrapper value_java(env, (jstring)jvalue);
   const char* value      = xbt_strdup(value_java);
 
   sg_host_set_property_value(host, name, value);
-
-  env->ReleaseStringUTFChars((jstring) jvalue, value_java);
-  env->ReleaseStringUTFChars((jstring) jname, name);
 }
 
 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isOn(JNIEnv * env, jobject jhost)
@@ -254,9 +247,8 @@ JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_all(JNIEnv * env, jclas
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_setAsyncMailbox(JNIEnv * env, jclass cls_arg, jobject jname)
 {
-  const char* name = env->GetStringUTFChars((jstring)jname, nullptr);
+  jstring_wrapper name(env, (jstring)jname);
   sg_mailbox_set_receiver(name);
-  env->ReleaseStringUTFChars((jstring) jname, name);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_updateAllEnergyConsumptions(JNIEnv* env, jclass cls)
index 88f3347..b325939 100644 (file)
@@ -141,7 +141,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getProperty(JNIEnv *env,
     jxbt_throw_notbound(env, "process", jprocess);
     return nullptr;
   }
-  const char* name = env->GetStringUTFChars((jstring)jname, nullptr);
+  jstring_wrapper name(env, (jstring)jname);
 
   const char* property = actor->get_property(name);
   if (not property)
@@ -149,8 +149,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getProperty(JNIEnv *env,
 
   jobject jproperty = env->NewStringUTF(property);
 
-  env->ReleaseStringUTFChars((jstring)jname, name);
-
   return jproperty;
 }
 
index fc8c867..1e6a33b 100644 (file)
@@ -57,13 +57,8 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_create(JNIEnv * env, jobject jtask, jstring jname,
                                       jdouble jflopsAmount, jdouble jbytesAmount)
 {
-  const char *name = nullptr;      /* the name of the task                                 */
-
-  if (jname)
-    name = env->GetStringUTFChars(jname, nullptr);
-  msg_task_t task = MSG_task_create(name, jflopsAmount, jbytesAmount, jtask);
-  if (jname)
-    env->ReleaseStringUTFChars(jname, name);
+  jstring_wrapper task_name(env, jname);
+  msg_task_t task = MSG_task_create(task_name, jflopsAmount, jbytesAmount, jtask);
 
   /* bind & store the task */
   jtask_bind(jtask, task, env);
@@ -93,9 +88,8 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_parallelCreate(JNIEnv * env, jo
   env->ReleaseDoubleArrayElements(jmessageSizes_arg, jmessageSizes, 0);
 
   /* get the C string from the java string */
-  const char* name = env->GetStringUTFChars(jname, nullptr);
+  jstring_wrapper name(env, jname);
   msg_task_t task  = MSG_parallel_task_create(name, host_count, hosts, computeDurations, messageSizes, jtask);
-  env->ReleaseStringUTFChars(jname, name);
 
   /* associate the java task object and the native task */
   jtask_bind(jtask, task, env);
@@ -214,12 +208,11 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jt
     jxbt_throw_notbound(env, "task", jtask);
     return;
   }
-  const char* name = env->GetStringUTFChars((jstring)jname, nullptr);
+  jstring_wrapper name(env, static_cast<jstring>(jname));
 
   env->SetObjectField(jtask, jtask_field_Task_name, jname);
   MSG_task_set_name(task, name);
 
-  env->ReleaseStringUTFChars((jstring) jname, name);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setPriority(JNIEnv * env, jobject jtask, jdouble priority)
@@ -268,9 +261,8 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_sendBounded(JNIEnv * env,jobjec
   /* Add a global ref into the Ctask so that the receiver can use it */
   MSG_task_set_data(task, env->NewGlobalRef(jtask));
 
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
+  jstring_wrapper alias(env, jalias);
   msg_error_t res   = MSG_task_send_with_timeout_bounded(task, alias, jtimeout, maxrate);
-  env->ReleaseStringUTFChars(jalias, alias);
 
   if (res != MSG_OK)
     jmsg_throw_status(env, res);
@@ -280,13 +272,12 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_receive(JNIEnv* env, jclass
 {
   msg_task_t task = nullptr;
 
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
+  jstring_wrapper alias(env, jalias);
   msg_error_t rv;
   if (not simgrid::ForcefulKillException::try_n_catch(
           [&rv, &task, &alias, &jtimeout]() { rv = MSG_task_receive_with_timeout(&task, alias, (double)jtimeout); })) {
     jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError", "Process killed");
   }
-  env->ReleaseStringUTFChars(jalias, alias);
   if (env->ExceptionOccurred())
     return nullptr;
   if (rv != MSG_OK) {
@@ -318,9 +309,8 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass c
     return nullptr;
   }
 
-  const char* mailbox = env->GetStringUTFChars(jmailbox, nullptr);
+  jstring_wrapper mailbox(env, jmailbox);
   msg_comm_t comm     = MSG_task_irecv(task, mailbox);
-  env->ReleaseStringUTFChars(jmailbox, mailbox);
 
   env->SetLongField(jcomm, jtask_field_Comm_bind, (jlong) (uintptr_t)(comm));
   env->SetLongField(jcomm, jtask_field_Comm_taskBind, (jlong) (uintptr_t)(task));
@@ -334,7 +324,7 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_receiveBounded(JNIEnv* env,
 {
   msg_task_t task = nullptr;
 
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
+  jstring_wrapper alias(env, jalias);
   msg_error_t res   = MSG_task_receive_with_timeout_bounded(&task, alias, jtimeout, rate);
   if (env->ExceptionOccurred())
     return nullptr;
@@ -349,8 +339,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_receiveBounded(JNIEnv* env,
   env->DeleteGlobalRef(jtask_global);
   MSG_task_set_data(task, nullptr);
 
-  env->ReleaseStringUTFChars(jalias, alias);
-
   return (jobject) jtask_local;
 }
 
@@ -370,9 +358,8 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_irecvBounded(JNIEnv * env, j
     return nullptr;
   }
 
-  const char* mailbox = env->GetStringUTFChars(jmailbox, nullptr);
+  jstring_wrapper mailbox(env, jmailbox);
   msg_comm_t comm     = MSG_task_irecv_bounded(task, mailbox, rate);
-  env->ReleaseStringUTFChars(jmailbox, mailbox);
 
   env->SetLongField(jcomm, jtask_field_Comm_bind, (jlong) (uintptr_t)(comm));
   env->SetLongField(jcomm, jtask_field_Comm_taskBind, (jlong) (uintptr_t)(task));
@@ -391,12 +378,11 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isend(JNIEnv *env, jobject j
     return nullptr;
 
   jobject jcomm       = env->NewObject(comm_class, jtask_method_Comm_constructor);
-  const char* mailbox = env->GetStringUTFChars(jmailbox, nullptr);
+  jstring_wrapper mailbox(env, jmailbox);
 
   msg_task_t task = jtask_to_native(jtask, env);
 
   if (not task) {
-    env->ReleaseStringUTFChars(jmailbox, mailbox);
     env->DeleteLocalRef(jcomm);
     jxbt_throw_notbound(env, "task", jtask);
         return nullptr;
@@ -409,8 +395,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isend(JNIEnv *env, jobject j
   env->SetLongField(jcomm, jtask_field_Comm_taskBind, (jlong) (uintptr_t)(nullptr));
   env->SetBooleanField(jcomm, jtask_field_Comm_receiving, JNI_FALSE);
 
-  env->ReleaseStringUTFChars(jmailbox, mailbox);
-
   return jcomm;
 }
 
@@ -420,19 +404,17 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isendBounded(JNIEnv *env, jo
   msg_task_t task;
   jobject jcomm;
   msg_comm_t comm;
-  const char *mailbox;
 
   jclass comm_class = env->FindClass("org/simgrid/msg/Comm");
   if (not comm_class)
     return nullptr;
 
   jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
-  mailbox = env->GetStringUTFChars(jmailbox, nullptr);
+  jstring_wrapper mailbox(env, jmailbox);
 
   task = jtask_to_native(jtask, env);
 
   if (not task) {
-    env->ReleaseStringUTFChars(jmailbox, mailbox);
     env->DeleteLocalRef(jcomm);
     jxbt_throw_notbound(env, "task", jtask);
         return nullptr;
@@ -445,8 +427,6 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isendBounded(JNIEnv *env, jo
   env->SetLongField(jcomm, jtask_field_Comm_taskBind, (jlong) (uintptr_t)(nullptr));
   env->SetBooleanField(jcomm, jtask_field_Comm_receiving, JNI_FALSE);
 
-  env->ReleaseStringUTFChars(jmailbox, mailbox);
-
   return jcomm;
 }
 
@@ -479,12 +459,11 @@ static void msg_task_cancel_on_failed_dsend(void*t) {
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsend(JNIEnv * env, jobject jtask, jstring jalias)
 {
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
+  jstring_wrapper alias(env, jalias);
 
   msg_task_t task = jtask_to_native(jtask, env);
 
   if (not task) {
-    env->ReleaseStringUTFChars(jalias, alias);
     jxbt_throw_notbound(env, "task", jtask);
     return;
   }
@@ -492,19 +471,16 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsend(JNIEnv * env, jobject jta
   /* Pass a global ref to the Jtask into the Ctask so that the receiver can use it */
   MSG_task_set_data(task, env->NewGlobalRef(jtask));
   MSG_task_dsend(task, alias, msg_task_cancel_on_failed_dsend);
-
-  env->ReleaseStringUTFChars(jalias, alias);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsendBounded(JNIEnv * env, jobject jtask, jstring jalias,
                                                               jdouble maxrate)
 {
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
+  jstring_wrapper alias(env, jalias);
 
   msg_task_t task = jtask_to_native(jtask, env);
 
   if (not task) {
-    env->ReleaseStringUTFChars(jalias, alias);
     jxbt_throw_notbound(env, "task", jtask);
     return;
   }
@@ -512,24 +488,16 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsendBounded(JNIEnv * env, jobj
   /* Pass a global ref to the Jtask into the Ctask so that the receiver can use it */
   MSG_task_set_data(task, env->NewGlobalRef(jtask));
   MSG_task_dsend_bounded(task, alias, msg_task_cancel_on_failed_dsend, maxrate);
-
-  env->ReleaseStringUTFChars(jalias, alias);
 }
 
 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Task_listen(JNIEnv * env, jclass cls, jstring jalias)
 {
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
-  int rv = MSG_task_listen(alias);
-  env->ReleaseStringUTFChars(jalias, alias);
-
-  return (jboolean) rv;
+  jstring_wrapper alias(env, jalias);
+  return (jboolean)MSG_task_listen(alias);
 }
 
 JNIEXPORT jint JNICALL Java_org_simgrid_msg_Task_listenFrom(JNIEnv * env, jclass cls, jstring jalias)
 {
-  const char* alias = env->GetStringUTFChars(jalias, nullptr);
-  int rv = MSG_task_listen_from(alias);
-  env->ReleaseStringUTFChars(jalias, alias);
-
-  return (jint) rv;
+  jstring_wrapper alias(env, jalias);
+  return (jint)MSG_task_listen_from(alias);
 }
index ed2126b..6b2fd2a 100644 (file)
@@ -71,10 +71,9 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_create(JNIEnv* env, jobject jVm,
 {
   sg_host_t host = jhost_get_native(env, jHost);
 
-  const char* name = env->GetStringUTFChars(jname, nullptr);
+  jstring_wrapper name(env, jname);
   sg_vm_t vm       = sg_vm_create_migratable(host, name, static_cast<int>(coreAmount), static_cast<int>(jramsize),
                                        static_cast<int>(jmig_netspeed), static_cast<int>(jdp_intensity));
-  env->ReleaseStringUTFChars(jname, name);
 
   jvm_bind(env, jVm, vm);
   jVm = env->NewGlobalRef(jVm);
@@ -175,16 +174,14 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclas
     jxbt_throw_null(env, "No VM can have a null name");
     return nullptr;
   }
-  const char* name = env->GetStringUTFChars(jname, nullptr);
+  jstring_wrapper name(env, jname);
   /* get the VM by name   (VMs are just special hosts, unfortunately) */
   auto const* host = sg_host_by_name(name);
 
   if (not host) { /* invalid name */
     jxbt_throw_host_not_found(env, name);
-    env->ReleaseStringUTFChars(jname, name);
     return nullptr;
   }
-  env->ReleaseStringUTFChars(jname, name);
 
   return static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
 }
index 87cf963..6a7c311 100644 (file)
@@ -6,6 +6,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "jtrace.h"
+#include "jxbt_utilities.hpp"
 #include "simgrid/instr.h"
 
 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclare(JNIEnv * env, jclass cls, jstring js)
 {
-  const char* s = env->GetStringUTFChars(js, nullptr);
+  jstring_wrapper s(env, js);
   TRACE_host_state_declare(s);
-  env->ReleaseStringUTFChars(js, s);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclareValue (JNIEnv *env, jclass cls, jstring js_state,
                                                                            jstring js_value, jstring js_color)
 {
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
-  const char* value = env->GetStringUTFChars(js_value, nullptr);
-  const char* color = env->GetStringUTFChars(js_color, nullptr);
+  jstring_wrapper state(env, js_state);
+  jstring_wrapper value(env, js_value);
+  jstring_wrapper color(env, js_color);
 
   TRACE_host_state_declare_value(state, value, color);
-
-  env->ReleaseStringUTFChars(js_state, state);
-  env->ReleaseStringUTFChars(js_value, value);
-  env->ReleaseStringUTFChars(js_color, color);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostSetState (JNIEnv *env, jclass cls, jstring js_host,
                                                                   jstring js_state, jstring js_value)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
-  const char* value = env->GetStringUTFChars(js_value, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
+  jstring_wrapper value(env, js_value);
 
   TRACE_host_set_state(host, state, value);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
-  env->ReleaseStringUTFChars(js_value, value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPushState (JNIEnv *env, jclass cls, jstring js_host,
                                                                    jstring js_state, jstring js_value)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
-  const char* value = env->GetStringUTFChars(js_value, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
+  jstring_wrapper value(env, js_value);
 
   TRACE_host_push_state(host, state, value);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
-  env->ReleaseStringUTFChars(js_value, value);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPopState (JNIEnv *env, jclass cls, jstring js_host,
                                                                   jstring js_state)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
 
   TRACE_host_pop_state(host, state);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostVariableDeclare (JNIEnv *env, jclass cls, jstring js_state)
 {
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper state(env, js_state);
   TRACE_host_variable_declare(state);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostVariableSet (JNIEnv *env, jclass cls, jstring js_host,
                                                                      jstring js_state, jdouble value)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
 
   TRACE_host_variable_set(host, state, value);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostVariableSub (JNIEnv *env, jclass cls, jstring js_host,
                                                                      jstring js_state, jdouble value)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
 
   TRACE_host_variable_sub(host, state, value);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_vmVariableDeclare (JNIEnv *env, jclass cls, jstring js_state)
 {
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper state(env, js_state);
 
   TRACE_vm_variable_declare(state);
-
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_vmVariableSet (JNIEnv *env, jclass cls, jstring js_vm,
                                                                    jstring js_state, jdouble value)
 {
-  const char* vm    = env->GetStringUTFChars(js_vm, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper vm(env, js_vm);
+  jstring_wrapper state(env, js_state);
 
   TRACE_vm_variable_set(vm, state, value);
-
-  env->ReleaseStringUTFChars(js_vm, vm);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostVariableAdd (JNIEnv *env, jclass cls, jstring js_host,
                                                                      jstring js_state, jdouble value)
 {
-  const char* host  = env->GetStringUTFChars(js_host, nullptr);
-  const char* state = env->GetStringUTFChars(js_state, nullptr);
+  jstring_wrapper host(env, js_host);
+  jstring_wrapper state(env, js_state);
 
   TRACE_host_variable_set(host, state, value);
-
-  env->ReleaseStringUTFChars(js_host, host);
-  env->ReleaseStringUTFChars(js_state, state);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableDeclare (JNIEnv *env, jclass cls, jstring jvar) {
-  const char* variable = env->GetStringUTFChars(jvar, nullptr);
+  jstring_wrapper variable(env, jvar);
   TRACE_link_variable_declare (variable);
-  env->ReleaseStringUTFChars(jvar, variable);
 }
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableDeclareWithColor (JNIEnv *env, jclass cls, jstring jvar, jstring jcolor) {
-  const char* variable = env->GetStringUTFChars(jvar, nullptr);
-  const char* color    = env->GetStringUTFChars(jcolor, nullptr);
+  jstring_wrapper variable(env, jvar);
+  jstring_wrapper color(env, jcolor);
   TRACE_link_variable_declare_with_color(variable,color);
-  env->ReleaseStringUTFChars(jvar, variable);
-  env->ReleaseStringUTFChars(jcolor, color);
 }
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSet (JNIEnv *env, jclass cls, jstring jlink, jstring jvar, jdouble jvalue) {
-  const char* link     = env->GetStringUTFChars(jlink, nullptr);
-  const char* variable = env->GetStringUTFChars(jvar, nullptr);
+  jstring_wrapper link(env, jlink);
+  jstring_wrapper variable(env, jvar);
   TRACE_link_variable_set(link, variable, jvalue);
-  env->ReleaseStringUTFChars(jlink, link);
-  env->ReleaseStringUTFChars(jvar, variable);
 }
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSet
   (JNIEnv *env, jclass cls, jstring jsrc, jstring jdst, jstring jvar, jdouble jval)
 {
-  const char* src      = env->GetStringUTFChars(jsrc, nullptr);
-  const char* dst      = env->GetStringUTFChars(jdst, nullptr);
-  const char* variable = env->GetStringUTFChars(jvar, nullptr);
+  jstring_wrapper src(env, jsrc);
+  jstring_wrapper dst(env, jdst);
+  jstring_wrapper variable(env, jvar);
   TRACE_link_srcdst_variable_set(src,dst,variable, jval);
-  env->ReleaseStringUTFChars(jsrc, src);
-  env->ReleaseStringUTFChars(jdst, dst);
-  env->ReleaseStringUTFChars(jvar, variable);
 }
 /* Missing calls
    JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAdd(JNIEnv *, jclass, jstring, jstring, jdouble)
index 9ce6ea3..771ad2a 100644 (file)
@@ -12,7 +12,6 @@
 jclass jxbt_get_class(JNIEnv * env, const char *name)
 {
   jclass cls = env->FindClass(name);
-
   if (not cls) {
     jxbt_throw_jni(env, std::string("Class ") + name + " not found");
     return nullptr;
@@ -23,20 +22,17 @@ jclass jxbt_get_class(JNIEnv * env, const char *name)
 
 jmethodID jxbt_get_jmethod(JNIEnv * env, jclass cls, const char *name, const char *signature)
 {
-  jmethodID id;
-
   if (not cls)
     return nullptr;
-  id = env->GetMethodID(cls, name, signature);
 
+  jmethodID id = env->GetMethodID(cls, name, signature);
   if (not id) {
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
-    auto jclassname       = (jstring)env->CallObjectMethod(cls, tostr_id, nullptr);
-    const char* classname = env->GetStringUTFChars(jclassname, nullptr);
-
-    env->ReleaseStringUTFChars(jclassname, classname);
+    auto jclassname    = (jstring)env->CallObjectMethod(cls, tostr_id, nullptr);
+    jstring_wrapper classname(env, jclassname);
+    auto msg = std::string("Cannot find method") + name + "(" + signature + ") in " + classname.value;
 
-    jxbt_throw_jni(env, std::string("Cannot find method") + name + "(" + signature + ") in " + classname);
+    jxbt_throw_jni(env, msg);
     return nullptr;
   }
 
@@ -45,20 +41,17 @@ jmethodID jxbt_get_jmethod(JNIEnv * env, jclass cls, const char *name, const cha
 
 jmethodID jxbt_get_static_jmethod(JNIEnv * env, jclass cls, const char *name, const char *signature)
 {
-  jmethodID id;
-
   if (not cls)
     return nullptr;
-  id = env->GetStaticMethodID(cls, name, signature);
 
+  jmethodID id = env->GetStaticMethodID(cls, name, signature);
   if (not id) {
     jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
     auto jclassname       = (jstring)env->CallObjectMethod(cls, tostr_id, nullptr);
-    const char* classname = env->GetStringUTFChars(jclassname, nullptr);
-
-    env->ReleaseStringUTFChars(jclassname, classname);
+    jstring_wrapper classname(env, jclassname);
+    auto msg = std::string("Cannot find static method") + name + "(" + signature + ") in " + classname.value;
 
-    jxbt_throw_jni(env, std::string("Cannot find static method") + name + "(" + signature + ") in " + classname);
+    jxbt_throw_jni(env, msg);
     return nullptr;
   }
 
@@ -67,15 +60,11 @@ jmethodID jxbt_get_static_jmethod(JNIEnv * env, jclass cls, const char *name, co
 
 jmethodID jxbt_get_static_smethod(JNIEnv * env, const char *classname, const char *name, const char *signature)
 {
-  jclass cls;
-  jmethodID id;
-  cls = jxbt_get_class(env, classname);
-
+  jclass cls = jxbt_get_class(env, classname);
   if (not cls)
     return nullptr;
 
-  id = env->GetStaticMethodID(cls, name, signature);
-
+  jmethodID id = env->GetStaticMethodID(cls, name, signature);
   if (not id) {
     jxbt_throw_jni(env, std::string("Cannot find static method") + name + "(" + signature + ") in " + classname);
     return nullptr;
@@ -85,15 +74,11 @@ jmethodID jxbt_get_static_smethod(JNIEnv * env, const char *classname, const cha
 
 jmethodID jxbt_get_smethod(JNIEnv * env, const char *classname, const char *name, const char *signature)
 {
-  jclass cls;
-  jmethodID id;
-  cls = jxbt_get_class(env, classname);
-
+  jclass cls = jxbt_get_class(env, classname);
   if (not cls)
     return nullptr;
 
-  id = env->GetMethodID(cls, name, signature);
-
+  jmethodID id = env->GetMethodID(cls, name, signature);
   if (not id) {
     jxbt_throw_jni(env, std::string("Cannot find method") + name + "(" + signature + ") in " + classname);
     return nullptr;
@@ -103,13 +88,10 @@ jmethodID jxbt_get_smethod(JNIEnv * env, const char *classname, const char *name
 
 jfieldID jxbt_get_jfield(JNIEnv * env, jclass cls, const char *name, const char *signature)
 {
-  jfieldID id;
-
   if (not cls)
     return nullptr;
 
-  id = env->GetFieldID(cls, name, signature);
-
+  jfieldID id = env->GetFieldID(cls, name, signature);
   if (not id) {
     jmethodID getname_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
     auto jclassname       = (jstring)env->CallObjectMethod(cls, getname_id, nullptr);
@@ -128,13 +110,10 @@ jfieldID jxbt_get_jfield(JNIEnv * env, jclass cls, const char *name, const char
 jfieldID jxbt_get_sfield(JNIEnv * env, const char *classname, const char *name, const char *signature)
 {
   jclass cls = jxbt_get_class(env, classname);
-  jfieldID id;
-
   if (not cls)
     return nullptr;
 
-  id = env->GetFieldID(cls, name, signature);
-
+  jfieldID id = env->GetFieldID(cls, name, signature);
   if (not id) {
     jxbt_throw_jni(env, std::string("Cannot find field") + signature + " " + name + " in " + classname);
     return nullptr;
index 4106d32..c882d5c 100644 (file)
@@ -57,4 +57,34 @@ void jxbt_throw_time_out_failure(JNIEnv* env, const std::string& details);
 /**Thrown when a task is canceled */
 void jxbt_throw_task_cancelled(JNIEnv* env, const std::string& details);
 
+class jstring_wrapper {
+  JNIEnv* env_  = nullptr;
+  jstring jstr_ = nullptr;
+
+public:
+  const char* value = nullptr;
+
+  jstring_wrapper(JNIEnv* env, jstring jstr) : env_(env), jstr_(jstr)
+  {
+    if (jstr != nullptr)
+      value = env_->GetStringUTFChars(jstr_, nullptr);
+  }
+  void reset(JNIEnv* env, jstring jstr)
+  {
+    if (jstr_ != nullptr)
+      env_->ReleaseStringUTFChars(jstr_, value);
+    env_  = env;
+    jstr_ = jstr;
+    if (jstr != nullptr)
+      value = env_->GetStringUTFChars(jstr_, nullptr);
+  }
+  ~jstring_wrapper()
+  {
+    if (jstr_ != nullptr)
+      env_->ReleaseStringUTFChars(jstr_, value);
+  }
+  operator const char*() const { return value; }
+  operator const std::string() const { return std::string(value); }
+};
+
 #endif
similarity index 100%
rename from src/simdag/dax.dtd
rename to src/dag/dax.dtd
similarity index 99%
rename from src/simdag/dax_dtd.c
rename to src/dag/dax_dtd.c
index 73b43cd..6be8241 100644 (file)
@@ -1476,7 +1476,7 @@ int yy_flex_debug = 0;
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-/* Validating XML processor for src/simdag/dax.dtd.
+/* Validating XML processor for src/dag/dax.dtd.
  *
  * This program was generated with the FleXML XML processor generator.
  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
similarity index 99%
rename from src/simdag/dax_dtd.h
rename to src/dag/dax_dtd.h
index 1d218f1..d6205a0 100644 (file)
@@ -1,4 +1,4 @@
-/* XML processor/application API for src/simdag/dax.dtd.
+/* XML processor/application API for src/dag/dax.dtd.
  *
  * This program was generated with the FleXML XML processor generator.
  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
diff --git a/src/dag/loaders.cpp b/src/dag/loaders.cpp
new file mode 100644 (file)
index 0000000..2b9eaa2
--- /dev/null
@@ -0,0 +1,406 @@
+/* Copyright (c) 2009-2021. 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 "src/internal_config.h"
+#include <algorithm>
+#include <map>
+#include <simgrid/s4u/Comm.hpp>
+#include <simgrid/s4u/Engine.hpp>
+#include <simgrid/s4u/Exec.hpp>
+#include <stdexcept>
+#include <xbt/asserts.h>
+#include <xbt/file.hpp>
+#include <xbt/log.h>
+#include <xbt/misc.h>
+
+#include "dax_dtd.h"
+#include "dax_dtd.c"
+
+#if HAVE_GRAPHVIZ
+#include <graphviz/cgraph.h>
+#endif
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(dag_parsing, "Generation DAGs from files");
+
+/* Ensure that transfer tasks have unique names even though a file is used several times */
+static void uniq_transfer_task_name(simgrid::s4u::Comm* comm)
+{
+  const auto& child  = comm->get_successors().front();
+  const auto& parent = *(comm->get_dependencies().begin());
+
+  std::string new_name = parent->get_name() + "_" + comm->get_name() + "_" + child->get_name();
+
+  comm->set_name(new_name)->vetoable_start();
+}
+
+static bool check_for_cycle(const std::vector<simgrid::s4u::ActivityPtr>& dag)
+{
+  std::vector<simgrid::s4u::ActivityPtr> current;
+
+  for (const auto& a : dag)
+    if (dynamic_cast<simgrid::s4u::Exec*>(a.get()) != nullptr && a->is_waited_by() == 0)
+      current.push_back(a);
+
+  while (not current.empty()) {
+    std::vector<simgrid::s4u::ActivityPtr> next;
+    for (auto const& a : current) {
+      a->mark();
+      for (auto const& pred : a->get_dependencies()) {
+        if (dynamic_cast<simgrid::s4u::Comm*>(pred.get()) != nullptr) {
+          pred->mark();
+          // Comms have only one predecessor
+          auto pred_pred = *(pred->get_dependencies().begin());
+          if (std::none_of(pred_pred->get_successors().begin(), pred_pred->get_successors().end(),
+                           [](const simgrid::s4u::ActivityPtr& act) { return not act->is_marked(); }))
+            next.push_back(pred_pred);
+        } else {
+          if (std::none_of(pred->get_successors().begin(), pred->get_successors().end(),
+                           [](const simgrid::s4u::ActivityPtr& act) { return not act->is_marked(); }))
+            next.push_back(pred);
+        }
+      }
+    }
+    current.clear();
+    current = next;
+  }
+
+  return not std::any_of(dag.begin(), dag.end(), [](const simgrid::s4u::ActivityPtr& a) { return not a->is_marked(); });
+}
+
+static YY_BUFFER_STATE input_buffer;
+
+namespace simgrid {
+namespace s4u {
+
+static std::vector<ActivityPtr> result;
+static std::map<std::string, ExecPtr, std::less<>> jobs;
+static std::map<std::string, Comm*, std::less<>> files;
+static ExecPtr current_job;
+
+/** @brief loads a DAX file describing a DAG
+ *
+ * See https://confluence.pegasus.isi.edu/display/pegasus/WorkflowGenerator for more details.
+ */
+std::vector<ActivityPtr> create_DAG_from_DAX(const std::string& filename)
+{
+  FILE* in_file = fopen(filename.c_str(), "r");
+  xbt_assert(in_file, "Unable to open \"%s\"\n", filename.c_str());
+  input_buffer = dax__create_buffer(in_file, 10);
+  dax__switch_to_buffer(input_buffer);
+  dax_lineno = 1;
+
+  auto root_task = Exec::init()->set_name("root")->set_flops_amount(0);
+  root_task->vetoable_start();
+
+  result.push_back(root_task);
+
+  auto end_task = Exec::init()->set_name("end")->set_flops_amount(0);
+  end_task->vetoable_start();
+
+  xbt_assert(dax_lex() == 0, "Parse error in %s: %s", filename.c_str(), dax__parse_err_msg());
+  dax__delete_buffer(input_buffer);
+  fclose(in_file);
+  dax_lex_destroy();
+
+  /* And now, post-process the files.
+   * We want a file task per pair of computation tasks exchanging the file. Duplicate on need
+   * Files not produced in the system are said to be produced by root task (top of DAG).
+   * Files not consumed in the system are said to be consumed by end task (bottom of DAG).
+   */
+  CommPtr file;
+
+  for (auto const& elm : files) {
+    file = elm.second;
+    CommPtr newfile;
+    if (file->dependencies_solved()) {
+      for (auto const& it : file->get_successors()) {
+        newfile = Comm::sendto_init()->set_name(file->get_name())->set_payload_size(file->get_remaining());
+        root_task->add_successor(newfile);
+        newfile->add_successor(it);
+        result.push_back(newfile);
+      }
+    }
+    if (file->is_waited_by() == 0) {
+      for (auto const& it : file->get_dependencies()) {
+        newfile = Comm::sendto_init()->set_name(file->get_name())->set_payload_size(file->get_remaining());
+        it->add_successor(newfile);
+        newfile->add_successor(end_task);
+        result.push_back(newfile);
+      }
+    }
+    for (auto const& it : file->get_dependencies()) {
+      for (auto const& it2 : file->get_successors()) {
+        if (it == it2) {
+          XBT_WARN("File %s is produced and consumed by task %s."
+                   "This loop dependency will prevent the execution of the task.",
+                   file->get_cname(), it->get_cname());
+        }
+        newfile = Comm::sendto_init()->set_name(file->get_name())->set_payload_size(file->get_remaining());
+        it->add_successor(newfile);
+        newfile->add_successor(it2);
+        result.push_back(newfile);
+      }
+    }
+    /* Free previous copy of the files */
+    file->destroy();
+  }
+
+  /* Push end task last */
+  result.push_back(end_task);
+
+  for (const auto& a : result) {
+    auto* comm = dynamic_cast<Comm*>(a.get());
+    if (comm != nullptr) {
+      uniq_transfer_task_name(comm);
+    } else {
+      /* If some tasks do not take files as input, connect them to the root
+       * if they don't produce files, connect them to the end node.
+       */
+      if ((a != root_task) && (a != end_task)) {
+        if (a->dependencies_solved())
+          root_task->add_successor(a);
+        if (a->is_waited_by() == 0)
+          a->add_successor(end_task);
+      }
+    }
+  }
+
+  if (not check_for_cycle(result)) {
+    XBT_ERROR("The DAX described in %s is not a DAG. It contains a cycle.",
+              simgrid::xbt::Path(filename).get_base_name().c_str());
+    for (const auto& a : result)
+      a->destroy();
+    result.clear();
+  }
+
+  return result;
+}
+
+#if HAVE_GRAPHVIZ
+std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
+{
+  FILE* in_file = fopen(filename.c_str(), "r");
+  xbt_assert(in_file != nullptr, "Failed to open file: %s", filename.c_str());
+
+  Agraph_t* dag_dot = agread(in_file, NIL(Agdisc_t*));
+
+  std::unordered_map<std::string, ActivityPtr> activities;
+  std::vector<ActivityPtr> dag;
+
+  ActivityPtr root;
+  ActivityPtr end;
+  ActivityPtr act;
+  /* Create all the nodes */
+  Agnode_t* node = nullptr;
+  for (node = agfstnode(dag_dot); node; node = agnxtnode(dag_dot, node)) {
+    char* name    = agnameof(node);
+    double amount = atof(agget(node, (char*)"size"));
+
+    if (activities.find(name) == activities.end()) {
+      XBT_DEBUG("See <Exec id = %s amount = %.0f>", name, amount);
+      act = Exec::init()->set_name(name)->set_flops_amount(amount)->vetoable_start();
+      activities.insert({std::string(name), act});
+      if (strcmp(name, "root") && strcmp(name, "end"))
+        dag.push_back(act);
+    } else {
+      XBT_WARN("Exec '%s' is defined more than once", name);
+    }
+  }
+  /*Check if 'root' and 'end' nodes have been explicitly declared.  If not, create them. */
+  if (activities.find("root") == activities.end())
+    root = Exec::init()->set_name("root")->set_flops_amount(0)->vetoable_start();
+  else
+    root = activities.at("root");
+
+  if (activities.find("end") == activities.end())
+    end = Exec::init()->set_name("end")->set_flops_amount(0)->vetoable_start();
+  else
+    end = activities.at("end");
+
+  /* Create edges */
+  std::vector<Agedge_t*> edges;
+  for (node = agfstnode(dag_dot); node; node = agnxtnode(dag_dot, node)) {
+    edges.clear();
+    for (Agedge_t* edge = agfstout(dag_dot, node); edge; edge = agnxtout(dag_dot, edge))
+      edges.push_back(edge);
+
+    /* Be sure edges are sorted */
+    std::sort(edges.begin(), edges.end(), [](const Agedge_t* a, const Agedge_t* b) { return AGSEQ(a) < AGSEQ(b); });
+
+    for (Agedge_t* edge : edges) {
+      const char* src_name = agnameof(agtail(edge));
+      const char* dst_name = agnameof(aghead(edge));
+      double size          = atof(agget(edge, (char*)"size"));
+
+      ActivityPtr src = activities.at(src_name);
+      ActivityPtr dst = activities.at(dst_name);
+      if (size > 0) {
+        std::string name = std::string(src_name) + "->" + dst_name;
+        XBT_DEBUG("See <Comm id=%s amount = %.0f>", name.c_str(), size);
+        if (activities.find(name) == activities.end()) {
+          act = Comm::sendto_init()->set_name(name)->set_payload_size(size)->vetoable_start();
+          src->add_successor(act);
+          act->add_successor(dst);
+          activities.insert({name, act});
+          dag.push_back(act);
+        } else {
+          XBT_WARN("Comm '%s' is defined more than once", name.c_str());
+        }
+      } else {
+        src->add_successor(dst);
+      }
+    }
+  }
+
+  XBT_DEBUG("All activities have been created, put %s at the beginning and %s at the end", root->get_cname(),
+            end->get_cname());
+  dag.insert(dag.begin(), root);
+  dag.push_back(end);
+
+  /* Connect entry tasks to 'root', and exit tasks to 'end'*/
+  for (const auto& a : dag) {
+    if (a->dependencies_solved() && a != root) {
+      XBT_DEBUG("Activity '%s' has no dependencies. Add dependency from 'root'", a->get_cname());
+      root->add_successor(a);
+    }
+
+    if (a->is_waited_by() == 0 && a != end) {
+      XBT_DEBUG("Activity '%s' has no successors. Add dependency to 'end'", a->get_cname());
+      a->add_successor(end);
+    }
+  }
+  agclose(dag_dot);
+  fclose(in_file);
+
+  if (not check_for_cycle(dag)) {
+    std::string base = simgrid::xbt::Path(filename).get_base_name();
+    XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base.c_str());
+    for (const auto& a : dag)
+      a->destroy();
+    dag.clear();
+  }
+
+  return dag;
+}
+#else
+std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
+{
+  xbt_die("create_DAG_from_dot() is not usable because graphviz was not found.\n"
+          "Please install graphviz, graphviz-dev, and libgraphviz-dev (and erase CMakeCache.txt) before recompiling.");
+}
+#endif
+} // namespace s4u
+} // namespace simgrid
+
+void STag_dax__adag()
+{
+  try {
+    double version = std::stod(std::string(A_dax__adag_version));
+    xbt_assert(version == 2.1, "Expected version 2.1 in <adag> tag, got %f. Fix the parser or your file", version);
+  } catch (const std::invalid_argument&) {
+    throw std::invalid_argument(std::string("Parse error: ") + A_dax__adag_version + " is not a double");
+  }
+}
+
+void STag_dax__job()
+{
+  try {
+    double runtime = std::stod(std::string(A_dax__job_runtime));
+
+    std::string name = std::string(A_dax__job_id) + "@" + A_dax__job_name;
+    runtime *= 4200000000.; /* Assume that timings were done on a 4.2GFlops machine. I mean, why not? */
+    XBT_DEBUG("See <job id=%s runtime=%s %.0f>", A_dax__job_id, A_dax__job_runtime, runtime);
+    simgrid::s4u::current_job = simgrid::s4u::Exec::init()->set_name(name)->set_flops_amount(runtime)->vetoable_start();
+    simgrid::s4u::jobs.insert({A_dax__job_id, simgrid::s4u::current_job});
+    simgrid::s4u::result.push_back(simgrid::s4u::current_job);
+  } catch (const std::invalid_argument&) {
+    throw std::invalid_argument(std::string("Parse error: ") + A_dax__job_runtime + " is not a double");
+  }
+}
+
+void STag_dax__uses()
+{
+  double size;
+  try {
+    size = std::stod(std::string(A_dax__uses_size));
+  } catch (const std::invalid_argument&) {
+    throw std::invalid_argument(std::string("Parse error: ") + A_dax__uses_size + " is not a double");
+  }
+  bool is_input = (A_dax__uses_link == A_dax__uses_link_input);
+
+  XBT_DEBUG("See <uses file=%s %s>", A_dax__uses_file, (is_input ? "in" : "out"));
+  auto it = simgrid::s4u::files.find(A_dax__uses_file);
+  simgrid::s4u::CommPtr file;
+  if (it == simgrid::s4u::files.end()) {
+    file = simgrid::s4u::Comm::sendto_init()->set_name(A_dax__uses_file)->set_payload_size(size);
+    simgrid::s4u::files[A_dax__uses_file] = file.get();
+  } else {
+    file = it->second;
+    if (file->get_remaining() < size || file->get_remaining() > size) {
+      XBT_WARN("Ignore file %s size redefinition from %.0f to %.0f", A_dax__uses_file, file->get_remaining(), size);
+    }
+  }
+  if (is_input) {
+    file->add_successor(simgrid::s4u::current_job);
+  } else {
+    simgrid::s4u::current_job->add_successor(file);
+    if (file->get_dependencies().size() > 1) {
+      XBT_WARN("File %s created at more than one location...", file->get_cname());
+    }
+  }
+}
+
+static simgrid::s4u::ExecPtr current_child;
+void STag_dax__child()
+{
+  auto job = simgrid::s4u::jobs.find(A_dax__child_ref);
+  if (job != simgrid::s4u::jobs.end()) {
+    current_child = job->second;
+  } else {
+    throw std::out_of_range(std::string("Parse error on line ") + std::to_string(dax_lineno) +
+                            ": Asked to add dependencies to the non-existent " + A_dax__child_ref + "task");
+  }
+}
+
+void ETag_dax__child()
+{
+  current_child = nullptr;
+}
+
+void STag_dax__parent()
+{
+  auto job = simgrid::s4u::jobs.find(A_dax__parent_ref);
+  if (job != simgrid::s4u::jobs.end()) {
+    auto parent = job->second;
+    parent->add_successor(current_child);
+    XBT_DEBUG("Control-flow dependency from %s to %s", current_child->get_cname(), parent->get_cname());
+  } else {
+    throw std::out_of_range(std::string("Parse error on line ") + std::to_string(dax_lineno) +
+                            ": Asked to add a dependency from " + current_child->get_name() + " to " +
+                            A_dax__parent_ref + ", but " + A_dax__parent_ref + " does not exist");
+  }
+}
+
+void ETag_dax__adag()
+{
+  XBT_DEBUG("See </adag>");
+}
+
+void ETag_dax__job()
+{
+  simgrid::s4u::current_job = nullptr;
+  XBT_DEBUG("See </job>");
+}
+
+void ETag_dax__parent()
+{
+  XBT_DEBUG("See </parent>");
+}
+
+void ETag_dax__uses()
+{
+  XBT_DEBUG("See </uses>");
+}
index 16f8b15..9016223 100644 (file)
@@ -384,13 +384,13 @@ static void on_simulation_start()
   XBT_DEBUG("Filename %s is open for writing", filename.c_str());
 
   if (format == "Paje") {
-    Container::on_creation.connect(on_container_creation_paje);
-    Container::on_destruction.connect(on_container_destruction_paje);
-    EntityValue::on_creation.connect(on_entity_value_creation);
-    Type::on_creation.connect(on_type_creation);
-    LinkType::on_creation.connect(on_link_type_creation);
-    PajeEvent::on_creation.connect(on_event_creation);
-    PajeEvent::on_destruction.connect(on_event_destruction);
+    Container::on_creation_cb(on_container_creation_paje);
+    Container::on_destruction_cb(on_container_destruction_paje);
+    EntityValue::on_creation_cb(on_entity_value_creation);
+    Type::on_creation_cb(on_type_creation);
+    LinkType::on_creation_cb(on_link_type_creation);
+    PajeEvent::on_creation_cb(on_event_creation);
+    PajeEvent::on_destruction_cb(on_event_destruction);
 
     paje::dump_generator_version();
 
@@ -404,9 +404,9 @@ static void on_simulation_start()
     paje::dump_header(trace_basic, TRACE_display_sizes());
   } else {
     trace_format = TraceFormat::Ti;
-    Container::on_creation.connect(on_container_creation_ti);
-    Container::on_destruction.connect(on_container_destruction_ti);
-    StateEvent::on_destruction.connect(on_state_event_destruction);
+    Container::on_creation_cb(on_container_creation_ti);
+    Container::on_destruction_cb(on_container_destruction_ti);
+    StateEvent::on_destruction_cb(on_state_event_destruction);
   }
 
   trace_active = true;
@@ -464,10 +464,10 @@ void init()
                             6);
 
   /* Connect Engine callbacks */
-  s4u::Engine::on_platform_creation.connect(on_simulation_start);
-  s4u::Engine::on_time_advance.connect([](double /*time_delta*/) { dump_buffer(false); });
-  s4u::Engine::on_deadlock.connect(on_simulation_end);
-  s4u::Engine::on_simulation_end.connect(on_simulation_end);
+  s4u::Engine::on_platform_creation_cb(on_simulation_start);
+  s4u::Engine::on_time_advance_cb([](double /*time_delta*/) { dump_buffer(false); });
+  s4u::Engine::on_deadlock_cb(on_simulation_end);
+  s4u::Engine::on_simulation_end_cb(on_simulation_end);
 }
 } // namespace instr
 } // namespace simgrid
index 8ce3d7f..c10ab2b 100644 (file)
@@ -30,10 +30,14 @@ class Container {
 protected:
   static void set_root(Container* root) { root_container_ = root; }
 
-public:
+private:
   static xbt::signal<void(Container const&)> on_creation;
   static xbt::signal<void(Container const&)> on_destruction;
 
+public:
+  static void on_creation_cb(const std::function<void(Container const&)>& cb) { on_creation.connect(cb); }
+  static void on_destruction_cb(const std::function<void(Container const&)>& cb) { on_destruction.connect(cb); }
+
   explicit Container(const std::string& name, const std::string& type_name, Container* parent);
   Container(const Container&) = delete;
   Container& operator=(const Container&) = delete;
index 17aab29..10c3b3b 100644 (file)
@@ -46,10 +46,13 @@ inline std::ostream& operator<<(std::ostream& os, PajeEventType event)
 class PajeEvent {
   Container* container_;
   Type* type_;
-public:
   static xbt::signal<void(PajeEvent&)> on_creation;
   static xbt::signal<void(PajeEvent const&)> on_destruction;
 
+public:
+  static void on_creation_cb(const std::function<void(PajeEvent&)>& cb) { on_creation.connect(cb); }
+  static void on_destruction_cb(const std::function<void(PajeEvent const&)>& cb) { on_destruction.connect(cb); }
+
   double timestamp_;
   PajeEventType eventType_;
   std::stringstream stream_;
@@ -83,8 +86,10 @@ class StateEvent : public PajeEvent {
 #endif
   std::unique_ptr<TIData> extra_;
 
-public:
   static xbt::signal<void(StateEvent const&)> on_destruction;
+
+public:
+  static void on_destruction_cb(const std::function<void(StateEvent const&)>& cb) { on_destruction.connect(cb); }
   StateEvent(Container* container, Type* type, PajeEventType event_type, EntityValue* value, TIData* extra);
   ~StateEvent() override { on_destruction(*this); }
   bool has_extra() const { return extra_ != nullptr; }
index b30eb76..d09cb2b 100644 (file)
@@ -26,11 +26,16 @@ class Type {
   std::map<std::string, std::unique_ptr<Type>, std::less<>> children_;
   Container* issuer_ = nullptr;
 
+  static xbt::signal<void(Type const&, PajeEventType event_type)> on_creation;
+
 protected:
   Container* get_issuer() const { return issuer_; }
 
 public:
-  static xbt::signal<void(Type const&, PajeEventType event_type)> on_creation;
+  static void on_creation_cb(const std::function<void(Type const&, PajeEventType event_type)>& cb)
+  {
+    on_creation.connect(cb);
+  }
 
   Type(PajeEventType event_type, const std::string& name, const std::string& alias, const std::string& color,
        Type* parent);
@@ -94,8 +99,13 @@ public:
 };
 
 class LinkType : public ValueType {
-public:
   static xbt::signal<void(LinkType const&, Type const&, Type const&)> on_creation;
+
+public:
+  static void on_creation_cb(const std::function<void(LinkType const&, Type const&, Type const&)>& cb)
+  {
+    on_creation.connect(cb);
+  }
   LinkType(const std::string& name, const Type* source, const Type* dest, const std::string& alias, Type* parent)
       : ValueType(PajeEventType::DefineLinkType, name, alias, parent)
   {
index ee9d3f9..c679fd5 100644 (file)
@@ -18,8 +18,10 @@ class EntityValue {
   std::string color_;
   Type* parent_;
 
-public:
   static xbt::signal<void(const EntityValue&)> on_creation;
+
+public:
+  static void on_creation_cb(const std::function<void(const EntityValue&)>& cb) { on_creation.connect(cb); }
   explicit EntityValue(const std::string& name, const std::string& color, Type* parent);
 
   long long int get_id() const { return id_; }
index 67cf075..c47e879 100644 (file)
@@ -422,70 +422,70 @@ void define_callbacks()
   // always need the callbacks to zones (we need only the root zone), to create the rootContainer and the rootType
   // properly
   if (TRACE_needs_platform()) {
-    s4u::Engine::on_platform_created.connect(on_platform_created);
-    s4u::Host::on_creation.connect(on_host_creation);
-    s4u::Host::on_speed_change.connect([](s4u::Host const& host) {
+    s4u::Engine::on_platform_created_cb(on_platform_created);
+    s4u::Host::on_creation_cb(on_host_creation);
+    s4u::Host::on_speed_change_cb([](s4u::Host const& host) {
       Container::by_name(host.get_name())
           ->get_variable("speed")
           ->set_event(simgrid_get_clock(), host.get_core_count() * host.get_available_speed());
     });
-    s4u::Link::on_creation.connect(on_link_creation);
-    s4u::Link::on_bandwidth_change.connect([](s4u::Link const& link) {
+    s4u::Link::on_creation_cb(on_link_creation);
+    s4u::Link::on_bandwidth_change_cb([](s4u::Link const& link) {
       Container::by_name(link.get_name())
           ->get_variable("bandwidth")
           ->set_event(simgrid_get_clock(), sg_bandwidth_factor * link.get_bandwidth());
     });
-    s4u::NetZone::on_seal.connect([](s4u::NetZone const& /*netzone*/) { currentContainer.pop_back(); });
+    s4u::NetZone::on_seal_cb([](s4u::NetZone const& /*netzone*/) { currentContainer.pop_back(); });
     kernel::routing::NetPoint::on_creation.connect([](kernel::routing::NetPoint const& netpoint) {
       if (netpoint.is_router())
         new RouterContainer(netpoint.get_name(), currentContainer.back());
     });
   }
 
-  s4u::NetZone::on_creation.connect(on_netzone_creation);
+  s4u::NetZone::on_creation_cb(on_netzone_creation);
 
   kernel::resource::CpuAction::on_state_change.connect(on_action_state_change);
-  s4u::Link::on_communication_state_change.connect(on_action_state_change);
+  s4u::Link::on_communication_state_change_cb(on_action_state_change);
 
   if (TRACE_actor_is_enabled()) {
-    s4u::Actor::on_creation.connect(on_actor_creation);
-    s4u::Actor::on_destruction.connect([](s4u::Actor const& actor) {
+    s4u::Actor::on_creation_cb(on_actor_creation);
+    s4u::Actor::on_destruction_cb([](s4u::Actor const& actor) {
       auto container = Container::by_name_or_null(instr_pid(actor));
       if (container != nullptr)
         container->remove_from_parent();
     });
-    s4u::Actor::on_suspend.connect([](s4u::Actor const& actor) {
+    s4u::Actor::on_suspend_cb([](s4u::Actor const& actor) {
       Container::by_name(instr_pid(actor))->get_state("ACTOR_STATE")->push_event("suspend");
     });
-    s4u::Actor::on_resume.connect(
+    s4u::Actor::on_resume_cb(
         [](s4u::Actor const& actor) { Container::by_name(instr_pid(actor))->get_state("ACTOR_STATE")->pop_event(); });
-    s4u::Actor::on_sleep.connect([](s4u::Actor const& actor) {
+    s4u::Actor::on_sleep_cb([](s4u::Actor const& actor) {
       Container::by_name(instr_pid(actor))->get_state("ACTOR_STATE")->push_event("sleep");
     });
-    s4u::Actor::on_wake_up.connect(
+    s4u::Actor::on_wake_up_cb(
         [](s4u::Actor const& actor) { Container::by_name(instr_pid(actor))->get_state("ACTOR_STATE")->pop_event(); });
-    s4u::Exec::on_start.connect([](s4u::Exec const&) {
+    s4u::Exec::on_start_cb([](s4u::Exec const&) {
       Container::by_name(instr_pid(*s4u::Actor::self()))->get_state("ACTOR_STATE")->push_event("execute");
     });
-    s4u::Activity::on_completion.connect([](const s4u::Activity&) {
+    s4u::Activity::on_completion_cb([](const s4u::Activity&) {
       Container::by_name(instr_pid(*s4u::Actor::self()))->get_state("ACTOR_STATE")->pop_event();
     });
-    s4u::Comm::on_send.connect([](s4u::Comm const&) {
+    s4u::Comm::on_send_cb([](s4u::Comm const&) {
       Container::by_name(instr_pid(*s4u::Actor::self()))->get_state("ACTOR_STATE")->push_event("send");
     });
-    s4u::Comm::on_recv.connect([](s4u::Comm const&) {
+    s4u::Comm::on_recv_cb([](s4u::Comm const&) {
       Container::by_name(instr_pid(*s4u::Actor::self()))->get_state("ACTOR_STATE")->push_event("receive");
     });
-    s4u::Actor::on_host_change.connect(on_actor_host_change);
+    s4u::Actor::on_host_change_cb(on_actor_host_change);
   }
 
   if (TRACE_smpi_is_enabled() && TRACE_smpi_is_computing()) {
-    s4u::Exec::on_start.connect([](s4u::Exec const& exec) {
+    s4u::Exec::on_start_cb([](s4u::Exec const& exec) {
       Container::by_name(std::string("rank-") + std::to_string(s4u::Actor::self()->get_pid()))
           ->get_state("MPI_STATE")
           ->push_event("computing", new CpuTIData("compute", exec.get_cost()));
     });
-    s4u::Activity::on_completion.connect([](const s4u::Activity&) {
+    s4u::Activity::on_completion_cb([](const s4u::Activity&) {
       Container::by_name(std::string("rank-") + std::to_string(s4u::Actor::self()->get_pid()))
           ->get_state("MPI_STATE")
           ->pop_event();
@@ -493,18 +493,18 @@ void define_callbacks()
   }
 
   if (TRACE_vm_is_enabled()) {
-    s4u::Host::on_creation.connect(on_vm_creation);
-    s4u::VirtualMachine::on_start.connect([](s4u::VirtualMachine const& vm) {
+    s4u::Host::on_creation_cb(on_vm_creation);
+    s4u::VirtualMachine::on_start_cb([](s4u::VirtualMachine const& vm) {
       Container::by_name(vm.get_name())->get_state("VM_STATE")->push_event("start");
     });
-    s4u::VirtualMachine::on_started.connect(
+    s4u::VirtualMachine::on_started_cb(
         [](s4u::VirtualMachine const& vm) { Container::by_name(vm.get_name())->get_state("VM_STATE")->pop_event(); });
-    s4u::VirtualMachine::on_suspend.connect([](s4u::VirtualMachine const& vm) {
+    s4u::VirtualMachine::on_suspend_cb([](s4u::VirtualMachine const& vm) {
       Container::by_name(vm.get_name())->get_state("VM_STATE")->push_event("suspend");
     });
-    s4u::VirtualMachine::on_resume.connect(
+    s4u::VirtualMachine::on_resume_cb(
         [](s4u::VirtualMachine const& vm) { Container::by_name(vm.get_name())->get_state("VM_STATE")->pop_event(); });
-    s4u::Host::on_destruction.connect(
+    s4u::Host::on_destruction_cb(
         [](s4u::Host const& host) { Container::by_name(host.get_name())->remove_from_parent(); });
   }
 }
diff --git a/src/instr/jedule/jedule.cpp b/src/instr/jedule/jedule.cpp
deleted file mode 100644 (file)
index d35a805..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (c) 2010-2021. 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 "simgrid/jedule/jedule.hpp"
-#include "simgrid/config.h"
-#include "xbt/asserts.h"
-
-#if SIMGRID_HAVE_JEDULE
-
-namespace simgrid{
-namespace jedule {
-
-void Jedule::add_meta_info(char* key, char* value)
-{
-  xbt_assert(key != nullptr);
-  xbt_assert(value != nullptr);
-
-  this->meta_info_.insert({key, value});
-}
-
-void Jedule::add_event(const Event& event)
-{
-  event_set_.emplace_back(event);
-}
-
-void Jedule::write_output(FILE* file)
-{
-  if (not this->event_set_.empty()) {
-    fprintf(file, "<jedule>\n");
-
-    if (not this->meta_info_.empty()) {
-      fprintf(file, "  <jedule_meta>\n");
-      for (auto const& elm : this->meta_info_)
-        fprintf(file, "        <prop key=\"%s\" value=\"%s\" />\n",elm.first,elm.second);
-      fprintf(file, "  </jedule_meta>\n");
-    }
-
-    fprintf(file, "  <platform>\n");
-    this->root_container_.print(file);
-    fprintf(file, "  </platform>\n");
-
-    fprintf(file, "  <events>\n");
-    for (auto const& event : this->event_set_)
-      event.print(file);
-    fprintf(file, "  </events>\n");
-
-    fprintf(file, "</jedule>\n");
-  }
-}
-
-} // namespace jedule
-} // namespace simgrid
-#endif
diff --git a/src/instr/jedule/jedule_events.cpp b/src/instr/jedule/jedule_events.cpp
deleted file mode 100644 (file)
index eba1dea..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) 2010-2021. 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 "simgrid/jedule/jedule.hpp"
-#include "simgrid/config.h"
-#include "simgrid/s4u/NetZone.hpp"
-#include "xbt/asserts.h"
-
-#if SIMGRID_HAVE_JEDULE
-namespace simgrid{
-namespace jedule{
-
-void Event::add_resources(const std::vector<sg_host_t>& host_selection)
-{
-  get_resource_selection_by_hosts(this->resource_subsets_, host_selection);
-}
-
-void Event::add_characteristic(const char* characteristic)
-{
-  xbt_assert( characteristic != nullptr );
-  this->characteristics_list_.emplace_back(characteristic);
-}
-
-void Event::add_info(char* key, char* value)
-{
-  xbt_assert((key != nullptr) && value != nullptr);
-  this->info_map_.insert({key, value});
-}
-
-void Event::print(FILE* jed_file) const
-{
-  fprintf(jed_file, "    <event>\n");
-  fprintf(jed_file, "      <prop key=\"name\" value=\"%s\" />\n", this->name_.c_str());
-  fprintf(jed_file, "      <prop key=\"start\" value=\"%g\" />\n", this->start_time_);
-  fprintf(jed_file, "      <prop key=\"end\" value=\"%g\" />\n", this->end_time_);
-  fprintf(jed_file, "      <prop key=\"type\" value=\"%s\" />\n", this->type_.c_str());
-
-  xbt_assert(not this->resource_subsets_.empty());
-  fprintf(jed_file, "      <res_util>\n");
-  for (auto const& subset : this->resource_subsets_) {
-    fprintf(jed_file, "        <select resources=\"");
-    fprintf(jed_file, "%s", subset.parent->get_hierarchy_as_string().c_str());
-    fprintf(jed_file, ".[%d-%d]", subset.start_idx, subset.start_idx + subset.nres - 1);
-    fprintf(jed_file, "\" />\n");
-  }
-  fprintf(jed_file, "      </res_util>\n");
-
-  if (not this->characteristics_list_.empty()) {
-    fprintf(jed_file, "      <characteristics>\n");
-    for (auto const& ch : this->characteristics_list_)
-      fprintf(jed_file, "          <characteristic name=\"%s\" />\n", ch.c_str());
-    fprintf(jed_file, "      </characteristics>\n");
-  }
-
-  if (not this->info_map_.empty()) {
-    fprintf(jed_file, "      <info>\n");
-    for (auto const& elm : this->info_map_)
-      fprintf(jed_file, "        <prop key=\"%s\" value=\"%s\" />\n", elm.first.c_str(), elm.second.c_str());
-    fprintf(jed_file, "      </info>\n");
-  }
-
-  fprintf(jed_file, "    </event>\n");
-}
-
-}
-}
-#endif
diff --git a/src/instr/jedule/jedule_platform.cpp b/src/instr/jedule/jedule_platform.cpp
deleted file mode 100644 (file)
index 00f78da..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/* Copyright (c) 2010-2021. 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 "simgrid/jedule/jedule.hpp"
-#include "simgrid/config.h"
-#include "simgrid/host.h"
-#include "simgrid/s4u/NetZone.hpp"
-#include "xbt/asserts.h"
-#include <algorithm>
-
-#if SIMGRID_HAVE_JEDULE
-
-namespace {
-std::unordered_map<const char*, jed_container_t> host2_simgrid_parent_container;
-std::unordered_map<std::string, jed_container_t> container_name2container;
-}
-
-namespace simgrid {
-namespace jedule {
-Subset::Subset(int start_idx, int end_idx, Container* parent)
-    : start_idx(start_idx), nres(end_idx - start_idx + 1), parent(parent)
-{
-}
-
-Container::Container(const std::string& name) : name(name)
-{
-  container_name2container.insert({this->name, this});
-}
-
-void Container::add_child(jed_container_t child)
-{
-  xbt_assert(child != nullptr);
-  children_.emplace_back(child);
-  child->set_parent(this);
-}
-
-void Container::add_resources(const std::vector<sg_host_t>& hosts)
-{
-  children_.clear();
-  last_id_ = 0;
-
-  for (auto const& host : hosts) {
-    const char *host_name = sg_host_get_name(host);
-    this->name2id.insert({host_name, this->last_id_});
-    (this->last_id_)++;
-    host2_simgrid_parent_container.insert({host_name, this});
-    this->resource_list.push_back(host);
-  }
-}
-
-void Container::create_hierarchy(const_sg_netzone_t from_as)
-{
-  if (from_as->get_children().empty()) {
-    // I am no AS
-    // add hosts to jedule platform
-    std::vector<sg_host_t> table = from_as->get_all_hosts();
-    this->add_resources(table);
-  } else {
-    for (auto const& nz : from_as->get_children()) {
-      auto* child_container = new simgrid::jedule::Container(nz->get_name());
-      this->add_child(child_container);
-      child_container->create_hierarchy(nz);
-    }
-  }
-}
-
-int Container::get_child_position(const Container* child) const
-{
-  auto it = std::find_if(begin(children_), end(children_),
-                         [&child](const std::unique_ptr<Container>& c) { return c.get() == child; });
-  return it == end(children_) ? -1 : static_cast<int>(std::distance(begin(children_), it));
-}
-
-std::vector<int> Container::get_hierarchy()
-{
-  if (parent_ == nullptr) {
-    int top_level = 0;
-    std::vector<int> hier_list = {top_level};
-    return hier_list;
-  } else if (parent_->has_children()) {
-    int child_nb = parent_->get_child_position(this);
-    xbt_assert(child_nb > -1);
-    std::vector<int> hier_list = parent_->get_hierarchy();
-    hier_list.insert(hier_list.begin(), child_nb);
-    return hier_list;
-  } else {
-    // we are in the last level
-    return parent_->get_hierarchy();
-  }
-}
-
-std::string Container::get_hierarchy_as_string()
-{
-  std::string output("");
-
-  std::vector<int> hier_list = this->get_hierarchy();
-
-  bool sep = false;
-  for (auto const& id : hier_list) {
-    if (sep)
-      output += '.';
-    else
-      sep = true;
-    output += std::to_string(id);
-  }
-
-  return output;
-}
-
-void Container::print_resources(FILE* jed_file)
-{
-  xbt_assert(not this->resource_list.empty());
-
-  std::string resid = this->get_hierarchy_as_string();
-
-  fprintf(jed_file, "      <rset id=\"%s\" nb=\"%zu\" names=\"", resid.c_str(), this->resource_list.size());
-  bool sep = false;
-  for (auto const& res : this->resource_list) {
-    if (sep)
-      putc('|', jed_file);
-    else
-      sep = true;
-    const char * res_name = sg_host_get_name(res);
-    fprintf(jed_file, "%s", res_name);
-  }
-  fprintf(jed_file, "\" />\n");
-}
-
-void Container::print(FILE* jed_file)
-{
-  fprintf(jed_file, "    <res name=\"%s\">\n", this->name.c_str());
-  if (not children_.empty()) {
-    for (auto const& child : children_) {
-      child->print(jed_file);
-    }
-  } else {
-    this->print_resources(jed_file);
-  }
-  fprintf(jed_file, "    </res>\n");
-}
-
-} // namespace jedule
-} // namespace simgrid
-
-static void add_subsets_to(std::vector<simgrid::jedule::Subset>& subset_list, const std::vector<const char*>& hostgroup,
-                           jed_container_t parent)
-{
-  // get ids for each host
-  // sort ids
-  // compact ids
-  // create subset for each id group
-
-  xbt_assert( parent != nullptr );
-
-  std::vector<unsigned int> id_list;
-
-  for (auto const& host_name : hostgroup) {
-    xbt_assert( host_name != nullptr );
-    const simgrid::jedule::Container* parent_cont = host2_simgrid_parent_container.at(host_name);
-    unsigned int id             = parent_cont->get_id_by_name(host_name);
-    id_list.push_back(id);
-  }
-  std::sort(id_list.begin(), id_list.end());
-
-  size_t nb_ids = id_list.size();
-  size_t start  = 0;
-  size_t pos    = start;
-  for (size_t i = 0; i < nb_ids; i++) {
-    if (id_list[i] - id_list[pos] > 1) {
-      subset_list.emplace_back(id_list[start], id_list[pos], parent);
-      start = i;
-
-      if (i == nb_ids - 1) {
-        subset_list.emplace_back(id_list[i], id_list[i], parent);
-      }
-    } else {
-      if (i == nb_ids - 1) {
-        subset_list.emplace_back(id_list[start], id_list[i], parent);
-      }
-    }
-    pos = i;
-  }
-}
-
-void get_resource_selection_by_hosts(std::vector<simgrid::jedule::Subset>& subset_list,
-                                     const std::vector<sg_host_t>& host_list)
-{
-  // for each host name
-  //  find parent container
-  //  group by parent container
-  std::unordered_map<const char*, std::vector<const char*>> parent2hostgroup;
-  for (auto const& host : host_list) {
-    const char *host_name = sg_host_get_name(host);
-    const simgrid::jedule::Container* parent = host2_simgrid_parent_container.at(host_name);
-    xbt_assert( parent != nullptr );
-
-    auto host_group = parent2hostgroup.find(parent->get_cname());
-    if (host_group == parent2hostgroup.end())
-      parent2hostgroup.insert({parent->get_cname(), std::vector<const char*>(1, host_name)});
-    else
-      host_group->second.push_back(host_name);
-  }
-
-  for (auto const& elm : parent2hostgroup) {
-    jed_container_t parent = container_name2container.at(elm.first);
-    add_subsets_to(subset_list, elm.second, parent);
-  }
-}
-
-#endif
diff --git a/src/instr/jedule/jedule_sd_binding.cpp b/src/instr/jedule/jedule_sd_binding.cpp
deleted file mode 100644 (file)
index c3a6449..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) 2010-2021. 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 "simgrid/jedule/jedule.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/NetZone.hpp"
-#include "src/simdag/simdag_private.hpp"
-#include "xbt/virtu.h"
-
-#if SIMGRID_HAVE_JEDULE
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(jed_sd, sd, "Jedule SimDag binding");
-
-jedule_t my_jedule;
-
-void jedule_log_sd_event(const_SD_task_t task)
-{
-  xbt_assert(task != nullptr);
-
-  simgrid::jedule::Event event(task->get_name(), task->get_start_time(), task->get_finish_time(), "SD");
-  event.add_resources(*task->get_allocation());
-  my_jedule->add_event(event);
-}
-
-void jedule_sd_init()
-{
-  const_sg_netzone_t root_comp = simgrid::s4u::Engine::get_instance()->get_netzone_root();
-  XBT_DEBUG("root name %s\n", root_comp->get_cname());
-
-  my_jedule = new simgrid::jedule::Jedule(root_comp->get_name());
-}
-
-void jedule_sd_exit()
-{
-  delete my_jedule;
-}
-
-void jedule_sd_dump(const char * filename)
-{
-  if (my_jedule) {
-    std::string fname;
-    if (not filename) {
-      fname = simgrid::xbt::binary_name + ".jed";
-    } else {
-      fname = filename;
-    }
-
-    FILE* fh = fopen(fname.c_str(), "w");
-    xbt_assert(fh != nullptr, "Failed to open file: %s", fname.c_str());
-
-    my_jedule->write_output(fh);
-
-    fclose(fh);
-  }
-}
-#endif
index 665e7cb..c9f6f41 100644 (file)
@@ -238,7 +238,7 @@ void EngineImpl::initialize(int* argc, char** argv)
 
   /* register a function to be called by SURF after the environment creation */
   sg_platf_init();
-  s4u::Engine::on_platform_created.connect([this]() { this->presolve(); });
+  s4u::Engine::on_platform_created_cb([this]() { this->presolve(); });
 
   if (config::get_value<bool>("debug/clean-atexit"))
     atexit(shutdown);
@@ -347,6 +347,15 @@ void EngineImpl::shutdown()
   instance_ = nullptr;
 }
 
+void EngineImpl::seal_platform() const
+{
+  /* sealing resources before run: links */
+  for (auto const& kv : links_)
+    kv.second->get_iface()->seal();
+  /* seal netzone root, recursively seal children netzones, hosts and disks */
+  netzone_root_->seal();
+}
+
 void EngineImpl::load_platform(const std::string& platf)
 {
   double start = xbt_os_time();
@@ -689,6 +698,8 @@ double EngineImpl::solve(double max_date) const
 
 void EngineImpl::run(double max_date)
 {
+  seal_platform();
+
   if (MC_record_replay_is_active()) {
     mc::replay(MC_record_path());
     empty_trash();
index ed0c976..2fcab66 100644 (file)
@@ -94,6 +94,7 @@ public:
   void initialize(int* argc, char** argv);
   void load_platform(const std::string& platf);
   void load_deployment(const std::string& file) const;
+  void seal_platform() const;
   void register_function(const std::string& name, const actor::ActorCodeFactory& code);
   void register_default(const actor::ActorCodeFactory& code);
 
index e429c16..e1ab67e 100644 (file)
@@ -80,6 +80,8 @@ static void remove_active_exec(s4u::Activity& task)
   const auto* exec = dynamic_cast<s4u::Exec*>(&task);
   if (exec == nullptr)
     return;
+  if (not exec->is_assigned())
+    return;
   const s4u::VirtualMachine* vm = dynamic_cast<s4u::VirtualMachine*>(exec->get_host());
   if (vm != nullptr) {
     VirtualMachineImpl* vm_impl = vm->get_vm_impl();
@@ -116,9 +118,9 @@ static void remove_active_activity(kernel::activity::ActivityImpl const& act)
 
 VMModel::VMModel(const std::string& name) : HostModel(name)
 {
-  s4u::Host::on_state_change.connect(host_state_change);
-  s4u::Exec::on_start.connect(add_active_exec);
-  s4u::Activity::on_completion.connect(remove_active_exec);
+  s4u::Host::on_state_change_cb(host_state_change);
+  s4u::Exec::on_start_cb(add_active_exec);
+  s4u::Activity::on_completion_cb(remove_active_exec);
   activity::ActivityImpl::on_resumed.connect(add_active_activity);
   activity::ActivityImpl::on_suspended.connect(remove_active_activity);
 }
index 7f8f8ee..07cfb6e 100644 (file)
@@ -83,9 +83,9 @@ NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name)
     simgrid::s4u::Engine::on_platform_creation();
 
     /* Initialize the surf models. That must be done after we got all config, and before we need the models.
-     * That is, after the last <config> tag, if any, and before the first of cluster|peer|zone|trace|trace_connect
+     * That is, after the last <config> tag, if any, and before the first of cluster|peer|zone|trace|trace_cb
      *
-     * I'm not sure for <trace> and <trace_connect>, there may be a bug here
+     * I'm not sure for <trace> and <trace_cb>, there may be a bug here
      * (FIXME: check it out by creating a file beginning with one of these tags)
      * but cluster and peer come down to zone creations, so putting this verification here is correct.
      */
@@ -151,6 +151,7 @@ s4u::Host* NetZoneImpl::create_host(const std::string& name, const std::vector<d
   xbt_assert(cpu_model_pm_,
              "Impossible to create host: %s. Invalid CPU model: nullptr. Have you set the parent of this NetZone: %s?",
              name.c_str(), get_cname());
+  xbt_assert(not sealed_, "Impossible to create host: %s. NetZone %s already sealed", name.c_str(), get_cname());
   auto* res = (new resource::HostImpl(name))->get_iface();
   res->set_netpoint((new NetPoint(name, NetPoint::Type::Host))->set_englobing_zone(this));
 
@@ -165,12 +166,19 @@ s4u::Link* NetZoneImpl::create_link(const std::string& name, const std::vector<d
       network_model_,
       "Impossible to create link: %s. Invalid network model: nullptr. Have you set the parent of this NetZone: %s?",
       name.c_str(), get_cname());
+  xbt_assert(not sealed_, "Impossible to create link: %s. NetZone %s already sealed", name.c_str(), get_cname());
   return network_model_->create_link(name, bandwidths)->get_iface();
 }
 
 s4u::SplitDuplexLink* NetZoneImpl::create_split_duplex_link(const std::string& name,
                                                             const std::vector<double>& bandwidths)
 {
+  xbt_assert(
+      network_model_,
+      "Impossible to create link: %s. Invalid network model: nullptr. Have you set the parent of this NetZone: %s?",
+      name.c_str(), get_cname());
+  xbt_assert(not sealed_, "Impossible to create link: %s. NetZone %s already sealed", name.c_str(), get_cname());
+
   auto* link_up                  = network_model_->create_link(name + "_UP", bandwidths);
   auto* link_down                = network_model_->create_link(name + "_DOWN", bandwidths);
   auto link                      = std::make_unique<resource::SplitDuplexLinkImpl>(name, link_up, link_down);
@@ -184,6 +192,7 @@ s4u::Disk* NetZoneImpl::create_disk(const std::string& name, double read_bandwid
   xbt_assert(disk_model_,
              "Impossible to create disk: %s. Invalid disk model: nullptr. Have you set the parent of this NetZone: %s?",
              name.c_str(), get_cname());
+  xbt_assert(not sealed_, "Impossible to create disk: %s. NetZone %s already sealed", name.c_str(), get_cname());
   auto* l = disk_model_->create_disk(name, read_bandwidth, write_bandwidth);
 
   return l->get_iface();
@@ -193,6 +202,7 @@ NetPoint* NetZoneImpl::create_router(const std::string& name)
 {
   xbt_assert(nullptr == s4u::Engine::get_instance()->netpoint_by_name_or_null(name),
              "Refusing to create a router named '%s': this name already describes a node.", name.c_str());
+  xbt_assert(not sealed_, "Impossible to create router: %s. NetZone %s already sealed", name.c_str(), get_cname());
 
   return (new NetPoint(name, NetPoint::Type::Router))->set_englobing_zone(this);
 }
index 3e18336..1187d8b 100644 (file)
@@ -41,7 +41,7 @@ void MSG_init_nocheck(int* argc, char** argv)
     msg_global->sent_msg = 0;
     msg_global->task_copy_callback = nullptr;
     msg_global->process_data_cleanup = nullptr;
-    simgrid::s4u::Actor::on_termination.connect([](simgrid::s4u::Actor const& actor) {
+    simgrid::s4u::Actor::on_termination_cb([](simgrid::s4u::Actor const& actor) {
       // free the data if a function was provided
       void* userdata = sg_actor_get_data(&actor);
       if (userdata && msg_global->process_data_cleanup)
index ad88b62..e22e8b0 100644 (file)
@@ -463,15 +463,15 @@ void sg_storage_file_system_init()
 
   if (not FileSystemDiskExt::EXTENSION_ID.valid()) {
     FileSystemDiskExt::EXTENSION_ID = simgrid::s4u::Disk::extension_create<FileSystemDiskExt>();
-    simgrid::s4u::Disk::on_creation.connect(&on_disk_creation);
+    simgrid::s4u::Disk::on_creation_cb(&on_disk_creation);
   }
 
   if (not FileDescriptorHostExt::EXTENSION_ID.valid()) {
     FileDescriptorHostExt::EXTENSION_ID = simgrid::s4u::Host::extension_create<FileDescriptorHostExt>();
-    simgrid::s4u::Host::on_creation.connect(&on_host_creation);
+    simgrid::s4u::Host::on_creation_cb(&on_host_creation);
   }
-  simgrid::s4u::Engine::on_platform_created.connect(&on_platform_created);
-  simgrid::s4u::Engine::on_simulation_end.connect(&on_simulation_end);
+  simgrid::s4u::Engine::on_platform_created_cb(&on_platform_created);
+  simgrid::s4u::Engine::on_simulation_end_cb(&on_simulation_end);
 }
 
 sg_file_t sg_file_open(const char* fullpath, void* data)
index ef6f7d4..b0677f6 100644 (file)
@@ -295,11 +295,11 @@ public:
         task_id           = 0;
       }
     });
-    simgrid::s4u::Exec::on_start.connect([this](simgrid::s4u::Exec const& activity) {
+    simgrid::s4u::Exec::on_start_cb([this](simgrid::s4u::Exec const& activity) {
       if (activity.get_host() == get_host())
         pre_task();
     });
-    simgrid::s4u::Activity::on_completion.connect([this](simgrid::s4u::Activity& activity) {
+    simgrid::s4u::Activity::on_completion_cb([this](simgrid::s4u::Activity& activity) {
       const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
       if (exec == nullptr) // Only Execs are concerned here
         return;
@@ -444,5 +444,5 @@ void sg_host_dvfs_plugin_init()
 
   sg_host_load_plugin_init();
 
-  simgrid::s4u::Host::on_creation.connect(&on_host_added);
+  simgrid::s4u::Host::on_creation_cb(&on_host_added);
 }
index 18ed351..3b2b483 100644 (file)
@@ -477,11 +477,11 @@ void sg_host_energy_plugin_init()
 
   HostEnergy::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostEnergy>();
 
-  simgrid::s4u::Host::on_creation.connect(&on_creation);
-  simgrid::s4u::Host::on_state_change.connect(&on_host_change);
-  simgrid::s4u::Host::on_speed_change.connect(&on_host_change);
-  simgrid::s4u::Host::on_destruction.connect(&on_host_destruction);
-  simgrid::s4u::Engine::on_simulation_end.connect(&on_simulation_end);
+  simgrid::s4u::Host::on_creation_cb(&on_creation);
+  simgrid::s4u::Host::on_state_change_cb(&on_host_change);
+  simgrid::s4u::Host::on_speed_change_cb(&on_host_change);
+  simgrid::s4u::Host::on_destruction_cb(&on_host_destruction);
+  simgrid::s4u::Engine::on_simulation_end_cb(&on_simulation_end);
   simgrid::kernel::resource::CpuAction::on_state_change.connect(&on_action_state_change);
   // We may only have one actor on a node. If that actor executes something like
   //   compute -> recv -> compute
@@ -489,7 +489,7 @@ void sg_host_energy_plugin_init()
   // that the next trigger would be the 2nd compute, hence ignoring the idle time
   // during the recv call. By updating at the beginning of a compute, we can
   // fix that. (If the cpu is not idle, this is not required.)
-  simgrid::s4u::Exec::on_start.connect([](simgrid::s4u::Exec const& activity) {
+  simgrid::s4u::Exec::on_start_cb([](simgrid::s4u::Exec const& activity) {
     if (activity.get_host_number() == 1) { // We only run on one host
       simgrid::s4u::Host* host         = activity.get_host();
       const simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host);
index 3f95fb4..f2b1457 100644 (file)
@@ -227,13 +227,13 @@ void sg_host_load_plugin_init()
   }
 
   // Make sure that every future host also gets an extension (in case the platform is not loaded yet)
-  simgrid::s4u::Host::on_creation.connect([](simgrid::s4u::Host& host) {
+  simgrid::s4u::Host::on_creation_cb([](simgrid::s4u::Host& host) {
     if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
       return;
     host.extension_set(new HostLoad(&host));
   });
 
-  simgrid::s4u::Exec::on_start.connect([](simgrid::s4u::Exec const& activity) {
+  simgrid::s4u::Exec::on_start_cb([](simgrid::s4u::Exec const& activity) {
     if (activity.get_host_number() == 1) { // We only run on one host
       simgrid::s4u::Host* host         = activity.get_host();
       const simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host);
@@ -249,7 +249,7 @@ void sg_host_load_plugin_init()
       XBT_WARN("HostLoad plugin currently does not support executions on several hosts");
     }
   });
-  simgrid::s4u::Activity::on_completion.connect([](simgrid::s4u::Activity& activity) {
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec == nullptr) // Only Execs are concerned here
       return;
@@ -264,8 +264,8 @@ void sg_host_load_plugin_init()
       XBT_WARN("HostLoad plugin currently does not support executions on several hosts");
     }
   });
-  simgrid::s4u::Host::on_state_change.connect(&on_host_change);
-  simgrid::s4u::Host::on_speed_change.connect(&on_host_change);
+  simgrid::s4u::Host::on_state_change_cb(&on_host_change);
+  simgrid::s4u::Host::on_speed_change_cb(&on_host_change);
 }
 
 /** @brief Returns the current load of that host, as a ratio = achieved_flops / (core_current_speed * core_amount)
index 37366fe..078fd85 100644 (file)
@@ -191,7 +191,7 @@ void sg_link_energy_plugin_init()
 
   xbt_assert(sg_host_count() == 0, "Please call sg_link_energy_plugin_init() before initializing the platform.");
 
-  simgrid::s4u::Link::on_creation.connect([](simgrid::s4u::Link& link) {
+  simgrid::s4u::Link::on_creation_cb([](simgrid::s4u::Link& link) {
     if (link.get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI) {
       XBT_DEBUG("Wired Link created: %s", link.get_cname());
       link.extension_set(new LinkEnergy(&link));
@@ -200,12 +200,12 @@ void sg_link_energy_plugin_init()
     }
   });
 
-  simgrid::s4u::Link::on_state_change.connect([](simgrid::s4u::Link const& link) {
+  simgrid::s4u::Link::on_state_change_cb([](simgrid::s4u::Link const& link) {
     if (link.get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI)
       link.extension<LinkEnergy>()->update();
   });
 
-  simgrid::s4u::Link::on_destruction.connect([](simgrid::s4u::Link const& link) {
+  simgrid::s4u::Link::on_destruction_cb([](simgrid::s4u::Link const& link) {
     if (link.get_name() != "__loopback__" && link.get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI)
       XBT_INFO("Energy consumption of link '%s': %f Joules", link.get_cname(),
                link.extension<LinkEnergy>()->get_consumed_energy());
@@ -214,7 +214,7 @@ void sg_link_energy_plugin_init()
   simgrid::kernel::activity::CommImpl::on_start.connect(&on_communication);
   simgrid::kernel::activity::CommImpl::on_completion.connect(&on_communication);
 
-  simgrid::s4u::Engine::on_simulation_end.connect(&on_simulation_end);
+  simgrid::s4u::Engine::on_simulation_end_cb(&on_simulation_end);
 }
 
 /** @ingroup plugin_link_energy
index eee76c6..bee75ad 100644 (file)
@@ -291,7 +291,7 @@ void sg_wifi_energy_plugin_init()
    * - Link::on_communication_state_change: to account for the energy when communications are updated
    * - CommImpl::on_start and CommImpl::on_completion: to account for the energy during communications
    */
-  simgrid::s4u::Link::on_creation.connect([](simgrid::s4u::Link& link) {
+  simgrid::s4u::Link::on_creation_cb([](simgrid::s4u::Link& link) {
     // verify the link is appropriate to WiFi energy computations
     if (link.get_sharing_policy() == simgrid::s4u::Link::SharingPolicy::WIFI) {
       XBT_DEBUG("Wifi Link: %s, initialization of wifi energy plugin", link.get_cname());
@@ -302,7 +302,7 @@ void sg_wifi_energy_plugin_init()
     }
   });
 
-  simgrid::s4u::Link::on_destruction.connect([](simgrid::s4u::Link const& link) {
+  simgrid::s4u::Link::on_destruction_cb([](simgrid::s4u::Link const& link) {
     // output energy values if WiFi link
     if (link.get_sharing_policy() == simgrid::s4u::Link::SharingPolicy::WIFI) {
       link.extension<LinkEnergyWifi>()->update_destroy();
@@ -314,16 +314,15 @@ void sg_wifi_energy_plugin_init()
     }
   });
 
-  simgrid::s4u::Link::on_communication_state_change.connect(
-      [](simgrid::kernel::resource::NetworkAction const& action,
-         simgrid::kernel::resource::Action::State /* previous */) {
-        // update WiFi links encountered during the communication
-        for (auto const* link : action.get_links()) {
-          if (link != nullptr && link->get_sharing_policy() == simgrid::s4u::Link::SharingPolicy::WIFI) {
-            link->get_iface()->extension<LinkEnergyWifi>()->update();
-          }
-        }
-      });
+  simgrid::s4u::Link::on_communication_state_change_cb([](simgrid::kernel::resource::NetworkAction const& action,
+                                                          simgrid::kernel::resource::Action::State /* previous */) {
+    // update WiFi links encountered during the communication
+    for (auto const* link : action.get_links()) {
+      if (link != nullptr && link->get_sharing_policy() == simgrid::s4u::Link::SharingPolicy::WIFI) {
+        link->get_iface()->extension<LinkEnergyWifi>()->update();
+      }
+    }
+  });
 
   simgrid::kernel::activity::CommImpl::on_start.connect(&on_communication);
   simgrid::kernel::activity::CommImpl::on_completion.connect(&on_communication);
index 5f60b67..69b4397 100644 (file)
@@ -189,7 +189,7 @@ void sg_link_load_plugin_init()
   LinkLoad::EXTENSION_ID = simgrid::s4u::Link::extension_create<LinkLoad>();
 
   // Attach new LinkLoad links created in the future.
-  simgrid::s4u::Link::on_creation.connect([](simgrid::s4u::Link& link) {
+  simgrid::s4u::Link::on_creation_cb([](simgrid::s4u::Link& link) {
     if (link.get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI) {
       XBT_DEBUG("Wired link '%s' created. Attaching a LinkLoad to it.", link.get_cname());
       link.extension_set(new LinkLoad(&link));
@@ -202,24 +202,23 @@ void sg_link_load_plugin_init()
   simgrid::kernel::activity::CommImpl::on_start.connect(&on_communication);
   simgrid::kernel::activity::CommImpl::on_completion.connect(&on_communication);
 
-  simgrid::s4u::Link::on_state_change.connect([](simgrid::s4u::Link const& link) {
+  simgrid::s4u::Link::on_state_change_cb([](simgrid::s4u::Link const& link) {
     if (link.get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI) {
       auto link_load = link.extension<LinkLoad>();
       if (link_load->is_tracked())
         link_load->update();
     }
   });
-  simgrid::s4u::Link::on_communication_state_change.connect(
-      [](simgrid::kernel::resource::NetworkAction const& action,
-         simgrid::kernel::resource::Action::State /* previous */) {
-        for (auto const* link : action.get_links()) {
-          if (link != nullptr && link->get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI) {
-            auto link_load = link->get_iface()->extension<LinkLoad>();
-            if (link_load->is_tracked())
-              link_load->update();
-          }
-        }
-      });
+  simgrid::s4u::Link::on_communication_state_change_cb([](simgrid::kernel::resource::NetworkAction const& action,
+                                                          simgrid::kernel::resource::Action::State /* previous */) {
+    for (auto const* link : action.get_links()) {
+      if (link != nullptr && link->get_sharing_policy() != simgrid::s4u::Link::SharingPolicy::WIFI) {
+        auto link_load = link->get_iface()->extension<LinkLoad>();
+        if (link_load->is_tracked())
+          link_load->update();
+      }
+    }
+  });
 }
 
 /**
index 3dce9fb..f4dd674 100644 (file)
@@ -290,7 +290,7 @@ void sg_vm_live_migration_plugin_init()
 {
   sg_vm_dirty_page_tracking_init();
   VmMigrationExt::ensureVmMigrationExtInstalled();
-  simgrid::s4u::VirtualMachine::on_shutdown.connect(&onVirtualMachineShutdown);
+  simgrid::s4u::VirtualMachine::on_shutdown_cb(&onVirtualMachineShutdown);
 }
 
 simgrid::s4u::VirtualMachine* sg_vm_create_migratable(simgrid::s4u::Host* pm, const char* name, int coreAmount,
index 466c071..f4ba064 100644 (file)
@@ -92,7 +92,7 @@ static void on_exec_creation(simgrid::s4u::Exec const& e)
   }
 }
 
-static void on_exec_completion(simgrid::s4u::Activity& e)
+static void on_exec_completion(const simgrid::s4u::Activity& e)
 {
   const auto exec = dynamic_cast<simgrid::kernel::activity::ExecImpl*>(e.get_impl());
   if (exec == nullptr)
@@ -115,9 +115,9 @@ void sg_vm_dirty_page_tracking_init()
   if (not DirtyPageTrackingExt::EXTENSION_ID.valid()) {
     DirtyPageTrackingExt::EXTENSION_ID =
         simgrid::kernel::resource::VirtualMachineImpl::extension_create<DirtyPageTrackingExt>();
-    simgrid::s4u::VirtualMachine::on_creation.connect(&on_virtual_machine_creation);
-    simgrid::s4u::Exec::on_start.connect(&on_exec_creation);
-    simgrid::s4u::Activity::on_completion.connect(&on_exec_completion);
+    simgrid::s4u::VirtualMachine::on_creation_cb(&on_virtual_machine_creation);
+    simgrid::s4u::Exec::on_start_cb(&on_exec_creation);
+    simgrid::s4u::Activity::on_completion_cb(&on_exec_completion);
   }
 }
 
index 8c22f58..6eaa564 100644 (file)
@@ -18,6 +18,9 @@ XBT_LOG_EXTERNAL_CATEGORY(s4u);
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_activity, s4u, "S4U activities");
 
 namespace simgrid {
+
+template class xbt::Extendable<s4u::Activity>;
+
 namespace s4u {
 
 xbt::signal<void(Activity&)> Activity::on_veto;
@@ -25,6 +28,17 @@ xbt::signal<void(Activity&)> Activity::on_completion;
 
 std::set<Activity*>* Activity::vetoed_activities_ = nullptr;
 
+void Activity::destroy()
+{
+  /* First Remove all dependencies */
+  while (not dependencies_.empty())
+    (*(dependencies_.begin()))->remove_successor(this);
+  while (not successors_.empty())
+    this->remove_successor(successors_.front());
+
+  cancel();
+}
+
 void Activity::wait_until(double time_limit)
 {
   double now = Engine::get_clock();
@@ -76,7 +90,8 @@ Activity* Activity::cancel()
 {
   kernel::actor::simcall([this] {
     XBT_HERE();
-    pimpl_->cancel();
+    if (pimpl_)
+      pimpl_->cancel();
   });
   complete(State::CANCELED);
   return this;
index 0d1c8f8..68e1476 100644 (file)
@@ -112,6 +112,16 @@ void Engine::load_platform(const std::string& platf) const
   pimpl->load_platform(platf);
 }
 
+/**
+ * @brief Seals the platform, finishing the creation of its resources.
+ *
+ * This method is optional. The seal() is done automatically when you call Engine::run.
+ */
+void Engine::seal_platform() const
+{
+  pimpl->seal_platform();
+}
+
 /** Registers the main function of an actor that will be launched from the deployment file */
 void Engine::register_function(const std::string& name, const std::function<void(int, char**)>& code)
 {
@@ -321,12 +331,6 @@ void Engine::run() const
 }
 void Engine::run_until(double max_date) const
 {
-  /* sealing resources before run: links */
-  for (auto* link : get_all_links())
-    link->seal();
-  /* seal netzone root, recursively seal children netzones, hosts and disks */
-  get_netzone_root()->seal();
-
   /* Clean IO before the run */
   fflush(stdout);
   fflush(stderr);
diff --git a/src/simdag/sd_daxloader.cpp b/src/simdag/sd_daxloader.cpp
deleted file mode 100644 (file)
index 91ffa11..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/* Copyright (c) 2009-2021. 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 "simdag_private.hpp"
-#include "simgrid/s4u/Comm.hpp"
-#include "simgrid/s4u/Exec.hpp"
-#include "simgrid/simdag.h"
-#include "xbt/file.hpp"
-#include "xbt/log.h"
-#include "xbt/misc.h"
-#include <algorithm>
-#include <map>
-#include <stdexcept>
-
-#include "dax_dtd.h"
-#include "dax_dtd.c"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files");
-
-/* Ensure that transfer tasks have unique names even though a file is used several times */
-void uniq_transfer_task_name(SD_task_t task)
-{
-  const_SD_task_t child  = *(task->get_successors().begin());
-  const_SD_task_t parent = *(task->get_dependencies().begin());
-
-  std::string new_name = parent->get_name() + "_" + task->get_name() + "_" + child->get_name();
-
-  task->set_name(new_name);
-}
-
-static bool children_are_marked(const_SD_task_t task)
-{
-  return std::none_of(task->get_successors().begin(), task->get_successors().end(),
-                      [](const SD_task_t& elm) { return not elm->is_marked(); });
-}
-
-static bool parents_are_marked(const_SD_task_t task)
-{
-  return std::none_of(task->get_dependencies().begin(), task->get_dependencies().end(),
-                      [](const SD_task_t& elm) { return not elm->is_marked(); });
-}
-
-bool acyclic_graph_detail(const_xbt_dynar_t dag)
-{
-  unsigned int count;
-  SD_task_t task = nullptr;
-  std::vector<SD_task_t> current;
-  xbt_dynar_foreach (dag, count, task)
-    if (task->get_kind() != SD_TASK_COMM_E2E && task->is_waited_by() == 0)
-      current.push_back(task);
-
-  while (not current.empty()) {
-    std::vector<SD_task_t> next;
-    for (auto const& t : current) {
-      //Mark task
-      t->mark();
-      for (auto const& input : t->get_predecessors()) {
-        if (input->get_kind() == SD_TASK_COMM_E2E || input->get_kind() == SD_TASK_COMM_PAR_MXN_1D_BLOCK) {
-          input->mark();
-          // Inputs are communication, hence they can have only one predecessor
-          auto input_pred = *(input->get_dependencies().begin());
-          if (children_are_marked(input_pred))
-            next.push_back(input_pred);
-        }
-      }
-      for (auto const& pred : t->get_dependencies()) {
-        if (children_are_marked(pred))
-          next.push_back(pred);
-      }
-    }
-    current.clear();
-    current = next;
-  }
-
-  bool all_marked = true;
-  //test if all tasks are marked
-  xbt_dynar_foreach(dag,count,task){
-    if (task->get_kind() != SD_TASK_COMM_E2E && not task->is_marked()) {
-      XBT_WARN("the task %s is not marked", task->get_cname());
-      all_marked = false;
-      break;
-    }
-  }
-
-  if (not all_marked) {
-    XBT_VERB("there is at least one cycle in your task graph");
-    xbt_dynar_foreach(dag,count,task){
-      if (task->get_kind() != SD_TASK_COMM_E2E && task->has_unsolved_dependencies() == 0) {
-        task->mark();
-        current.push_back(task);
-      }
-    }
-    //test if something has to be done for the next iteration
-    while (not current.empty()) {
-      std::vector<SD_task_t> next;
-      //test if the current iteration is done
-      for (auto const& t : current) {
-        t->mark();
-        for (auto const& output : t->get_successors()) {
-          if (output->get_kind() == SD_TASK_COMM_E2E || output->get_kind() == SD_TASK_COMM_PAR_MXN_1D_BLOCK) {
-            output->mark();
-            // outputs are communication, hence they can have only one successor
-            SD_task_t output_succ = output->get_successors().front();
-            if (parents_are_marked(output_succ))
-              next.push_back(output_succ);
-          }
-        }
-        for (SD_task_t const& succ : t->get_successors()) {
-          if (parents_are_marked(succ))
-            next.push_back(succ);
-        }
-      }
-      current.clear();
-      current = next;
-    }
-
-    all_marked = true;
-    xbt_dynar_foreach(dag,count,task){
-      if (task->get_kind() != SD_TASK_COMM_E2E && not task->is_marked()) {
-        XBT_WARN("the task %s is in a cycle", task->get_cname());
-        all_marked = false;
-      }
-    }
-  }
-  return all_marked;
-}
-
-bool check_for_cycle(const std::vector<simgrid::s4u::ActivityPtr>& dag)
-{
-  std::vector<simgrid::s4u::ActivityPtr> current;
-
-  for (const auto& a : dag)
-    if (dynamic_cast<simgrid::s4u::Exec*>(a.get()) != nullptr && a->is_waited_by() == 0)
-      current.push_back(a);
-
-  while (not current.empty()) {
-    std::vector<simgrid::s4u::ActivityPtr> next;
-    for (auto const& a : current) {
-      a->mark();
-      for (auto const& pred : a->get_dependencies()) {
-        if (dynamic_cast<simgrid::s4u::Comm*>(pred.get()) != nullptr) {
-          pred->mark();
-          // Comms have only one predecessor
-          auto pred_pred = *(pred->get_dependencies().begin());
-          if (std::none_of(pred_pred->get_successors().begin(), pred_pred->get_successors().end(),
-                           [](const simgrid::s4u::ActivityPtr& a) { return not a->is_marked(); }))
-            next.push_back(pred_pred);
-        } else {
-          if (std::none_of(pred->get_successors().begin(), pred->get_successors().end(),
-                           [](const simgrid::s4u::ActivityPtr& a) { return not a->is_marked(); }))
-            next.push_back(pred);
-        }
-      }
-    }
-    current.clear();
-    current = next;
-  }
-
-  return not std::any_of(dag.begin(), dag.end(), [](const simgrid::s4u::ActivityPtr& a) { return not a->is_marked(); });
-}
-
-static YY_BUFFER_STATE input_buffer;
-
-static xbt_dynar_t result;
-static std::map<std::string, SD_task_t, std::less<>> jobs;
-static std::map<std::string, SD_task_t, std::less<>> files;
-static SD_task_t current_job;
-
-/** @brief loads a DAX file describing a DAG
- *
- * See https://confluence.pegasus.isi.edu/display/pegasus/WorkflowGenerator for more details.
- */
-xbt_dynar_t SD_daxload(const char *filename)
-{
-  SD_task_t file;
-  FILE* in_file = fopen(filename, "r");
-  xbt_assert(in_file, "Unable to open \"%s\"\n", filename);
-  input_buffer = dax__create_buffer(in_file, 10);
-  dax__switch_to_buffer(input_buffer);
-  dax_lineno = 1;
-
-  result              = xbt_dynar_new(sizeof(SD_task_t), nullptr);
-  SD_task_t root_task = SD_task_create_comp_seq("root", nullptr, 0);
-  /* by design the root task is always SCHEDULABLE */
-  root_task->set_state(SD_SCHEDULABLE);
-
-  xbt_dynar_push(result, &root_task);
-  SD_task_t end_task = SD_task_create_comp_seq("end", nullptr, 0);
-
-  xbt_assert(dax_lex() == 0, "Parse error in %s: %s", filename, dax__parse_err_msg());
-  dax__delete_buffer(input_buffer);
-  fclose(in_file);
-  dax_lex_destroy();
-
-  /* And now, post-process the files.
-   * We want a file task per pair of computation tasks exchanging the file. Duplicate on need
-   * Files not produced in the system are said to be produced by root task (top of DAG).
-   * Files not consumed in the system are said to be consumed by end task (bottom of DAG).
-   */
-
-  for (auto const& elm : files) {
-    file = elm.second;
-    SD_task_t newfile;
-    if (file->has_unsolved_dependencies() == 0) {
-      for (SD_task_t const& it : file->get_successors()) {
-        newfile = SD_task_create_comm_e2e(file->get_cname(), nullptr, file->get_amount());
-        root_task->dependency_add(newfile);
-        newfile->dependency_add(it);
-        xbt_dynar_push(result, &newfile);
-      }
-    }
-    if (file->is_waited_by() == 0) {
-      for (SD_task_t const& it : file->get_dependencies()) {
-        newfile = SD_task_create_comm_e2e(file->get_cname(), nullptr, file->get_amount());
-        it->dependency_add(newfile);
-        newfile->dependency_add(end_task);
-        xbt_dynar_push(result, &newfile);
-      }
-    }
-    for (SD_task_t const& it : file->get_dependencies()) {
-      for (SD_task_t const& it2 : file->get_successors()) {
-        if (it == it2) {
-          XBT_WARN("File %s is produced and consumed by task %s."
-                   "This loop dependency will prevent the execution of the task.",
-                   file->get_cname(), it->get_cname());
-        }
-        newfile = SD_task_create_comm_e2e(file->get_cname(), nullptr, file->get_amount());
-        it->dependency_add(newfile);
-        newfile->dependency_add(it2);
-        xbt_dynar_push(result, &newfile);
-      }
-    }
-    /* Free previous copy of the files */
-    file->destroy();
-  }
-
-  /* Push end task last */
-  xbt_dynar_push(result, &end_task);
-
-  unsigned int cpt;
-  xbt_dynar_foreach(result, cpt, file) {
-    if (file->get_kind() == SD_TASK_COMM_E2E) {
-      uniq_transfer_task_name(file);
-    } else {
-      /* If some tasks do not take files as input, connect them to the root
-       * if they don't produce files, connect them to the end node.
-       */
-      if ((file != root_task) && (file != end_task)) {
-        if (file->has_unsolved_dependencies() == 0)
-          root_task->dependency_add(file);
-        if (file->is_waited_by() == 0)
-          file->dependency_add(end_task);
-      }
-    }
-  }
-
-  if (not acyclic_graph_detail(result)) {
-    XBT_ERROR("The DAX described in %s is not a DAG. It contains a cycle.",
-              simgrid::xbt::Path(filename).get_base_name().c_str());
-    xbt_dynar_foreach(result, cpt, file)
-      file->destroy();
-    xbt_dynar_free_container(&result);
-    result = nullptr;
-  }
-
-  return result;
-}
-
-void STag_dax__adag()
-{
-  try {
-    double version = std::stod(std::string(A_dax__adag_version));
-    xbt_assert(version == 2.1, "Expected version 2.1 in <adag> tag, got %f. Fix the parser or your file", version);
-  } catch (const std::invalid_argument&) {
-    throw std::invalid_argument(std::string("Parse error: ") + A_dax__adag_version + " is not a double");
-  }
-}
-
-void STag_dax__job()
-{
-  try {
-    double runtime = std::stod(std::string(A_dax__job_runtime));
-
-    std::string name = std::string(A_dax__job_id) + "@" + A_dax__job_name;
-    runtime *= 4200000000.; /* Assume that timings were done on a 4.2GFlops machine. I mean, why not? */
-    XBT_DEBUG("See <job id=%s runtime=%s %.0f>", A_dax__job_id, A_dax__job_runtime, runtime);
-    current_job = SD_task_create_comp_seq(name.c_str(), nullptr, runtime);
-    jobs.insert({A_dax__job_id, current_job});
-    xbt_dynar_push(result, &current_job);
-  } catch (const std::invalid_argument&) {
-    throw std::invalid_argument(std::string("Parse error: ") + A_dax__job_runtime + " is not a double");
-  }
-}
-
-void STag_dax__uses()
-{
-  double size;
-  try {
-    size = std::stod(std::string(A_dax__uses_size));
-  } catch (const std::invalid_argument&) {
-    throw std::invalid_argument(std::string("Parse error: ") + A_dax__uses_size + " is not a double");
-  }
-  bool is_input = (A_dax__uses_link == A_dax__uses_link_input);
-
-  XBT_DEBUG("See <uses file=%s %s>",A_dax__uses_file,(is_input?"in":"out"));
-  auto it = files.find(A_dax__uses_file);
-  SD_task_t file;
-  if (it == files.end()) {
-    file = SD_task_create_comm_e2e(A_dax__uses_file, nullptr, size);
-    sd_global->initial_tasks.erase(file);
-    files[A_dax__uses_file] = file;
-  } else {
-    file = it->second;
-    if (file->get_amount() < size || file->get_amount() > size) {
-      XBT_WARN("Ignore file %s size redefinition from %.0f to %.0f", A_dax__uses_file, file->get_amount(), size);
-    }
-  }
-  if (is_input) {
-    file->dependency_add(current_job);
-  } else {
-    current_job->dependency_add(file);
-    if (file->has_unsolved_dependencies() > 1) {
-      XBT_WARN("File %s created at more than one location...", file->get_cname());
-    }
-  }
-}
-
-static SD_task_t current_child;
-void STag_dax__child()
-{
-  auto job = jobs.find(A_dax__child_ref);
-  if (job != jobs.end()) {
-    current_child = job->second;
-  } else {
-    throw std::out_of_range(std::string("Parse error on line ") + std::to_string(dax_lineno) +
-                            ": Asked to add dependencies to the non-existent " + A_dax__child_ref + "task");
-  }
-}
-
-void ETag_dax__child()
-{
-  current_child = nullptr;
-}
-
-void STag_dax__parent()
-{
-  auto job = jobs.find(A_dax__parent_ref);
-  if (job != jobs.end()) {
-    auto parent = job->second;
-    parent->dependency_add(current_child);
-    XBT_DEBUG("Control-flow dependency from %s to %s", current_child->get_cname(), parent->get_cname());
-  } else {
-    throw std::out_of_range(std::string("Parse error on line ") + std::to_string(dax_lineno) +
-                            ": Asked to add a dependency from " + current_child->get_name() + " to " +
-                            A_dax__parent_ref + ", but " + A_dax__parent_ref + " does not exist");
-  }
-}
-
-void ETag_dax__adag()
-{
-  XBT_DEBUG("See </adag>");
-}
-
-void ETag_dax__job()
-{
-  current_job = nullptr;
-  XBT_DEBUG("See </job>");
-}
-
-void ETag_dax__parent()
-{
-  XBT_DEBUG("See </parent>");
-}
-
-void ETag_dax__uses()
-{
-  XBT_DEBUG("See </uses>");
-}
diff --git a/src/simdag/sd_dotloader.cpp b/src/simdag/sd_dotloader.cpp
deleted file mode 100644 (file)
index 4a54f7c..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (c) 2009-2021. 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 "simdag_private.hpp"
-#include "simgrid/s4u/Activity.hpp"
-#include "simgrid/s4u/Comm.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/Exec.hpp"
-#include "src/internal_config.h"
-#include "xbt/file.hpp"
-#include <algorithm>
-#include <cstring>
-#include <unordered_map>
-#include <vector>
-
-#if HAVE_GRAPHVIZ
-#include <graphviz/cgraph.h>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_dotparse, sd, "Parsing DOT files");
-
-namespace simgrid {
-namespace s4u {
-
-std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
-{
-  FILE* in_file = fopen(filename.c_str(), "r");
-  xbt_assert(in_file != nullptr, "Failed to open file: %s", filename.c_str());
-
-  Agraph_t* dag_dot = agread(in_file, NIL(Agdisc_t*));
-
-  std::unordered_map<std::string, ActivityPtr> activities;
-  std::vector<ActivityPtr> dag;
-
-  ActivityPtr root;
-  ActivityPtr end;
-  ActivityPtr act;
-  /* Create all the nodes */
-  Agnode_t* node = nullptr;
-  for (node = agfstnode(dag_dot); node; node = agnxtnode(dag_dot, node)) {
-    char* name    = agnameof(node);
-    double amount = atof(agget(node, (char*)"size"));
-
-    if (activities.find(name) == activities.end()) {
-      XBT_DEBUG("See <Exec id = %s amount = %.0f>", name, amount);
-      act = Exec::init()->set_name(name)->set_flops_amount(amount)->vetoable_start();
-      activities.insert({std::string(name), act});
-      if (strcmp(name, "root") && strcmp(name, "end"))
-        dag.push_back(act);
-    } else {
-      XBT_WARN("Exec '%s' is defined more than once", name);
-    }
-  }
-  /*Check if 'root' and 'end' nodes have been explicitly declared.  If not, create them. */
-  if (activities.find("root") == activities.end())
-    root = Exec::init()->set_name("root")->set_flops_amount(0)->vetoable_start();
-  else
-    root = activities.at("root");
-
-  if (activities.find("end") == activities.end())
-    end = Exec::init()->set_name("end")->set_flops_amount(0)->vetoable_start();
-  else
-    end = activities.at("end");
-
-  /* Create edges */
-  std::vector<Agedge_t*> edges;
-  for (node = agfstnode(dag_dot); node; node = agnxtnode(dag_dot, node)) {
-    edges.clear();
-    for (Agedge_t* edge = agfstout(dag_dot, node); edge; edge = agnxtout(dag_dot, edge))
-      edges.push_back(edge);
-
-    /* Be sure edges are sorted */
-    std::sort(edges.begin(), edges.end(), [](const Agedge_t* a, const Agedge_t* b) { return AGSEQ(a) < AGSEQ(b); });
-
-    for (Agedge_t* edge : edges) {
-      const char* src_name = agnameof(agtail(edge));
-      const char* dst_name = agnameof(aghead(edge));
-      double size          = atof(agget(edge, (char*)"size"));
-
-      ActivityPtr src = activities.at(src_name);
-      ActivityPtr dst = activities.at(dst_name);
-      if (size > 0) {
-        std::string name = std::string(src_name) + "->" + dst_name;
-        XBT_DEBUG("See <Comm id=%s amount = %.0f>", name.c_str(), size);
-        if (activities.find(name) == activities.end()) {
-          act = Comm::sendto_init()->set_name(name)->set_payload_size(size)->vetoable_start();
-          src->add_successor(act);
-          act->add_successor(dst);
-          activities.insert({name, act});
-          dag.push_back(act);
-        } else {
-          XBT_WARN("Comm '%s' is defined more than once", name.c_str());
-        }
-      } else {
-        src->add_successor(dst);
-      }
-    }
-  }
-
-  XBT_DEBUG("All activities have been created, put %s at the beginning and %s at the end", root->get_cname(),
-            end->get_cname());
-  dag.insert(dag.begin(), root);
-  dag.push_back(end);
-
-  /* Connect entry tasks to 'root', and exit tasks to 'end'*/
-  for (const auto& a : dag) {
-    if (a->dependencies_solved() && a != root) {
-      XBT_DEBUG("Activity '%s' has no dependencies. Add dependency from 'root'", a->get_cname());
-      root->add_successor(a);
-    }
-
-    if (a->is_waited_by() == 0 && a != end) {
-      XBT_DEBUG("Activity '%s' has no successors. Add dependency to 'end'", a->get_cname());
-      a->add_successor(end);
-    }
-  }
-  agclose(dag_dot);
-  fclose(in_file);
-
-  if (not check_for_cycle(dag)) {
-    std::string base = simgrid::xbt::Path(filename).get_base_name();
-    XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base.c_str());
-    dag.clear();
-  }
-
-  return dag;
-}
-
-} // namespace s4u
-} // namespace simgrid
-
-#else
-namespace simgrid {
-namespace s4u {
-std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
-{
-  xbt_die("create_DAG_from_dot() is not usable because graphviz was not found.\n"
-          "Please install graphviz, graphviz-dev, and libgraphviz-dev (and erase CMakeCache.txt) before recompiling.");
-}
-} // namespace s4u
-} // namespace simgrid
-
-#endif
diff --git a/src/simdag/sd_global.cpp b/src/simdag/sd_global.cpp
deleted file mode 100644 (file)
index 04a0f1d..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Copyright (c) 2006-2021. 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 "simdag_private.hpp"
-#include "simgrid/kernel/resource/Action.hpp"
-#include "simgrid/kernel/resource/Model.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/sg_config.hpp"
-#include "src/kernel/EngineImpl.hpp"
-#include "src/surf/surf_interface.hpp"
-
-#include <array>
-
-XBT_LOG_NEW_CATEGORY(sd, "Logging specific to SimDag");
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_kernel, sd, "Logging specific to SimDag (kernel)");
-
-std::unique_ptr<simgrid::sd::Global> sd_global = nullptr;
-
-namespace simgrid {
-namespace sd {
-
-std::set<Task*>* simulate(double how_long)
-{
-  XBT_VERB("Run simulation for %f seconds", how_long);
-
-  auto engine = sd_global->engine_->get_impl();
-  sd_global->watch_point_reached = false;
-  sd_global->return_set.clear();
-
-  /* explore the runnable tasks */
-  while (not sd_global->runnable_tasks.empty())
-    (*(sd_global->runnable_tasks.begin()))->run();
-
-  double elapsed_time = 0.0;
-  double total_time   = 0.0;
-  /* main loop */
-  while (elapsed_time >= 0 && (how_long < 0 || 0.00001 < (how_long - total_time)) &&
-         not sd_global->watch_point_reached) {
-    XBT_DEBUG("Total time: %f", total_time);
-
-    elapsed_time = engine->solve(how_long > 0 ? simgrid_get_clock() + how_long - total_time : -1.0);
-    XBT_DEBUG("solve() returns %f", elapsed_time);
-    if (elapsed_time > 0.0)
-      total_time += elapsed_time;
-
-    /* let's see which tasks are done */
-    for (auto const& model : engine->get_all_models()) {
-      const kernel::resource::Action* action = model->extract_done_action();
-      while (action != nullptr && action->get_data() != nullptr) {
-        auto* task = static_cast<Task*>(action->get_data());
-        XBT_VERB("Task '%s' done", task->get_cname());
-        task->set_state(SD_DONE);
-
-        /* the state has changed. Add it only if it's the first change */
-        sd_global->return_set.emplace(task);
-
-        /* remove the dependencies after this task */
-        for (auto const& succ : task->get_successors())
-          succ->released_by(task);
-
-        for (auto const& output : task->get_outputs())
-          output->produced_by(task);
-        task->clear_successors();
-        action = model->extract_done_action();
-      }
-
-      /* let's see which tasks have just failed */
-      action = model->extract_failed_action();
-      while (action != nullptr) {
-        auto* task = static_cast<Task*>(action->get_data());
-        XBT_VERB("Task '%s' failed", task->get_cname());
-        task->set_state(SD_FAILED);
-        sd_global->return_set.insert(task);
-        action = model->extract_failed_action();
-      }
-    }
-  }
-
-  if (not sd_global->watch_point_reached && how_long < 0 && not sd_global->initial_tasks.empty()) {
-    XBT_WARN("Simulation is finished but %zu tasks are still not done", sd_global->initial_tasks.size());
-    for (auto const& t : sd_global->initial_tasks)
-      XBT_WARN("%s is in %s state", t->get_cname(), __get_state_name(t->get_state()));
-  }
-
-  XBT_DEBUG("elapsed_time = %f, total_time = %f, watch_point_reached = %d", elapsed_time, total_time,
-            sd_global->watch_point_reached);
-  XBT_DEBUG("current time = %f", simgrid_get_clock());
-
-  return &sd_global->return_set;
-}
-} // namespace sd
-} // namespace simgrid
-
-/**
- * @brief helper for pretty printing of task state
- * @param state the state of a task
- * @return the equivalent as a readable string
- */
-const char* __get_state_name(e_SD_task_state_t state)
-{
-  static constexpr std::array<const char*, 7> state_names{
-      {"not scheduled", "schedulable", "scheduled", "runnable", "running", "done", "failed"}};
-  return state_names.at(static_cast<int>(log2(static_cast<double>(state))));
-}
-
-/**
- * @brief Initializes SD internal data
- *
- * This function must be called before any other SD function. Then you should call SD_create_environment().
- *
- * @param argc argument number
- * @param argv argument list
- * @see SD_create_environment(), SD_exit()
- */
-void SD_init_nocheck(int* argc, char** argv)
-{
-  xbt_assert(sd_global == nullptr, "SD_init() already called");
-
-  sd_global = std::make_unique<simgrid::sd::Global>(argc, argv);
-
-  simgrid::config::set_default<std::string>("host/model", "ptask_L07");
-  if (simgrid::config::get_value<bool>("debug/clean-atexit"))
-    atexit([]() {
-#if SIMGRID_HAVE_JEDULE
-      jedule_sd_exit();
-#endif
-      sd_global->engine_->shutdown();
-    });
-}
-
-/** @brief set a configuration variable
- *
- * Do --help on any simgrid binary to see the list of currently existing configuration variables, and
- * see Section @ref options.
- *
- * Example: SD_config("host/model","default")
- */
-void SD_config(const char* key, const char* value)
-{
-  xbt_assert(sd_global, "ERROR: Please call SD_init() before using SD_config()");
-  simgrid::config::set_as_string(key, value);
-}
-
-/**
- * @brief Creates the environment
- *
- * The environment (i.e. the @ref SD_host_api "hosts" and the @ref SD_link_api "links") is created with
- * the data stored in the given XML platform file.
- *
- * @param platform_file name of an XML file describing the environment to create
- * @see SD_host_api, SD_link_api
- *
- * The XML file follows this DTD:
- *
- *     @include simgrid.dtd
- *
- * Here is a small example of such a platform:
- *
- *     @include small_platform.xml
- */
-void SD_create_environment(const char* platform_file)
-{
-  sd_global->engine_->load_platform(platform_file);
-
-  XBT_DEBUG("Host number: %zu, link number: %zu", sg_host_count(), sg_link_count());
-#if SIMGRID_HAVE_JEDULE
-  jedule_sd_init();
-#endif
-  XBT_VERB("Starting simulation...");
-  sd_global->engine_->get_impl()->presolve(); /* Takes traces into account */
-}
-
-/**
- * @brief Launches the simulation.
- *
- * The function will execute the @ref SD_RUNNABLE runnable tasks.
- * If @a how_long is positive, then the simulation will be stopped either when time reaches @a how_long or when a watch
- * point is reached.
- * A non-positive value for @a how_long means no time limit, in which case the simulation will be stopped either when a
- * watch point is reached or when no more task can be executed.
- * Then you can call SD_simulate() again.
- *
- * @param how_long maximum duration of the simulation (a negative value means no time limit)
- * @return a dynar of @ref SD_task_t whose state has changed.
- * @see SD_task_schedule(), SD_task_watch()
- */
-void SD_simulate(double how_long)
-{
-  simgrid::sd::simulate(how_long);
-}
-
-void SD_simulate_with_update(double how_long, xbt_dynar_t changed_tasks_dynar)
-{
-  const std::set<SD_task_t>* changed_tasks = simgrid::sd::simulate(how_long);
-  for (auto const& task : *changed_tasks)
-    xbt_dynar_push(changed_tasks_dynar, &task);
-}
diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp
deleted file mode 100644 (file)
index 23eb24c..0000000
+++ /dev/null
@@ -1,967 +0,0 @@
-/* Copyright (c) 2006-2021. 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 "simdag_private.hpp"
-#include "simgrid/kernel/routing/NetPoint.hpp"
-#include "src/surf/HostImpl.hpp"
-#include "src/surf/surf_interface.hpp"
-#include <algorithm>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd, "Logging specific to SimDag (task)");
-
-namespace simgrid {
-
-template class xbt::Extendable<sd::Task>;
-
-namespace sd {
-
-Task* Task::create(const std::string& name, double amount, void* userdata)
-{
-  auto task = new Task();
-  task->set_name(name);
-  task->set_amount(amount);
-  task->set_data(userdata);
-  task->allocation_ = new std::vector<sg_host_t>();
-  sd_global->initial_tasks.insert(task);
-
-  return task;
-}
-
-Task* Task::create_comm_e2e(const std::string& name, double amount, void* userdata)
-{
-  auto task              = create(name, amount, userdata);
-  task->bytes_amount_    = xbt_new0(double, 4);
-  task->bytes_amount_[2] = amount;
-  task->set_kind(SD_TASK_COMM_E2E);
-
-  return task;
-}
-
-Task* Task::create_comp_seq(const std::string& name, double amount, void* userdata)
-{
-  auto task              = create(name, amount, userdata);
-  task->flops_amount_    = xbt_new0(double, 1);
-  task->flops_amount_[0] = amount;
-  task->set_kind(SD_TASK_COMP_SEQ);
-
-  return task;
-}
-
-Task* Task::create_comp_par_amdahl(const std::string& name, double amount, void* userdata, double alpha)
-{
-  xbt_assert(alpha < 1. && alpha >= 0., "Invalid parameter: alpha must be in [0.;1.[");
-
-  auto task = create(name, amount, userdata);
-  task->set_alpha(alpha);
-  task->set_kind(SD_TASK_COMP_PAR_AMDAHL);
-
-  return task;
-}
-
-Task* Task::create_comm_par_mxn_1d_block(const std::string& name, double amount, void* userdata)
-{
-  auto task = create(name, amount, userdata);
-  task->set_kind(SD_TASK_COMM_PAR_MXN_1D_BLOCK);
-
-  return task;
-}
-
-void Task::distribute_comp_amdahl(unsigned long count)
-{
-  xbt_assert(kind_ == SD_TASK_COMP_PAR_AMDAHL,
-             "Task %s is not a SD_TASK_COMP_PAR_AMDAHL typed task."
-             "Cannot use this function.",
-             get_cname());
-  flops_amount_ = xbt_new0(double, count);
-  for (unsigned long i = 0; i < count; i++)
-    flops_amount_[i] = (alpha_ + (1 - alpha_) / count) * amount_;
-}
-
-void Task::build_MxN_1D_block_matrix(unsigned long src_nb, unsigned long dst_nb)
-{
-  xbt_assert(kind_ == SD_TASK_COMM_PAR_MXN_1D_BLOCK,
-             "Task %s is not a SD_TASK_COMM_PAR_MXN_1D_BLOCK typed task."
-             "Cannot use this function.",
-             get_cname());
-  xbt_free(bytes_amount_);
-  bytes_amount_ = xbt_new0(double, allocation_->size() * allocation_->size());
-
-  for (unsigned long i = 0; i < src_nb; i++) {
-    double src_start = i * amount_ / src_nb;
-    double src_end   = src_start + amount_ / src_nb;
-    for (unsigned long j = 0; j < dst_nb; j++) {
-      double dst_start = j * amount_ / dst_nb;
-      double dst_end   = dst_start + amount_ / dst_nb;
-      XBT_VERB("(%lu->%lu): (%.2f, %.2f)-> (%.2f, %.2f)", i, j, src_start, src_end, dst_start, dst_end);
-      bytes_amount_[i * (src_nb + dst_nb) + src_nb + j] = 0.0;
-      if ((src_end > dst_start) && (dst_end > src_start)) { /* There is something to send */
-        bytes_amount_[i * (src_nb + dst_nb) + src_nb + j] = std::min(src_end, dst_end) - std::max(src_start, dst_start);
-        XBT_VERB("==> %.2f", bytes_amount_[i * (src_nb + dst_nb) + src_nb + j]);
-      }
-    }
-  }
-}
-
-void Task::dependency_add(Task* task)
-{
-  if (this == task)
-    throw std::invalid_argument(
-        simgrid::xbt::string_printf("Cannot add a dependency between task '%s' and itself", get_cname()));
-
-  if (state_ == SD_DONE || state_ == SD_FAILED)
-    throw std::invalid_argument(simgrid::xbt::string_printf(
-        "Task '%s' must be SD_NOT_SCHEDULED, SD_SCHEDULABLE, SD_SCHEDULED, SD_RUNNABLE, or SD_RUNNING", get_cname()));
-
-  if (task->get_state() == SD_DONE || task->get_state() == SD_FAILED || task->get_state() == SD_RUNNING)
-    throw std::invalid_argument(simgrid::xbt::string_printf(
-        "Task '%s' must be SD_NOT_SCHEDULED, SD_SCHEDULABLE, SD_SCHEDULED, or SD_RUNNABLE", task->get_cname()));
-
-  if (dependency_exist(task))
-    throw std::invalid_argument(simgrid::xbt::string_printf(
-        "A dependency already exists between task '%s' and task '%s'", get_cname(), task->get_cname()));
-
-  successors_.push_back(task);
-  task->dependencies_.insert({this});
-
-  /* if 'task' was runnable, it goes back to the SD_SCHEDULED state because of the new dependency*/
-  if (task->get_state() == SD_RUNNABLE) {
-    XBT_DEBUG("SD_task_dependency_add: %s was runnable and becomes scheduled!", task->get_cname());
-    task->set_state(SD_SCHEDULED);
-  }
-}
-
-bool Task::dependency_exist(Task* task) const
-{
-  return (std::find(successors_.begin(), successors_.end(), task) != successors_.end() ||
-          dependencies_.find(task) != dependencies_.end());
-}
-
-void Task::dependency_remove(Task* task)
-{
-  if (this == task)
-    throw std::invalid_argument("Cannot ask to remove itself from successors");
-
-  auto p = std::find(successors_.begin(), successors_.end(), task);
-  if (p != successors_.end()) {
-    successors_.erase(p);
-    task->dependencies_.erase({this});
-  } else
-    throw std::invalid_argument(simgrid::xbt::string_printf(
-        "No dependency found between task '%s' and '%s': task '%s' is not a successor of task '%s'", get_cname(),
-        task->get_cname(), task->get_cname(), get_cname()));
-
-  /* if 'task' was scheduled and dependencies are satisfied, we can make it runnable */
-  if (task->has_unsolved_dependencies() == 0 && task->get_state() == SD_SCHEDULED)
-    task->set_state(SD_RUNNABLE);
-}
-
-std::set<Task*> Task::get_predecessors() const
-{
-  std::set<Task*> res;
-  for (const auto& d : dependencies_)
-    if (d->get_kind() == SD_TASK_COMP_SEQ || d->get_kind() == SD_TASK_COMP_PAR_AMDAHL)
-      res.insert(d);
-  return res;
-}
-
-std::set<Task*> Task::get_inputs() const
-{
-  std::set<Task*> res;
-  for (const auto& d : dependencies_)
-    if (d->get_kind() == SD_TASK_COMM_E2E || d->get_kind() == SD_TASK_COMM_PAR_MXN_1D_BLOCK)
-      res.insert(d);
-  return res;
-}
-
-std::vector<Task*> Task::get_outputs() const
-{
-  std::vector<Task*> res;
-  for (const auto& d : successors_)
-    if (d->get_kind() == SD_TASK_COMM_E2E || d->get_kind() == SD_TASK_COMM_PAR_MXN_1D_BLOCK)
-      res.push_back(d);
-  return res;
-}
-
-void Task::set_amount(double amount)
-{
-  amount_ = amount;
-  if (kind_ == SD_TASK_COMP_SEQ)
-    flops_amount_[0] = amount;
-  if (kind_ == SD_TASK_COMM_E2E) {
-    bytes_amount_[2] = amount;
-  }
-}
-
-void Task::set_rate(double rate)
-{
-  xbt_assert(kind_ == SD_TASK_COMM_E2E, "The rate can be modified for end-to-end communications only.");
-  if (state_ < SD_RUNNING) {
-    rate_ = rate;
-  } else {
-    XBT_WARN("Task %p has started. Changing rate is ineffective.", this);
-  }
-}
-
-void Task::set_state(e_SD_task_state_t new_state)
-{
-  std::set<Task*>::iterator idx;
-  XBT_DEBUG("Set state of '%s' to %d", get_cname(), new_state);
-  if ((new_state == SD_NOT_SCHEDULED || new_state == SD_SCHEDULABLE) && state_ == SD_FAILED) {
-    sd_global->completed_tasks.erase(this);
-    sd_global->initial_tasks.insert(this);
-  }
-
-  if (new_state == SD_SCHEDULED && state_ == SD_RUNNABLE) {
-    sd_global->initial_tasks.insert(this);
-    sd_global->runnable_tasks.erase(this);
-  }
-
-  if (new_state == SD_RUNNABLE) {
-    idx = sd_global->initial_tasks.find(this);
-    if (idx != sd_global->initial_tasks.end()) {
-      sd_global->runnable_tasks.insert(*idx);
-      sd_global->initial_tasks.erase(idx);
-    }
-  }
-
-  if (new_state == SD_RUNNING)
-    sd_global->runnable_tasks.erase(this);
-
-  if (new_state == SD_DONE || new_state == SD_FAILED) {
-    sd_global->completed_tasks.insert(this);
-    start_time_ = surf_action_->get_start_time();
-    if (new_state == SD_DONE) {
-      finish_time_ = surf_action_->get_finish_time();
-#if SIMGRID_HAVE_JEDULE
-      jedule_log_sd_event(this);
-#endif
-    } else
-      finish_time_ = simgrid_get_clock();
-    surf_action_->unref();
-    surf_action_ = nullptr;
-    allocation_->clear();
-  }
-
-  state_ = new_state;
-
-  if (watch_points_ & new_state) {
-    XBT_VERB("Watch point reached with task '%s'!", get_cname());
-    sd_global->watch_point_reached = true;
-    unwatch(new_state); /* remove the watch point */
-  }
-}
-
-double Task::get_remaining_amount() const
-{
-  if (surf_action_)
-    return surf_action_->get_remains();
-  else
-    return (state_ == SD_DONE) ? 0 : amount_;
-}
-
-double Task::get_start_time() const
-{
-  return surf_action_ ? surf_action_->get_start_time() : start_time_;
-}
-
-double Task::get_finish_time() const
-{
-  if (surf_action_) /* should never happen as actions are destroyed right after their completion */
-    return surf_action_->get_finish_time();
-  else
-    return finish_time_;
-}
-
-void Task::set_sender_side_allocation(unsigned long count, const std::vector<s4u::Host*>* sender)
-{
-  for (unsigned long i = 0; i < count; i++)
-    allocation_->push_back(sender->at(i));
-}
-
-void Task::set_receiver_side_allocation(unsigned long count, const std::vector<s4u::Host*>* receiver)
-{
-  for (unsigned long i = 0; i < count; i++)
-    allocation_->insert(allocation_->begin() + i, receiver->at(i));
-}
-
-void Task::watch(e_SD_task_state_t state)
-{
-  if (state & SD_NOT_SCHEDULED)
-    throw std::invalid_argument("Cannot add a watch point for state SD_NOT_SCHEDULED");
-
-  watch_points_ = watch_points_ | state;
-}
-
-void Task::unwatch(e_SD_task_state_t state)
-{
-  xbt_assert(state != SD_NOT_SCHEDULED, "SimDag error: Cannot have a watch point for state SD_NOT_SCHEDULED");
-  watch_points_ = watch_points_ & ~state;
-}
-
-void Task::dump() const
-{
-  XBT_INFO("Displaying task %s", get_cname());
-  if (state_ == SD_RUNNABLE)
-    XBT_INFO("  - state: runnable");
-  else if (state_ < SD_RUNNABLE)
-    XBT_INFO("  - state: %s not runnable", __get_state_name(state_));
-  else
-    XBT_INFO("  - state: not runnable %s", __get_state_name(state_));
-
-  if (kind_ != 0) {
-    switch (kind_) {
-      case SD_TASK_COMM_E2E:
-        XBT_INFO("  - kind: end-to-end communication");
-        break;
-      case SD_TASK_COMP_SEQ:
-        XBT_INFO("  - kind: sequential computation");
-        break;
-      case SD_TASK_COMP_PAR_AMDAHL:
-        XBT_INFO("  - kind: parallel computation following Amdahl's law");
-        break;
-      case SD_TASK_COMM_PAR_MXN_1D_BLOCK:
-        XBT_INFO("  - kind: MxN data redistribution assuming 1D block distribution");
-        break;
-      default:
-        XBT_INFO("  - (unknown kind %d)", kind_);
-    }
-  }
-
-  XBT_INFO("  - amount: %.0f", amount_);
-  if (kind_ == SD_TASK_COMP_PAR_AMDAHL)
-    XBT_INFO("  - alpha: %.2f", alpha_);
-  XBT_INFO("  - Dependencies to satisfy: %lu", has_unsolved_dependencies());
-  if (has_unsolved_dependencies() > 0) {
-    XBT_INFO("  - pre-dependencies:");
-    for (auto const& it : dependencies_)
-      XBT_INFO("    %s", it->get_cname());
-  }
-  if (is_waited_by() > 0) {
-    XBT_INFO("  - post-dependencies:");
-
-    for (auto const& it : successors_)
-      XBT_INFO("    %s", it->get_cname());
-  }
-}
-
-void Task::released_by(Task* pred)
-{
-  dependencies_.erase(pred);
-  XBT_DEBUG("Release dependency on %s: %lu remain(s). Becomes schedulable if %zu=0", get_cname(),
-            has_unsolved_dependencies(), get_predecessors().size());
-
-  if (state_ == SD_NOT_SCHEDULED && get_predecessors().empty())
-    set_state(SD_SCHEDULABLE);
-
-  if (state_ == SD_SCHEDULED && has_unsolved_dependencies() == 0)
-    set_state(SD_RUNNABLE);
-
-  if (state_ == SD_RUNNABLE && not sd_global->watch_point_reached)
-    run();
-}
-
-void Task::produced_by(Task* pred)
-{
-  if (state_ == SD_RUNNABLE)
-    return;
-
-  start_time_ = pred->get_finish_time();
-  dependencies_.erase(pred);
-  if (state_ == SD_SCHEDULED)
-    set_state(SD_RUNNABLE);
-  else
-    set_state(SD_SCHEDULABLE);
-
-  Task* comm_dst = *(successors_.begin());
-  if (comm_dst->get_state() == SD_NOT_SCHEDULED && comm_dst->get_predecessors().empty()) {
-    XBT_DEBUG("%s is a transfer, %s may be ready now if %zu=0", get_cname(), comm_dst->get_cname(),
-              comm_dst->get_predecessors().size());
-    comm_dst->set_state(SD_SCHEDULABLE);
-  }
-  if (state_ == SD_RUNNABLE && not sd_global->watch_point_reached)
-    run();
-}
-
-void Task::do_schedule()
-{
-  if (state_ > SD_SCHEDULABLE)
-    throw std::invalid_argument(simgrid::xbt::string_printf("Task '%s' has already been scheduled", get_cname()));
-
-  if (has_unsolved_dependencies() == 0)
-    set_state(SD_RUNNABLE);
-  else
-    set_state(SD_SCHEDULED);
-}
-
-void Task::schedule(const std::vector<s4u::Host*>& hosts, const double* flops_amount, const double* bytes_amount,
-                    double rate)
-{
-  unsigned long host_count = hosts.size();
-  rate_                    = rate;
-
-  if (flops_amount) {
-    flops_amount_ = static_cast<double*>(xbt_realloc(flops_amount_, sizeof(double) * host_count));
-    memcpy(flops_amount_, flops_amount, sizeof(double) * host_count);
-  } else {
-    xbt_free(flops_amount_);
-    flops_amount_ = nullptr;
-  }
-
-  unsigned long communication_nb = host_count * host_count;
-  if (bytes_amount) {
-    bytes_amount_ = static_cast<double*>(xbt_realloc(bytes_amount_, sizeof(double) * communication_nb));
-    memcpy(bytes_amount_, bytes_amount, sizeof(double) * communication_nb);
-  } else {
-    xbt_free(bytes_amount_);
-    bytes_amount_ = nullptr;
-  }
-
-  for (const auto& h : hosts)
-    allocation_->push_back(h);
-
-  do_schedule();
-}
-
-void Task::schedulev(const std::vector<s4u::Host*>& hosts)
-{
-  xbt_assert(kind_ == SD_TASK_COMP_SEQ || kind_ == SD_TASK_COMP_PAR_AMDAHL,
-             "Task %s is not typed. Cannot automatically schedule it.", get_cname());
-
-  for (unsigned long i = 0; i < hosts.size(); i++)
-    allocation_->push_back(hosts[i]);
-
-  XBT_VERB("Schedule computation task %s on %zu host(s)", get_cname(), allocation_->size());
-
-  if (kind_ == SD_TASK_COMP_SEQ) {
-    if (not flops_amount_) { /*This task has failed and is rescheduled. Reset the flops_amount*/
-      flops_amount_    = xbt_new0(double, 1);
-      flops_amount_[0] = amount_;
-    }
-    XBT_VERB("It costs %.f flops", flops_amount_[0]);
-  }
-
-  if (kind_ == SD_TASK_COMP_PAR_AMDAHL) {
-    distribute_comp_amdahl(hosts.size());
-    XBT_VERB("%.f flops will be distributed following Amdahl's Law", flops_amount_[0]);
-  }
-
-  do_schedule();
-
-  /* Iterate over all inputs and outputs to say where I am located (and start them if runnable) */
-  for (auto const& input : get_inputs()) {
-    unsigned long src_nb = input->get_allocation_size();
-    unsigned long dst_nb = hosts.size();
-    if (src_nb == 0)
-      XBT_VERB("Sender side of '%s' not scheduled. Set receiver side to '%s''s allocation", input->get_cname(),
-               get_cname());
-    input->set_sender_side_allocation(dst_nb, allocation_);
-
-    if (input->get_allocation_size() > allocation_->size()) {
-      if (kind_ == SD_TASK_COMP_PAR_AMDAHL)
-        input->build_MxN_1D_block_matrix(src_nb, dst_nb);
-
-      input->do_schedule();
-      XBT_VERB("Auto-Schedule Communication task '%s'. Send %.f bytes from %lu hosts to %lu hosts.", input->get_cname(),
-               input->get_amount(), src_nb, dst_nb);
-    }
-  }
-
-  for (auto const& output : get_outputs()) {
-    unsigned long src_nb = hosts.size();
-    unsigned long dst_nb = output->get_allocation_size();
-    if (dst_nb == 0)
-      XBT_VERB("Receiver side of '%s' not scheduled. Set sender side to '%s''s allocation", output->get_cname(),
-               get_cname());
-    output->set_receiver_side_allocation(src_nb, allocation_);
-
-    if (output->get_allocation_size() > allocation_->size()) {
-      if (kind_ == SD_TASK_COMP_PAR_AMDAHL)
-        output->build_MxN_1D_block_matrix(src_nb, dst_nb);
-
-      output->do_schedule();
-      XBT_VERB("Auto-Schedule Communication task %s. Send %.f bytes from %lu hosts to %lu hosts.", output->get_cname(),
-               output->get_amount(), src_nb, dst_nb);
-    }
-  }
-}
-
-void Task::unschedule()
-{
-  if (state_ == SD_NOT_SCHEDULED || state_ == SD_SCHEDULABLE)
-    throw std::invalid_argument(xbt::string_printf(
-        "Task %s: the state must be SD_SCHEDULED, SD_RUNNABLE, SD_RUNNING or SD_FAILED", get_cname()));
-
-  if (state_ == SD_SCHEDULED || state_ == SD_RUNNABLE) /* if the task is scheduled or runnable */ {
-    allocation_->clear();
-    if (kind_ == SD_TASK_COMP_PAR_AMDAHL || kind_ == SD_TASK_COMM_PAR_MXN_1D_BLOCK) {
-      /* Don't free scheduling data for typed tasks */
-      xbt_free(flops_amount_);
-      xbt_free(bytes_amount_);
-      bytes_amount_ = nullptr;
-      flops_amount_ = nullptr;
-    }
-  }
-
-  if (state_ == SD_RUNNING)
-    /* the task should become SD_FAILED */
-    surf_action_->cancel();
-  else {
-    if (has_unsolved_dependencies() == 0)
-      set_state(SD_SCHEDULABLE);
-    else
-      set_state(SD_NOT_SCHEDULED);
-  }
-  start_time_ = -1.0;
-}
-
-void Task::run()
-{
-  xbt_assert(state_ == SD_RUNNABLE, "Task '%s' is not runnable! Task state: %d", get_cname(), (int)state_);
-  xbt_assert(not allocation_->empty(), "Task '%s': host_list is empty!", get_cname());
-
-  XBT_VERB("Executing task '%s'", get_cname());
-
-  /* Beware! The scheduling data are now used by the surf action directly! no copy was done */
-  auto host_model = allocation_->front()->get_netpoint()->get_englobing_zone()->get_host_model();
-  surf_action_    = host_model->execute_parallel(*allocation_, flops_amount_, bytes_amount_, rate_);
-
-  surf_action_->set_data(this);
-
-  XBT_DEBUG("surf_action = %p", surf_action_);
-
-  set_state(SD_RUNNING);
-  sd_global->return_set.insert(this);
-}
-
-void Task::destroy()
-{
-  XBT_DEBUG("Destroying task %s...", get_cname());
-
-  /* First Remove all dependencies associated with the task. */
-  while (not dependencies_.empty())
-    (*(dependencies_.begin()))->dependency_remove(this);
-  while (not successors_.empty())
-    this->dependency_remove(successors_.front());
-
-  if (state_ == SD_SCHEDULED || state_ == SD_RUNNABLE) {
-    xbt_free(flops_amount_);
-    xbt_free(bytes_amount_);
-    bytes_amount_ = nullptr;
-    flops_amount_ = nullptr;
-  }
-
-  xbt_free(flops_amount_);
-  xbt_free(bytes_amount_);
-
-  delete allocation_;
-
-  if (surf_action_ != nullptr)
-    surf_action_->unref();
-
-  XBT_DEBUG("Task destroyed.");
-  delete this;
-}
-} // namespace sd
-} // namespace simgrid
-
-/* **************************** Public C interface *************************** */
-
-/**
- * @brief Creates a new task.
- *
- * @param name the name of the task (can be @c nullptr)
- * @param data the user data you want to associate with the task (can be @c nullptr)
- * @param amount amount of the task
- * @return the new task
- * @see SD_task_destroy()
- */
-SD_task_t SD_task_create(const char* name, void* data, double amount)
-{
-  return simgrid::sd::Task::create(name, amount, data);
-}
-
-/** @brief create an end-to-end communication task that can then be auto-scheduled
- *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
- * creation, and decouple them from the scheduling process where you just specify which resource should deliver the
- * mandatory power.
- *
- * A end-to-end communication must be scheduled on 2 hosts, and the amount specified at creation is sent from hosts[0]
- * to hosts[1].
- */
-SD_task_t SD_task_create_comm_e2e(const char* name, void* data, double amount)
-{
-  return simgrid::sd::Task::create_comm_e2e(name, amount, data);
-}
-
-/** @brief create a sequential computation task that can then be auto-scheduled
- *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
- * creation, and decouple them from the scheduling process where you just specify which resource should deliver the
- * mandatory power.
- *
- * A sequential computation must be scheduled on 1 host, and the amount specified at creation to be run on hosts[0].
- *
- * @param name the name of the task (can be @c nullptr)
- * @param data the user data you want to associate with the task (can be @c nullptr)
- * @param flops_amount amount of compute work to be done by the task
- * @return the new SD_TASK_COMP_SEQ typed task
- */
-SD_task_t SD_task_create_comp_seq(const char* name, void* data, double flops_amount)
-{
-  return simgrid::sd::Task::create_comp_seq(name, flops_amount, data);
-}
-
-/** @brief create a parallel computation task that can then be auto-scheduled
- *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
- * creation, and decouple them from the scheduling process where you just specify which resource should deliver the
- * mandatory power.
- *
- * A parallel computation can be scheduled on any number of host.
- * The underlying speedup model is Amdahl's law.
- * To be auto-scheduled, @see SD_task_distribute_comp_amdahl has to be called first.
- * @param name the name of the task (can be @c nullptr)
- * @param data the user data you want to associate with the task (can be @c nullptr)
- * @param flops_amount amount of compute work to be done by the task
- * @param alpha purely serial fraction of the work to be done (in [0.;1.[)
- * @return the new task
- */
-SD_task_t SD_task_create_comp_par_amdahl(const char* name, void* data, double flops_amount, double alpha)
-{
-  return simgrid::sd::Task::create_comp_par_amdahl(name, flops_amount, data, alpha);
-}
-
-/** @brief create a complex data redistribution task that can then be  auto-scheduled
- *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev().
- * This allows one to specify the task costs at creation, and decouple them from the scheduling process where you just
- * specify which resource should communicate.
- *
- * A data redistribution can be scheduled on any number of host.
- * The assumed distribution is a 1D block distribution. Each host owns the same share of the @see amount.
- * To be auto-scheduled, @see SD_task_distribute_comm_mxn_1d_block has to be  called first.
- * @param name the name of the task (can be @c nullptr)
- * @param data the user data you want to associate with the task (can be @c nullptr)
- * @param amount amount of data to redistribute by the task
- * @return the new task
- */
-SD_task_t SD_task_create_comm_par_mxn_1d_block(const char* name, void* data, double amount)
-{
-  return simgrid::sd::Task::create_comm_par_mxn_1d_block(name, amount, data);
-}
-
-/**
- * @brief Destroys a task.
- *
- * The user data (if any) should have been destroyed first.
- *
- * @param task the task you want to destroy
- * @see SD_task_create()
- */
-void SD_task_destroy(SD_task_t task)
-{
-  task->destroy();
-}
-
-/** @brief Returns the user data of a task */
-void* SD_task_get_data(const_SD_task_t task)
-{
-  return task->get_data();
-}
-
-/** @brief Sets the user data of a task
- * The new data can be @c nullptr. The old data should have been freed first, if it was not @c nullptr.
- */
-void SD_task_set_data(SD_task_t task, void* data)
-{
-  task->set_data(data);
-}
-
-void SD_task_set_rate(SD_task_t task, double rate)
-{
-  task->set_rate(rate);
-}
-
-/**
- * @brief Returns the state of a task
- *
- * @param task a task
- * @return the current @ref e_SD_task_state_t "state" of this task:
- * #SD_NOT_SCHEDULED, #SD_SCHEDULED, #SD_RUNNABLE, #SD_RUNNING, #SD_DONE or #SD_FAILED
- * @see e_SD_task_state_t
- */
-e_SD_task_state_t SD_task_get_state(const_SD_task_t task)
-{
-  return task->get_state();
-}
-
-const char* SD_task_get_name(const_SD_task_t task)
-{
-  return task->get_cname();
-}
-
-void SD_task_set_name(SD_task_t task, const char* name)
-{
-  task->set_name(name);
-}
-
-/** @brief Returns the parents of a task ina dynar */
-xbt_dynar_t SD_task_get_parents(const_SD_task_t task)
-{
-  xbt_dynar_t parents = xbt_dynar_new(sizeof(SD_task_t), nullptr);
-
-  for (auto const& it : task->get_dependencies())
-    xbt_dynar_push(parents, &it);
-
-  return parents;
-}
-
-/** @brief Returns the children of a task in a dynar */
-xbt_dynar_t SD_task_get_children(const_SD_task_t task)
-{
-  xbt_dynar_t children = xbt_dynar_new(sizeof(SD_task_t), nullptr);
-
-  for (auto const& it : task->get_successors())
-    xbt_dynar_push(children, &it);
-
-  return children;
-}
-
-double SD_task_get_start_time(const_SD_task_t task)
-{
-  return task->get_start_time();
-}
-
-double SD_task_get_finish_time(const_SD_task_t task)
-{
-  return task->get_finish_time();
-}
-
-void SD_task_distribute_comp_amdahl(SD_task_t task, int count)
-{
-  task->distribute_comp_amdahl(count);
-}
-
-void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb)
-{
-  task->build_MxN_1D_block_matrix(src_nb, dst_nb);
-}
-
-/**
- * @brief Returns the number of workstations involved in a task
- *
- * Only call this on already scheduled tasks!
- * @param task a task
- */
-int SD_task_get_workstation_count(const_SD_task_t task)
-{
-  return static_cast<int>(task->get_allocation_size());
-}
-
-/**
- * @brief Returns the list of workstations involved in a task
- *
- * Only call this on already scheduled tasks!
- * @param task a task
- */
-sg_host_t* SD_task_get_workstation_list(const_SD_task_t task)
-{
-  return task->get_allocation()->data();
-}
-
-/**
- * @brief Returns the total amount of work contained in a task
- *
- * @param task a task
- * @return the total amount of work (computation or data transfer) for this task
- * @see SD_task_get_remaining_amount()
- */
-double SD_task_get_amount(const_SD_task_t task)
-{
-  return task->get_amount();
-}
-
-void SD_task_set_amount(SD_task_t task, double amount)
-{
-  task->set_amount(amount);
-}
-
-double SD_task_get_remaining_amount(const_SD_task_t task)
-{
-  return task->get_remaining_amount();
-}
-
-e_SD_task_kind_t SD_task_get_kind(const_SD_task_t task)
-{
-  return task->get_kind();
-}
-
-void SD_task_dump(const_SD_task_t task)
-{
-  task->dump();
-}
-
-void SD_task_dependency_add(SD_task_t src, SD_task_t dst)
-{
-  XBT_DEBUG("SD_task_dependency_add: src = %s, dst = %s", src->get_cname(), dst->get_cname());
-  src->dependency_add(dst);
-}
-void SD_task_dependency_remove(SD_task_t src, SD_task_t dst)
-{
-  XBT_DEBUG("SD_task_dependency_remove: src = %s, dst = %s", src->get_cname(), dst->get_cname());
-  src->dependency_remove(dst);
-}
-
-/**
- * @brief Indicates whether there is a dependency between two tasks.
- * If src is nullptr, checks whether dst has any pre-dependency.
- * If dst is nullptr, checks whether src has any post-dependency.
- */
-int SD_task_dependency_exists(const_SD_task_t src, SD_task_t dst)
-{
-  xbt_assert(src != nullptr || dst != nullptr, "Invalid parameter: both src and dst are nullptr");
-
-  if (src)
-    if (dst)
-      return src->dependency_exist(dst);
-    else
-      return static_cast<int>(src->is_waited_by());
-  else
-    return static_cast<int>(dst->has_unsolved_dependencies());
-}
-
-void SD_task_watch(SD_task_t task, e_SD_task_state_t state)
-{
-  task->watch(state);
-}
-
-void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state)
-{
-  task->unwatch(state);
-}
-
-/** @brief Dumps the task in dotty formalism into the FILE* passed as second argument */
-void SD_task_dotty(const_SD_task_t task, void* out)
-{
-  auto* fout = static_cast<FILE*>(out);
-  fprintf(fout, "  T%p [label=\"%.20s\"", task, task->get_cname());
-  switch (task->get_kind()) {
-    case SD_TASK_COMM_E2E:
-    case SD_TASK_COMM_PAR_MXN_1D_BLOCK:
-      fprintf(fout, ", shape=box");
-      break;
-    case SD_TASK_COMP_SEQ:
-    case SD_TASK_COMP_PAR_AMDAHL:
-      fprintf(fout, ", shape=circle");
-      break;
-    default:
-      xbt_die("Unknown task type!");
-  }
-  fprintf(fout, "];\n");
-  for (auto const& it : task->get_dependencies())
-    fprintf(fout, " T%p -> T%p;\n", it, task);
-}
-
-/**
- * @brief Returns an approximative estimation of the execution time of a task.
- *
- * The estimation is very approximative because the value returned is the time the task would take if it was executed
- * now and if it was the only task.
- *
- * @param host_count number of hosts on which the task would be executed
- * @param host_list the hosts on which the task would be executed
- * @param flops_amount computation amount for each host(i.e., an array of host_count doubles)
- * @param bytes_amount communication amount between each pair of hosts (i.e., a matrix of host_count*host_count doubles)
- * @see SD_schedule()
- */
-double SD_task_get_execution_time(const_SD_task_t /*task*/, int host_count, const sg_host_t* host_list,
-                                  const double* flops_amount, const double* bytes_amount)
-{
-  xbt_assert(host_count > 0, "Invalid parameter");
-  double max_time = 0.0;
-
-  /* the task execution time is the maximum execution time of the parallel tasks */
-  for (int i = 0; i < host_count; i++) {
-    double time = 0.0;
-    if (flops_amount != nullptr)
-      time = flops_amount[i] / host_list[i]->get_speed();
-
-    if (bytes_amount != nullptr)
-      for (int j = 0; j < host_count; j++)
-        if (bytes_amount[i * host_count + j] != 0)
-          time += (sg_host_get_route_latency(host_list[i], host_list[j]) +
-                   bytes_amount[i * host_count + j] / sg_host_get_route_bandwidth(host_list[i], host_list[j]));
-
-    if (time > max_time)
-      max_time = time;
-  }
-  return max_time;
-}
-
-/**
- * @brief Schedules a task
- *
- * The task state must be #SD_NOT_SCHEDULED.
- * Once scheduled, a task is executed as soon as possible in @see SD_simulate, i.e. when its dependencies are satisfied.
- *
- * @param task the task you want to schedule
- * @param host_count number of hosts on which the task will be executed
- * @param host_list the hosts on which the task will be executed
- * @param flops_amount computation amount for each hosts (i.e., an array of host_count doubles)
- * @param bytes_amount communication amount between each pair of hosts (i.e., a matrix of host_count*host_count doubles)
- * @param rate task execution speed rate
- * @see SD_task_unschedule()
- */
-void SD_task_schedule(SD_task_t task, int host_count, const sg_host_t* host_list, const double* flops_amount,
-                      const double* bytes_amount, double rate)
-{
-  xbt_assert(host_count > 0, "host_count must be positive");
-  std::vector<sg_host_t> hosts(host_count);
-
-  for (int i = 0; i < host_count; i++)
-    hosts[i] = host_list[i];
-
-  task->schedule(hosts, flops_amount, bytes_amount, rate);
-}
-
-void SD_task_unschedule(SD_task_t task)
-{
-  task->unschedule();
-}
-
-/** @brief Auto-schedules a task.
- *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). This allows one to specify the task costs at
- * creation, and decouple them from the scheduling process where you just specify which resource should deliver the
- * mandatory power.
- *
- * To be auto-schedulable, a task must be a typed computation SD_TASK_COMP_SEQ or SD_TASK_COMP_PAR_AMDAHL.
- */
-void SD_task_schedulev(SD_task_t task, int count, const sg_host_t* host_list)
-{
-  std::vector<sg_host_t> list(count);
-  for (int i = 0; i < count; i++)
-    list[i] = host_list[i];
-  task->schedulev(list);
-}
-
-/** @brief autoschedule a task on a list of hosts
- *
- * This function is similar to SD_task_schedulev(), but takes the list of hosts to schedule onto as separate parameters.
- * It builds a proper vector of hosts and then call SD_task_schedulev()
- */
-void SD_task_schedulel(SD_task_t task, int count, ...)
-{
-  va_list ap;
-  std::vector<sg_host_t> list(count);
-  va_start(ap, count);
-  for (int i = 0; i < count; i++)
-    list[i] = va_arg(ap, sg_host_t);
-
-  va_end(ap);
-  task->schedulev(list);
-}
diff --git a/src/simdag/simdag_private.hpp b/src/simdag/simdag_private.hpp
deleted file mode 100644 (file)
index ef9e87d..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Copyright (c) 2006-2021. 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 <simgrid/s4u/Engine.hpp>
-#include <simgrid/s4u/Host.hpp>
-#include <simgrid/simdag.h>
-#include <xbt/Extendable.hpp>
-
-#include <set>
-#include <string>
-#include <vector>
-
-#ifndef SIMDAG_PRIVATE_HPP
-#define SIMDAG_PRIVATE_HPP
-#if SIMGRID_HAVE_JEDULE
-#include "simgrid/jedule/jedule_sd_binding.h"
-#endif
-
-namespace simgrid{
-extern template class XBT_PUBLIC xbt::Extendable<sd::Task>;
-
-namespace sd{
-class Global;
-
-class Task : public xbt::Extendable<Task> {
-  friend sd::Global;
-
-  std::string name_;
-  double amount_;
-
-  e_SD_task_kind_t kind_   = SD_TASK_NOT_TYPED;
-  e_SD_task_state_t state_ = SD_NOT_SCHEDULED;
-  bool marked_             = false; /* used to check if the task DAG has some cycle*/
-  double start_time_       = -1;
-  double finish_time_      = -1;
-  kernel::resource::Action* surf_action_;
-  unsigned short watch_points_ = 0; /* bit field xor()ed with masks */
-  double rate_                 = -1;
-
-  double alpha_ = 0; /* used by typed parallel tasks */
-
-  /* dependencies */
-  std::set<Task*> dependencies_;
-  std::vector<Task*> successors_;
-
-  /* scheduling parameters (only exist in state SD_SCHEDULED) */
-  std::vector<s4u::Host*>* allocation_;
-  double* flops_amount_;
-  double* bytes_amount_;
-
-protected:
-  void set_start_time(double start) { start_time_ = start; }
-
-  void set_sender_side_allocation(unsigned long count, const std::vector<s4u::Host*>* sender);
-  void set_receiver_side_allocation(unsigned long count, const std::vector<s4u::Host*>* receiver);
-
-public:
-  static Task* create(const std::string& name, double amount, void* userdata);
-  static Task* create_comm_e2e(const std::string& name, double amount, void* userdata);
-  static Task* create_comp_seq(const std::string& name, double amount, void* userdata);
-  static Task* create_comp_par_amdahl(const std::string& name, double amount, void* userdata, double alpha);
-  static Task* create_comm_par_mxn_1d_block(const std::string& name, double amount, void* userdata);
-
-  void distribute_comp_amdahl(unsigned long count);
-  void build_MxN_1D_block_matrix(unsigned long src_nb, unsigned long dst_nb);
-
-  /** @brief Adds a dependency between with 'task'
-   *  @a task will depend on this Task, i.e., it cannot start before this task is finished.
-   */
-  void dependency_add(Task* task);
-  bool dependency_exist(Task* task) const;
-  /** @brief Remove a dependency with 'task' */
-  void dependency_remove(Task* task);
-  void clear_successors() { successors_.clear(); }
-
-  void set_name(const std::string& name) { name_ = name; }
-  const std::string& get_name() const { return name_; }
-  const char* get_cname() const { return name_.c_str(); }
-
-  /** @brief Sets the total amount of work of a task
-   * For sequential typed tasks (COMP_SEQ and COMM_E2E), it also sets the appropriate values in the flops_amount and
-   * bytes_amount arrays respectively. Nothing more than modifying task->amount is done for parallel typed tasks
-   * (COMP_PAR_AMDAHL and COMM_PAR_MXN_1D_BLOCK) as the distribution of the amount of work is done at scheduling time.
-   */
-  void set_amount(double amount);
-  double get_amount() const { return amount_; }
-  /** @brief Returns the remaining amount of work (computation or data transfer) to do before completion */
-  double get_remaining_amount() const;
-  /** @brief Returns the start time of a task */
-  double get_start_time() const;
-  /** @brief Returns the finish time of a task
-   * If the state is not completed yet, the returned value is an estimation of the task finish time. This value can
-   * vary until the task is completed.
-   */
-  double get_finish_time() const;
-
-  void set_state(e_SD_task_state_t new_state);
-  e_SD_task_state_t get_state() const { return state_; }
-
-  void mark() { marked_ = true; }
-  void unmark() { marked_ = false; }
-  bool is_marked() const { return marked_; }
-
-  const std::set<Task*>& get_dependencies() const { return dependencies_; }
-  std::set<Task*> get_predecessors() const;
-  std::set<Task*> get_inputs() const;
-  const std::vector<Task*>& get_successors() const { return successors_; }
-  std::vector<Task*> get_outputs() const;
-
-  unsigned long has_unsolved_dependencies() const { return dependencies_.size(); }
-  unsigned long is_waited_by() const { return successors_.size(); }
-  void released_by(Task* pred);
-  void produced_by(Task* pred);
-
-  void set_kind(e_SD_task_kind_t kind) { kind_ = kind; }
-  e_SD_task_kind_t get_kind() const { return kind_; }
-
-  void set_alpha(double alpha) { alpha_ = alpha; }
-  /** @brief Sets the rate of a task
-   *
-   * This will change the network bandwidth a task can use. This rate  cannot be dynamically changed. Once the task has
-   * started, this call is ineffective. This rate depends on both the nominal bandwidth on the route onto which the task
-   * is scheduled (@see SD_task_get_current_bandwidth) and the amount of data to transfer.
-   *
-   * To divide the nominal bandwidth by 2, the rate then has to be :
-   *    rate = bandwidth/(2*amount)
-   */
-  void set_rate(double rate);
-
-  unsigned long get_allocation_size() const { return allocation_->size(); }
-  std::vector<s4u::Host*>* get_allocation() const { return allocation_; }
-
-  /** @brief Adds a watch point to a task
-   * sd::simulate() stops as soon as the @ref e_SD_task_state_t "state" of this task becomes the one given as argument.
-   * The watched state cannot be #SD_NOT_SCHEDULED
-   */
-  void watch(e_SD_task_state_t state);
-  /** @brief Removes a watch point on 'state' from a task */
-  void unwatch(e_SD_task_state_t state);
-
-  /** @brief Displays debugging information about a task */
-  void dump() const;
-
-  void do_schedule();
-  void schedule(const std::vector<s4u::Host*>& hosts, const double* flops_amount, const double* bytes_amount,
-                double rate);
-  void schedulev(const std::vector<s4u::Host*>& hosts);
-  /**
-   * @brief Unschedules a task. Its state becomes #SD_NOT_SCHEDULED. You can schedule it again afterwards */
-  void unschedule();
-
-  void run();
-  void destroy();
-};
-
-class Global {
-public:
-  explicit Global(int* argc, char** argv) : engine_(new simgrid::s4u::Engine(argc, argv)) {}
-  bool watch_point_reached = false; /* has a task just reached a watch point? */
-  std::set<Task*> initial_tasks;
-  std::set<Task*> runnable_tasks;
-  std::set<Task*> completed_tasks;
-  std::set<Task*> return_set;
-  s4u::Engine* engine_;
-};
-
-} // namespace sd
-} // namespace simgrid
-
-extern XBT_PRIVATE std::unique_ptr<simgrid::sd::Global> sd_global;
-
-/* SimDag private functions */
-XBT_PRIVATE bool check_for_cycle(const std::vector<simgrid::s4u::ActivityPtr>& dag);
-XBT_PRIVATE bool acyclic_graph_detail(const_xbt_dynar_t dag);
-XBT_PRIVATE void uniq_transfer_task_name(SD_task_t task);
-XBT_PRIVATE const char *__get_state_name(e_SD_task_state_t state);
-#endif
index 7fcec54..6c085b2 100644 (file)
@@ -64,12 +64,6 @@ void sg_version()
   XBT_HELP("   ns-3 support disabled at compilation.");
 #endif
 
-#if SIMGRID_HAVE_JEDULE
-  XBT_HELP("   Jedule support compiled in.");
-#else
-  XBT_HELP("   Jedule support disabled at compilation.");
-#endif
-
 #if SIMGRID_HAVE_LUA
   XBT_HELP("   Lua support compiled in.");
 #else
index 91c80bb..6cd4ef3 100644 (file)
@@ -192,9 +192,10 @@ void mpi_comm_call_errhandler_ (int* comm,int* errorcode, int* ierr){
  *ierr = MPI_Comm_call_errhandler(simgrid::smpi::Comm::f2c(*comm), *errorcode);
 }
 
-void mpi_comm_connect_ ( char *port_name, int* info, int* root, int* comm, int*newcomm, int* ierr){
+void mpi_comm_connect_(char* port_name, int* info, int* root, int* comm, int* newcomm, int* ierr)
+{
   MPI_Comm tmp;
-  *ierr = MPI_Comm_connect( port_name, simgrid::smpi::Info::f2c(*info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp);
+  *ierr = MPI_Comm_connect(port_name, simgrid::smpi::Info::f2c(*info), *root, simgrid::smpi::Comm::f2c(*comm), &tmp);
   if(*ierr == MPI_SUCCESS) {
     *newcomm = tmp->c2f();
   }
index c1072a9..471da2e 100644 (file)
@@ -408,7 +408,9 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(int,MPI_Add_error_string,( int errorcode,
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Cart_map,(MPI_Comm comm_old, int ndims, const int* dims, const int* periods, int* newrank) ,(comm_old, ndims, dims, periods, newrank))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Close_port,(const char *port_name),( port_name))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_accept,(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm),( port_name, info, root, comm, newcomm))
-UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_connect,(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm),( port_name, info, root, comm, newcomm))
+UNIMPLEMENTED_WRAPPED_PMPI_CALL(int, MPI_Comm_connect,
+                                (const char* port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm* newcomm),
+                                (port_name, info, root, comm, newcomm))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_get_parent,( MPI_Comm *parent),( parent))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_idup,( MPI_Comm comm, MPI_Comm *newcomm, MPI_Request* request),( comm,  newcomm, request))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_join,( int fd, MPI_Comm *intercomm),( fd, intercomm))
index 79a5f4d..fa765df 100644 (file)
@@ -98,7 +98,7 @@ int PMPI_Start(MPI_Request * request)
     MPI_Request req = *request;
     aid_t my_proc_id = (req->comm() != MPI_COMM_NULL) ? simgrid::s4u::this_actor::get_pid() : -1;
     TRACE_smpi_comm_in(my_proc_id, __func__,
-                       new simgrid::instr::Pt2PtTIData("Start", req->dst(), req->size(), req->tag(),
+                       new simgrid::instr::Pt2PtTIData("Start", MPI_COMM_WORLD->group()->rank(req->dst()), req->size(), req->tag(),
                                                        simgrid::smpi::Datatype::encode(req->type())));
     if (not TRACE_smpi_view_internals() && req->flags() & MPI_REQ_SEND)
       TRACE_smpi_send(my_proc_id, my_proc_id, getPid(req->comm(), req->dst()), req->tag(), req->size());
@@ -171,7 +171,7 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MP
   const SmpiBenchGuard suspend_bench;
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("irecv", src,
+                     new simgrid::instr::Pt2PtTIData("irecv", MPI_COMM_WORLD->group()->rank(getPid(comm, src)),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   *request = simgrid::smpi::Request::irecv(buf, count, datatype, src, tag, comm);
@@ -189,7 +189,7 @@ int PMPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dst, int t
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   aid_t trace_dst  = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("isend", dst,
+                     new simgrid::instr::Pt2PtTIData("isend", MPI_COMM_WORLD->group()->rank(trace_dst),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
@@ -214,7 +214,7 @@ int PMPI_Issend(const void* buf, int count, MPI_Datatype datatype, int dst, int
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   aid_t trace_dst  = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("ISsend", dst,
+                     new simgrid::instr::Pt2PtTIData("ISsend", MPI_COMM_WORLD->group()->rank(trace_dst),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
@@ -245,7 +245,7 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
   } else {
     aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
     TRACE_smpi_comm_in(my_proc_id, __func__,
-                       new simgrid::instr::Pt2PtTIData("recv", src,
+                       new simgrid::instr::Pt2PtTIData("recv", MPI_COMM_WORLD->group()->rank(getPid(comm, src)),
                                                        count,
                                                        tag, simgrid::smpi::Datatype::encode(datatype)));
 
@@ -271,7 +271,7 @@ int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dst, int ta
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   aid_t dst_traced = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("send", dst,
+                     new simgrid::instr::Pt2PtTIData("send", MPI_COMM_WORLD->group()->rank(dst_traced),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   if (not TRACE_smpi_view_internals()) {
@@ -301,7 +301,7 @@ int PMPI_Bsend(const void* buf, int count, MPI_Datatype datatype, int dst, int t
   if (bsend_buf == nullptr || bsend_buf_size < size + MPI_BSEND_OVERHEAD)
     return MPI_ERR_BUFFER;
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("bsend", dst,
+                     new simgrid::instr::Pt2PtTIData("bsend", MPI_COMM_WORLD->group()->rank(dst_traced),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   if (not TRACE_smpi_view_internals()) {
@@ -326,7 +326,7 @@ int PMPI_Ibsend(const void* buf, int count, MPI_Datatype datatype, int dst, int
   if (bsend_buf == nullptr || bsend_buf_size < size + MPI_BSEND_OVERHEAD)
     return MPI_ERR_BUFFER;
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("ibsend", dst,
+                     new simgrid::instr::Pt2PtTIData("ibsend", MPI_COMM_WORLD->group()->rank(trace_dst),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
@@ -361,7 +361,7 @@ int PMPI_Ssend(const void* buf, int count, MPI_Datatype datatype, int dst, int t
   aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
   aid_t dst_traced = getPid(comm, dst);
   TRACE_smpi_comm_in(my_proc_id, __func__,
-                     new simgrid::instr::Pt2PtTIData("Ssend", dst,
+                     new simgrid::instr::Pt2PtTIData("Ssend", MPI_COMM_WORLD->group()->rank(dst_traced),
                                                      count,
                                                      tag, simgrid::smpi::Datatype::encode(datatype)));
   TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size());
@@ -402,8 +402,8 @@ int PMPI_Sendrecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int
     retval = MPI_ERR_RANK;
   } else {
     aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
-    aid_t dst_traced = getPid(comm, dst);
-    aid_t src_traced = getPid(comm, src);
+    aid_t dst_traced = MPI_COMM_WORLD->group()->rank(getPid(comm, dst));
+    aid_t src_traced = MPI_COMM_WORLD->group()->rank(getPid(comm, src));
 
     // FIXME: Hack the way to trace this one
     auto dst_hack = std::make_shared<std::vector<int>>();
index 2a8d188..84c80df 100644 (file)
@@ -596,11 +596,11 @@ int smpi_main(const char* executable, int argc, char* argv[])
 // Called either directly from the user code, or from the code called by smpirun
 void SMPI_init(){
   smpi_init_options_internal(false);
-  simgrid::s4u::Actor::on_creation.connect([](simgrid::s4u::Actor& actor) {
+  simgrid::s4u::Actor::on_creation_cb([](simgrid::s4u::Actor& actor) {
     if (not actor.is_daemon())
       actor.extension_set<simgrid::smpi::ActorExt>(new simgrid::smpi::ActorExt(&actor));
   });
-  simgrid::s4u::Host::on_creation.connect(
+  simgrid::s4u::Host::on_creation_cb(
       [](simgrid::s4u::Host& host) { host.extension_set(new simgrid::smpi::Host(&host)); });
   for (auto const& host : simgrid::s4u::Engine::get_instance()->get_all_hosts())
     host->extension_set(new simgrid::smpi::Host(host));
index 1ab07ed..b50b769 100644 (file)
@@ -39,9 +39,9 @@ void surf_network_model_init_IB()
   engine->add_model(net_model);
   engine->get_netzone_root()->set_network_model(net_model);
 
-  simgrid::s4u::Link::on_communication_state_change.connect(NetworkIBModel::IB_action_state_changed_callback);
+  simgrid::s4u::Link::on_communication_state_change_cb(NetworkIBModel::IB_action_state_changed_callback);
   simgrid::kernel::activity::CommImpl::on_start.connect(NetworkIBModel::IB_comm_start_callback);
-  simgrid::s4u::Host::on_creation.connect(NetworkIBModel::IB_create_host_callback);
+  simgrid::s4u::Host::on_creation_cb(NetworkIBModel::IB_create_host_callback);
   simgrid::config::set_default<double>("network/weight-S", 8775);
 }
 
index 82e59a5..900518a 100644 (file)
@@ -20,6 +20,7 @@
 #include <ns3/global-route-manager.h>
 #include <ns3/internet-stack-helper.h>
 #include <ns3/ipv4-address-helper.h>
+#include <ns3/ipv4-global-routing-helper.h>
 #include <ns3/packet-sink-helper.h>
 #include <ns3/point-to-point-helper.h>
 
@@ -170,7 +171,6 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone)
 
   mobility.SetPositionAllocator(positionAllocS);
   mobility.Install(nodes);
-
   ns3::Ipv4AddressHelper address;
   std::string addr = simgrid::xbt::string_printf("%d.%d.0.0", number_of_networks, number_of_links);
   address.SetBase(addr.c_str(), "255.255.0.0");
@@ -187,6 +187,9 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone)
   } else {
     number_of_links++;
   }
+  /* in theory we can compute the routing table only only once at the platform seal
+   *  however put it here since or platform_created signal is called before the seal right now */
+  ns3::Ipv4GlobalRoutingHelper::RecomputeRoutingTables();
 }
 
 static void clusterCreation_cb(simgrid::kernel::routing::ClusterCreationArgs const& cluster)
@@ -333,14 +336,14 @@ NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name)
     XBT_VERB("Declare SimGrid's %s within ns-3", pt.get_cname());
   });
 
-  s4u::Engine::on_platform_created.connect([]() {
+  s4u::Engine::on_platform_created_cb([]() {
     /* Create the ns3 topology based on routing strategy */
     ns3::GlobalRouteManager::BuildGlobalRoutingDatabase();
     ns3::GlobalRouteManager::InitializeRoutes();
   });
   routing::on_cluster_creation.connect(&clusterCreation_cb);
   routing::NetZoneImpl::on_route_creation.connect(&routeCreation_cb);
-  s4u::NetZone::on_seal.connect(&zoneCreation_cb);
+  s4u::NetZone::on_seal_cb(&zoneCreation_cb);
 }
 
 LinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
index bf52327..a5a06d0 100644 (file)
@@ -56,7 +56,7 @@ void sg_platf_init()
 void sg_platf_exit()
 {
   simgrid::kernel::routing::on_cluster_creation.disconnect_slots();
-  simgrid::s4u::Engine::on_platform_created.disconnect_slots();
+  // simgrid::s4u::Engine::on_platform_created.disconnect_slots();
 
   surf_parse_lex_destroy();
 }
@@ -223,27 +223,25 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
   }
 
   simgrid::s4u::NetZone const* parent = current_routing ? current_routing->get_iface() : nullptr;
-  simgrid::s4u::NetZone* zone;
   switch (cluster->topology) {
     case simgrid::kernel::routing::ClusterTopology::TORUS:
-      zone = simgrid::s4u::create_torus_zone(
-          cluster->id, parent, TorusZone::parse_topo_parameters(cluster->topo_parameters),
-          {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
+      simgrid::s4u::create_torus_zone(cluster->id, parent, TorusZone::parse_topo_parameters(cluster->topo_parameters),
+                                      {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat,
+                                      cluster->sharing_policy);
       break;
     case simgrid::kernel::routing::ClusterTopology::DRAGONFLY:
-      zone = simgrid::s4u::create_dragonfly_zone(
+      simgrid::s4u::create_dragonfly_zone(
           cluster->id, parent, DragonflyZone::parse_topo_parameters(cluster->topo_parameters),
           {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
       break;
     case simgrid::kernel::routing::ClusterTopology::FAT_TREE:
-      zone = simgrid::s4u::create_fatTree_zone(
+      simgrid::s4u::create_fatTree_zone(
           cluster->id, parent, FatTreeZone::parse_topo_parameters(cluster->topo_parameters),
           {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
       break;
     default:
       THROW_IMPOSSIBLE;
   }
-  zone->seal();
 }
 
 /*************************************************************************************************/
@@ -336,7 +334,6 @@ static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationA
   auto* router = zone->create_router(cluster->router_id);
   zone->add_route(router, nullptr, nullptr, nullptr, {});
 
-  zone->seal();
   simgrid::kernel::routing::on_cluster_creation(*cluster);
 }
 
@@ -602,7 +599,6 @@ void sg_platf_new_zone_seal()
     zone_cluster.cabinets.clear();
     zone_cluster.backbone.reset();
   }
-  current_routing->seal();
   current_routing = current_routing->get_parent();
 }
 
index 389fb73..fa0205e 100644 (file)
@@ -7,8 +7,8 @@ To upgrade your files, use the tool simgrid_update_xml
 * Things that will change in upcoming version 5 (TODO):
   - The following tags will be removed:
     - <include> spits an error since v3.18
-    - <random> does nothing since a very long time
-    - <as>, <asroute>, <bypassZoneRoute> and <process>, deprecated in DTD4.1
+    - <random> and <model_prop> do nothing since a very long time
+    - <as>, <asroute>, <bypassASRoute> and <process>, deprecated in DTD4.1
   - FULLDUPLEX sharing will be removed, deprecated in DTD4.2 (v3.19)
 
 * New in DTD version 4.1 (in SimGrid 3.16): backward compatible change (v4 files are valid v4.1 files)
@@ -88,6 +88,7 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST trace file CDATA "">
 <!ATTLIST trace periodicity CDATA #REQUIRED>
 
+<!-- random is deprecated -->
 <!ELEMENT random EMPTY>
 <!ATTLIST random id CDATA #REQUIRED>
 <!ATTLIST random min CDATA #REQUIRED>
@@ -103,8 +104,7 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST trace_connect trace CDATA #REQUIRED>
 <!ATTLIST trace_connect element CDATA #REQUIRED>
 
-<!-- A zone is either an internal node that contains other zones, 
-     or a  leaf containing hosts and other leaf-like elements -->
+<!-- AS is a deprecated equivalent of zone -->
 <!ELEMENT AS ((prop*),
           (((AS|zone|include|link|backbone|cabinet|cluster|peer|trace|trace_connect)*,
            (zoneRoute|ASroute|trace|trace_connect|bypassASroute|bypassZoneRoute)*,
@@ -125,12 +125,17 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST zone id CDATA #REQUIRED>
 <!ATTLIST zone routing CDATA #REQUIRED>
 
+<!-- storage, storage_type and mount are deprecated -->
 <!ELEMENT storage_type ((model_prop|prop)*)>
 <!ATTLIST storage_type id       CDATA #REQUIRED>
 <!ATTLIST storage_type model    CDATA "N11">
 <!ATTLIST storage_type size     CDATA #REQUIRED>
 <!ATTLIST storage_type content  CDATA "">
-
+<!ELEMENT storage (prop*)>
+<!ATTLIST storage id CDATA #REQUIRED>
+<!ATTLIST storage typeId CDATA #REQUIRED>
+<!ATTLIST storage content  CDATA "">
+<!ATTLIST storage attach CDATA #REQUIRED>
 <!ELEMENT mount EMPTY>
 <!ATTLIST mount storageId CDATA #REQUIRED>
 <!ATTLIST mount name CDATA #REQUIRED>
@@ -150,12 +155,6 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST disk read_bw CDATA #REQUIRED>
 <!ATTLIST disk write_bw CDATA #REQUIRED>
 
-<!ELEMENT storage (prop*)>
-<!ATTLIST storage id CDATA #REQUIRED>
-<!ATTLIST storage typeId CDATA #REQUIRED>
-<!ATTLIST storage content  CDATA "">
-<!ATTLIST storage attach CDATA #REQUIRED>
-
 <!ELEMENT host_link EMPTY>
 <!ATTLIST host_link id CDATA #REQUIRED>
 <!ATTLIST host_link up CDATA #REQUIRED>
@@ -224,12 +223,18 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST route dst CDATA #REQUIRED>
 <!ATTLIST route symmetrical (YES|NO|yes|no) "YES">
 
+<!-- ASroute bypassASRoute are deprecated (prefer zoneRoute and friends) -->
 <!ELEMENT ASroute (link_ctn*)>
 <!ATTLIST ASroute src CDATA #REQUIRED>
 <!ATTLIST ASroute dst CDATA #REQUIRED>
 <!ATTLIST ASroute gw_src CDATA #REQUIRED>
 <!ATTLIST ASroute gw_dst CDATA #REQUIRED>
 <!ATTLIST ASroute symmetrical (YES|NO|yes|no) "YES">
+<!ELEMENT bypassASroute (link_ctn*)>
+<!ATTLIST bypassASroute src CDATA #REQUIRED>
+<!ATTLIST bypassASroute dst CDATA #REQUIRED>
+<!ATTLIST bypassASroute gw_src CDATA #REQUIRED>
+<!ATTLIST bypassASroute gw_dst CDATA #REQUIRED>
 
 <!ELEMENT zoneRoute (link_ctn*)>
 <!ATTLIST zoneRoute src CDATA #REQUIRED>
@@ -246,18 +251,13 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ATTLIST bypassRoute src CDATA #REQUIRED>
 <!ATTLIST bypassRoute dst CDATA #REQUIRED>
 
-<!ELEMENT bypassASroute (link_ctn*)>
-<!ATTLIST bypassASroute src CDATA #REQUIRED>
-<!ATTLIST bypassASroute dst CDATA #REQUIRED>
-<!ATTLIST bypassASroute gw_src CDATA #REQUIRED>
-<!ATTLIST bypassASroute gw_dst CDATA #REQUIRED>
-
 <!ELEMENT bypassZoneRoute (link_ctn*)>
 <!ATTLIST bypassZoneRoute src CDATA #REQUIRED>
 <!ATTLIST bypassZoneRoute dst CDATA #REQUIRED>
 <!ATTLIST bypassZoneRoute gw_src CDATA #REQUIRED>
 <!ATTLIST bypassZoneRoute gw_dst CDATA #REQUIRED>
 
+<!-- process is deprecated -->
 <!ELEMENT process ((argument|prop)*)>
 <!ATTLIST process host CDATA #REQUIRED>
 <!ATTLIST process function CDATA #REQUIRED>
index 95e99d3..c686091 100644 (file)
@@ -6733,8 +6733,7 @@ FAIL("EOF in prolog.");
        YY_BREAK
 
 /* RULES DERIVED FROM DTD. */
-/* <!-- A zone is either an internal node that contains other zones, 
-  *      or a  leaf containing hosts and other leaf-like elements -->
+/* <!-- AS is a deprecated equivalent of zone -->
   *           (((AS|zone|include|link|backbone|cabinet|cluster|peer|trace|trace_connect)*,
   *        (zoneRoute|ASroute|trace|trace_connect|bypassASroute|bypassZoneRoute)*,
   *        (trace|trace_connect)*)
@@ -6850,6 +6849,7 @@ case YY_STATE_EOF(S_surfxml_AS_9):
 FAIL("Premature EOF: `</AS>' expected.");
        YY_BREAK
 
+/* <!-- ASroute bypassASRoute are deprecated (prefer zoneRoute and friends) -->  */
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
@@ -7287,10 +7287,10 @@ YY_RULE_SETUP
   if (!AX_surfxml_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element.");
   LEAVE; STag_surfxml_backbone(); surfxml_pcdata_ix = 0; ETag_surfxml_backbone(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -7314,10 +7314,10 @@ YY_RULE_SETUP
   ETag_surfxml_backbone();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -7803,8 +7803,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element.");
   LEAVE; STag_surfxml_cabinet(); surfxml_pcdata_ix = 0; ETag_surfxml_cabinet(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
    case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
@@ -7831,8 +7831,8 @@ YY_RULE_SETUP
   ETag_surfxml_cabinet();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
    case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
@@ -8700,12 +8700,12 @@ YY_RULE_SETUP
   if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
   LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -8729,12 +8729,12 @@ YY_RULE_SETUP
   ETag_surfxml_include();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -8890,10 +8890,10 @@ YY_RULE_SETUP
   if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
   LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -8917,10 +8917,10 @@ YY_RULE_SETUP
   ETag_surfxml_link();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
+   case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break;
   }
  }
        YY_BREAK
@@ -9435,8 +9435,8 @@ FAIL("Premature EOF: `</peer>' expected.");
   * * Things that will change in upcoming version 5 (TODO):
   *   - The following tags will be removed:
   *     - <include> spits an error since v3.18
-  *     - <random> does nothing since a very long time
-  *     - <as>, <asroute>, <bypassZoneRoute> and <process>, deprecated in DTD4.1
+  *     - <random> and <model_prop> do nothing since a very long time
+  *     - <as>, <asroute>, <bypassASRoute> and <process>, deprecated in DTD4.1
   *   - FULLDUPLEX sharing will be removed, deprecated in DTD4.2 (v3.19)
   * * New in DTD version 4.1 (in SimGrid 3.16): backward compatible change (v4 files are valid v4.1 files)
   *    - <zone> can be used as a synonym for the now deprecated <as>
@@ -9571,6 +9571,7 @@ case YY_STATE_EOF(S_surfxml_platform_8):
 FAIL("Premature EOF: `</platform>' expected.");
        YY_BREAK
 
+/* <!-- process is deprecated -->  */
 case 420:
 /* rule 420 can match eol */
 YY_RULE_SETUP
@@ -9821,6 +9822,7 @@ case YY_STATE_EOF(E_surfxml_prop):
 FAIL("Premature EOF: `</prop>' expected.");
        YY_BREAK
 
+/* <!-- random is deprecated -->  */
 case 454:
 /* rule 454 can match eol */
 YY_RULE_SETUP
@@ -10353,6 +10355,7 @@ case YY_STATE_EOF(S_surfxml_storage_2):
 FAIL("Premature EOF: `</storage>' expected.");
        YY_BREAK
 
+/* <!-- storage, storage_type and mount are deprecated -->  */
 case 536:
 /* rule 536 can match eol */
 YY_RULE_SETUP
@@ -10538,18 +10541,18 @@ YY_RULE_SETUP
   if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
   LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break;
    case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
    case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: case S_surfxml_zone_9: SET(S_surfxml_zone_11); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
-   case S_surfxml_zone_1: case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
-   case S_surfxml_zone: case S_surfxml_zone_8: SET(S_surfxml_zone_9); break;
+   case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break;
+   case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
+   case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break;
   }
  }
        YY_BREAK
@@ -10575,18 +10578,18 @@ YY_RULE_SETUP
   surfxml_pcdata_ix = popbuffer();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break;
    case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
    case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: case S_surfxml_zone_9: SET(S_surfxml_zone_11); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
-   case S_surfxml_zone_1: case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
-   case S_surfxml_zone: case S_surfxml_zone_8: SET(S_surfxml_zone_9); break;
+   case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break;
+   case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
+   case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break;
   }
  }
        YY_BREAK
@@ -10688,18 +10691,18 @@ YY_RULE_SETUP
   if (!AX_surfxml_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
   LEAVE; STag_surfxml_trace___connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace___connect(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break;
    case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
    case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: case S_surfxml_zone_9: SET(S_surfxml_zone_11); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
-   case S_surfxml_zone_1: case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
-   case S_surfxml_zone: case S_surfxml_zone_8: SET(S_surfxml_zone_9); break;
+   case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break;
+   case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
+   case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break;
   }
  }
        YY_BREAK
@@ -10723,18 +10726,18 @@ YY_RULE_SETUP
   ETag_surfxml_trace___connect();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break;
    case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
    case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
    case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
    case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: case S_surfxml_zone_9: SET(S_surfxml_zone_11); break;
-   case S_surfxml_zone_13: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break;
-   case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
-   case S_surfxml_zone_1: case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
-   case S_surfxml_zone: case S_surfxml_zone_8: SET(S_surfxml_zone_9); break;
+   case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break;
+   case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break;
+   case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break;
+   case S_surfxml_zone_5: SET(S_surfxml_zone_6); break;
+   case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break;
   }
  }
        YY_BREAK
index eb876f0..a7b5c95 100644 (file)
@@ -34,7 +34,8 @@ XBT_PRIVATE std::unordered_map<std::string, std::string> trace_connect_list_link
 void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect)
 {
   surf_parse_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(),
-         std::string("Cannot connect trace ")+ trace_connect->trace+ " to "+trace_connect->element+": trace unknown");
+                    std::string("Cannot connect trace ") + trace_connect->trace + " to " + trace_connect->element +
+                        ": trace unknown");
 
   switch (trace_connect->kind) {
     case simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL:
@@ -106,7 +107,8 @@ void parse_platform_file(const std::string& file)
 
   /* connect all profiles relative to hosts */
   for (auto const& elm : trace_connect_list_host_avail) {
-    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), std::string("<trace_connect kind=\"HOST_AVAIL\">: Trace ")+elm.first+" undefined.");
+    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(),
+                      std::string("<trace_connect kind=\"HOST_AVAIL\">: Trace ") + elm.first + " undefined.");
     auto profile = traces_set_list.at(elm.first);
 
     auto host = engine->host_by_name_or_null(elm.second);
@@ -115,7 +117,8 @@ void parse_platform_file(const std::string& file)
   }
 
   for (auto const& elm : trace_connect_list_host_speed) {
-    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), std::string("<trace_connect kind=\"SPEED\">: Trace ")+elm.first+" undefined.");
+    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(),
+                      std::string("<trace_connect kind=\"SPEED\">: Trace ") + elm.first + " undefined.");
     auto profile = traces_set_list.at(elm.first);
 
     auto host = engine->host_by_name_or_null(elm.second);
@@ -124,7 +127,8 @@ void parse_platform_file(const std::string& file)
   }
 
   for (auto const& elm : trace_connect_list_link_avail) {
-    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), std::string("<trace_connect kind=\"LINK_AVAIL\">: Trace ")+elm.first+" undefined.");
+    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(),
+                      std::string("<trace_connect kind=\"LINK_AVAIL\">: Trace ") + elm.first + " undefined.");
     auto profile = traces_set_list.at(elm.first);
 
     auto link = engine->link_by_name_or_null(elm.second);
@@ -133,7 +137,8 @@ void parse_platform_file(const std::string& file)
   }
 
   for (auto const& elm : trace_connect_list_link_bw) {
-    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), std::string("<trace_connect kind=\"BANDWIDTH\">: Trace ")+elm.first+" undefined.");
+    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(),
+                      std::string("<trace_connect kind=\"BANDWIDTH\">: Trace ") + elm.first + " undefined.");
     auto profile = traces_set_list.at(elm.first);
 
     auto link = engine->link_by_name_or_null(elm.second);
@@ -142,7 +147,8 @@ void parse_platform_file(const std::string& file)
   }
 
   for (auto const& elm : trace_connect_list_link_lat) {
-    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), std::string("<trace_connect kind=\"LATENCY\">: Trace ")+elm.first+" undefined.");
+    surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(),
+                      std::string("<trace_connect kind=\"LATENCY\">: Trace ") + elm.first + " undefined.");
     auto profile = traces_set_list.at(elm.first);
 
     auto link = engine->link_by_name_or_null(elm.second);
index 5860e28..aabf032 100644 (file)
@@ -129,9 +129,6 @@ static void explodesRadical(const std::string& radicals, std::vector<int>* explo
 
 std::vector<std::unordered_map<std::string, std::string>> property_sets;
 
-/* The default current property receiver. Setup in the corresponding opening callbacks. */
-std::unordered_map<std::string, std::string> current_model_property_set;
-
 FILE *surf_file_to_parse = nullptr;
 
 /* Stuff relative to storage */
@@ -196,17 +193,19 @@ void STag_surfxml_platform() {
       "Use simgrid_update_xml to update your file automatically. "
       "This program is installed automatically with SimGrid, or "
       "available in the tools/ directory of the source archive.");
-  surf_parse_assert((version >= 4.0),
-             std::string("******* THIS FILE IS TOO OLD (v:")+std::to_string(version)+") *********\n "
-             "Changes introduced in SimGrid 3.13:\n"
-             "  - 'power' attribute of hosts (and others) got renamed to 'speed'.\n"
-             "  - In <trace_connect>, attribute kind=\"POWER\" is now kind=\"SPEED\".\n"
-             "  - DOCTYPE now point to the rignt URL.\n"
-             "  - speed, bandwidth and latency attributes now MUST have an explicit unit (f, Bps, s by default)"
-             "\n\n"
-             "Use simgrid_update_xml to update your file automatically. "
-             "This program is installed automatically with SimGrid, or "
-             "available in the tools/ directory of the source archive.");
+  surf_parse_assert(
+      (version >= 4.0),
+      std::string("******* THIS FILE IS TOO OLD (v:") + std::to_string(version) +
+          ") *********\n "
+          "Changes introduced in SimGrid 3.13:\n"
+          "  - 'power' attribute of hosts (and others) got renamed to 'speed'.\n"
+          "  - In <trace_connect>, attribute kind=\"POWER\" is now kind=\"SPEED\".\n"
+          "  - DOCTYPE now point to the rignt URL.\n"
+          "  - speed, bandwidth and latency attributes now MUST have an explicit unit (f, Bps, s by default)"
+          "\n\n"
+          "Use simgrid_update_xml to update your file automatically. "
+          "This program is installed automatically with SimGrid, or "
+          "available in the tools/ directory of the source archive.");
   if (version < 4.1) {
     XBT_INFO("You're using a v%.1f XML file (%s) while the current standard is v4.1 "
              "That's fine, the new version is backward compatible. \n\n"
@@ -662,27 +661,27 @@ void STag_surfxml_trace___connect()
   simgrid::kernel::routing::TraceConnectCreationArgs trace_connect;
 
   trace_connect.element = A_surfxml_trace___connect_element;
-  trace_connect.trace = A_surfxml_trace___connect_trace;
+  trace_connect.trace   = A_surfxml_trace___connect_trace;
 
   switch (A_surfxml_trace___connect_kind) {
-  case AU_surfxml_trace___connect_kind:
-  case A_surfxml_trace___connect_kind_SPEED:
-    trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::SPEED;
-    break;
-  case A_surfxml_trace___connect_kind_BANDWIDTH:
-    trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::BANDWIDTH;
-    break;
-  case A_surfxml_trace___connect_kind_HOST___AVAIL:
-    trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL;
-    break;
-  case A_surfxml_trace___connect_kind_LATENCY:
-    trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LATENCY;
-    break;
-  case A_surfxml_trace___connect_kind_LINK___AVAIL:
-    trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL;
-    break;
-  default:
-    surf_parse_error("Invalid trace kind");
+    case AU_surfxml_trace___connect_kind:
+    case A_surfxml_trace___connect_kind_SPEED:
+      trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::SPEED;
+      break;
+    case A_surfxml_trace___connect_kind_BANDWIDTH:
+      trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::BANDWIDTH;
+      break;
+    case A_surfxml_trace___connect_kind_HOST___AVAIL:
+      trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL;
+      break;
+    case A_surfxml_trace___connect_kind_LATENCY:
+      trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LATENCY;
+      break;
+    case A_surfxml_trace___connect_kind_LINK___AVAIL:
+      trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL;
+      break;
+    default:
+      surf_parse_error("Invalid trace kind");
   }
   sg_platf_trace_connect(&trace_connect);
 }
@@ -805,13 +804,15 @@ void STag_surfxml_argument(){
 }
 
 void STag_surfxml_model___prop(){
-  current_model_property_set.insert({A_surfxml_model___prop_id, A_surfxml_model___prop_value});
+  XBT_INFO("Deprecated tag <model_prop> ignored");
 }
 
 void ETag_surfxml_prop(){/* Nothing to do */}
 void STag_surfxml_random(){/* Nothing to do */}
 void ETag_surfxml_random(){/* Nothing to do */}
-void ETag_surfxml_trace___connect(){/* Nothing to do */}
+void ETag_surfxml_trace___connect()
+{ /* Nothing to do */
+}
 void STag_surfxml_trace()
 { /* Nothing to do */
 }
index a4b8541..57a86d3 100644 (file)
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.4.2.  */
+/* A Bison parser, made by GNU Bison 3.7.6.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
 /* C LALR(1) parser skeleton written by Richard Stallman, by
    simplifying the original so-called "semantic" parser.  */
 
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+   especially those whose name start with YY_ or yy_.  They are
+   private implementation details that can be changed or removed.  */
+
 /* All symbols defined below should begin with yy or YY, to avoid
    infringing on user name space.  This should be done even for local
    variables, as they might otherwise be expanded by user macros.
    define necessary library symbols; they are noted "INFRINGES ON
    USER NAME SPACE" below.  */
 
-/* Undocumented macros, especially those whose name start with YY_,
-   are private implementation details.  Do not rely on them.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
+/* Identify Bison output, and Bison version.  */
+#define YYBISON 30706
 
-/* Bison version.  */
-#define YYBISON_VERSION "3.4.2"
+/* Bison version string.  */
+#define YYBISON_VERSION "3.7.6"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -69,7 +70,6 @@
 #define yyerror         xbt_automaton_parser_error
 #define yydebug         xbt_automaton_parser_debug
 #define yynerrs         xbt_automaton_parser_nerrs
-
 #define yylval          xbt_automaton_parser_lval
 #define yychar          xbt_automaton_parser_char
 
@@ -92,6 +92,15 @@ static void new_transition(const char* id, xbt_automaton_exp_label_t label);
 
 #line 94 "parserPromela.tab.cacc"
 
+# ifndef YY_CAST
+#  ifdef __cplusplus
+#   define YY_CAST(Type, Val) static_cast<Type> (Val)
+#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+#  else
+#   define YY_CAST(Type, Val) ((Type) (Val))
+#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+#  endif
+# endif
 # ifndef YY_NULLPTR
 #  if defined __cplusplus
 #   if 201103L <= __cplusplus
@@ -104,79 +113,43 @@ static void new_transition(const char* id, xbt_automaton_exp_label_t label);
 #  endif
 # endif
 
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Use api.header.include to #include this header
-   instead of duplicating it here.  */
-#ifndef YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED
-# define YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED
-/* Debug traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 1
-#endif
-#if YYDEBUG
-extern int xbt_automaton_parser_debug;
-#endif
-
-/* Token type.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-  enum yytokentype
-  {
-    NEVER = 258,
-    IF = 259,
-    FI = 260,
-    IMPLIES = 261,
-    GOTO = 262,
-    AND = 263,
-    OR = 264,
-    NOT = 265,
-    LEFT_PAR = 266,
-    RIGHT_PAR = 267,
-    CASE = 268,
-    COLON = 269,
-    SEMI_COLON = 270,
-    CASE_TRUE = 271,
-    LEFT_BRACE = 272,
-    RIGHT_BRACE = 273,
-    LITT_ENT = 274,
-    LITT_CHAINE = 275,
-    LITT_REEL = 276,
-    ID = 277
-  };
-#endif
-
-/* Value type.  */
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
+#include "parserPromela.tab.hacc"
+/* Symbol kind.  */
+enum yysymbol_kind_t
 {
-#line 23 "parserPromela.yacc"
-
-  double real;
-  int integer;
-  char* string;
-  xbt_automaton_exp_label_t label;
-
-#line 167 "parserPromela.tab.cacc"
-
+  YYSYMBOL_YYEMPTY = -2,
+  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
+  YYSYMBOL_YYerror = 1,                    /* error  */
+  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
+  YYSYMBOL_NEVER = 3,                      /* NEVER  */
+  YYSYMBOL_IF = 4,                         /* IF  */
+  YYSYMBOL_FI = 5,                         /* FI  */
+  YYSYMBOL_IMPLIES = 6,                    /* IMPLIES  */
+  YYSYMBOL_GOTO = 7,                       /* GOTO  */
+  YYSYMBOL_AND = 8,                        /* AND  */
+  YYSYMBOL_OR = 9,                         /* OR  */
+  YYSYMBOL_NOT = 10,                       /* NOT  */
+  YYSYMBOL_LEFT_PAR = 11,                  /* LEFT_PAR  */
+  YYSYMBOL_RIGHT_PAR = 12,                 /* RIGHT_PAR  */
+  YYSYMBOL_CASE = 13,                      /* CASE  */
+  YYSYMBOL_COLON = 14,                     /* COLON  */
+  YYSYMBOL_SEMI_COLON = 15,                /* SEMI_COLON  */
+  YYSYMBOL_CASE_TRUE = 16,                 /* CASE_TRUE  */
+  YYSYMBOL_LEFT_BRACE = 17,                /* LEFT_BRACE  */
+  YYSYMBOL_RIGHT_BRACE = 18,               /* RIGHT_BRACE  */
+  YYSYMBOL_LITT_ENT = 19,                  /* LITT_ENT  */
+  YYSYMBOL_LITT_CHAINE = 20,               /* LITT_CHAINE  */
+  YYSYMBOL_LITT_REEL = 21,                 /* LITT_REEL  */
+  YYSYMBOL_ID = 22,                        /* ID  */
+  YYSYMBOL_YYACCEPT = 23,                  /* $accept  */
+  YYSYMBOL_automaton = 24,                 /* automaton  */
+  YYSYMBOL_stateseq = 25,                  /* stateseq  */
+  YYSYMBOL_26_1 = 26,                      /* $@1  */
+  YYSYMBOL_option = 27,                    /* option  */
+  YYSYMBOL_exp = 28                        /* exp  */
 };
-typedef union YYSTYPE YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern YYSTYPE xbt_automaton_parser_lval;
+typedef enum yysymbol_kind_t yysymbol_kind_t;
 
-int xbt_automaton_parser_parse (void);
-
-#endif /* !YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED  */
 
 
 
@@ -184,28 +157,87 @@ int xbt_automaton_parser_parse (void);
 # undef short
 #endif
 
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+   <limits.h> and (if available) <stdint.h> are included
+   so that the code can choose integer types of a good width.  */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+#  define YY_STDINT_H
+# endif
 #endif
 
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
+/* Narrow types that promote to a signed type and that can represent a
+   signed or unsigned integer of at least N bits.  In tables they can
+   save space and decrease cache pressure.  Promoting to a signed type
+   helps avoid bugs in integer arithmetic.  */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
 #else
 typedef signed char yytype_int8;
 #endif
 
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
 #else
-typedef unsigned short yytype_uint16;
+typedef short yytype_int16;
+#endif
+
+/* Work around bug in HP-UX 11.23, which defines these macros
+   incorrectly for preprocessor constants.  This workaround can likely
+   be removed in 2023, as HPE has promised support for HP-UX 11.23
+   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
 #endif
 
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+       && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
 #else
-typedef short yytype_int16;
+typedef short yytype_uint8;
+#endif
+
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+       && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
+#else
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+#  define YYPTRDIFF_T __PTRDIFF_TYPE__
+#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+#  ifndef ptrdiff_t
+#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  endif
+#  define YYPTRDIFF_T ptrdiff_t
+#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+#  define YYPTRDIFF_T long
+#  define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
 #endif
 
 #ifndef YYSIZE_T
@@ -213,7 +245,7 @@ typedef short yytype_int16;
 #  define YYSIZE_T __SIZE_TYPE__
 # elif defined size_t
 #  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
 #  define YYSIZE_T size_t
 # else
@@ -221,7 +253,20 @@ typedef short yytype_int16;
 # endif
 #endif
 
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+#define YYSIZE_MAXIMUM                                  \
+  YY_CAST (YYPTRDIFF_T,                                 \
+           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
+            ? YYPTRDIFF_MAXIMUM                         \
+            : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_int8 yy_state_t;
+
+/* State numbers in computations.  */
+typedef int yy_state_fast_t;
 
 #ifndef YY_
 # if defined YYENABLE_NLS && YYENABLE_NLS
@@ -235,38 +280,37 @@ typedef short yytype_int16;
 # endif
 #endif
 
-#ifndef YY_ATTRIBUTE
-# if (defined __GNUC__                                               \
-      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
-     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
-#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
-# else
-#  define YY_ATTRIBUTE(Spec) /* empty */
-# endif
-#endif
 
 #ifndef YY_ATTRIBUTE_PURE
-# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define YY_ATTRIBUTE_PURE
+# endif
 #endif
 
 #ifndef YY_ATTRIBUTE_UNUSED
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+#  define YY_ATTRIBUTE_UNUSED
+# endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
+# define YY_USE(E) ((void) (E))
 #else
-# define YYUSE(E) /* empty */
+# define YY_USE(E) /* empty */
 #endif
 
 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
-    _Pragma ("GCC diagnostic push") \
-    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
+    _Pragma ("GCC diagnostic push")                                     \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
     _Pragma ("GCC diagnostic pop")
 #else
 # define YY_INITIAL_VALUE(Value) Value
@@ -279,10 +323,22 @@ typedef short yytype_int16;
 # define YY_INITIAL_VALUE(Value) /* Nothing. */
 #endif
 
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN                          \
+    _Pragma ("GCC diagnostic push")                            \
+    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END            \
+    _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
 
 #define YY_ASSERT(E) ((void) (0 && (E)))
 
-#if ! defined yyoverflow || YYERROR_VERBOSE
+#if !defined yyoverflow
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
@@ -347,8 +403,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 # endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
+#endif /* !defined yyoverflow */
 
 #if (! defined yyoverflow \
      && (! defined __cplusplus \
@@ -357,17 +412,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss_alloc;
+  yy_state_t yyss_alloc;
   YYSTYPE yyvs_alloc;
 };
 
 /* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
 
 /* The size of an array large to enough to hold all stacks, each with
    N elements.  */
 # define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
       + YYSTACK_GAP_MAXIMUM)
 
 # define YYCOPY_NEEDED 1
@@ -380,11 +435,11 @@ union yyalloc
 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
     do                                                                  \
       {                                                                 \
-        YYSIZE_T yynewbytes;                                            \
+        YYPTRDIFF_T yynewbytes;                                         \
         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
         Stack = &yyptr->Stack_alloc;                                    \
-        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-        yyptr += yynewbytes / sizeof (*yyptr);                          \
+        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
       }                                                                 \
     while (0)
 
@@ -396,12 +451,12 @@ union yyalloc
 # ifndef YYCOPY
 #  if defined __GNUC__ && 1 < __GNUC__
 #   define YYCOPY(Dst, Src, Count) \
-      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
 #  else
 #   define YYCOPY(Dst, Src, Count)              \
       do                                        \
         {                                       \
-          YYSIZE_T yyi;                         \
+          YYPTRDIFF_T yyi;                      \
           for (yyi = 0; yyi < (Count); yyi++)   \
             (Dst)[yyi] = (Src)[yyi];            \
         }                                       \
@@ -424,17 +479,20 @@ union yyalloc
 /* YYNSTATES -- Number of states.  */
 #define YYNSTATES  32
 
-#define YYUNDEFTOK  2
+/* YYMAXUTOK -- Last valid token kind.  */
 #define YYMAXUTOK   277
 
+
 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
    as returned by yylex, with out-of-bounds checking.  */
-#define YYTRANSLATE(YYX)                                                \
-  ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+#define YYTRANSLATE(YYX)                                \
+  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
+   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
+   : YYSYMBOL_YYUNDEF)
 
 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
    as returned by yylex.  */
-static const yytype_uint8 yytranslate[] =
+static const yytype_int8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -468,45 +526,58 @@ static const yytype_uint8 yytranslate[] =
 
 #if YYDEBUG
   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
+static const yytype_int8 yyrline[] =
 {
        0,    60,    60,    63,    64,    64,    67,    68,    71,    72,
       73,    74,    75,    76
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || 0
+/** Accessing symbol of state STATE.  */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+   YYSYMBOL.  No bounds checking.  */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "NEVER", "IF", "FI", "IMPLIES", "GOTO",
-  "AND", "OR", "NOT", "LEFT_PAR", "RIGHT_PAR", "CASE", "COLON",
-  "SEMI_COLON", "CASE_TRUE", "LEFT_BRACE", "RIGHT_BRACE", "LITT_ENT",
-  "LITT_CHAINE", "LITT_REEL", "ID", "$accept", "automaton", "stateseq",
-  "$@1", "option", "exp", YY_NULLPTR
+  "\"end of file\"", "error", "\"invalid token\"", "NEVER", "IF", "FI",
+  "IMPLIES", "GOTO", "AND", "OR", "NOT", "LEFT_PAR", "RIGHT_PAR", "CASE",
+  "COLON", "SEMI_COLON", "CASE_TRUE", "LEFT_BRACE", "RIGHT_BRACE",
+  "LITT_ENT", "LITT_CHAINE", "LITT_REEL", "ID", "$accept", "automaton",
+  "stateseq", "$@1", "option", "exp", YY_NULLPTR
 };
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+  return yytname[yysymbol];
+}
 #endif
 
-# ifdef YYPRINT
+#ifdef YYPRINT
 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
    (internal) symbol number NUM (which must be that of a token).  */
-static const yytype_uint16 yytoknum[] =
+static const yytype_int16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277
 };
-# endif
+#endif
 
-#define YYPACT_NINF -16
+#define YYPACT_NINF (-16)
 
-#define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-16)))
+#define yypact_value_is_default(Yyn) \
+  ((Yyn) == YYPACT_NINF)
 
-#define YYTABLE_NINF -1
+#define YYTABLE_NINF (-1)
 
-#define yytable_value_is_error(Yytable_value) \
+#define yytable_value_is_error(Yyn) \
   0
 
   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
@@ -522,7 +593,7 @@ static const yytype_int8 yypact[] =
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
      Performed when YYTABLE does not specify something else to do.  Zero
      means the default is an error.  */
-static const yytype_uint8 yydefact[] =
+static const yytype_int8 yydefact[] =
 {
        0,     0,     0,     3,     1,     0,     0,     4,     2,     0,
        6,     0,     0,     0,     0,    12,    13,     0,     0,    11,
@@ -539,13 +610,13 @@ static const yytype_int8 yypgoto[] =
   /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,     2,     6,     9,    12,    17
+       0,     2,     6,     9,    12,    17
 };
 
   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
      positive, shift that token.  If negative, reduce the rule whose
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
-static const yytype_uint8 yytable[] =
+static const yytype_int8 yytable[] =
 {
       13,    14,     3,     1,    19,    20,    15,    22,    23,     5,
        4,    25,    16,    27,    28,    21,     7,    22,    23,     8,
@@ -561,7 +632,7 @@ static const yytype_int8 yycheck[] =
 
   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
      symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
+static const yytype_int8 yystos[] =
 {
        0,     3,    24,    17,     0,    22,    25,    14,    18,    26,
        4,    13,    27,    10,    11,    16,    22,    28,     5,    28,
@@ -570,24 +641,24 @@ static const yytype_uint8 yystos[] =
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
+static const yytype_int8 yyr1[] =
 {
        0,    23,    24,    25,    26,    25,    27,    27,    28,    28,
       28,    28,    28,    28
 };
 
   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
+static const yytype_int8 yyr2[] =
 {
        0,     2,     4,     0,     0,     8,     0,     6,     3,     3,
        3,     2,     1,     1
 };
 
 
+enum { YYENOMEM = -2 };
+
 #define yyerrok         (yyerrstatus = 0)
 #define yyclearin       (yychar = YYEMPTY)
-#define YYEMPTY         (-2)
-#define YYEOF           0
 
 #define YYACCEPT        goto yyacceptlab
 #define YYABORT         goto yyabortlab
@@ -613,10 +684,9 @@ static const yytype_uint8 yyr2[] =
       }                                                           \
   while (0)
 
-/* Error token number */
-#define YYTERROR        1
-#define YYERRCODE       256
-
+/* Backward compatibility with an undocumented macro.
+   Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
 
 
 /* Enable debugging if requested.  */
@@ -634,18 +704,18 @@ do {                                            \
 } while (0)
 
 /* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+# ifndef YY_LOCATION_PRINT
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
 
 
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
 do {                                                                      \
   if (yydebug)                                                            \
     {                                                                     \
       YYFPRINTF (stderr, "%s ", Title);                                   \
       yy_symbol_print (stderr,                                            \
-                  Type, Value); \
+                  Kind, Value); \
       YYFPRINTF (stderr, "\n");                                           \
     }                                                                     \
 } while (0)
@@ -656,18 +726,19 @@ do {                                                                      \
 `-----------------------------------*/
 
 static void
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_value_print (FILE *yyo,
+                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
 {
   FILE *yyoutput = yyo;
-  YYUSE (yyoutput);
+  YY_USE (yyoutput);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+  if (yykind < YYNTOKENS)
+    YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
 # endif
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yytype);
+  YY_USE (yykind);
   YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
@@ -677,12 +748,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
 `---------------------------*/
 
 static void
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyo,
+                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
 {
   YYFPRINTF (yyo, "%s %s (",
-             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
 
-  yy_symbol_value_print (yyo, yytype, yyvaluep);
+  yy_symbol_value_print (yyo, yykind, yyvaluep);
   YYFPRINTF (yyo, ")");
 }
 
@@ -692,7 +764,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
 `------------------------------------------------------------------*/
 
 static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
 {
   YYFPRINTF (stderr, "Stack now");
   for (; yybottom <= yytop; yybottom++)
@@ -715,21 +787,21 @@ do {                                                            \
 `------------------------------------------------*/
 
 static void
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+                 int yyrule)
 {
-  unsigned long yylno = yyrline[yyrule];
+  int yylno = yyrline[yyrule];
   int yynrhs = yyr2[yyrule];
   int yyi;
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
              yyrule - 1, yylno);
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr,
-                       yystos[yyssp[yyi + 1 - yynrhs]],
-                       &yyvsp[(yyi + 1) - (yynrhs)]
-                                              );
+                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+                       &yyvsp[(yyi + 1) - (yynrhs)]);
       YYFPRINTF (stderr, "\n");
     }
 }
@@ -744,8 +816,8 @@ do {                                    \
    multiple parsers can coexist.  */
 int yydebug;
 #else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
 # define YY_STACK_PRINT(Bottom, Top)
 # define YY_REDUCE_PRINT(Rule)
 #endif /* !YYDEBUG */
@@ -768,254 +840,30 @@ int yydebug;
 #endif
 
 
-#if YYERROR_VERBOSE
 
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-yystrlen (const char *yystr)
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
 
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
 
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-        switch (*++yyp)
-          {
-          case '\'':
-          case ',':
-            goto do_not_strip_quotes;
-
-          case '\\':
-            if (*++yyp != '\\')
-              goto do_not_strip_quotes;
-            else
-              goto append;
-
-          append:
-          default:
-            if (yyres)
-              yyres[yyn] = *yyp;
-            yyn++;
-            break;
-
-          case '"':
-            if (yyres)
-              yyres[yyn] = '\0';
-            return yyn;
-          }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
-   about the unexpected token YYTOKEN for the state stack whose top is
-   YYSSP.
-
-   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
-   not large enough to hold the message.  In that case, also set
-   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
-   required number of bytes is too large to store.  */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
-                yytype_int16 *yyssp, int yytoken)
-{
-  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
-  YYSIZE_T yysize = yysize0;
-  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-  /* Internationalized format string. */
-  const char *yyformat = YY_NULLPTR;
-  /* Arguments of yyformat. */
-  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-  /* Number of reported tokens (one for the "unexpected", one per
-     "expected"). */
-  int yycount = 0;
-
-  /* There are many possibilities here to consider:
-     - If this state is a consistent state with a default action, then
-       the only way this function was invoked is if the default action
-       is an error action.  In that case, don't check for expected
-       tokens because there are none.
-     - The only way there can be no lookahead present (in yychar) is if
-       this state is a consistent state with a default action.  Thus,
-       detecting the absence of a lookahead is sufficient to determine
-       that there is no unexpected or expected token to report.  In that
-       case, just report a simple "syntax error".
-     - Don't assume there isn't a lookahead just because this state is a
-       consistent state with a default action.  There might have been a
-       previous inconsistent state, consistent state with a non-default
-       action, or user semantic action that manipulated yychar.
-     - Of course, the expected token list depends on states to have
-       correct lookahead information, and it depends on the parser not
-       to perform extra reductions after fetching a lookahead from the
-       scanner and before detecting a syntax error.  Thus, state merging
-       (from LALR or IELR) and default reductions corrupt the expected
-       token list.  However, the list is correct for canonical LR with
-       one exception: it will still contain any token that will not be
-       accepted due to an error action in a later state.
-  */
-  if (yytoken != YYEMPTY)
-    {
-      int yyn = yypact[*yyssp];
-      yyarg[yycount++] = yytname[yytoken];
-      if (!yypact_value_is_default (yyn))
-        {
-          /* Start YYX at -YYN if negative to avoid negative indexes in
-             YYCHECK.  In other words, skip the first -YYN actions for
-             this state because they are default actions.  */
-          int yyxbegin = yyn < 0 ? -yyn : 0;
-          /* Stay within bounds of both yycheck and yytname.  */
-          int yychecklim = YYLAST - yyn + 1;
-          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-          int yyx;
-
-          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
-                && !yytable_value_is_error (yytable[yyx + yyn]))
-              {
-                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-                  {
-                    yycount = 1;
-                    yysize = yysize0;
-                    break;
-                  }
-                yyarg[yycount++] = yytname[yyx];
-                {
-                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
-                  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
-                    yysize = yysize1;
-                  else
-                    return 2;
-                }
-              }
-        }
-    }
-
-  switch (yycount)
-    {
-# define YYCASE_(N, S)                      \
-      case N:                               \
-        yyformat = S;                       \
-      break
-    default: /* Avoid compiler warnings. */
-      YYCASE_(0, YY_("syntax error"));
-      YYCASE_(1, YY_("syntax error, unexpected %s"));
-      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
-      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
-      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
-      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
-    }
-
-  {
-    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
-    if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
-      yysize = yysize1;
-    else
-      return 2;
-  }
-
-  if (*yymsg_alloc < yysize)
-    {
-      *yymsg_alloc = 2 * yysize;
-      if (! (yysize <= *yymsg_alloc
-             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
-        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
-      return 1;
-    }
-
-  /* Avoid sprintf, as that infringes on the user's name space.
-     Don't have undefined behavior even if the translation
-     produced a string with the wrong number of "%s"s.  */
-  {
-    char *yyp = *yymsg;
-    int yyi = 0;
-    while ((*yyp = *yyformat) != '\0')
-      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
-        {
-          yyp += yytnamerr (yyp, yyarg[yyi++]);
-          yyformat += 2;
-        }
-      else
-        {
-          yyp++;
-          yyformat++;
-        }
-  }
-  return 0;
-}
-#endif /* YYERROR_VERBOSE */
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
 `-----------------------------------------------*/
 
 static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg,
+            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
 {
-  YYUSE (yyvaluep);
+  YY_USE (yyvaluep);
   if (!yymsg)
     yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
 
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  YYUSE (yytype);
+  YY_USE (yykind);
   YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
 
-
-
-/* The lookahead symbol.  */
+/* Lookahead token kind.  */
 int yychar;
 
 /* The semantic value of the lookahead symbol.  */
@@ -1024,6 +872,8 @@ YYSTYPE yylval;
 int yynerrs;
 
 
+
+
 /*----------.
 | yyparse.  |
 `----------*/
@@ -1031,43 +881,36 @@ int yynerrs;
 int
 yyparse (void)
 {
-    int yystate;
+    yy_state_fast_t yystate = 0;
     /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
+    int yyerrstatus = 0;
 
-    /* The stacks and their tools:
-       'yyss': related to states.
-       'yyvs': related to semantic values.
-
-       Refer to the stacks through separate pointers, to allow yyoverflow
+    /* Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */
 
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
+    /* Their size.  */
+    YYPTRDIFF_T yystacksize = YYINITDEPTH;
 
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
+    /* The state stack: array, bottom, top.  */
+    yy_state_t yyssa[YYINITDEPTH];
+    yy_state_t *yyss = yyssa;
+    yy_state_t *yyssp = yyss;
 
-    YYSIZE_T yystacksize;
+    /* The semantic value stack: array, bottom, top.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs = yyvsa;
+    YYSTYPE *yyvsp = yyvs;
 
   int yyn;
+  /* The return value of yyparse.  */
   int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
+  /* Lookahead symbol kind.  */
+  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
 
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+
 
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
@@ -1075,15 +918,8 @@ yyparse (void)
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
-  yyssp = yyss = yyssa;
-  yyvsp = yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
-
   YYDPRINTF ((stderr, "Starting parse\n"));
 
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
   yychar = YYEMPTY; /* Cause a token to be read.  */
   goto yysetstate;
 
@@ -1098,12 +934,15 @@ yynewstate:
 
 
 /*--------------------------------------------------------------------.
-| yynewstate -- set current state (the top of the stack) to yystate.  |
+| yysetstate -- set current state (the top of the stack) to yystate.  |
 `--------------------------------------------------------------------*/
 yysetstate:
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
-  *yyssp = (yytype_int16) yystate;
+  YY_IGNORE_USELESS_CAST_BEGIN
+  *yyssp = YY_CAST (yy_state_t, yystate);
+  YY_IGNORE_USELESS_CAST_END
+  YY_STACK_PRINT (yyss, yyssp);
 
   if (yyss + yystacksize - 1 <= yyssp)
 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
@@ -1111,23 +950,23 @@ yysetstate:
 #else
     {
       /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
+      YYPTRDIFF_T yysize = yyssp - yyss + 1;
 
 # if defined yyoverflow
       {
         /* Give user a chance to reallocate the stack.  Use copies of
            these so that the &'s don't force the real ones into
            memory.  */
+        yy_state_t *yyss1 = yyss;
         YYSTYPE *yyvs1 = yyvs;
-        yytype_int16 *yyss1 = yyss;
 
         /* Each stack pointer address is followed by the size of the
            data in use in that stack, in bytes.  This used to be a
            conditional around just the two extra args, but that might
            be undefined if yyoverflow is a macro.  */
         yyoverflow (YY_("memory exhausted"),
-                    &yyss1, yysize * sizeof (*yyssp),
-                    &yyvs1, yysize * sizeof (*yyvsp),
+                    &yyss1, yysize * YYSIZEOF (*yyssp),
+                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                     &yystacksize);
         yyss = yyss1;
         yyvs = yyvs1;
@@ -1141,14 +980,15 @@ yysetstate:
         yystacksize = YYMAXDEPTH;
 
       {
-        yytype_int16 *yyss1 = yyss;
+        yy_state_t *yyss1 = yyss;
         union yyalloc *yyptr =
-          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+          YY_CAST (union yyalloc *,
+                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
         if (! yyptr)
           goto yyexhaustedlab;
         YYSTACK_RELOCATE (yyss_alloc, yyss);
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
+#  undef YYSTACK_RELOCATE
         if (yyss1 != yyssa)
           YYSTACK_FREE (yyss1);
       }
@@ -1157,8 +997,10 @@ yysetstate:
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                  (unsigned long) yystacksize));
+      YY_IGNORE_USELESS_CAST_BEGIN
+      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+                  YY_CAST (long, yystacksize)));
+      YY_IGNORE_USELESS_CAST_END
 
       if (yyss + yystacksize - 1 <= yyssp)
         YYABORT;
@@ -1185,18 +1027,29 @@ yybackup:
 
   /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
   if (yychar == YYEMPTY)
     {
-      YYDPRINTF ((stderr, "Reading a token"));
+      YYDPRINTF ((stderr, "Reading a token\n"));
       yychar = yylex ();
     }
 
   if (yychar <= YYEOF)
     {
-      yychar = yytoken = YYEOF;
+      yychar = YYEOF;
+      yytoken = YYSYMBOL_YYEOF;
       YYDPRINTF ((stderr, "Now at end of input.\n"));
     }
+  else if (yychar == YYerror)
+    {
+      /* The scanner already issued an error message, process directly
+         to error recovery.  But do not keep the error token as
+         lookahead, it is too special and may lead us to an endless
+         loop in error recovery. */
+      yychar = YYUNDEF;
+      yytoken = YYSYMBOL_YYerror;
+      goto yyerrlab1;
+    }
   else
     {
       yytoken = YYTRANSLATE (yychar);
@@ -1224,14 +1077,13 @@ yybackup:
 
   /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
   yystate = yyn;
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
   YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
   goto yynewstate;
 
 
@@ -1266,56 +1118,56 @@ yyreduce:
   YY_REDUCE_PRINT (yyn);
   switch (yyn)
     {
-  case 4:
+  case 4: /* $@1: %empty  */
 #line 64 "parserPromela.yacc"
-    { new_state((yyvsp[-1].string), 1);}
-#line 1273 "parserPromela.tab.cacc"
+                    { new_state((yyvsp[-1].string), 1);}
+#line 1125 "parserPromela.tab.cacc"
     break;
 
-  case 7:
+  case 7: /* option: CASE exp IMPLIES GOTO ID option  */
 #line 68 "parserPromela.yacc"
-    { new_transition((yyvsp[-1].string), (yyvsp[-4].label));}
-#line 1279 "parserPromela.tab.cacc"
+                                         { new_transition((yyvsp[-1].string), (yyvsp[-4].label));}
+#line 1131 "parserPromela.tab.cacc"
     break;
 
-  case 8:
+  case 8: /* exp: LEFT_PAR exp RIGHT_PAR  */
 #line 71 "parserPromela.yacc"
-    { (yyval.label) = (yyvsp[-1].label); }
-#line 1285 "parserPromela.tab.cacc"
+                             { (yyval.label) = (yyvsp[-1].label); }
+#line 1137 "parserPromela.tab.cacc"
     break;
 
-  case 9:
+  case 9: /* exp: exp OR exp  */
 #line 72 "parserPromela.yacc"
-    { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); }
-#line 1291 "parserPromela.tab.cacc"
+                 { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); }
+#line 1143 "parserPromela.tab.cacc"
     break;
 
-  case 10:
+  case 10: /* exp: exp AND exp  */
 #line 73 "parserPromela.yacc"
-    { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); }
-#line 1297 "parserPromela.tab.cacc"
+                  { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); }
+#line 1149 "parserPromela.tab.cacc"
     break;
 
-  case 11:
+  case 11: /* exp: NOT exp  */
 #line 74 "parserPromela.yacc"
-    { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); }
-#line 1303 "parserPromela.tab.cacc"
+              { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); }
+#line 1155 "parserPromela.tab.cacc"
     break;
 
-  case 12:
+  case 12: /* exp: CASE_TRUE  */
 #line 75 "parserPromela.yacc"
-    { (yyval.label) = xbt_automaton_exp_label_new_one(); }
-#line 1309 "parserPromela.tab.cacc"
+                { (yyval.label) = xbt_automaton_exp_label_new_one(); }
+#line 1161 "parserPromela.tab.cacc"
     break;
 
-  case 13:
+  case 13: /* exp: ID  */
 #line 76 "parserPromela.yacc"
-    { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); }
-#line 1315 "parserPromela.tab.cacc"
+         { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); }
+#line 1167 "parserPromela.tab.cacc"
     break;
 
 
-#line 1319 "parserPromela.tab.cacc"
+#line 1171 "parserPromela.tab.cacc"
 
       default: break;
     }
@@ -1330,11 +1182,10 @@ yyreduce:
      case of YYERROR or YYBACKUP, subsequent parser actions might lead
      to an incorrect destructor call or verbose syntax error message
      before the lookahead is translated.  */
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
   yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
 
   *++yyvsp = yyval;
 
@@ -1358,50 +1209,14 @@ yyreduce:
 yyerrlab:
   /* Make sure we have latest lookahead translation.  See comments at
      user semantic actions for why this is necessary.  */
-  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
+  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
       ++yynerrs;
-#if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
-                                        yyssp, yytoken)
-      {
-        char const *yymsgp = YY_("syntax error");
-        int yysyntax_error_status;
-        yysyntax_error_status = YYSYNTAX_ERROR;
-        if (yysyntax_error_status == 0)
-          yymsgp = yymsg;
-        else if (yysyntax_error_status == 1)
-          {
-            if (yymsg != yymsgbuf)
-              YYSTACK_FREE (yymsg);
-            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
-            if (!yymsg)
-              {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-                yysyntax_error_status = 2;
-              }
-            else
-              {
-                yysyntax_error_status = YYSYNTAX_ERROR;
-                yymsgp = yymsg;
-              }
-          }
-        yyerror (yymsgp);
-        if (yysyntax_error_status == 2)
-          goto yyexhaustedlab;
-      }
-# undef YYSYNTAX_ERROR
-#endif
     }
 
-
-
   if (yyerrstatus == 3)
     {
       /* If just tried and failed to reuse lookahead token after an
@@ -1450,13 +1265,14 @@ yyerrorlab:
 yyerrlab1:
   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
 
+  /* Pop stack until we find a state that shifts the error token.  */
   for (;;)
     {
       yyn = yypact[yystate];
       if (!yypact_value_is_default (yyn))
         {
-          yyn += YYTERROR;
-          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+          yyn += YYSYMBOL_YYerror;
+          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
             {
               yyn = yytable[yyn];
               if (0 < yyn)
@@ -1470,7 +1286,7 @@ yyerrlab1:
 
 
       yydestruct ("Error: popping",
-                  yystos[yystate], yyvsp);
+                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
       YYPOPSTACK (1);
       yystate = *yyssp;
       YY_STACK_PRINT (yyss, yyssp);
@@ -1482,7 +1298,7 @@ yyerrlab1:
 
 
   /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
 
   yystate = yyn;
   goto yynewstate;
@@ -1504,20 +1320,20 @@ yyabortlab:
   goto yyreturn;
 
 
-#if !defined yyoverflow || YYERROR_VERBOSE
+#if !defined yyoverflow
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
 yyexhaustedlab:
   yyerror (YY_("memory exhausted"));
   yyresult = 2;
-  /* Fall through.  */
+  goto yyreturn;
 #endif
 
 
-/*-----------------------------------------------------.
-| yyreturn -- parsing is finished, return the result.  |
-`-----------------------------------------------------*/
+/*-------------------------------------------------------.
+| yyreturn -- parsing is finished, clean up and return.  |
+`-------------------------------------------------------*/
 yyreturn:
   if (yychar != YYEMPTY)
     {
@@ -1534,19 +1350,17 @@ yyreturn:
   while (yyssp != yyss)
     {
       yydestruct ("Cleanup: popping",
-                  yystos[*yyssp], yyvsp);
+                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
       YYPOPSTACK (1);
     }
 #ifndef yyoverflow
   if (yyss != yyssa)
     YYSTACK_FREE (yyss);
 #endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
+
   return yyresult;
 }
+
 #line 79 "parserPromela.yacc"
 
 
index 3add96d..66ae166 100644 (file)
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.4.2.  */
+/* A Bison parser, made by GNU Bison 3.7.6.  */
 
 /* Bison interface for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -31,8 +31,9 @@
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
-/* Undocumented macros, especially those whose name start with YY_,
-   are private implementation details.  Do not rely on them.  */
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+   especially those whose name start with YY_ or yy_.  They are
+   private implementation details that can be changed or removed.  */
 
 #ifndef YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED
 # define YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED
 extern int xbt_automaton_parser_debug;
 #endif
 
-/* Token type.  */
+/* Token kinds.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
   enum yytokentype
   {
-    NEVER = 258,
-    IF = 259,
-    FI = 260,
-    IMPLIES = 261,
-    GOTO = 262,
-    AND = 263,
-    OR = 264,
-    NOT = 265,
-    LEFT_PAR = 266,
-    RIGHT_PAR = 267,
-    CASE = 268,
-    COLON = 269,
-    SEMI_COLON = 270,
-    CASE_TRUE = 271,
-    LEFT_BRACE = 272,
-    RIGHT_BRACE = 273,
-    LITT_ENT = 274,
-    LITT_CHAINE = 275,
-    LITT_REEL = 276,
-    ID = 277
+    YYEMPTY = -2,
+    YYEOF = 0,                     /* "end of file"  */
+    YYerror = 256,                 /* error  */
+    YYUNDEF = 257,                 /* "invalid token"  */
+    NEVER = 258,                   /* NEVER  */
+    IF = 259,                      /* IF  */
+    FI = 260,                      /* FI  */
+    IMPLIES = 261,                 /* IMPLIES  */
+    GOTO = 262,                    /* GOTO  */
+    AND = 263,                     /* AND  */
+    OR = 264,                      /* OR  */
+    NOT = 265,                     /* NOT  */
+    LEFT_PAR = 266,                /* LEFT_PAR  */
+    RIGHT_PAR = 267,               /* RIGHT_PAR  */
+    CASE = 268,                    /* CASE  */
+    COLON = 269,                   /* COLON  */
+    SEMI_COLON = 270,              /* SEMI_COLON  */
+    CASE_TRUE = 271,               /* CASE_TRUE  */
+    LEFT_BRACE = 272,              /* LEFT_BRACE  */
+    RIGHT_BRACE = 273,             /* RIGHT_BRACE  */
+    LITT_ENT = 274,                /* LITT_ENT  */
+    LITT_CHAINE = 275,             /* LITT_CHAINE  */
+    LITT_REEL = 276,               /* LITT_REEL  */
+    ID = 277                       /* ID  */
   };
+  typedef enum yytokentype yytoken_kind_t;
 #endif
 
 /* Value type.  */
@@ -83,7 +89,7 @@ union YYSTYPE
   char* string;
   xbt_automaton_exp_label_t label;
 
-#line 87 "parserPromela.tab.hacc"
+#line 93 "parserPromela.tab.hacc"
 
 };
 typedef union YYSTYPE YYSTYPE;
index 9635ca8..3915221 100644 (file)
@@ -99,7 +99,12 @@ static ReplayAction* get_action(const char* name)
 static void handle_action(ReplayAction& action)
 {
   XBT_DEBUG("%s replays a %s action", action.at(0).c_str(), action.at(1).c_str());
-  action_fun function = action_funs.at(action.at(1));
+  action_fun function;
+  try {
+    function = action_funs.at(action.at(1));
+  } catch (const std::out_of_range&) {
+    xbt_die("Replay Error: action %s is unknown, please register it properly in the replay engine",  action.at(1).c_str());
+  }
   try {
     function(action);
   } catch (const Exception&) {
index 67fcbea..964b409 100644 (file)
@@ -9,25 +9,17 @@ foreach(example semaphoregc sleephostoff)
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.tesh)
 
   if(enable_java)
-    add_custom_command(
-      COMMENT "Building ${example}..."
-      OUTPUT  java-${example}_compiled
-      DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
-      COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_BINARY_DIR} ${sources}
-      COMMAND ${CMAKE_COMMAND} -E remove ${example}/java-${example}_compiled
-      COMMAND ${CMAKE_COMMAND} -E touch ${example}/java-${example}_compiled
-    )
-    add_custom_target(java-${example} ALL DEPENDS java-${example}_compiled)
+    string (REPLACE "-" "/" example_dir ${example})
+    add_jar(java-${example} SOURCES ${sources}
+            INCLUDE_JARS simgrid-java_jar
+           OUTPUT_NAME ${example}
+           OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
     add_dependencies(java-all java-${example})
-    set_target_properties(java-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
+    
+    ADD_TESH(tesh-java-${example}  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=${TESH_CLASSPATH}:${example}.jar --cd ${CMAKE_BINARY_DIR}/teshsuite/java/${example_dir}  ${CMAKE_HOME_DIRECTORY}/teshsuite/java/${example_dir}/${example}.tesh)
   endif()
   set(examples_src ${examples_src} ${sources})
 endforeach()
 
 set(examples_src ${examples_src}                                                               PARENT_SCOPE)
 set(tesh_files   ${tesh_files}                                                                 PARENT_SCOPE)
-
-if(enable_java)
-  ADD_TESH(tesh-java-semaphoregc  --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/semaphoregc  ${CMAKE_HOME_DIRECTORY}/teshsuite/java/semaphoregc/semaphoregc.tesh)
-  ADD_TESH(tesh-java-sleephostoff --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java/sleephostoff ${CMAKE_HOME_DIRECTORY}/teshsuite/java/sleephostoff/sleephostoff.tesh)
-endif()
similarity index 52%
rename from teshsuite/simdag/CMakeLists.txt
rename to teshsuite/platforms/CMakeLists.txt
index 020ab62..f239bbf 100644 (file)
@@ -1,56 +1,52 @@
-foreach(x flatifier)
-  add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp)
-  target_link_libraries(${x}  simgrid)
-  set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-  set_property(TARGET ${x} APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
-  add_dependencies(tests ${x})
+add_executable       (flatifier EXCLUDE_FROM_ALL flatifier.cpp)
+target_link_libraries(flatifier  simgrid)
+set_target_properties(flatifier  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+set_property(TARGET flatifier APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+add_dependencies(tests flatifier)
 
-  set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
-  set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
-endforeach()
-
-set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
-set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_two_hosts_asymetric.tesh
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_missing_gateway.tesh
+set(teshsuite_src ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.cpp PARENT_SCOPE)
+set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.tesh
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_gateway.tesh
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.tesh
+                                    PARENT_SCOPE)
+set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_floyd.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_multi_hop.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/host_attributes.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/link_attributes.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_multicore.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_splitduplex.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_router_id.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/properties.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/test_of_is_router.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/three_hosts_non_symmetric_route.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_one_name.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_router_id.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_src_gateway.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_dst_gateway.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link_splitduplex.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/cluster_dragonfly_noncontiguous_rad.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/cluster_fat_tree_noncontiguous_rad.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/cluster_torus_noncontiguous_rad.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/Dijkstra.xml
+                                    PARENT_SCOPE)
+set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/carol.fail
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/bob.trace
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/erin.avail
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/link.bw
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/link.fail
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/link.lat
                                     PARENT_SCOPE)
-set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_hosts_floyd.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_multi_hop.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/host_attributes.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link_attributes.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_multicore.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_splitduplex.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster_router_id.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/one_cluster.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/properties.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/test_of_is_router.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/three_hosts_non_symmetric_route.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_one_name.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters_router_id.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_clusters.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_src_gateway.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_missing_dst_gateway.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_two_hosts_asymetric.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link_splitduplex.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_dragonfly_noncontiguous_rad.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_fat_tree_noncontiguous_rad.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_torus_noncontiguous_rad.xml
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/Dijkstra.xml                     PARENT_SCOPE)
-set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.fail
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bob.trace
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/erin.avail
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.bw
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.fail
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.lat                         PARENT_SCOPE)
 
-foreach(x flatifier)
-  ADD_TESH(tesh-simdag-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/${x} ${x}.tesh)
-endforeach()
+ADD_TESH(tesh-platform-flatifier --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms flatifier.tesh)
 
 if(enable_debug)
   # these tests need assertions
-  ADD_TESH(tesh-parser-bogus-symmetric         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh)
-  ADD_TESH(tesh-parser-bogus-missing-gw        --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh)
+  ADD_TESH(tesh-parser-bogus-symmetric         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_two_hosts_asymetric.tesh)
+  ADD_TESH(tesh-parser-bogus-missing-gw        --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_missing_gateway.tesh)
 
    #These tests fail on Windows as the signal returned is not the same as Unix would send.
   if(WIN32)
diff --git a/teshsuite/platforms/bogus_missing_gateway.tesh b/teshsuite/platforms/bogus_missing_gateway.tesh
new file mode 100644 (file)
index 0000000..1672ca4
--- /dev/null
@@ -0,0 +1,11 @@
+! expect signal SIGABRT
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ./bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+> [  0.000000] [0:maestro@] Parse error at ./bogus_missing_src_gateway.xml:14: zoneRoute gw_src='nod-cluster_router.cluster.us' does name a node. Existing netpoints:
+> 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr'
+> [  0.000000] [0:maestro@] Exiting now.
+
+! expect signal SIGABRT
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ./bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+> [  0.000000] [0:maestro@] Parse error at ./bogus_missing_dst_gateway.xml:14: zoneRoute gw_dst='neud-grappe_router.grappe.fr' does name a node. Existing netpoints:
+> 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr'
+> [  0.000000] [0:maestro@] Exiting now.
diff --git a/teshsuite/platforms/bogus_two_hosts_asymetric.tesh b/teshsuite/platforms/bogus_two_hosts_asymetric.tesh
new file mode 100644 (file)
index 0000000..8c14c4c
--- /dev/null
@@ -0,0 +1,3 @@
+! expect signal SIGABRT
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ./bogus_two_hosts_asymetric.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=no_loc
+> [  0.000000] [0:maestro@] The route between alice and bob already exists (Rq: routes are symmetrical by default).
similarity index 91%
rename from teshsuite/simdag/flatifier/flatifier.cpp
rename to teshsuite/platforms/flatifier.cpp
index f8f854c..2ab089a 100644 (file)
@@ -40,12 +40,13 @@ static void create_environment(xbt_os_timer_t parse_time, const std::string& pla
 {
   xbt_os_cputimer_start(parse_time);
   sg4::Engine::get_instance()->load_platform(platformFile);
+  sg4::Engine::get_instance()->seal_platform();
   xbt_os_cputimer_stop(parse_time);
 }
 
 static void dump_hosts()
 {
-  std::vector<sg4::Host*> hosts  = sg4::Engine::get_instance()->get_all_hosts();
+  std::vector<sg4::Host*> hosts = sg4::Engine::get_instance()->get_all_hosts();
   std::sort(hosts.begin(), hosts.end(),
             [](const sg4::Host* a, const sg4::Host* b) { return a->get_name() < b->get_name(); });
 
@@ -75,14 +76,14 @@ static void dump_links()
 {
   std::vector<sg4::Link*> links = sg4::Engine::get_instance()->get_all_links();
 
-  std::sort(links.begin(), links.end(), [](const sg4::Link* a, const sg4::Link* b) {
-    return a->get_name() < b->get_name();
-  });
+  std::sort(links.begin(), links.end(),
+            [](const sg4::Link* a, const sg4::Link* b) { return a->get_name() < b->get_name(); });
 
   for (auto link : links) {
     std::printf("  <link id=\"");
 
-    std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", link->get_cname(), link->get_bandwidth(), link->get_latency());
+    std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", link->get_cname(), link->get_bandwidth(),
+                link->get_latency());
     if (link->is_shared()) {
       std::printf("/>\n");
     } else {
@@ -93,8 +94,7 @@ static void dump_links()
 
 static void dump_routers()
 {
-  std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
-      sg4::Engine::get_instance()->get_all_netpoints();
+  std::vector<simgrid::kernel::routing::NetPoint*> netpoints = sg4::Engine::get_instance()->get_all_netpoints();
   std::sort(netpoints.begin(), netpoints.end(),
             [](const simgrid::kernel::routing::NetPoint* a, const simgrid::kernel::routing::NetPoint* b) {
               return a->get_name() < b->get_name();
@@ -107,11 +107,10 @@ static void dump_routers()
 
 static void dump_routes()
 {
-  std::vector<sg4::Host*> hosts  = sg4::Engine::get_instance()->get_all_hosts();
+  std::vector<sg4::Host*> hosts = sg4::Engine::get_instance()->get_all_hosts();
   std::sort(hosts.begin(), hosts.end(),
             [](const sg4::Host* a, const sg4::Host* b) { return a->get_name() < b->get_name(); });
-  std::vector<simgrid::kernel::routing::NetPoint*> netpoints =
-      sg4::Engine::get_instance()->get_all_netpoints();
+  std::vector<simgrid::kernel::routing::NetPoint*> netpoints = sg4::Engine::get_instance()->get_all_netpoints();
   std::sort(netpoints.begin(), netpoints.end(),
             [](const simgrid::kernel::routing::NetPoint* a, const simgrid::kernel::routing::NetPoint* b) {
               return a->get_name() < b->get_name();
similarity index 98%
rename from teshsuite/simdag/flatifier/flatifier.tesh
rename to teshsuite/platforms/flatifier.tesh
index 76f52ff..7c8deab 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env tesh
-$ ${bindir:=.}/flatifier ../platforms/one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -130,7 +130,7 @@ $ ${bindir:=.}/flatifier ../platforms/one_cluster.xml "--log=root.fmt:[%10.6r]%e
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/one_cluster_multicore.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./one_cluster_multicore.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -260,7 +260,7 @@ $ ${bindir:=.}/flatifier ../platforms/one_cluster_multicore.xml "--log=root.fmt:
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/host_attributes.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./host_attributes.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -293,7 +293,7 @@ $ ${bindir:=.}/flatifier ../platforms/host_attributes.xml "--log=root.fmt:[%10.6
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/link_attributes.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./link_attributes.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -310,7 +310,7 @@ $ ${bindir:=.}/flatifier ../platforms/link_attributes.xml "--log=root.fmt:[%10.6
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -352,7 +352,7 @@ $ ${bindir:=.}/flatifier ../platforms/three_hosts_non_symmetric_route.xml "--log
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -480,7 +480,7 @@ $ ${bindir:=.}/flatifier ../platforms/two_clusters.xml "--log=root.fmt:[%10.6r]%
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -506,7 +506,7 @@ $ ${bindir:=.}/flatifier ../platforms/two_hosts_multi_hop.xml "--log=root.fmt:[%
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -1191,7 +1191,7 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/cluster_dragonfly_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./cluster_dragonfly_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -1280,7 +1280,7 @@ $ ${bindir:=.}/flatifier ../platforms/cluster_dragonfly_noncontiguous_rad.xml "-
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/cluster_fat_tree_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./cluster_fat_tree_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -1377,7 +1377,7 @@ $ ${bindir:=.}/flatifier ../platforms/cluster_fat_tree_noncontiguous_rad.xml "--
 > </AS>
 > </platform>
 
-$ ${bindir:=.}/flatifier ../platforms/cluster_torus_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/flatifier ./cluster_torus_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -1469,7 +1469,8 @@ $ ${bindir:=.}/flatifier ../platforms/cluster_torus_noncontiguous_rad.xml "--log
 >   </route>
 > </AS>
 > </platform>
-$ ${bindir:=.}/flatifier ../platforms/two_hosts_one_link_splitduplex.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+
+$ ${bindir:=.}/flatifier ./two_hosts_one_link_splitduplex.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 > <platform version="4">
@@ -1493,4 +1494,3 @@ $ ${bindir:=.}/flatifier ../platforms/two_hosts_one_link_splitduplex.xml "--log=
 >   </route>
 > </AS>
 > </platform>
-
index fd41008..6c75054 100644 (file)
@@ -74,8 +74,8 @@ ADD_TEST(test-help-logs    ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite
 ADD_TESH(tesh-parser-bypass   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/basic-parsing-test --setenv srcdir=${CMAKE_HOME_DIRECTORY} basic-parsing-test-bypass.tesh)
 ADD_TESH(tesh-parser-sym-full --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/basic-parsing-test basic-parsing-test-sym-full.tesh)
 
-ADD_TEST(tesh-parser-full-links01    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters.xml FULL_LINK)
-ADD_TEST(tesh-parser-full-links02    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters_one_name.xml FULL_LINK)
+ADD_TEST(tesh-parser-full-links01    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/two_clusters.xml FULL_LINK)
+ADD_TEST(tesh-parser-full-links02    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/two_clusters_one_name.xml FULL_LINK)
 ADD_TEST(tesh-parser-one-link-g5k    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK)
 
 set(teshsuite_src ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/activity-lifecycle.hpp PARENT_SCOPE)
index e733a78..ccc8602 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ ./basic-link-test ${srcdir:=.}/../../simdag/platforms/one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ./basic-link-test ${srcdir:=.}/../../platforms/one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Link count: 12
 > [  0.000000] (0:maestro@) __loopback__: latency = 0.00000, bandwidth = 10000000000.000000
 > [  0.000000] (0:maestro@) bob_cluster_backbone: latency = 0.00050, bandwidth = 2250000000.000000
@@ -15,7 +15,7 @@ $ ./basic-link-test ${srcdir:=.}/../../simdag/platforms/one_cluster.xml "--log=r
 > [  0.000000] (0:maestro@) bob_cluster_link_6_DOWN: latency = 0.00005, bandwidth = 125000000.000000
 > [  0.000000] (0:maestro@) bob_cluster_link_6_UP: latency = 0.00005, bandwidth = 125000000.000000
 
-$ ./basic-link-test ${srcdir:=.}/../../simdag/platforms/link_attributes.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ./basic-link-test ${srcdir:=.}/../../platforms/link_attributes.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Link count: 5
 > [  0.000000] (0:maestro@) __loopback__: latency = 0.00000, bandwidth = 10000000000.000000
 > [  0.000000] (0:maestro@) link1: latency = 0.00005, bandwidth = 125000000.000000
index c469b75..5d2b2f5 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env tesh
 ! output sort
 
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/one_cluster_splitduplex.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/one_cluster_splitduplex.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 5, link number: 12
 > Route between bob3.hamburger.edu and bob3.hamburger.edu
 >   Route size 3
@@ -155,7 +155,7 @@ $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/one_cluste
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_clusters.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_clusters.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 4, link number: 12
 > Route between bob1.hamburger.edu and bob1.hamburger.edu
 >   Route size 3
@@ -271,7 +271,7 @@ $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_cluste
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_hosts_one_link.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 2, link number: 2
 > Route between alice and alice
 >   Route size 1
@@ -291,7 +291,7 @@ $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link_splitduplex.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_hosts_one_link_splitduplex.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 2, link number: 3
 > Route between alice and alice
 >   Route size 1
@@ -311,7 +311,7 @@ $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/Dijkstra.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/Dijkstra.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 2, link number: 6
 > Route between NODO01 and NODO01
 >   Route size 1
@@ -333,7 +333,7 @@ $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/Dijkstra.x
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/four_hosts_floyd.xml FULL_LINK  --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/four_hosts_floyd.xml FULL_LINK  --log=root.fmt=%m%n
 > Workstation number: 4, link number: 5
 > Route between host1 and host1
 >   Route size 1
index 442faf3..cba0d49 100644 (file)
@@ -63,6 +63,7 @@ int main(int argc, char** argv)
 
   /* creation of the environment */
   e.load_platform(argv[1]);
+  e.seal_platform();
   XBT_INFO("Workstation number: %zu, link number: %zu", e.get_host_count(), e.get_link_count());
 
   std::vector<sg4::Host*> hosts = e.get_all_hosts();
index 19981aa..ddcabb8 100644 (file)
@@ -1,47 +1,47 @@
 ! output sort
 
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/one_cluster.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/one_cluster.xml --log=root.fmt=%m%n
 > Workstation number: 5, link number: 12
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/host_attributes.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/host_attributes.xml --log=root.fmt=%m%n
 > Workstation number: 5, link number: 1
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/link_attributes.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/link_attributes.xml --log=root.fmt=%m%n
 > Workstation number: 1, link number: 5
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/three_hosts_non_symmetric_route.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/three_hosts_non_symmetric_route.xml --log=root.fmt=%m%n
 > Workstation number: 3, link number: 4
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_clusters.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_clusters.xml --log=root.fmt=%m%n
 > Workstation number: 4, link number: 12
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_multi_hop.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_hosts_multi_hop.xml --log=root.fmt=%m%n
 > Workstation number: 2, link number: 4
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/two_hosts_one_link.xml --log=root.fmt=%m%n
 > Workstation number: 2, link number: 2
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/four_hosts_floyd.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/four_hosts_floyd.xml --log=root.fmt=%m%n
 > Workstation number: 4, link number: 5
 
 ! output sort
 $ ${bindir:=.}/basic-parsing-test ${platfdir:=.}/cloud.xml --log=root.fmt=%m%n
 > Workstation number: 510, link number: 1056
 
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/properties.xml --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/properties.xml --log=root.fmt=%m%n
 > Configuration change: Set 'cpu/optim' to 'TI'
 > Configuration change: Set 'host/model' to 'compound'
 > Configuration change: Set 'maxmin/precision' to '0.000010'
 > Workstation number: 1, link number: 1
 
-$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/properties.xml --cfg=cpu/optim:TI --log=root.fmt=%m%n
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/properties.xml --cfg=cpu/optim:TI --log=root.fmt=%m%n
 > Configuration change: Set 'cpu/optim' to 'TI'
 > The custom configuration 'cpu/optim' is already defined by user!
 > Configuration change: Set 'host/model' to 'compound'
index e846943..f0f2ba6 100644 (file)
@@ -13,7 +13,7 @@ int main(int argc, char** argv)
   xbt_assert(argc > 1, "Usage: %s platform_file\n\nExample: %s two_clusters.xml", argv[0], argv[0]);
   e.load_platform(argv[1]);
 
-  simgrid::s4u::Activity::on_completion.connect([](simgrid::s4u::Activity& activity) {
+  simgrid::s4u::Activity::on_completion_cb([](simgrid::s4u::Activity& activity) {
     const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
     if (exec == nullptr) // Only Execs are concerned here
       return;
index 7192988..79c469c 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ ${bindir:=.}/is-router ${srcdir:=.}/../../simdag/platforms/test_of_is_router.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+$ ${bindir:=.}/is-router ${srcdir:=.}/../../platforms/test_of_is_router.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
 > Host count: 10, link number: 1
 >    - Seen: "host01". Type: host
 >    - Seen: "host02". Type: host
diff --git a/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh b/teshsuite/simdag/flatifier/bogus_missing_gateway.tesh
deleted file mode 100644 (file)
index 4c1d800..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-! expect signal SIGABRT
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
-> [  0.000000] [0:maestro@] Parse error at ../platforms/bogus_missing_src_gateway.xml:14: zoneRoute gw_src='nod-cluster_router.cluster.us' does name a node. Existing netpoints:
-> 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr'
-> [  0.000000] [0:maestro@] Exiting now.
-
-! expect signal SIGABRT
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
-> [  0.000000] [0:maestro@] Parse error at ../platforms/bogus_missing_dst_gateway.xml:14: zoneRoute gw_dst='neud-grappe_router.grappe.fr' does name a node. Existing netpoints:
-> 'node-1.cluster.us','node-2.cluster.us','node-3.cluster.us','node-4.cluster.us','node-cluster_router.cluster.us','noeud-1.grappe.fr','noeud-2.grappe.fr','noeud-3.grappe.fr','noeud-4.grappe.fr','noeud-grappe_router.grappe.fr'
-> [  0.000000] [0:maestro@] Exiting now.
diff --git a/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh b/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh
deleted file mode 100644 (file)
index a34a29c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-! expect signal SIGABRT
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/flatifier ../platforms/bogus_two_hosts_asymetric.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=no_loc
-> [  0.000000] [0:maestro@] The route between alice and bob already exists (Rq: routes are symmetrical by default).
index 5adc48b..26965c6 100644 (file)
@@ -15,10 +15,9 @@ set(EXTRA_DIST
   src/mc/mc_mmu.hpp
   src/mc/mc_record.hpp
   src/msg/msg_private.hpp
-  src/simdag/dax.dtd
-  src/simdag/dax_dtd.c
-  src/simdag/dax_dtd.h
-  src/simdag/simdag_private.hpp
+  src/dag/dax.dtd
+  src/dag/dax_dtd.c
+  src/dag/dax_dtd.h
   src/simix/simcalls.in
   src/simix/simcalls.py
   src/simix/popping_private.hpp
@@ -470,11 +469,8 @@ set(MSG_SRC
   src/msg/msg_task.cpp
   )
 
-set(SIMDAG_SRC
-  src/simdag/sd_daxloader.cpp
-  src/simdag/sd_dotloader.cpp
-  src/simdag/sd_global.cpp
-  src/simdag/sd_task.cpp
+set(DAG_SRC
+  src/dag/loaders.cpp
   )
 
 set(BINDINGS_SRC
@@ -563,17 +559,6 @@ set(TRACING_SRC
   src/instr/instr_resource_utilization.cpp
   )
 
-set(JEDULE_SRC
-  include/simgrid/jedule/jedule_events.hpp
-  include/simgrid/jedule/jedule.hpp
-  include/simgrid/jedule/jedule_platform.hpp
-  include/simgrid/jedule/jedule_sd_binding.h
-  src/instr/jedule/jedule_events.cpp
-  src/instr/jedule/jedule.cpp
-  src/instr/jedule/jedule_platform.cpp
-  src/instr/jedule/jedule_sd_binding.cpp
-  )
-
 set(MC_SRC_BASE
   src/mc/mc_base.cpp
   src/mc/mc_base.hpp
@@ -682,7 +667,6 @@ set(headers_to_install
   include/simgrid/plugins/ProducerConsumer.hpp
   include/simgrid/instr.h
   include/simgrid/mailbox.h
-  include/simgrid/simdag.h
   include/simgrid/modelchecker.h
   include/simgrid/forward.h
   include/simgrid/simix.h
@@ -807,7 +791,7 @@ set(simgrid_sources
   ${XBT_SRC}
   ${PLUGINS_SRC}
   ${BINDINGS_SRC}
-  ${SIMDAG_SRC}
+  ${DAG_SRC}
   )
 
 if(${enable_msg})
@@ -818,12 +802,6 @@ else()
                                                 ${MSG_SRC})
 endif()
 
-if(${SIMGRID_HAVE_JEDULE})
-  set(simgrid_sources  ${simgrid_sources}  ${JEDULE_SRC})
-else()
-  set(EXTRA_DIST       ${EXTRA_DIST}       ${JEDULE_SRC})
-endif()
-
 if(enable_smpi)
   set(simgrid_sources  ${simgrid_sources}  ${SMPI_SRC})
 endif()
@@ -859,7 +837,6 @@ set(DOC_SOURCES
   doc/doxygen/platform.doc
   doc/doxygen/uhood.doc
   doc/doxygen/uhood_switch.doc
-  doc/doxygen/uhood_arch.doc
 
   examples/README.rst
 
@@ -918,6 +895,7 @@ set(DOC_SOURCES
   docs/source/app_s4u.rst
   docs/source/app_smpi.rst
   docs/source/The_XBT_toolbox.rst
+  docs/source/Calibrating_the_models.rst
   docs/source/community.rst
   docs/source/Configuring_SimGrid.rst
   docs/source/Deploying_your_application.rst
@@ -928,11 +906,11 @@ set(DOC_SOURCES
   docs/source/Installing_SimGrid.rst
   docs/source/Start_your_own_project.rst
   docs/source/Models.rst
+  docs/source/Modeling_howtos.rst
   docs/source/Outcomes.rst
   docs/source/Platform.rst
   docs/source/Platform_cpp.rst
   docs/source/Platform_examples.rst
-  docs/source/Platform_howtos.rst
   docs/source/Platform_routing.rst
   docs/source/Plugins.rst
   docs/source/Release_Notes.rst
@@ -1056,8 +1034,6 @@ set(CMAKEFILES_TXT
   examples/smpi/replay_multiple_manual_deploy/CMakeLists.txt
   examples/python/CMakeLists.txt
   examples/deprecated/java/CMakeLists.txt
-  examples/deprecated/msg/mc/CMakeLists.txt
-  examples/deprecated/simdag/CMakeLists.txt
 
   teshsuite/java/CMakeLists.txt
   teshsuite/kernel/CMakeLists.txt
@@ -1065,9 +1041,9 @@ set(CMAKEFILES_TXT
   teshsuite/mc/CMakeLists.txt
   teshsuite/models/CMakeLists.txt
   teshsuite/msg/CMakeLists.txt
+  teshsuite/platforms/CMakeLists.txt
   teshsuite/python/CMakeLists.txt
   teshsuite/s4u/CMakeLists.txt
-  teshsuite/simdag/CMakeLists.txt
   teshsuite/smpi/CMakeLists.txt
   teshsuite/surf/CMakeLists.txt
   teshsuite/xbt/CMakeLists.txt
@@ -1164,10 +1140,12 @@ set(PLATFORMS_EXAMPLES
   examples/platforms/bypassRoute.xml
   examples/platforms/cloud.xml
   examples/platforms/cluster_backbone.xml
+  examples/platforms/cluster_backbone.svg
   examples/platforms/cluster_multi.xml
   examples/platforms/cluster_and_one_host.xml
   examples/platforms/cluster_prototype.lua
   examples/platforms/cluster_crossbar.xml
+  examples/platforms/cluster_crossbar.svg
   examples/platforms/cluster_fat_tree.xml
   examples/platforms/cluster_fat_tree.svg
   examples/platforms/cluster_torus.xml
index 3c39e46..4276ff9 100644 (file)
@@ -107,7 +107,6 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall bin ok"
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/instr
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/msg
-  COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/simdag
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/smpi
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/simix
   COMMAND ${CMAKE_COMMAND} -E  remove_directory ${CMAKE_INSTALL_PREFIX}/include/surf
@@ -148,7 +147,6 @@ set(source_to_pack
   ${headers_to_install}
   ${source_of_generated_headers}
   ${BINDINGS_SRC}
-  ${JEDULE_SRC}
   ${JMSG_C_SRC}
   ${JMSG_JAVA_SRC}
   ${LUA_SRC}
@@ -159,7 +157,7 @@ set(source_to_pack
   ${S4U_SRC}
   ${NS3_SRC}
   ${PLUGINS_SRC}
-  ${SIMDAG_SRC}
+  ${DAG_SRC}
   ${SIMGRID_SRC}
   ${SIMIX_SRC}
   ${SMPI_SRC}
index 536b658..72813dc 100644 (file)
@@ -160,7 +160,7 @@ endif(APPLE)
 
   add_custom_command(
     TARGET simgrid-java_jar POST_BUILD
-    COMMENT "Packing back the simgrid.jar with the native libs..."
+    COMMENT "Packing back the simgrid.jar with the native libs (turn lib_in_jar off when coding in java)..."
     DEPENDS simgrid simgrid-java ${JAVALIBS}
 
     COMMAND ${JAVA_ARCHIVE} -uvf ${SIMGRID_JAR}  ${JAVA_NATIVE_PATH}
@@ -168,7 +168,6 @@ endif(APPLE)
     COMMAND ${CMAKE_COMMAND} -E echo "-- Cmake put the native code in ${JAVA_NATIVE_PATH}"
     COMMAND "${Java_JAVA_EXECUTABLE}" -classpath "${SIMGRID_JAR}" org.simgrid.NativeLib
   )
-
 endif(enable_lib_in_jar)
 
 include_directories(${JNI_INCLUDE_DIRS} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
index 5487904..f27cb7f 100644 (file)
@@ -170,12 +170,12 @@ if(enable_maintainer_mode AND NOT WIN32)
 
     ADD_CUSTOM_COMMAND(
       OUTPUT   ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
-                ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
+                ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
                 ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
-                ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
+                ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
 
       DEPENDS  ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
-                ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
+                ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
 
       #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
       COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml
@@ -184,11 +184,11 @@ if(enable_maintainer_mode AND NOT WIN32)
       COMMAND mv src/surf/xml/simgrid_dtd.l.tmp src/surf/xml/simgrid_dtd.l
       COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/surf/xml/simgrid_dtd.l"
 
-      #${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
-      COMMAND ${FLEXML_EXE} -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S src/simdag/dax_dtd.l -L src/simdag/dax.dtd
-      COMMAND ${SED_EXE} -i ${string5} src/simdag/dax_dtd.l
-      COMMAND ${SED_EXE} -i ${string14} src/simdag/dax_dtd.l
-      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/simdag/dax_dtd.l"
+      #${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
+      COMMAND ${FLEXML_EXE} -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S src/dag/dax_dtd.l -L src/dag/dax.dtd
+      COMMAND ${SED_EXE} -i ${string5} src/dag/dax_dtd.l
+      COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.l
+      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/dag/dax_dtd.l"
 
       #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
       COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid.h
@@ -200,13 +200,13 @@ if(enable_maintainer_mode AND NOT WIN32)
       COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h
       COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/surf/xml/simgrid_dtd.h"
 
-      #${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
-      COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
-      COMMAND ${FLEXML_EXE} --root-tags adag -P dax_ --sysid=dax.dtd -H src/simdag/dax_dtd.h -L src/simdag/dax.dtd
-      COMMAND ${SED_EXE} -i ${string1} src/simdag/dax_dtd.h
-      COMMAND ${SED_EXE} -i ${string2} src/simdag/dax_dtd.h
-      COMMAND ${SED_EXE} -i ${string14} src/simdag/dax_dtd.h
-      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/simdag/dax_dtd.h"
+      #${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
+      COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
+      COMMAND ${FLEXML_EXE} --root-tags adag -P dax_ --sysid=dax.dtd -H src/dag/dax_dtd.h -L src/dag/dax.dtd
+      COMMAND ${SED_EXE} -i ${string1} src/dag/dax_dtd.h
+      COMMAND ${SED_EXE} -i ${string2} src/dag/dax_dtd.h
+      COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.h
+      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/dag/dax_dtd.h"
 
       #surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l
       COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
@@ -214,12 +214,12 @@ if(enable_maintainer_mode AND NOT WIN32)
       COMMAND ${SED_EXE} -i ${string9} src/surf/xml/simgrid_dtd.c
       COMMAND ${CMAKE_COMMAND} -E echo "       Generated surf/xml/simgrid_dtd.c"
 
-      #simdag/dax_dtd.c: simdag/dax_dtd.l
-      COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
-      COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/simdag
-      COMMAND ${FLEX_EXE} -o src/simdag/dax_dtd.c -Pdax_ --noline src/simdag/dax_dtd.l
-      COMMAND ${SED_EXE} -i ${string9}                        src/simdag/dax_dtd.c
-      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/simdag/dax_dtd.c"
+      #dag/dax_dtd.c: dag/dax_dtd.l
+      COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/dag
+      COMMAND ${FLEX_EXE} -o src/dag/dax_dtd.c -Pdax_ --noline src/dag/dax_dtd.l
+      COMMAND ${SED_EXE} -i ${string9}                         src/dag/dax_dtd.c
+      COMMAND ${CMAKE_COMMAND} -E echo "       Generated src/dag/dax_dtd.c"
 
       WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
       COMMENT "Generating files in maintainer mode..."
@@ -244,6 +244,6 @@ endif()
     add_custom_target(maintainer_files
       DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
               ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
-              ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
-              ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
+              ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
+              ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
       )
index 84bb93e..fe18f65 100644 (file)
@@ -41,8 +41,6 @@ if(enable-model-checking)
   SET(enable_model-checking ON CACHE BOOL "Whether to compile the model-checker" FORCE)
 endif()
 
-option(enable_jedule         "Jedule output of SimDAG." off)
-
 if(WIN32)
   option(enable_smpi "Whether SMPI is included in the library." off)
 else()
index c6bd9da..7c9f633 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env tesh
 
-$ ${bindir:=.}/graphicator ${srcdir:=.}/teshsuite/simdag/platforms/one_cluster.xml test.dot
+$ ${bindir:=.}/graphicator ${srcdir:=.}/teshsuite/platforms/one_cluster.xml test.dot
 
 $ cat test.dot
 > graph test {
index 219270f..abbf35a 100644 (file)
@@ -40,7 +40,6 @@ ingroup
 int
 java
 Java
-JEDULE
 JNI
 kcachegrind
 KILLME
index 4a5d0f4..4e97334 100755 (executable)
@@ -68,7 +68,7 @@ ctest -D ExperimentalStart || true
 
 cmake -Denable_documentation=OFF -Denable_lua=ON \
       -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
-      -Denable_jedule=ON -Denable_mallocators=ON \
+      -Denable_mallocators=ON \
       -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=ON \
       -Denable_smpi_papi=ON \
       -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=ON \
index 05e6a49..abe1c1b 100755 (executable)
@@ -63,7 +63,7 @@ ctest -D ExperimentalStart || true
 
 cmake -Denable_documentation=OFF -Denable_lua=OFF -Denable_python=OFF \
       -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
-      -Denable_jedule=OFF -Denable_mallocators=OFF \
+      -Denable_mallocators=OFF \
       -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_model-checking=OFF \
       -Denable_memcheck_xml=ON -DLTO_EXTRA_FLAG="auto" "$WORKSPACE"
 
index cbc23d4..aae4c30 100755 (executable)
@@ -88,7 +88,7 @@ fi
 echo "Step ${STEP}/${NSTEPS} - Building with java=${buildjava}, debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}, MSG=${buildmsg}"
 cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=${buildjava} -Denable_msg=${buildmsg} \
       -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
-      -Denable_jedule=ON -Denable_mallocators=ON -Denable_debug=${builddebug} \
+      -Denable_mallocators=ON -Denable_debug=${builddebug} \
       -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \
       -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=OFF \
       -Denable_ns3=$(onoff test "$buildmc" != "ON") -Denable_coverage=OFF -DLTO_EXTRA_FLAG="auto" "$WORKSPACE"
index 5425f60..8c2569b 100755 (executable)
@@ -76,7 +76,7 @@ ctest -D ExperimentalStart || true
 
 cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=OFF \
       -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
-      -Denable_jedule=ON -Denable_mallocators=OFF \
+      -Denable_mallocators=OFF \
       -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=OFF \
       -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=ON -Denable_coverage=OFF\
       -Denable_fortran=OFF -Denable_python=OFF -DLTO_EXTRA_FLAG="auto" ${SANITIZER_OPTIONS} "$WORKSPACE"
index 7cffc16..28ee7c0 100755 (executable)
@@ -208,7 +208,7 @@ cmake -G"$GENERATOR" ${INSTALL:+-DCMAKE_INSTALL_PREFIX=$INSTALL} \
   -Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \
   -Denable_compile_warnings=$(onoff test "$GENERATOR" != "MSYS Makefiles") -Denable_smpi=ON \
   -Denable_ns3=$(onoff test "$have_NS3" = "yes" -a "$build_mode" = "Debug") \
-  -Denable_jedule=OFF -Denable_lua=OFF ${MAY_DISABLE_SOURCE_CHANGE} ${MAY_DISABLE_LTO} \
+  -Denable_lua=OFF ${MAY_DISABLE_SOURCE_CHANGE} ${MAY_DISABLE_LTO} \
   -Denable_java=$(onoff test "$build_mode" = "ModelChecker") \
   -Denable_msg=$(onoff test "$build_mode" = "ModelChecker") \
   -DLTO_EXTRA_FLAG="auto" \