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/expected_output.jed
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 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
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
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
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
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).
${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}/dag-scheduling/expected_output.jed
${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
#!/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'
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] [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] [daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304
+> [0.000000] [daxparse/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
! expect return 2
$ ${bindir:=.}/s4u-dag-from-dax --log=no_loc ${platfdir}/cluster_backbone.xml ${srcdir:=.}/simple_dax_with_cycle.xml
-> [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
+> [0.000000] [daxparse/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
! 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] [dotparse/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?
+++ /dev/null
-<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>
#include <simgrid/s4u.hpp>
#include <string.h>
-#if SIMGRID_HAVE_JEDULE
-#include "simgrid/jedule/jedule_sd_binding.h"
-#endif
-
XBT_LOG_NEW_DEFAULT_CATEGORY(dag_scheduling, "Logging specific to this example");
typedef struct _HostAttribute* HostAttribute;
double min_finish_time = -1.0;
simgrid::s4u::Exec* selected_task = nullptr;
simgrid::s4u::Host* selected_host = nullptr;
- char* tracefilename = nullptr;
simgrid::s4u::Engine e(&argc, argv);
std::set<simgrid::s4u::Activity*> vetoed;
}
}
});
- /* 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]);
e.load_platform(argv[1]);
}
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);
for (auto h : hosts) {
xbt_free(h->get_data());
#!/usr/bin/env tesh
-$ ${bindir:=.}/s4u-dag-scheduling --log=sd_daxparse.thresh:critical --log=no_loc ${platfdir}/simulacrum_7_hosts.xml ${srcdir:=.}/Montage_25.xml
+$ ${bindir:=.}/s4u-dag-scheduling --log=daxparse.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
> [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
-> [98.135796] [dag_scheduling/INFO] ------------------- Produce the trace file---------------------------
-> [98.135796] [dag_scheduling/INFO] Producing a jedule output (if active) of the run into minmin_test.jed
-
-! output ignore
-$ cmake -E remove -f ${srcdir:=.}/sd_scheduling.jed
+++ /dev/null
-/* 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_ */
+++ /dev/null
-/* 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_ */
+++ /dev/null
-/* 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_ */
+++ /dev/null
-/* 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_ */
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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
#include "dax_dtd.h"
#include "dax_dtd.c"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_daxparse, sd, "Parsing DAX files");
+XBT_LOG_NEW_DEFAULT_CATEGORY(daxparse, "Parsing DAX 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)
#if HAVE_GRAPHVIZ
#include <graphviz/cgraph.h>
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_dotparse, sd, "Parsing DOT files");
+XBT_LOG_NEW_DEFAULT_CATEGORY(dotparse, "Parsing DOT files");
namespace simgrid {
namespace s4u {
+++ /dev/null
-/* 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);
-}
+++ /dev/null
-/* 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);
-}
#include <simgrid/s4u/Engine.hpp>
#include <simgrid/s4u/Host.hpp>
-#include <simgrid/simdag.h>
#include <xbt/Extendable.hpp>
#include <set>
#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 const char *__get_state_name(e_SD_task_state_t state);
#endif
set(SIMDAG_SRC
src/simdag/sd_daxloader.cpp
src/simdag/sd_dotloader.cpp
- src/simdag/sd_global.cpp
- src/simdag/sd_task.cpp
)
set(BINDINGS_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
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
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()
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 \
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"
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"
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"
-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" \