From: mlaurent Date: Mon, 20 Feb 2023 09:41:27 +0000 (+0100) Subject: Merge branch 'master' of https://framagit.org/simgrid/simgrid X-Git-Tag: v3.34~436^2~5 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8c6bbb14f44b8daed5ea43d80880c6bf2155118b?hp=3fafdab4bb94b48cb16c80690408a18f472e202b Merge branch 'master' of https://framagit.org/simgrid/simgrid --- diff --git a/.gitignore b/.gitignore index 6f53812238..c4b7ab787b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,7 @@ CTestResults.xml ### Maintainer mode src/dag/dax_dtd.l -src/surf/xml/simgrid_dtd.l +src/kernel/xml/simgrid_dtd.l ### Libraries links [Ss]im[Gg]rid-*.tar.gz ### Generated files @@ -841,10 +841,10 @@ teshsuite/smpi/type-hvector/type-hvector teshsuite/smpi/type-indexed/type-indexed teshsuite/smpi/type-struct/type-struct teshsuite/smpi/type-vector/type-vector -teshsuite/surf/lmm_usage/lmm_usage -teshsuite/surf/maxmin_bench/maxmin_bench -teshsuite/surf/surf_usage/surf_usage -teshsuite/surf/surf_usage2/surf_usage2 +teshsuite/models/lmm_usage/lmm_usage +teshsuite/models/maxmin_bench/maxmin_bench +teshsuite/models/core_usage/core_usage +teshsuite/models/core_usage2/core_usage2 teshsuite/xbt/cmdline/cmdline teshsuite/xbt/log_large/log_large teshsuite/xbt/log_usage/log_usage diff --git a/CMakeLists.txt b/CMakeLists.txt index 01a299eecc..96b38db6c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,6 @@ include_directories( set(INTERNAL_INCLUDES ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY} - ${CMAKE_HOME_DIRECTORY}/src/include ) if(enable_smpi) diff --git a/COPYING b/COPYING index 51835866d8..f4b1b6d7ef 100644 --- a/COPYING +++ b/COPYING @@ -11,7 +11,7 @@ Copyright: 1999, Mark Martinec - + diff --git a/docs/source/img/plugin-energy.svg b/docs/source/img/plugin-energy.svg new file mode 100644 index 0000000000..9f18e1f5b7 --- /dev/null +++ b/docs/source/img/plugin-energy.svg @@ -0,0 +1,493 @@ + + + + + + + + + + 100 + 120 + 140 + 160 + 180 + 200 + 10 + 0 + 0 + 1 + 2 + 3 + 4 + #cores + Consumption (W) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wattage_off + + wattage_idle + + + + + + diff --git a/docs/source/tuto_network_calibration/network_calibration_tutorial.ipynb b/docs/source/tuto_network_calibration/network_calibration_tutorial.ipynb index bac5f7507d..8f7ebf2414 100644 --- a/docs/source/tuto_network_calibration/network_calibration_tutorial.ipynb +++ b/docs/source/tuto_network_calibration/network_calibration_tutorial.ipynb @@ -10154,7 +10154,7 @@ "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/privatization' to '1'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/np' to '2'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/hostfile' to '/tmp/host.txt'\n", - "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'\n", + "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'precision/timing' to '1e-9'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to '0'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/display-timing' to 'yes'\n", @@ -10246,7 +10246,7 @@ "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/privatization' to '1'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/np' to '2'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/hostfile' to '/tmp/host.txt'\n", - "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'\n", + "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'precision/timing' to '1e-9'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to '0'\n", "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/display-timing' to 'yes'\n", diff --git a/docs/source/tuto_network_calibration/network_calibration_tutorial.rst b/docs/source/tuto_network_calibration/network_calibration_tutorial.rst index 70f5748ff2..99a205494c 100644 --- a/docs/source/tuto_network_calibration/network_calibration_tutorial.rst +++ b/docs/source/tuto_network_calibration/network_calibration_tutorial.rst @@ -646,7 +646,7 @@ The execution is similar for both modes. The only change is the platform library [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/privatization' to '1' [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/np' to '2' [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/hostfile' to '/tmp/host.txt' - [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9' + [0.000000] [xbt_cfg/INFO] Configuration change: Set 'precision/work-amount' to '1e-9' [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI' [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to '0' [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/display-timing' to 'yes' diff --git a/examples/c/comm-pingpong/comm-pingpong.tesh b/examples/c/comm-pingpong/comm-pingpong.tesh index 355747881a..2adb74f997 100644 --- a/examples/c/comm-pingpong/comm-pingpong.tesh +++ b/examples/c/comm-pingpong/comm-pingpong.tesh @@ -39,7 +39,7 @@ $ ${bindir:=.}/c-comm-pingpong ${platfdir}/small_platform.xml comm-pingpong_d.xm > [145.639041] (1:pinger@Tremblay) Pong time (bandwidth bound): 145.638 > [145.639041] (0:maestro@) Total simulation time: 145.639 -p Testing the surf network constant model +p Testing the network constant model $ ${bindir:=.}/c-comm-pingpong ${platfdir}/small_platform_routing_none.xml comm-pingpong_d.xml "--cfg=cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" > [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01' diff --git a/examples/c/io-file-remote/io-file-remote.tesh b/examples/c/io-file-remote/io-file-remote.tesh index c6dbc0274a..6246761a3e 100644 --- a/examples/c/io-file-remote/io-file-remote.tesh +++ b/examples/c/io-file-remote/io-file-remote.tesh @@ -5,15 +5,15 @@ $ ${bindir:=.}/c-io-file-remote ${platfdir}/hosts_with_disks.xml io-file-remote_ > [ 0.000000] (0@ ) Init: bob: 35/511964 MiB used/free on 'Disk1@bob' > [ 0.000000] (0@ ) Init: bob: 0/512000 MiB used/free on 'Disk2@bob' > [ 0.000000] (0@ ) Init: carl: 35/511964 MiB used/free on 'Disk1@bob' -> [ 0.000000] (1@alice) Opened file '/include/surf/simgrid_dtd.h' +> [ 0.000000] (1@alice) Opened file '/include/simgrid_dtd.h' > [ 0.000000] (1@alice) File Descriptor information: -> Full path: '/include/surf/simgrid_dtd.h' +> Full path: '/include/simgrid_dtd.h' > Size: 23583 > Mount point: '/' > Disk Id: 'Disk1' > Host Id: 'alice' > File Descriptor Id: 0 -> [ 0.000000] (1@alice) Try to write 23 MiB to '/include/surf/simgrid_dtd.h' +> [ 0.000000] (1@alice) Try to write 23 MiB to '/include/simgrid_dtd.h' > [ 0.000000] (2@ bob) Opened file '/scratch/doc/simgrid/examples/platforms/g5k.xml' > [ 0.000000] (2@ bob) File Descriptor information: > Full path: '/scratch/doc/simgrid/examples/platforms/g5k.xml' @@ -23,20 +23,20 @@ $ ${bindir:=.}/c-io-file-remote ${platfdir}/hosts_with_disks.xml io-file-remote_ > Host Id: 'bob' > File Descriptor Id: 0 > [ 0.000000] (2@ bob) Try to write 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml' -> [ 0.000000] (3@ carl) Opened file '/scratch/include/surf/simgrid_dtd.h' +> [ 0.000000] (3@ carl) Opened file '/scratch/include/simgrid_dtd.h' > [ 0.000000] (3@ carl) File Descriptor information: -> Full path: '/scratch/include/surf/simgrid_dtd.h' +> Full path: '/scratch/include/simgrid_dtd.h' > Size: 23583 > Mount point: '/scratch' > Disk Id: 'Disk1' > Host Id: 'bob' > File Descriptor Id: 0 -> [ 0.000000] (3@ carl) Try to write 23 MiB to '/scratch/include/surf/simgrid_dtd.h' -> [ 0.301862] (1@alice) Have written 23 MiB to '/include/surf/simgrid_dtd.h'. -> [ 0.301862] (1@alice) Move '/include/surf/simgrid_dtd.h' (of size 24148992) from 'alice' to 'bob' +> [ 0.000000] (3@ carl) Try to write 23 MiB to '/scratch/include/simgrid_dtd.h' +> [ 0.301862] (1@alice) Have written 23 MiB to '/include/simgrid_dtd.h'. +> [ 0.301862] (1@alice) Move '/include/simgrid_dtd.h' (of size 24148992) from 'alice' to 'bob' > [ 0.660757] (2@ bob) Have written 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml'. > [ 0.660757] (2@ bob) Copy '/scratch/doc/simgrid/examples/platforms/g5k.xml' (of size 17436672) from 'bob' to 'alice' -> [ 1.234522] (3@ carl) Have written 23 MiB to '/scratch/include/surf/simgrid_dtd.h'. +> [ 1.234522] (3@ carl) Have written 23 MiB to '/scratch/include/simgrid_dtd.h'. > [ 1.643366] (0@ ) End: 29/511970 MiB used/free on 'Disk1@alice' > [ 1.643366] (0@ ) End: 97/511902 MiB used/free on 'Disk1@bob' > [ 1.643366] (0@ ) End: 0/512000 MiB used/free on 'Disk2@bob' diff --git a/examples/c/io-file-remote/io-file-remote_d.xml b/examples/c/io-file-remote/io-file-remote_d.xml index d14901b8fb..205ca815b2 100644 --- a/examples/c/io-file-remote/io-file-remote_d.xml +++ b/examples/c/io-file-remote/io-file-remote_d.xml @@ -2,9 +2,9 @@ - + - + @@ -14,6 +14,6 @@ - + diff --git a/examples/c/io-file-system/io-file-system.tesh b/examples/c/io-file-system/io-file-system.tesh index 3953211c6e..2010eceeb4 100644 --- a/examples/c/io-file-system/io-file-system.tesh +++ b/examples/c/io-file-system/io-file-system.tesh @@ -2,20 +2,20 @@ $ ${bindir:=.}/c-io-file-system ${platfdir}/hosts_with_disks.xml > [bob:host:(1) 0.000000] [io_file_system/INFO] Storage info on bob: -> [bob:host:(1) 0.000000] [io_file_system/INFO] Disk1 (/scratch) Used: 36933331; Free: 536833978669; Total: 536870912000. +> [bob:host:(1) 0.000000] [io_file_system/INFO] Disk1 (/scratch) Used: 36924298; Free: 536833987702; Total: 536870912000. > [bob:host:(1) 0.000000] [io_file_system/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.005000] [io_file_system/INFO] Create a 200000 bytes file named '/scratch/tmp/data.txt' on /scratch > [bob:host:(1) 0.005000] [io_file_system/INFO] Storage info on bob: -> [bob:host:(1) 0.005000] [io_file_system/INFO] Disk1 (/scratch) Used: 37133331; Free: 536833778669; Total: 536870912000. +> [bob:host:(1) 0.005000] [io_file_system/INFO] Disk1 (/scratch) Used: 37124298; Free: 536833787702; Total: 536870912000. > [bob:host:(1) 0.005000] [io_file_system/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.007000] [io_file_system/INFO] Read 200000 bytes on /scratch/tmp/data.txt > [bob:host:(1) 0.009500] [io_file_system/INFO] Write 100000 bytes on /scratch/tmp/data.txt > [bob:host:(1) 0.009500] [io_file_system/INFO] Move '/scratch/tmp/data.txt' to '/scratch/tmp/simgrid.readme' > [bob:host:(1) 0.009500] [io_file_system/INFO] User data attached to the file: 777 > [bob:host:(1) 0.009500] [io_file_system/INFO] Storage info on bob: -> [bob:host:(1) 0.009500] [io_file_system/INFO] Disk1 (/scratch) Used: 37233331; Free: 536833678669; Total: 536870912000. +> [bob:host:(1) 0.009500] [io_file_system/INFO] Disk1 (/scratch) Used: 37224298; Free: 536833687702; Total: 536870912000. > [bob:host:(1) 0.009500] [io_file_system/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.009500] [io_file_system/INFO] Unlink file: '/scratch/tmp/simgrid.readme' > [bob:host:(1) 0.009500] [io_file_system/INFO] Storage info on bob: -> [bob:host:(1) 0.009500] [io_file_system/INFO] Disk1 (/scratch) Used: 36933331; Free: 536833978669; Total: 536870912000. +> [bob:host:(1) 0.009500] [io_file_system/INFO] Disk1 (/scratch) Used: 36924298; Free: 536833987702; Total: 536870912000. > [bob:host:(1) 0.009500] [io_file_system/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. diff --git a/examples/c/platform-failures/platform-failures.tesh b/examples/c/platform-failures/platform-failures.tesh index 54fae56b0e..74e5c71d88 100644 --- a/examples/c/platform-failures/platform-failures.tesh +++ b/examples/c/platform-failures/platform-failures.tesh @@ -214,7 +214,7 @@ p NOT testing the mixture of failures and CpuTI: p This test leads to a deadlock because of a bug somewhere in EngineImpl::solve. p We should debug this instead of ignoring the issue, but it's utterly p complex with such an integration test. One day, we will setup a set of -p unit tests for the surf solver, and such issues will be addressable again. +p unit tests for the model's solver, and such issues will be addressable again. p For the time being, I just give up, sorry. p $ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../cpp/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=res_cpu.t:verbose diff --git a/examples/cpp/comm-pingpong/s4u-comm-pingpong.tesh b/examples/cpp/comm-pingpong/s4u-comm-pingpong.tesh index 861b0df694..72785640cb 100644 --- a/examples/cpp/comm-pingpong/s4u-comm-pingpong.tesh +++ b/examples/cpp/comm-pingpong/s4u-comm-pingpong.tesh @@ -39,7 +39,7 @@ $ ${bindir:=.}/s4u-comm-pingpong ${platfdir}/small_platform.xml --cfg=cpu/model: > [145.639041] (1:pinger@Tremblay) Pong time (bandwidth bound): 145.638 > [145.639041] (0:maestro@) Total simulation time: 145.639 -p Testing the surf network constant model +p Testing the network constant model $ ${bindir:=.}/s4u-comm-pingpong ${platfdir}/small_platform_routing_none.xml "--cfg=cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" > [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01' diff --git a/examples/cpp/io-file-remote/s4u-io-file-remote.tesh b/examples/cpp/io-file-remote/s4u-io-file-remote.tesh index 180ba09971..2660d763f4 100644 --- a/examples/cpp/io-file-remote/s4u-io-file-remote.tesh +++ b/examples/cpp/io-file-remote/s4u-io-file-remote.tesh @@ -5,15 +5,15 @@ $ ${bindir:=.}/s4u-io-file-remote ${platfdir}/hosts_with_disks.xml s4u-io-file-r > [ 0.000000] (0@ ) Init: bob: 35/511964 MiB used/free on 'Disk1@bob' > [ 0.000000] (0@ ) Init: bob: 0/512000 MiB used/free on 'Disk2@bob' > [ 0.000000] (0@ ) Init: carl: 35/511964 MiB used/free on 'Disk1@bob' -> [ 0.000000] (1@alice) Opened file '/include/surf/simgrid_dtd.h' +> [ 0.000000] (1@alice) Opened file '/include/simgrid_dtd.h' > [ 0.000000] (1@alice) File Descriptor information: -> Full path: '/include/surf/simgrid_dtd.h' +> Full path: '/include/simgrid_dtd.h' > Size: 23583 > Mount point: '/' > Disk Id: 'Disk1' > Host Id: 'alice' > File Descriptor Id: 0 -> [ 0.000000] (1@alice) Try to write 23 MiB to '/include/surf/simgrid_dtd.h' +> [ 0.000000] (1@alice) Try to write 23 MiB to '/include/simgrid_dtd.h' > [ 0.000000] (2@ bob) Opened file '/scratch/doc/simgrid/examples/platforms/g5k.xml' > [ 0.000000] (2@ bob) File Descriptor information: > Full path: '/scratch/doc/simgrid/examples/platforms/g5k.xml' @@ -23,20 +23,20 @@ $ ${bindir:=.}/s4u-io-file-remote ${platfdir}/hosts_with_disks.xml s4u-io-file-r > Host Id: 'bob' > File Descriptor Id: 0 > [ 0.000000] (2@ bob) Try to write 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml' -> [ 0.000000] (3@ carl) Opened file '/scratch/include/surf/simgrid_dtd.h' +> [ 0.000000] (3@ carl) Opened file '/scratch/include/simgrid_dtd.h' > [ 0.000000] (3@ carl) File Descriptor information: -> Full path: '/scratch/include/surf/simgrid_dtd.h' +> Full path: '/scratch/include/simgrid_dtd.h' > Size: 23583 > Mount point: '/scratch' > Disk Id: 'Disk1' > Host Id: 'bob' > File Descriptor Id: 0 -> [ 0.000000] (3@ carl) Try to write 23 MiB to '/scratch/include/surf/simgrid_dtd.h' -> [ 0.301862] (1@alice) Have written 23 MiB to '/include/surf/simgrid_dtd.h'. -> [ 0.301862] (1@alice) Move '/include/surf/simgrid_dtd.h' (of size 24148992) from 'alice' to 'bob' +> [ 0.000000] (3@ carl) Try to write 23 MiB to '/scratch/include/simgrid_dtd.h' +> [ 0.301862] (1@alice) Have written 23 MiB to '/include/simgrid_dtd.h'. +> [ 0.301862] (1@alice) Move '/include/simgrid_dtd.h' (of size 24148992) from 'alice' to 'bob' > [ 0.660757] (2@ bob) Have written 16 MiB to '/scratch/doc/simgrid/examples/platforms/g5k.xml'. > [ 0.660757] (2@ bob) Copy '/scratch/doc/simgrid/examples/platforms/g5k.xml' (of size 17436672) from 'bob' to 'alice' -> [ 1.234522] (3@ carl) Have written 23 MiB to '/scratch/include/surf/simgrid_dtd.h'. +> [ 1.234522] (3@ carl) Have written 23 MiB to '/scratch/include/simgrid_dtd.h'. > [ 1.643366] (0@ ) End: 29/511970 MiB used/free on 'Disk1@alice' > [ 1.643366] (0@ ) End: 97/511902 MiB used/free on 'Disk1@bob' > [ 1.643366] (0@ ) End: 0/512000 MiB used/free on 'Disk2@bob' diff --git a/examples/cpp/io-file-remote/s4u-io-file-remote_d.xml b/examples/cpp/io-file-remote/s4u-io-file-remote_d.xml index d14901b8fb..205ca815b2 100644 --- a/examples/cpp/io-file-remote/s4u-io-file-remote_d.xml +++ b/examples/cpp/io-file-remote/s4u-io-file-remote_d.xml @@ -2,9 +2,9 @@ - + - + @@ -14,6 +14,6 @@ - + diff --git a/examples/cpp/io-file-system/s4u-io-file-system.tesh b/examples/cpp/io-file-system/s4u-io-file-system.tesh index b2ad152bd1..226c5c6242 100644 --- a/examples/cpp/io-file-system/s4u-io-file-system.tesh +++ b/examples/cpp/io-file-system/s4u-io-file-system.tesh @@ -2,20 +2,20 @@ $ ${bindir:=.}/s4u-io-file-system ${platfdir}/hosts_with_disks.xml > [bob:host:(1) 0.000000] [s4u_test/INFO] Storage info on bob: -> [bob:host:(1) 0.000000] [s4u_test/INFO] Disk1 (/scratch) Used: 36933331; Free: 536833978669; Total: 536870912000. +> [bob:host:(1) 0.000000] [s4u_test/INFO] Disk1 (/scratch) Used: 36924298; Free: 536833987702; Total: 536870912000. > [bob:host:(1) 0.000000] [s4u_test/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.005000] [s4u_test/INFO] Create a 200000 bytes file named '/scratch/tmp/data.txt' on /scratch > [bob:host:(1) 0.005000] [s4u_test/INFO] Storage info on bob: -> [bob:host:(1) 0.005000] [s4u_test/INFO] Disk1 (/scratch) Used: 37133331; Free: 536833778669; Total: 536870912000. +> [bob:host:(1) 0.005000] [s4u_test/INFO] Disk1 (/scratch) Used: 37124298; Free: 536833787702; Total: 536870912000. > [bob:host:(1) 0.005000] [s4u_test/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.007000] [s4u_test/INFO] Read 200000 bytes on /scratch/tmp/data.txt > [bob:host:(1) 0.009500] [s4u_test/INFO] Write 100000 bytes on /scratch/tmp/data.txt > [bob:host:(1) 0.009500] [s4u_test/INFO] Move '/scratch/tmp/data.txt' to '/scratch/tmp/simgrid.readme' > [bob:host:(1) 0.009500] [s4u_test/INFO] User data attached to the file: 777 > [bob:host:(1) 0.009500] [s4u_test/INFO] Storage info on bob: -> [bob:host:(1) 0.009500] [s4u_test/INFO] Disk1 (/scratch) Used: 37233331; Free: 536833678669; Total: 536870912000. +> [bob:host:(1) 0.009500] [s4u_test/INFO] Disk1 (/scratch) Used: 37224298; Free: 536833687702; Total: 536870912000. > [bob:host:(1) 0.009500] [s4u_test/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. > [bob:host:(1) 0.009500] [s4u_test/INFO] Unlink file: '/scratch/tmp/simgrid.readme' > [bob:host:(1) 0.009500] [s4u_test/INFO] Storage info on bob: -> [bob:host:(1) 0.009500] [s4u_test/INFO] Disk1 (/scratch) Used: 36933331; Free: 536833978669; Total: 536870912000. +> [bob:host:(1) 0.009500] [s4u_test/INFO] Disk1 (/scratch) Used: 36924298; Free: 536833987702; Total: 536870912000. > [bob:host:(1) 0.009500] [s4u_test/INFO] Disk2 (/) Used: 0; Free: 536870912000; Total: 536870912000. diff --git a/examples/platforms/config.xml b/examples/platforms/config.xml index b524bf174a..6ab64321ad 100644 --- a/examples/platforms/config.xml +++ b/examples/platforms/config.xml @@ -2,7 +2,7 @@ - + diff --git a/examples/platforms/storage/content/small_content.txt b/examples/platforms/storage/content/small_content.txt index 80d00dd8a6..f638bcc862 100644 --- a/examples/platforms/storage/content/small_content.txt +++ b/examples/platforms/storage/content/small_content.txt @@ -21,7 +21,7 @@ /include/xbt/fifo.h 3626 /include/msg/datatypes.h 4635 /include/mc/modelchecker.h 96 -/include/surf/simgrid_dtd.h 23583 +/include/simgrid_dtd.h 23583 /include/instr/instr.h 5750 /include/simdag/simdag.h 10325 /include/simix/simix.h 13003 diff --git a/examples/platforms/storage/content/storage_content.txt b/examples/platforms/storage/content/storage_content.txt index 6744799dff..a8e02680cd 100644 --- a/examples/platforms/storage/content/storage_content.txt +++ b/examples/platforms/storage/content/storage_content.txt @@ -292,11 +292,11 @@ /doc/simgrid/html/MSG_ex_master_slave_lua_bypass.html 4803 /doc/simgrid/html/simgrid_modules2.png 11932 /doc/simgrid/html/classsimgrid_1_1msg_1_1Msg.html 1519 -/doc/simgrid/html/group__SURF__actions.html 13562 +/doc/simgrid/html/group__SIMGRID__actions.html 13562 /doc/simgrid/html/publis_intra.html 435 /doc/simgrid/html/simgrid_logo_small.png 8326 -/doc/simgrid/html/group__SURF__resources.html 4203 -/doc/simgrid/html/structsurf__cpu__model__extension__public.html 2751 +/doc/simgrid/html/group__SIMGRID__resources.html 4203 +/doc/simgrid/html/structsimgrid__cpu__model__extension__public.html 2751 /doc/simgrid/html/tabs.css 1095 /doc/simgrid/html/group__XBT__set.html 6991 /doc/simgrid/html/group__XBT__set__curs.html 9653 @@ -309,11 +309,11 @@ /doc/simgrid/html/nav_f.png 159 /doc/simgrid/html/group__XBT__queue.html 23050 /doc/simgrid/html/group__XBT__fifo__cons.html 9876 -/doc/simgrid/html/structsurf__model.html 17707 +/doc/simgrid/html/structsimgrid__model.html 17707 /doc/simgrid/html/MSG_ex_asynchronous_communications.html 43212 /doc/simgrid/html/Paje_MSG_screenshot_thn.jpg 30326 -/doc/simgrid/html/structsurf__network__model__extension__public.html 2783 -/doc/simgrid/html/structsurf__model__description.html 2621 +/doc/simgrid/html/structsimgrid__network__model__extension__public.html 2783 +/doc/simgrid/html/structsimgrid__model__description.html 2621 /doc/simgrid/html/group__m__host__management.html 19042 /doc/simgrid/html/group__XBT__fifo__perl.html 14045 /doc/simgrid/html/modules.html 12734 @@ -321,7 +321,6 @@ /doc/simgrid/html/group__XBT__fifo.html 6191 /doc/simgrid/html/group__XBT__parmap.html 3765 /doc/simgrid/html/tracing.html 58483 -/doc/simgrid/html/structs__surf__metric__t.html 2523 /doc/simgrid/html/classsimgrid_1_1msg_1_1Task.html 1519 /doc/simgrid/html/group__XBT__swag.html 5923 /doc/simgrid/html/functions_vars.html 11436 @@ -351,7 +350,7 @@ /doc/simgrid/html/index.html 9659 /doc/simgrid/html/group__SD__link__management.html 17867 /doc/simgrid/html/group__MSG__JAVA.html 5443 -/doc/simgrid/html/group__SURF__simulation.html 10385 +/doc/simgrid/html/group__SIMGRID__simulation.html 10385 /doc/simgrid/html/structm__host.html 4188 /doc/simgrid/html/group__XBT__dynar__array.html 22436 /doc/simgrid/html/simgrid.css 386 @@ -380,7 +379,7 @@ /doc/simgrid/html/group__XBT__dict__basic.html 20935 /doc/simgrid/html/group__XBT__graph.html 23682 /doc/simgrid/html/group__XBT__mallocator.html 6444 -/doc/simgrid/html/structsurf__workstation__model__extension__public.html 11076 +/doc/simgrid/html/structsimgrid__workstation__model__extension__public.html 11076 /doc/simgrid/html/publis.html 435 /doc/simgrid/html/group__XBT__misc.html 4663 /doc/simgrid/html/simdag.html 226 @@ -409,12 +408,12 @@ /doc/simgrid/html/options.html 7629 /doc/simgrid/html/group__XBT__dict__nnul.html 18891 /doc/simgrid/html/win_install_04.png 52033 -/doc/simgrid/html/structsurf__action.html 8353 +/doc/simgrid/html/structsimgrid__action.html 8353 /doc/simgrid/html/group__XBT__ex.html 32537 -/doc/simgrid/html/group__SURF__API.html 6659 +/doc/simgrid/html/group__SIMGRID__API.html 6659 /doc/simgrid/html/doxygen.css 12350 /doc/simgrid/html/group__XBT__set__cons.html 7965 -/doc/simgrid/html/group__SURF__build__api.html 7821 +/doc/simgrid/html/group__SIMGRID__build__api.html 7821 /doc/simgrid/html/group__m__process__management.html 47169 /doc/simgrid/html/group__XBT__dict__curs.html 19747 /doc/simgrid/html/group__SD__datatypes__management.html 20816 @@ -430,7 +429,7 @@ /doc/simgrid/html/group__SD__task__management.html 60347 /doc/simgrid/html/group__XBT__syscall.html 10095 /doc/simgrid/html/group__XBT__heap.html 18482 -/doc/simgrid/html/structsurf__action__state.html 7301 +/doc/simgrid/html/structsimgrid__action__state.html 7301 /doc/simgrid/html/tab_s.png 189 /doc/simgrid/html/tab_h.png 192 /doc/simgrid/html/nav_h.png 97 @@ -476,9 +475,7 @@ /include/msg/msg.h 12038 /include/simgrid_config.h 3641 /include/mc/modelchecker.h 96 -/include/surf/simgrid_dtd.h 23583 -/include/surf/surf_routing.h 1167 -/include/surf/surfxml_parse.h 5343 +/include/simgrid_dtd.h 23583 /include/instr/instr.h 5750 /include/simdag/simdag.h 10325 /include/simdag/datatypes.h 3715 diff --git a/include/simgrid/kernel/resource/Model.hpp b/include/simgrid/kernel/resource/Model.hpp index c5c09e4050..87f8eee245 100644 --- a/include/simgrid/kernel/resource/Model.hpp +++ b/include/simgrid/kernel/resource/Model.hpp @@ -14,10 +14,6 @@ namespace simgrid { namespace kernel { namespace resource { -/** @ingroup SURF_interface - * @brief SURF model interface class - * @details A model is an object which handle the interactions between its Resources and its Actions - */ class XBT_PUBLIC Model { public: /** @brief Possible update mechanisms */ diff --git a/include/simgrid/kernel/routing/DijkstraZone.hpp b/include/simgrid/kernel/routing/DijkstraZone.hpp index 0c21c5b6e2..fa4c176440 100644 --- a/include/simgrid/kernel/routing/DijkstraZone.hpp +++ b/include/simgrid/kernel/routing/DijkstraZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_DIJKSTRA_HPP_ -#define SURF_ROUTING_DIJKSTRA_HPP_ +#ifndef SIMGRID_ROUTING_DIJKSTRA_HPP_ +#define SIMGRID_ROUTING_DIJKSTRA_HPP_ #include @@ -57,4 +57,4 @@ public: } // namespace kernel } // namespace simgrid -#endif /* SURF_ROUTING_DIJKSTRA_HPP_ */ +#endif /* SIMGRID_ROUTING_DIJKSTRA_HPP_ */ diff --git a/include/simgrid/kernel/routing/DragonflyZone.hpp b/include/simgrid/kernel/routing/DragonflyZone.hpp index 1dbb3d2e9d..558af8dba1 100644 --- a/include/simgrid/kernel/routing/DragonflyZone.hpp +++ b/include/simgrid/kernel/routing/DragonflyZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_CLUSTER_DRAGONFLY_HPP_ -#define SURF_ROUTING_CLUSTER_DRAGONFLY_HPP_ +#ifndef SIMGRID_ROUTING_CLUSTER_DRAGONFLY_HPP_ +#define SIMGRID_ROUTING_CLUSTER_DRAGONFLY_HPP_ #include #include diff --git a/include/simgrid/kernel/routing/EmptyZone.hpp b/include/simgrid/kernel/routing/EmptyZone.hpp index c5ca4476ca..72404938b1 100644 --- a/include/simgrid/kernel/routing/EmptyZone.hpp +++ b/include/simgrid/kernel/routing/EmptyZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_NONE_HPP_ -#define SURF_ROUTING_NONE_HPP_ +#ifndef SIMGRID_ROUTING_NONE_HPP_ +#define SIMGRID_ROUTING_NONE_HPP_ #include #include @@ -36,4 +36,4 @@ public: } // namespace kernel } // namespace simgrid -#endif /* SURF_ROUTING_NONE_HPP_ */ +#endif /* SIMGRID_ROUTING_NONE_HPP_ */ diff --git a/include/simgrid/kernel/routing/FloydZone.hpp b/include/simgrid/kernel/routing/FloydZone.hpp index 3cc7963264..a384746e6a 100644 --- a/include/simgrid/kernel/routing/FloydZone.hpp +++ b/include/simgrid/kernel/routing/FloydZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_FLOYD_HPP_ -#define SURF_ROUTING_FLOYD_HPP_ +#ifndef SIMGRID_ROUTING_FLOYD_HPP_ +#define SIMGRID_ROUTING_FLOYD_HPP_ #include @@ -43,4 +43,4 @@ public: } // namespace kernel } // namespace simgrid -#endif /* SURF_ROUTING_FLOYD_HPP_ */ +#endif /* SIMGRID_ROUTING_FLOYD_HPP_ */ diff --git a/include/simgrid/kernel/routing/TorusZone.hpp b/include/simgrid/kernel/routing/TorusZone.hpp index 13ead15736..af661d3b60 100644 --- a/include/simgrid/kernel/routing/TorusZone.hpp +++ b/include/simgrid/kernel/routing/TorusZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_CLUSTER_TORUS_HPP_ -#define SURF_ROUTING_CLUSTER_TORUS_HPP_ +#ifndef SIMGRID_ROUTING_CLUSTER_TORUS_HPP_ +#define SIMGRID_ROUTING_CLUSTER_TORUS_HPP_ #include diff --git a/include/simgrid/kernel/routing/VivaldiZone.hpp b/include/simgrid/kernel/routing/VivaldiZone.hpp index d2e85f4e09..0af8f0edb4 100644 --- a/include/simgrid/kernel/routing/VivaldiZone.hpp +++ b/include/simgrid/kernel/routing/VivaldiZone.hpp @@ -3,8 +3,8 @@ /* 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 SURF_ROUTING_VIVALDI_HPP_ -#define SURF_ROUTING_VIVALDI_HPP_ +#ifndef SIMGRID_ROUTING_VIVALDI_HPP_ +#define SIMGRID_ROUTING_VIVALDI_HPP_ #include #include @@ -64,4 +64,4 @@ public: } // namespace kernel } // namespace simgrid -#endif /* SURF_ROUTING_VIVALDI_HPP_ */ +#endif /* SIMGRID_ROUTING_VIVALDI_HPP_ */ diff --git a/include/xbt/mallocator.h b/include/xbt/mallocator.h index bc0ddeca2b..e9b4cf4eca 100644 --- a/include/xbt/mallocator.h +++ b/include/xbt/mallocator.h @@ -47,7 +47,7 @@ XBT_PUBLIC void xbt_mallocator_free(xbt_mallocator_t mallocator); XBT_PUBLIC void* xbt_mallocator_get(xbt_mallocator_t mallocator); XBT_PUBLIC void xbt_mallocator_release(xbt_mallocator_t mallocator, void* object); -XBT_PUBLIC void xbt_mallocator_initialization_is_done(int protect); +XBT_PUBLIC void xbt_mallocator_initialization_is_done(int need_protection); /** @} */ SG_END_DECL diff --git a/sonar-project.properties b/sonar-project.properties index b5370402e1..d947564c02 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -155,7 +155,7 @@ sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp # - the NAS, that are included in our examples # - The Catch2 library, that is included in our unit tests # - The xxHash library, used by the MC -sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c +sonar.exclusions=src/3rd-party/*,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c # Exclude our examples from the duplication detection. # Examples are expected to be somehow repetitive diff --git a/src/include/catch.hpp b/src/3rd-party/catch.hpp similarity index 98% rename from src/include/catch.hpp rename to src/3rd-party/catch.hpp index 9c1c854fd5..9b309bddc6 100644 --- a/src/include/catch.hpp +++ b/src/3rd-party/catch.hpp @@ -1,9 +1,9 @@ /* - * Catch v2.13.5 - * Generated: 2021-04-10 23:43:17.560525 + * Catch v2.13.10 + * Generated: 2022-10-16 11:01:23.452308 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2021 Two Blue Cubes Ltd. All rights reserved. + * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. * * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,7 +15,7 @@ #define CATCH_VERSION_MAJOR 2 #define CATCH_VERSION_MINOR 13 -#define CATCH_VERSION_PATCH 5 +#define CATCH_VERSION_PATCH 10 #ifdef __clang__ # pragma clang system_header @@ -240,9 +240,6 @@ namespace Catch { // Visual C++ #if defined(_MSC_VER) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) - // Universal Windows platform does not support SEH // Or console colours (or console at all...) # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) @@ -251,13 +248,18 @@ namespace Catch { # define CATCH_INTERNAL_CONFIG_WINDOWS_SEH # endif +# if !defined(__clang__) // Handle Clang masquerading for msvc + // MSVC traditional preprocessor needs some workaround for __VA_ARGS__ // _MSVC_TRADITIONAL == 0 means new conformant preprocessor // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(__clang__) // Handle Clang masquerading for msvc # if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) # define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR # endif // MSVC_TRADITIONAL + +// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop` +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) # endif // __clang__ #endif // _MSC_VER @@ -326,7 +328,7 @@ namespace Catch { // Check if byte is available and usable # if __has_include() && defined(CATCH_CPP17_OR_GREATER) # include - # if __cpp_lib_byte > 0 + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) # define CATCH_INTERNAL_CONFIG_CPP17_BYTE # endif # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) @@ -1010,34 +1012,34 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) #endif #endif @@ -1050,7 +1052,7 @@ struct AutoReg : NonCopyable { CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ static void TestName() #define INTERNAL_CATCH_TESTCASE( ... ) \ - INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ @@ -1072,7 +1074,7 @@ struct AutoReg : NonCopyable { CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ void TestName::test() #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ - INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ ) + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), ClassName, __VA_ARGS__ ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ @@ -1113,18 +1115,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename TestType, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \ @@ -1162,18 +1164,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T,__VA_ARGS__) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T,__VA_ARGS__) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\ @@ -1204,7 +1206,7 @@ struct AutoReg : NonCopyable { static void TestFunc() #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \ - INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, TmplList ) + INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name, Tags, TmplList ) #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ @@ -1237,18 +1239,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_C_L_A_S_S_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\ @@ -1289,18 +1291,18 @@ struct AutoReg : NonCopyable { #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) ) #endif #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\ - INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature, __VA_ARGS__ ) + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature, __VA_ARGS__ ) #else #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\ - INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) ) + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) ) #endif #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \ @@ -1334,7 +1336,7 @@ struct AutoReg : NonCopyable { void TestName::test() #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \ - INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, TmplList ) + INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ), INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), ClassName, Name, Tags, TmplList ) // end catch_test_registry.h // start catch_capture.hpp @@ -3091,7 +3093,7 @@ namespace Detail { Approx operator-() const; template ::value>::type> - Approx operator()( T const& value ) { + Approx operator()( T const& value ) const { Approx approx( static_cast(value) ); approx.m_epsilon = m_epsilon; approx.m_margin = m_margin; @@ -4163,7 +4165,7 @@ namespace Generators { if (!m_predicate(m_generator.get())) { // It might happen that there are no values that pass the // filter. In that case we throw an exception. - auto has_initial_value = next(); + auto has_initial_value = nextImpl(); if (!has_initial_value) { Catch::throw_exception(GeneratorException("No valid value found in filtered generator")); } @@ -4175,6 +4177,11 @@ namespace Generators { } bool next() override { + return nextImpl(); + } + + private: + bool nextImpl() { bool success = m_generator.next(); if (!success) { return false; @@ -5458,6 +5465,8 @@ namespace Catch { } // namespace Catch // end catch_outlier_classification.hpp + +#include #endif // CATCH_CONFIG_ENABLE_BENCHMARKING #include @@ -6342,9 +6351,10 @@ namespace Catch { void writeTestCase(TestCaseNode const& testCaseNode); - void writeSection(std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode); + void writeSection( std::string const& className, + std::string const& rootName, + SectionNode const& sectionNode, + bool testOkToFail ); void writeAssertions(SectionNode const& sectionNode); void writeAssertion(AssertionStats const& stats); @@ -6879,7 +6889,7 @@ namespace Catch { } iters *= 2; } - throw optimized_away_error{}; + Catch::throw_exception(optimized_away_error{}); } } // namespace Detail } // namespace Benchmark @@ -6887,6 +6897,7 @@ namespace Catch { // end catch_run_for_at_least.hpp #include +#include namespace Catch { namespace Benchmark { @@ -7384,8 +7395,6 @@ namespace Catch { template struct ObjectStorage { - using TStorage = typename std::aligned_storage::value>::type; - ObjectStorage() : data() {} ObjectStorage(const ObjectStorage& other) @@ -7428,7 +7437,7 @@ namespace Catch { return *static_cast(static_cast(&data)); } - TStorage data; + struct { alignas(T) unsigned char data[sizeof(T)]; } data; }; } @@ -7938,7 +7947,7 @@ namespace Catch { #if defined(__i386__) || defined(__x86_64__) #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ #elif defined(__aarch64__) - #define CATCH_TRAP() __asm__(".inst 0xd4200000") + #define CATCH_TRAP() __asm__(".inst 0xd43e0000") #endif #elif defined(CATCH_PLATFORM_IPHONE) @@ -10751,8 +10760,8 @@ namespace Catch { // If neither SEH nor signal handling is required, the handler impls // do not have to do anything, and can be empty. - FatalConditionHandler::engage_platform() {} - FatalConditionHandler::disengage_platform() {} + void FatalConditionHandler::engage_platform() {} + void FatalConditionHandler::disengage_platform() {} FatalConditionHandler::FatalConditionHandler() = default; FatalConditionHandler::~FatalConditionHandler() = default; @@ -13381,6 +13390,10 @@ namespace Catch { filename.erase(0, lastSlash); filename[0] = '#'; } + else + { + filename.insert(0, "#"); + } auto lastDot = filename.find_last_of('.'); if (lastDot != std::string::npos) { @@ -13543,7 +13556,7 @@ namespace Catch { // Handle list request if( Option listed = list( m_config ) ) - return static_cast( *listed ); + return (std::min) (MaxExitCode, static_cast(*listed)); TestGroup tests { m_config }; auto const totals = tests.execute(); @@ -15376,7 +15389,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 13, 5, "", 0 ); + static Version version( 2, 13, 10, "", 0 ); return version; } @@ -16789,6 +16802,7 @@ CATCH_REGISTER_REPORTER("console", ConsoleReporter) #include #include #include +#include namespace Catch { @@ -16816,7 +16830,7 @@ namespace Catch { #else std::strftime(timeStamp, timeStampSize, fmt, timeInfo); #endif - return std::string(timeStamp); + return std::string(timeStamp, timeStampSize-1); } std::string fileNameTag(const std::vector &tags) { @@ -16827,6 +16841,17 @@ namespace Catch { return it->substr(1); return std::string(); } + + // Formats the duration in seconds to 3 decimal places. + // This is done because some genius defined Maven Surefire schema + // in a way that only accepts 3 decimal places, and tools like + // Jenkins use that schema for validation JUnit reporter output. + std::string formatDuration( double seconds ) { + ReusableStringStream rss; + rss << std::fixed << std::setprecision( 3 ) << seconds; + return rss.str(); + } + } // anonymous namespace JunitReporter::JunitReporter( ReporterConfig const& _config ) @@ -16896,7 +16921,7 @@ namespace Catch { if( m_config->showDurations() == ShowDurations::Never ) xml.writeAttribute( "time", "" ); else - xml.writeAttribute( "time", suiteTime ); + xml.writeAttribute( "time", formatDuration( suiteTime ) ); xml.writeAttribute( "timestamp", getCurrentTimestamp() ); // Write properties if there are any @@ -16941,12 +16966,13 @@ namespace Catch { if ( !m_config->name().empty() ) className = m_config->name() + "." + className; - writeSection( className, "", rootSection ); + writeSection( className, "", rootSection, stats.testInfo.okToFail() ); } - void JunitReporter::writeSection( std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode ) { + void JunitReporter::writeSection( std::string const& className, + std::string const& rootName, + SectionNode const& sectionNode, + bool testOkToFail) { std::string name = trim( sectionNode.stats.sectionInfo.name ); if( !rootName.empty() ) name = rootName + '/' + name; @@ -16963,13 +16989,18 @@ namespace Catch { xml.writeAttribute( "classname", className ); xml.writeAttribute( "name", name ); } - xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); + xml.writeAttribute( "time", formatDuration( sectionNode.stats.durationInSeconds ) ); // This is not ideal, but it should be enough to mimic gtest's // junit output. // Ideally the JUnit reporter would also handle `skipTest` // events and write those out appropriately. xml.writeAttribute( "status", "run" ); + if (sectionNode.stats.assertions.failedButOk) { + xml.scopedElement("skipped") + .writeAttribute("message", "TEST_CASE tagged with !mayfail"); + } + writeAssertions( sectionNode ); if( !sectionNode.stdOut.empty() ) @@ -16979,9 +17010,9 @@ namespace Catch { } for( auto const& childNode : sectionNode.childSections ) if( className.empty() ) - writeSection( name, "", *childNode ); + writeSection( name, "", *childNode, testOkToFail ); else - writeSection( className, name, *childNode ); + writeSection( className, name, *childNode, testOkToFail ); } void JunitReporter::writeAssertions( SectionNode const& sectionNode ) { @@ -17493,12 +17524,20 @@ namespace Catch { #ifndef __OBJC__ +#ifndef CATCH_INTERNAL_CDECL +#ifdef _MSC_VER +#define CATCH_INTERNAL_CDECL __cdecl +#else +#define CATCH_INTERNAL_CDECL +#endif +#endif + #if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) // Standard C/C++ Win32 Unicode wmain entry point -extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { +extern "C" int CATCH_INTERNAL_CDECL wmain (int argc, wchar_t * argv[], wchar_t * []) { #else // Standard C/C++ main entry point -int main (int argc, char * argv[]) { +int CATCH_INTERNAL_CDECL main (int argc, char * argv[]) { #endif return Catch::Session().run( argc, argv ); @@ -17626,9 +17665,9 @@ int main (int argc, char * const argv[]) { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) #define CATCH_BENCHMARK(...) \ - INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) #define CATCH_BENCHMARK_ADVANCED(name) \ - INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name) + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name) #endif // CATCH_CONFIG_ENABLE_BENCHMARKING // If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required @@ -17730,9 +17769,9 @@ int main (int argc, char * const argv[]) { #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) #define BENCHMARK(...) \ - INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) #define BENCHMARK_ADVANCED(name) \ - INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name) + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(C_A_T_C_H_B_E_N_C_H_), name) #endif // CATCH_CONFIG_ENABLE_BENCHMARKING using Catch::Detail::Approx; @@ -17779,8 +17818,8 @@ using Catch::Detail::Approx; #define CATCH_WARN( msg ) (void)(0) #define CATCH_CAPTURE( msg ) (void)(0) -#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #define CATCH_METHOD_AS_TEST_CASE( method, ... ) #define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0) #define CATCH_SECTION( ... ) @@ -17789,7 +17828,7 @@ using Catch::Detail::Approx; #define CATCH_FAIL_CHECK( ... ) (void)(0) #define CATCH_SUCCEED( ... ) (void)(0) -#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) @@ -17812,8 +17851,8 @@ using Catch::Detail::Approx; #endif // "BDD-style" convenience wrappers -#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) +#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className ) #define CATCH_GIVEN( desc ) #define CATCH_AND_GIVEN( desc ) #define CATCH_WHEN( desc ) @@ -17861,10 +17900,10 @@ using Catch::Detail::Approx; #define INFO( msg ) (void)(0) #define UNSCOPED_INFO( msg ) (void)(0) #define WARN( msg ) (void)(0) -#define CAPTURE( msg ) (void)(0) +#define CAPTURE( ... ) (void)(0) -#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) +#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #define METHOD_AS_TEST_CASE( method, ... ) #define REGISTER_TEST_CASE( Function, ... ) (void)(0) #define SECTION( ... ) @@ -17872,7 +17911,7 @@ using Catch::Detail::Approx; #define FAIL( ... ) (void)(0) #define FAIL_CHECK( ... ) (void)(0) #define SUCCEED( ... ) (void)(0) -#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) +#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ )) #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) @@ -17902,8 +17941,8 @@ using Catch::Detail::Approx; #define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) // "BDD-style" convenience wrappers -#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) ) -#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) +#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ) ) +#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_S_T_ ), className ) #define GIVEN( desc ) #define AND_GIVEN( desc ) diff --git a/src/3rd-party/xxhash.hpp b/src/3rd-party/xxhash.hpp new file mode 100644 index 0000000000..a3dbe98912 --- /dev/null +++ b/src/3rd-party/xxhash.hpp @@ -0,0 +1,757 @@ +#pragma once +#include +#include +#include +#include +#include +#include + +#include + +/* +xxHash - Extremely Fast Hash algorithm +Header File +Copyright (C) 2012-2018, Yann Collet. +Copyright (C) 2017-2018, Piotr Pliszka. +All rights reserved. + +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +You can contact the author at : +- xxHash source repository : https://github.com/Cyan4973/xxHash +- xxHash C++ port repository : https://github.com/RedSpah/xxhash_cpp +*/ + +/* ************************************* + * Tuning parameters + ***************************************/ +/*!XXH_FORCE_MEMORY_ACCESS : + * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. + * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. + * The below switch allow to select different access method for improved performance. + * Method 0 (default) : use `memcpy()`. Safe and portable. + * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). + * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. + * Method 2 : direct access. This method doesn't depend on compiler but violate C standard. + * It can generate buggy code on targets which do not support unaligned memory accesses. + * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) + * See http://stackoverflow.com/a/32095106/646947 for details. + * Prefer these methods in priority order (0 > 1 > 2) + */ +#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ +#if defined(__GNUC__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || \ + defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)) +#define XXH_FORCE_MEMORY_ACCESS 2 +#elif defined(__INTEL_COMPILER) || \ + (defined(__GNUC__) && (defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || \ + defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__))) +#define XXH_FORCE_MEMORY_ACCESS 1 +#endif +#endif + +/*!XXH_FORCE_NATIVE_FORMAT : + * By default, xxHash library provides endian-independent Hash values, based on little-endian convention. + * Results are therefore identical for little-endian and big-endian CPU. + * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. + * Should endian-independence be of no importance for your application, you may set the #define below to 1, + * to improve speed for Big-endian CPU. + * This option has no impact on Little_Endian CPU. + */ +#if !defined(XXH_FORCE_NATIVE_FORMAT) || (XXH_FORCE_NATIVE_FORMAT == 0) /* can be defined externally */ +#define XXH_FORCE_NATIVE_FORMAT 0 +#define XXH_CPU_LITTLE_ENDIAN 1 +#endif + +/*!XXH_FORCE_ALIGN_CHECK : + * This is a minor performance trick, only useful with lots of very small keys. + * It means : check for aligned/unaligned input. + * The check costs one initial branch per hash; + * set it to 0 when the input is guaranteed to be aligned, + * or when alignment doesn't matter for performance. + */ +#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ +#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) +#define XXH_FORCE_ALIGN_CHECK 0 +#else +#define XXH_FORCE_ALIGN_CHECK 1 +#endif +#endif + +/*!XXH_CPU_LITTLE_ENDIAN : + * This is a CPU endian detection macro, will be + * automatically set to 1 (little endian) if XXH_FORCE_NATIVE_FORMAT + * is left undefined, XXH_FORCE_NATIVE_FORMAT is defined to 0, or if an x86/x86_64 compiler macro is defined. + * If left undefined, endianness will be determined at runtime, at the cost of a slight one-time overhead + * and a larger overhead due to get_endian() not being constexpr. + */ +#ifndef XXH_CPU_LITTLE_ENDIAN +#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) +#define XXH_CPU_LITTLE_ENDIAN 1 +#endif +#endif + +/* ************************************* + * Compiler Specific Options + ***************************************/ +#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +namespace xxh { +/* ************************************* + * Version + ***************************************/ +constexpr int cpp_version_major = 0; +constexpr int cpp_version_minor = 6; +constexpr int cpp_version_release = 5; +constexpr uint32_t version_number() +{ + return cpp_version_major * 10000 + cpp_version_minor * 100 + cpp_version_release; +} + +namespace hash_t_impl { +/* ************************************* + * Basic Types - Detail + ***************************************/ + +using _hash32_underlying = uint32_t; +using _hash64_underlying = uint64_t; + +template struct hash_type { + using type = void; +}; +template <> struct hash_type<32> { + using type = _hash32_underlying; +}; +template <> struct hash_type<64> { + using type = _hash64_underlying; +}; +} // namespace hash_t_impl + +/* ************************************* + * Basic Types - Public + ***************************************/ + +template using hash_t = typename hash_t_impl::hash_type::type; +using hash32_t = hash_t<32>; +using hash64_t = hash_t<64>; + +/* ************************************* + * Bit Functions - Public + ***************************************/ + +namespace bit_ops { +/* **************************************** + * Intrinsics and Bit Operations + ******************************************/ + +#if defined(_MSC_VER) +inline uint32_t rotl32(uint32_t x, int32_t r) +{ + return _rotl(x, r); +} +inline uint64_t rotl64(uint64_t x, int32_t r) +{ + return _rotl64(x, r); +} +#else +inline uint32_t rotl32(uint32_t x, int32_t r) +{ + return ((x << r) | (x >> (32 - r))); +} +inline uint64_t rotl64(uint64_t x, int32_t r) +{ + return ((x << r) | (x >> (64 - r))); +} +#endif + +#if defined(_MSC_VER) /* Visual Studio */ +inline uint32_t swap32(uint32_t x) +{ + return _byteswap_ulong(x); +} +inline uint64_t swap64(uint64_t x) +{ + return _byteswap_uint64(x); +} +#elif XXH_GCC_VERSION >= 403 +inline uint32_t swap32(uint32_t x) +{ + return __builtin_bswap32(x); +} +inline uint64_t swap64(uint64_t x) +{ + return __builtin_bswap64(x); +} +#else +inline uint32_t swap32(uint32_t x) +{ + return ((x << 24) & 0xff000000) | ((x << 8) & 0x00ff0000) | ((x >> 8) & 0x0000ff00) | ((x >> 24) & 0x000000ff); +} +inline uint64_t swap64(uint64_t x) +{ + return ((x << 56) & 0xff00000000000000ULL) | ((x << 40) & 0x00ff000000000000ULL) | + ((x << 24) & 0x0000ff0000000000ULL) | ((x << 8) & 0x000000ff00000000ULL) | ((x >> 8) & 0x00000000ff000000ULL) | + ((x >> 24) & 0x0000000000ff0000ULL) | ((x >> 40) & 0x000000000000ff00ULL) | + ((x >> 56) & 0x00000000000000ffULL); +} +#endif +template inline hash_t rotl(hash_t n, int32_t r){}; + +template <> inline hash_t<32> rotl<32>(hash_t<32> n, int32_t r) +{ + return rotl32(n, r); +}; + +template <> inline hash_t<64> rotl<64>(hash_t<64> n, int32_t r) +{ + return rotl64(n, r); +}; + +template inline hash_t swap(hash_t n){}; + +template <> inline hash_t<32> swap<32>(hash_t<32> n) +{ + return swap32(n); +}; + +template <> inline hash_t<64> swap<64>(hash_t<64> n) +{ + return swap64(n); +}; +} // namespace bit_ops + +/* ************************************* + * Memory Functions - Public + ***************************************/ + +enum class alignment : uint8_t { aligned, unaligned }; +enum class endianness : uint8_t { big_endian = 0, little_endian = 1, unspecified = 2 }; + +namespace mem_ops { +/* ************************************* + * Memory Access + ***************************************/ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS == 2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +template inline hash_t read_unaligned(const void* memPtr) +{ + return *(const hash_t*)memPtr; +} + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS == 1)) + +/* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ +/* currently only defined for gcc and icc */ +template using unalign = union { + hash_t uval; +} __attribute((packed)); + +template inline hash_t read_unaligned(const void* memPtr) +{ + return ((const unalign*)memPtr)->uval; +} +#else + +/* portable and safe solution. Generally efficient. + * see : http://stackoverflow.com/a/32095106/646947 + */ +template inline hash_t read_unaligned(const void* memPtr) +{ + hash_t val; + memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + +inline hash_t<32> read32(const void* memPtr) +{ + return read_unaligned<32>(memPtr); +} +inline hash_t<64> read64(const void* memPtr) +{ + return read_unaligned<64>(memPtr); +} + +/* ************************************* + * Architecture Macros + ***************************************/ + +/* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example on the compiler command line */ + +#ifndef XXH_CPU_LITTLE_ENDIAN + +inline endianness get_endian(endianness endian) +{ + static struct _dummy_t { + std::array endian_lookup = {endianness::big_endian, endianness::little_endian, + endianness::unspecified}; + const int g_one = 1; + _dummy_t() { endian_lookup[2] = static_cast(*(const char*)(&g_one)); } + } _dummy; + + return _dummy.endian_lookup[(uint8_t)endian]; +} + +inline bool is_little_endian() +{ + return get_endian(endianness::unspecified) == endianness::little_endian; +} + +#else +constexpr endianness get_endian(endianness endian) +{ + constexpr std::array endian_lookup = { + {endianness::big_endian, endianness::little_endian, + (XXH_CPU_LITTLE_ENDIAN) ? endianness::little_endian : endianness::big_endian}}; + return endian_lookup[static_cast(endian)]; +} + +constexpr bool is_little_endian() +{ + return get_endian(endianness::unspecified) == endianness::little_endian; +} + +#endif + +/* *************************** + * Memory reads + *****************************/ + +template inline hash_t readLE_align(const void* ptr, endianness endian, alignment align) +{ + if (align == alignment::unaligned) { + return endian == endianness::little_endian ? read_unaligned(ptr) : bit_ops::swap(read_unaligned(ptr)); + } else { + return endian == endianness::little_endian ? *reinterpret_cast*>(ptr) + : bit_ops::swap(*reinterpret_cast*>(ptr)); + } +} + +template inline hash_t readLE(const void* ptr, endianness endian) +{ + return readLE_align(ptr, endian, alignment::unaligned); +} + +template inline hash_t readBE(const void* ptr) +{ + return is_little_endian() ? bit_ops::swap(read_unaligned(ptr)) : read_unaligned(ptr); +} + +template inline alignment get_alignment(const void* input) +{ + return ((XXH_FORCE_ALIGN_CHECK) && ((reinterpret_cast(input) & ((N / 8) - 1)) == 0)) + ? xxh::alignment::aligned + : xxh::alignment::unaligned; +} +} // namespace mem_ops + +/* ******************************************************************* + * Hash functions + *********************************************************************/ + +namespace detail { +/* ******************************************************************* + * Hash functions - Implementation + *********************************************************************/ + +constexpr static std::array primes32 = {{2654435761U, 2246822519U, 3266489917U, 668265263U, 374761393U}}; +constexpr static std::array primes64 = {{11400714785074694791ULL, 14029467366897019727ULL, + 1609587929392839161ULL, 9650029242287828579ULL, + 2870177450012600261ULL}}; + +template constexpr hash_t PRIME(int32_t n){}; + +template <> constexpr hash32_t PRIME<32>(int32_t n) +{ + return primes32[n - 1]; +} + +template <> constexpr hash64_t PRIME<64>(int32_t n) +{ + return primes64[n - 1]; +} + +template inline hash_t round(hash_t seed, hash_t input) +{ + seed += input * PRIME(2); + seed = bit_ops::rotl(seed, ((N == 32) ? 13 : 31)); + seed *= PRIME(1); + return seed; +} + +inline hash64_t mergeRound64(hash64_t acc, hash64_t val) +{ + val = round<64>(0, val); + acc ^= val; + acc = acc * PRIME<64>(1) + PRIME<64>(4); + return acc; +} + +template +inline void endian_align_sub_mergeround( +#if __cplusplus < 201703L + __attribute__((unused)) +#else + [[maybe_unused]] +#endif + hash_t& hash_ret, + hash_t v1, hash_t v2, hash_t v3, hash_t v4){}; + +template <> +inline void endian_align_sub_mergeround<64>(hash_t<64>& hash_ret, hash_t<64> v1, hash_t<64> v2, hash_t<64> v3, + hash_t<64> v4) +{ + hash_ret = mergeRound64(hash_ret, v1); + hash_ret = mergeRound64(hash_ret, v2); + hash_ret = mergeRound64(hash_ret, v3); + hash_ret = mergeRound64(hash_ret, v4); +} + +template +inline hash_t endian_align_sub_ending(hash_t hash_ret, const uint8_t* p, const uint8_t* bEnd, + xxh::endianness endian, xxh::alignment align){}; + +template <> +inline hash_t<32> endian_align_sub_ending<32>(hash_t<32> hash_ret, const uint8_t* p, const uint8_t* bEnd, + xxh::endianness endian, xxh::alignment align) +{ + while ((p + 4) <= bEnd) { + hash_ret += mem_ops::readLE_align<32>(p, endian, align) * PRIME<32>(3); + hash_ret = bit_ops::rotl<32>(hash_ret, 17) * PRIME<32>(4); + p += 4; + } + + while (p < bEnd) { + hash_ret += (*p) * PRIME<32>(5); + hash_ret = bit_ops::rotl<32>(hash_ret, 11) * PRIME<32>(1); + p++; + } + + hash_ret ^= hash_ret >> 15; + hash_ret *= PRIME<32>(2); + hash_ret ^= hash_ret >> 13; + hash_ret *= PRIME<32>(3); + hash_ret ^= hash_ret >> 16; + + return hash_ret; +} + +template <> +inline hash_t<64> endian_align_sub_ending<64>(hash_t<64> hash_ret, const uint8_t* p, const uint8_t* bEnd, + xxh::endianness endian, xxh::alignment align) +{ + while (p + 8 <= bEnd) { + const hash64_t k1 = round<64>(0, mem_ops::readLE_align<64>(p, endian, align)); + hash_ret ^= k1; + hash_ret = bit_ops::rotl<64>(hash_ret, 27) * PRIME<64>(1) + PRIME<64>(4); + p += 8; + } + + if (p + 4 <= bEnd) { + hash_ret ^= static_cast(mem_ops::readLE_align<32>(p, endian, align)) * PRIME<64>(1); + hash_ret = bit_ops::rotl<64>(hash_ret, 23) * PRIME<64>(2) + PRIME<64>(3); + p += 4; + } + + while (p < bEnd) { + hash_ret ^= (*p) * PRIME<64>(5); + hash_ret = bit_ops::rotl<64>(hash_ret, 11) * PRIME<64>(1); + p++; + } + + hash_ret ^= hash_ret >> 33; + hash_ret *= PRIME<64>(2); + hash_ret ^= hash_ret >> 29; + hash_ret *= PRIME<64>(3); + hash_ret ^= hash_ret >> 32; + + return hash_ret; +} + +template +inline hash_t endian_align(const void* input, size_t len, hash_t seed, xxh::endianness endian, + xxh::alignment align) +{ + static_assert(!(N != 32 && N != 64), "You can only call endian_align in 32 or 64 bit mode."); + + const uint8_t* p = static_cast(input); + const uint8_t* bEnd = p + len; + hash_t hash_ret; + + if (len >= (N / 2)) { + const uint8_t* const limit = bEnd - (N / 2); + hash_t v1 = seed + PRIME(1) + PRIME(2); + hash_t v2 = seed + PRIME(2); + hash_t v3 = seed + 0; + hash_t v4 = seed - PRIME(1); + + do { + v1 = round(v1, mem_ops::readLE_align(p, endian, align)); + p += (N / 8); + v2 = round(v2, mem_ops::readLE_align(p, endian, align)); + p += (N / 8); + v3 = round(v3, mem_ops::readLE_align(p, endian, align)); + p += (N / 8); + v4 = round(v4, mem_ops::readLE_align(p, endian, align)); + p += (N / 8); + } while (p <= limit); + + hash_ret = bit_ops::rotl(v1, 1) + bit_ops::rotl(v2, 7) + bit_ops::rotl(v3, 12) + bit_ops::rotl(v4, 18); + + endian_align_sub_mergeround(hash_ret, v1, v2, v3, v4); + } else { + hash_ret = seed + PRIME(5); + } + + hash_ret += static_cast>(len); + + return endian_align_sub_ending(hash_ret, p, bEnd, endian, align); +} +} // namespace detail + +template +hash_t xxhash(const void* input, size_t len, hash_t seed = 0, endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + return detail::endian_align(input, len, seed, mem_ops::get_endian(endian), mem_ops::get_alignment(input)); +} + +template +hash_t xxhash(const std::basic_string& input, hash_t seed = 0, endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + return detail::endian_align(static_cast(input.data()), input.length() * sizeof(T), seed, + mem_ops::get_endian(endian), + mem_ops::get_alignment(static_cast(input.data()))); +} + +template +hash_t xxhash(ContiguousIterator begin, ContiguousIterator end, hash_t seed = 0, + endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + using T = typename std::decay_t; + return detail::endian_align(static_cast(&*begin), (end - begin) * sizeof(T), seed, + mem_ops::get_endian(endian), + mem_ops::get_alignment(static_cast(&*begin))); +} + +template +hash_t xxhash(const std::vector& input, hash_t seed = 0, endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + return detail::endian_align(static_cast(input.data()), input.size() * sizeof(T), seed, + mem_ops::get_endian(endian), + mem_ops::get_alignment(static_cast(input.data()))); +} + +template +hash_t xxhash(const std::array& input, hash_t seed = 0, endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + return detail::endian_align(static_cast(input.data()), AN * sizeof(T), seed, + mem_ops::get_endian(endian), + mem_ops::get_alignment(static_cast(input.data()))); +} + +template +hash_t xxhash(const std::initializer_list& input, hash_t seed = 0, endianness endian = endianness::unspecified) +{ + static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); + return detail::endian_align(static_cast(input.begin()), input.size() * sizeof(T), seed, + mem_ops::get_endian(endian), + mem_ops::get_alignment(static_cast(input.begin()))); +} + +/* ******************************************************************* + * Hash streaming + *********************************************************************/ +enum class error_code : uint8_t { ok = 0, error }; + +template class hash_state_t { + uint64_t total_len = 0; + hash_t v1 = 0, v2 = 0, v3 = 0, v4 = 0; + std::array, 4> mem = {{0, 0, 0, 0}}; + uint32_t memsize = 0; + + inline error_code _update_impl(const void* input, size_t length, endianness endian) + { + const uint8_t* p = reinterpret_cast(input); + const uint8_t* const bEnd = p + length; + + if (!input) { + return xxh::error_code::error; + } + + total_len += length; + + if (memsize + length < (N / 2)) { /* fill in tmp buffer */ + memcpy(reinterpret_cast(mem.data()) + memsize, input, length); + memsize += static_cast(length); + return error_code::ok; + } + + if (memsize) { /* some data left from previous update */ + memcpy(reinterpret_cast(mem.data()) + memsize, input, (N / 2) - memsize); + + const hash_t* ptr = mem.data(); + v1 = detail::round(v1, mem_ops::readLE(ptr, endian)); + ptr++; + v2 = detail::round(v2, mem_ops::readLE(ptr, endian)); + ptr++; + v3 = detail::round(v3, mem_ops::readLE(ptr, endian)); + ptr++; + v4 = detail::round(v4, mem_ops::readLE(ptr, endian)); + + p += (N / 2) - memsize; + memsize = 0; + } + + if (p <= bEnd - (N / 2)) { + const uint8_t* const limit = bEnd - (N / 2); + + do { + v1 = detail::round(v1, mem_ops::readLE(p, endian)); + p += (N / 8); + v2 = detail::round(v2, mem_ops::readLE(p, endian)); + p += (N / 8); + v3 = detail::round(v3, mem_ops::readLE(p, endian)); + p += (N / 8); + v4 = detail::round(v4, mem_ops::readLE(p, endian)); + p += (N / 8); + } while (p <= limit); + } + + if (p < bEnd) { + memcpy(mem.data(), p, static_cast(bEnd - p)); + memsize = static_cast(bEnd - p); + } + + return error_code::ok; + } + + inline hash_t _digest_impl(endianness endian) const + { + const uint8_t* p = reinterpret_cast(mem.data()); + const uint8_t* const bEnd = reinterpret_cast(mem.data()) + memsize; + hash_t hash_ret; + + if (total_len > (N / 2)) { + hash_ret = + bit_ops::rotl(v1, 1) + bit_ops::rotl(v2, 7) + bit_ops::rotl(v3, 12) + bit_ops::rotl(v4, 18); + + detail::endian_align_sub_mergeround(hash_ret, v1, v2, v3, v4); + } else { + hash_ret = v3 + detail::PRIME(5); + } + + hash_ret += static_cast>(total_len); + + return detail::endian_align_sub_ending(hash_ret, p, bEnd, endian, alignment::unaligned); + } + +public: + hash_state_t(hash_t seed = 0) + { + static_assert(!(N != 32 && N != 64), "You can only stream hashing in 32 or 64 bit mode."); + v1 = seed + detail::PRIME(1) + detail::PRIME(2); + v2 = seed + detail::PRIME(2); + v3 = seed + 0; + v4 = seed - detail::PRIME(1); + }; + + hash_state_t operator=(hash_state_t& other) { memcpy(this, other, sizeof(hash_state_t)); } + + error_code reset(hash_t seed = 0) + { + memset(this, 0, sizeof(hash_state_t)); + v1 = seed + detail::PRIME(1) + detail::PRIME(2); + v2 = seed + detail::PRIME(2); + v3 = seed + 0; + v4 = seed - detail::PRIME(1); + return error_code::ok; + } + + error_code update(const void* input, size_t length, endianness endian = endianness::unspecified) + { + return _update_impl(input, length, mem_ops::get_endian(endian)); + } + + template + error_code update(const std::basic_string& input, endianness endian = endianness::unspecified) + { + return _update_impl(static_cast(input.data()), input.length() * sizeof(T), + mem_ops::get_endian(endian)); + } + + template + error_code update(ContiguousIterator begin, ContiguousIterator end, endianness endian = endianness::unspecified) + { + using T = typename std::decay_t; + return _update_impl(static_cast(&*begin), (end - begin) * sizeof(T), mem_ops::get_endian(endian)); + } + + template error_code update(const std::vector& input, endianness endian = endianness::unspecified) + { + return _update_impl(static_cast(input.data()), input.size() * sizeof(T), mem_ops::get_endian(endian)); + } + + template + error_code update(const std::array& input, endianness endian = endianness::unspecified) + { + return _update_impl(static_cast(input.data()), AN * sizeof(T), mem_ops::get_endian(endian)); + } + + template + error_code update(const std::initializer_list& input, endianness endian = endianness::unspecified) + { + return _update_impl(static_cast(input.begin()), input.size() * sizeof(T), mem_ops::get_endian(endian)); + } + + hash_t digest(endianness endian = endianness::unspecified) { return _digest_impl(mem_ops::get_endian(endian)); } +}; + +using hash_state32_t = hash_state_t<32>; +using hash_state64_t = hash_state_t<64>; + +/* ******************************************************************* + * Canonical + *********************************************************************/ + +template struct canonical_t { + std::array digest; + + canonical_t(hash_t hash) + { + if (mem_ops::is_little_endian()) { + hash = bit_ops::swap(hash); + } + memcpy(digest.data(), &hash, sizeof(canonical_t)); + } + + hash_t get_hash() const { return mem_ops::readBE(&digest); } +}; + +using canonical32_t = canonical_t<32>; +using canonical64_t = canonical_t<64>; +} // namespace xxh diff --git a/src/simix/libsmx.cpp b/src/deprecated.cpp similarity index 70% rename from src/simix/libsmx.cpp rename to src/deprecated.cpp index febed111d6..79b6a897b0 100644 --- a/src/simix/libsmx.cpp +++ b/src/deprecated.cpp @@ -1,9 +1,4 @@ -/* libsmx.c - public interface to simix */ -/* -------- */ -/* These functions are the only ones that are visible from the higher levels */ -/* (most of them simply add some documentation to the generated simcall body) */ -/* */ -/* This is somehow the "libc" of SimGrid */ +/* This file only contains deprecated code, and will die with v3.25 */ /* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved. */ @@ -21,8 +16,6 @@ #define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335) #include -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_simcall, kernel, "transmuting from user request into kernel handlers"); - void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), @@ -137,57 +130,3 @@ bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm) // XBT_ATT } return false; } - -static void simcall(simgrid::kernel::actor::Simcall::Type call, std::function const& code, - simgrid::kernel::actor::SimcallObserver* observer) -{ - auto self = simgrid::kernel::actor::ActorImpl::self(); - self->simcall_.call_ = call; - self->simcall_.code_ = &code; - self->simcall_.observer_ = observer; - if (simgrid::kernel::EngineImpl::get_instance()->is_maestro(self)) { - self->simcall_handle(0); - } else { - XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), self->simcall_.get_cname()); - self->yield(); - } - self->simcall_.observer_ = nullptr; -} - -void simcall_run_answered(std::function const& code, simgrid::kernel::actor::SimcallObserver* observer) -{ - // The function `code` is called in kernel mode (either because we are already in maestor or after a context switch) - // and simcall_answer() is called - simcall(simgrid::kernel::actor::Simcall::Type::RUN_ANSWERED, code, observer); -} - -void simcall_run_blocking(std::function const& code, simgrid::kernel::actor::SimcallObserver* observer) -{ - // The function `code` is called in kernel mode (either because we are already in maestor or after a context switch) - // BUT simcall_answer IS NOT CALLED - simcall(simgrid::kernel::actor::Simcall::Type::RUN_BLOCKING, code, observer); -} - -void simcall_run_object_access(std::function const& code, simgrid::kernel::actor::ObjectAccessSimcallItem* item) -{ - auto self = simgrid::kernel::actor::ActorImpl::self(); - - // We only need a simcall if the order of the setters is important (parallel run or MC execution). - // Otherwise, just call the function with no simcall - - if (simgrid::kernel::context::Context::is_parallel() -#if SIMGRID_HAVE_MC - || MC_is_active() || MC_record_replay_is_active() -#endif - ) { - simgrid::kernel::actor::ObjectAccessSimcallObserver observer{self, item}; - simcall(simgrid::kernel::actor::Simcall::Type::RUN_ANSWERED, code, &observer); - item->take_ownership(); - } else { - // don't return from the context-switch we don't do - self->simcall_.call_ = simgrid::kernel::actor::Simcall::Type::RUN_BLOCKING; - self->simcall_.code_ = &code; - self->simcall_.observer_ = nullptr; - self->simcall_handle(0); - } -} diff --git a/src/include/xxhash.hpp b/src/include/xxhash.hpp deleted file mode 100644 index 14d43efa19..0000000000 --- a/src/include/xxhash.hpp +++ /dev/null @@ -1,725 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include - -#include - -/* -xxHash - Extremely Fast Hash algorithm -Header File -Copyright (C) 2012-2018, Yann Collet. -Copyright (C) 2017-2018, Piotr Pliszka. -All rights reserved. - -BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -You can contact the author at : -- xxHash source repository : https://github.com/Cyan4973/xxHash -- xxHash C++ port repository : https://github.com/RedSpah/xxhash_cpp -*/ - -/* ************************************* -* Tuning parameters -***************************************/ -/*!XXH_FORCE_MEMORY_ACCESS : -* By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. -* Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. -* The below switch allow to select different access method for improved performance. -* Method 0 (default) : use `memcpy()`. Safe and portable. -* Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). -* This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. -* Method 2 : direct access. This method doesn't depend on compiler but violate C standard. -* It can generate buggy code on targets which do not support unaligned memory accesses. -* But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) -* See http://stackoverflow.com/a/32095106/646947 for details. -* Prefer these methods in priority order (0 > 1 > 2) -*/ -#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ -# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) -# define XXH_FORCE_MEMORY_ACCESS 2 -# elif defined(__INTEL_COMPILER) || (defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) )) -# define XXH_FORCE_MEMORY_ACCESS 1 -# endif -#endif - - -/*!XXH_FORCE_NATIVE_FORMAT : -* By default, xxHash library provides endian-independent Hash values, based on little-endian convention. -* Results are therefore identical for little-endian and big-endian CPU. -* This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. -* Should endian-independence be of no importance for your application, you may set the #define below to 1, -* to improve speed for Big-endian CPU. -* This option has no impact on Little_Endian CPU. -*/ -#if !defined(XXH_FORCE_NATIVE_FORMAT) || (XXH_FORCE_NATIVE_FORMAT == 0) /* can be defined externally */ -# define XXH_FORCE_NATIVE_FORMAT 0 -# define XXH_CPU_LITTLE_ENDIAN 1 -#endif - - -/*!XXH_FORCE_ALIGN_CHECK : -* This is a minor performance trick, only useful with lots of very small keys. -* It means : check for aligned/unaligned input. -* The check costs one initial branch per hash; -* set it to 0 when the input is guaranteed to be aligned, -* or when alignment doesn't matter for performance. -*/ -#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ -# if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) -# define XXH_FORCE_ALIGN_CHECK 0 -# else -# define XXH_FORCE_ALIGN_CHECK 1 -# endif -#endif - -/*!XXH_CPU_LITTLE_ENDIAN : -* This is a CPU endian detection macro, will be -* automatically set to 1 (little endian) if XXH_FORCE_NATIVE_FORMAT -* is left undefined, XXH_FORCE_NATIVE_FORMAT is defined to 0, or if an x86/x86_64 compiler macro is defined. -* If left undefined, endianness will be determined at runtime, at the cost of a slight one-time overhead -* and a larger overhead due to get_endian() not being constexpr. -*/ -#ifndef XXH_CPU_LITTLE_ENDIAN -# if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) -# define XXH_CPU_LITTLE_ENDIAN 1 -# endif -#endif - -/* ************************************* -* Compiler Specific Options -***************************************/ -#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) - -namespace xxh -{ - /* ************************************* - * Version - ***************************************/ - constexpr int cpp_version_major = 0; - constexpr int cpp_version_minor = 6; - constexpr int cpp_version_release = 5; - constexpr uint32_t version_number() { return cpp_version_major * 10000 + cpp_version_minor * 100 + cpp_version_release; } - - namespace hash_t_impl - { - /* ************************************* - * Basic Types - Detail - ***************************************/ - - using _hash32_underlying = uint32_t; - using _hash64_underlying = uint64_t; - - template - struct hash_type { using type = void; }; - template <> - struct hash_type<32> { using type = _hash32_underlying; }; - template <> - struct hash_type<64> { using type = _hash64_underlying; }; - } - - /* ************************************* - * Basic Types - Public - ***************************************/ - - template - using hash_t = typename hash_t_impl::hash_type::type; - using hash32_t = hash_t<32>; - using hash64_t = hash_t<64>; - - /* ************************************* - * Bit Functions - Public - ***************************************/ - - namespace bit_ops - { - /* **************************************** - * Intrinsics and Bit Operations - ******************************************/ - -#if defined(_MSC_VER) - inline uint32_t rotl32(uint32_t x, int32_t r) { return _rotl(x, r); } - inline uint64_t rotl64(uint64_t x, int32_t r) { return _rotl64(x, r); } -#else - inline uint32_t rotl32(uint32_t x, int32_t r) { return ((x << r) | (x >> (32 - r))); } - inline uint64_t rotl64(uint64_t x, int32_t r) { return ((x << r) | (x >> (64 - r))); } -#endif - -#if defined(_MSC_VER) /* Visual Studio */ - inline uint32_t swap32(uint32_t x) { return _byteswap_ulong(x); } - inline uint64_t swap64(uint64_t x) { return _byteswap_uint64(x); } -#elif XXH_GCC_VERSION >= 403 - inline uint32_t swap32(uint32_t x) { return __builtin_bswap32(x); } - inline uint64_t swap64(uint64_t x) { return __builtin_bswap64(x); } -#else - inline uint32_t swap32(uint32_t x) { return ((x << 24) & 0xff000000) | ((x << 8) & 0x00ff0000) | ((x >> 8) & 0x0000ff00) | ((x >> 24) & 0x000000ff); } - inline uint64_t swap64(uint64_t x) { return ((x << 56) & 0xff00000000000000ULL) | ((x << 40) & 0x00ff000000000000ULL) | ((x << 24) & 0x0000ff0000000000ULL) | ((x << 8) & 0x000000ff00000000ULL) | ((x >> 8) & 0x00000000ff000000ULL) | ((x >> 24) & 0x0000000000ff0000ULL) | ((x >> 40) & 0x000000000000ff00ULL) | ((x >> 56) & 0x00000000000000ffULL); } -#endif - template - inline hash_t rotl(hash_t n, int32_t r) {}; - - template <> - inline hash_t<32> rotl<32>(hash_t<32> n, int32_t r) - { - return rotl32(n, r); - }; - - template <> - inline hash_t<64> rotl<64>(hash_t<64> n, int32_t r) - { - return rotl64(n, r); - }; - - template - inline hash_t swap(hash_t n) {}; - - template <> - inline hash_t<32> swap<32>(hash_t<32> n) - { - return swap32(n); - }; - - template <> - inline hash_t<64> swap<64>(hash_t<64> n) - { - return swap64(n); - }; - } - - /* ************************************* - * Memory Functions - Public - ***************************************/ - - enum class alignment : uint8_t { aligned, unaligned }; - enum class endianness : uint8_t { big_endian = 0, little_endian = 1, unspecified = 2 }; - - namespace mem_ops - { - /* ************************************* - * Memory Access - ***************************************/ -#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) - - /* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ - template - inline hash_t read_unaligned(const void* memPtr) { return *(const hash_t*)memPtr; } - -#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) - - /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ - /* currently only defined for gcc and icc */ - template - using unalign = union { hash_t uval; } __attribute((packed)); - - template - inline hash_t read_unaligned(const void* memPtr) { return ((const unalign*)memPtr)->uval; } -#else - - /* portable and safe solution. Generally efficient. - * see : http://stackoverflow.com/a/32095106/646947 - */ - template - inline hash_t read_unaligned(const void* memPtr) - { - hash_t val; - memcpy(&val, memPtr, sizeof(val)); - return val; - } - -#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ - - inline hash_t<32> read32(const void* memPtr) { return read_unaligned<32>(memPtr); } - inline hash_t<64> read64(const void* memPtr) { return read_unaligned<64>(memPtr); } - - /* ************************************* - * Architecture Macros - ***************************************/ - - /* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example on the compiler command line */ - -#ifndef XXH_CPU_LITTLE_ENDIAN - - inline endianness get_endian(endianness endian) - { - static struct _dummy_t - { - std::array endian_lookup = { endianness::big_endian, endianness::little_endian, endianness::unspecified }; - const int g_one = 1; - _dummy_t() - { - endian_lookup[2] = static_cast(*(const char*)(&g_one)); - } - } _dummy; - - return _dummy.endian_lookup[(uint8_t)endian]; - } - - inline bool is_little_endian() - { - return get_endian(endianness::unspecified) == endianness::little_endian; - } - -#else - constexpr endianness get_endian(endianness endian) - { - constexpr std::array endian_lookup = {{ endianness::big_endian, endianness::little_endian, (XXH_CPU_LITTLE_ENDIAN) ? endianness::little_endian : endianness::big_endian }}; - return endian_lookup[static_cast(endian)]; - } - - constexpr bool is_little_endian() - { - return get_endian(endianness::unspecified) == endianness::little_endian; - } - -#endif - - - - /* *************************** - * Memory reads - *****************************/ - - - template - inline hash_t readLE_align(const void* ptr, endianness endian, alignment align) - { - if (align == alignment::unaligned) - { - return endian == endianness::little_endian ? read_unaligned(ptr) : bit_ops::swap(read_unaligned(ptr)); - } - else - { - return endian == endianness::little_endian ? *reinterpret_cast*>(ptr) : bit_ops::swap(*reinterpret_cast*>(ptr)); - } - } - - template - inline hash_t readLE(const void* ptr, endianness endian) - { - return readLE_align(ptr, endian, alignment::unaligned); - } - - template - inline hash_t readBE(const void* ptr) - { - return is_little_endian() ? bit_ops::swap(read_unaligned(ptr)) : read_unaligned(ptr); - } - - template - inline alignment get_alignment(const void* input) - { - return ((XXH_FORCE_ALIGN_CHECK) && ((reinterpret_cast(input) & ((N / 8) - 1)) == 0)) ? xxh::alignment::aligned : xxh::alignment::unaligned; - } - } - - /* ******************************************************************* - * Hash functions - *********************************************************************/ - - namespace detail - { - /* ******************************************************************* - * Hash functions - Implementation - *********************************************************************/ - - constexpr static std::array primes32 = {{ 2654435761U, 2246822519U, 3266489917U, 668265263U, 374761393U }}; - constexpr static std::array primes64 = {{ 11400714785074694791ULL, 14029467366897019727ULL, 1609587929392839161ULL, 9650029242287828579ULL, 2870177450012600261ULL }}; - - template - constexpr hash_t PRIME(int32_t n) {}; - - template <> - constexpr hash32_t PRIME<32>(int32_t n) - { - return primes32[n - 1]; - } - - template <> - constexpr hash64_t PRIME<64>(int32_t n) - { - return primes64[n - 1]; - } - - template - inline hash_t round(hash_t seed, hash_t input) - { - seed += input * PRIME(2); - seed = bit_ops::rotl(seed, ((N == 32) ? 13 : 31)); - seed *= PRIME(1); - return seed; - } - - inline hash64_t mergeRound64(hash64_t acc, hash64_t val) - { - val = round<64>(0, val); - acc ^= val; - acc = acc * PRIME<64>(1) + PRIME<64>(4); - return acc; - } - - template - inline void endian_align_sub_mergeround( -#if __cplusplus < 201703L - __attribute__((unused)) -#else - [[maybe_unused]] -#endif - hash_t& hash_ret, hash_t v1, hash_t v2, hash_t v3, hash_t v4) {}; - - template <> - inline void endian_align_sub_mergeround<64>(hash_t<64>& hash_ret, hash_t<64> v1, hash_t<64> v2, hash_t<64> v3, hash_t<64> v4) - { - hash_ret = mergeRound64(hash_ret, v1); - hash_ret = mergeRound64(hash_ret, v2); - hash_ret = mergeRound64(hash_ret, v3); - hash_ret = mergeRound64(hash_ret, v4); - } - - template - inline hash_t endian_align_sub_ending(hash_t hash_ret, const uint8_t* p, const uint8_t* bEnd, xxh::endianness endian, xxh::alignment align) {}; - - template <> - inline hash_t<32> endian_align_sub_ending<32>(hash_t<32> hash_ret, const uint8_t* p, const uint8_t* bEnd, xxh::endianness endian, xxh::alignment align) - { - while ((p + 4) <= bEnd) - { - hash_ret += mem_ops::readLE_align<32>(p, endian, align) * PRIME<32>(3); - hash_ret = bit_ops::rotl<32>(hash_ret, 17) * PRIME<32>(4); - p += 4; - } - - while (p < bEnd) - { - hash_ret += (*p) * PRIME<32>(5); - hash_ret = bit_ops::rotl<32>(hash_ret, 11) * PRIME<32>(1); - p++; - } - - hash_ret ^= hash_ret >> 15; - hash_ret *= PRIME<32>(2); - hash_ret ^= hash_ret >> 13; - hash_ret *= PRIME<32>(3); - hash_ret ^= hash_ret >> 16; - - return hash_ret; - } - - template <> - inline hash_t<64> endian_align_sub_ending<64>(hash_t<64> hash_ret, const uint8_t* p, const uint8_t* bEnd, xxh::endianness endian, xxh::alignment align) - { - while (p + 8 <= bEnd) - { - const hash64_t k1 = round<64>(0, mem_ops::readLE_align<64>(p, endian, align)); - hash_ret ^= k1; - hash_ret = bit_ops::rotl<64>(hash_ret, 27) * PRIME<64>(1) + PRIME<64>(4); - p += 8; - } - - if (p + 4 <= bEnd) - { - hash_ret ^= static_cast(mem_ops::readLE_align<32>(p, endian, align)) * PRIME<64>(1); - hash_ret = bit_ops::rotl<64>(hash_ret, 23) * PRIME<64>(2) + PRIME<64>(3); - p += 4; - } - - while (p < bEnd) - { - hash_ret ^= (*p) * PRIME<64>(5); - hash_ret = bit_ops::rotl<64>(hash_ret, 11) * PRIME<64>(1); - p++; - } - - hash_ret ^= hash_ret >> 33; - hash_ret *= PRIME<64>(2); - hash_ret ^= hash_ret >> 29; - hash_ret *= PRIME<64>(3); - hash_ret ^= hash_ret >> 32; - - return hash_ret; - } - - template - inline hash_t endian_align(const void* input, size_t len, hash_t seed, xxh::endianness endian, xxh::alignment align) - { - static_assert(!(N != 32 && N != 64), "You can only call endian_align in 32 or 64 bit mode."); - - const uint8_t* p = static_cast(input); - const uint8_t* bEnd = p + len; - hash_t hash_ret; - - if (len >= (N / 2)) - { - const uint8_t* const limit = bEnd - (N / 2); - hash_t v1 = seed + PRIME(1) + PRIME(2); - hash_t v2 = seed + PRIME(2); - hash_t v3 = seed + 0; - hash_t v4 = seed - PRIME(1); - - do - { - v1 = round(v1, mem_ops::readLE_align(p, endian, align)); p += (N / 8); - v2 = round(v2, mem_ops::readLE_align(p, endian, align)); p += (N / 8); - v3 = round(v3, mem_ops::readLE_align(p, endian, align)); p += (N / 8); - v4 = round(v4, mem_ops::readLE_align(p, endian, align)); p += (N / 8); - } while (p <= limit); - - hash_ret = bit_ops::rotl(v1, 1) + bit_ops::rotl(v2, 7) + bit_ops::rotl(v3, 12) + bit_ops::rotl(v4, 18); - - endian_align_sub_mergeround(hash_ret, v1, v2, v3, v4); - } - else { hash_ret = seed + PRIME(5); } - - hash_ret += static_cast>(len); - - return endian_align_sub_ending(hash_ret, p, bEnd, endian, align); - } - } - - template - hash_t xxhash(const void* input, size_t len, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - return detail::endian_align(input, len, seed, mem_ops::get_endian(endian), mem_ops::get_alignment(input)); - } - - template - hash_t xxhash(const std::basic_string& input, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - return detail::endian_align(static_cast(input.data()), input.length() * sizeof(T), seed, mem_ops::get_endian(endian), mem_ops::get_alignment(static_cast(input.data()))); - } - - template - hash_t xxhash(ContiguousIterator begin, ContiguousIterator end, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - using T = typename std::decay_t; - return detail::endian_align(static_cast(&*begin), (end - begin) * sizeof(T), seed, mem_ops::get_endian(endian), mem_ops::get_alignment(static_cast(&*begin))); - } - - template - hash_t xxhash(const std::vector& input, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - return detail::endian_align(static_cast(input.data()), input.size() * sizeof(T), seed, mem_ops::get_endian(endian), mem_ops::get_alignment(static_cast(input.data()))); - } - - template - hash_t xxhash(const std::array& input, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - return detail::endian_align(static_cast(input.data()), AN * sizeof(T), seed, mem_ops::get_endian(endian), mem_ops::get_alignment(static_cast(input.data()))); - } - - template - hash_t xxhash(const std::initializer_list& input, hash_t seed = 0, endianness endian = endianness::unspecified) - { - static_assert(!(N != 32 && N != 64), "You can only call xxhash in 32 or 64 bit mode."); - return detail::endian_align(static_cast(input.begin()), input.size() * sizeof(T), seed, mem_ops::get_endian(endian), mem_ops::get_alignment(static_cast(input.begin()))); - } - - - /* ******************************************************************* - * Hash streaming - *********************************************************************/ - enum class error_code : uint8_t { ok = 0, error }; - - template - class hash_state_t - { - uint64_t total_len = 0; - hash_t v1 = 0, v2 = 0, v3 = 0, v4 = 0; - std::array, 4> mem = {{ 0,0,0,0 }}; - uint32_t memsize = 0; - - inline error_code _update_impl(const void* input, size_t length, endianness endian) - { - const uint8_t* p = reinterpret_cast(input); - const uint8_t* const bEnd = p + length; - - if (!input) { return xxh::error_code::error; } - - total_len += length; - - if (memsize + length < (N / 2)) - { /* fill in tmp buffer */ - memcpy(reinterpret_cast(mem.data()) + memsize, input, length); - memsize += static_cast(length); - return error_code::ok; - } - - if (memsize) - { /* some data left from previous update */ - memcpy(reinterpret_cast(mem.data()) + memsize, input, (N / 2) - memsize); - - const hash_t* ptr = mem.data(); - v1 = detail::round(v1, mem_ops::readLE(ptr, endian)); ptr++; - v2 = detail::round(v2, mem_ops::readLE(ptr, endian)); ptr++; - v3 = detail::round(v3, mem_ops::readLE(ptr, endian)); ptr++; - v4 = detail::round(v4, mem_ops::readLE(ptr, endian)); - - p += (N / 2) - memsize; - memsize = 0; - } - - if (p <= bEnd - (N / 2)) - { - const uint8_t* const limit = bEnd - (N / 2); - - do - { - v1 = detail::round(v1, mem_ops::readLE(p, endian)); p += (N / 8); - v2 = detail::round(v2, mem_ops::readLE(p, endian)); p += (N / 8); - v3 = detail::round(v3, mem_ops::readLE(p, endian)); p += (N / 8); - v4 = detail::round(v4, mem_ops::readLE(p, endian)); p += (N / 8); - } while (p <= limit); - } - - if (p < bEnd) - { - memcpy(mem.data(), p, static_cast(bEnd - p)); - memsize = static_cast(bEnd - p); - } - - return error_code::ok; - } - - inline hash_t _digest_impl(endianness endian) const - { - const uint8_t* p = reinterpret_cast(mem.data()); - const uint8_t* const bEnd = reinterpret_cast(mem.data()) + memsize; - hash_t hash_ret; - - if (total_len > (N / 2)) - { - hash_ret = bit_ops::rotl(v1, 1) + bit_ops::rotl(v2, 7) + bit_ops::rotl(v3, 12) + bit_ops::rotl(v4, 18); - - detail::endian_align_sub_mergeround(hash_ret, v1, v2, v3, v4); - } - else { hash_ret = v3 + detail::PRIME(5); } - - hash_ret += static_cast>(total_len); - - return detail::endian_align_sub_ending(hash_ret, p, bEnd, endian, alignment::unaligned); - } - - public: - hash_state_t(hash_t seed = 0) - { - static_assert(!(N != 32 && N != 64), "You can only stream hashing in 32 or 64 bit mode."); - v1 = seed + detail::PRIME(1) + detail::PRIME(2); - v2 = seed + detail::PRIME(2); - v3 = seed + 0; - v4 = seed - detail::PRIME(1); - }; - - hash_state_t operator=(hash_state_t& other) - { - memcpy(this, other, sizeof(hash_state_t)); - } - - error_code reset(hash_t seed = 0) - { - memset(this, 0, sizeof(hash_state_t)); - v1 = seed + detail::PRIME(1) + detail::PRIME(2); - v2 = seed + detail::PRIME(2); - v3 = seed + 0; - v4 = seed - detail::PRIME(1); - return error_code::ok; - } - - error_code update(const void* input, size_t length, endianness endian = endianness::unspecified) - { - return _update_impl(input, length, mem_ops::get_endian(endian)); - } - - template - error_code update(const std::basic_string& input, endianness endian = endianness::unspecified) - { - return _update_impl(static_cast(input.data()), input.length() * sizeof(T), mem_ops::get_endian(endian)); - } - - template - error_code update(ContiguousIterator begin, ContiguousIterator end, endianness endian = endianness::unspecified) - { - using T = typename std::decay_t; - return _update_impl(static_cast(&*begin), (end - begin) * sizeof(T), mem_ops::get_endian(endian)); - } - - template - error_code update(const std::vector& input, endianness endian = endianness::unspecified) - { - return _update_impl(static_cast(input.data()), input.size() * sizeof(T), mem_ops::get_endian(endian)); - } - - template - error_code update(const std::array& input, endianness endian = endianness::unspecified) - { - return _update_impl(static_cast(input.data()), AN * sizeof(T), mem_ops::get_endian(endian)); - } - - template - error_code update(const std::initializer_list& input, endianness endian = endianness::unspecified) - { - return _update_impl(static_cast(input.begin()), input.size() * sizeof(T), mem_ops::get_endian(endian)); - } - - hash_t digest(endianness endian = endianness::unspecified) - { - return _digest_impl(mem_ops::get_endian(endian)); - } - }; - - using hash_state32_t = hash_state_t<32>; - using hash_state64_t = hash_state_t<64>; - - - /* ******************************************************************* - * Canonical - *********************************************************************/ - - template - struct canonical_t - { - std::array digest;\ - - - - canonical_t(hash_t hash) - { - if (mem_ops::is_little_endian()) { hash = bit_ops::swap(hash); } - memcpy(digest.data(), &hash, sizeof(canonical_t)); - } - - hash_t get_hash() const - { - return mem_ops::readBE(&digest); - } - }; - - using canonical32_t = canonical_t<32>; - using canonical64_t = canonical_t<64>; -} diff --git a/src/instr/instr_paje_events.cpp b/src/instr/instr_paje_events.cpp index 2ffdd9fa58..f908770f1f 100644 --- a/src/instr/instr_paje_events.cpp +++ b/src/instr/instr_paje_events.cpp @@ -6,7 +6,6 @@ #include "src/instr/instr_private.hpp" #include "src/instr/instr_smpi.hpp" #include "src/smpi/include/private.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/ex.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_events, instr, "Paje tracing event system (events)"); diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index f979beb1f5..abf4956af2 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -5,9 +5,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/Exception.hpp" -#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" #include "src/instr/instr_smpi.hpp" +#include "src/simgrid/sg_config.hpp" #include "src/smpi/include/private.hpp" #include diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index b2c01c9980..5ceb130dab 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -16,7 +16,6 @@ #include "src/instr/instr_private.hpp" #include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/surf_interface.hpp" #include diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index c27e814ea9..1547836e44 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -8,18 +8,19 @@ #include #include #include -#include -#include "mc/mc.h" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include "src/kernel/resource/profile/Profile.hpp" +#include "src/kernel/xml/platf.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_record.hpp" #include "src/mc/mc_replay.hpp" +#include "src/simgrid/math_utils.h" +#include "src/simgrid/sg_config.hpp" #include "src/smpi/include/smpi_actor.hpp" -#include "src/surf/xml/platf.hpp" +#include "src/xbt/xbt_modinter.h" /* whether initialization was already done */ #include "xbt/module.h" -#include "xbt/xbt_modinter.h" /* whether initialization was already done */ #include #include @@ -184,7 +185,7 @@ void EngineImpl::initialize(int* argc, char** argv) install_signal_handlers(); - /* register a function to be called by SURF after the environment creation */ + /* register a function to be called after the environment creation */ s4u::Engine::on_platform_created_cb([this]() { this->presolve(); }); if (config::get_value("debug/clean-atexit")) @@ -313,9 +314,9 @@ void EngineImpl::load_deployment(const std::string& file) const { sg_platf_parser_finalize(); - surf_parse_open(file); - surf_parse(); - surf_parse_close(); + simgrid_parse_open(file); + simgrid_parse(); + simgrid_parse_close(); } void EngineImpl::register_function(const std::string& name, const actor::ActorCodeFactory& code) @@ -341,7 +342,7 @@ void EngineImpl::add_model(std::shared_ptr model, const std::ve models_prio_[model_name] = std::move(model); } -/** Wake up all actors waiting for a Surf action to finish */ +/** Wake up all actors waiting for an action to finish */ void EngineImpl::handle_ended_actions() const { for (auto const& model : models_) { @@ -551,13 +552,12 @@ double EngineImpl::solve(double max_date) const while (auto* event = profile::future_evt_set.pop_leq(next_event_date, &value, &resource)) { if(value<0) continue; - if (resource->is_used() || (watched_hosts().find(resource->get_cname()) != watched_hosts().end())) { + if (resource->is_used()) { time_delta = next_event_date - now_; XBT_DEBUG("This event invalidates the next_occurring_event() computation of models. Next event set to %f", time_delta); } - // FIXME: I'm too lame to update now_ live, so I change it and restore it so that the real update with surf_min - // will work + // FIXME: I'm too lame to update now_ live, so I change it and restore it so that the real update works double round_start = now_; now_ = next_event_date; /* update state of the corresponding resource to the new value. Does not touch lmm. diff --git a/src/kernel/activity/ActivityImpl.cpp b/src/kernel/activity/ActivityImpl.cpp index b16a24b7c9..5d7c92222a 100644 --- a/src/kernel/activity/ActivityImpl.cpp +++ b/src/kernel/activity/ActivityImpl.cpp @@ -44,15 +44,15 @@ void ActivityImpl::unregister_simcall(actor::Simcall* simcall) void ActivityImpl::clean_action() { - if (surf_action_) { - surf_action_->unref(); - surf_action_ = nullptr; + if (model_action_) { + model_action_->unref(); + model_action_ = nullptr; } } double ActivityImpl::get_remaining() const { - return surf_action_ ? surf_action_->get_remains() : 0; + return model_action_ ? model_action_->get_remains() : 0; } const char* ActivityImpl::get_state_str() const @@ -176,27 +176,27 @@ void ActivityImpl::wait_any_for(actor::ActorImpl* issuer, const std::vectorget_remains()); - surf_action_->suspend(); + XBT_VERB("This activity is suspended (remain: %f)", model_action_->get_remains()); + model_action_->suspend(); s4u::Activity::on_suspended(*get_iface()); } void ActivityImpl::resume() { - if (surf_action_ == nullptr) + if (model_action_ == nullptr) return; - XBT_VERB("This activity is resumed (remain: %f)", surf_action_->get_remains()); - surf_action_->resume(); + XBT_VERB("This activity is resumed (remain: %f)", model_action_->get_remains()); + model_action_->resume(); s4u::Activity::on_resumed(*get_iface()); } void ActivityImpl::cancel() { XBT_VERB("Activity %p is canceled", this); - if (surf_action_ != nullptr) - surf_action_->cancel(); + if (model_action_ != nullptr) + model_action_->cancel(); state_ = State::CANCELED; } diff --git a/src/kernel/activity/ActivityImpl.hpp b/src/kernel/activity/ActivityImpl.hpp index ceaea01e6f..d974e2963f 100644 --- a/src/kernel/activity/ActivityImpl.hpp +++ b/src/kernel/activity/ActivityImpl.hpp @@ -35,8 +35,8 @@ public: virtual ~ActivityImpl(); ActivityImpl() = default; std::list simcalls_; /* List of simcalls waiting for this activity */ - s4u::Activity* piface_ = nullptr; - resource::Action* surf_action_ = nullptr; + s4u::Activity* piface_ = nullptr; + resource::Action* model_action_ = nullptr; /* The resource consumption in the used model */ protected: void inline set_name(std::string_view name) diff --git a/src/kernel/activity/BarrierImpl.hpp b/src/kernel/activity/BarrierImpl.hpp index be2017b0bb..dd59753329 100644 --- a/src/kernel/activity/BarrierImpl.hpp +++ b/src/kernel/activity/BarrierImpl.hpp @@ -33,7 +33,7 @@ public: bool test(actor::ActorImpl* issuer = nullptr) override; void wait_for(actor::ActorImpl* issuer, double timeout) override; void post() override - { /*no surf action*/ + { /* no model action */ } void finish() override; void set_exception(actor::ActorImpl* issuer) override diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 27055bc841..96439ae8bb 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -121,21 +121,21 @@ CommImpl* CommImpl::start() /* Getting the network_model from the origin host * Valid while we have a single network model, otherwise we would need to change this function to first get the - * routes and later create the respective surf actions */ + * routes and later create the respective model actions */ auto net_model = from_->get_netpoint()->get_englobing_zone()->get_network_model(); - surf_action_ = net_model->communicate(from_, to_, size_, rate_, false); - surf_action_->set_activity(this); - surf_action_->set_category(get_tracing_category()); - set_start_time(surf_action_->get_start_time()); + model_action_ = net_model->communicate(from_, to_, size_, rate_, false); + model_action_->set_activity(this); + model_action_->set_category(get_tracing_category()); + set_start_time(model_action_->get_start_time()); set_state(State::RUNNING); on_start(*this); - XBT_DEBUG("Starting communication %p from '%s' to '%s' (surf_action: %p; state: %s)", this, from_->get_cname(), - to_->get_cname(), surf_action_, get_state_str()); + XBT_DEBUG("Starting communication %p from '%s' to '%s' (model action: %p; state: %s)", this, from_->get_cname(), + to_->get_cname(), model_action_, get_state_str()); /* If a link is failed, detect it immediately */ - if (surf_action_->get_state() == resource::Action::State::FAILED) { + if (model_action_->get_state() == resource::Action::State::FAILED) { XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure", from_->get_cname(), to_->get_cname()); set_state(State::LINK_FAILURE); @@ -154,7 +154,7 @@ CommImpl* CommImpl::start() "communication", dst_actor_->get_cname(), dst_actor_->get_host()->get_cname()); - surf_action_->suspend(); + model_action_->suspend(); } } @@ -282,7 +282,7 @@ ActivityImplPtr CommImpl::irecv(actor::CommIrecvSimcall* observer) // find a match in the list of already received comms other_comm = mbox->find_matching_comm(CommImplType::SEND, observer->get_match_fun(), observer->get_payload(), this_synchro, /*done*/ true, /*remove_matching*/ true); - if (other_comm && other_comm->surf_action_ && other_comm->get_remaining() < 1e-12) { + if (other_comm && other_comm->model_action_ && other_comm->get_remaining() < 1e-12) { XBT_DEBUG("comm %p has been already sent, and is finished, destroy it", other_comm.get()); other_comm->set_state(State::DONE); other_comm->set_mailbox(nullptr); @@ -370,16 +370,16 @@ void CommImpl::wait_any_for(actor::ActorImpl* issuer, const std::vectorsuspend(); + if (model_action_) + model_action_->suspend(); /* if not created yet, the action will be suspended on creation, in CommImpl::start() */ } void CommImpl::resume() { /*FIXME: check what happen with the timeouts */ - if (surf_action_) - surf_action_->resume(); + if (model_action_) + model_action_->resume(); /* in the other case, the synchro were not really suspended yet, see CommImpl::suspend() and CommImpl::start() */ } @@ -391,9 +391,9 @@ void CommImpl::cancel() mbox_->remove(this); set_state(State::CANCELED); } - } else if (not MC_is_active() /* when running the MC there are no surf actions */ + } else if (not MC_is_active() /* when running the MC there are no model actions */ && not MC_record_replay_is_active() && (get_state() == State::READY || get_state() == State::RUNNING)) { - surf_action_->cancel(); + model_action_->cancel(); } } @@ -426,7 +426,7 @@ void CommImpl::post() set_state(State::SRC_HOST_FAILURE); else if ((to_ && not to_->is_on()) || (dst_timeout_ && dst_timeout_->get_state() == resource::Action::State::FAILED)) set_state(State::DST_HOST_FAILURE); - else if (surf_action_ && surf_action_->get_state() == resource::Action::State::FAILED) { + else if (model_action_ && model_action_->get_state() == resource::Action::State::FAILED) { set_state(State::LINK_FAILURE); } else if (get_state() == State::RUNNING) { xbt_assert(from_ && from_->is_on()); @@ -437,7 +437,7 @@ void CommImpl::post() XBT_DEBUG("CommImpl::post(): comm %p, state %s, src_proc %p, dst_proc %p, detached: %d", this, get_state_str(), src_actor_.get(), dst_actor_.get(), detached_); - /* destroy the surf actions associated with the Simix communication */ + /* destroy the model actions associated with the communication activity */ cleanup_surf(); /* Answer all simcalls associated with the synchro */ diff --git a/src/kernel/activity/CommImpl.hpp b/src/kernel/activity/CommImpl.hpp index 8e18d1e40d..c2758ab718 100644 --- a/src/kernel/activity/CommImpl.hpp +++ b/src/kernel/activity/CommImpl.hpp @@ -79,9 +79,9 @@ looking if a given communication matches my needs. For that, myself must match t expectations of the other side, too. See */ std::function copy_data_fun; - /* Surf action data */ - resource::Action* src_timeout_ = nullptr; /* Surf's actions to instrument the timeouts */ - resource::Action* dst_timeout_ = nullptr; /* Surf's actions to instrument the timeouts */ + /* Model actions */ + resource::Action* src_timeout_ = nullptr; /* represents the timeout set by the sender */ + resource::Action* dst_timeout_ = nullptr; /* represents the timeout set by the receiver */ actor::ActorImplPtr src_actor_ = nullptr; actor::ActorImplPtr dst_actor_ = nullptr; diff --git a/src/kernel/activity/ExecImpl.cpp b/src/kernel/activity/ExecImpl.cpp index 789082c1e3..88432f686d 100644 --- a/src/kernel/activity/ExecImpl.cpp +++ b/src/kernel/activity/ExecImpl.cpp @@ -12,8 +12,8 @@ #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" #include "src/kernel/resource/CpuImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/mc/mc_replay.hpp" -#include "src/surf/HostImpl.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_cpu, kernel, "Kernel cpu-related synchronization"); @@ -81,20 +81,20 @@ ExecImpl* ExecImpl::start() if (not MC_is_active() && not MC_record_replay_is_active()) { if (get_hosts().size() == 1) { if (thread_count_ == 1) { - surf_action_ = get_host()->get_cpu()->execution_start(flops_amounts_.front(), bound_); - surf_action_->set_sharing_penalty(sharing_penalty_); + model_action_ = get_host()->get_cpu()->execution_start(flops_amounts_.front(), bound_); + model_action_->set_sharing_penalty(sharing_penalty_); } else { auto host_model = get_host()->get_netpoint()->get_englobing_zone()->get_host_model(); - surf_action_ = host_model->execute_thread(get_host(), flops_amounts_.front(), thread_count_); + model_action_ = host_model->execute_thread(get_host(), flops_amounts_.front(), thread_count_); } - surf_action_->set_category(get_tracing_category()); + model_action_->set_category(get_tracing_category()); } else { // get the model from first host since we have only 1 by now auto host_model = get_host()->get_netpoint()->get_englobing_zone()->get_host_model(); - surf_action_ = host_model->execute_parallel(get_hosts(), flops_amounts_.data(), bytes_amounts_.data(), -1); + model_action_ = host_model->execute_parallel(get_hosts(), flops_amounts_.data(), bytes_amounts_.data(), -1); } - surf_action_->set_activity(this); - set_start_time(surf_action_->get_start_time()); + model_action_->set_activity(this); + set_start_time(model_action_->get_start_time()); } XBT_DEBUG("Create execute synchro %p: %s", this, get_cname()); @@ -112,7 +112,7 @@ double ExecImpl::get_seq_remaining_ratio() { if (get_state() == State::WAITING) return 1; - return (surf_action_ == nullptr) ? 0 : surf_action_->get_remains() / surf_action_->get_cost(); + return (model_action_ == nullptr) ? 0 : model_action_->get_remains() / model_action_->get_cost(); } double ExecImpl::get_par_remaining_ratio() @@ -120,7 +120,7 @@ double ExecImpl::get_par_remaining_ratio() // parallel task: their remain is already between 0 and 1 if (get_state() == State::WAITING) return 1; - return (surf_action_ == nullptr) ? 0 : surf_action_->get_remains(); + return (model_action_ == nullptr) ? 0 : model_action_->get_remains(); } ExecImpl& ExecImpl::set_bound(double bound) @@ -138,24 +138,24 @@ ExecImpl& ExecImpl::set_sharing_penalty(double sharing_penalty) ExecImpl& ExecImpl::update_sharing_penalty(double sharing_penalty) { sharing_penalty_ = sharing_penalty; - surf_action_->set_sharing_penalty(sharing_penalty); + model_action_->set_sharing_penalty(sharing_penalty); return *this; } void ExecImpl::post() { - xbt_assert(surf_action_ != nullptr); + xbt_assert(model_action_ != nullptr); if (auto const& hosts = get_hosts(); std::any_of(hosts.begin(), hosts.end(), [](const s4u::Host* host) { return not host->is_on(); })) { /* If one of the hosts running the synchro failed, notice it. This way, the asking * process can be killed if it runs on that host itself */ set_state(State::FAILED); - } else if (surf_action_->get_state() == resource::Action::State::FAILED) { + } else if (model_action_->get_state() == resource::Action::State::FAILED) { /* If all the hosts are running the synchro didn't fail, then the synchro was canceled */ set_state(State::CANCELED); } else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED && - surf_action_->get_remains() > 0.0) { - surf_action_->set_state(resource::Action::State::FAILED); + model_action_->get_remains() > 0.0) { + model_action_->set_state(resource::Action::State::FAILED); set_state(State::TIMEOUT); } else { set_state(State::DONE); @@ -230,7 +230,7 @@ void ExecImpl::reset() ActivityImpl* ExecImpl::migrate(s4u::Host* to) { if (not MC_is_active() && not MC_record_replay_is_active()) { - resource::Action* old_action = this->surf_action_; + resource::Action* old_action = this->model_action_; resource::Action* new_action = to->get_cpu()->execution_start(old_action->get_cost(), old_action->get_user_bound()); new_action->set_remains(old_action->get_remains()); new_action->set_activity(this); @@ -240,7 +240,7 @@ ActivityImpl* ExecImpl::migrate(s4u::Host* to) old_action->set_activity(nullptr); old_action->cancel(); old_action->unref(); - this->surf_action_ = new_action; + this->model_action_ = new_action; } on_migration(*this, to); diff --git a/src/kernel/activity/IoImpl.cpp b/src/kernel/activity/IoImpl.cpp index 21b55c90ed..d270c4fbb7 100644 --- a/src/kernel/activity/IoImpl.cpp +++ b/src/kernel/activity/IoImpl.cpp @@ -5,17 +5,11 @@ #include #include -#include -#include -#include "mc/mc.h" #include "src/kernel/activity/IoImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" -#include "src/kernel/actor/SimcallObserver.hpp" -#include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/DiskImpl.hpp" -#include "src/mc/mc_replay.hpp" -#include "src/surf/HostImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_io, kernel, "Kernel io-related synchronization"); @@ -40,7 +34,7 @@ IoImpl& IoImpl::set_sharing_penalty(double sharing_penalty) IoImpl& IoImpl::update_sharing_penalty(double sharing_penalty) { sharing_penalty_ = sharing_penalty; - surf_action_->set_sharing_penalty(sharing_penalty); + model_action_->set_sharing_penalty(sharing_penalty); return *this; } @@ -93,16 +87,16 @@ IoImpl* IoImpl::start() set_state(State::RUNNING); if (dst_host_ == nullptr) { XBT_DEBUG("Starting regular I/O"); - surf_action_ = disk_->io_start(size_, type_); - surf_action_->set_sharing_penalty(sharing_penalty_); + model_action_ = disk_->io_start(size_, type_); + model_action_->set_sharing_penalty(sharing_penalty_); } else { XBT_DEBUG("Starting streaming I/O"); auto host_model = dst_host_->get_netpoint()->get_englobing_zone()->get_host_model(); - surf_action_ = host_model->io_stream(host_, disk_, dst_host_, dst_disk_, size_); + model_action_ = host_model->io_stream(host_, disk_, dst_host_, dst_disk_, size_); } - surf_action_->set_activity(this); - set_start_time(surf_action_->get_start_time()); + model_action_->set_activity(this); + set_start_time(model_action_->get_start_time()); XBT_DEBUG("Create IO synchro %p %s", this, get_cname()); @@ -111,8 +105,8 @@ IoImpl* IoImpl::start() void IoImpl::post() { - performed_ioops_ = surf_action_->get_cost(); - if (surf_action_->get_state() == resource::Action::State::FAILED) { + performed_ioops_ = model_action_->get_cost(); + if (model_action_->get_state() == resource::Action::State::FAILED) { if (host_ && dst_host_) { // this is an I/O stream if (not host_->is_on()) set_state(State::SRC_HOST_FAILURE); @@ -123,8 +117,8 @@ void IoImpl::post() else set_state(State::CANCELED); } else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED && - surf_action_->get_remains() > 0.0) { - surf_action_->set_state(resource::Action::State::FAILED); + model_action_->get_remains() > 0.0) { + model_action_->set_state(resource::Action::State::FAILED); set_state(State::TIMEOUT); } else { set_state(State::DONE); diff --git a/src/kernel/activity/MailboxImpl.hpp b/src/kernel/activity/MailboxImpl.hpp index 4a637c1833..fb84db7855 100644 --- a/src/kernel/activity/MailboxImpl.hpp +++ b/src/kernel/activity/MailboxImpl.hpp @@ -6,13 +6,13 @@ #ifndef SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP #define SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP -#include - #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Mailbox.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" +#include + namespace simgrid::kernel::activity { /** @brief Implementation of the s4u::Mailbox */ diff --git a/src/kernel/activity/MutexImpl.hpp b/src/kernel/activity/MutexImpl.hpp index c7ba205702..a614a775db 100644 --- a/src/kernel/activity/MutexImpl.hpp +++ b/src/kernel/activity/MutexImpl.hpp @@ -51,7 +51,7 @@ public: bool test(actor::ActorImpl* issuer = nullptr) override; void wait_for(actor::ActorImpl* issuer, double timeout) override; void post() override - { /*no surf action*/ + { /* no model action */ } void finish() override; void set_exception(actor::ActorImpl* issuer) override diff --git a/src/kernel/activity/SemaphoreImpl.cpp b/src/kernel/activity/SemaphoreImpl.cpp index 5e8016ce79..2bb639663d 100644 --- a/src/kernel/activity/SemaphoreImpl.cpp +++ b/src/kernel/activity/SemaphoreImpl.cpp @@ -31,8 +31,8 @@ void SemAcquisitionImpl::wait_for(actor::ActorImpl* issuer, double timeout) if (granted_) { post(); } else if (timeout > 0) { - surf_action_ = get_issuer()->get_host()->get_cpu()->sleep(timeout); - surf_action_->set_activity(this); + model_action_ = get_issuer()->get_host()->get_cpu()->sleep(timeout); + model_action_->set_activity(this); } else { // Already in the queue @@ -48,8 +48,8 @@ void SemAcquisitionImpl::finish() actor::Simcall* simcall = simcalls_.front(); simcalls_.pop_front(); - if (surf_action_ != nullptr) { // A timeout was declared - if (surf_action_->get_state() == resource::Action::State::FINISHED) { // The timeout elapsed + if (model_action_ != nullptr) { // A timeout was declared + if (model_action_->get_state() == resource::Action::State::FINISHED) { // The timeout elapsed if (granted_) { // but we got the semaphore, just in time! set_state(State::DONE); @@ -62,8 +62,8 @@ void SemAcquisitionImpl::finish() observer->set_result(true); } } - surf_action_->unref(); - surf_action_ = nullptr; + model_action_->unref(); + model_action_ = nullptr; } simcall->issuer_->waiting_synchro_ = nullptr; diff --git a/src/kernel/activity/SemaphoreImpl.hpp b/src/kernel/activity/SemaphoreImpl.hpp index 526907814f..fb69aad60c 100644 --- a/src/kernel/activity/SemaphoreImpl.hpp +++ b/src/kernel/activity/SemaphoreImpl.hpp @@ -6,13 +6,13 @@ #ifndef SIMGRID_KERNEL_ACTIVITY_SEMAPHOREIMPL_HPP #define SIMGRID_KERNEL_ACTIVITY_SEMAPHOREIMPL_HPP -#include -#include - #include "simgrid/s4u/Semaphore.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SynchroObserver.hpp" +#include +#include + namespace simgrid::kernel::activity { /** Semaphore Acquisition: the act / process of acquiring the semaphore. diff --git a/src/kernel/activity/SleepImpl.cpp b/src/kernel/activity/SleepImpl.cpp index 0dac2a7a50..5c5b88bca5 100644 --- a/src/kernel/activity/SleepImpl.cpp +++ b/src/kernel/activity/SleepImpl.cpp @@ -27,20 +27,20 @@ SleepImpl& SleepImpl::set_duration(double duration) SleepImpl* SleepImpl::start() { - surf_action_ = host_->get_cpu()->sleep(duration_); - surf_action_->set_activity(this); + model_action_ = host_->get_cpu()->sleep(duration_); + model_action_->set_activity(this); XBT_DEBUG("Create sleep synchronization %p", this); return this; } void SleepImpl::post() { - if (surf_action_->get_state() == resource::Action::State::FAILED) { + if (model_action_->get_state() == resource::Action::State::FAILED) { if (host_ && not host_->is_on()) set_state(State::SRC_HOST_FAILURE); else set_state(State::CANCELED); - } else if (surf_action_->get_state() == resource::Action::State::FINISHED) { + } else if (model_action_->get_state() == resource::Action::State::FINISHED) { set_state(State::DONE); } diff --git a/src/kernel/activity/Synchro.cpp b/src/kernel/activity/Synchro.cpp index c15f1557ad..2067f07973 100644 --- a/src/kernel/activity/Synchro.cpp +++ b/src/kernel/activity/Synchro.cpp @@ -28,8 +28,8 @@ SynchroImpl& SynchroImpl::set_timeout(double timeout) SynchroImpl* SynchroImpl::start() { - surf_action_ = host_->get_cpu()->sleep(timeout_); - surf_action_->set_activity(this); + model_action_ = host_->get_cpu()->sleep(timeout_); + model_action_->set_activity(this); return this; } @@ -51,9 +51,9 @@ void SynchroImpl::cancel() void SynchroImpl::post() { - if (surf_action_->get_state() == resource::Action::State::FAILED) + if (model_action_->get_state() == resource::Action::State::FAILED) set_state(State::FAILED); - else if (surf_action_->get_state() == resource::Action::State::FINISHED) + else if (model_action_->get_state() == resource::Action::State::FINISHED) set_state(State::SRC_TIMEOUT); clean_action(); diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index 148982feb9..05de3b4fb6 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -8,11 +8,12 @@ #include #include +#include "src/internal_config.h" #include "src/kernel/EngineImpl.hpp" #if HAVE_SMPI #include "src/smpi/include/private.hpp" #endif -#include "src/surf/HostImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include #include @@ -126,12 +127,6 @@ void ActorImpl::cleanup_from_kernel() if (not kernel_destroy_list_hook.is_linked()) engine->add_actor_to_destroy_list(*this); - if (has_to_auto_restart() && not get_host()->is_on()) { - XBT_DEBUG("Insert host %s to watched_hosts because it's off and %s needs to restart", get_host()->get_cname(), - get_cname()); - watched_hosts().insert(get_host()->get_name()); - } - undaemonize(); s4u::Actor::on_termination(*get_ciface()); @@ -357,12 +352,12 @@ activity::ActivityImplPtr ActorImpl::join(const ActorImpl* actor, double timeout { activity::ActivityImplPtr sleep_activity = this->sleep(timeout); if (actor->wannadie() || actor->to_be_freed()) { - if (sleep_activity->surf_action_) - sleep_activity->surf_action_->finish(resource::Action::State::FINISHED); + if (sleep_activity->model_action_) + sleep_activity->model_action_->finish(resource::Action::State::FINISHED); } else { actor->on_exit->emplace_back([sleep_activity](bool) { - if (sleep_activity->surf_action_) - sleep_activity->surf_action_->finish(resource::Action::State::FINISHED); + if (sleep_activity->model_action_) + sleep_activity->model_action_->finish(resource::Action::State::FINISHED); }); } return sleep_activity; diff --git a/src/kernel/actor/Simcall.cpp b/src/kernel/actor/Simcall.cpp index 33af408084..d34a22d229 100644 --- a/src/kernel/actor/Simcall.cpp +++ b/src/kernel/actor/Simcall.cpp @@ -5,11 +5,19 @@ #include "src/kernel/actor/Simcall.hpp" #include "simgrid/s4u/Host.hpp" +#include "src/kernel/EngineImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" #include "src/kernel/context/Context.hpp" #include "xbt/log.h" +#if SIMGRID_HAVE_MC +#include "simgrid/modelchecker.h" +#include "src/mc/mc_replay.hpp" +#endif + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_simcall, kernel, "transmuting from user request into kernel handlers"); + namespace simgrid::kernel::actor { /** @brief returns a printable string representing a simcall */ @@ -36,3 +44,57 @@ void ObjectAccessSimcallItem::take_ownership() } } // namespace simgrid::kernel::actor + +static void simcall(simgrid::kernel::actor::Simcall::Type call, std::function const& code, + simgrid::kernel::actor::SimcallObserver* observer) +{ + auto self = simgrid::kernel::actor::ActorImpl::self(); + self->simcall_.call_ = call; + self->simcall_.code_ = &code; + self->simcall_.observer_ = observer; + if (simgrid::kernel::EngineImpl::get_instance()->is_maestro(self)) { + self->simcall_handle(0); + } else { + XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), self->simcall_.get_cname()); + self->yield(); + } + self->simcall_.observer_ = nullptr; +} + +void simcall_run_answered(std::function const& code, simgrid::kernel::actor::SimcallObserver* observer) +{ + // The function `code` is called in kernel mode (either because we are already in maestor or after a context switch) + // and simcall_answer() is called + simcall(simgrid::kernel::actor::Simcall::Type::RUN_ANSWERED, code, observer); +} + +void simcall_run_blocking(std::function const& code, simgrid::kernel::actor::SimcallObserver* observer) +{ + // The function `code` is called in kernel mode (either because we are already in maestor or after a context switch) + // BUT simcall_answer IS NOT CALLED + simcall(simgrid::kernel::actor::Simcall::Type::RUN_BLOCKING, code, observer); +} + +void simcall_run_object_access(std::function const& code, simgrid::kernel::actor::ObjectAccessSimcallItem* item) +{ + auto self = simgrid::kernel::actor::ActorImpl::self(); + + // We only need a simcall if the order of the setters is important (parallel run or MC execution). + // Otherwise, just call the function with no simcall + + if (simgrid::kernel::context::Context::is_parallel() +#if SIMGRID_HAVE_MC + || MC_is_active() || MC_record_replay_is_active() +#endif + ) { + simgrid::kernel::actor::ObjectAccessSimcallObserver observer{self, item}; + simcall(simgrid::kernel::actor::Simcall::Type::RUN_ANSWERED, code, &observer); + item->take_ownership(); + } else { + // don't return from the context-switch we don't do + self->simcall_.call_ = simgrid::kernel::actor::Simcall::Type::RUN_BLOCKING; + self->simcall_.code_ = &code; + self->simcall_.observer_ = nullptr; + self->simcall_handle(0); + } +} diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index 022929622a..c4f79b46a4 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -3,14 +3,13 @@ /* 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 "mc/mc.h" +#include "src/mc/mc.h" #include "simgrid/Exception.hpp" #include "simgrid/s4u/Host.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/context/Context.hpp" #include "src/sthread/sthread.h" -#include "src/surf/surf_interface.hpp" #include diff --git a/src/kernel/context/ContextBoost.hpp b/src/kernel/context/ContextBoost.hpp index fcd54895a9..22295c55a1 100644 --- a/src/kernel/context/ContextBoost.hpp +++ b/src/kernel/context/ContextBoost.hpp @@ -18,11 +18,8 @@ #include #include -#include -#include - -#include "src/internal_config.h" #include "src/kernel/context/ContextSwapped.hpp" +#include "src/xbt/parmap.hpp" namespace simgrid::kernel::context { diff --git a/src/kernel/context/ContextRaw.cpp b/src/kernel/context/ContextRaw.cpp index 0cc59ed118..1c29c667a6 100644 --- a/src/kernel/context/ContextRaw.cpp +++ b/src/kernel/context/ContextRaw.cpp @@ -4,8 +4,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "ContextRaw.hpp" -#include "mc/mc.h" #include "simgrid/Exception.hpp" +#include "src/mc/mc.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context); diff --git a/src/kernel/context/ContextRaw.hpp b/src/kernel/context/ContextRaw.hpp index 63a3f82f9a..dfa2c03281 100644 --- a/src/kernel/context/ContextRaw.hpp +++ b/src/kernel/context/ContextRaw.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include "src/xbt/parmap.hpp" #include "src/kernel/context/ContextSwapped.hpp" diff --git a/src/kernel/context/ContextSwapped.cpp b/src/kernel/context/ContextSwapped.cpp index a19779195b..13e7e9aa9b 100644 --- a/src/kernel/context/ContextSwapped.cpp +++ b/src/kernel/context/ContextSwapped.cpp @@ -9,7 +9,7 @@ #include "src/kernel/EngineImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/sthread/sthread.h" -#include "xbt/parmap.hpp" +#include "src/xbt/parmap.hpp" #include "src/kernel/context/ContextSwapped.hpp" diff --git a/src/kernel/context/ContextSwapped.hpp b/src/kernel/context/ContextSwapped.hpp index 939e2813fc..ed98656216 100644 --- a/src/kernel/context/ContextSwapped.hpp +++ b/src/kernel/context/ContextSwapped.hpp @@ -8,6 +8,7 @@ #include "src/internal_config.h" // HAVE_SANITIZER_* #include "src/kernel/context/Context.hpp" +#include "src/xbt/parmap.hpp" #include diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index 9106a3cb31..68bb417827 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -8,8 +8,8 @@ #include "simgrid/Exception.hpp" #include "src/internal_config.h" /* loads context system definitions */ #include "src/kernel/EngineImpl.hpp" +#include "src/xbt/xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */ #include "xbt/function_types.h" -#include "xbt/xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */ #include #include diff --git a/src/kernel/context/ContextUnix.cpp b/src/kernel/context/ContextUnix.cpp index 97e8a5170f..7515e93515 100644 --- a/src/kernel/context/ContextUnix.cpp +++ b/src/kernel/context/ContextUnix.cpp @@ -5,9 +5,9 @@ /* \file UContext.cpp Context switching with ucontexts from System V */ -#include "mc/mc.h" #include "simgrid/Exception.hpp" #include "src/kernel/actor/ActorImpl.hpp" +#include "src/mc/mc.h" #include "src/mc/remote/AppSide.hpp" #include "ContextUnix.hpp" diff --git a/src/kernel/context/ContextUnix.hpp b/src/kernel/context/ContextUnix.hpp index fd1c8b5a4b..15b1b8722a 100644 --- a/src/kernel/context/ContextUnix.hpp +++ b/src/kernel/context/ContextUnix.hpp @@ -13,8 +13,8 @@ #include #include +#include "src/xbt/parmap.hpp" #include -#include #include "src/internal_config.h" #include "src/kernel/context/ContextSwapped.hpp" diff --git a/src/kernel/lmm/System.cpp b/src/kernel/lmm/System.cpp index 5aa108295a..75eb88ac64 100644 --- a/src/kernel/lmm/System.cpp +++ b/src/kernel/lmm/System.cpp @@ -3,18 +3,21 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "src/internal_config.h" #include "src/kernel/lmm/fair_bottleneck.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/simgrid/math_utils.h" #if SIMGRID_HAVE_EIGEN3 #include "src/kernel/lmm/bmf.hpp" #endif + #include #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_lmm, kernel, "Kernel Linear Max-Min solver"); -double sg_maxmin_precision = 1E-5; /* Change this with --cfg=maxmin/precision:VALUE */ -double sg_surf_precision = 1E-9; /* Change this with --cfg=surf/precision:VALUE */ +double sg_precision_workamount = 1E-5; /* Change this with --cfg=precision/work-amount:VALUE */ +double sg_precision_timing = 1E-9; /* Change this with --cfg=precision/timing:VALUE */ int sg_concurrency_limit = -1; /* Change this with --cfg=maxmin/concurrency-limit:VALUE */ namespace simgrid::kernel::lmm { @@ -92,7 +95,7 @@ void System::validate_solver(const std::string& solver_name) void System::check_concurrency() const { - // These checks are very expensive, so do them only if we want to debug SURF LMM + // These checks are very expensive, so do them only if we want to debug the LMM if (not XBT_LOG_ISENABLED(ker_lmm, xbt_log_priority_debug)) return; @@ -426,7 +429,7 @@ void System::print() const } XBT_DEBUG("%s", buf.c_str()); buf.clear(); - xbt_assert(not double_positive(sum - cnst.bound_, cnst.bound_ * sg_maxmin_precision), + xbt_assert(not double_positive(sum - cnst.bound_, cnst.bound_ * sg_precision_workamount), "Incorrect value (%f is not smaller than %f): %g", sum, cnst.bound_, sum - cnst.bound_); } @@ -435,7 +438,7 @@ void System::print() const for (Variable const& var : variable_set) { if (var.bound_ > 0) { XBT_DEBUG("'%d'(%f) : %f (<=%f)", var.rank_, var.sharing_penalty_, var.value_, var.bound_); - xbt_assert(not double_positive(var.value_ - var.bound_, var.bound_ * sg_maxmin_precision), + xbt_assert(not double_positive(var.value_ - var.bound_, var.bound_ * sg_precision_workamount), "Incorrect value (%f is not smaller than %f", var.value_, var.bound_); } else { XBT_DEBUG("'%d'(%f) : %f", var.rank_, var.sharing_penalty_, var.value_); diff --git a/src/kernel/lmm/System.hpp b/src/kernel/lmm/System.hpp index ab4684b837..bfbe7d224e 100644 --- a/src/kernel/lmm/System.hpp +++ b/src/kernel/lmm/System.hpp @@ -8,10 +8,7 @@ #include "simgrid/kernel/resource/Action.hpp" #include "simgrid/kernel/resource/Model.hpp" -#include "simgrid/s4u/Link.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/asserts.h" -#include "xbt/ex.h" #include "xbt/mallocator.h" #include @@ -21,9 +18,14 @@ #include #include +/* user-visible parameters */ +XBT_PUBLIC_DATA double sg_precision_workamount; +XBT_PUBLIC_DATA double sg_precision_timing; +XBT_PUBLIC_DATA int sg_concurrency_limit; + namespace simgrid::kernel::lmm { -/** @addtogroup SURF_lmm +/** @addtogroup Model_lmm * @details * A linear maxmin solver to resolve inequations systems. * @@ -133,7 +135,7 @@ namespace simgrid::kernel::lmm { * At the current state, each variable counts as 1 if its consumption weight is greater than 1. */ -/** @{ @ingroup SURF_lmm */ +/** @{ @ingroup Model_lmm */ /** * @brief LMM element @@ -243,7 +245,7 @@ public: int get_concurrency_maximum() const { xbt_assert(concurrency_limit_ < 0 || concurrency_maximum_ <= concurrency_limit_, - "Very bad: maximum observed concurrency is higher than limit. This is a bug of SURF, please report it."); + "Very bad: maximum observed concurrency is higher than limit. This is a bug, please report it."); return concurrency_maximum_; } diff --git a/src/kernel/lmm/bmf.cpp b/src/kernel/lmm/bmf.cpp index eb629b4613..a754fd5dec 100644 --- a/src/kernel/lmm/bmf.cpp +++ b/src/kernel/lmm/bmf.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/lmm/bmf.hpp" +#include "src/simgrid/math_utils.h" #include #include @@ -309,7 +310,7 @@ bool BmfSolver::is_bmf(const Eigen::VectorXd& rho) const Eigen::VectorXd remaining = (A_ * rho) - C_; remaining = remaining.array() * shared.array(); // ignore non shared resources bmf = bmf && (not std::any_of(remaining.data(), remaining.data() + remaining.size(), - [](double v) { return double_positive(v, sg_maxmin_precision); })); + [](double v) { return double_positive(v, sg_precision_workamount); })); // 3) every player receives maximum share in at least 1 saturated resource // due to subflows, compare with the maximum consumption and not the A matrix @@ -321,15 +322,15 @@ bool BmfSolver::is_bmf(const Eigen::VectorXd& rho) const // matrix_ji: boolean indicating player p has the maximum share at resource j Eigen::MatrixXi player_max_share = - ((usage.array().colwise() - max_share.array()).abs() <= sg_maxmin_precision).cast(); + ((usage.array().colwise() - max_share.array()).abs() <= sg_precision_workamount).cast(); // but only saturated resources must be considered - Eigen::VectorXi saturated = (remaining.array().abs() <= sg_maxmin_precision).cast(); + Eigen::VectorXi saturated = (remaining.array().abs() <= sg_precision_workamount).cast(); XBT_DEBUG("Saturated_j resources:\n%s", debug_eigen(saturated).c_str()); player_max_share.array().colwise() *= saturated.array(); // just check if it has received at least it's bound for (int p = 0; p < rho.size(); p++) { - if (double_equals(rho[p], phi_[p], sg_maxmin_precision)) { + if (double_equals(rho[p], phi_[p], sg_precision_workamount)) { player_max_share(0, p) = 1; // it doesn't really matter, just to say that it's a bmf saturated[0] = 1; } diff --git a/src/kernel/lmm/bmf.hpp b/src/kernel/lmm/bmf.hpp index f4f613a1e9..3bebff17d9 100644 --- a/src/kernel/lmm/bmf.hpp +++ b/src/kernel/lmm/bmf.hpp @@ -9,6 +9,8 @@ #include "src/kernel/lmm/System.hpp" #include "xbt/config.hpp" +#include + #ifdef __clang__ // Ignore deprecation warnings with Eigen < 4.0 (see https://gitlab.com/libeigen/eigen/-/issues/1850) #pragma clang diagnostic push @@ -78,7 +80,7 @@ class XBT_PUBLIC BmfSolver { "bmf/max-iterations", "Maximum number of steps to be performed while searching for a BMF allocation", 1000}; inline static simgrid::config::Flag cfg_bmf_precision{ - "bmf/precision", "Numerical precision used when computing resource sharing", 1E-12}; + "bmf/precision", {"precision/bmf"}, "Numerical precision used when computing resource sharing", 1E-12}; public: /** diff --git a/src/kernel/lmm/bmf_test.cpp b/src/kernel/lmm/bmf_test.cpp index ffaf589b70..12af94ff88 100644 --- a/src/kernel/lmm/bmf_test.cpp +++ b/src/kernel/lmm/bmf_test.cpp @@ -3,9 +3,9 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" #include "src/kernel/lmm/bmf.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" #include "xbt/log.h" namespace lmm = simgrid::kernel::lmm; @@ -34,7 +34,7 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_1, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 3, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 3, sg_precision_workamount)); } SECTION("Two flows") @@ -60,8 +60,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_2, 10); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 3.0 / 2.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), (3.0 / 2.0) / 10.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 3.0 / 2.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), (3.0 / 2.0) / 10.0, sg_precision_workamount)); } SECTION("Variable penalty/priority") @@ -87,8 +87,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 2.0 / 3.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1.0 / 3.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 2.0 / 3.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1.0 / 3.0, sg_precision_workamount)); } SECTION("Disable variable doesn't count") @@ -113,8 +113,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_2, 10); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 0.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 0.0, sg_precision_workamount)); } SECTION("No consumption variable") @@ -138,7 +138,7 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_2, 10); Sys.solve(); - REQUIRE(double_positive(rho_1->get_value(), sg_maxmin_precision)); + REQUIRE(double_positive(rho_1->get_value(), sg_precision_workamount)); } SECTION("Bounded variable") @@ -163,8 +163,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_1, 2); Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), .1, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), .8, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), .1, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), .8, sg_precision_workamount)); } SECTION("Fatpipe") @@ -191,8 +191,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 3.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 3.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 3.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 3.0, sg_precision_workamount)); } SECTION("(un)Bounded variable") @@ -217,8 +217,8 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") Sys.expand(sys_cnst, rho_1, 1); Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), .5, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), .5, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), .5, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), .5, sg_precision_workamount)); } SECTION("Dynamic bounds") @@ -242,15 +242,15 @@ TEST_CASE("kernel::bmf Basic tests", "[kernel-bmf-basic]") lmm::Variable* rho_1 = Sys.variable_new(nullptr, 1); Sys.expand(sys_cnst, rho_1, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1, sg_precision_workamount)); // add another variable, half initial capacity lmm::Variable* rho_2 = Sys.variable_new(nullptr, 1); Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), .25, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), .25, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), .25, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), .25, sg_precision_workamount)); } Sys.variable_free_all(); @@ -291,8 +291,8 @@ TEST_CASE("kernel::bmf Advanced tests", "[kernel-bmf-advanced]") Sys.expand(sys_cnst2, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.0 / 11.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1.0 / 11.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.0 / 11.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1.0 / 11.0, sg_precision_workamount)); } SECTION("BMF paper example") @@ -327,9 +327,9 @@ TEST_CASE("kernel::bmf Advanced tests", "[kernel-bmf-advanced]") Sys.expand(sys_cnst3, rho_3, 3.0 / 4.0); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.0 / 3.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 4.0 / 9.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 4.0 / 9.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.0 / 3.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 4.0 / 9.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 4.0 / 9.0, sg_precision_workamount)); } SECTION("IO - example") @@ -368,8 +368,8 @@ TEST_CASE("kernel::bmf Advanced tests", "[kernel-bmf-advanced]") Sys.expand(sys_cnst3, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1e6 / 2.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1e6 / 2.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1e6 / 2.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1e6 / 2.0, sg_precision_workamount)); } SECTION("Proportional fairness") @@ -398,9 +398,9 @@ TEST_CASE("kernel::bmf Advanced tests", "[kernel-bmf-advanced]") Sys.expand(sys_cnst, rho_3, epsilon); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.0 / (2.0 + 2 * epsilon), sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1.0 / (2.0 + 2 * epsilon), sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 1.0 / (1.0 + epsilon), sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.0 / (2.0 + 2 * epsilon), sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1.0 / (2.0 + 2 * epsilon), sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 1.0 / (1.0 + epsilon), sg_precision_workamount)); } Sys.variable_free_all(); @@ -440,8 +440,8 @@ TEST_CASE("kernel::bmf Subflows", "[kernel-bmf-subflow]") Sys.expand(sys_cnst, rho_2, 5); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 5.0 / 24.0, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 5.0 / 24.0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 5.0 / 24.0, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 5.0 / 24.0, sg_precision_workamount)); } SECTION("1 subflows, 1 flow and 1 resource") @@ -475,9 +475,9 @@ TEST_CASE("kernel::bmf Subflows", "[kernel-bmf-subflow]") Sys.expand(sys_cnst, rho_2, 10); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), (5.0 / 25.0), sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), (5.0 / 25.0), sg_maxmin_precision)); - REQUIRE(double_equals(15 * rho_1->get_value(), 10 * rho_2->get_value() * 3 / 2, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), (5.0 / 25.0), sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), (5.0 / 25.0), sg_precision_workamount)); + REQUIRE(double_equals(15 * rho_1->get_value(), 10 * rho_2->get_value() * 3 / 2, sg_precision_workamount)); } SECTION("1 subflows using 2 resources: different max for each resource") @@ -513,8 +513,8 @@ TEST_CASE("kernel::bmf Subflows", "[kernel-bmf-subflow]") Sys.expand(sys_cnst2, rho_2, 3.0 / 2.0); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), (1.0 / 3.0), sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), (1.0 / 3.0), sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), (1.0 / 3.0), sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), (1.0 / 3.0), sg_precision_workamount)); } Sys.variable_free_all(); @@ -556,7 +556,7 @@ TEST_CASE("kernel::bmf Loop", "[kernel-bmf-loop]") Sys.solve(); for (const auto* rho : vars) { - REQUIRE(double_positive(rho->get_value(), sg_maxmin_precision)); + REQUIRE(double_positive(rho->get_value(), sg_precision_workamount)); } } @@ -655,8 +655,8 @@ TEST_CASE("kernel::bmf Bugs", "[kernel-bmf-bug]") Sys.expand(sys_cnst, rho_2, 1.0); Sys.expand(sys_cnst2, rho_2, 1.0); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.4, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 3, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.4, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 3, sg_precision_workamount)); } SECTION("s4u-cloud-capping bug: all limited by bound extra case") @@ -675,8 +675,8 @@ TEST_CASE("kernel::bmf Bugs", "[kernel-bmf-bug]") Sys.expand(sys_cnst, rho_1, 1); Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 7.6296e+06, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 3.8148e+07, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 7.6296e+06, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 3.8148e+07, sg_precision_workamount)); } SECTION("Variable penalty with bounds: thread bug") @@ -694,8 +694,8 @@ TEST_CASE("kernel::bmf Bugs", "[kernel-bmf-bug]") Sys.expand(sys_cnst, rho_1, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 8e7, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 3.2e8, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 8e7, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 3.2e8, sg_precision_workamount)); } SECTION("Variable penalty with bounds greater than C") @@ -709,7 +709,7 @@ TEST_CASE("kernel::bmf Bugs", "[kernel-bmf-bug]") Sys.expand(sys_cnst, rho_1, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 4e8, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 4e8, sg_precision_workamount)); } Sys.variable_free_all(); diff --git a/src/kernel/lmm/fair_bottleneck.cpp b/src/kernel/lmm/fair_bottleneck.cpp index 2f9c2e7f63..3349fc5867 100644 --- a/src/kernel/lmm/fair_bottleneck.cpp +++ b/src/kernel/lmm/fair_bottleneck.cpp @@ -4,7 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/lmm/fair_bottleneck.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" #include "xbt/sysdep.h" #include @@ -103,7 +103,7 @@ void simgrid::kernel::lmm::FairBottleneck::do_solve() xbt_assert(elem.variable->sharing_penalty_ > 0); XBT_DEBUG("\tUpdate constraint %p (%g) with variable %p by %g", &cnst, cnst.remaining_, elem.variable, elem.variable->mu_); - double_update(&cnst.remaining_, elem.consumption_weight * elem.variable->mu_, sg_maxmin_precision); + double_update(&cnst.remaining_, elem.consumption_weight * elem.variable->mu_, sg_precision_workamount); } } else { for (const Element& elem : cnst.enabled_element_set_) { @@ -113,7 +113,7 @@ void simgrid::kernel::lmm::FairBottleneck::do_solve() cnst.usage_ = std::min(cnst.usage_, elem.consumption_weight * elem.variable->mu_); } XBT_DEBUG("\tUpdate constraint %p (%g) by %g", &cnst, cnst.remaining_, cnst.usage_); - double_update(&cnst.remaining_, cnst.usage_, sg_maxmin_precision); + double_update(&cnst.remaining_, cnst.usage_, sg_precision_workamount); } XBT_DEBUG("\tRemaining for %p : %g", &cnst, cnst.remaining_); diff --git a/src/kernel/lmm/maxmin.cpp b/src/kernel/lmm/maxmin.cpp index 7cbe6cf695..73b110caaa 100644 --- a/src/kernel/lmm/maxmin.cpp +++ b/src/kernel/lmm/maxmin.cpp @@ -4,6 +4,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/lmm/maxmin.hpp" +#include "src/simgrid/math_utils.h" +#include "xbt/ex.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm); @@ -71,7 +73,7 @@ template void MaxMin::maxmin_solve(CnstList& cnst_list) cnst.dynamic_bound_ = cnst.dyn_constraint_cb_(cnst.bound_, cnst.concurrency_current_); } cnst.remaining_ = cnst.dynamic_bound_; - if (not double_positive(cnst.remaining_, cnst.dynamic_bound_ * sg_maxmin_precision)) + if (not double_positive(cnst.remaining_, cnst.dynamic_bound_ * sg_precision_workamount)) continue; cnst.usage_ = 0; for (Element& elem : cnst.enabled_element_set_) { @@ -132,7 +134,7 @@ template void MaxMin::maxmin_solve(CnstList& cnst_list) XBT_DEBUG("Setting var (%d) value to %f\n", var.rank_, var.value_); } else { // If there exist a variable that can reach its bound, only update it (and other with the same bound) for now. - if (double_equals(min_bound, var.bound_ * var.sharing_penalty_, sg_maxmin_precision)) { + if (double_equals(min_bound, var.bound_ * var.sharing_penalty_, sg_precision_workamount)) { var.value_ = var.bound_; XBT_DEBUG("Setting %p (%d) value to %f\n", &var, var.rank_, var.value_); } else { @@ -151,11 +153,11 @@ template void MaxMin::maxmin_solve(CnstList& cnst_list) if (cnst->sharing_policy_ != Constraint::SharingPolicy::FATPIPE) { // Remember: shared constraints require that sum(elem.value * var.value) < cnst->bound double_update(&(cnst->remaining_), elem.consumption_weight * var.value_, - cnst->dynamic_bound_ * sg_maxmin_precision); - double_update(&(cnst->usage_), elem.consumption_weight / var.sharing_penalty_, sg_maxmin_precision); + cnst->dynamic_bound_ * sg_precision_workamount); + double_update(&(cnst->usage_), elem.consumption_weight / var.sharing_penalty_, sg_precision_workamount); // If the constraint is saturated, remove it from the set of active constraints (light_tab) - if (not double_positive(cnst->usage_, sg_maxmin_precision) || - not double_positive(cnst->remaining_, cnst->dynamic_bound_ * sg_maxmin_precision)) { + if (not double_positive(cnst->usage_, sg_precision_workamount) || + not double_positive(cnst->remaining_, cnst->dynamic_bound_ * sg_precision_workamount)) { if (cnst->cnst_light_) { size_t index = (cnst->cnst_light_ - cnst_light_tab); XBT_DEBUG("index: %zu \t cnst_light_num: %d \t || usage: %f remaining: %f bound: %f", index, @@ -183,8 +185,8 @@ template void MaxMin::maxmin_solve(CnstList& cnst_list) cnst->usage_ = std::max(cnst->usage_, elem2.consumption_weight / elem2.variable->sharing_penalty_); } // If the constraint is saturated, remove it from the set of active constraints (light_tab) - if (not double_positive(cnst->usage_, sg_maxmin_precision) || - not double_positive(cnst->remaining_, cnst->dynamic_bound_ * sg_maxmin_precision)) { + if (not double_positive(cnst->usage_, sg_precision_workamount) || + not double_positive(cnst->remaining_, cnst->dynamic_bound_ * sg_precision_workamount)) { if (cnst->cnst_light_) { size_t index = (cnst->cnst_light_ - cnst_light_tab); XBT_DEBUG("index: %zu \t cnst_light_num: %d \t || \t cnst: %p \t cnst->cnst_light: %p " @@ -214,12 +216,13 @@ template void MaxMin::maxmin_solve(CnstList& cnst_list) min_bound = -1; saturated_constraints.clear(); for (int pos = 0; pos < cnst_light_num; pos++) { - xbt_assert(not cnst_light_tab[pos].cnst->active_element_set_.empty(), - "Cannot saturate more a constraint that has" - " no active element! You may want to change the maxmin precision (--cfg=maxmin/precision:)" - " because of possible rounding effects.\n\tFor the record, the usage of this constraint is %g while " - "the maxmin precision to which it is compared is %g.\n\tThe usage of the previous constraint is %g.", - cnst_light_tab[pos].cnst->usage_, sg_maxmin_precision, cnst_light_tab[pos - 1].cnst->usage_); + xbt_assert( + not cnst_light_tab[pos].cnst->active_element_set_.empty(), + "Cannot saturate more a constraint that has" + " no active element! You may want to change the work amount precision (--cfg=precision/work:)" + " because of possible rounding effects.\n\tFor the record, the usage of this constraint is %g while " + "the maxmin precision to which it is compared is %g.\n\tThe usage of the previous constraint is %g.", + cnst_light_tab[pos].cnst->usage_, sg_precision_workamount, cnst_light_tab[pos - 1].cnst->usage_); saturated_constraints_update(cnst_light_tab[pos].remaining_over_usage, pos, saturated_constraints, &min_usage); } diff --git a/src/kernel/lmm/maxmin_test.cpp b/src/kernel/lmm/maxmin_test.cpp index dd34cd03bc..a7d16dc91b 100644 --- a/src/kernel/lmm/maxmin_test.cpp +++ b/src/kernel/lmm/maxmin_test.cpp @@ -3,9 +3,9 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" #include "xbt/log.h" namespace lmm = simgrid::kernel::lmm; @@ -37,8 +37,8 @@ TEST_CASE("kernel::lmm Single constraint shared systems", "[kernel-lmm-shared-si Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 2, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 2, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1, sg_precision_workamount)); } SECTION("Consumption weight") @@ -65,8 +65,8 @@ TEST_CASE("kernel::lmm Single constraint shared systems", "[kernel-lmm-shared-si Sys.expand(sys_cnst, rho_2, 2); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1, sg_precision_workamount)); } SECTION("Consumption weight + variable penalty") @@ -94,8 +94,8 @@ TEST_CASE("kernel::lmm Single constraint shared systems", "[kernel-lmm-shared-si Sys.solve(); double rho_1_share = 10; - REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_precision_workamount)); } SECTION("Multiple constraints systems") @@ -134,9 +134,9 @@ TEST_CASE("kernel::lmm Single constraint shared systems", "[kernel-lmm-shared-si Sys.solve(); double rho_1_share = 10; // Start by solving the first constraint (results is the same as previous tests) - REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 60 - 2 * rho_1_share, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 60 - 2 * rho_1_share, sg_precision_workamount)); } Sys.variable_free_all(); @@ -171,8 +171,8 @@ TEST_CASE("kernel::lmm Single constraint unshared systems", "[kernel-lmm-unshare Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 10, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 10 / 2, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 10, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 10 / 2, sg_precision_workamount)); } SECTION("Consumption weight") @@ -201,8 +201,8 @@ TEST_CASE("kernel::lmm Single constraint unshared systems", "[kernel-lmm-unshare Sys.expand(sys_cnst, rho_2, 2); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 5, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 5, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 5, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 5, sg_precision_workamount)); } SECTION("Consumption weight + variable penalty") @@ -231,8 +231,8 @@ TEST_CASE("kernel::lmm Single constraint unshared systems", "[kernel-lmm-unshare Sys.expand(sys_cnst, sys_var_2, 2); Sys.solve(); - REQUIRE(double_equals(sys_var_1->get_value(), 10, sg_maxmin_precision)); - REQUIRE(double_equals(sys_var_2->get_value(), 5, sg_maxmin_precision)); + REQUIRE(double_equals(sys_var_1->get_value(), 10, sg_precision_workamount)); + REQUIRE(double_equals(sys_var_2->get_value(), 5, sg_precision_workamount)); } SECTION("Multiple constraints systems") @@ -273,9 +273,9 @@ TEST_CASE("kernel::lmm Single constraint unshared systems", "[kernel-lmm-unshare Sys.solve(); double rho_1_share = 10; // Start by solving the first constraint (results is the same as previous tests) - REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 60, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), rho_1_share, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), rho_1_share / 2, sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 60, sg_precision_workamount)); } Sys.variable_free_all(); @@ -310,7 +310,7 @@ TEST_CASE("kernel::lmm dynamic constraint shared systems", "[kernel-lmm-shared-s Sys.expand(sys_cnst, rho_1, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 10, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 10, sg_precision_workamount)); } SECTION("2 activities, but ignore crosstraffic 100% C") @@ -336,8 +336,8 @@ TEST_CASE("kernel::lmm dynamic constraint shared systems", "[kernel-lmm-shared-s Sys.expand(sys_cnst, rho_2, 0.05); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 10 / 1.05, sg_maxmin_precision)); - REQUIRE(double_equals(rho_1->get_value(), rho_2->get_value(), sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 10 / 1.05, sg_precision_workamount)); + REQUIRE(double_equals(rho_1->get_value(), rho_2->get_value(), sg_precision_workamount)); } SECTION("2 activities, 1 inactive 100% C") @@ -362,8 +362,8 @@ TEST_CASE("kernel::lmm dynamic constraint shared systems", "[kernel-lmm-shared-s Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 10, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 0, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 10, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 0, sg_precision_workamount)); } SECTION("2 activity, 90% C") @@ -388,8 +388,8 @@ TEST_CASE("kernel::lmm dynamic constraint shared systems", "[kernel-lmm-shared-s Sys.expand(sys_cnst, rho_2, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 4.5, sg_maxmin_precision)); - REQUIRE(double_equals(rho_1->get_value(), 4.5, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 4.5, sg_precision_workamount)); + REQUIRE(double_equals(rho_1->get_value(), 4.5, sg_precision_workamount)); } SECTION("3 activity, 80% C") @@ -417,9 +417,9 @@ TEST_CASE("kernel::lmm dynamic constraint shared systems", "[kernel-lmm-shared-s Sys.expand(sys_cnst, rho_3, 1); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 4, sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 2, sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 2, sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 4, sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 2, sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 2, sg_precision_workamount)); } Sys.variable_free_all(); @@ -458,9 +458,9 @@ TEST_CASE("kernel::lmm shared systems with crosstraffic", "[kernel-lmm-shared-cr Sys.expand(sys_cnst, rho_3, epsilon); Sys.solve(); - REQUIRE(double_equals(rho_1->get_value(), 1.0 / (2.0 + epsilon), sg_maxmin_precision)); - REQUIRE(double_equals(rho_2->get_value(), 1.0 / (2.0 + epsilon), sg_maxmin_precision)); - REQUIRE(double_equals(rho_3->get_value(), 1.0 / (2.0 + epsilon), sg_maxmin_precision)); + REQUIRE(double_equals(rho_1->get_value(), 1.0 / (2.0 + epsilon), sg_precision_workamount)); + REQUIRE(double_equals(rho_2->get_value(), 1.0 / (2.0 + epsilon), sg_precision_workamount)); + REQUIRE(double_equals(rho_3->get_value(), 1.0 / (2.0 + epsilon), sg_precision_workamount)); } Sys.variable_free_all(); diff --git a/src/kernel/resource/Action.cpp b/src/kernel/resource/Action.cpp index 0cb147ce3b..9651cde842 100644 --- a/src/kernel/resource/Action.cpp +++ b/src/kernel/resource/Action.cpp @@ -7,7 +7,7 @@ #include "simgrid/kernel/resource/Model.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" XBT_LOG_NEW_CATEGORY(kernel, "SimGrid internals"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_resource, kernel, "Resources, modeling the platform performance"); @@ -194,12 +194,12 @@ double Action::get_remains() void Action::update_max_duration(double delta) { if (max_duration_ != NO_MAX_DURATION) - double_update(&max_duration_, delta, sg_surf_precision); + double_update(&max_duration_, delta, sg_precision_timing); } void Action::update_remains(double delta) { - double_update(&remains_, delta, sg_maxmin_precision * sg_surf_precision); + double_update(&remains_, delta, sg_precision_workamount * sg_precision_timing); } void Action::set_last_update() diff --git a/src/kernel/resource/CpuImpl.cpp b/src/kernel/resource/CpuImpl.cpp index f7dc10ba8a..b2b8101277 100644 --- a/src/kernel/resource/CpuImpl.cpp +++ b/src/kernel/resource/CpuImpl.cpp @@ -4,9 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/resource/CpuImpl.hpp" +#include "src/kernel/resource/models/cpu_ti.hpp" #include "src/kernel/resource/profile/Profile.hpp" -#include "src/surf/cpu_ti.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_cpu, ker_resource, "CPU resource, fueling execution activites"); @@ -18,7 +18,7 @@ namespace simgrid::kernel::resource { void CpuModel::update_actions_state_lazy(double now, double /*delta*/) { - while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) { + while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_precision_timing)) { auto* action = static_cast(get_action_heap().pop()); XBT_DEBUG("Something happened to action %p", action); diff --git a/src/kernel/resource/CpuImpl.hpp b/src/kernel/resource/CpuImpl.hpp index 3456bfa133..af08d0cbbe 100644 --- a/src/kernel/resource/CpuImpl.hpp +++ b/src/kernel/resource/CpuImpl.hpp @@ -10,6 +10,7 @@ #include "simgrid/s4u/Host.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/kernel/resource/Resource.hpp" +#include "xbt/ex.h" #include @@ -170,7 +171,7 @@ protected: * Action * **********/ -/** @ingroup SURF_cpu_interface +/** @ingroup Model_cpu_interface * @brief A CpuAction represents the execution of code on one or several Cpus */ class XBT_PUBLIC CpuAction : public Action { diff --git a/src/kernel/resource/DiskImpl.hpp b/src/kernel/resource/DiskImpl.hpp index 15a1d6d207..55f6857cdd 100644 --- a/src/kernel/resource/DiskImpl.hpp +++ b/src/kernel/resource/DiskImpl.hpp @@ -3,23 +3,18 @@ /* 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 DISK_IMPL_HPP_ +#define DISK_IMPL_HPP_ + #include "simgrid/kernel/resource/Action.hpp" #include "simgrid/kernel/resource/Model.hpp" #include "simgrid/s4u/Disk.hpp" #include "simgrid/s4u/Io.hpp" #include "src/kernel/resource/Resource.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/PropertyHolder.hpp" #include -#ifndef DISK_IMPL_HPP_ -#define DISK_IMPL_HPP_ - -/********* - * Model * - *********/ - namespace simgrid::kernel::resource { /*********** * Classes * diff --git a/src/kernel/resource/FactorSet.cpp b/src/kernel/resource/FactorSet.cpp index 179498973b..8e42bb90c5 100644 --- a/src/kernel/resource/FactorSet.cpp +++ b/src/kernel/resource/FactorSet.cpp @@ -16,8 +16,8 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_resource); -extern std::string surf_parsed_filename; -extern int surf_parse_lineno; +extern std::string simgrid_parsed_filename; +extern int simgrid_parse_lineno; namespace simgrid::kernel::resource { @@ -62,7 +62,7 @@ void FactorSet::parse(const std::string& values) } } else { try { - fact.values.push_back(xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, *factor_iter, "")); + fact.values.push_back(xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, *factor_iter, "")); } catch (const std::invalid_argument&) { throw std::invalid_argument("Invalid factor value " + std::to_string(iteration) + " in chunk " + std::to_string(factors_.size() + 1) + ": " + *factor_iter + " for " + name_); diff --git a/src/surf/HostImpl.cpp b/src/kernel/resource/HostImpl.cpp similarity index 98% rename from src/surf/HostImpl.cpp rename to src/kernel/resource/HostImpl.cpp index f07e935f24..4dd7089bbf 100644 --- a/src/surf/HostImpl.cpp +++ b/src/kernel/resource/HostImpl.cpp @@ -7,9 +7,9 @@ #include #include -#include "xbt/asserts.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/VirtualMachineImpl.hpp" +#include "xbt/asserts.hpp" #include @@ -29,7 +29,8 @@ namespace simgrid::kernel::resource { ************/ HostImpl::HostImpl(const std::string& name) : piface_(this), name_(name) { - xbt_enforce(s4u::Host::by_name_or_null(name_) == nullptr, "Refusing to create a second host named '%s'.", get_cname()); + xbt_enforce(s4u::Host::by_name_or_null(name_) == nullptr, "Refusing to create a second host named '%s'.", + get_cname()); } HostImpl::~HostImpl() diff --git a/src/surf/HostImpl.hpp b/src/kernel/resource/HostImpl.hpp similarity index 90% rename from src/surf/HostImpl.hpp rename to src/kernel/resource/HostImpl.hpp index 8690555fd2..0de2d0b4be 100644 --- a/src/surf/HostImpl.hpp +++ b/src/kernel/resource/HostImpl.hpp @@ -3,8 +3,8 @@ /* 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 SURF_HOST_INTERFACE_HPP -#define SURF_HOST_INTERFACE_HPP +#ifndef SIMGRID_KERNEL_HOST_INTERFACE_HPP +#define SIMGRID_KERNEL_HOST_INTERFACE_HPP #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/resource/CpuImpl.hpp" @@ -18,8 +18,8 @@ namespace simgrid::kernel::resource { * Model * *********/ -/** @ingroup SURF_host_interface - * @brief SURF Host model interface class +/** @ingroup Model_host_interface + * @brief Host model interface class * @details A model is an object which handle the interactions between its Resources and its Actions */ class XBT_PRIVATE HostModel : public Model { @@ -29,14 +29,15 @@ public: virtual Action* execute_parallel(const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate) = 0; - virtual Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, double size) = 0; + virtual Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, + double size) = 0; }; /************ * Resource * ************/ -/** @ingroup SURF_host_interface - * @brief SURF Host interface class +/** @ingroup Model_host_interface + * @brief Host interface class * @details A host represents a machine with an aggregation of a Cpu, a RoutingEdge and Disk(s) */ class XBT_PRIVATE HostImpl : public xbt::PropertyHolder, public actor::ObjectAccessSimcallItem { @@ -52,7 +53,7 @@ class XBT_PRIVATE HostImpl : public xbt::PropertyHolder, public actor::ObjectAcc std::map> vms_; std::string name_{"noname"}; routing::NetZoneImpl* englobing_zone_ = nullptr; - bool sealed_ = false; + bool sealed_ = false; protected: virtual ~HostImpl(); // Use destroy() instead of this destructor. diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index 4df935ee14..6006754e4d 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -5,6 +5,7 @@ #include "simgrid/kernel/resource/Model.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "xbt/ex.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_resource); diff --git a/src/kernel/resource/NetworkModel.cpp b/src/kernel/resource/NetworkModel.cpp index 8a04dc4020..0d34f48797 100644 --- a/src/kernel/resource/NetworkModel.cpp +++ b/src/kernel/resource/NetworkModel.cpp @@ -5,11 +5,10 @@ #include -#include "simgrid/sg_config.hpp" #include "src/kernel/resource/FactorSet.hpp" #include "src/kernel/resource/NetworkModel.hpp" #include "src/kernel/resource/profile/Profile.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/sg_config.hpp" #include diff --git a/src/kernel/resource/NetworkModel.hpp b/src/kernel/resource/NetworkModel.hpp index 9963ff9d9c..350877794c 100644 --- a/src/kernel/resource/NetworkModel.hpp +++ b/src/kernel/resource/NetworkModel.hpp @@ -18,8 +18,8 @@ namespace simgrid::kernel::resource { * Model * *********/ -/** @ingroup SURF_network_interface - * @brief SURF network model interface class +/** @ingroup Model_network_interface + * @brief Network model interface class * @details A model is an object which handles the interactions between its Resources and its Actions */ class NetworkModel : public Model, public NetworkModelFactors { @@ -63,8 +63,8 @@ public: /********** * Action * **********/ -/** @ingroup SURF_network_interface - * @brief SURF network action interface class +/** @ingroup Model_network_interface + * @brief Network action interface class * @details A NetworkAction represents a communication between two [hosts](@ref HostImpl) */ class NetworkAction : public Action { diff --git a/src/kernel/resource/NetworkModelFactors.cpp b/src/kernel/resource/NetworkModelFactors.cpp index 06ea79c810..3e9f8cf278 100644 --- a/src/kernel/resource/NetworkModelFactors.cpp +++ b/src/kernel/resource/NetworkModelFactors.cpp @@ -4,7 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/resource/NetworkModelFactors.hpp" -#include "simgrid/sg_config.hpp" +#include "src/simgrid/sg_config.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); diff --git a/src/kernel/resource/NetworkModelFactors.hpp b/src/kernel/resource/NetworkModelFactors.hpp index 40a4fae5a4..b01ae2894d 100644 --- a/src/kernel/resource/NetworkModelFactors.hpp +++ b/src/kernel/resource/NetworkModelFactors.hpp @@ -6,8 +6,8 @@ #ifndef SIMGRID_KERNEL_RESOURCE_NETWORKMODELFACTORS_HPP #define SIMGRID_KERNEL_RESOURCE_NETWORKMODELFACTORS_HPP -#include "simgrid/sg_config.hpp" #include "src/kernel/resource/FactorSet.hpp" +#include "src/simgrid/sg_config.hpp" #include "xbt/asserts.h" #include diff --git a/src/kernel/resource/NetworkModelFactors_test.cpp b/src/kernel/resource/NetworkModelFactors_test.cpp index 4f218c9798..0d5064ba44 100644 --- a/src/kernel/resource/NetworkModelFactors_test.cpp +++ b/src/kernel/resource/NetworkModelFactors_test.cpp @@ -3,12 +3,12 @@ /* 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 "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.hpp" #include "src/internal_config.h" // HAVE_SMPI #include "src/kernel/resource/NetworkModelFactors.hpp" +#include "src/simgrid/sg_config.hpp" static double factor_cb(double, const simgrid::s4u::Host*, const simgrid::s4u::Host*, const std::vector&, const std::unordered_set&) diff --git a/src/kernel/resource/Resource.hpp b/src/kernel/resource/Resource.hpp index 0f5bda2883..bf67c6a42f 100644 --- a/src/kernel/resource/Resource.hpp +++ b/src/kernel/resource/Resource.hpp @@ -20,8 +20,8 @@ namespace simgrid::kernel::resource { -/** @ingroup SURF_interface - * @brief SURF resource interface class +/** @ingroup Model_interface + * @brief Resource interface class * @details This is the ancestor class of every resources in SimGrid, such as links, CPU or disk */ class XBT_PUBLIC Resource : public actor::ObjectAccessSimcallItem { diff --git a/src/kernel/resource/SplitDuplexLinkImpl.hpp b/src/kernel/resource/SplitDuplexLinkImpl.hpp index 8708018e4e..dc574f7645 100644 --- a/src/kernel/resource/SplitDuplexLinkImpl.hpp +++ b/src/kernel/resource/SplitDuplexLinkImpl.hpp @@ -14,8 +14,8 @@ namespace simgrid::kernel::resource { /************ * Resource * ************/ -/** @ingroup SURF_network_interface - * @brief SURF network link interface class +/** @ingroup Model_network_interface + * @brief Network link interface class * @details A Link represents the link between two [hosts](@ref HostImpl) */ class SplitDuplexLinkImpl : public LinkImpl { diff --git a/src/kernel/resource/SplitDuplexLinkImpl_test.cpp b/src/kernel/resource/SplitDuplexLinkImpl_test.cpp index d4c51fff8e..3e3797d131 100644 --- a/src/kernel/resource/SplitDuplexLinkImpl_test.cpp +++ b/src/kernel/resource/SplitDuplexLinkImpl_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include #include diff --git a/src/kernel/resource/StandardLinkImpl.cpp b/src/kernel/resource/StandardLinkImpl.cpp index 30471d020b..9e50e7acdd 100644 --- a/src/kernel/resource/StandardLinkImpl.cpp +++ b/src/kernel/resource/StandardLinkImpl.cpp @@ -62,11 +62,11 @@ void StandardLinkImpl::set_sharing_policy(s4u::Link::SharingPolicy policy, const void StandardLinkImpl::latency_check(double latency) const { - static double last_warned_latency = sg_surf_precision; + static double last_warned_latency = sg_precision_timing; if (latency != 0.0 && latency < last_warned_latency) { - XBT_WARN("Latency for link %s is smaller than surf/precision (%g < %g)." - " For more accuracy, consider setting \"--cfg=surf/precision:%g\".", - get_cname(), latency, sg_surf_precision, latency); + XBT_WARN("Latency for link %s is smaller than precision/timing (%g < %g)." + " For more accuracy, consider setting \"--cfg=precision/timing:%g\".", + get_cname(), latency, sg_precision_timing, latency); last_warned_latency = latency; } } diff --git a/src/kernel/resource/VirtualMachineImpl.cpp b/src/kernel/resource/VirtualMachineImpl.cpp index 5bff857496..1cf155fca2 100644 --- a/src/kernel/resource/VirtualMachineImpl.cpp +++ b/src/kernel/resource/VirtualMachineImpl.cpp @@ -8,18 +8,19 @@ #include #include -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/ExecImpl.hpp" #include "src/kernel/resource/VirtualMachineImpl.hpp" -#include "src/surf/cpu_cas01.hpp" -#include "src/surf/cpu_ti.hpp" +#include "src/kernel/resource/models/cpu_cas01.hpp" +#include "src/kernel/resource/models/cpu_ti.hpp" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_vm, ker_resource, "Virtual Machines, containing actors and mobile across hosts"); -void surf_vm_model_init_HL13() +void simgrid_vm_model_init_HL13() { auto* cpu_pm_model = simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->get_cpu_pm_model().get(); auto vm_model = std::make_shared("VM_HL13"); @@ -333,7 +334,6 @@ void VirtualMachineImpl::shutdown(actor::ActorImpl* issuer) set_state(s4u::VirtualMachine::State::DESTROYED); s4u::VirtualMachine::on_shutdown(*get_iface()); - /* FIXME: we may have to do something at the surf layer, e.g., vcpu action */ } /** @brief Change the physical host on which the given VM is running diff --git a/src/kernel/resource/VirtualMachineImpl.hpp b/src/kernel/resource/VirtualMachineImpl.hpp index 93bc7044be..8d51c7df04 100644 --- a/src/kernel/resource/VirtualMachineImpl.hpp +++ b/src/kernel/resource/VirtualMachineImpl.hpp @@ -5,7 +5,7 @@ #include -#include "src/surf/HostImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #ifndef VM_INTERFACE_HPP_ #define VM_INTERFACE_HPP_ @@ -83,8 +83,8 @@ private: /********* * Model * *********/ -/** @ingroup SURF_vm_interface - * @brief SURF VM model interface class +/** @ingroup Model_vm_interface + * @brief VM model interface class * @details A model is an object which handle the interactions between its Resources and its Actions */ class XBT_PRIVATE VMModel : public HostModel { diff --git a/src/kernel/resource/WifiLinkImpl.cpp b/src/kernel/resource/WifiLinkImpl.cpp index 52e5222614..0d5ed17801 100644 --- a/src/kernel/resource/WifiLinkImpl.cpp +++ b/src/kernel/resource/WifiLinkImpl.cpp @@ -5,9 +5,8 @@ #include -#include "src/kernel/resource/WifiLinkImpl.hpp" -#include "src/surf/surf_interface.hpp" #include "src/kernel/activity/CommImpl.hpp" +#include "src/kernel/resource/WifiLinkImpl.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); @@ -82,7 +81,7 @@ void WifiLinkImpl::dec_active_flux() void WifiLinkImpl::update_bw_comm_start(const kernel::activity::CommImpl& comm) { - auto const* actionWifi = dynamic_cast(comm.surf_action_); + auto const* actionWifi = dynamic_cast(comm.model_action_); if (actionWifi == nullptr) return; diff --git a/src/kernel/resource/WifiLinkImpl.hpp b/src/kernel/resource/WifiLinkImpl.hpp index 6bfc89e759..cd08f6dedd 100644 --- a/src/kernel/resource/WifiLinkImpl.hpp +++ b/src/kernel/resource/WifiLinkImpl.hpp @@ -3,11 +3,11 @@ /* 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 SURF_NETWORK_WIFI_HPP_ -#define SURF_NETWORK_WIFI_HPP_ +#ifndef SIMGRID_KERNEL_NETWORK_WIFI_HPP_ +#define SIMGRID_KERNEL_NETWORK_WIFI_HPP_ -#include "src/surf/network_cm02.hpp" -#include "xbt/base.h" +#include "src/kernel/resource/models/network_cm02.hpp" +#include "xbt/ex.h" /*********** * Classes * diff --git a/src/surf/cpu_cas01.cpp b/src/kernel/resource/models/cpu_cas01.cpp similarity index 96% rename from src/surf/cpu_cas01.cpp rename to src/kernel/resource/models/cpu_cas01.cpp index 83aa5f9654..c9386243f9 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/kernel/resource/models/cpu_cas01.cpp @@ -6,12 +6,12 @@ #include #include -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" +#include "src/kernel/resource/models/cpu_cas01.hpp" +#include "src/kernel/resource/models/cpu_ti.hpp" #include "src/kernel/resource/profile/Event.hpp" -#include "src/surf/cpu_cas01.hpp" -#include "src/surf/cpu_ti.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_cas, res_cpu, "CPU resource, CAS01 model (used by default)"); @@ -159,7 +159,7 @@ CpuAction* CpuCas01::execution_start(double size, int requested_cores, double us CpuAction* CpuCas01::sleep(double duration) { if (duration > 0) - duration = std::max(duration, sg_surf_precision); + duration = std::max(duration, sg_precision_timing); XBT_IN("(%s, %g)", get_cname(), duration); auto* action = new CpuCas01Action(get_model(), 1.0, not is_on(), speed_.scale * speed_.peak, get_constraint(), 1); diff --git a/src/surf/cpu_cas01.hpp b/src/kernel/resource/models/cpu_cas01.hpp similarity index 88% rename from src/surf/cpu_cas01.hpp rename to src/kernel/resource/models/cpu_cas01.hpp index e7e9a57c85..b1cc67b084 100644 --- a/src/surf/cpu_cas01.hpp +++ b/src/kernel/resource/models/cpu_cas01.hpp @@ -3,11 +3,10 @@ /* 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_SURF_CPUCAS01_HPP -#define SIMGRID_SURF_CPUCAS01_HPP +#ifndef SIMGRID_MODEL_CPU_CAS01_HPP +#define SIMGRID_MODEL_CPU_CAS01_HPP #include "src/kernel/resource/CpuImpl.hpp" -#include "xbt/base.h" namespace simgrid::kernel::resource { @@ -26,7 +25,7 @@ class XBT_PRIVATE CpuCas01Action; class CpuCas01Model : public CpuModel { public: explicit CpuCas01Model(const std::string& name); - CpuCas01Model(const CpuCas01Model&) = delete; + CpuCas01Model(const CpuCas01Model&) = delete; CpuCas01Model& operator=(const CpuCas01Model&) = delete; CpuImpl* create_cpu(s4u::Host* host, const std::vector& speed_per_pstate) override; @@ -41,7 +40,7 @@ class CpuCas01 : public CpuImpl { public: using CpuImpl::CpuImpl; - CpuCas01(const CpuCas01&) = delete; + CpuCas01(const CpuCas01&) = delete; CpuCas01& operator=(const CpuCas01&) = delete; void apply_event(profile::Event* event, double value) override; CpuAction* execution_start(double size, double user_bound) override; @@ -61,7 +60,7 @@ class CpuCas01Action : public CpuAction { public: CpuCas01Action(Model* model, double cost, bool failed, double speed, lmm::Constraint* constraint, int requested_core); - CpuCas01Action(const CpuCas01Action&) = delete; + CpuCas01Action(const CpuCas01Action&) = delete; CpuCas01Action& operator=(const CpuCas01Action&) = delete; int requested_core() const { return requested_core_; } }; diff --git a/src/surf/cpu_ti.cpp b/src/kernel/resource/models/cpu_ti.cpp similarity index 96% rename from src/surf/cpu_ti.cpp rename to src/kernel/resource/models/cpu_ti.cpp index 954ae50a67..401a212ef5 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/kernel/resource/models/cpu_ti.cpp @@ -6,11 +6,11 @@ #include "cpu_ti.hpp" #include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/s4u/Engine.hpp" -#include "xbt/asserts.h" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/profile/Event.hpp" #include "src/kernel/resource/profile/Profile.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" +#include "xbt/asserts.h" #include #include @@ -27,15 +27,15 @@ namespace simgrid::kernel::resource { CpuTiProfile::CpuTiProfile(const profile::Profile* profile) { - double integral = 0; - double time = 0; - double prev_value = 1; - const std::vector& events=profile->get_event_list(); + double integral = 0; + double time = 0; + double prev_value = 1; + const std::vector& events = profile->get_event_list(); xbt_assert(not events.empty()); unsigned long nb_points = events.size() + 1; time_points_.reserve(nb_points); integral_.reserve(nb_points); - for (auto const& val : events) { + for (auto const& val : events) { time += val.date_; integral += val.date_ * prev_value; time_points_.push_back(time); @@ -43,11 +43,11 @@ CpuTiProfile::CpuTiProfile(const profile::Profile* profile) prev_value = val.value_; } - double delay=profile->get_repeat_delay()+ events.at(0).date_; + double delay = profile->get_repeat_delay() + events.at(0).date_; - xbt_assert( events.back().value_==prev_value,"Profiles need to end as they start"); + xbt_assert(events.back().value_ == prev_value, "Profiles need to end as they start"); time += delay; - integral += delay*prev_value; + integral += delay * prev_value; time_points_.push_back(time); integral_.push_back(integral); @@ -56,7 +56,7 @@ CpuTiProfile::CpuTiProfile(const profile::Profile* profile) /** * @brief Integrate trace * - * Wrapper around surf_cpu_integrate_trace_simple() to get + * Wrapper around profile_->integrate_simple() to get * the cyclic effect. * * @param a Begin of interval @@ -120,7 +120,7 @@ double CpuTiProfile::integrate_simple_point(double a) const XBT_DEBUG("a %f ind %ld integral %f ind + 1 %f ind %f time +1 %f time %f", a, ind, integral, integral_[ind + 1], integral_[ind], time_points_[ind + 1], time_points_[ind]); - double_update(&a_aux, time_points_[ind], sg_maxmin_precision * sg_surf_precision); + double_update(&a_aux, time_points_[ind], sg_precision_workamount * sg_precision_timing); if (a_aux > 0) integral += ((integral_[ind + 1] - integral_[ind]) / (time_points_[ind + 1] - time_points_[ind])) * (a - time_points_[ind]); @@ -311,7 +311,7 @@ double CpuTiModel::next_occurring_event(double now) void CpuTiModel::update_actions_state(double now, double /*delta*/) { - while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) { + while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_precision_timing)) { auto* action = static_cast(get_action_heap().pop()); XBT_DEBUG("Action %p: finish", action); action->finish(Action::State::FINISHED); @@ -520,7 +520,7 @@ CpuAction* CpuTi::execution_start(double size, double user_bound) CpuAction* CpuTi::sleep(double duration) { if (duration > 0) - duration = std::max(duration, sg_surf_precision); + duration = std::max(duration, sg_precision_timing); XBT_IN("(%s,%g)", get_cname(), duration); auto* action = new CpuTiAction(this, 1.0); diff --git a/src/surf/cpu_ti.hpp b/src/kernel/resource/models/cpu_ti.hpp similarity index 89% rename from src/surf/cpu_ti.hpp rename to src/kernel/resource/models/cpu_ti.hpp index 5c6aabbd5a..214013f5a4 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/kernel/resource/models/cpu_ti.hpp @@ -3,11 +3,13 @@ /* 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 SURF_MODEL_CPUTI_HPP_ -#define SURF_MODEL_CPUTI_HPP_ +#ifndef SIMGRID_MODEL_CPUTI_HPP_ +#define SIMGRID_MODEL_CPUTI_HPP_ #include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/profile/Profile.hpp" +#include "xbt/ex.h" + #include #include @@ -44,7 +46,7 @@ class CpuTiTmgr { FIXED, /*< Trace fixed, no availability file */ DYNAMIC /*< Dynamic, have an availability file */ }; - Type type_ = Type::FIXED; + Type type_ = Type::FIXED; double value_ = 0.0; /*< Percentage of cpu speed available. Value fixed between 0 and 1 */ /* Dynamic */ @@ -57,7 +59,7 @@ class CpuTiTmgr { public: explicit CpuTiTmgr(double value) : value_(value){}; CpuTiTmgr(profile::Profile* speed_profile, double value); - CpuTiTmgr(const CpuTiTmgr&) = delete; + CpuTiTmgr(const CpuTiTmgr&) = delete; CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; double integrate(double a, double b) const; @@ -71,9 +73,10 @@ public: class XBT_PRIVATE CpuTiAction : public CpuAction { friend class CpuTi; + public: CpuTiAction(CpuTi* cpu, double cost); - CpuTiAction(const CpuTiAction&) = delete; + CpuTiAction(const CpuTiAction&) = delete; CpuTiAction& operator=(const CpuTiAction&) = delete; ~CpuTiAction() override; @@ -84,7 +87,7 @@ public: void set_sharing_penalty(double sharing_penalty) override; double get_remains() override; - CpuTi *cpu_; + CpuTi* cpu_; boost::intrusive::list_member_hook<> action_ti_hook; }; @@ -123,8 +126,8 @@ public: CpuTiTmgr* speed_integrated_trace_ = nullptr; /*< Structure with data needed to integrate trace file */ ActionTiList action_set_; /*< set with all actions running on cpu */ - double sum_priority_ = 0; /*< the sum of actions' priority that are running on cpu */ - double last_update_ = 0; /*< last update of actions' remaining amount done */ + double sum_priority_ = 0; /*< the sum of actions' priority that are running on cpu */ + double last_update_ = 0; /*< last update of actions' remaining amount done */ boost::intrusive::list_member_hook<> cpu_ti_hook; }; @@ -141,7 +144,7 @@ public: static void create_pm_models(); // Make CPU PM model using CpuModel::CpuModel; - CpuTiModel(const CpuTiModel&) = delete; + CpuTiModel(const CpuTiModel&) = delete; CpuTiModel& operator=(const CpuTiModel&) = delete; CpuImpl* create_cpu(s4u::Host* host, const std::vector& speed_per_pstate) override; double next_occurring_event(double now) override; @@ -152,4 +155,4 @@ public: } // namespace simgrid::kernel::resource -#endif /* SURF_MODEL_CPUTI_HPP_ */ +#endif /* SIMGRID_MODEL_CPUTI_HPP_ */ diff --git a/src/surf/disk_s19.cpp b/src/kernel/resource/models/disk_s19.cpp similarity index 97% rename from src/surf/disk_s19.cpp rename to src/kernel/resource/models/disk_s19.cpp index 35ad4fd2a4..5d11e78028 100644 --- a/src/surf/disk_s19.cpp +++ b/src/kernel/resource/models/disk_s19.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/sg_config.hpp" +#include "src/simgrid/sg_config.hpp" #include #include #include @@ -11,8 +11,9 @@ #include "src/kernel/EngineImpl.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/kernel/resource/models/disk_s19.hpp" #include "src/kernel/resource/profile/Event.hpp" -#include "src/surf/disk_s19.hpp" +#include "src/simgrid/module.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk); /*********** @@ -43,7 +44,6 @@ DiskS19Model::DiskS19Model(const std::string& name) : DiskModel(name) set_maxmin_system(lmm::System::build(cfg_disk_solver.get(), true /* selective update */)); } - DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) { return (new DiskS19(name, read_bandwidth, write_bandwidth))->set_model(this); diff --git a/src/surf/disk_s19.hpp b/src/kernel/resource/models/disk_s19.hpp similarity index 96% rename from src/surf/disk_s19.hpp rename to src/kernel/resource/models/disk_s19.hpp index c4a647366d..8da736c81c 100644 --- a/src/surf/disk_s19.hpp +++ b/src/kernel/resource/models/disk_s19.hpp @@ -27,7 +27,7 @@ class XBT_PRIVATE DiskS19Action; class DiskS19Model : public DiskModel { public: explicit DiskS19Model(const std::string& name); - DiskS19Model(const DiskS19Model&) = delete; + DiskS19Model(const DiskS19Model&) = delete; DiskS19Model& operator=(const DiskS19Model&) = delete; DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override; diff --git a/src/surf/host_clm03.cpp b/src/kernel/resource/models/host_clm03.cpp similarity index 91% rename from src/surf/host_clm03.cpp rename to src/kernel/resource/models/host_clm03.cpp index 5fc159498c..2c4afc6f23 100644 --- a/src/surf/host_clm03.cpp +++ b/src/kernel/resource/models/host_clm03.cpp @@ -7,10 +7,11 @@ #include #include -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/host_clm03.hpp" +#include "src/kernel/resource/models/host_clm03.hpp" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_host); @@ -53,17 +54,17 @@ Action* HostCLM03Model::io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u:: double size) { auto net_model = src_host->get_englobing_zone()->get_network_model(); - auto system = net_model->get_maxmin_system(); - auto* action = net_model->communicate(src_host, dst_host, size, -1, true); + auto system = net_model->get_maxmin_system(); + auto* action = net_model->communicate(src_host, dst_host, size, -1, true); // We don't want to apply the network model bandwidth factor to the I/O constraints double bw_factor = net_model->get_bandwidth_factor(); - if (src_disk != nullptr){ - //FIXME: if the stream starts from a disk, we might not want to pay the network latency + if (src_disk != nullptr) { + // FIXME: if the stream starts from a disk, we might not want to pay the network latency system->expand(src_disk->get_constraint(), action->get_variable(), bw_factor); system->expand(src_disk->get_read_constraint(), action->get_variable(), bw_factor); } - if (dst_disk != nullptr){ + if (dst_disk != nullptr) { system->expand(dst_disk->get_constraint(), action->get_variable(), bw_factor); system->expand(dst_disk->get_write_constraint(), action->get_variable(), bw_factor); } diff --git a/src/surf/host_clm03.hpp b/src/kernel/resource/models/host_clm03.hpp similarity index 88% rename from src/surf/host_clm03.hpp rename to src/kernel/resource/models/host_clm03.hpp index 8af735e20e..65715c4d36 100644 --- a/src/surf/host_clm03.hpp +++ b/src/kernel/resource/models/host_clm03.hpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/surf/HostImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #ifndef HOST_CLM03_HPP_ #define HOST_CLM03_HPP_ @@ -22,7 +22,8 @@ public: Action* execute_thread(const s4u::Host* host, double flops_amount, int thread_count) override; Action* execute_parallel(const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate) override; - Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, double size) override; + Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, + double size) override; }; } // namespace simgrid::kernel::resource diff --git a/src/surf/network_cm02.cpp b/src/kernel/resource/models/network_cm02.cpp similarity index 98% rename from src/surf/network_cm02.cpp rename to src/kernel/resource/models/network_cm02.cpp index 54e369e2e3..2b1e5d1337 100644 --- a/src/surf/network_cm02.cpp +++ b/src/kernel/resource/models/network_cm02.cpp @@ -3,16 +3,17 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/surf/network_cm02.hpp" +#include "src/kernel/resource/models/network_cm02.hpp" #include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include "src/kernel/resource/WifiLinkImpl.hpp" #include "src/kernel/resource/profile/Event.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/math_utils.h" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" #include #include @@ -162,7 +163,7 @@ StandardLinkImpl* NetworkCm02Model::create_wifi_link(const std::string& name, co void NetworkCm02Model::update_actions_state_lazy(double now, double /*delta*/) { - while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) { + while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_precision_timing)) { auto* action = static_cast(get_action_heap().pop()); XBT_DEBUG("Something happened to action %p", action); @@ -192,7 +193,7 @@ void NetworkCm02Model::update_actions_state_full(double /*now*/, double delta) XBT_DEBUG("Something happened to action %p", &action); if (action.latency_ > 0) { if (action.latency_ > delta) { - double_update(&action.latency_, delta, sg_surf_precision); + double_update(&action.latency_, delta, sg_precision_timing); } else { action.latency_ = 0.0; } diff --git a/src/surf/network_cm02.hpp b/src/kernel/resource/models/network_cm02.hpp similarity index 94% rename from src/surf/network_cm02.hpp rename to src/kernel/resource/models/network_cm02.hpp index 4c83bc7572..2b8ed4d186 100644 --- a/src/surf/network_cm02.hpp +++ b/src/kernel/resource/models/network_cm02.hpp @@ -3,8 +3,8 @@ /* 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 SURF_NETWORK_CM02_HPP_ -#define SURF_NETWORK_CM02_HPP_ +#ifndef SIMGRID_MODEL_NETWORK_CM02_HPP_ +#define SIMGRID_MODEL_NETWORK_CM02_HPP_ #include "src/kernel/resource/NetworkModel.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" @@ -69,12 +69,11 @@ public: * Action * **********/ class NetworkCm02Action : public NetworkAction { - friend Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate, - bool streamed); + friend Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate, bool streamed); public: using NetworkAction::NetworkAction; void update_remains_lazy(double now) override; }; } // namespace simgrid::kernel::resource -#endif /* SURF_NETWORK_CM02_HPP_ */ +#endif /* SIMGRID_MODEL_NETWORK_CM02_HPP_ */ diff --git a/src/surf/network_constant.cpp b/src/kernel/resource/models/network_constant.cpp similarity index 94% rename from src/surf/network_constant.cpp rename to src/kernel/resource/models/network_constant.cpp index 6183b2da80..c55982ecdb 100644 --- a/src/surf/network_constant.cpp +++ b/src/kernel/resource/models/network_constant.cpp @@ -7,8 +7,9 @@ #include #include "src/kernel/EngineImpl.hpp" -#include "src/surf/network_constant.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/kernel/resource/models/network_constant.hpp" +#include "src/simgrid/math_utils.h" +#include "src/simgrid/module.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); @@ -60,7 +61,7 @@ void NetworkConstantModel::update_actions_state(double /*now*/, double delta) ++it; // increment iterator here since the following calls to action.finish() may invalidate it if (action.latency_ > 0) { if (action.latency_ > delta) { - double_update(&action.latency_, delta, sg_surf_precision); + double_update(&action.latency_, delta, sg_precision_timing); } else { action.latency_ = 0.0; } diff --git a/src/surf/network_constant.hpp b/src/kernel/resource/models/network_constant.hpp similarity index 100% rename from src/surf/network_constant.hpp rename to src/kernel/resource/models/network_constant.hpp diff --git a/src/surf/network_ib.cpp b/src/kernel/resource/models/network_ib.cpp similarity index 94% rename from src/surf/network_ib.cpp rename to src/kernel/resource/models/network_ib.cpp index 04fba51398..e00b347588 100644 --- a/src/surf/network_ib.cpp +++ b/src/kernel/resource/models/network_ib.cpp @@ -5,24 +5,22 @@ #include -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/CommImpl.hpp" -#include "src/surf/HostImpl.hpp" -#include "src/surf/network_ib.hpp" +#include "src/kernel/resource/HostImpl.hpp" +#include "src/kernel/resource/models/network_ib.hpp" +#include "src/simgrid/math_utils.h" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" #include #include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); -/********* - * Model * - *********/ - -/************************************************************************/ -/* New model based on MPI contention model for Infiniband platforms */ -/************************************************************************/ +/****************************************************************/ +/* Model based on MPI contention model for Infiniband platforms */ +/****************************************************************/ /* @Inproceedings{mescal_vienne_phd, */ /* author={Jérôme Vienne}, */ /* title={prédiction de performances d’applications de calcul haute performance sur réseau Infiniband}, */ @@ -72,7 +70,7 @@ void NetworkIBModel::IB_action_state_changed_callback(NetworkAction& action, Act void NetworkIBModel::IB_comm_start_callback(const activity::CommImpl& comm) { - auto* action = static_cast(comm.surf_action_); + auto* action = static_cast(comm.model_action_); auto* ibModel = static_cast(action->get_model()); auto* act_src = &ibModel->active_nodes.at(action->get_src().get_name()); auto* act_dst = &ibModel->active_nodes.at(action->get_dst().get_name()); @@ -143,7 +141,7 @@ void NetworkIBModel::compute_IB_factors(IBNode* root) const double penalized_bw = num_comm_out ? comm->init_rate / penalty : comm->init_rate; - if (not double_equals(penalized_bw, rate_before_update, sg_surf_precision)) { + if (not double_equals(penalized_bw, rate_before_update, sg_precision_timing)) { XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id_, comm->destination->id_, comm->action, penalized_bw, comm->action->get_bound(), comm->init_rate); get_maxmin_system()->update_variable_bound(comm->action->get_variable(), penalized_bw); diff --git a/src/surf/network_ib.hpp b/src/kernel/resource/models/network_ib.hpp similarity index 84% rename from src/surf/network_ib.hpp rename to src/kernel/resource/models/network_ib.hpp index a97ed9e4c3..38798b1454 100644 --- a/src/surf/network_ib.hpp +++ b/src/kernel/resource/models/network_ib.hpp @@ -1,14 +1,12 @@ -/* Copyright (c) 2014-2023. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2023. 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 SURF_NETWORK_IB_HPP_ -#define SURF_NETWORK_IB_HPP_ +#ifndef SIMGRID_MODEL_NETWORK_IB_HPP_ +#define SIMGRID_MODEL_NETWORK_IB_HPP_ -#include "src/surf/network_cm02.hpp" -#include "xbt/base.h" +#include "src/kernel/resource/models/network_cm02.hpp" #include #include @@ -47,7 +45,7 @@ class XBT_PRIVATE NetworkIBModel : public NetworkCm02Model { public: explicit NetworkIBModel(const std::string& name); - NetworkIBModel(const NetworkIBModel&) = delete; + NetworkIBModel(const NetworkIBModel&) = delete; NetworkIBModel& operator=(const NetworkIBModel&) = delete; void update_IB_factors(NetworkAction* action, IBNode* from, IBNode* to, int remove) const; diff --git a/src/surf/network_ns3.cpp b/src/kernel/resource/models/network_ns3.cpp similarity index 97% rename from src/surf/network_ns3.cpp rename to src/kernel/resource/models/network_ns3.cpp index aaa77ed748..eded3ed093 100644 --- a/src/surf/network_ns3.cpp +++ b/src/kernel/resource/models/network_ns3.cpp @@ -9,6 +9,8 @@ #include #include +#include "src/simgrid/math_utils.h" +#include "src/simgrid/module.hpp" #include "xbt/config.hpp" #include "xbt/str.h" #include "xbt/string.hpp" @@ -29,7 +31,7 @@ #include "ns3/wifi-module.h" #include "network_ns3.hpp" -#include "ns3/ns3_simulator.hpp" +#include "src/kernel/resource/models/ns3/ns3_simulator.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/kernel/routing/NetZoneImpl.hpp" @@ -37,10 +39,9 @@ #include "simgrid/plugins/energy.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals +#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the signals #include "src/kernel/EngineImpl.hpp" -#include "src/surf/surf_interface.hpp" -#include "src/surf/xml/platf_private.hpp" // ClusterCreationArgs +#include "src/kernel/xml/platf_private.hpp" // ClusterCreationArgs XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_ns3, res_network, "Network model based on ns-3"); @@ -101,7 +102,7 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone) wifi.SetStandard(ns3::WIFI_STANDARD_80211n_5GHZ); #else wifi.SetStandard(ns3::WIFI_STANDARD_80211n); - wifiPhy.Set ("ChannelSettings", ns3::StringValue ("{0, 0, BAND_5GHZ, 0}")); + wifiPhy.Set("ChannelSettings", ns3::StringValue("{0, 0, BAND_5GHZ, 0}")); #endif std::string ssid = wifizone->get_name(); @@ -141,9 +142,9 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone) NetPointNs3* station_netpoint_ns3 = nullptr; ns3::Ptr station_ns3_node = nullptr; double distance; - double angle = 0; + double angle = 0; auto nb_stations = static_cast(wifizone->get_all_hosts().size() - 1); - double step = 2 * M_PI / nb_stations; + double step = 2 * M_PI / nb_stations; for (const auto* station_host : wifizone->get_all_hosts()) { station_netpoint_ns3 = station_host->get_netpoint()->extension(); if (station_netpoint_ns3 == access_point_netpoint_ns3) @@ -395,12 +396,12 @@ double NetworkNS3Model::next_occurring_event(double now) // NS-3 stops as soon as a flow ends, // but it does not process the other flows that may finish at the same (simulated) time. // If another flow ends at the same time, time_to_next_flow_completion = 0 - if (double_equals(time_to_next_flow_completion, 0, sg_surf_precision)) + if (double_equals(time_to_next_flow_completion, 0, sg_precision_timing)) time_to_next_flow_completion = 0.0; - XBT_DEBUG("min : %f", now); - XBT_DEBUG("ns3 time : %f", ns3::Simulator::Now().GetSeconds()); - XBT_DEBUG("surf time : %f", EngineImpl::get_clock()); + XBT_DEBUG("min : %f", now); + XBT_DEBUG("ns-3 time : %f", ns3::Simulator::Now().GetSeconds()); + XBT_DEBUG("simgrid time: %f", EngineImpl::get_clock()); XBT_DEBUG("Next completion %f :", time_to_next_flow_completion); return time_to_next_flow_completion; @@ -515,7 +516,7 @@ NetworkNS3Action::NetworkNS3Action(Model* model, double totalBytes, s4u::Host* s // If there is no other started actions, we need to move NS-3 forward to be sync with SimGrid if (model->get_started_action_set()->size() == 1) { - while (double_positive(EngineImpl::get_clock() - ns3::Simulator::Now().GetSeconds(), sg_surf_precision)) { + while (double_positive(EngineImpl::get_clock() - ns3::Simulator::Now().GetSeconds(), sg_precision_timing)) { XBT_DEBUG("Synchronizing NS-3 (time %f) with SimGrid (time %f)", ns3::Simulator::Now().GetSeconds(), EngineImpl::get_clock()); ns3_simulator(EngineImpl::get_clock() - ns3::Simulator::Now().GetSeconds()); diff --git a/src/surf/network_ns3.hpp b/src/kernel/resource/models/network_ns3.hpp similarity index 99% rename from src/surf/network_ns3.hpp rename to src/kernel/resource/models/network_ns3.hpp index 35244212f4..9ec2c4ba31 100644 --- a/src/surf/network_ns3.hpp +++ b/src/kernel/resource/models/network_ns3.hpp @@ -7,6 +7,7 @@ #define NETWORK_NS3_HPP_ #include "xbt/base.h" +#include "xbt/ex.h" #include "src/kernel/resource/NetworkModel.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" diff --git a/src/surf/ns3/ns3_simulator.cpp b/src/kernel/resource/models/ns3/ns3_simulator.cpp similarity index 94% rename from src/surf/ns3/ns3_simulator.cpp rename to src/kernel/resource/models/ns3/ns3_simulator.cpp index c4b3b5e76b..0c13eab9e2 100644 --- a/src/surf/ns3/ns3_simulator.cpp +++ b/src/kernel/resource/models/ns3/ns3_simulator.cpp @@ -3,16 +3,17 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/surf/ns3/ns3_simulator.hpp" +#include "src/kernel/resource/models/ns3/ns3_simulator.hpp" + #include "xbt/log.h" #include "xbt/sysdep.h" -#include -#include #include -#include #include +#include #include +#include +#include #include @@ -56,7 +57,7 @@ static void receive_callback(ns3::Ptr socket) static void send_cb(ns3::Ptr sock, uint32_t /*txSpace*/) { - SgFlow* flow = getFlowFromSocket(sock); + SgFlow* flow = getFlowFromSocket(sock); const ns3::ApplicationContainer* sink = getSinkFromSocket(sock); XBT_DEBUG("Asked to write on F[%p, total: %u, remain: %u]", flow, flow->total_bytes_, flow->remaining_); @@ -83,14 +84,14 @@ static void send_cb(ns3::Ptr sock, uint32_t /*txSpace*/) flow->remaining_); } - if (flow->buffered_bytes_ >= flow->total_bytes_){ + if (flow->buffered_bytes_ >= flow->total_bytes_) { XBT_DEBUG("Closing Sockets of flow %p", flow); // Closing the sockets of the receiving application - ns3::Ptr app = ns3::DynamicCast(sink->Get(0)); + ns3::Ptr app = ns3::DynamicCast(sink->Get(0)); ns3::Ptr listening_sock = app->GetListeningSocket(); listening_sock->Close(); listening_sock->SetRecvCallback(ns3::MakeNullCallback>()); - for(ns3::Ptr accepted_sock : app->GetAcceptedSockets()) + for (ns3::Ptr accepted_sock : app->GetAcceptedSockets()) accepted_sock->Close(); // Closing the socket of the sender sock->Close(); diff --git a/src/surf/ns3/ns3_simulator.hpp b/src/kernel/resource/models/ns3/ns3_simulator.hpp similarity index 96% rename from src/surf/ns3/ns3_simulator.hpp rename to src/kernel/resource/models/ns3/ns3_simulator.hpp index d1bc01b672..5f6ae2aec9 100644 --- a/src/surf/ns3/ns3_simulator.hpp +++ b/src/kernel/resource/models/ns3/ns3_simulator.hpp @@ -7,7 +7,7 @@ #define NS3_SIMULATOR_HPP #include "simgrid/s4u/Host.hpp" -#include "src/surf/network_ns3.hpp" +#include "src/kernel/resource/models/network_ns3.hpp" #include "ns3/wifi-module.h" #include diff --git a/src/surf/ptask_L07.cpp b/src/kernel/resource/models/ptask_L07.cpp similarity index 97% rename from src/surf/ptask_L07.cpp rename to src/kernel/resource/models/ptask_L07.cpp index 564a2be9e1..769292c069 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/kernel/resource/models/ptask_L07.cpp @@ -10,11 +10,13 @@ #include "simgrid/config.h" #include "src/kernel/EngineImpl.hpp" +#include "src/simgrid/math_utils.h" +#include "src/simgrid/module.hpp" #if SIMGRID_HAVE_EIGEN3 #include "src/kernel/lmm/bmf.hpp" #endif +#include "src/kernel/resource/models/ptask_L07.hpp" #include "src/kernel/resource/profile/Event.hpp" -#include "src/surf/ptask_L07.hpp" #include @@ -113,7 +115,7 @@ void HostL07Model::update_actions_state(double /*now*/, double delta) ++it; // increment iterator here since the following calls to action.finish() may invalidate it if (action.get_latency() > 0) { if (action.get_latency() > delta) { - action.update_latency(delta, sg_surf_precision); + action.update_latency(delta, sg_precision_timing); } else { action.set_latency(0.0); } @@ -142,8 +144,8 @@ void HostL07Model::update_actions_state(double /*now*/, double delta) } /* Need to check that none of the model has failed */ - int i = 0; - const lmm::Constraint* cnst = action.get_variable()->get_constraint(i); + int i = 0; + const lmm::Constraint* cnst = action.get_variable()->get_constraint(i); while (cnst != nullptr) { i++; if (not cnst->get_id()->is_on()) { @@ -298,7 +300,8 @@ void CpuL07::on_speed_change() { const lmm::Element* elem = nullptr; - get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), get_core_count() * speed_.peak * speed_.scale); + get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), + get_core_count() * speed_.peak * speed_.scale); while (const auto* var = get_constraint()->get_variable(&elem)) { const auto* action = static_cast(var->get_id()); diff --git a/src/surf/ptask_L07.hpp b/src/kernel/resource/models/ptask_L07.hpp similarity index 92% rename from src/surf/ptask_L07.hpp rename to src/kernel/resource/models/ptask_L07.hpp index 85cbc0d50e..d7db18fcfb 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/kernel/resource/models/ptask_L07.hpp @@ -3,8 +3,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "src/kernel/resource/HostImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/HostImpl.hpp" #include #include #include @@ -33,7 +33,7 @@ class XBT_PRIVATE L07Action; class HostL07Model : public HostModel { public: HostL07Model(const std::string& name, lmm::System* sys); - HostL07Model(const HostL07Model&) = delete; + HostL07Model(const HostL07Model&) = delete; HostL07Model& operator=(const HostL07Model&) = delete; double next_occurring_event(double now) override; @@ -41,13 +41,17 @@ public: Action* execute_thread(const s4u::Host* host, double flops_amount, int thread_count) override { return nullptr; } CpuAction* execute_parallel(const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate) override; - Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, double size) override { return nullptr; } + Action* io_stream(s4u::Host* src_host, DiskImpl* src_disk, s4u::Host* dst_host, DiskImpl* dst_disk, + double size) override + { + return nullptr; + } }; class CpuL07Model : public CpuModel { public: CpuL07Model(const std::string& name, HostL07Model* hmodel, lmm::System* sys); - CpuL07Model(const CpuL07Model&) = delete; + CpuL07Model(const CpuL07Model&) = delete; CpuL07Model& operator=(const CpuL07Model&) = delete; ~CpuL07Model() override; void update_actions_state(double /*now*/, double /*delta*/) override{ @@ -63,7 +67,7 @@ public: class NetworkL07Model : public NetworkModel { public: NetworkL07Model(const std::string& name, HostL07Model* hmodel, lmm::System* sys); - NetworkL07Model(const NetworkL07Model&) = delete; + NetworkL07Model(const NetworkL07Model&) = delete; NetworkL07Model& operator=(const NetworkL07Model&) = delete; ~NetworkL07Model() override; StandardLinkImpl* create_link(const std::string& name, const std::vector& bandwidths) final; @@ -86,7 +90,7 @@ public: class CpuL07 : public CpuImpl { public: using CpuImpl::CpuImpl; - CpuL07(const CpuL07&) = delete; + CpuL07(const CpuL07&) = delete; CpuL07& operator=(const CpuL07&) = delete; void apply_event(profile::Event* event, double value) override; @@ -105,7 +109,7 @@ protected: class LinkL07 : public StandardLinkImpl { public: LinkL07(const std::string& name, double bandwidth, lmm::System* system); - LinkL07(const LinkL07&) = delete; + LinkL07(const LinkL07&) = delete; LinkL07& operator=(const LinkL07&) = delete; ~LinkL07() override; void apply_event(profile::Event* event, double value) override; @@ -152,7 +156,7 @@ public: L07Action() = delete; L07Action(Model* model, const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate); - L07Action(const L07Action&) = delete; + L07Action(const L07Action&) = delete; L07Action& operator=(const L07Action&) = delete; ~L07Action() override; diff --git a/src/kernel/resource/profile/Profile.cpp b/src/kernel/resource/profile/Profile.cpp index d8903c433e..e0f472214e 100644 --- a/src/kernel/resource/profile/Profile.cpp +++ b/src/kernel/resource/profile/Profile.cpp @@ -4,11 +4,10 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/resource/profile/Profile.hpp" -#include "xbt/asserts.h" #include "src/kernel/resource/profile/Event.hpp" #include "src/kernel/resource/profile/FutureEvtSet.hpp" #include "src/kernel/resource/profile/StochasticDatedValue.hpp" -#include "src/surf/surf_interface.hpp" +#include "xbt/asserts.h" #include #include diff --git a/src/kernel/resource/profile/ProfileBuilder.cpp b/src/kernel/resource/profile/ProfileBuilder.cpp index 742b85476a..83c587d5c3 100644 --- a/src/kernel/resource/profile/ProfileBuilder.cpp +++ b/src/kernel/resource/profile/ProfileBuilder.cpp @@ -7,13 +7,14 @@ #include "simgrid/forward.h" #include "src/kernel/resource/profile/Profile.hpp" #include "src/kernel/resource/profile/StochasticDatedValue.hpp" -#include "src/surf/surf_interface.hpp" +#include "xbt/asserts.h" #include "xbt/file.hpp" #include #include #include #include +#include #include #include diff --git a/src/kernel/resource/profile/Profile_test.cpp b/src/kernel/resource/profile/Profile_test.cpp index bb5960d00d..e32e6ae83a 100644 --- a/src/kernel/resource/profile/Profile_test.cpp +++ b/src/kernel/resource/profile/Profile_test.cpp @@ -3,13 +3,12 @@ /* 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 "catch.hpp" +#include "src/3rd-party/catch.hpp" +#include "simgrid/kernel/ProfileBuilder.hpp" #include "src/kernel/resource/Resource.hpp" #include "src/kernel/resource/profile/Event.hpp" -#include "simgrid/kernel/ProfileBuilder.hpp" #include "src/kernel/resource/profile/StochasticDatedValue.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/log.h" #include "xbt/misc.h" diff --git a/src/kernel/routing/DijkstraZone_test.cpp b/src/kernel/routing/DijkstraZone_test.cpp index 688dd020e7..379f431a74 100644 --- a/src/kernel/routing/DijkstraZone_test.cpp +++ b/src/kernel/routing/DijkstraZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "simgrid/kernel/routing/DijkstraZone.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" diff --git a/src/kernel/routing/DragonflyZone_test.cpp b/src/kernel/routing/DragonflyZone_test.cpp index 4bb04c1539..b15282fd5b 100644 --- a/src/kernel/routing/DragonflyZone_test.cpp +++ b/src/kernel/routing/DragonflyZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "NetZone_test.hpp" // CreateHost callback #include "simgrid/kernel/routing/DragonflyZone.hpp" diff --git a/src/kernel/routing/FatTreeZone.cpp b/src/kernel/routing/FatTreeZone.cpp index 0c33475040..03aed92435 100644 --- a/src/kernel/routing/FatTreeZone.cpp +++ b/src/kernel/routing/FatTreeZone.cpp @@ -7,7 +7,7 @@ #include #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/xml/platf.hpp" // surf_parse_error() and surf_parse_assert() +#include "src/kernel/xml/platf.hpp" // simgrid_parse_error() and simgrid_parse_assert() #include #include @@ -232,9 +232,10 @@ void FatTreeZone::generate_switches(const s4u::ClusterCallbacks& set_callbacks) this->nodes_by_level_[0] *= this->num_children_per_node_[i]; if (this->nodes_by_level_[0] != this->nodes_.size()) { - surf_parse_error("The number of provided nodes does not fit with the wanted topology." - " Please check your platform description (We need " + - std::to_string(this->nodes_by_level_[0]) + "nodes, we got " + std::to_string(this->nodes_.size())); + simgrid_parse_error("The number of provided nodes does not fit with the wanted topology." + " Please check your platform description (We need " + + std::to_string(this->nodes_by_level_[0]) + "nodes, we got " + + std::to_string(this->nodes_.size())); } for (unsigned int i = 0; i < this->levels_; i++) { @@ -415,7 +416,7 @@ s4u::FatTreeParams FatTreeZone::parse_topo_parameters(const std::string& topo_pa std::vector count; boost::split(parameters, topo_parameters, boost::is_any_of(";")); - surf_parse_assert( + simgrid_parse_assert( parameters.size() == 4, "Fat trees are defined by the levels number and 3 vectors, see the documentation for more information."); @@ -423,41 +424,41 @@ s4u::FatTreeParams FatTreeZone::parse_topo_parameters(const std::string& topo_pa try { n_lev = std::stoi(parameters[0]); } catch (const std::invalid_argument&) { - surf_parse_error("First parameter is not the amount of levels: " + parameters[0]); + simgrid_parse_error("First parameter is not the amount of levels: " + parameters[0]); } // Then, a l-sized vector standing for the children number by level boost::split(tmp, parameters[1], boost::is_any_of(",")); - surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + - " levels but the child count vector (the first one) contains " + - std::to_string(tmp.size()) + " levels."); + simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + + " levels but the child count vector (the first one) contains " + + std::to_string(tmp.size()) + " levels."); for (std::string const& level : tmp) { try { down.push_back(std::stoi(level)); } catch (const std::invalid_argument&) { - surf_parse_error("Invalid child count: " + level); + simgrid_parse_error("Invalid child count: " + level); } } // Then, a l-sized vector standing for the parents number by level boost::split(tmp, parameters[2], boost::is_any_of(",")); - surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + - " levels but the parent count vector (the second one) contains " + - std::to_string(tmp.size()) + " levels."); + simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + + " levels but the parent count vector (the second one) contains " + + std::to_string(tmp.size()) + " levels."); for (std::string const& parent : tmp) { try { up.push_back(std::stoi(parent)); } catch (const std::invalid_argument&) { - surf_parse_error("Invalid parent count: " + parent); + simgrid_parse_error("Invalid parent count: " + parent); } } // Finally, a l-sized vector standing for the ports number with the lower level boost::split(tmp, parameters[3], boost::is_any_of(",")); - surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + - " levels but the port count vector (the third one) contains " + - std::to_string(tmp.size()) + " levels."); + simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) + + " levels but the port count vector (the third one) contains " + + std::to_string(tmp.size()) + " levels."); for (std::string const& port : tmp) { try { count.push_back(std::stoi(port)); diff --git a/src/kernel/routing/FatTreeZone_test.cpp b/src/kernel/routing/FatTreeZone_test.cpp index 7d47ba0b5b..14ad3e6d8c 100644 --- a/src/kernel/routing/FatTreeZone_test.cpp +++ b/src/kernel/routing/FatTreeZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "NetZone_test.hpp" // CreateHost callback #include "simgrid/kernel/routing/FatTreeZone.hpp" diff --git a/src/kernel/routing/FloydZone_test.cpp b/src/kernel/routing/FloydZone_test.cpp index bd085e154d..e0c751be69 100644 --- a/src/kernel/routing/FloydZone_test.cpp +++ b/src/kernel/routing/FloydZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "simgrid/kernel/routing/FloydZone.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" diff --git a/src/kernel/routing/FullZone_test.cpp b/src/kernel/routing/FullZone_test.cpp index 335cc491b8..1be4da6f5a 100644 --- a/src/kernel/routing/FullZone_test.cpp +++ b/src/kernel/routing/FullZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "simgrid/kernel/routing/FullZone.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index 57db71f7c6..903023329e 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -9,16 +9,17 @@ #include #include -#include "xbt/asserts.hpp" -#include "src/include/simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/DiskImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" #include "src/kernel/resource/SplitDuplexLinkImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include "src/kernel/resource/VirtualMachineImpl.hpp" -#include "src/surf/HostImpl.hpp" +#include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" +#include "xbt/asserts.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_platform, kernel, "Kernel platform-related information"); @@ -33,15 +34,15 @@ NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name) { auto* engine = s4u::Engine::get_instance(); /* workaroud: first netzoneImpl will be the root netzone. - * Without globals and with current surf_*_model_description init functions, we need + * Without globals and with current model description init functions (see module.hpp), we need * the root netzone to exist when creating the models. - * This was usually done at sg_platf.cpp, during XML parsing */ + * This is usually done at sg_platf.cpp, during XML parsing */ if (not engine->get_netzone_root()) { engine->set_netzone_root(&piface_); /* root netzone set, initialize models */ simgrid::s4u::Engine::on_platform_creation(); - /* Initialize the surf models. That must be done after we got all config, and before we need the models. + /* Initialize the models. That must be done after we got all config, and before we need the models. * That is, after the last tag, if any, and before the first of cluster|peer|zone|trace|trace_cb * * I'm not sure for and , there may be a bug here @@ -49,7 +50,7 @@ NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name) * but cluster and peer come down to zone creations, so putting this verification here is correct. */ simgrid_host_models().init_from_flag_value(); - surf_vm_model_init_HL13(); + simgrid_vm_model_init_HL13(); } xbt_enforce(nullptr == engine->netpoint_by_name_or_null(get_name()), @@ -594,7 +595,7 @@ void NetZoneImpl::get_global_route_with_netzones(const NetPoint* src, const NetP return; /* If src and dst are in the same netzone, life is good */ - if (src_ancestor == dst_ancestor) { /* SURF_ROUTING_BASE */ + if (src_ancestor == dst_ancestor) { /* ROUTING_BASE */ route.link_list_ = std::move(links); common_ancestor->get_local_route(src, dst, &route, latency); links = std::move(route.link_list_); diff --git a/src/kernel/routing/StarZone_test.cpp b/src/kernel/routing/StarZone_test.cpp index 9744858410..66dac2906e 100644 --- a/src/kernel/routing/StarZone_test.cpp +++ b/src/kernel/routing/StarZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/kernel/routing/StarZone.hpp" diff --git a/src/kernel/routing/TorusZone_test.cpp b/src/kernel/routing/TorusZone_test.cpp index 18ae9f55bc..c401bae5f8 100644 --- a/src/kernel/routing/TorusZone_test.cpp +++ b/src/kernel/routing/TorusZone_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "NetZone_test.hpp" // CreateHost callback #include "simgrid/kernel/routing/TorusZone.hpp" diff --git a/src/kernel/xml/platf.hpp b/src/kernel/xml/platf.hpp new file mode 100644 index 0000000000..79374c1be9 --- /dev/null +++ b/src/kernel/xml/platf.hpp @@ -0,0 +1,29 @@ +/* Copyright (c) 2006-2023. 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_KERNEL_XML_PARSE_HPP +#define SIMGRID_KERNEL_XML_PARSE_HPP + +#include +#include +#include + +/* Module management functions */ +XBT_PUBLIC void sg_platf_parser_finalize(); + +XBT_PUBLIC void simgrid_parse_open(const std::string& file); +XBT_PUBLIC void simgrid_parse_close(); +XBT_PUBLIC void simgrid_parse_assert(bool cond, const std::string& msg); +XBT_ATTRIB_NORETURN XBT_PUBLIC void simgrid_parse_error(const std::string& msg); +XBT_PUBLIC void simgrid_parse_assert_netpoint(const std::string& hostname, const std::string& pre, + const std::string& post); + +XBT_PUBLIC double simgrid_parse_get_double(const std::string& s); +XBT_PUBLIC int simgrid_parse_get_int(const std::string& s); + +XBT_PUBLIC void simgrid_parse(); /* Entry-point to the parser */ +XBT_PUBLIC void parse_platform_file(const std::string& file); + +#endif diff --git a/src/surf/xml/platf_private.hpp b/src/kernel/xml/platf_private.hpp similarity index 89% rename from src/surf/xml/platf_private.hpp rename to src/kernel/xml/platf_private.hpp index bf3d72010a..be3a2d1c92 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/kernel/xml/platf_private.hpp @@ -1,7 +1,6 @@ /* platf_private.h - Interface to the SimGrid platforms which visibility should be limited to this directory */ -/* Copyright (c) 2004-2023. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2023. 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. */ @@ -11,12 +10,14 @@ #include "simgrid/host.h" #include "simgrid/s4u/Link.hpp" -#include "src/surf/xml/simgrid_dtd.h" +#include "src/kernel/xml/simgrid_dtd.h" #include #include #include +extern XBT_PRIVATE std::unordered_map traces_set_list; + namespace simgrid::kernel::routing { /* ***************************************** */ /* @@ -204,20 +205,19 @@ XBT_PUBLIC void sg_platf_new_bypass_route(simgrid::kernel::routing::RouteCreatio XBT_PUBLIC void sg_platf_new_trace(const simgrid::kernel::routing::ProfileCreationArgs* trace); XBT_PUBLIC void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor); -XBT_PRIVATE void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect); /* Prototypes of the functions offered by flex */ -XBT_PUBLIC int surf_parse_lex(); -XBT_PUBLIC int surf_parse_get_lineno(); -XBT_PUBLIC FILE* surf_parse_get_in(); -XBT_PUBLIC FILE* surf_parse_get_out(); -XBT_PUBLIC int surf_parse_get_leng(); -XBT_PUBLIC char* surf_parse_get_text(); -XBT_PUBLIC void surf_parse_set_lineno(int line_number); -XBT_PUBLIC void surf_parse_set_in(FILE* in_str); -XBT_PUBLIC void surf_parse_set_out(FILE* out_str); -XBT_PUBLIC int surf_parse_get_debug(); -XBT_PUBLIC void surf_parse_set_debug(int bdebug); -XBT_PUBLIC int surf_parse_lex_destroy(); +XBT_PUBLIC int simgrid_parse_lex(); +XBT_PUBLIC int simgrid_parse_get_lineno(); +XBT_PUBLIC FILE* simgrid_parse_get_in(); +XBT_PUBLIC FILE* simgrid_parse_get_out(); +XBT_PUBLIC int simgrid_parse_get_leng(); +XBT_PUBLIC char* simgrid_parse_get_text(); +XBT_PUBLIC void simgrid_parse_set_lineno(int line_number); +XBT_PUBLIC void simgrid_parse_set_in(FILE* in_str); +XBT_PUBLIC void simgrid_parse_set_out(FILE* out_str); +XBT_PUBLIC int simgrid_parse_get_debug(); +XBT_PUBLIC void simgrid_parse_set_debug(int bdebug); +XBT_PUBLIC int simgrid_parse_lex_destroy(); #endif /* SG_PLATF_H */ diff --git a/src/kernel/xml/platf_sax_cb.cpp b/src/kernel/xml/platf_sax_cb.cpp new file mode 100644 index 0000000000..df5b5ccaa8 --- /dev/null +++ b/src/kernel/xml/platf_sax_cb.cpp @@ -0,0 +1,1012 @@ +/* Copyright (c) 2006-2023. 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 +#include +#include +#include +#include +#include + +#include "src/kernel/resource/LinkImpl.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/kernel/resource/profile/Profile.hpp" +#include "src/kernel/xml/platf.hpp" +#include "src/kernel/xml/platf_private.hpp" +#include "src/simgrid/sg_config.hpp" + +#include +#include +#include +#include +#include +#include + +#include "simgrid_dtd.c" + +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(platf_parse, ker_platform, "Logging specific to the parsing of platform files"); + +std::string simgrid_parsed_filename; // Currently parsed file (for the error messages) +static std::vector parsed_link_list; /* temporary store of current link list of a route */ + +/* Helping functions */ +void simgrid_parse_assert(bool cond, const std::string& msg) +{ + if (not cond) + simgrid_parse_error(msg); +} + +void simgrid_parse_error(const std::string& msg) +{ + throw simgrid::ParseError(simgrid_parsed_filename, simgrid_parse_lineno, msg); +} + +void simgrid_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post) +{ + if (simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(hostname) != nullptr) // found + return; + + std::string msg = pre + hostname + post + " Existing netpoints:\n"; + + std::vector netpoints = + simgrid::s4u::Engine::get_instance()->get_all_netpoints(); + std::sort(netpoints.begin(), netpoints.end(), + [](const simgrid::kernel::routing::NetPoint* a, const simgrid::kernel::routing::NetPoint* b) { + return a->get_name() < b->get_name(); + }); + bool first = true; + for (auto const& np : netpoints) { + if (np->is_netzone()) + continue; + + if (not first) + msg += ","; + first = false; + msg += "'" + np->get_name() + "'"; + if (msg.length() > 4096) { + msg.pop_back(); // remove trailing quote + msg += "...(list truncated)......"; + break; + } + } + simgrid_parse_error(msg); +} + +double simgrid_parse_get_double(const std::string& s) +{ + try { + return std::stod(s); + } catch (const std::invalid_argument&) { + simgrid_parse_error(s + " is not a double"); + } +} + +int simgrid_parse_get_int(const std::string& s) +{ + try { + return std::stoi(s); + } catch (const std::invalid_argument&) { + simgrid_parse_error(s + " is not an int"); + } +} + +/* Turn something like "1-4,6,9-11" into the vector {1,2,3,4,6,9,10,11} */ +static void explodesRadical(const std::string& radicals, std::vector* exploded) +{ + // Make all hosts + std::vector radical_elements; + boost::split(radical_elements, radicals, boost::is_any_of(",")); + for (auto const& group : radical_elements) { + std::vector radical_ends; + boost::split(radical_ends, group, boost::is_any_of("-")); + int start = simgrid_parse_get_int(radical_ends.front()); + int end = 0; + + switch (radical_ends.size()) { + case 1: + end = start; + break; + case 2: + end = simgrid_parse_get_int(radical_ends.back()); + break; + default: + simgrid_parse_error("Malformed radical: " + group); + } + for (int i = start; i <= end; i++) + exploded->push_back(i); + } +} + +/* Trace related stuff */ +XBT_PRIVATE std::unordered_map + traces_set_list; // shown to sg_platf.cpp +static std::unordered_map trace_connect_list_host_avail; +static std::unordered_map trace_connect_list_host_speed; +static std::unordered_map trace_connect_list_link_avail; +static std::unordered_map trace_connect_list_link_bw; +static std::unordered_map trace_connect_list_link_lat; + +static void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect) +{ + simgrid_parse_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(), + "Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element + + ": trace unknown"); + + switch (trace_connect->kind) { + case simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL: + trace_connect_list_host_avail.try_emplace(trace_connect->trace, trace_connect->element); + break; + case simgrid::kernel::routing::TraceConnectKind::SPEED: + trace_connect_list_host_speed.try_emplace(trace_connect->trace, trace_connect->element); + break; + case simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL: + trace_connect_list_link_avail.try_emplace(trace_connect->trace, trace_connect->element); + break; + case simgrid::kernel::routing::TraceConnectKind::BANDWIDTH: + trace_connect_list_link_bw.try_emplace(trace_connect->trace, trace_connect->element); + break; + case simgrid::kernel::routing::TraceConnectKind::LATENCY: + trace_connect_list_link_lat.try_emplace(trace_connect->trace, trace_connect->element); + break; + default: + simgrid_parse_error("Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element + + ": unknown kind of trace"); + } +} + +/* + * All the callback lists that can be overridden anywhere. + * (this list should probably be reduced to the bare minimum to allow the models to work) + */ + +/* make sure these symbols are defined as strong ones in this file so that the linker can resolve them */ + +static std::vector> property_sets; + +static FILE* file_to_parse = nullptr; + +/* Stuff relative to storage */ +void STag_simgrid_parse_storage() +{ + xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); +} + +void ETag_simgrid_parse_storage() +{ + /* Won't happen since is now removed since v3.27. */ +} +void STag_simgrid_parse_storage___type() +{ + xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); +} +void ETag_simgrid_parse_storage___type() +{ + /* Won't happen since is now removed since v3.27. */ +} + +void STag_simgrid_parse_mount() +{ + xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); +} + +void ETag_simgrid_parse_mount() +{ + /* Won't happen since is now removed since v3.27. */ +} + +void STag_simgrid_parse_include() +{ + xbt_die(" tag was removed in SimGrid v3.18. Please stop using it now."); +} + +void ETag_simgrid_parse_include() +{ + /* Won't happen since is now removed since v3.18. */ +} + +/* Stag and Etag parse functions */ +void STag_simgrid_parse_platform() +{ + /* Use fixed point arithmetic to avoid rounding errors ("4.1" for example cannot be represented exactly as a floating + * point number) */ + const long int version = lround(100.0 * simgrid_parse_get_double(A_simgrid_parse_platform_version)); + const std::string version_string = std::to_string(version / 100) + "." + std::to_string(version % 100); + + simgrid_parse_assert(version >= 100L, "******* BIG FAT WARNING *********\n " + "You're using an ancient XML file.\n" + "Since SimGrid 3.1, units are Bytes, Flops, and seconds " + "instead of MBytes, MFlops and seconds.\n" + + "Use simgrid_update_xml to update your file automatically. " + "This program is installed automatically with SimGrid, or " + "available in the tools/ directory of the source archive.\n" + + "Please check also out the SURF section of the ChangeLog for " + "the 3.1 version for more information."); + simgrid_parse_assert(version >= 300L, "******* BIG FAT WARNING *********\n " + "You're using an old XML file.\n" + "Use simgrid_update_xml to update your file automatically. " + "This program is installed automatically with SimGrid, or " + "available in the tools/ directory of the source archive."); + simgrid_parse_assert( + version >= 400L, + "******* THIS FILE IS TOO OLD (v:" + version_string + + ") *********\n " + "Changes introduced in SimGrid 3.13:\n" + " - 'power' attribute of hosts (and others) got renamed to 'speed'.\n" + " - In , attribute kind=\"POWER\" is now kind=\"SPEED\".\n" + " - DOCTYPE now point to the rignt URL.\n" + " - speed, bandwidth and latency attributes now MUST have an explicit unit (f, Bps, s by default)" + "\n\n" + "Use simgrid_update_xml to update your file automatically. " + "This program is installed automatically with SimGrid, or " + "available in the tools/ directory of the source archive."); + if (version < 410L) { + XBT_INFO("You're using a v%s XML file (%s) while the current standard is v4.1 " + "That's fine, the new version is backward compatible. \n\n" + "Use simgrid_update_xml to update your file automatically to get rid of this warning. " + "This program is installed automatically with SimGrid, or " + "available in the tools/ directory of the source archive.", + version_string.c_str(), simgrid_parsed_filename.c_str()); + } + simgrid_parse_assert(version <= 410L, + "******* THIS FILE COMES FROM THE FUTURE (v:" + version_string + + ") *********\n " + "The most recent formalism that this version of SimGrid understands is v4.1.\n" + "Please update your code, or use another, more adapted, file."); +} +void ETag_simgrid_parse_platform() +{ + simgrid::s4u::Engine::on_platform_created(); +} + +void STag_simgrid_parse_prop() +{ + property_sets.back().try_emplace(A_simgrid_parse_prop_id, A_simgrid_parse_prop_value); + XBT_DEBUG("add prop %s=%s into current property set %p", A_simgrid_parse_prop_id, A_simgrid_parse_prop_value, + &(property_sets.back())); +} + +void STag_simgrid_parse_host() +{ + simgrid::kernel::routing::HostCreationArgs host; + property_sets.emplace_back(); + host.id = A_simgrid_parse_host_id; + + host.speed_per_pstate = xbt_parse_get_all_speeds(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_host_speed, "speed of host " + host.id); + + XBT_DEBUG("pstate: %s", A_simgrid_parse_host_pstate); + host.core_amount = simgrid_parse_get_int(A_simgrid_parse_host_core); + + if (A_simgrid_parse_host_availability___file[0] != '\0') { + XBT_WARN("The availability_file attribute in is now deprecated. Please, use 'speed_file' instead."); + host.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_host_availability___file); + } + if (A_simgrid_parse_host_speed___file[0] != '\0') + host.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_host_speed___file); + host.state_trace = A_simgrid_parse_host_state___file[0] + ? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_host_state___file) + : nullptr; + host.coord = A_simgrid_parse_host_coordinates; + + sg_platf_new_host_begin(&host); +} + +void ETag_simgrid_parse_host() +{ + sg_platf_new_host_set_properties(property_sets.back()); + property_sets.pop_back(); + + sg_platf_new_host_seal(simgrid_parse_get_int(A_simgrid_parse_host_pstate)); +} + +void STag_simgrid_parse_disk() +{ + property_sets.emplace_back(); +} + +void ETag_simgrid_parse_disk() +{ + simgrid::kernel::routing::DiskCreationArgs disk; + disk.properties = property_sets.back(); + property_sets.pop_back(); + + disk.id = A_simgrid_parse_disk_id; + disk.read_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_disk_read___bw, + "read_bw of disk " + disk.id); + disk.write_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_disk_write___bw, "write_bw of disk " + disk.id); + + sg_platf_new_disk(&disk); +} + +void STag_simgrid_parse_host___link() +{ + XBT_DEBUG("Create a Host_link for %s", A_simgrid_parse_host___link_id); + simgrid::kernel::routing::HostLinkCreationArgs host_link; + + host_link.id = A_simgrid_parse_host___link_id; + host_link.link_up = A_simgrid_parse_host___link_up; + host_link.link_down = A_simgrid_parse_host___link_down; + sg_platf_new_hostlink(&host_link); +} + +void STag_simgrid_parse_router() +{ + sg_platf_new_router(A_simgrid_parse_router_id, A_simgrid_parse_router_coordinates); +} + +void ETag_simgrid_parse_cluster() +{ + simgrid::kernel::routing::ClusterCreationArgs cluster; + cluster.properties = property_sets.back(); + property_sets.pop_back(); + + cluster.id = A_simgrid_parse_cluster_id; + cluster.prefix = A_simgrid_parse_cluster_prefix; + cluster.suffix = A_simgrid_parse_cluster_suffix; + explodesRadical(A_simgrid_parse_cluster_radical, &cluster.radicals); + + cluster.speeds = xbt_parse_get_all_speeds(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_cluster_speed, "speed of cluster " + cluster.id); + cluster.core_amount = simgrid_parse_get_int(A_simgrid_parse_cluster_core); + cluster.bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_bw, + "bw of cluster " + cluster.id); + cluster.lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_lat, + "lat of cluster " + cluster.id); + if (strcmp(A_simgrid_parse_cluster_bb___bw, "")) + cluster.bb_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_cluster_bb___bw, "bb_bw of cluster " + cluster.id); + if (strcmp(A_simgrid_parse_cluster_bb___lat, "")) + cluster.bb_lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_bb___lat, + "bb_lat of cluster " + cluster.id); + if (strcmp(A_simgrid_parse_cluster_limiter___link, "")) + cluster.limiter_link = + xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_limiter___link, + "limiter_link of cluster " + cluster.id); + if (strcmp(A_simgrid_parse_cluster_loopback___bw, "")) + cluster.loopback_bw = + xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_loopback___bw, + "loopback_bw of cluster " + cluster.id); + if (strcmp(A_simgrid_parse_cluster_loopback___lat, "")) + cluster.loopback_lat = + xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_loopback___lat, + "loopback_lat of cluster " + cluster.id); + + switch (AX_simgrid_parse_cluster_topology) { + case A_simgrid_parse_cluster_topology_FLAT: + cluster.topology = simgrid::kernel::routing::ClusterTopology::FLAT; + break; + case A_simgrid_parse_cluster_topology_TORUS: + cluster.topology = simgrid::kernel::routing::ClusterTopology::TORUS; + break; + case A_simgrid_parse_cluster_topology_FAT___TREE: + cluster.topology = simgrid::kernel::routing::ClusterTopology::FAT_TREE; + break; + case A_simgrid_parse_cluster_topology_DRAGONFLY: + cluster.topology = simgrid::kernel::routing::ClusterTopology::DRAGONFLY; + break; + default: + simgrid_parse_error("Invalid cluster topology for cluster " + cluster.id); + } + cluster.topo_parameters = A_simgrid_parse_cluster_topo___parameters; + cluster.router_id = A_simgrid_parse_cluster_router___id; + + switch (AX_simgrid_parse_cluster_sharing___policy) { + case A_simgrid_parse_cluster_sharing___policy_SHARED: + cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SHARED; + break; + case A_simgrid_parse_cluster_sharing___policy_FULLDUPLEX: + XBT_WARN("FULLDUPLEX is now deprecated. Please update your platform file to use SPLITDUPLEX instead."); + cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; + break; + case A_simgrid_parse_cluster_sharing___policy_SPLITDUPLEX: + cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; + break; + case A_simgrid_parse_cluster_sharing___policy_FATPIPE: + cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; + break; + default: + simgrid_parse_error("Invalid cluster sharing policy for cluster " + cluster.id); + } + switch (AX_simgrid_parse_cluster_bb___sharing___policy) { + case A_simgrid_parse_cluster_bb___sharing___policy_FATPIPE: + cluster.bb_sharing_policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; + break; + case A_simgrid_parse_cluster_bb___sharing___policy_SHARED: + cluster.bb_sharing_policy = simgrid::s4u::Link::SharingPolicy::SHARED; + break; + default: + simgrid_parse_error("Invalid bb sharing policy in cluster " + cluster.id); + } + + sg_platf_new_tag_cluster(&cluster); +} + +void STag_simgrid_parse_cluster() +{ + property_sets.emplace_back(); +} + +void STag_simgrid_parse_cabinet() +{ + simgrid::kernel::routing::CabinetCreationArgs cabinet; + cabinet.id = A_simgrid_parse_cabinet_id; + cabinet.prefix = A_simgrid_parse_cabinet_prefix; + cabinet.suffix = A_simgrid_parse_cabinet_suffix; + cabinet.speed = xbt_parse_get_speed(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_speed, + "speed of cabinet " + cabinet.id); + cabinet.bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_bw, + "bw of cabinet " + cabinet.id); + cabinet.lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_lat, + "lat of cabinet " + cabinet.id); + explodesRadical(A_simgrid_parse_cabinet_radical, &cabinet.radicals); + + sg_platf_new_cabinet(&cabinet); +} + +void STag_simgrid_parse_peer() +{ + simgrid::kernel::routing::PeerCreationArgs peer; + + peer.id = A_simgrid_parse_peer_id; + peer.speed = xbt_parse_get_speed(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_speed, + "speed of peer " + peer.id); + peer.bw_in = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_bw___in, + "bw_in of peer " + peer.id); + peer.bw_out = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_bw___out, + "bw_out of peer " + peer.id); + peer.coord = A_simgrid_parse_peer_coordinates; + peer.speed_trace = nullptr; + if (A_simgrid_parse_peer_availability___file[0] != '\0') { + XBT_WARN("The availability_file attribute in is now deprecated. Please, use 'speed_file' instead."); + peer.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_peer_availability___file); + } + if (A_simgrid_parse_peer_speed___file[0] != '\0') + peer.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_peer_speed___file); + peer.state_trace = A_simgrid_parse_peer_state___file[0] + ? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_peer_state___file) + : nullptr; + + if (A_simgrid_parse_peer_lat[0] != '\0') + XBT_WARN("The latency attribute in is now deprecated. Use the z coordinate instead of '%s'.", + A_simgrid_parse_peer_lat); + + sg_platf_new_peer(&peer); +} + +void STag_simgrid_parse_link() +{ + property_sets.emplace_back(); +} + +void ETag_simgrid_parse_link() +{ + simgrid::kernel::routing::LinkCreationArgs link; + + link.properties = property_sets.back(); + property_sets.pop_back(); + + link.id = A_simgrid_parse_link_id; + link.bandwidths = xbt_parse_get_bandwidths(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_link_bandwidth, "bandwidth of link " + link.id); + link.bandwidth_trace = + A_simgrid_parse_link_bandwidth___file[0] + ? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_link_bandwidth___file) + : nullptr; + link.latency = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_link_latency, + "latency of link " + link.id); + link.latency_trace = A_simgrid_parse_link_latency___file[0] + ? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_link_latency___file) + : nullptr; + link.state_trace = A_simgrid_parse_link_state___file[0] + ? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_link_state___file) + : nullptr; + + switch (A_simgrid_parse_link_sharing___policy) { + case A_simgrid_parse_link_sharing___policy_SHARED: + link.policy = simgrid::s4u::Link::SharingPolicy::SHARED; + break; + case A_simgrid_parse_link_sharing___policy_FATPIPE: + link.policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; + break; + case A_simgrid_parse_link_sharing___policy_FULLDUPLEX: + XBT_WARN("FULLDUPLEX is now deprecated. Please update your platform file to use SPLITDUPLEX instead."); + link.policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; + break; + case A_simgrid_parse_link_sharing___policy_SPLITDUPLEX: + link.policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; + break; + case A_simgrid_parse_link_sharing___policy_WIFI: + link.policy = simgrid::s4u::Link::SharingPolicy::WIFI; + break; + default: + simgrid_parse_error("Invalid sharing policy in link " + link.id); + } + + sg_platf_new_link(&link); +} + +void STag_simgrid_parse_link___ctn() +{ + const auto engine = simgrid::s4u::Engine::get_instance(); + const simgrid::s4u::Link* link; + simgrid::s4u::LinkInRoute::Direction direction = simgrid::s4u::LinkInRoute::Direction::NONE; + switch (A_simgrid_parse_link___ctn_direction) { + case AU_simgrid_parse_link___ctn_direction: + case A_simgrid_parse_link___ctn_direction_NONE: + link = engine->link_by_name(A_simgrid_parse_link___ctn_id); + break; + case A_simgrid_parse_link___ctn_direction_UP: + link = engine->split_duplex_link_by_name(A_simgrid_parse_link___ctn_id); + direction = simgrid::s4u::LinkInRoute::Direction::UP; + break; + case A_simgrid_parse_link___ctn_direction_DOWN: + link = engine->split_duplex_link_by_name(A_simgrid_parse_link___ctn_id); + direction = simgrid::s4u::LinkInRoute::Direction::DOWN; + break; + default: + simgrid_parse_error(std::string("Invalid direction for link ") + A_simgrid_parse_link___ctn_id); + } + + const char* dirname; + switch (A_simgrid_parse_link___ctn_direction) { + case A_simgrid_parse_link___ctn_direction_UP: + dirname = " (upward)"; + break; + case A_simgrid_parse_link___ctn_direction_DOWN: + dirname = " (downward)"; + break; + default: + dirname = ""; + } + simgrid_parse_assert(link != nullptr, std::string("No such link: '") + A_simgrid_parse_link___ctn_id + "'" + dirname); + parsed_link_list.emplace_back(link, direction); +} + +void ETag_simgrid_parse_backbone() +{ + auto link = std::make_unique(); + + link->id = A_simgrid_parse_backbone_id; + link->bandwidths.push_back(xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, + A_simgrid_parse_backbone_bandwidth, + "bandwidth of backbone " + link->id)); + link->latency = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_backbone_latency, + "latency of backbone " + link->id); + link->policy = simgrid::s4u::Link::SharingPolicy::SHARED; + + routing_cluster_add_backbone(std::move(link)); +} + +void STag_simgrid_parse_route() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_route_src, "Route src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_route_dst, "Route dst='", "' does name a node."); +} + +void STag_simgrid_parse_ASroute() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_src, "ASroute src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_dst, "ASroute dst='", "' does name a node."); + + simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___src, "ASroute gw_src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___dst, "ASroute gw_dst='", "' does name a node."); +} +void STag_simgrid_parse_zoneRoute() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_src, "zoneRoute src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_dst, "zoneRoute dst='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___src, "zoneRoute gw_src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___dst, "zoneRoute gw_dst='", "' does name a node."); +} + +void STag_simgrid_parse_bypassRoute() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassRoute_src, "bypassRoute src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassRoute_dst, "bypassRoute dst='", "' does name a node."); +} + +void STag_simgrid_parse_bypassASroute() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_src, "bypassASroute src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_dst, "bypassASroute dst='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___src, "bypassASroute gw_src='", + "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___dst, "bypassASroute gw_dst='", + "' does name a node."); +} +void STag_simgrid_parse_bypassZoneRoute() +{ + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_src, "bypassZoneRoute src='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_dst, "bypassZoneRoute dst='", "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___src, "bypassZoneRoute gw_src='", + "' does name a node."); + simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___dst, "bypassZoneRoute gw_dst='", + "' does name a node."); +} + +void ETag_simgrid_parse_route() +{ + simgrid::kernel::routing::RouteCreationArgs route; + + route.src = sg_netpoint_by_name_or_null(A_simgrid_parse_route_src); // tested to not be nullptr in start tag + route.dst = sg_netpoint_by_name_or_null(A_simgrid_parse_route_dst); // tested to not be nullptr in start tag + route.symmetrical = (A_simgrid_parse_route_symmetrical == AU_simgrid_parse_route_symmetrical || + A_simgrid_parse_route_symmetrical == A_simgrid_parse_route_symmetrical_YES || + A_simgrid_parse_route_symmetrical == A_simgrid_parse_route_symmetrical_yes); + + route.link_list.swap(parsed_link_list); + + sg_platf_new_route(&route); +} + +void ETag_simgrid_parse_ASroute() +{ + AX_simgrid_parse_zoneRoute_src = AX_simgrid_parse_ASroute_src; + AX_simgrid_parse_zoneRoute_dst = AX_simgrid_parse_ASroute_dst; + AX_simgrid_parse_zoneRoute_gw___src = AX_simgrid_parse_ASroute_gw___src; + AX_simgrid_parse_zoneRoute_gw___dst = AX_simgrid_parse_ASroute_gw___dst; + AX_simgrid_parse_zoneRoute_symmetrical = (AT_simgrid_parse_zoneRoute_symmetrical)AX_simgrid_parse_ASroute_symmetrical; + ETag_simgrid_parse_zoneRoute(); +} +void ETag_simgrid_parse_zoneRoute() +{ + simgrid::kernel::routing::RouteCreationArgs ASroute; + + ASroute.src = sg_netpoint_by_name_or_null(A_simgrid_parse_zoneRoute_src); // tested to not be nullptr in start tag + ASroute.dst = sg_netpoint_by_name_or_null(A_simgrid_parse_zoneRoute_dst); // tested to not be nullptr in start tag + + ASroute.gw_src = + sg_netpoint_by_name_or_null(A_simgrid_parse_zoneRoute_gw___src); // tested to not be nullptr in start tag + ASroute.gw_dst = + sg_netpoint_by_name_or_null(A_simgrid_parse_zoneRoute_gw___dst); // tested to not be nullptr in start tag + + ASroute.link_list.swap(parsed_link_list); + + ASroute.symmetrical = (A_simgrid_parse_zoneRoute_symmetrical == AU_simgrid_parse_zoneRoute_symmetrical || + A_simgrid_parse_zoneRoute_symmetrical == A_simgrid_parse_zoneRoute_symmetrical_YES || + A_simgrid_parse_zoneRoute_symmetrical == A_simgrid_parse_zoneRoute_symmetrical_yes); + + sg_platf_new_route(&ASroute); +} + +void ETag_simgrid_parse_bypassRoute() +{ + simgrid::kernel::routing::RouteCreationArgs route; + + route.src = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassRoute_src); // tested to not be nullptr in start tag + route.dst = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassRoute_dst); // tested to not be nullptr in start tag + route.symmetrical = false; + + route.link_list.swap(parsed_link_list); + + sg_platf_new_bypass_route(&route); +} + +void ETag_simgrid_parse_bypassASroute() +{ + AX_simgrid_parse_bypassZoneRoute_src = AX_simgrid_parse_bypassASroute_src; + AX_simgrid_parse_bypassZoneRoute_dst = AX_simgrid_parse_bypassASroute_dst; + AX_simgrid_parse_bypassZoneRoute_gw___src = AX_simgrid_parse_bypassASroute_gw___src; + AX_simgrid_parse_bypassZoneRoute_gw___dst = AX_simgrid_parse_bypassASroute_gw___dst; + ETag_simgrid_parse_bypassZoneRoute(); +} +void ETag_simgrid_parse_bypassZoneRoute() +{ + simgrid::kernel::routing::RouteCreationArgs ASroute; + + ASroute.src = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassZoneRoute_src); + ASroute.dst = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassZoneRoute_dst); + ASroute.link_list.swap(parsed_link_list); + + ASroute.symmetrical = false; + + ASroute.gw_src = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassZoneRoute_gw___src); + ASroute.gw_dst = sg_netpoint_by_name_or_null(A_simgrid_parse_bypassZoneRoute_gw___dst); + + sg_platf_new_bypass_route(&ASroute); +} + +void ETag_simgrid_parse_trace() +{ + simgrid::kernel::routing::ProfileCreationArgs trace; + + trace.id = A_simgrid_parse_trace_id; + trace.file = A_simgrid_parse_trace_file; + trace.periodicity = simgrid_parse_get_double(A_simgrid_parse_trace_periodicity); + trace.pc_data = simgrid_parse_pcdata; + + sg_platf_new_trace(&trace); +} + +void STag_simgrid_parse_trace___connect() +{ + simgrid::kernel::routing::TraceConnectCreationArgs trace_connect; + + trace_connect.element = A_simgrid_parse_trace___connect_element; + trace_connect.trace = A_simgrid_parse_trace___connect_trace; + + switch (A_simgrid_parse_trace___connect_kind) { + case AU_simgrid_parse_trace___connect_kind: + case A_simgrid_parse_trace___connect_kind_SPEED: + trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::SPEED; + break; + case A_simgrid_parse_trace___connect_kind_BANDWIDTH: + trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::BANDWIDTH; + break; + case A_simgrid_parse_trace___connect_kind_HOST___AVAIL: + trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL; + break; + case A_simgrid_parse_trace___connect_kind_LATENCY: + trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LATENCY; + break; + case A_simgrid_parse_trace___connect_kind_LINK___AVAIL: + trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL; + break; + default: + simgrid_parse_error("Invalid trace kind"); + } + sg_platf_trace_connect(&trace_connect); +} + +void STag_simgrid_parse_AS() +{ + AX_simgrid_parse_zone_id = AX_simgrid_parse_AS_id; + AX_simgrid_parse_zone_routing = AX_simgrid_parse_AS_routing; + STag_simgrid_parse_zone(); +} + +void ETag_simgrid_parse_AS() +{ + ETag_simgrid_parse_zone(); +} + +void STag_simgrid_parse_zone() +{ + property_sets.emplace_back(); + simgrid::kernel::routing::ZoneCreationArgs zone; + zone.id = A_simgrid_parse_zone_id; + zone.routing = A_simgrid_parse_zone_routing; + sg_platf_new_zone_begin(&zone); +} + +void ETag_simgrid_parse_zone() +{ + sg_platf_new_zone_set_properties(property_sets.back()); + property_sets.pop_back(); + sg_platf_new_zone_seal(); +} + +void STag_simgrid_parse_config() +{ + property_sets.emplace_back(); + XBT_DEBUG("START configuration name = %s", A_simgrid_parse_config_id); + if (_sg_cfg_init_status == 2) { + simgrid_parse_error( + "All tags must be given before any platform elements (such as , , , " + ", etc)."); + } +} + +void ETag_simgrid_parse_config() +{ + // Sort config elements before applying. + // That's a little waste of time, but not doing so would break the tests + auto current_property_set = property_sets.back(); + + std::vector keys; + for (auto const& [key, _] : current_property_set) { + keys.push_back(key); + } + std::sort(keys.begin(), keys.end()); + for (const std::string& key : keys) { + if (simgrid::config::is_default(key.c_str())) { + std::string cfg = key + ":" + current_property_set.at(key); + simgrid::config::set_parse(cfg); + } else + XBT_INFO("The custom configuration '%s' is already defined by user!", key.c_str()); + } + XBT_DEBUG("End configuration name = %s", A_simgrid_parse_config_id); + + property_sets.pop_back(); +} + +static std::vector arguments; + +void STag_simgrid_parse_process() +{ + AX_simgrid_parse_actor_function = AX_simgrid_parse_process_function; + STag_simgrid_parse_actor(); +} + +void STag_simgrid_parse_actor() +{ + property_sets.emplace_back(); + arguments.assign(1, A_simgrid_parse_actor_function); +} + +void ETag_simgrid_parse_process() +{ + AX_simgrid_parse_actor_host = AX_simgrid_parse_process_host; + AX_simgrid_parse_actor_function = AX_simgrid_parse_process_function; + AX_simgrid_parse_actor_start___time = AX_simgrid_parse_process_start___time; + AX_simgrid_parse_actor_kill___time = AX_simgrid_parse_process_kill___time; + AX_simgrid_parse_actor_on___failure = (AT_simgrid_parse_actor_on___failure)AX_simgrid_parse_process_on___failure; + ETag_simgrid_parse_actor(); +} + +void ETag_simgrid_parse_actor() +{ + simgrid::kernel::routing::ActorCreationArgs actor; + + actor.properties = property_sets.back(); + property_sets.pop_back(); + + actor.args.swap(arguments); + actor.host = A_simgrid_parse_actor_host; + actor.function = A_simgrid_parse_actor_function; + actor.start_time = simgrid_parse_get_double(A_simgrid_parse_actor_start___time); + actor.kill_time = simgrid_parse_get_double(A_simgrid_parse_actor_kill___time); + + switch (A_simgrid_parse_actor_on___failure) { + case AU_simgrid_parse_actor_on___failure: + case A_simgrid_parse_actor_on___failure_DIE: + actor.restart_on_failure = false; + break; + case A_simgrid_parse_actor_on___failure_RESTART: + actor.restart_on_failure = true; + break; + default: + simgrid_parse_error("Invalid on failure behavior"); + } + + sg_platf_new_actor(&actor); +} + +void STag_simgrid_parse_argument() +{ + arguments.emplace_back(A_simgrid_parse_argument_value); +} + +void STag_simgrid_parse_model___prop() +{ + XBT_INFO("Deprecated tag ignored"); +} + +void ETag_simgrid_parse_prop() +{ /* Nothing to do */ +} +void STag_simgrid_parse_random() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_random() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_trace___connect() +{ /* Nothing to do */ +} +void STag_simgrid_parse_trace() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_router() +{ /*Nothing to do*/ +} +void ETag_simgrid_parse_host___link() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_cabinet() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_peer() +{ /* Nothing to do */ +} +void STag_simgrid_parse_backbone() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_link___ctn() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_argument() +{ /* Nothing to do */ +} +void ETag_simgrid_parse_model___prop() +{ /* Nothing to do */ +} + +/* Open and Close parse file */ +static YY_BUFFER_STATE input_buffer; + +void simgrid_parse_open(const std::string& file) +{ + simgrid_parsed_filename = file; + std::string dir = simgrid::xbt::Path(file).get_dir_name(); + simgrid::xbt::path_push(dir); + + file_to_parse = simgrid::xbt::path_fopen(file, "r"); + if (file_to_parse == nullptr) + throw std::invalid_argument("Unable to open '" + file + "' from '" + simgrid::xbt::Path().get_name() + + "'. Does this file exist?"); + input_buffer = simgrid_parse__create_buffer(file_to_parse, YY_BUF_SIZE); + simgrid_parse__switch_to_buffer(input_buffer); + simgrid_parse_lineno = 1; +} + +void simgrid_parse_close() +{ + simgrid::xbt::path_pop(); // remove the dirname of the opened file, that was added in simgrid_parse_open() + + if (file_to_parse) { + simgrid_parse__delete_buffer(input_buffer); + fclose(file_to_parse); + file_to_parse = nullptr; // Must be reset for Bypass + } +} + +/* Call the lexer to parse the currently opened file */ +void simgrid_parse() +{ + bool err = simgrid_parse_lex(); + simgrid_parse_assert(not err, "Flex returned an error code"); + + /* Actually connect the traces now that every elements are created */ + const auto engine = simgrid::s4u::Engine::get_instance(); + + for (auto const& [trace, name] : trace_connect_list_host_avail) { + simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + ": Trace " + trace + " undefined."); + auto profile = traces_set_list.at(trace); + + auto host = engine->host_by_name_or_null(name); + simgrid_parse_assert(host, ": Host " + name + " undefined."); + host->set_state_profile(profile); + } + trace_connect_list_host_avail.clear(); + + for (auto const& [trace, name] : trace_connect_list_host_speed) { + simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + ": Trace " + trace + " undefined."); + auto profile = traces_set_list.at(trace); + + auto host = engine->host_by_name_or_null(name); + simgrid_parse_assert(host, ": Host " + name + " undefined."); + host->set_speed_profile(profile); + } + trace_connect_list_host_speed.clear(); + + for (auto const& [trace, name] : trace_connect_list_link_avail) { + simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + ": Trace " + trace + " undefined."); + auto profile = traces_set_list.at(trace); + + auto link = engine->link_by_name_or_null(name); + simgrid_parse_assert(link, ": Link " + name + " undefined."); + link->set_state_profile(profile); + } + trace_connect_list_link_avail.clear(); + + for (auto const& [trace, name] : trace_connect_list_link_bw) { + simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + ": Trace " + trace + " undefined."); + auto profile = traces_set_list.at(trace); + + auto link = engine->link_by_name_or_null(name); + simgrid_parse_assert(link, ": Link " + name + " undefined."); + link->set_bandwidth_profile(profile); + } + trace_connect_list_link_bw.clear(); + + for (auto const& [trace, name] : trace_connect_list_link_lat) { + simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + ": Trace " + trace + " undefined."); + auto profile = traces_set_list.at(trace); + + auto link = engine->link_by_name_or_null(name); + simgrid_parse_assert(link, ": Link " + name + " undefined."); + link->set_latency_profile(profile); + } + trace_connect_list_link_lat.clear(); +} diff --git a/src/surf/sg_platf.cpp b/src/kernel/xml/sg_platf.cpp similarity index 97% rename from src/surf/sg_platf.cpp rename to src/kernel/xml/sg_platf.cpp index 9f2a198685..888944add9 100644 --- a/src/surf/sg_platf.cpp +++ b/src/kernel/xml/sg_platf.cpp @@ -3,6 +3,8 @@ /* 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. */ +/* This file implements the public API to platform parsing */ + #include #include #include @@ -18,19 +20,31 @@ #include #include -#include "simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/DiskImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/kernel/resource/profile/Profile.hpp" -#include "src/surf/HostImpl.hpp" -#include "src/surf/xml/platf.hpp" -#include "src/surf/xml/platf_private.hpp" +#include "src/kernel/xml/platf.hpp" +#include "src/kernel/xml/platf_private.hpp" +#include "src/simgrid/sg_config.hpp" #include #include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(platf_parse); +/* This function acts as a main in the parsing area. */ +void parse_platform_file(const std::string& file) +{ + /* init the flex parser */ + simgrid_parse_open(file); + + /* Do the actual parsing */ + simgrid_parse(); + + simgrid_parse_close(); +} + namespace simgrid::kernel::routing { xbt::signal on_cluster_creation; } // namespace simgrid::kernel::routing @@ -40,14 +54,14 @@ static simgrid::kernel::routing::ClusterZoneCreationArgs /** The current NetZone in the parsing */ static simgrid::kernel::routing::NetZoneImpl* current_routing = nullptr; -static simgrid::s4u::Host* current_host = nullptr; +static simgrid::s4u::Host* current_host = nullptr; /** Module management function: frees all internal data structures */ void sg_platf_parser_finalize() { simgrid::kernel::routing::on_cluster_creation.disconnect_slots(); - surf_parse_lex_destroy(); + simgrid_parse_lex_destroy(); } /** @brief Add a host to the current NetZone */ @@ -233,7 +247,7 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl /** @brief Create regular Cluster */ static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationArgs* cluster) { - auto* zone = simgrid::s4u::create_star_zone(cluster->id); + auto* zone = simgrid::s4u::create_star_zone(cluster->id); if (const auto* parent = current_routing ? current_routing->get_iface() : nullptr) zone->set_parent(parent); @@ -436,7 +450,7 @@ void sg_platf_new_bypass_route(simgrid::kernel::routing::RouteCreationArgs* rout void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor) { const auto* engine = simgrid::s4u::Engine::get_instance(); - sg_host_t host = sg_host_by_name(actor->host); + sg_host_t host = sg_host_by_name(actor->host); if (not host) { // The requested host does not exist. Do a nice message to the user std::string msg = std::string("Cannot create actor '") + actor->function + "': host '" + actor->host + diff --git a/src/surf/xml/simgrid.dtd b/src/kernel/xml/simgrid.dtd similarity index 100% rename from src/surf/xml/simgrid.dtd rename to src/kernel/xml/simgrid.dtd diff --git a/src/surf/xml/simgrid_dtd.c b/src/kernel/xml/simgrid_dtd.c similarity index 67% rename from src/surf/xml/simgrid_dtd.c rename to src/kernel/xml/simgrid_dtd.c index f915553986..5cc34983c9 100644 --- a/src/surf/xml/simgrid_dtd.c +++ b/src/kernel/xml/simgrid_dtd.c @@ -3,30 +3,30 @@ /* A lexical scanner generated by flex */ -#define yy_create_buffer surf_parse__create_buffer -#define yy_delete_buffer surf_parse__delete_buffer -#define yy_scan_buffer surf_parse__scan_buffer -#define yy_scan_string surf_parse__scan_string -#define yy_scan_bytes surf_parse__scan_bytes -#define yy_init_buffer surf_parse__init_buffer -#define yy_flush_buffer surf_parse__flush_buffer -#define yy_load_buffer_state surf_parse__load_buffer_state -#define yy_switch_to_buffer surf_parse__switch_to_buffer -#define yypush_buffer_state surf_parse_push_buffer_state -#define yypop_buffer_state surf_parse_pop_buffer_state -#define yyensure_buffer_stack surf_parse_ensure_buffer_stack -#define yy_flex_debug surf_parse__flex_debug -#define yyin surf_parse_in -#define yyleng surf_parse_leng -#define yylex surf_parse_lex -#define yylineno surf_parse_lineno -#define yyout surf_parse_out -#define yyrestart surf_parse_restart -#define yytext surf_parse_text -#define yywrap surf_parse_wrap -#define yyalloc surf_parse_alloc -#define yyrealloc surf_parse_realloc -#define yyfree surf_parse_free +#define yy_create_buffer simgrid_parse__create_buffer +#define yy_delete_buffer simgrid_parse__delete_buffer +#define yy_scan_buffer simgrid_parse__scan_buffer +#define yy_scan_string simgrid_parse__scan_string +#define yy_scan_bytes simgrid_parse__scan_bytes +#define yy_init_buffer simgrid_parse__init_buffer +#define yy_flush_buffer simgrid_parse__flush_buffer +#define yy_load_buffer_state simgrid_parse__load_buffer_state +#define yy_switch_to_buffer simgrid_parse__switch_to_buffer +#define yypush_buffer_state simgrid_parse_push_buffer_state +#define yypop_buffer_state simgrid_parse_pop_buffer_state +#define yyensure_buffer_stack simgrid_parse_ensure_buffer_stack +#define yy_flex_debug simgrid_parse__flex_debug +#define yyin simgrid_parse_in +#define yyleng simgrid_parse_leng +#define yylex simgrid_parse_lex +#define yylineno simgrid_parse_lineno +#define yyout simgrid_parse_out +#define yyrestart simgrid_parse_restart +#define yytext simgrid_parse_text +#define yywrap simgrid_parse_wrap +#define yyalloc simgrid_parse_alloc +#define yyrealloc simgrid_parse_realloc +#define yyfree simgrid_parse_free #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 @@ -37,237 +37,237 @@ #endif #ifdef yy_create_buffer -#define surf_parse__create_buffer_ALREADY_DEFINED +#define simgrid_parse__create_buffer_ALREADY_DEFINED #else -#define yy_create_buffer surf_parse__create_buffer +#define yy_create_buffer simgrid_parse__create_buffer #endif #ifdef yy_delete_buffer -#define surf_parse__delete_buffer_ALREADY_DEFINED +#define simgrid_parse__delete_buffer_ALREADY_DEFINED #else -#define yy_delete_buffer surf_parse__delete_buffer +#define yy_delete_buffer simgrid_parse__delete_buffer #endif #ifdef yy_scan_buffer -#define surf_parse__scan_buffer_ALREADY_DEFINED +#define simgrid_parse__scan_buffer_ALREADY_DEFINED #else -#define yy_scan_buffer surf_parse__scan_buffer +#define yy_scan_buffer simgrid_parse__scan_buffer #endif #ifdef yy_scan_string -#define surf_parse__scan_string_ALREADY_DEFINED +#define simgrid_parse__scan_string_ALREADY_DEFINED #else -#define yy_scan_string surf_parse__scan_string +#define yy_scan_string simgrid_parse__scan_string #endif #ifdef yy_scan_bytes -#define surf_parse__scan_bytes_ALREADY_DEFINED +#define simgrid_parse__scan_bytes_ALREADY_DEFINED #else -#define yy_scan_bytes surf_parse__scan_bytes +#define yy_scan_bytes simgrid_parse__scan_bytes #endif #ifdef yy_init_buffer -#define surf_parse__init_buffer_ALREADY_DEFINED +#define simgrid_parse__init_buffer_ALREADY_DEFINED #else -#define yy_init_buffer surf_parse__init_buffer +#define yy_init_buffer simgrid_parse__init_buffer #endif #ifdef yy_flush_buffer -#define surf_parse__flush_buffer_ALREADY_DEFINED +#define simgrid_parse__flush_buffer_ALREADY_DEFINED #else -#define yy_flush_buffer surf_parse__flush_buffer +#define yy_flush_buffer simgrid_parse__flush_buffer #endif #ifdef yy_load_buffer_state -#define surf_parse__load_buffer_state_ALREADY_DEFINED +#define simgrid_parse__load_buffer_state_ALREADY_DEFINED #else -#define yy_load_buffer_state surf_parse__load_buffer_state +#define yy_load_buffer_state simgrid_parse__load_buffer_state #endif #ifdef yy_switch_to_buffer -#define surf_parse__switch_to_buffer_ALREADY_DEFINED +#define simgrid_parse__switch_to_buffer_ALREADY_DEFINED #else -#define yy_switch_to_buffer surf_parse__switch_to_buffer +#define yy_switch_to_buffer simgrid_parse__switch_to_buffer #endif #ifdef yypush_buffer_state -#define surf_parse_push_buffer_state_ALREADY_DEFINED +#define simgrid_parse_push_buffer_state_ALREADY_DEFINED #else -#define yypush_buffer_state surf_parse_push_buffer_state +#define yypush_buffer_state simgrid_parse_push_buffer_state #endif #ifdef yypop_buffer_state -#define surf_parse_pop_buffer_state_ALREADY_DEFINED +#define simgrid_parse_pop_buffer_state_ALREADY_DEFINED #else -#define yypop_buffer_state surf_parse_pop_buffer_state +#define yypop_buffer_state simgrid_parse_pop_buffer_state #endif #ifdef yyensure_buffer_stack -#define surf_parse_ensure_buffer_stack_ALREADY_DEFINED +#define simgrid_parse_ensure_buffer_stack_ALREADY_DEFINED #else -#define yyensure_buffer_stack surf_parse_ensure_buffer_stack +#define yyensure_buffer_stack simgrid_parse_ensure_buffer_stack #endif #ifdef yylex -#define surf_parse_lex_ALREADY_DEFINED +#define simgrid_parse_lex_ALREADY_DEFINED #else -#define yylex surf_parse_lex +#define yylex simgrid_parse_lex #endif #ifdef yyrestart -#define surf_parse_restart_ALREADY_DEFINED +#define simgrid_parse_restart_ALREADY_DEFINED #else -#define yyrestart surf_parse_restart +#define yyrestart simgrid_parse_restart #endif #ifdef yylex_init -#define surf_parse_lex_init_ALREADY_DEFINED +#define simgrid_parse_lex_init_ALREADY_DEFINED #else -#define yylex_init surf_parse_lex_init +#define yylex_init simgrid_parse_lex_init #endif #ifdef yylex_init_extra -#define surf_parse_lex_init_extra_ALREADY_DEFINED +#define simgrid_parse_lex_init_extra_ALREADY_DEFINED #else -#define yylex_init_extra surf_parse_lex_init_extra +#define yylex_init_extra simgrid_parse_lex_init_extra #endif #ifdef yylex_destroy -#define surf_parse_lex_destroy_ALREADY_DEFINED +#define simgrid_parse_lex_destroy_ALREADY_DEFINED #else -#define yylex_destroy surf_parse_lex_destroy +#define yylex_destroy simgrid_parse_lex_destroy #endif #ifdef yyget_debug -#define surf_parse_get_debug_ALREADY_DEFINED +#define simgrid_parse_get_debug_ALREADY_DEFINED #else -#define yyget_debug surf_parse_get_debug +#define yyget_debug simgrid_parse_get_debug #endif #ifdef yyset_debug -#define surf_parse_set_debug_ALREADY_DEFINED +#define simgrid_parse_set_debug_ALREADY_DEFINED #else -#define yyset_debug surf_parse_set_debug +#define yyset_debug simgrid_parse_set_debug #endif #ifdef yyget_extra -#define surf_parse_get_extra_ALREADY_DEFINED +#define simgrid_parse_get_extra_ALREADY_DEFINED #else -#define yyget_extra surf_parse_get_extra +#define yyget_extra simgrid_parse_get_extra #endif #ifdef yyset_extra -#define surf_parse_set_extra_ALREADY_DEFINED +#define simgrid_parse_set_extra_ALREADY_DEFINED #else -#define yyset_extra surf_parse_set_extra +#define yyset_extra simgrid_parse_set_extra #endif #ifdef yyget_in -#define surf_parse_get_in_ALREADY_DEFINED +#define simgrid_parse_get_in_ALREADY_DEFINED #else -#define yyget_in surf_parse_get_in +#define yyget_in simgrid_parse_get_in #endif #ifdef yyset_in -#define surf_parse_set_in_ALREADY_DEFINED +#define simgrid_parse_set_in_ALREADY_DEFINED #else -#define yyset_in surf_parse_set_in +#define yyset_in simgrid_parse_set_in #endif #ifdef yyget_out -#define surf_parse_get_out_ALREADY_DEFINED +#define simgrid_parse_get_out_ALREADY_DEFINED #else -#define yyget_out surf_parse_get_out +#define yyget_out simgrid_parse_get_out #endif #ifdef yyset_out -#define surf_parse_set_out_ALREADY_DEFINED +#define simgrid_parse_set_out_ALREADY_DEFINED #else -#define yyset_out surf_parse_set_out +#define yyset_out simgrid_parse_set_out #endif #ifdef yyget_leng -#define surf_parse_get_leng_ALREADY_DEFINED +#define simgrid_parse_get_leng_ALREADY_DEFINED #else -#define yyget_leng surf_parse_get_leng +#define yyget_leng simgrid_parse_get_leng #endif #ifdef yyget_text -#define surf_parse_get_text_ALREADY_DEFINED +#define simgrid_parse_get_text_ALREADY_DEFINED #else -#define yyget_text surf_parse_get_text +#define yyget_text simgrid_parse_get_text #endif #ifdef yyget_lineno -#define surf_parse_get_lineno_ALREADY_DEFINED +#define simgrid_parse_get_lineno_ALREADY_DEFINED #else -#define yyget_lineno surf_parse_get_lineno +#define yyget_lineno simgrid_parse_get_lineno #endif #ifdef yyset_lineno -#define surf_parse_set_lineno_ALREADY_DEFINED +#define simgrid_parse_set_lineno_ALREADY_DEFINED #else -#define yyset_lineno surf_parse_set_lineno +#define yyset_lineno simgrid_parse_set_lineno #endif #ifdef yywrap -#define surf_parse_wrap_ALREADY_DEFINED +#define simgrid_parse_wrap_ALREADY_DEFINED #else -#define yywrap surf_parse_wrap +#define yywrap simgrid_parse_wrap #endif #ifdef yyalloc -#define surf_parse_alloc_ALREADY_DEFINED +#define simgrid_parse_alloc_ALREADY_DEFINED #else -#define yyalloc surf_parse_alloc +#define yyalloc simgrid_parse_alloc #endif #ifdef yyrealloc -#define surf_parse_realloc_ALREADY_DEFINED +#define simgrid_parse_realloc_ALREADY_DEFINED #else -#define yyrealloc surf_parse_realloc +#define yyrealloc simgrid_parse_realloc #endif #ifdef yyfree -#define surf_parse_free_ALREADY_DEFINED +#define simgrid_parse_free_ALREADY_DEFINED #else -#define yyfree surf_parse_free +#define yyfree simgrid_parse_free #endif #ifdef yytext -#define surf_parse_text_ALREADY_DEFINED +#define simgrid_parse_text_ALREADY_DEFINED #else -#define yytext surf_parse_text +#define yytext simgrid_parse_text #endif #ifdef yyleng -#define surf_parse_leng_ALREADY_DEFINED +#define simgrid_parse_leng_ALREADY_DEFINED #else -#define yyleng surf_parse_leng +#define yyleng simgrid_parse_leng #endif #ifdef yyin -#define surf_parse_in_ALREADY_DEFINED +#define simgrid_parse_in_ALREADY_DEFINED #else -#define yyin surf_parse_in +#define yyin simgrid_parse_in #endif #ifdef yyout -#define surf_parse_out_ALREADY_DEFINED +#define simgrid_parse_out_ALREADY_DEFINED #else -#define yyout surf_parse_out +#define yyout simgrid_parse_out #endif #ifdef yy_flex_debug -#define surf_parse__flex_debug_ALREADY_DEFINED +#define simgrid_parse__flex_debug_ALREADY_DEFINED #else -#define yy_flex_debug surf_parse__flex_debug +#define yy_flex_debug simgrid_parse__flex_debug #endif #ifdef yylineno -#define surf_parse_lineno_ALREADY_DEFINED +#define simgrid_parse_lineno_ALREADY_DEFINED #else -#define yylineno surf_parse_lineno +#define yylineno simgrid_parse_lineno #endif /* First, we deal with platform-specific or compiler-specific issues. */ @@ -599,7 +599,7 @@ void yyfree ( void * ); /* Begin user sect3 */ -#define surf_parse_wrap() (/*CONSTCOND*/1) +#define simgrid_parse_wrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; @@ -5367,7 +5367,7 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -/* Validating XML processor for src/surf/xml/simgrid.dtd. +/* Validating XML processor for src/kernel/xml/simgrid.dtd. * * This program was generated with the FleXML XML processor generator. * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved. @@ -5414,7 +5414,7 @@ char *yytext; */ /* Version strings. */ -const char surfxml_flexml_version[] = "1.9.6"; +const char simgrid_parse_flexml_version[] = "1.9.6"; /* ANSI headers. */ #include /* for realloc() -- needed here when using flex 2.5.4 */ @@ -5446,402 +5446,402 @@ const char surfxml_flexml_version[] = "1.9.6"; /* XML processor api. */ /* FleXML-provided data. */ -int surfxml_pcdata_ix; -extern char *surfxml_bufferstack; -#define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix) -AT_surfxml_AS_id AX_surfxml_AS_id; -#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id) -short int surfxml_AS_id_isset; -AT_surfxml_AS_routing AX_surfxml_AS_routing; -#define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing) -short int surfxml_AS_routing_isset; -AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst; -#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst) -short int surfxml_ASroute_dst_isset; -AT_surfxml_ASroute_gw___dst AX_surfxml_ASroute_gw___dst; -#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst) -short int surfxml_ASroute_gw___dst_isset; -AT_surfxml_ASroute_gw___src AX_surfxml_ASroute_gw___src; -#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src) -short int surfxml_ASroute_gw___src_isset; -AT_surfxml_ASroute_src AX_surfxml_ASroute_src; -#define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src) -short int surfxml_ASroute_src_isset; -AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical; -#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical -short int surfxml_ASroute_symmetrical_isset; -AT_surfxml_actor_function AX_surfxml_actor_function; -#define A_surfxml_actor_function (surfxml_bufferstack + AX_surfxml_actor_function) -short int surfxml_actor_function_isset; -AT_surfxml_actor_host AX_surfxml_actor_host; -#define A_surfxml_actor_host (surfxml_bufferstack + AX_surfxml_actor_host) -short int surfxml_actor_host_isset; -AT_surfxml_actor_kill___time AX_surfxml_actor_kill___time; -#define A_surfxml_actor_kill___time (surfxml_bufferstack + AX_surfxml_actor_kill___time) -short int surfxml_actor_kill___time_isset; -AT_surfxml_actor_on___failure AX_surfxml_actor_on___failure; -#define A_surfxml_actor_on___failure AX_surfxml_actor_on___failure -short int surfxml_actor_on___failure_isset; -AT_surfxml_actor_start___time AX_surfxml_actor_start___time; -#define A_surfxml_actor_start___time (surfxml_bufferstack + AX_surfxml_actor_start___time) -short int surfxml_actor_start___time_isset; -AT_surfxml_argument_value AX_surfxml_argument_value; -#define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value) -short int surfxml_argument_value_isset; -AT_surfxml_backbone_bandwidth AX_surfxml_backbone_bandwidth; -#define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth) -short int surfxml_backbone_bandwidth_isset; -AT_surfxml_backbone_id AX_surfxml_backbone_id; -#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id) -short int surfxml_backbone_id_isset; -AT_surfxml_backbone_latency AX_surfxml_backbone_latency; -#define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency) -short int surfxml_backbone_latency_isset; -AT_surfxml_bypassASroute_dst AX_surfxml_bypassASroute_dst; -#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst) -short int surfxml_bypassASroute_dst_isset; -AT_surfxml_bypassASroute_gw___dst AX_surfxml_bypassASroute_gw___dst; -#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst) -short int surfxml_bypassASroute_gw___dst_isset; -AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src; -#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src) -short int surfxml_bypassASroute_gw___src_isset; -AT_surfxml_bypassASroute_src AX_surfxml_bypassASroute_src; -#define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src) -short int surfxml_bypassASroute_src_isset; -AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst; -#define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst) -short int surfxml_bypassRoute_dst_isset; -AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src; -#define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src) -short int surfxml_bypassRoute_src_isset; -AT_surfxml_bypassZoneRoute_dst AX_surfxml_bypassZoneRoute_dst; -#define A_surfxml_bypassZoneRoute_dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_dst) -short int surfxml_bypassZoneRoute_dst_isset; -AT_surfxml_bypassZoneRoute_gw___dst AX_surfxml_bypassZoneRoute_gw___dst; -#define A_surfxml_bypassZoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___dst) -short int surfxml_bypassZoneRoute_gw___dst_isset; -AT_surfxml_bypassZoneRoute_gw___src AX_surfxml_bypassZoneRoute_gw___src; -#define A_surfxml_bypassZoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___src) -short int surfxml_bypassZoneRoute_gw___src_isset; -AT_surfxml_bypassZoneRoute_src AX_surfxml_bypassZoneRoute_src; -#define A_surfxml_bypassZoneRoute_src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_src) -short int surfxml_bypassZoneRoute_src_isset; -AT_surfxml_cabinet_bw AX_surfxml_cabinet_bw; -#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw) -short int surfxml_cabinet_bw_isset; -AT_surfxml_cabinet_id AX_surfxml_cabinet_id; -#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id) -short int surfxml_cabinet_id_isset; -AT_surfxml_cabinet_lat AX_surfxml_cabinet_lat; -#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat) -short int surfxml_cabinet_lat_isset; -AT_surfxml_cabinet_prefix AX_surfxml_cabinet_prefix; -#define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix) -short int surfxml_cabinet_prefix_isset; -AT_surfxml_cabinet_radical AX_surfxml_cabinet_radical; -#define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical) -short int surfxml_cabinet_radical_isset; -AT_surfxml_cabinet_speed AX_surfxml_cabinet_speed; -#define A_surfxml_cabinet_speed (surfxml_bufferstack + AX_surfxml_cabinet_speed) -short int surfxml_cabinet_speed_isset; -AT_surfxml_cabinet_suffix AX_surfxml_cabinet_suffix; -#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix) -short int surfxml_cabinet_suffix_isset; -AT_surfxml_cluster_bb___bw AX_surfxml_cluster_bb___bw; -#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw) -short int surfxml_cluster_bb___bw_isset; -AT_surfxml_cluster_bb___lat AX_surfxml_cluster_bb___lat; -#define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat) -short int surfxml_cluster_bb___lat_isset; -AT_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy; -#define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy -short int surfxml_cluster_bb___sharing___policy_isset; -AT_surfxml_cluster_bw AX_surfxml_cluster_bw; -#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw) -short int surfxml_cluster_bw_isset; -AT_surfxml_cluster_core AX_surfxml_cluster_core; -#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core) -short int surfxml_cluster_core_isset; -AT_surfxml_cluster_id AX_surfxml_cluster_id; -#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id) -short int surfxml_cluster_id_isset; -AT_surfxml_cluster_lat AX_surfxml_cluster_lat; -#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat) -short int surfxml_cluster_lat_isset; -AT_surfxml_cluster_limiter___link AX_surfxml_cluster_limiter___link; -#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link) -short int surfxml_cluster_limiter___link_isset; -AT_surfxml_cluster_loopback___bw AX_surfxml_cluster_loopback___bw; -#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw) -short int surfxml_cluster_loopback___bw_isset; -AT_surfxml_cluster_loopback___lat AX_surfxml_cluster_loopback___lat; -#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat) -short int surfxml_cluster_loopback___lat_isset; -AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix; -#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix) -short int surfxml_cluster_prefix_isset; -AT_surfxml_cluster_radical AX_surfxml_cluster_radical; -#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical) -short int surfxml_cluster_radical_isset; -AT_surfxml_cluster_router___id AX_surfxml_cluster_router___id; -#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id) -short int surfxml_cluster_router___id_isset; -AT_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy; -#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy -short int surfxml_cluster_sharing___policy_isset; -AT_surfxml_cluster_speed AX_surfxml_cluster_speed; -#define A_surfxml_cluster_speed (surfxml_bufferstack + AX_surfxml_cluster_speed) -short int surfxml_cluster_speed_isset; -AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix; -#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix) -short int surfxml_cluster_suffix_isset; -AT_surfxml_cluster_topo___parameters AX_surfxml_cluster_topo___parameters; -#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters) -short int surfxml_cluster_topo___parameters_isset; -AT_surfxml_cluster_topology AX_surfxml_cluster_topology; -#define A_surfxml_cluster_topology AX_surfxml_cluster_topology -short int surfxml_cluster_topology_isset; -AT_surfxml_config_id AX_surfxml_config_id; -#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id) -short int surfxml_config_id_isset; -AT_surfxml_disk_id AX_surfxml_disk_id; -#define A_surfxml_disk_id (surfxml_bufferstack + AX_surfxml_disk_id) -short int surfxml_disk_id_isset; -AT_surfxml_disk_read___bw AX_surfxml_disk_read___bw; -#define A_surfxml_disk_read___bw (surfxml_bufferstack + AX_surfxml_disk_read___bw) -short int surfxml_disk_read___bw_isset; -AT_surfxml_disk_write___bw AX_surfxml_disk_write___bw; -#define A_surfxml_disk_write___bw (surfxml_bufferstack + AX_surfxml_disk_write___bw) -short int surfxml_disk_write___bw_isset; -AT_surfxml_host_availability___file AX_surfxml_host_availability___file; -#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file) -short int surfxml_host_availability___file_isset; -AT_surfxml_host_coordinates AX_surfxml_host_coordinates; -#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates) -short int surfxml_host_coordinates_isset; -AT_surfxml_host_core AX_surfxml_host_core; -#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core) -short int surfxml_host_core_isset; -AT_surfxml_host_id AX_surfxml_host_id; -#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id) -short int surfxml_host_id_isset; -AT_surfxml_host_pstate AX_surfxml_host_pstate; -#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate) -short int surfxml_host_pstate_isset; -AT_surfxml_host_speed AX_surfxml_host_speed; -#define A_surfxml_host_speed (surfxml_bufferstack + AX_surfxml_host_speed) -short int surfxml_host_speed_isset; -AT_surfxml_host_speed___file AX_surfxml_host_speed___file; -#define A_surfxml_host_speed___file (surfxml_bufferstack + AX_surfxml_host_speed___file) -short int surfxml_host_speed___file_isset; -AT_surfxml_host_state___file AX_surfxml_host_state___file; -#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file) -short int surfxml_host_state___file_isset; -AT_surfxml_host___link_down AX_surfxml_host___link_down; -#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down) -short int surfxml_host___link_down_isset; -AT_surfxml_host___link_id AX_surfxml_host___link_id; -#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id) -short int surfxml_host___link_id_isset; -AT_surfxml_host___link_up AX_surfxml_host___link_up; -#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up) -short int surfxml_host___link_up_isset; -AT_surfxml_include_file AX_surfxml_include_file; -#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file) -short int surfxml_include_file_isset; -AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth; -#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth) -short int surfxml_link_bandwidth_isset; -AT_surfxml_link_bandwidth___file AX_surfxml_link_bandwidth___file; -#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file) -short int surfxml_link_bandwidth___file_isset; -AT_surfxml_link_id AX_surfxml_link_id; -#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id) -short int surfxml_link_id_isset; -AT_surfxml_link_latency AX_surfxml_link_latency; -#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency) -short int surfxml_link_latency_isset; -AT_surfxml_link_latency___file AX_surfxml_link_latency___file; -#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file) -short int surfxml_link_latency___file_isset; -AT_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy; -#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy -short int surfxml_link_sharing___policy_isset; -AT_surfxml_link_state___file AX_surfxml_link_state___file; -#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file) -short int surfxml_link_state___file_isset; -AT_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction; -#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction -short int surfxml_link___ctn_direction_isset; -AT_surfxml_link___ctn_id AX_surfxml_link___ctn_id; -#define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id) -short int surfxml_link___ctn_id_isset; -AT_surfxml_model___prop_id AX_surfxml_model___prop_id; -#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id) -short int surfxml_model___prop_id_isset; -AT_surfxml_model___prop_value AX_surfxml_model___prop_value; -#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value) -short int surfxml_model___prop_value_isset; -AT_surfxml_mount_name AX_surfxml_mount_name; -#define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name) -short int surfxml_mount_name_isset; -AT_surfxml_mount_storageId AX_surfxml_mount_storageId; -#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId) -short int surfxml_mount_storageId_isset; -AT_surfxml_peer_availability___file AX_surfxml_peer_availability___file; -#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file) -short int surfxml_peer_availability___file_isset; -AT_surfxml_peer_bw___in AX_surfxml_peer_bw___in; -#define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in) -short int surfxml_peer_bw___in_isset; -AT_surfxml_peer_bw___out AX_surfxml_peer_bw___out; -#define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out) -short int surfxml_peer_bw___out_isset; -AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates; -#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates) -short int surfxml_peer_coordinates_isset; -AT_surfxml_peer_id AX_surfxml_peer_id; -#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id) -short int surfxml_peer_id_isset; -AT_surfxml_peer_lat AX_surfxml_peer_lat; -#define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat) -short int surfxml_peer_lat_isset; -AT_surfxml_peer_speed AX_surfxml_peer_speed; -#define A_surfxml_peer_speed (surfxml_bufferstack + AX_surfxml_peer_speed) -short int surfxml_peer_speed_isset; -AT_surfxml_peer_speed___file AX_surfxml_peer_speed___file; -#define A_surfxml_peer_speed___file (surfxml_bufferstack + AX_surfxml_peer_speed___file) -short int surfxml_peer_speed___file_isset; -AT_surfxml_peer_state___file AX_surfxml_peer_state___file; -#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file) -short int surfxml_peer_state___file_isset; -AT_surfxml_platform_version AX_surfxml_platform_version; -#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version) -short int surfxml_platform_version_isset; -AT_surfxml_process_function AX_surfxml_process_function; -#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function) -short int surfxml_process_function_isset; -AT_surfxml_process_host AX_surfxml_process_host; -#define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host) -short int surfxml_process_host_isset; -AT_surfxml_process_kill___time AX_surfxml_process_kill___time; -#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time) -short int surfxml_process_kill___time_isset; -AT_surfxml_process_on___failure AX_surfxml_process_on___failure; -#define A_surfxml_process_on___failure AX_surfxml_process_on___failure -short int surfxml_process_on___failure_isset; -AT_surfxml_process_start___time AX_surfxml_process_start___time; -#define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time) -short int surfxml_process_start___time_isset; -AT_surfxml_prop_id AX_surfxml_prop_id; -#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id) -short int surfxml_prop_id_isset; -AT_surfxml_prop_value AX_surfxml_prop_value; -#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value) -short int surfxml_prop_value_isset; -AT_surfxml_random_generator AX_surfxml_random_generator; -#define A_surfxml_random_generator AX_surfxml_random_generator -short int surfxml_random_generator_isset; -AT_surfxml_random_id AX_surfxml_random_id; -#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id) -short int surfxml_random_id_isset; -AT_surfxml_random_max AX_surfxml_random_max; -#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max) -short int surfxml_random_max_isset; -AT_surfxml_random_mean AX_surfxml_random_mean; -#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean) -short int surfxml_random_mean_isset; -AT_surfxml_random_min AX_surfxml_random_min; -#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min) -short int surfxml_random_min_isset; -AT_surfxml_random_radical AX_surfxml_random_radical; -#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical) -short int surfxml_random_radical_isset; -AT_surfxml_random_seed AX_surfxml_random_seed; -#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed) -short int surfxml_random_seed_isset; -AT_surfxml_random_std___deviation AX_surfxml_random_std___deviation; -#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation) -short int surfxml_random_std___deviation_isset; -AT_surfxml_route_dst AX_surfxml_route_dst; -#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst) -short int surfxml_route_dst_isset; -AT_surfxml_route_src AX_surfxml_route_src; -#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src) -short int surfxml_route_src_isset; -AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical; -#define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical -short int surfxml_route_symmetrical_isset; -AT_surfxml_router_coordinates AX_surfxml_router_coordinates; -#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates) -short int surfxml_router_coordinates_isset; -AT_surfxml_router_id AX_surfxml_router_id; -#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id) -short int surfxml_router_id_isset; -AT_surfxml_storage_attach AX_surfxml_storage_attach; -#define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach) -short int surfxml_storage_attach_isset; -AT_surfxml_storage_content AX_surfxml_storage_content; -#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content) -short int surfxml_storage_content_isset; -AT_surfxml_storage_id AX_surfxml_storage_id; -#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id) -short int surfxml_storage_id_isset; -AT_surfxml_storage_typeId AX_surfxml_storage_typeId; -#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId) -short int surfxml_storage_typeId_isset; -AT_surfxml_storage___type_content AX_surfxml_storage___type_content; -#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content) -short int surfxml_storage___type_content_isset; -AT_surfxml_storage___type_id AX_surfxml_storage___type_id; -#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id) -short int surfxml_storage___type_id_isset; -AT_surfxml_storage___type_model AX_surfxml_storage___type_model; -#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model) -short int surfxml_storage___type_model_isset; -AT_surfxml_storage___type_size AX_surfxml_storage___type_size; -#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size) -short int surfxml_storage___type_size_isset; -AT_surfxml_trace_file AX_surfxml_trace_file; -#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file) -short int surfxml_trace_file_isset; -AT_surfxml_trace_id AX_surfxml_trace_id; -#define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id) -short int surfxml_trace_id_isset; -AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity; -#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity) -short int surfxml_trace_periodicity_isset; -AT_surfxml_trace___connect_element AX_surfxml_trace___connect_element; -#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element) -short int surfxml_trace___connect_element_isset; -AT_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind; -#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind -short int surfxml_trace___connect_kind_isset; -AT_surfxml_trace___connect_trace AX_surfxml_trace___connect_trace; -#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace) -short int surfxml_trace___connect_trace_isset; -AT_surfxml_zone_id AX_surfxml_zone_id; -#define A_surfxml_zone_id (surfxml_bufferstack + AX_surfxml_zone_id) -short int surfxml_zone_id_isset; -AT_surfxml_zone_routing AX_surfxml_zone_routing; -#define A_surfxml_zone_routing (surfxml_bufferstack + AX_surfxml_zone_routing) -short int surfxml_zone_routing_isset; -AT_surfxml_zoneRoute_dst AX_surfxml_zoneRoute_dst; -#define A_surfxml_zoneRoute_dst (surfxml_bufferstack + AX_surfxml_zoneRoute_dst) -short int surfxml_zoneRoute_dst_isset; -AT_surfxml_zoneRoute_gw___dst AX_surfxml_zoneRoute_gw___dst; -#define A_surfxml_zoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___dst) -short int surfxml_zoneRoute_gw___dst_isset; -AT_surfxml_zoneRoute_gw___src AX_surfxml_zoneRoute_gw___src; -#define A_surfxml_zoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___src) -short int surfxml_zoneRoute_gw___src_isset; -AT_surfxml_zoneRoute_src AX_surfxml_zoneRoute_src; -#define A_surfxml_zoneRoute_src (surfxml_bufferstack + AX_surfxml_zoneRoute_src) -short int surfxml_zoneRoute_src_isset; -AT_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical; -#define A_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical -short int surfxml_zoneRoute_symmetrical_isset; +int simgrid_parse_pcdata_ix; +extern char *simgrid_parse_bufferstack; +#define simgrid_parse_pcdata (simgrid_parse_bufferstack + simgrid_parse_pcdata_ix) +AT_simgrid_parse_AS_id AX_simgrid_parse_AS_id; +#define A_simgrid_parse_AS_id (simgrid_parse_bufferstack + AX_simgrid_parse_AS_id) +short int simgrid_parse_AS_id_isset; +AT_simgrid_parse_AS_routing AX_simgrid_parse_AS_routing; +#define A_simgrid_parse_AS_routing (simgrid_parse_bufferstack + AX_simgrid_parse_AS_routing) +short int simgrid_parse_AS_routing_isset; +AT_simgrid_parse_ASroute_dst AX_simgrid_parse_ASroute_dst; +#define A_simgrid_parse_ASroute_dst (simgrid_parse_bufferstack + AX_simgrid_parse_ASroute_dst) +short int simgrid_parse_ASroute_dst_isset; +AT_simgrid_parse_ASroute_gw___dst AX_simgrid_parse_ASroute_gw___dst; +#define A_simgrid_parse_ASroute_gw___dst (simgrid_parse_bufferstack + AX_simgrid_parse_ASroute_gw___dst) +short int simgrid_parse_ASroute_gw___dst_isset; +AT_simgrid_parse_ASroute_gw___src AX_simgrid_parse_ASroute_gw___src; +#define A_simgrid_parse_ASroute_gw___src (simgrid_parse_bufferstack + AX_simgrid_parse_ASroute_gw___src) +short int simgrid_parse_ASroute_gw___src_isset; +AT_simgrid_parse_ASroute_src AX_simgrid_parse_ASroute_src; +#define A_simgrid_parse_ASroute_src (simgrid_parse_bufferstack + AX_simgrid_parse_ASroute_src) +short int simgrid_parse_ASroute_src_isset; +AT_simgrid_parse_ASroute_symmetrical AX_simgrid_parse_ASroute_symmetrical; +#define A_simgrid_parse_ASroute_symmetrical AX_simgrid_parse_ASroute_symmetrical +short int simgrid_parse_ASroute_symmetrical_isset; +AT_simgrid_parse_actor_function AX_simgrid_parse_actor_function; +#define A_simgrid_parse_actor_function (simgrid_parse_bufferstack + AX_simgrid_parse_actor_function) +short int simgrid_parse_actor_function_isset; +AT_simgrid_parse_actor_host AX_simgrid_parse_actor_host; +#define A_simgrid_parse_actor_host (simgrid_parse_bufferstack + AX_simgrid_parse_actor_host) +short int simgrid_parse_actor_host_isset; +AT_simgrid_parse_actor_kill___time AX_simgrid_parse_actor_kill___time; +#define A_simgrid_parse_actor_kill___time (simgrid_parse_bufferstack + AX_simgrid_parse_actor_kill___time) +short int simgrid_parse_actor_kill___time_isset; +AT_simgrid_parse_actor_on___failure AX_simgrid_parse_actor_on___failure; +#define A_simgrid_parse_actor_on___failure AX_simgrid_parse_actor_on___failure +short int simgrid_parse_actor_on___failure_isset; +AT_simgrid_parse_actor_start___time AX_simgrid_parse_actor_start___time; +#define A_simgrid_parse_actor_start___time (simgrid_parse_bufferstack + AX_simgrid_parse_actor_start___time) +short int simgrid_parse_actor_start___time_isset; +AT_simgrid_parse_argument_value AX_simgrid_parse_argument_value; +#define A_simgrid_parse_argument_value (simgrid_parse_bufferstack + AX_simgrid_parse_argument_value) +short int simgrid_parse_argument_value_isset; +AT_simgrid_parse_backbone_bandwidth AX_simgrid_parse_backbone_bandwidth; +#define A_simgrid_parse_backbone_bandwidth (simgrid_parse_bufferstack + AX_simgrid_parse_backbone_bandwidth) +short int simgrid_parse_backbone_bandwidth_isset; +AT_simgrid_parse_backbone_id AX_simgrid_parse_backbone_id; +#define A_simgrid_parse_backbone_id (simgrid_parse_bufferstack + AX_simgrid_parse_backbone_id) +short int simgrid_parse_backbone_id_isset; +AT_simgrid_parse_backbone_latency AX_simgrid_parse_backbone_latency; +#define A_simgrid_parse_backbone_latency (simgrid_parse_bufferstack + AX_simgrid_parse_backbone_latency) +short int simgrid_parse_backbone_latency_isset; +AT_simgrid_parse_bypassASroute_dst AX_simgrid_parse_bypassASroute_dst; +#define A_simgrid_parse_bypassASroute_dst (simgrid_parse_bufferstack + AX_simgrid_parse_bypassASroute_dst) +short int simgrid_parse_bypassASroute_dst_isset; +AT_simgrid_parse_bypassASroute_gw___dst AX_simgrid_parse_bypassASroute_gw___dst; +#define A_simgrid_parse_bypassASroute_gw___dst (simgrid_parse_bufferstack + AX_simgrid_parse_bypassASroute_gw___dst) +short int simgrid_parse_bypassASroute_gw___dst_isset; +AT_simgrid_parse_bypassASroute_gw___src AX_simgrid_parse_bypassASroute_gw___src; +#define A_simgrid_parse_bypassASroute_gw___src (simgrid_parse_bufferstack + AX_simgrid_parse_bypassASroute_gw___src) +short int simgrid_parse_bypassASroute_gw___src_isset; +AT_simgrid_parse_bypassASroute_src AX_simgrid_parse_bypassASroute_src; +#define A_simgrid_parse_bypassASroute_src (simgrid_parse_bufferstack + AX_simgrid_parse_bypassASroute_src) +short int simgrid_parse_bypassASroute_src_isset; +AT_simgrid_parse_bypassRoute_dst AX_simgrid_parse_bypassRoute_dst; +#define A_simgrid_parse_bypassRoute_dst (simgrid_parse_bufferstack + AX_simgrid_parse_bypassRoute_dst) +short int simgrid_parse_bypassRoute_dst_isset; +AT_simgrid_parse_bypassRoute_src AX_simgrid_parse_bypassRoute_src; +#define A_simgrid_parse_bypassRoute_src (simgrid_parse_bufferstack + AX_simgrid_parse_bypassRoute_src) +short int simgrid_parse_bypassRoute_src_isset; +AT_simgrid_parse_bypassZoneRoute_dst AX_simgrid_parse_bypassZoneRoute_dst; +#define A_simgrid_parse_bypassZoneRoute_dst (simgrid_parse_bufferstack + AX_simgrid_parse_bypassZoneRoute_dst) +short int simgrid_parse_bypassZoneRoute_dst_isset; +AT_simgrid_parse_bypassZoneRoute_gw___dst AX_simgrid_parse_bypassZoneRoute_gw___dst; +#define A_simgrid_parse_bypassZoneRoute_gw___dst (simgrid_parse_bufferstack + AX_simgrid_parse_bypassZoneRoute_gw___dst) +short int simgrid_parse_bypassZoneRoute_gw___dst_isset; +AT_simgrid_parse_bypassZoneRoute_gw___src AX_simgrid_parse_bypassZoneRoute_gw___src; +#define A_simgrid_parse_bypassZoneRoute_gw___src (simgrid_parse_bufferstack + AX_simgrid_parse_bypassZoneRoute_gw___src) +short int simgrid_parse_bypassZoneRoute_gw___src_isset; +AT_simgrid_parse_bypassZoneRoute_src AX_simgrid_parse_bypassZoneRoute_src; +#define A_simgrid_parse_bypassZoneRoute_src (simgrid_parse_bufferstack + AX_simgrid_parse_bypassZoneRoute_src) +short int simgrid_parse_bypassZoneRoute_src_isset; +AT_simgrid_parse_cabinet_bw AX_simgrid_parse_cabinet_bw; +#define A_simgrid_parse_cabinet_bw (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_bw) +short int simgrid_parse_cabinet_bw_isset; +AT_simgrid_parse_cabinet_id AX_simgrid_parse_cabinet_id; +#define A_simgrid_parse_cabinet_id (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_id) +short int simgrid_parse_cabinet_id_isset; +AT_simgrid_parse_cabinet_lat AX_simgrid_parse_cabinet_lat; +#define A_simgrid_parse_cabinet_lat (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_lat) +short int simgrid_parse_cabinet_lat_isset; +AT_simgrid_parse_cabinet_prefix AX_simgrid_parse_cabinet_prefix; +#define A_simgrid_parse_cabinet_prefix (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_prefix) +short int simgrid_parse_cabinet_prefix_isset; +AT_simgrid_parse_cabinet_radical AX_simgrid_parse_cabinet_radical; +#define A_simgrid_parse_cabinet_radical (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_radical) +short int simgrid_parse_cabinet_radical_isset; +AT_simgrid_parse_cabinet_speed AX_simgrid_parse_cabinet_speed; +#define A_simgrid_parse_cabinet_speed (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_speed) +short int simgrid_parse_cabinet_speed_isset; +AT_simgrid_parse_cabinet_suffix AX_simgrid_parse_cabinet_suffix; +#define A_simgrid_parse_cabinet_suffix (simgrid_parse_bufferstack + AX_simgrid_parse_cabinet_suffix) +short int simgrid_parse_cabinet_suffix_isset; +AT_simgrid_parse_cluster_bb___bw AX_simgrid_parse_cluster_bb___bw; +#define A_simgrid_parse_cluster_bb___bw (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_bb___bw) +short int simgrid_parse_cluster_bb___bw_isset; +AT_simgrid_parse_cluster_bb___lat AX_simgrid_parse_cluster_bb___lat; +#define A_simgrid_parse_cluster_bb___lat (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_bb___lat) +short int simgrid_parse_cluster_bb___lat_isset; +AT_simgrid_parse_cluster_bb___sharing___policy AX_simgrid_parse_cluster_bb___sharing___policy; +#define A_simgrid_parse_cluster_bb___sharing___policy AX_simgrid_parse_cluster_bb___sharing___policy +short int simgrid_parse_cluster_bb___sharing___policy_isset; +AT_simgrid_parse_cluster_bw AX_simgrid_parse_cluster_bw; +#define A_simgrid_parse_cluster_bw (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_bw) +short int simgrid_parse_cluster_bw_isset; +AT_simgrid_parse_cluster_core AX_simgrid_parse_cluster_core; +#define A_simgrid_parse_cluster_core (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_core) +short int simgrid_parse_cluster_core_isset; +AT_simgrid_parse_cluster_id AX_simgrid_parse_cluster_id; +#define A_simgrid_parse_cluster_id (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_id) +short int simgrid_parse_cluster_id_isset; +AT_simgrid_parse_cluster_lat AX_simgrid_parse_cluster_lat; +#define A_simgrid_parse_cluster_lat (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_lat) +short int simgrid_parse_cluster_lat_isset; +AT_simgrid_parse_cluster_limiter___link AX_simgrid_parse_cluster_limiter___link; +#define A_simgrid_parse_cluster_limiter___link (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_limiter___link) +short int simgrid_parse_cluster_limiter___link_isset; +AT_simgrid_parse_cluster_loopback___bw AX_simgrid_parse_cluster_loopback___bw; +#define A_simgrid_parse_cluster_loopback___bw (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_loopback___bw) +short int simgrid_parse_cluster_loopback___bw_isset; +AT_simgrid_parse_cluster_loopback___lat AX_simgrid_parse_cluster_loopback___lat; +#define A_simgrid_parse_cluster_loopback___lat (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_loopback___lat) +short int simgrid_parse_cluster_loopback___lat_isset; +AT_simgrid_parse_cluster_prefix AX_simgrid_parse_cluster_prefix; +#define A_simgrid_parse_cluster_prefix (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_prefix) +short int simgrid_parse_cluster_prefix_isset; +AT_simgrid_parse_cluster_radical AX_simgrid_parse_cluster_radical; +#define A_simgrid_parse_cluster_radical (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_radical) +short int simgrid_parse_cluster_radical_isset; +AT_simgrid_parse_cluster_router___id AX_simgrid_parse_cluster_router___id; +#define A_simgrid_parse_cluster_router___id (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_router___id) +short int simgrid_parse_cluster_router___id_isset; +AT_simgrid_parse_cluster_sharing___policy AX_simgrid_parse_cluster_sharing___policy; +#define A_simgrid_parse_cluster_sharing___policy AX_simgrid_parse_cluster_sharing___policy +short int simgrid_parse_cluster_sharing___policy_isset; +AT_simgrid_parse_cluster_speed AX_simgrid_parse_cluster_speed; +#define A_simgrid_parse_cluster_speed (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_speed) +short int simgrid_parse_cluster_speed_isset; +AT_simgrid_parse_cluster_suffix AX_simgrid_parse_cluster_suffix; +#define A_simgrid_parse_cluster_suffix (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_suffix) +short int simgrid_parse_cluster_suffix_isset; +AT_simgrid_parse_cluster_topo___parameters AX_simgrid_parse_cluster_topo___parameters; +#define A_simgrid_parse_cluster_topo___parameters (simgrid_parse_bufferstack + AX_simgrid_parse_cluster_topo___parameters) +short int simgrid_parse_cluster_topo___parameters_isset; +AT_simgrid_parse_cluster_topology AX_simgrid_parse_cluster_topology; +#define A_simgrid_parse_cluster_topology AX_simgrid_parse_cluster_topology +short int simgrid_parse_cluster_topology_isset; +AT_simgrid_parse_config_id AX_simgrid_parse_config_id; +#define A_simgrid_parse_config_id (simgrid_parse_bufferstack + AX_simgrid_parse_config_id) +short int simgrid_parse_config_id_isset; +AT_simgrid_parse_disk_id AX_simgrid_parse_disk_id; +#define A_simgrid_parse_disk_id (simgrid_parse_bufferstack + AX_simgrid_parse_disk_id) +short int simgrid_parse_disk_id_isset; +AT_simgrid_parse_disk_read___bw AX_simgrid_parse_disk_read___bw; +#define A_simgrid_parse_disk_read___bw (simgrid_parse_bufferstack + AX_simgrid_parse_disk_read___bw) +short int simgrid_parse_disk_read___bw_isset; +AT_simgrid_parse_disk_write___bw AX_simgrid_parse_disk_write___bw; +#define A_simgrid_parse_disk_write___bw (simgrid_parse_bufferstack + AX_simgrid_parse_disk_write___bw) +short int simgrid_parse_disk_write___bw_isset; +AT_simgrid_parse_host_availability___file AX_simgrid_parse_host_availability___file; +#define A_simgrid_parse_host_availability___file (simgrid_parse_bufferstack + AX_simgrid_parse_host_availability___file) +short int simgrid_parse_host_availability___file_isset; +AT_simgrid_parse_host_coordinates AX_simgrid_parse_host_coordinates; +#define A_simgrid_parse_host_coordinates (simgrid_parse_bufferstack + AX_simgrid_parse_host_coordinates) +short int simgrid_parse_host_coordinates_isset; +AT_simgrid_parse_host_core AX_simgrid_parse_host_core; +#define A_simgrid_parse_host_core (simgrid_parse_bufferstack + AX_simgrid_parse_host_core) +short int simgrid_parse_host_core_isset; +AT_simgrid_parse_host_id AX_simgrid_parse_host_id; +#define A_simgrid_parse_host_id (simgrid_parse_bufferstack + AX_simgrid_parse_host_id) +short int simgrid_parse_host_id_isset; +AT_simgrid_parse_host_pstate AX_simgrid_parse_host_pstate; +#define A_simgrid_parse_host_pstate (simgrid_parse_bufferstack + AX_simgrid_parse_host_pstate) +short int simgrid_parse_host_pstate_isset; +AT_simgrid_parse_host_speed AX_simgrid_parse_host_speed; +#define A_simgrid_parse_host_speed (simgrid_parse_bufferstack + AX_simgrid_parse_host_speed) +short int simgrid_parse_host_speed_isset; +AT_simgrid_parse_host_speed___file AX_simgrid_parse_host_speed___file; +#define A_simgrid_parse_host_speed___file (simgrid_parse_bufferstack + AX_simgrid_parse_host_speed___file) +short int simgrid_parse_host_speed___file_isset; +AT_simgrid_parse_host_state___file AX_simgrid_parse_host_state___file; +#define A_simgrid_parse_host_state___file (simgrid_parse_bufferstack + AX_simgrid_parse_host_state___file) +short int simgrid_parse_host_state___file_isset; +AT_simgrid_parse_host___link_down AX_simgrid_parse_host___link_down; +#define A_simgrid_parse_host___link_down (simgrid_parse_bufferstack + AX_simgrid_parse_host___link_down) +short int simgrid_parse_host___link_down_isset; +AT_simgrid_parse_host___link_id AX_simgrid_parse_host___link_id; +#define A_simgrid_parse_host___link_id (simgrid_parse_bufferstack + AX_simgrid_parse_host___link_id) +short int simgrid_parse_host___link_id_isset; +AT_simgrid_parse_host___link_up AX_simgrid_parse_host___link_up; +#define A_simgrid_parse_host___link_up (simgrid_parse_bufferstack + AX_simgrid_parse_host___link_up) +short int simgrid_parse_host___link_up_isset; +AT_simgrid_parse_include_file AX_simgrid_parse_include_file; +#define A_simgrid_parse_include_file (simgrid_parse_bufferstack + AX_simgrid_parse_include_file) +short int simgrid_parse_include_file_isset; +AT_simgrid_parse_link_bandwidth AX_simgrid_parse_link_bandwidth; +#define A_simgrid_parse_link_bandwidth (simgrid_parse_bufferstack + AX_simgrid_parse_link_bandwidth) +short int simgrid_parse_link_bandwidth_isset; +AT_simgrid_parse_link_bandwidth___file AX_simgrid_parse_link_bandwidth___file; +#define A_simgrid_parse_link_bandwidth___file (simgrid_parse_bufferstack + AX_simgrid_parse_link_bandwidth___file) +short int simgrid_parse_link_bandwidth___file_isset; +AT_simgrid_parse_link_id AX_simgrid_parse_link_id; +#define A_simgrid_parse_link_id (simgrid_parse_bufferstack + AX_simgrid_parse_link_id) +short int simgrid_parse_link_id_isset; +AT_simgrid_parse_link_latency AX_simgrid_parse_link_latency; +#define A_simgrid_parse_link_latency (simgrid_parse_bufferstack + AX_simgrid_parse_link_latency) +short int simgrid_parse_link_latency_isset; +AT_simgrid_parse_link_latency___file AX_simgrid_parse_link_latency___file; +#define A_simgrid_parse_link_latency___file (simgrid_parse_bufferstack + AX_simgrid_parse_link_latency___file) +short int simgrid_parse_link_latency___file_isset; +AT_simgrid_parse_link_sharing___policy AX_simgrid_parse_link_sharing___policy; +#define A_simgrid_parse_link_sharing___policy AX_simgrid_parse_link_sharing___policy +short int simgrid_parse_link_sharing___policy_isset; +AT_simgrid_parse_link_state___file AX_simgrid_parse_link_state___file; +#define A_simgrid_parse_link_state___file (simgrid_parse_bufferstack + AX_simgrid_parse_link_state___file) +short int simgrid_parse_link_state___file_isset; +AT_simgrid_parse_link___ctn_direction AX_simgrid_parse_link___ctn_direction; +#define A_simgrid_parse_link___ctn_direction AX_simgrid_parse_link___ctn_direction +short int simgrid_parse_link___ctn_direction_isset; +AT_simgrid_parse_link___ctn_id AX_simgrid_parse_link___ctn_id; +#define A_simgrid_parse_link___ctn_id (simgrid_parse_bufferstack + AX_simgrid_parse_link___ctn_id) +short int simgrid_parse_link___ctn_id_isset; +AT_simgrid_parse_model___prop_id AX_simgrid_parse_model___prop_id; +#define A_simgrid_parse_model___prop_id (simgrid_parse_bufferstack + AX_simgrid_parse_model___prop_id) +short int simgrid_parse_model___prop_id_isset; +AT_simgrid_parse_model___prop_value AX_simgrid_parse_model___prop_value; +#define A_simgrid_parse_model___prop_value (simgrid_parse_bufferstack + AX_simgrid_parse_model___prop_value) +short int simgrid_parse_model___prop_value_isset; +AT_simgrid_parse_mount_name AX_simgrid_parse_mount_name; +#define A_simgrid_parse_mount_name (simgrid_parse_bufferstack + AX_simgrid_parse_mount_name) +short int simgrid_parse_mount_name_isset; +AT_simgrid_parse_mount_storageId AX_simgrid_parse_mount_storageId; +#define A_simgrid_parse_mount_storageId (simgrid_parse_bufferstack + AX_simgrid_parse_mount_storageId) +short int simgrid_parse_mount_storageId_isset; +AT_simgrid_parse_peer_availability___file AX_simgrid_parse_peer_availability___file; +#define A_simgrid_parse_peer_availability___file (simgrid_parse_bufferstack + AX_simgrid_parse_peer_availability___file) +short int simgrid_parse_peer_availability___file_isset; +AT_simgrid_parse_peer_bw___in AX_simgrid_parse_peer_bw___in; +#define A_simgrid_parse_peer_bw___in (simgrid_parse_bufferstack + AX_simgrid_parse_peer_bw___in) +short int simgrid_parse_peer_bw___in_isset; +AT_simgrid_parse_peer_bw___out AX_simgrid_parse_peer_bw___out; +#define A_simgrid_parse_peer_bw___out (simgrid_parse_bufferstack + AX_simgrid_parse_peer_bw___out) +short int simgrid_parse_peer_bw___out_isset; +AT_simgrid_parse_peer_coordinates AX_simgrid_parse_peer_coordinates; +#define A_simgrid_parse_peer_coordinates (simgrid_parse_bufferstack + AX_simgrid_parse_peer_coordinates) +short int simgrid_parse_peer_coordinates_isset; +AT_simgrid_parse_peer_id AX_simgrid_parse_peer_id; +#define A_simgrid_parse_peer_id (simgrid_parse_bufferstack + AX_simgrid_parse_peer_id) +short int simgrid_parse_peer_id_isset; +AT_simgrid_parse_peer_lat AX_simgrid_parse_peer_lat; +#define A_simgrid_parse_peer_lat (simgrid_parse_bufferstack + AX_simgrid_parse_peer_lat) +short int simgrid_parse_peer_lat_isset; +AT_simgrid_parse_peer_speed AX_simgrid_parse_peer_speed; +#define A_simgrid_parse_peer_speed (simgrid_parse_bufferstack + AX_simgrid_parse_peer_speed) +short int simgrid_parse_peer_speed_isset; +AT_simgrid_parse_peer_speed___file AX_simgrid_parse_peer_speed___file; +#define A_simgrid_parse_peer_speed___file (simgrid_parse_bufferstack + AX_simgrid_parse_peer_speed___file) +short int simgrid_parse_peer_speed___file_isset; +AT_simgrid_parse_peer_state___file AX_simgrid_parse_peer_state___file; +#define A_simgrid_parse_peer_state___file (simgrid_parse_bufferstack + AX_simgrid_parse_peer_state___file) +short int simgrid_parse_peer_state___file_isset; +AT_simgrid_parse_platform_version AX_simgrid_parse_platform_version; +#define A_simgrid_parse_platform_version (simgrid_parse_bufferstack + AX_simgrid_parse_platform_version) +short int simgrid_parse_platform_version_isset; +AT_simgrid_parse_process_function AX_simgrid_parse_process_function; +#define A_simgrid_parse_process_function (simgrid_parse_bufferstack + AX_simgrid_parse_process_function) +short int simgrid_parse_process_function_isset; +AT_simgrid_parse_process_host AX_simgrid_parse_process_host; +#define A_simgrid_parse_process_host (simgrid_parse_bufferstack + AX_simgrid_parse_process_host) +short int simgrid_parse_process_host_isset; +AT_simgrid_parse_process_kill___time AX_simgrid_parse_process_kill___time; +#define A_simgrid_parse_process_kill___time (simgrid_parse_bufferstack + AX_simgrid_parse_process_kill___time) +short int simgrid_parse_process_kill___time_isset; +AT_simgrid_parse_process_on___failure AX_simgrid_parse_process_on___failure; +#define A_simgrid_parse_process_on___failure AX_simgrid_parse_process_on___failure +short int simgrid_parse_process_on___failure_isset; +AT_simgrid_parse_process_start___time AX_simgrid_parse_process_start___time; +#define A_simgrid_parse_process_start___time (simgrid_parse_bufferstack + AX_simgrid_parse_process_start___time) +short int simgrid_parse_process_start___time_isset; +AT_simgrid_parse_prop_id AX_simgrid_parse_prop_id; +#define A_simgrid_parse_prop_id (simgrid_parse_bufferstack + AX_simgrid_parse_prop_id) +short int simgrid_parse_prop_id_isset; +AT_simgrid_parse_prop_value AX_simgrid_parse_prop_value; +#define A_simgrid_parse_prop_value (simgrid_parse_bufferstack + AX_simgrid_parse_prop_value) +short int simgrid_parse_prop_value_isset; +AT_simgrid_parse_random_generator AX_simgrid_parse_random_generator; +#define A_simgrid_parse_random_generator AX_simgrid_parse_random_generator +short int simgrid_parse_random_generator_isset; +AT_simgrid_parse_random_id AX_simgrid_parse_random_id; +#define A_simgrid_parse_random_id (simgrid_parse_bufferstack + AX_simgrid_parse_random_id) +short int simgrid_parse_random_id_isset; +AT_simgrid_parse_random_max AX_simgrid_parse_random_max; +#define A_simgrid_parse_random_max (simgrid_parse_bufferstack + AX_simgrid_parse_random_max) +short int simgrid_parse_random_max_isset; +AT_simgrid_parse_random_mean AX_simgrid_parse_random_mean; +#define A_simgrid_parse_random_mean (simgrid_parse_bufferstack + AX_simgrid_parse_random_mean) +short int simgrid_parse_random_mean_isset; +AT_simgrid_parse_random_min AX_simgrid_parse_random_min; +#define A_simgrid_parse_random_min (simgrid_parse_bufferstack + AX_simgrid_parse_random_min) +short int simgrid_parse_random_min_isset; +AT_simgrid_parse_random_radical AX_simgrid_parse_random_radical; +#define A_simgrid_parse_random_radical (simgrid_parse_bufferstack + AX_simgrid_parse_random_radical) +short int simgrid_parse_random_radical_isset; +AT_simgrid_parse_random_seed AX_simgrid_parse_random_seed; +#define A_simgrid_parse_random_seed (simgrid_parse_bufferstack + AX_simgrid_parse_random_seed) +short int simgrid_parse_random_seed_isset; +AT_simgrid_parse_random_std___deviation AX_simgrid_parse_random_std___deviation; +#define A_simgrid_parse_random_std___deviation (simgrid_parse_bufferstack + AX_simgrid_parse_random_std___deviation) +short int simgrid_parse_random_std___deviation_isset; +AT_simgrid_parse_route_dst AX_simgrid_parse_route_dst; +#define A_simgrid_parse_route_dst (simgrid_parse_bufferstack + AX_simgrid_parse_route_dst) +short int simgrid_parse_route_dst_isset; +AT_simgrid_parse_route_src AX_simgrid_parse_route_src; +#define A_simgrid_parse_route_src (simgrid_parse_bufferstack + AX_simgrid_parse_route_src) +short int simgrid_parse_route_src_isset; +AT_simgrid_parse_route_symmetrical AX_simgrid_parse_route_symmetrical; +#define A_simgrid_parse_route_symmetrical AX_simgrid_parse_route_symmetrical +short int simgrid_parse_route_symmetrical_isset; +AT_simgrid_parse_router_coordinates AX_simgrid_parse_router_coordinates; +#define A_simgrid_parse_router_coordinates (simgrid_parse_bufferstack + AX_simgrid_parse_router_coordinates) +short int simgrid_parse_router_coordinates_isset; +AT_simgrid_parse_router_id AX_simgrid_parse_router_id; +#define A_simgrid_parse_router_id (simgrid_parse_bufferstack + AX_simgrid_parse_router_id) +short int simgrid_parse_router_id_isset; +AT_simgrid_parse_storage_attach AX_simgrid_parse_storage_attach; +#define A_simgrid_parse_storage_attach (simgrid_parse_bufferstack + AX_simgrid_parse_storage_attach) +short int simgrid_parse_storage_attach_isset; +AT_simgrid_parse_storage_content AX_simgrid_parse_storage_content; +#define A_simgrid_parse_storage_content (simgrid_parse_bufferstack + AX_simgrid_parse_storage_content) +short int simgrid_parse_storage_content_isset; +AT_simgrid_parse_storage_id AX_simgrid_parse_storage_id; +#define A_simgrid_parse_storage_id (simgrid_parse_bufferstack + AX_simgrid_parse_storage_id) +short int simgrid_parse_storage_id_isset; +AT_simgrid_parse_storage_typeId AX_simgrid_parse_storage_typeId; +#define A_simgrid_parse_storage_typeId (simgrid_parse_bufferstack + AX_simgrid_parse_storage_typeId) +short int simgrid_parse_storage_typeId_isset; +AT_simgrid_parse_storage___type_content AX_simgrid_parse_storage___type_content; +#define A_simgrid_parse_storage___type_content (simgrid_parse_bufferstack + AX_simgrid_parse_storage___type_content) +short int simgrid_parse_storage___type_content_isset; +AT_simgrid_parse_storage___type_id AX_simgrid_parse_storage___type_id; +#define A_simgrid_parse_storage___type_id (simgrid_parse_bufferstack + AX_simgrid_parse_storage___type_id) +short int simgrid_parse_storage___type_id_isset; +AT_simgrid_parse_storage___type_model AX_simgrid_parse_storage___type_model; +#define A_simgrid_parse_storage___type_model (simgrid_parse_bufferstack + AX_simgrid_parse_storage___type_model) +short int simgrid_parse_storage___type_model_isset; +AT_simgrid_parse_storage___type_size AX_simgrid_parse_storage___type_size; +#define A_simgrid_parse_storage___type_size (simgrid_parse_bufferstack + AX_simgrid_parse_storage___type_size) +short int simgrid_parse_storage___type_size_isset; +AT_simgrid_parse_trace_file AX_simgrid_parse_trace_file; +#define A_simgrid_parse_trace_file (simgrid_parse_bufferstack + AX_simgrid_parse_trace_file) +short int simgrid_parse_trace_file_isset; +AT_simgrid_parse_trace_id AX_simgrid_parse_trace_id; +#define A_simgrid_parse_trace_id (simgrid_parse_bufferstack + AX_simgrid_parse_trace_id) +short int simgrid_parse_trace_id_isset; +AT_simgrid_parse_trace_periodicity AX_simgrid_parse_trace_periodicity; +#define A_simgrid_parse_trace_periodicity (simgrid_parse_bufferstack + AX_simgrid_parse_trace_periodicity) +short int simgrid_parse_trace_periodicity_isset; +AT_simgrid_parse_trace___connect_element AX_simgrid_parse_trace___connect_element; +#define A_simgrid_parse_trace___connect_element (simgrid_parse_bufferstack + AX_simgrid_parse_trace___connect_element) +short int simgrid_parse_trace___connect_element_isset; +AT_simgrid_parse_trace___connect_kind AX_simgrid_parse_trace___connect_kind; +#define A_simgrid_parse_trace___connect_kind AX_simgrid_parse_trace___connect_kind +short int simgrid_parse_trace___connect_kind_isset; +AT_simgrid_parse_trace___connect_trace AX_simgrid_parse_trace___connect_trace; +#define A_simgrid_parse_trace___connect_trace (simgrid_parse_bufferstack + AX_simgrid_parse_trace___connect_trace) +short int simgrid_parse_trace___connect_trace_isset; +AT_simgrid_parse_zone_id AX_simgrid_parse_zone_id; +#define A_simgrid_parse_zone_id (simgrid_parse_bufferstack + AX_simgrid_parse_zone_id) +short int simgrid_parse_zone_id_isset; +AT_simgrid_parse_zone_routing AX_simgrid_parse_zone_routing; +#define A_simgrid_parse_zone_routing (simgrid_parse_bufferstack + AX_simgrid_parse_zone_routing) +short int simgrid_parse_zone_routing_isset; +AT_simgrid_parse_zoneRoute_dst AX_simgrid_parse_zoneRoute_dst; +#define A_simgrid_parse_zoneRoute_dst (simgrid_parse_bufferstack + AX_simgrid_parse_zoneRoute_dst) +short int simgrid_parse_zoneRoute_dst_isset; +AT_simgrid_parse_zoneRoute_gw___dst AX_simgrid_parse_zoneRoute_gw___dst; +#define A_simgrid_parse_zoneRoute_gw___dst (simgrid_parse_bufferstack + AX_simgrid_parse_zoneRoute_gw___dst) +short int simgrid_parse_zoneRoute_gw___dst_isset; +AT_simgrid_parse_zoneRoute_gw___src AX_simgrid_parse_zoneRoute_gw___src; +#define A_simgrid_parse_zoneRoute_gw___src (simgrid_parse_bufferstack + AX_simgrid_parse_zoneRoute_gw___src) +short int simgrid_parse_zoneRoute_gw___src_isset; +AT_simgrid_parse_zoneRoute_src AX_simgrid_parse_zoneRoute_src; +#define A_simgrid_parse_zoneRoute_src (simgrid_parse_bufferstack + AX_simgrid_parse_zoneRoute_src) +short int simgrid_parse_zoneRoute_src_isset; +AT_simgrid_parse_zoneRoute_symmetrical AX_simgrid_parse_zoneRoute_symmetrical; +#define A_simgrid_parse_zoneRoute_symmetrical AX_simgrid_parse_zoneRoute_symmetrical +short int simgrid_parse_zoneRoute_symmetrical_isset; /* XML state. */ #ifdef FLEX_DEBUG @@ -5866,11 +5866,11 @@ static int fail(const char*, ...); enum {flexml_max_err_msg_size = 512}; static char flexml_err_msg[flexml_max_err_msg_size]; -const char * surfxml_parse_err_msg() +const char * simgrid_parse_parse_err_msg() { return flexml_err_msg; } -static void reset_surfxml_parse_err_msg() +static void reset_simgrid_parse_parse_err_msg() { flexml_err_msg[0] = '\0'; } @@ -5880,7 +5880,7 @@ static void cleanup(void); #define CLEANUP cleanup() /* Text buffer stack handling. */ -char *surfxml_bufferstack = NULL; +char *simgrid_parse_bufferstack = NULL; static int blimit = FLEXML_BUFFERSTACKSIZE; static int bnext = 1; @@ -5889,10 +5889,10 @@ static int ilimit = FLEXML_INDEXSTACKSIZE; static int inext = 1; #define BUFFERSET(P) (P = bnext) -#define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C)) +#define BUFFERPUTC(C) (ck_blimit(), simgrid_parse_bufferstack[bnext++] = (C)) #define BUFFERDONE (BUFFERPUTC('\0')) -#define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext) +#define BUFFERLITERAL(C, P) simgrid_parse_bufferliteral(C, &(P), yytext) /* after this is called, there are at least 2 slots left in the stack */ static int ck_blimit() @@ -5900,9 +5900,9 @@ static int ck_blimit() if (bnext >= blimit) { blimit += FLEXML_BUFFERSTACKSIZE + 2; { - char *temp = (char *) realloc(surfxml_bufferstack, blimit); + char *temp = (char *) realloc(simgrid_parse_bufferstack, blimit); assert(temp); - surfxml_bufferstack = temp; + simgrid_parse_bufferstack = temp; } } return 0; @@ -5923,7 +5923,7 @@ static int ck_ilimit() } #ifdef FLEXML_NEED_BUFFERLIT -static void surfxml_bufferliteral(char c, int* pp, const char* text) +static void simgrid_parse_bufferliteral(char c, int* pp, const char* text) { BUFFERSET(*pp); if (c) { @@ -5989,7 +5989,7 @@ static int popbuffer(void) */ /* State names. */ -const char* *surfxml_statenames=NULL; +const char* *simgrid_parse_statenames=NULL; #define INITIAL 0 #define PROLOG 1 @@ -6000,162 +6000,162 @@ const char* *surfxml_statenames=NULL; #define VALUE1 6 #define VALUE2 7 #define CDATA 8 -#define AL_surfxml_AS 9 -#define S_surfxml_AS 10 -#define S_surfxml_AS_1 11 -#define S_surfxml_AS_2 12 -#define S_surfxml_AS_3 13 -#define S_surfxml_AS_4 14 -#define S_surfxml_AS_5 15 -#define S_surfxml_AS_6 16 -#define S_surfxml_AS_7 17 -#define S_surfxml_AS_8 18 -#define S_surfxml_AS_9 19 -#define S_surfxml_AS_10 20 -#define S_surfxml_AS_11 21 -#define S_surfxml_AS_12 22 -#define S_surfxml_AS_13 23 -#define S_surfxml_AS_14 24 -#define S_surfxml_AS_15 25 -#define S_surfxml_AS_16 26 -#define E_surfxml_AS 27 -#define AL_surfxml_ASroute 28 -#define S_surfxml_ASroute 29 -#define S_surfxml_ASroute_1 30 -#define S_surfxml_ASroute_2 31 -#define E_surfxml_ASroute 32 -#define AL_surfxml_actor 33 -#define S_surfxml_actor 34 -#define S_surfxml_actor_1 35 -#define S_surfxml_actor_2 36 -#define E_surfxml_actor 37 -#define AL_surfxml_argument 38 -#define E_surfxml_argument 39 -#define AL_surfxml_backbone 40 -#define E_surfxml_backbone 41 -#define AL_surfxml_bypassASroute 42 -#define S_surfxml_bypassASroute 43 -#define S_surfxml_bypassASroute_1 44 -#define S_surfxml_bypassASroute_2 45 -#define E_surfxml_bypassASroute 46 -#define AL_surfxml_bypassRoute 47 -#define S_surfxml_bypassRoute 48 -#define S_surfxml_bypassRoute_1 49 -#define S_surfxml_bypassRoute_2 50 -#define E_surfxml_bypassRoute 51 -#define AL_surfxml_bypassZoneRoute 52 -#define S_surfxml_bypassZoneRoute 53 -#define S_surfxml_bypassZoneRoute_1 54 -#define S_surfxml_bypassZoneRoute_2 55 -#define E_surfxml_bypassZoneRoute 56 -#define AL_surfxml_cabinet 57 -#define E_surfxml_cabinet 58 -#define AL_surfxml_cluster 59 -#define S_surfxml_cluster 60 -#define S_surfxml_cluster_1 61 -#define S_surfxml_cluster_2 62 -#define E_surfxml_cluster 63 -#define AL_surfxml_config 64 -#define S_surfxml_config 65 -#define S_surfxml_config_1 66 -#define S_surfxml_config_2 67 -#define E_surfxml_config 68 -#define AL_surfxml_disk 69 -#define S_surfxml_disk 70 -#define S_surfxml_disk_1 71 -#define S_surfxml_disk_2 72 -#define E_surfxml_disk 73 -#define AL_surfxml_host 74 -#define S_surfxml_host 75 -#define S_surfxml_host_1 76 -#define S_surfxml_host_2 77 -#define E_surfxml_host 78 -#define AL_surfxml_host___link 79 -#define E_surfxml_host___link 80 -#define AL_surfxml_include 81 -#define S_surfxml_include 82 -#define S_surfxml_include_1 83 -#define S_surfxml_include_2 84 -#define E_surfxml_include 85 -#define AL_surfxml_link 86 -#define S_surfxml_link 87 -#define S_surfxml_link_1 88 -#define S_surfxml_link_2 89 -#define E_surfxml_link 90 -#define AL_surfxml_link___ctn 91 -#define E_surfxml_link___ctn 92 -#define AL_surfxml_model___prop 93 -#define E_surfxml_model___prop 94 -#define AL_surfxml_mount 95 -#define E_surfxml_mount 96 -#define AL_surfxml_peer 97 -#define E_surfxml_peer 98 -#define ROOT_surfxml_platform 99 -#define AL_surfxml_platform 100 -#define S_surfxml_platform 101 -#define S_surfxml_platform_1 102 -#define S_surfxml_platform_2 103 -#define S_surfxml_platform_3 104 -#define S_surfxml_platform_4 105 -#define S_surfxml_platform_5 106 -#define S_surfxml_platform_6 107 -#define S_surfxml_platform_7 108 -#define S_surfxml_platform_8 109 -#define E_surfxml_platform 110 -#define AL_surfxml_process 111 -#define S_surfxml_process 112 -#define S_surfxml_process_1 113 -#define S_surfxml_process_2 114 -#define E_surfxml_process 115 -#define AL_surfxml_prop 116 -#define E_surfxml_prop 117 -#define AL_surfxml_random 118 -#define E_surfxml_random 119 -#define AL_surfxml_route 120 -#define S_surfxml_route 121 -#define S_surfxml_route_1 122 -#define S_surfxml_route_2 123 -#define E_surfxml_route 124 -#define AL_surfxml_router 125 -#define E_surfxml_router 126 -#define AL_surfxml_storage 127 -#define S_surfxml_storage 128 -#define S_surfxml_storage_1 129 -#define S_surfxml_storage_2 130 -#define E_surfxml_storage 131 -#define AL_surfxml_storage___type 132 -#define S_surfxml_storage___type 133 -#define S_surfxml_storage___type_1 134 -#define S_surfxml_storage___type_2 135 -#define E_surfxml_storage___type 136 -#define AL_surfxml_trace 137 +#define AL_simgrid_parse_AS 9 +#define S_simgrid_parse_AS 10 +#define S_simgrid_parse_AS_1 11 +#define S_simgrid_parse_AS_2 12 +#define S_simgrid_parse_AS_3 13 +#define S_simgrid_parse_AS_4 14 +#define S_simgrid_parse_AS_5 15 +#define S_simgrid_parse_AS_6 16 +#define S_simgrid_parse_AS_7 17 +#define S_simgrid_parse_AS_8 18 +#define S_simgrid_parse_AS_9 19 +#define S_simgrid_parse_AS_10 20 +#define S_simgrid_parse_AS_11 21 +#define S_simgrid_parse_AS_12 22 +#define S_simgrid_parse_AS_13 23 +#define S_simgrid_parse_AS_14 24 +#define S_simgrid_parse_AS_15 25 +#define S_simgrid_parse_AS_16 26 +#define E_simgrid_parse_AS 27 +#define AL_simgrid_parse_ASroute 28 +#define S_simgrid_parse_ASroute 29 +#define S_simgrid_parse_ASroute_1 30 +#define S_simgrid_parse_ASroute_2 31 +#define E_simgrid_parse_ASroute 32 +#define AL_simgrid_parse_actor 33 +#define S_simgrid_parse_actor 34 +#define S_simgrid_parse_actor_1 35 +#define S_simgrid_parse_actor_2 36 +#define E_simgrid_parse_actor 37 +#define AL_simgrid_parse_argument 38 +#define E_simgrid_parse_argument 39 +#define AL_simgrid_parse_backbone 40 +#define E_simgrid_parse_backbone 41 +#define AL_simgrid_parse_bypassASroute 42 +#define S_simgrid_parse_bypassASroute 43 +#define S_simgrid_parse_bypassASroute_1 44 +#define S_simgrid_parse_bypassASroute_2 45 +#define E_simgrid_parse_bypassASroute 46 +#define AL_simgrid_parse_bypassRoute 47 +#define S_simgrid_parse_bypassRoute 48 +#define S_simgrid_parse_bypassRoute_1 49 +#define S_simgrid_parse_bypassRoute_2 50 +#define E_simgrid_parse_bypassRoute 51 +#define AL_simgrid_parse_bypassZoneRoute 52 +#define S_simgrid_parse_bypassZoneRoute 53 +#define S_simgrid_parse_bypassZoneRoute_1 54 +#define S_simgrid_parse_bypassZoneRoute_2 55 +#define E_simgrid_parse_bypassZoneRoute 56 +#define AL_simgrid_parse_cabinet 57 +#define E_simgrid_parse_cabinet 58 +#define AL_simgrid_parse_cluster 59 +#define S_simgrid_parse_cluster 60 +#define S_simgrid_parse_cluster_1 61 +#define S_simgrid_parse_cluster_2 62 +#define E_simgrid_parse_cluster 63 +#define AL_simgrid_parse_config 64 +#define S_simgrid_parse_config 65 +#define S_simgrid_parse_config_1 66 +#define S_simgrid_parse_config_2 67 +#define E_simgrid_parse_config 68 +#define AL_simgrid_parse_disk 69 +#define S_simgrid_parse_disk 70 +#define S_simgrid_parse_disk_1 71 +#define S_simgrid_parse_disk_2 72 +#define E_simgrid_parse_disk 73 +#define AL_simgrid_parse_host 74 +#define S_simgrid_parse_host 75 +#define S_simgrid_parse_host_1 76 +#define S_simgrid_parse_host_2 77 +#define E_simgrid_parse_host 78 +#define AL_simgrid_parse_host___link 79 +#define E_simgrid_parse_host___link 80 +#define AL_simgrid_parse_include 81 +#define S_simgrid_parse_include 82 +#define S_simgrid_parse_include_1 83 +#define S_simgrid_parse_include_2 84 +#define E_simgrid_parse_include 85 +#define AL_simgrid_parse_link 86 +#define S_simgrid_parse_link 87 +#define S_simgrid_parse_link_1 88 +#define S_simgrid_parse_link_2 89 +#define E_simgrid_parse_link 90 +#define AL_simgrid_parse_link___ctn 91 +#define E_simgrid_parse_link___ctn 92 +#define AL_simgrid_parse_model___prop 93 +#define E_simgrid_parse_model___prop 94 +#define AL_simgrid_parse_mount 95 +#define E_simgrid_parse_mount 96 +#define AL_simgrid_parse_peer 97 +#define E_simgrid_parse_peer 98 +#define ROOT_simgrid_parse_platform 99 +#define AL_simgrid_parse_platform 100 +#define S_simgrid_parse_platform 101 +#define S_simgrid_parse_platform_1 102 +#define S_simgrid_parse_platform_2 103 +#define S_simgrid_parse_platform_3 104 +#define S_simgrid_parse_platform_4 105 +#define S_simgrid_parse_platform_5 106 +#define S_simgrid_parse_platform_6 107 +#define S_simgrid_parse_platform_7 108 +#define S_simgrid_parse_platform_8 109 +#define E_simgrid_parse_platform 110 +#define AL_simgrid_parse_process 111 +#define S_simgrid_parse_process 112 +#define S_simgrid_parse_process_1 113 +#define S_simgrid_parse_process_2 114 +#define E_simgrid_parse_process 115 +#define AL_simgrid_parse_prop 116 +#define E_simgrid_parse_prop 117 +#define AL_simgrid_parse_random 118 +#define E_simgrid_parse_random 119 +#define AL_simgrid_parse_route 120 +#define S_simgrid_parse_route 121 +#define S_simgrid_parse_route_1 122 +#define S_simgrid_parse_route_2 123 +#define E_simgrid_parse_route 124 +#define AL_simgrid_parse_router 125 +#define E_simgrid_parse_router 126 +#define AL_simgrid_parse_storage 127 +#define S_simgrid_parse_storage 128 +#define S_simgrid_parse_storage_1 129 +#define S_simgrid_parse_storage_2 130 +#define E_simgrid_parse_storage 131 +#define AL_simgrid_parse_storage___type 132 +#define S_simgrid_parse_storage___type 133 +#define S_simgrid_parse_storage___type_1 134 +#define S_simgrid_parse_storage___type_2 135 +#define E_simgrid_parse_storage___type 136 +#define AL_simgrid_parse_trace 137 #define IN_trace 138 -#define AL_surfxml_trace___connect 139 -#define E_surfxml_trace___connect 140 -#define AL_surfxml_zone 141 -#define S_surfxml_zone 142 -#define S_surfxml_zone_1 143 -#define S_surfxml_zone_2 144 -#define S_surfxml_zone_3 145 -#define S_surfxml_zone_4 146 -#define S_surfxml_zone_5 147 -#define S_surfxml_zone_6 148 -#define S_surfxml_zone_7 149 -#define S_surfxml_zone_8 150 -#define S_surfxml_zone_9 151 -#define S_surfxml_zone_10 152 -#define S_surfxml_zone_11 153 -#define S_surfxml_zone_12 154 -#define S_surfxml_zone_13 155 -#define S_surfxml_zone_14 156 -#define S_surfxml_zone_15 157 -#define S_surfxml_zone_16 158 -#define E_surfxml_zone 159 -#define AL_surfxml_zoneRoute 160 -#define S_surfxml_zoneRoute 161 -#define S_surfxml_zoneRoute_1 162 -#define S_surfxml_zoneRoute_2 163 -#define E_surfxml_zoneRoute 164 +#define AL_simgrid_parse_trace___connect 139 +#define E_simgrid_parse_trace___connect 140 +#define AL_simgrid_parse_zone 141 +#define S_simgrid_parse_zone 142 +#define S_simgrid_parse_zone_1 143 +#define S_simgrid_parse_zone_2 144 +#define S_simgrid_parse_zone_3 145 +#define S_simgrid_parse_zone_4 146 +#define S_simgrid_parse_zone_5 147 +#define S_simgrid_parse_zone_6 148 +#define S_simgrid_parse_zone_7 149 +#define S_simgrid_parse_zone_8 150 +#define S_simgrid_parse_zone_9 151 +#define S_simgrid_parse_zone_10 152 +#define S_simgrid_parse_zone_11 153 +#define S_simgrid_parse_zone_12 154 +#define S_simgrid_parse_zone_13 155 +#define S_simgrid_parse_zone_14 156 +#define S_simgrid_parse_zone_15 157 +#define S_simgrid_parse_zone_16 158 +#define E_simgrid_parse_zone 159 +#define AL_simgrid_parse_zoneRoute 160 +#define S_simgrid_parse_zoneRoute 161 +#define S_simgrid_parse_zoneRoute_1 162 +#define S_simgrid_parse_zoneRoute_2 163 +#define E_simgrid_parse_zoneRoute 164 #define IMPOSSIBLE 165 #ifndef YY_NO_UNISTD_H @@ -6380,201 +6380,201 @@ YY_DECL /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */ SET(PROLOG); - reset_surfxml_parse_err_msg(); - surfxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE); - assert(surfxml_bufferstack); + reset_simgrid_parse_parse_err_msg(); + simgrid_parse_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE); + assert(simgrid_parse_bufferstack); #ifdef FLEX_DEBUG { int i; for (i = 0; i < blimit; i++) { - surfxml_bufferstack[i] = '\377'; + simgrid_parse_bufferstack[i] = '\377'; } } #endif - surfxml_bufferstack[0] = '\0'; + simgrid_parse_bufferstack[0] = '\0'; indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int)); assert(indexstack); indexstack[0] = 0; /* FleXML_init */ bnext = inext = 1; - surfxml_bufferliteral('\0', &bnext, "0.0"); - surfxml_bufferliteral('\0', &bnext, "2147483647"); - surfxml_bufferliteral('\0', &bnext, "N11"); - surfxml_bufferliteral('\0', &bnext, "1"); - surfxml_bufferliteral('\0', &bnext, "0.0"); - surfxml_bufferliteral('\0', &bnext, "/"); - surfxml_bufferliteral('\0', &bnext, "1"); - surfxml_bufferliteral('\0', &bnext, "0s"); - surfxml_bufferliteral('\0', &bnext, "-1.0"); - surfxml_bufferliteral('\0', &bnext, "-1.0"); - surfxml_bufferliteral('\0', &bnext, "-1.0"); - surfxml_bufferliteral('\0', &bnext, "-1.0"); - if(!surfxml_statenames) {surfxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*)); - surfxml_statenames[PROLOG] = NULL; - surfxml_statenames[DOCTYPE] = NULL; - surfxml_statenames[EPILOG] = NULL; - surfxml_statenames[INCOMMENT] = NULL; - surfxml_statenames[INPI] = NULL; - surfxml_statenames[VALUE1] = NULL; - surfxml_statenames[VALUE2] = NULL; - surfxml_statenames[CDATA] = NULL; - surfxml_statenames[AL_surfxml_AS] = NULL; - surfxml_statenames[S_surfxml_AS] = "AS"; - surfxml_statenames[S_surfxml_AS_1] = "AS"; - surfxml_statenames[S_surfxml_AS_2] = "AS"; - surfxml_statenames[S_surfxml_AS_3] = "AS"; - surfxml_statenames[S_surfxml_AS_4] = "AS"; - surfxml_statenames[S_surfxml_AS_5] = "AS"; - surfxml_statenames[S_surfxml_AS_6] = "AS"; - surfxml_statenames[S_surfxml_AS_7] = "AS"; - surfxml_statenames[S_surfxml_AS_8] = "AS"; - surfxml_statenames[S_surfxml_AS_9] = "AS"; - surfxml_statenames[S_surfxml_AS_10] = "AS"; - surfxml_statenames[S_surfxml_AS_11] = "AS"; - surfxml_statenames[S_surfxml_AS_12] = "AS"; - surfxml_statenames[S_surfxml_AS_13] = "AS"; - surfxml_statenames[S_surfxml_AS_14] = "AS"; - surfxml_statenames[S_surfxml_AS_15] = "AS"; - surfxml_statenames[S_surfxml_AS_16] = "AS"; - surfxml_statenames[E_surfxml_AS] = "AS"; - surfxml_statenames[AL_surfxml_ASroute] = NULL; - surfxml_statenames[S_surfxml_ASroute] = "ASroute"; - surfxml_statenames[S_surfxml_ASroute_1] = "ASroute"; - surfxml_statenames[S_surfxml_ASroute_2] = "ASroute"; - surfxml_statenames[E_surfxml_ASroute] = "ASroute"; - surfxml_statenames[AL_surfxml_actor] = NULL; - surfxml_statenames[S_surfxml_actor] = "actor"; - surfxml_statenames[S_surfxml_actor_1] = "actor"; - surfxml_statenames[S_surfxml_actor_2] = "actor"; - surfxml_statenames[E_surfxml_actor] = "actor"; - surfxml_statenames[AL_surfxml_argument] = NULL; - surfxml_statenames[E_surfxml_argument] = "argument"; - surfxml_statenames[AL_surfxml_backbone] = NULL; - surfxml_statenames[E_surfxml_backbone] = "backbone"; - surfxml_statenames[AL_surfxml_bypassASroute] = NULL; - surfxml_statenames[S_surfxml_bypassASroute] = "bypassASroute"; - surfxml_statenames[S_surfxml_bypassASroute_1] = "bypassASroute"; - surfxml_statenames[S_surfxml_bypassASroute_2] = "bypassASroute"; - surfxml_statenames[E_surfxml_bypassASroute] = "bypassASroute"; - surfxml_statenames[AL_surfxml_bypassRoute] = NULL; - surfxml_statenames[S_surfxml_bypassRoute] = "bypassRoute"; - surfxml_statenames[S_surfxml_bypassRoute_1] = "bypassRoute"; - surfxml_statenames[S_surfxml_bypassRoute_2] = "bypassRoute"; - surfxml_statenames[E_surfxml_bypassRoute] = "bypassRoute"; - surfxml_statenames[AL_surfxml_bypassZoneRoute] = NULL; - surfxml_statenames[S_surfxml_bypassZoneRoute] = "bypassZoneRoute"; - surfxml_statenames[S_surfxml_bypassZoneRoute_1] = "bypassZoneRoute"; - surfxml_statenames[S_surfxml_bypassZoneRoute_2] = "bypassZoneRoute"; - surfxml_statenames[E_surfxml_bypassZoneRoute] = "bypassZoneRoute"; - surfxml_statenames[AL_surfxml_cabinet] = NULL; - surfxml_statenames[E_surfxml_cabinet] = "cabinet"; - surfxml_statenames[AL_surfxml_cluster] = NULL; - surfxml_statenames[S_surfxml_cluster] = "cluster"; - surfxml_statenames[S_surfxml_cluster_1] = "cluster"; - surfxml_statenames[S_surfxml_cluster_2] = "cluster"; - surfxml_statenames[E_surfxml_cluster] = "cluster"; - surfxml_statenames[AL_surfxml_config] = NULL; - surfxml_statenames[S_surfxml_config] = "config"; - surfxml_statenames[S_surfxml_config_1] = "config"; - surfxml_statenames[S_surfxml_config_2] = "config"; - surfxml_statenames[E_surfxml_config] = "config"; - surfxml_statenames[AL_surfxml_disk] = NULL; - surfxml_statenames[S_surfxml_disk] = "disk"; - surfxml_statenames[S_surfxml_disk_1] = "disk"; - surfxml_statenames[S_surfxml_disk_2] = "disk"; - surfxml_statenames[E_surfxml_disk] = "disk"; - surfxml_statenames[AL_surfxml_host] = NULL; - surfxml_statenames[S_surfxml_host] = "host"; - surfxml_statenames[S_surfxml_host_1] = "host"; - surfxml_statenames[S_surfxml_host_2] = "host"; - surfxml_statenames[E_surfxml_host] = "host"; - surfxml_statenames[AL_surfxml_host___link] = NULL; - surfxml_statenames[E_surfxml_host___link] = "host_link"; - surfxml_statenames[AL_surfxml_include] = NULL; - surfxml_statenames[S_surfxml_include] = "include"; - surfxml_statenames[S_surfxml_include_1] = "include"; - surfxml_statenames[S_surfxml_include_2] = "include"; - surfxml_statenames[E_surfxml_include] = "include"; - surfxml_statenames[AL_surfxml_link] = NULL; - surfxml_statenames[S_surfxml_link] = "link"; - surfxml_statenames[S_surfxml_link_1] = "link"; - surfxml_statenames[S_surfxml_link_2] = "link"; - surfxml_statenames[E_surfxml_link] = "link"; - surfxml_statenames[AL_surfxml_link___ctn] = NULL; - surfxml_statenames[E_surfxml_link___ctn] = "link_ctn"; - surfxml_statenames[AL_surfxml_model___prop] = NULL; - surfxml_statenames[E_surfxml_model___prop] = "model_prop"; - surfxml_statenames[AL_surfxml_mount] = NULL; - surfxml_statenames[E_surfxml_mount] = "mount"; - surfxml_statenames[AL_surfxml_peer] = NULL; - surfxml_statenames[E_surfxml_peer] = "peer"; - surfxml_statenames[ROOT_surfxml_platform] = NULL; - surfxml_statenames[AL_surfxml_platform] = NULL; - surfxml_statenames[S_surfxml_platform] = "platform"; - surfxml_statenames[S_surfxml_platform_1] = "platform"; - surfxml_statenames[S_surfxml_platform_2] = "platform"; - surfxml_statenames[S_surfxml_platform_3] = "platform"; - surfxml_statenames[S_surfxml_platform_4] = "platform"; - surfxml_statenames[S_surfxml_platform_5] = "platform"; - surfxml_statenames[S_surfxml_platform_6] = "platform"; - surfxml_statenames[S_surfxml_platform_7] = "platform"; - surfxml_statenames[S_surfxml_platform_8] = "platform"; - surfxml_statenames[E_surfxml_platform] = "platform"; - surfxml_statenames[AL_surfxml_process] = NULL; - surfxml_statenames[S_surfxml_process] = "process"; - surfxml_statenames[S_surfxml_process_1] = "process"; - surfxml_statenames[S_surfxml_process_2] = "process"; - surfxml_statenames[E_surfxml_process] = "process"; - surfxml_statenames[AL_surfxml_prop] = NULL; - surfxml_statenames[E_surfxml_prop] = "prop"; - surfxml_statenames[AL_surfxml_random] = NULL; - surfxml_statenames[E_surfxml_random] = "random"; - surfxml_statenames[AL_surfxml_route] = NULL; - surfxml_statenames[S_surfxml_route] = "route"; - surfxml_statenames[S_surfxml_route_1] = "route"; - surfxml_statenames[S_surfxml_route_2] = "route"; - surfxml_statenames[E_surfxml_route] = "route"; - surfxml_statenames[AL_surfxml_router] = NULL; - surfxml_statenames[E_surfxml_router] = "router"; - surfxml_statenames[AL_surfxml_storage] = NULL; - surfxml_statenames[S_surfxml_storage] = "storage"; - surfxml_statenames[S_surfxml_storage_1] = "storage"; - surfxml_statenames[S_surfxml_storage_2] = "storage"; - surfxml_statenames[E_surfxml_storage] = "storage"; - surfxml_statenames[AL_surfxml_storage___type] = NULL; - surfxml_statenames[S_surfxml_storage___type] = "storage_type"; - surfxml_statenames[S_surfxml_storage___type_1] = "storage_type"; - surfxml_statenames[S_surfxml_storage___type_2] = "storage_type"; - surfxml_statenames[E_surfxml_storage___type] = "storage_type"; - surfxml_statenames[AL_surfxml_trace] = NULL; - surfxml_statenames[IN_trace] = "trace"; - surfxml_statenames[AL_surfxml_trace___connect] = NULL; - surfxml_statenames[E_surfxml_trace___connect] = "trace_connect"; - surfxml_statenames[AL_surfxml_zone] = NULL; - surfxml_statenames[S_surfxml_zone] = "zone"; - surfxml_statenames[S_surfxml_zone_1] = "zone"; - surfxml_statenames[S_surfxml_zone_2] = "zone"; - surfxml_statenames[S_surfxml_zone_3] = "zone"; - surfxml_statenames[S_surfxml_zone_4] = "zone"; - surfxml_statenames[S_surfxml_zone_5] = "zone"; - surfxml_statenames[S_surfxml_zone_6] = "zone"; - surfxml_statenames[S_surfxml_zone_7] = "zone"; - surfxml_statenames[S_surfxml_zone_8] = "zone"; - surfxml_statenames[S_surfxml_zone_9] = "zone"; - surfxml_statenames[S_surfxml_zone_10] = "zone"; - surfxml_statenames[S_surfxml_zone_11] = "zone"; - surfxml_statenames[S_surfxml_zone_12] = "zone"; - surfxml_statenames[S_surfxml_zone_13] = "zone"; - surfxml_statenames[S_surfxml_zone_14] = "zone"; - surfxml_statenames[S_surfxml_zone_15] = "zone"; - surfxml_statenames[S_surfxml_zone_16] = "zone"; - surfxml_statenames[E_surfxml_zone] = "zone"; - surfxml_statenames[AL_surfxml_zoneRoute] = NULL; - surfxml_statenames[S_surfxml_zoneRoute] = "zoneRoute"; - surfxml_statenames[S_surfxml_zoneRoute_1] = "zoneRoute"; - surfxml_statenames[S_surfxml_zoneRoute_2] = "zoneRoute"; - surfxml_statenames[E_surfxml_zoneRoute] = "zoneRoute"; + simgrid_parse_bufferliteral('\0', &bnext, "0.0"); + simgrid_parse_bufferliteral('\0', &bnext, "2147483647"); + simgrid_parse_bufferliteral('\0', &bnext, "N11"); + simgrid_parse_bufferliteral('\0', &bnext, "1"); + simgrid_parse_bufferliteral('\0', &bnext, "0.0"); + simgrid_parse_bufferliteral('\0', &bnext, "/"); + simgrid_parse_bufferliteral('\0', &bnext, "1"); + simgrid_parse_bufferliteral('\0', &bnext, "0s"); + simgrid_parse_bufferliteral('\0', &bnext, "-1.0"); + simgrid_parse_bufferliteral('\0', &bnext, "-1.0"); + simgrid_parse_bufferliteral('\0', &bnext, "-1.0"); + simgrid_parse_bufferliteral('\0', &bnext, "-1.0"); + if(!simgrid_parse_statenames) {simgrid_parse_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*)); + simgrid_parse_statenames[PROLOG] = NULL; + simgrid_parse_statenames[DOCTYPE] = NULL; + simgrid_parse_statenames[EPILOG] = NULL; + simgrid_parse_statenames[INCOMMENT] = NULL; + simgrid_parse_statenames[INPI] = NULL; + simgrid_parse_statenames[VALUE1] = NULL; + simgrid_parse_statenames[VALUE2] = NULL; + simgrid_parse_statenames[CDATA] = NULL; + simgrid_parse_statenames[AL_simgrid_parse_AS] = NULL; + simgrid_parse_statenames[S_simgrid_parse_AS] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_1] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_2] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_3] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_4] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_5] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_6] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_7] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_8] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_9] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_10] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_11] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_12] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_13] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_14] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_15] = "AS"; + simgrid_parse_statenames[S_simgrid_parse_AS_16] = "AS"; + simgrid_parse_statenames[E_simgrid_parse_AS] = "AS"; + simgrid_parse_statenames[AL_simgrid_parse_ASroute] = NULL; + simgrid_parse_statenames[S_simgrid_parse_ASroute] = "ASroute"; + simgrid_parse_statenames[S_simgrid_parse_ASroute_1] = "ASroute"; + simgrid_parse_statenames[S_simgrid_parse_ASroute_2] = "ASroute"; + simgrid_parse_statenames[E_simgrid_parse_ASroute] = "ASroute"; + simgrid_parse_statenames[AL_simgrid_parse_actor] = NULL; + simgrid_parse_statenames[S_simgrid_parse_actor] = "actor"; + simgrid_parse_statenames[S_simgrid_parse_actor_1] = "actor"; + simgrid_parse_statenames[S_simgrid_parse_actor_2] = "actor"; + simgrid_parse_statenames[E_simgrid_parse_actor] = "actor"; + simgrid_parse_statenames[AL_simgrid_parse_argument] = NULL; + simgrid_parse_statenames[E_simgrid_parse_argument] = "argument"; + simgrid_parse_statenames[AL_simgrid_parse_backbone] = NULL; + simgrid_parse_statenames[E_simgrid_parse_backbone] = "backbone"; + simgrid_parse_statenames[AL_simgrid_parse_bypassASroute] = NULL; + simgrid_parse_statenames[S_simgrid_parse_bypassASroute] = "bypassASroute"; + simgrid_parse_statenames[S_simgrid_parse_bypassASroute_1] = "bypassASroute"; + simgrid_parse_statenames[S_simgrid_parse_bypassASroute_2] = "bypassASroute"; + simgrid_parse_statenames[E_simgrid_parse_bypassASroute] = "bypassASroute"; + simgrid_parse_statenames[AL_simgrid_parse_bypassRoute] = NULL; + simgrid_parse_statenames[S_simgrid_parse_bypassRoute] = "bypassRoute"; + simgrid_parse_statenames[S_simgrid_parse_bypassRoute_1] = "bypassRoute"; + simgrid_parse_statenames[S_simgrid_parse_bypassRoute_2] = "bypassRoute"; + simgrid_parse_statenames[E_simgrid_parse_bypassRoute] = "bypassRoute"; + simgrid_parse_statenames[AL_simgrid_parse_bypassZoneRoute] = NULL; + simgrid_parse_statenames[S_simgrid_parse_bypassZoneRoute] = "bypassZoneRoute"; + simgrid_parse_statenames[S_simgrid_parse_bypassZoneRoute_1] = "bypassZoneRoute"; + simgrid_parse_statenames[S_simgrid_parse_bypassZoneRoute_2] = "bypassZoneRoute"; + simgrid_parse_statenames[E_simgrid_parse_bypassZoneRoute] = "bypassZoneRoute"; + simgrid_parse_statenames[AL_simgrid_parse_cabinet] = NULL; + simgrid_parse_statenames[E_simgrid_parse_cabinet] = "cabinet"; + simgrid_parse_statenames[AL_simgrid_parse_cluster] = NULL; + simgrid_parse_statenames[S_simgrid_parse_cluster] = "cluster"; + simgrid_parse_statenames[S_simgrid_parse_cluster_1] = "cluster"; + simgrid_parse_statenames[S_simgrid_parse_cluster_2] = "cluster"; + simgrid_parse_statenames[E_simgrid_parse_cluster] = "cluster"; + simgrid_parse_statenames[AL_simgrid_parse_config] = NULL; + simgrid_parse_statenames[S_simgrid_parse_config] = "config"; + simgrid_parse_statenames[S_simgrid_parse_config_1] = "config"; + simgrid_parse_statenames[S_simgrid_parse_config_2] = "config"; + simgrid_parse_statenames[E_simgrid_parse_config] = "config"; + simgrid_parse_statenames[AL_simgrid_parse_disk] = NULL; + simgrid_parse_statenames[S_simgrid_parse_disk] = "disk"; + simgrid_parse_statenames[S_simgrid_parse_disk_1] = "disk"; + simgrid_parse_statenames[S_simgrid_parse_disk_2] = "disk"; + simgrid_parse_statenames[E_simgrid_parse_disk] = "disk"; + simgrid_parse_statenames[AL_simgrid_parse_host] = NULL; + simgrid_parse_statenames[S_simgrid_parse_host] = "host"; + simgrid_parse_statenames[S_simgrid_parse_host_1] = "host"; + simgrid_parse_statenames[S_simgrid_parse_host_2] = "host"; + simgrid_parse_statenames[E_simgrid_parse_host] = "host"; + simgrid_parse_statenames[AL_simgrid_parse_host___link] = NULL; + simgrid_parse_statenames[E_simgrid_parse_host___link] = "host_link"; + simgrid_parse_statenames[AL_simgrid_parse_include] = NULL; + simgrid_parse_statenames[S_simgrid_parse_include] = "include"; + simgrid_parse_statenames[S_simgrid_parse_include_1] = "include"; + simgrid_parse_statenames[S_simgrid_parse_include_2] = "include"; + simgrid_parse_statenames[E_simgrid_parse_include] = "include"; + simgrid_parse_statenames[AL_simgrid_parse_link] = NULL; + simgrid_parse_statenames[S_simgrid_parse_link] = "link"; + simgrid_parse_statenames[S_simgrid_parse_link_1] = "link"; + simgrid_parse_statenames[S_simgrid_parse_link_2] = "link"; + simgrid_parse_statenames[E_simgrid_parse_link] = "link"; + simgrid_parse_statenames[AL_simgrid_parse_link___ctn] = NULL; + simgrid_parse_statenames[E_simgrid_parse_link___ctn] = "link_ctn"; + simgrid_parse_statenames[AL_simgrid_parse_model___prop] = NULL; + simgrid_parse_statenames[E_simgrid_parse_model___prop] = "model_prop"; + simgrid_parse_statenames[AL_simgrid_parse_mount] = NULL; + simgrid_parse_statenames[E_simgrid_parse_mount] = "mount"; + simgrid_parse_statenames[AL_simgrid_parse_peer] = NULL; + simgrid_parse_statenames[E_simgrid_parse_peer] = "peer"; + simgrid_parse_statenames[ROOT_simgrid_parse_platform] = NULL; + simgrid_parse_statenames[AL_simgrid_parse_platform] = NULL; + simgrid_parse_statenames[S_simgrid_parse_platform] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_1] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_2] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_3] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_4] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_5] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_6] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_7] = "platform"; + simgrid_parse_statenames[S_simgrid_parse_platform_8] = "platform"; + simgrid_parse_statenames[E_simgrid_parse_platform] = "platform"; + simgrid_parse_statenames[AL_simgrid_parse_process] = NULL; + simgrid_parse_statenames[S_simgrid_parse_process] = "process"; + simgrid_parse_statenames[S_simgrid_parse_process_1] = "process"; + simgrid_parse_statenames[S_simgrid_parse_process_2] = "process"; + simgrid_parse_statenames[E_simgrid_parse_process] = "process"; + simgrid_parse_statenames[AL_simgrid_parse_prop] = NULL; + simgrid_parse_statenames[E_simgrid_parse_prop] = "prop"; + simgrid_parse_statenames[AL_simgrid_parse_random] = NULL; + simgrid_parse_statenames[E_simgrid_parse_random] = "random"; + simgrid_parse_statenames[AL_simgrid_parse_route] = NULL; + simgrid_parse_statenames[S_simgrid_parse_route] = "route"; + simgrid_parse_statenames[S_simgrid_parse_route_1] = "route"; + simgrid_parse_statenames[S_simgrid_parse_route_2] = "route"; + simgrid_parse_statenames[E_simgrid_parse_route] = "route"; + simgrid_parse_statenames[AL_simgrid_parse_router] = NULL; + simgrid_parse_statenames[E_simgrid_parse_router] = "router"; + simgrid_parse_statenames[AL_simgrid_parse_storage] = NULL; + simgrid_parse_statenames[S_simgrid_parse_storage] = "storage"; + simgrid_parse_statenames[S_simgrid_parse_storage_1] = "storage"; + simgrid_parse_statenames[S_simgrid_parse_storage_2] = "storage"; + simgrid_parse_statenames[E_simgrid_parse_storage] = "storage"; + simgrid_parse_statenames[AL_simgrid_parse_storage___type] = NULL; + simgrid_parse_statenames[S_simgrid_parse_storage___type] = "storage_type"; + simgrid_parse_statenames[S_simgrid_parse_storage___type_1] = "storage_type"; + simgrid_parse_statenames[S_simgrid_parse_storage___type_2] = "storage_type"; + simgrid_parse_statenames[E_simgrid_parse_storage___type] = "storage_type"; + simgrid_parse_statenames[AL_simgrid_parse_trace] = NULL; + simgrid_parse_statenames[IN_trace] = "trace"; + simgrid_parse_statenames[AL_simgrid_parse_trace___connect] = NULL; + simgrid_parse_statenames[E_simgrid_parse_trace___connect] = "trace_connect"; + simgrid_parse_statenames[AL_simgrid_parse_zone] = NULL; + simgrid_parse_statenames[S_simgrid_parse_zone] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_1] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_2] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_3] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_4] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_5] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_6] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_7] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_8] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_9] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_10] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_11] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_12] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_13] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_14] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_15] = "zone"; + simgrid_parse_statenames[S_simgrid_parse_zone_16] = "zone"; + simgrid_parse_statenames[E_simgrid_parse_zone] = "zone"; + simgrid_parse_statenames[AL_simgrid_parse_zoneRoute] = NULL; + simgrid_parse_statenames[S_simgrid_parse_zoneRoute] = "zoneRoute"; + simgrid_parse_statenames[S_simgrid_parse_zoneRoute_1] = "zoneRoute"; + simgrid_parse_statenames[S_simgrid_parse_zoneRoute_2] = "zoneRoute"; + simgrid_parse_statenames[E_simgrid_parse_zoneRoute] = "zoneRoute"; } /* COMMENTS and PIs: handled uniformly for efficiency. */ @@ -6704,12 +6704,12 @@ FAIL("Bad declaration %s.\nIf you are using an XML v3 file (check the version at case 13: /* rule 13 can match eol */ YY_RULE_SETUP -SET(ROOT_surfxml_platform); +SET(ROOT_simgrid_parse_platform); YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP -SET(ROOT_surfxml_platform); +SET(ROOT_simgrid_parse_platform); YY_BREAK case 15: /* rule 15 can match eol */ @@ -6741,53 +6741,53 @@ case 18: /* rule 18 can match eol */ YY_RULE_SETUP { - AX_surfxml_AS_id = 0; - surfxml_AS_id_isset = 0; - AX_surfxml_AS_routing = 0; - surfxml_AS_routing_isset = 0; - ENTER(AL_surfxml_AS); pushbuffer(0); + AX_simgrid_parse_AS_id = 0; + simgrid_parse_AS_id_isset = 0; + AX_simgrid_parse_AS_routing = 0; + simgrid_parse_AS_routing_isset = 0; + ENTER(AL_simgrid_parse_AS); pushbuffer(0); } YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP -if (surfxml_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_AS_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id); +if (simgrid_parse_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_AS_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_AS_id); YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP -if (surfxml_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_AS_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id); +if (simgrid_parse_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_AS_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_AS_id); YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP -if (surfxml_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} surfxml_AS_routing_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing); +if (simgrid_parse_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} simgrid_parse_AS_routing_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_AS_routing); YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP -if (surfxml_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} surfxml_AS_routing_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing); +if (simgrid_parse_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} simgrid_parse_AS_routing_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_AS_routing); YY_BREAK case 23: YY_RULE_SETUP { - if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element."); - if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element."); - LEAVE; STag_surfxml_AS();surfxml_pcdata_ix = 0; ENTER(S_surfxml_AS); + if (!AX_simgrid_parse_AS_id) FAIL("Required attribute `id' not set for `AS' element."); + if (!AX_simgrid_parse_AS_routing) FAIL("Required attribute `routing' not set for `AS' element."); + LEAVE; STag_simgrid_parse_AS();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_AS); } YY_BREAK case 24: YY_RULE_SETUP { - if (!AX_surfxml_AS_id) FAIL("Required attribute `id' not set for `AS' element."); - if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element."); - LEAVE; STag_surfxml_AS(); surfxml_pcdata_ix = 0; ETag_surfxml_AS(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_AS_id) FAIL("Required attribute `id' not set for `AS' element."); + if (!AX_simgrid_parse_AS_routing) FAIL("Required attribute `routing' not set for `AS' element."); + LEAVE; STag_simgrid_parse_AS(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_AS(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -6799,7 +6799,7 @@ case 26: YY_RULE_SETUP FAIL("Bad attribute `%s' in `AS' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_AS): +case YY_STATE_EOF(AL_simgrid_parse_AS): FAIL("EOF in attribute list of `AS' element."); YY_BREAK @@ -6808,13 +6808,13 @@ case 27: YY_RULE_SETUP { LEAVE; - ETag_surfxml_AS(); + ETag_simgrid_parse_AS(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -6827,18 +6827,18 @@ case 29: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_AS): -case YY_STATE_EOF(S_surfxml_AS): -case YY_STATE_EOF(S_surfxml_AS_1): -case YY_STATE_EOF(S_surfxml_AS_11): -case YY_STATE_EOF(S_surfxml_AS_12): -case YY_STATE_EOF(S_surfxml_AS_14): -case YY_STATE_EOF(S_surfxml_AS_16): -case YY_STATE_EOF(S_surfxml_AS_3): -case YY_STATE_EOF(S_surfxml_AS_4): -case YY_STATE_EOF(S_surfxml_AS_6): -case YY_STATE_EOF(S_surfxml_AS_7): -case YY_STATE_EOF(S_surfxml_AS_9): +case YY_STATE_EOF(E_simgrid_parse_AS): +case YY_STATE_EOF(S_simgrid_parse_AS): +case YY_STATE_EOF(S_simgrid_parse_AS_1): +case YY_STATE_EOF(S_simgrid_parse_AS_11): +case YY_STATE_EOF(S_simgrid_parse_AS_12): +case YY_STATE_EOF(S_simgrid_parse_AS_14): +case YY_STATE_EOF(S_simgrid_parse_AS_16): +case YY_STATE_EOF(S_simgrid_parse_AS_3): +case YY_STATE_EOF(S_simgrid_parse_AS_4): +case YY_STATE_EOF(S_simgrid_parse_AS_6): +case YY_STATE_EOF(S_simgrid_parse_AS_7): +case YY_STATE_EOF(S_simgrid_parse_AS_9): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -6852,109 +6852,109 @@ case 31: /* rule 31 can match eol */ YY_RULE_SETUP { - AX_surfxml_ASroute_dst = 0; - surfxml_ASroute_dst_isset = 0; - AX_surfxml_ASroute_gw___dst = 0; - surfxml_ASroute_gw___dst_isset = 0; - AX_surfxml_ASroute_gw___src = 0; - surfxml_ASroute_gw___src_isset = 0; - AX_surfxml_ASroute_src = 0; - surfxml_ASroute_src_isset = 0; - AX_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES; - surfxml_ASroute_symmetrical_isset = 0; - ENTER(AL_surfxml_ASroute); pushbuffer(0); + AX_simgrid_parse_ASroute_dst = 0; + simgrid_parse_ASroute_dst_isset = 0; + AX_simgrid_parse_ASroute_gw___dst = 0; + simgrid_parse_ASroute_gw___dst_isset = 0; + AX_simgrid_parse_ASroute_gw___src = 0; + simgrid_parse_ASroute_gw___src_isset = 0; + AX_simgrid_parse_ASroute_src = 0; + simgrid_parse_ASroute_src_isset = 0; + AX_simgrid_parse_ASroute_symmetrical = A_simgrid_parse_ASroute_symmetrical_YES; + simgrid_parse_ASroute_symmetrical_isset = 0; + ENTER(AL_simgrid_parse_ASroute); pushbuffer(0); } YY_BREAK case 32: /* rule 32 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_ASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst); +if (simgrid_parse_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_ASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_ASroute_dst); YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_ASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst); +if (simgrid_parse_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_ASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_ASroute_dst); YY_BREAK case 34: /* rule 34 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_ASroute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw___dst); +if (simgrid_parse_ASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_ASroute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_ASroute_gw___dst); YY_BREAK case 35: /* rule 35 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_ASroute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw___dst); +if (simgrid_parse_ASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_ASroute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_ASroute_gw___dst); YY_BREAK case 36: /* rule 36 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_ASroute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw___src); +if (simgrid_parse_ASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_ASroute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_ASroute_gw___src); YY_BREAK case 37: /* rule 37 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_ASroute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw___src); +if (simgrid_parse_ASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_ASroute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_ASroute_gw___src); YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_ASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src); +if (simgrid_parse_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_ASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_ASroute_src); YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP -if (surfxml_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_ASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src); +if (simgrid_parse_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_ASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_ASroute_src); YY_BREAK case 40: /* rule 40 can match eol */ case 41: /* rule 41 can match eol */ YY_RULE_SETUP -A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES; +A_simgrid_parse_ASroute_symmetrical = A_simgrid_parse_ASroute_symmetrical_YES; YY_BREAK case 42: /* rule 42 can match eol */ case 43: /* rule 43 can match eol */ YY_RULE_SETUP -A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO; +A_simgrid_parse_ASroute_symmetrical = A_simgrid_parse_ASroute_symmetrical_NO; YY_BREAK case 44: /* rule 44 can match eol */ case 45: /* rule 45 can match eol */ YY_RULE_SETUP -A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_yes; +A_simgrid_parse_ASroute_symmetrical = A_simgrid_parse_ASroute_symmetrical_yes; YY_BREAK case 46: /* rule 46 can match eol */ case 47: /* rule 47 can match eol */ YY_RULE_SETUP -A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_no; +A_simgrid_parse_ASroute_symmetrical = A_simgrid_parse_ASroute_symmetrical_no; YY_BREAK case 48: YY_RULE_SETUP { - if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_gw___src) FAIL("Required attribute `gw_src' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element."); - LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute); + if (!AX_simgrid_parse_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_gw___src) FAIL("Required attribute `gw_src' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element."); + LEAVE; STag_simgrid_parse_ASroute();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_ASroute); } YY_BREAK case 49: YY_RULE_SETUP { - if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_gw___src) FAIL("Required attribute `gw_src' not set for `ASroute' element."); - if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element."); - LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_ASroute_dst) FAIL("Required attribute `dst' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_gw___src) FAIL("Required attribute `gw_src' not set for `ASroute' element."); + if (!AX_simgrid_parse_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element."); + LEAVE; STag_simgrid_parse_ASroute(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_ASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -6966,7 +6966,7 @@ case 51: YY_RULE_SETUP FAIL("Bad attribute `%s' in `ASroute' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_ASroute): +case YY_STATE_EOF(AL_simgrid_parse_ASroute): FAIL("EOF in attribute list of `ASroute' element."); YY_BREAK @@ -6975,11 +6975,11 @@ case 52: YY_RULE_SETUP { LEAVE; - ETag_surfxml_ASroute(); + ETag_simgrid_parse_ASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -6992,9 +6992,9 @@ case 54: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_ASroute): -case YY_STATE_EOF(S_surfxml_ASroute): -case YY_STATE_EOF(S_surfxml_ASroute_2): +case YY_STATE_EOF(E_simgrid_parse_ASroute): +case YY_STATE_EOF(S_simgrid_parse_ASroute): +case YY_STATE_EOF(S_simgrid_parse_ASroute_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7007,90 +7007,90 @@ case 56: /* rule 56 can match eol */ YY_RULE_SETUP { - AX_surfxml_actor_function = 0; - surfxml_actor_function_isset = 0; - AX_surfxml_actor_host = 0; - surfxml_actor_host_isset = 0; - AX_surfxml_actor_kill___time = 48; - surfxml_actor_kill___time_isset = 0; - AX_surfxml_actor_on___failure = A_surfxml_actor_on___failure_DIE; - surfxml_actor_on___failure_isset = 0; - AX_surfxml_actor_start___time = 43; - surfxml_actor_start___time_isset = 0; - ENTER(AL_surfxml_actor); pushbuffer(0); + AX_simgrid_parse_actor_function = 0; + simgrid_parse_actor_function_isset = 0; + AX_simgrid_parse_actor_host = 0; + simgrid_parse_actor_host_isset = 0; + AX_simgrid_parse_actor_kill___time = 48; + simgrid_parse_actor_kill___time_isset = 0; + AX_simgrid_parse_actor_on___failure = A_simgrid_parse_actor_on___failure_DIE; + simgrid_parse_actor_on___failure_isset = 0; + AX_simgrid_parse_actor_start___time = 43; + simgrid_parse_actor_start___time_isset = 0; + ENTER(AL_simgrid_parse_actor); pushbuffer(0); } YY_BREAK case 57: /* rule 57 can match eol */ YY_RULE_SETUP -if (surfxml_actor_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} surfxml_actor_function_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_actor_function); +if (simgrid_parse_actor_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} simgrid_parse_actor_function_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_actor_function); YY_BREAK case 58: /* rule 58 can match eol */ YY_RULE_SETUP -if (surfxml_actor_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} surfxml_actor_function_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_actor_function); +if (simgrid_parse_actor_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} simgrid_parse_actor_function_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_actor_function); YY_BREAK case 59: /* rule 59 can match eol */ YY_RULE_SETUP -if (surfxml_actor_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} surfxml_actor_host_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_actor_host); +if (simgrid_parse_actor_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} simgrid_parse_actor_host_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_actor_host); YY_BREAK case 60: /* rule 60 can match eol */ YY_RULE_SETUP -if (surfxml_actor_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} surfxml_actor_host_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_actor_host); +if (simgrid_parse_actor_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} simgrid_parse_actor_host_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_actor_host); YY_BREAK case 61: /* rule 61 can match eol */ YY_RULE_SETUP -if (surfxml_actor_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} surfxml_actor_kill___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_actor_kill___time); +if (simgrid_parse_actor_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} simgrid_parse_actor_kill___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_actor_kill___time); YY_BREAK case 62: /* rule 62 can match eol */ YY_RULE_SETUP -if (surfxml_actor_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} surfxml_actor_kill___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_actor_kill___time); +if (simgrid_parse_actor_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} simgrid_parse_actor_kill___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_actor_kill___time); YY_BREAK case 63: /* rule 63 can match eol */ case 64: /* rule 64 can match eol */ YY_RULE_SETUP -A_surfxml_actor_on___failure = A_surfxml_actor_on___failure_DIE; +A_simgrid_parse_actor_on___failure = A_simgrid_parse_actor_on___failure_DIE; YY_BREAK case 65: /* rule 65 can match eol */ case 66: /* rule 66 can match eol */ YY_RULE_SETUP -A_surfxml_actor_on___failure = A_surfxml_actor_on___failure_RESTART; +A_simgrid_parse_actor_on___failure = A_simgrid_parse_actor_on___failure_RESTART; YY_BREAK case 67: /* rule 67 can match eol */ YY_RULE_SETUP -if (surfxml_actor_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} surfxml_actor_start___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_actor_start___time); +if (simgrid_parse_actor_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} simgrid_parse_actor_start___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_actor_start___time); YY_BREAK case 68: /* rule 68 can match eol */ YY_RULE_SETUP -if (surfxml_actor_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} surfxml_actor_start___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_actor_start___time); +if (simgrid_parse_actor_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} simgrid_parse_actor_start___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_actor_start___time); YY_BREAK case 69: YY_RULE_SETUP { - if (!AX_surfxml_actor_function) FAIL("Required attribute `function' not set for `actor' element."); - if (!AX_surfxml_actor_host) FAIL("Required attribute `host' not set for `actor' element."); - LEAVE; STag_surfxml_actor();surfxml_pcdata_ix = 0; ENTER(S_surfxml_actor); + if (!AX_simgrid_parse_actor_function) FAIL("Required attribute `function' not set for `actor' element."); + if (!AX_simgrid_parse_actor_host) FAIL("Required attribute `host' not set for `actor' element."); + LEAVE; STag_simgrid_parse_actor();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_actor); } YY_BREAK case 70: YY_RULE_SETUP { - if (!AX_surfxml_actor_function) FAIL("Required attribute `function' not set for `actor' element."); - if (!AX_surfxml_actor_host) FAIL("Required attribute `host' not set for `actor' element."); - LEAVE; STag_surfxml_actor(); surfxml_pcdata_ix = 0; ETag_surfxml_actor(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_actor_function) FAIL("Required attribute `function' not set for `actor' element."); + if (!AX_simgrid_parse_actor_host) FAIL("Required attribute `host' not set for `actor' element."); + LEAVE; STag_simgrid_parse_actor(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_actor(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_4: case S_surfxml_platform_6: case S_surfxml_platform_7: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_4: case S_simgrid_parse_platform_6: case S_simgrid_parse_platform_7: case S_simgrid_parse_platform_8: SET(S_simgrid_parse_platform_8); break; } } YY_BREAK @@ -7102,7 +7102,7 @@ case 72: YY_RULE_SETUP FAIL("Bad attribute `%s' in `actor' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_actor): +case YY_STATE_EOF(AL_simgrid_parse_actor): FAIL("EOF in attribute list of `actor' element."); YY_BREAK @@ -7111,10 +7111,10 @@ case 73: YY_RULE_SETUP { LEAVE; - ETag_surfxml_actor(); + ETag_simgrid_parse_actor(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_4: case S_surfxml_platform_6: case S_surfxml_platform_7: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_4: case S_simgrid_parse_platform_6: case S_simgrid_parse_platform_7: case S_simgrid_parse_platform_8: SET(S_simgrid_parse_platform_8); break; } } YY_BREAK @@ -7127,9 +7127,9 @@ case 75: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_actor): -case YY_STATE_EOF(S_surfxml_actor): -case YY_STATE_EOF(S_surfxml_actor_2): +case YY_STATE_EOF(E_simgrid_parse_actor): +case YY_STATE_EOF(S_simgrid_parse_actor): +case YY_STATE_EOF(S_simgrid_parse_actor_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7142,37 +7142,37 @@ case 77: /* rule 77 can match eol */ YY_RULE_SETUP { - AX_surfxml_argument_value = 0; - surfxml_argument_value_isset = 0; - ENTER(AL_surfxml_argument); pushbuffer(0); + AX_simgrid_parse_argument_value = 0; + simgrid_parse_argument_value_isset = 0; + ENTER(AL_simgrid_parse_argument); pushbuffer(0); } YY_BREAK case 78: /* rule 78 can match eol */ YY_RULE_SETUP -if (surfxml_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_argument_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value); +if (simgrid_parse_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_argument_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_argument_value); YY_BREAK case 79: /* rule 79 can match eol */ YY_RULE_SETUP -if (surfxml_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_argument_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value); +if (simgrid_parse_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_argument_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_argument_value); YY_BREAK case 80: YY_RULE_SETUP { - if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element."); - LEAVE; STag_surfxml_argument();surfxml_pcdata_ix = 0; ENTER(E_surfxml_argument); + if (!AX_simgrid_parse_argument_value) FAIL("Required attribute `value' not set for `argument' element."); + LEAVE; STag_simgrid_parse_argument();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_argument); } YY_BREAK case 81: YY_RULE_SETUP { - if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element."); - LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_argument_value) FAIL("Required attribute `value' not set for `argument' element."); + LEAVE; STag_simgrid_parse_argument(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_argument(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_actor: case S_surfxml_actor_1: case S_surfxml_actor_2: SET(S_surfxml_actor_2); break; - case S_surfxml_process: case S_surfxml_process_1: case S_surfxml_process_2: SET(S_surfxml_process_2); break; + case S_simgrid_parse_actor: case S_simgrid_parse_actor_1: case S_simgrid_parse_actor_2: SET(S_simgrid_parse_actor_2); break; + case S_simgrid_parse_process: case S_simgrid_parse_process_1: case S_simgrid_parse_process_2: SET(S_simgrid_parse_process_2); break; } } YY_BREAK @@ -7184,7 +7184,7 @@ case 83: YY_RULE_SETUP FAIL("Bad attribute `%s' in `argument' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_argument): +case YY_STATE_EOF(AL_simgrid_parse_argument): FAIL("EOF in attribute list of `argument' element."); YY_BREAK @@ -7193,11 +7193,11 @@ case 84: YY_RULE_SETUP { LEAVE; - ETag_surfxml_argument(); + ETag_simgrid_parse_argument(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_actor: case S_surfxml_actor_1: case S_surfxml_actor_2: SET(S_surfxml_actor_2); break; - case S_surfxml_process: case S_surfxml_process_1: case S_surfxml_process_2: SET(S_surfxml_process_2); break; + case S_simgrid_parse_actor: case S_simgrid_parse_actor_1: case S_simgrid_parse_actor_2: SET(S_simgrid_parse_actor_2); break; + case S_simgrid_parse_process: case S_simgrid_parse_process_1: case S_simgrid_parse_process_2: SET(S_simgrid_parse_process_2); break; } } YY_BREAK @@ -7210,7 +7210,7 @@ case 86: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_argument): +case YY_STATE_EOF(E_simgrid_parse_argument): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7223,67 +7223,67 @@ case 88: /* rule 88 can match eol */ YY_RULE_SETUP { - AX_surfxml_backbone_bandwidth = 0; - surfxml_backbone_bandwidth_isset = 0; - AX_surfxml_backbone_id = 0; - surfxml_backbone_id_isset = 0; - AX_surfxml_backbone_latency = 0; - surfxml_backbone_latency_isset = 0; - ENTER(AL_surfxml_backbone); pushbuffer(0); + AX_simgrid_parse_backbone_bandwidth = 0; + simgrid_parse_backbone_bandwidth_isset = 0; + AX_simgrid_parse_backbone_id = 0; + simgrid_parse_backbone_id_isset = 0; + AX_simgrid_parse_backbone_latency = 0; + simgrid_parse_backbone_latency_isset = 0; + ENTER(AL_simgrid_parse_backbone); pushbuffer(0); } YY_BREAK case 89: /* rule 89 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} surfxml_backbone_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_bandwidth); +if (simgrid_parse_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} simgrid_parse_backbone_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_backbone_bandwidth); YY_BREAK case 90: /* rule 90 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} surfxml_backbone_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_bandwidth); +if (simgrid_parse_backbone_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} simgrid_parse_backbone_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_backbone_bandwidth); YY_BREAK case 91: /* rule 91 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_backbone_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_id); +if (simgrid_parse_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_backbone_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_backbone_id); YY_BREAK case 92: /* rule 92 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_backbone_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_id); +if (simgrid_parse_backbone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_backbone_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_backbone_id); YY_BREAK case 93: /* rule 93 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} surfxml_backbone_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_backbone_latency); +if (simgrid_parse_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} simgrid_parse_backbone_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_backbone_latency); YY_BREAK case 94: /* rule 94 can match eol */ YY_RULE_SETUP -if (surfxml_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} surfxml_backbone_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_backbone_latency); +if (simgrid_parse_backbone_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} simgrid_parse_backbone_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_backbone_latency); YY_BREAK case 95: YY_RULE_SETUP { - if (!AX_surfxml_backbone_bandwidth) FAIL("Required attribute `bandwidth' not set for `backbone' element."); - if (!AX_surfxml_backbone_id) FAIL("Required attribute `id' not set for `backbone' element."); - if (!AX_surfxml_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element."); - LEAVE; STag_surfxml_backbone();surfxml_pcdata_ix = 0; ENTER(E_surfxml_backbone); + if (!AX_simgrid_parse_backbone_bandwidth) FAIL("Required attribute `bandwidth' not set for `backbone' element."); + if (!AX_simgrid_parse_backbone_id) FAIL("Required attribute `id' not set for `backbone' element."); + if (!AX_simgrid_parse_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element."); + LEAVE; STag_simgrid_parse_backbone();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_backbone); } YY_BREAK case 96: YY_RULE_SETUP { - if (!AX_surfxml_backbone_bandwidth) FAIL("Required attribute `bandwidth' not set for `backbone' element."); - if (!AX_surfxml_backbone_id) FAIL("Required attribute `id' not set for `backbone' element."); - if (!AX_surfxml_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element."); - LEAVE; STag_surfxml_backbone(); surfxml_pcdata_ix = 0; ETag_surfxml_backbone(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_backbone_bandwidth) FAIL("Required attribute `bandwidth' not set for `backbone' element."); + if (!AX_simgrid_parse_backbone_id) FAIL("Required attribute `id' not set for `backbone' element."); + if (!AX_simgrid_parse_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element."); + LEAVE; STag_simgrid_parse_backbone(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_backbone(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -7295,7 +7295,7 @@ case 98: YY_RULE_SETUP FAIL("Bad attribute `%s' in `backbone' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_backbone): +case YY_STATE_EOF(AL_simgrid_parse_backbone): FAIL("EOF in attribute list of `backbone' element."); YY_BREAK @@ -7304,13 +7304,13 @@ case 99: YY_RULE_SETUP { LEAVE; - ETag_surfxml_backbone(); + ETag_simgrid_parse_backbone(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -7323,7 +7323,7 @@ case 101: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_backbone): +case YY_STATE_EOF(E_simgrid_parse_backbone): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7336,79 +7336,79 @@ case 103: /* rule 103 can match eol */ YY_RULE_SETUP { - AX_surfxml_bypassASroute_dst = 0; - surfxml_bypassASroute_dst_isset = 0; - AX_surfxml_bypassASroute_gw___dst = 0; - surfxml_bypassASroute_gw___dst_isset = 0; - AX_surfxml_bypassASroute_gw___src = 0; - surfxml_bypassASroute_gw___src_isset = 0; - AX_surfxml_bypassASroute_src = 0; - surfxml_bypassASroute_src_isset = 0; - ENTER(AL_surfxml_bypassASroute); pushbuffer(0); + AX_simgrid_parse_bypassASroute_dst = 0; + simgrid_parse_bypassASroute_dst_isset = 0; + AX_simgrid_parse_bypassASroute_gw___dst = 0; + simgrid_parse_bypassASroute_gw___dst_isset = 0; + AX_simgrid_parse_bypassASroute_gw___src = 0; + simgrid_parse_bypassASroute_gw___src_isset = 0; + AX_simgrid_parse_bypassASroute_src = 0; + simgrid_parse_bypassASroute_src_isset = 0; + ENTER(AL_simgrid_parse_bypassASroute); pushbuffer(0); } YY_BREAK case 104: /* rule 104 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_dst); +if (simgrid_parse_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassASroute_dst); YY_BREAK case 105: /* rule 105 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_dst); +if (simgrid_parse_bypassASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassASroute_dst); YY_BREAK case 106: /* rule 106 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_bypassASroute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw___dst); +if (simgrid_parse_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_bypassASroute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassASroute_gw___dst); YY_BREAK case 107: /* rule 107 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_bypassASroute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw___dst); +if (simgrid_parse_bypassASroute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_bypassASroute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassASroute_gw___dst); YY_BREAK case 108: /* rule 108 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_bypassASroute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_gw___src); +if (simgrid_parse_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_bypassASroute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassASroute_gw___src); YY_BREAK case 109: /* rule 109 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_bypassASroute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_gw___src); +if (simgrid_parse_bypassASroute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_bypassASroute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassASroute_gw___src); YY_BREAK case 110: /* rule 110 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassASroute_src); +if (simgrid_parse_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassASroute_src); YY_BREAK case 111: /* rule 111 can match eol */ YY_RULE_SETUP -if (surfxml_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassASroute_src); +if (simgrid_parse_bypassASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassASroute_src); YY_BREAK case 112: YY_RULE_SETUP { - if (!AX_surfxml_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element."); - LEAVE; STag_surfxml_bypassASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassASroute); + if (!AX_simgrid_parse_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element."); + LEAVE; STag_simgrid_parse_bypassASroute();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_bypassASroute); } YY_BREAK case 113: YY_RULE_SETUP { - if (!AX_surfxml_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element."); - if (!AX_surfxml_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element."); - LEAVE; STag_surfxml_bypassASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassASroute(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_bypassASroute_dst) FAIL("Required attribute `dst' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassASroute' element."); + if (!AX_simgrid_parse_bypassASroute_src) FAIL("Required attribute `src' not set for `bypassASroute' element."); + LEAVE; STag_simgrid_parse_bypassASroute(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_bypassASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -7420,7 +7420,7 @@ case 115: YY_RULE_SETUP FAIL("Bad attribute `%s' in `bypassASroute' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_bypassASroute): +case YY_STATE_EOF(AL_simgrid_parse_bypassASroute): FAIL("EOF in attribute list of `bypassASroute' element."); YY_BREAK @@ -7429,11 +7429,11 @@ case 116: YY_RULE_SETUP { LEAVE; - ETag_surfxml_bypassASroute(); + ETag_simgrid_parse_bypassASroute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -7446,9 +7446,9 @@ case 118: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_bypassASroute): -case YY_STATE_EOF(S_surfxml_bypassASroute): -case YY_STATE_EOF(S_surfxml_bypassASroute_2): +case YY_STATE_EOF(E_simgrid_parse_bypassASroute): +case YY_STATE_EOF(S_simgrid_parse_bypassASroute): +case YY_STATE_EOF(S_simgrid_parse_bypassASroute_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7461,51 +7461,51 @@ case 120: /* rule 120 can match eol */ YY_RULE_SETUP { - AX_surfxml_bypassRoute_dst = 0; - surfxml_bypassRoute_dst_isset = 0; - AX_surfxml_bypassRoute_src = 0; - surfxml_bypassRoute_src_isset = 0; - ENTER(AL_surfxml_bypassRoute); pushbuffer(0); + AX_simgrid_parse_bypassRoute_dst = 0; + simgrid_parse_bypassRoute_dst_isset = 0; + AX_simgrid_parse_bypassRoute_src = 0; + simgrid_parse_bypassRoute_src_isset = 0; + ENTER(AL_simgrid_parse_bypassRoute); pushbuffer(0); } YY_BREAK case 121: /* rule 121 can match eol */ YY_RULE_SETUP -if (surfxml_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst); +if (simgrid_parse_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassRoute_dst); YY_BREAK case 122: /* rule 122 can match eol */ YY_RULE_SETUP -if (surfxml_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst); +if (simgrid_parse_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassRoute_dst); YY_BREAK case 123: /* rule 123 can match eol */ YY_RULE_SETUP -if (surfxml_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src); +if (simgrid_parse_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassRoute_src); YY_BREAK case 124: /* rule 124 can match eol */ YY_RULE_SETUP -if (surfxml_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src); +if (simgrid_parse_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassRoute_src); YY_BREAK case 125: YY_RULE_SETUP { - if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element."); - if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element."); - LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute); + if (!AX_simgrid_parse_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element."); + if (!AX_simgrid_parse_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element."); + LEAVE; STag_simgrid_parse_bypassRoute();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_bypassRoute); } YY_BREAK case 126: YY_RULE_SETUP { - if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element."); - if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element."); - LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element."); + if (!AX_simgrid_parse_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element."); + LEAVE; STag_simgrid_parse_bypassRoute(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_bypassRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_16); break; - case S_surfxml_zone: case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_16); break; } } YY_BREAK @@ -7517,7 +7517,7 @@ case 128: YY_RULE_SETUP FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_bypassRoute): +case YY_STATE_EOF(AL_simgrid_parse_bypassRoute): FAIL("EOF in attribute list of `bypassRoute' element."); YY_BREAK @@ -7526,11 +7526,11 @@ case 129: YY_RULE_SETUP { LEAVE; - ETag_surfxml_bypassRoute(); + ETag_simgrid_parse_bypassRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_16); break; - case S_surfxml_zone: case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_16); break; } } YY_BREAK @@ -7543,9 +7543,9 @@ case 131: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_bypassRoute): -case YY_STATE_EOF(S_surfxml_bypassRoute): -case YY_STATE_EOF(S_surfxml_bypassRoute_2): +case YY_STATE_EOF(E_simgrid_parse_bypassRoute): +case YY_STATE_EOF(S_simgrid_parse_bypassRoute): +case YY_STATE_EOF(S_simgrid_parse_bypassRoute_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7558,79 +7558,79 @@ case 133: /* rule 133 can match eol */ YY_RULE_SETUP { - AX_surfxml_bypassZoneRoute_dst = 0; - surfxml_bypassZoneRoute_dst_isset = 0; - AX_surfxml_bypassZoneRoute_gw___dst = 0; - surfxml_bypassZoneRoute_gw___dst_isset = 0; - AX_surfxml_bypassZoneRoute_gw___src = 0; - surfxml_bypassZoneRoute_gw___src_isset = 0; - AX_surfxml_bypassZoneRoute_src = 0; - surfxml_bypassZoneRoute_src_isset = 0; - ENTER(AL_surfxml_bypassZoneRoute); pushbuffer(0); + AX_simgrid_parse_bypassZoneRoute_dst = 0; + simgrid_parse_bypassZoneRoute_dst_isset = 0; + AX_simgrid_parse_bypassZoneRoute_gw___dst = 0; + simgrid_parse_bypassZoneRoute_gw___dst_isset = 0; + AX_simgrid_parse_bypassZoneRoute_gw___src = 0; + simgrid_parse_bypassZoneRoute_gw___src_isset = 0; + AX_simgrid_parse_bypassZoneRoute_src = 0; + simgrid_parse_bypassZoneRoute_src_isset = 0; + ENTER(AL_simgrid_parse_bypassZoneRoute); pushbuffer(0); } YY_BREAK case 134: /* rule 134 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassZoneRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassZoneRoute_dst); +if (simgrid_parse_bypassZoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassZoneRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_dst); YY_BREAK case 135: /* rule 135 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_bypassZoneRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassZoneRoute_dst); +if (simgrid_parse_bypassZoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_bypassZoneRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_dst); YY_BREAK case 136: /* rule 136 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_bypassZoneRoute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassZoneRoute_gw___dst); +if (simgrid_parse_bypassZoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_bypassZoneRoute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_gw___dst); YY_BREAK case 137: /* rule 137 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_bypassZoneRoute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassZoneRoute_gw___dst); +if (simgrid_parse_bypassZoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_bypassZoneRoute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_gw___dst); YY_BREAK case 138: /* rule 138 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_bypassZoneRoute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassZoneRoute_gw___src); +if (simgrid_parse_bypassZoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_bypassZoneRoute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_gw___src); YY_BREAK case 139: /* rule 139 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_bypassZoneRoute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassZoneRoute_gw___src); +if (simgrid_parse_bypassZoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_bypassZoneRoute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_gw___src); YY_BREAK case 140: /* rule 140 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassZoneRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassZoneRoute_src); +if (simgrid_parse_bypassZoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassZoneRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_src); YY_BREAK case 141: /* rule 141 can match eol */ YY_RULE_SETUP -if (surfxml_bypassZoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_bypassZoneRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassZoneRoute_src); +if (simgrid_parse_bypassZoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_bypassZoneRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_bypassZoneRoute_src); YY_BREAK case 142: YY_RULE_SETUP { - if (!AX_surfxml_bypassZoneRoute_dst) FAIL("Required attribute `dst' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_src) FAIL("Required attribute `src' not set for `bypassZoneRoute' element."); - LEAVE; STag_surfxml_bypassZoneRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassZoneRoute); + if (!AX_simgrid_parse_bypassZoneRoute_dst) FAIL("Required attribute `dst' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_src) FAIL("Required attribute `src' not set for `bypassZoneRoute' element."); + LEAVE; STag_simgrid_parse_bypassZoneRoute();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_bypassZoneRoute); } YY_BREAK case 143: YY_RULE_SETUP { - if (!AX_surfxml_bypassZoneRoute_dst) FAIL("Required attribute `dst' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassZoneRoute' element."); - if (!AX_surfxml_bypassZoneRoute_src) FAIL("Required attribute `src' not set for `bypassZoneRoute' element."); - LEAVE; STag_surfxml_bypassZoneRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassZoneRoute(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_bypassZoneRoute_dst) FAIL("Required attribute `dst' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `bypassZoneRoute' element."); + if (!AX_simgrid_parse_bypassZoneRoute_src) FAIL("Required attribute `src' not set for `bypassZoneRoute' element."); + LEAVE; STag_simgrid_parse_bypassZoneRoute(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_bypassZoneRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -7642,7 +7642,7 @@ case 145: YY_RULE_SETUP FAIL("Bad attribute `%s' in `bypassZoneRoute' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_bypassZoneRoute): +case YY_STATE_EOF(AL_simgrid_parse_bypassZoneRoute): FAIL("EOF in attribute list of `bypassZoneRoute' element."); YY_BREAK @@ -7651,11 +7651,11 @@ case 146: YY_RULE_SETUP { LEAVE; - ETag_surfxml_bypassZoneRoute(); + ETag_simgrid_parse_bypassZoneRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -7668,9 +7668,9 @@ case 148: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_bypassZoneRoute): -case YY_STATE_EOF(S_surfxml_bypassZoneRoute): -case YY_STATE_EOF(S_surfxml_bypassZoneRoute_2): +case YY_STATE_EOF(E_simgrid_parse_bypassZoneRoute): +case YY_STATE_EOF(S_simgrid_parse_bypassZoneRoute): +case YY_STATE_EOF(S_simgrid_parse_bypassZoneRoute_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7683,124 +7683,124 @@ case 150: /* rule 150 can match eol */ YY_RULE_SETUP { - AX_surfxml_cabinet_bw = 0; - surfxml_cabinet_bw_isset = 0; - AX_surfxml_cabinet_id = 0; - surfxml_cabinet_id_isset = 0; - AX_surfxml_cabinet_lat = 0; - surfxml_cabinet_lat_isset = 0; - AX_surfxml_cabinet_prefix = 0; - surfxml_cabinet_prefix_isset = 0; - AX_surfxml_cabinet_radical = 0; - surfxml_cabinet_radical_isset = 0; - AX_surfxml_cabinet_speed = 0; - surfxml_cabinet_speed_isset = 0; - AX_surfxml_cabinet_suffix = 0; - surfxml_cabinet_suffix_isset = 0; - ENTER(AL_surfxml_cabinet); pushbuffer(0); + AX_simgrid_parse_cabinet_bw = 0; + simgrid_parse_cabinet_bw_isset = 0; + AX_simgrid_parse_cabinet_id = 0; + simgrid_parse_cabinet_id_isset = 0; + AX_simgrid_parse_cabinet_lat = 0; + simgrid_parse_cabinet_lat_isset = 0; + AX_simgrid_parse_cabinet_prefix = 0; + simgrid_parse_cabinet_prefix_isset = 0; + AX_simgrid_parse_cabinet_radical = 0; + simgrid_parse_cabinet_radical_isset = 0; + AX_simgrid_parse_cabinet_speed = 0; + simgrid_parse_cabinet_speed_isset = 0; + AX_simgrid_parse_cabinet_suffix = 0; + simgrid_parse_cabinet_suffix_isset = 0; + ENTER(AL_simgrid_parse_cabinet); pushbuffer(0); } YY_BREAK case 151: /* rule 151 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} surfxml_cabinet_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_bw); +if (simgrid_parse_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} simgrid_parse_cabinet_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_bw); YY_BREAK case 152: /* rule 152 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} surfxml_cabinet_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_bw); +if (simgrid_parse_cabinet_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} simgrid_parse_cabinet_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_bw); YY_BREAK case 153: /* rule 153 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_cabinet_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_id); +if (simgrid_parse_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_cabinet_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_id); YY_BREAK case 154: /* rule 154 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_cabinet_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_id); +if (simgrid_parse_cabinet_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_cabinet_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_id); YY_BREAK case 155: /* rule 155 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_cabinet_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_lat); +if (simgrid_parse_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_cabinet_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_lat); YY_BREAK case 156: /* rule 156 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_cabinet_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_lat); +if (simgrid_parse_cabinet_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_cabinet_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_lat); YY_BREAK case 157: /* rule 157 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} surfxml_cabinet_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_prefix); +if (simgrid_parse_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} simgrid_parse_cabinet_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_prefix); YY_BREAK case 158: /* rule 158 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} surfxml_cabinet_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_prefix); +if (simgrid_parse_cabinet_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} simgrid_parse_cabinet_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_prefix); YY_BREAK case 159: /* rule 159 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_cabinet_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_radical); +if (simgrid_parse_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_cabinet_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_radical); YY_BREAK case 160: /* rule 160 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_cabinet_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_radical); +if (simgrid_parse_cabinet_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_cabinet_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_radical); YY_BREAK case 161: /* rule 161 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_cabinet_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_speed); +if (simgrid_parse_cabinet_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_cabinet_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_speed); YY_BREAK case 162: /* rule 162 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_cabinet_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_speed); +if (simgrid_parse_cabinet_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_cabinet_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_speed); YY_BREAK case 163: /* rule 163 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} surfxml_cabinet_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cabinet_suffix); +if (simgrid_parse_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} simgrid_parse_cabinet_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cabinet_suffix); YY_BREAK case 164: /* rule 164 can match eol */ YY_RULE_SETUP -if (surfxml_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} surfxml_cabinet_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cabinet_suffix); +if (simgrid_parse_cabinet_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} simgrid_parse_cabinet_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cabinet_suffix); YY_BREAK case 165: YY_RULE_SETUP { - if (!AX_surfxml_cabinet_bw) FAIL("Required attribute `bw' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_id) FAIL("Required attribute `id' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_lat) FAIL("Required attribute `lat' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_prefix) FAIL("Required attribute `prefix' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_radical) FAIL("Required attribute `radical' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_speed) FAIL("Required attribute `speed' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element."); - LEAVE; STag_surfxml_cabinet();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cabinet); + if (!AX_simgrid_parse_cabinet_bw) FAIL("Required attribute `bw' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_id) FAIL("Required attribute `id' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_lat) FAIL("Required attribute `lat' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_prefix) FAIL("Required attribute `prefix' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_radical) FAIL("Required attribute `radical' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_speed) FAIL("Required attribute `speed' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element."); + LEAVE; STag_simgrid_parse_cabinet();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_cabinet); } YY_BREAK case 166: YY_RULE_SETUP { - if (!AX_surfxml_cabinet_bw) FAIL("Required attribute `bw' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_id) FAIL("Required attribute `id' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_lat) FAIL("Required attribute `lat' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_prefix) FAIL("Required attribute `prefix' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_radical) FAIL("Required attribute `radical' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_speed) FAIL("Required attribute `speed' not set for `cabinet' element."); - if (!AX_surfxml_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element."); - LEAVE; STag_surfxml_cabinet(); surfxml_pcdata_ix = 0; ETag_surfxml_cabinet(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_cabinet_bw) FAIL("Required attribute `bw' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_id) FAIL("Required attribute `id' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_lat) FAIL("Required attribute `lat' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_prefix) FAIL("Required attribute `prefix' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_radical) FAIL("Required attribute `radical' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_speed) FAIL("Required attribute `speed' not set for `cabinet' element."); + if (!AX_simgrid_parse_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element."); + LEAVE; STag_simgrid_parse_cabinet(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_cabinet(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -7812,7 +7812,7 @@ case 168: YY_RULE_SETUP FAIL("Bad attribute `%s' in `cabinet' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_cabinet): +case YY_STATE_EOF(AL_simgrid_parse_cabinet): FAIL("EOF in attribute list of `cabinet' element."); YY_BREAK @@ -7821,14 +7821,14 @@ case 169: YY_RULE_SETUP { LEAVE; - ETag_surfxml_cabinet(); + ETag_simgrid_parse_cabinet(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -7841,7 +7841,7 @@ case 171: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_cabinet): +case YY_STATE_EOF(E_simgrid_parse_cabinet): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -7854,295 +7854,295 @@ case 173: /* rule 173 can match eol */ YY_RULE_SETUP { - AX_surfxml_cluster_bb___bw = 0; - surfxml_cluster_bb___bw_isset = 0; - AX_surfxml_cluster_bb___lat = 30; - surfxml_cluster_bb___lat_isset = 0; - AX_surfxml_cluster_bb___sharing___policy = A_surfxml_cluster_bb___sharing___policy_SHARED; - surfxml_cluster_bb___sharing___policy_isset = 0; - AX_surfxml_cluster_bw = 0; - surfxml_cluster_bw_isset = 0; - AX_surfxml_cluster_core = 28; - surfxml_cluster_core_isset = 0; - AX_surfxml_cluster_id = 0; - surfxml_cluster_id_isset = 0; - AX_surfxml_cluster_lat = 0; - surfxml_cluster_lat_isset = 0; - AX_surfxml_cluster_limiter___link = 0; - surfxml_cluster_limiter___link_isset = 0; - AX_surfxml_cluster_loopback___bw = 0; - surfxml_cluster_loopback___bw_isset = 0; - AX_surfxml_cluster_loopback___lat = 0; - surfxml_cluster_loopback___lat_isset = 0; - AX_surfxml_cluster_prefix = 0; - surfxml_cluster_prefix_isset = 0; - AX_surfxml_cluster_radical = 0; - surfxml_cluster_radical_isset = 0; - AX_surfxml_cluster_router___id = 0; - surfxml_cluster_router___id_isset = 0; - AX_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_SPLITDUPLEX; - surfxml_cluster_sharing___policy_isset = 0; - AX_surfxml_cluster_speed = 0; - surfxml_cluster_speed_isset = 0; - AX_surfxml_cluster_suffix = 0; - surfxml_cluster_suffix_isset = 0; - AX_surfxml_cluster_topo___parameters = 0; - surfxml_cluster_topo___parameters_isset = 0; - AX_surfxml_cluster_topology = A_surfxml_cluster_topology_FLAT; - surfxml_cluster_topology_isset = 0; - ENTER(AL_surfxml_cluster); pushbuffer(0); + AX_simgrid_parse_cluster_bb___bw = 0; + simgrid_parse_cluster_bb___bw_isset = 0; + AX_simgrid_parse_cluster_bb___lat = 30; + simgrid_parse_cluster_bb___lat_isset = 0; + AX_simgrid_parse_cluster_bb___sharing___policy = A_simgrid_parse_cluster_bb___sharing___policy_SHARED; + simgrid_parse_cluster_bb___sharing___policy_isset = 0; + AX_simgrid_parse_cluster_bw = 0; + simgrid_parse_cluster_bw_isset = 0; + AX_simgrid_parse_cluster_core = 28; + simgrid_parse_cluster_core_isset = 0; + AX_simgrid_parse_cluster_id = 0; + simgrid_parse_cluster_id_isset = 0; + AX_simgrid_parse_cluster_lat = 0; + simgrid_parse_cluster_lat_isset = 0; + AX_simgrid_parse_cluster_limiter___link = 0; + simgrid_parse_cluster_limiter___link_isset = 0; + AX_simgrid_parse_cluster_loopback___bw = 0; + simgrid_parse_cluster_loopback___bw_isset = 0; + AX_simgrid_parse_cluster_loopback___lat = 0; + simgrid_parse_cluster_loopback___lat_isset = 0; + AX_simgrid_parse_cluster_prefix = 0; + simgrid_parse_cluster_prefix_isset = 0; + AX_simgrid_parse_cluster_radical = 0; + simgrid_parse_cluster_radical_isset = 0; + AX_simgrid_parse_cluster_router___id = 0; + simgrid_parse_cluster_router___id_isset = 0; + AX_simgrid_parse_cluster_sharing___policy = A_simgrid_parse_cluster_sharing___policy_SPLITDUPLEX; + simgrid_parse_cluster_sharing___policy_isset = 0; + AX_simgrid_parse_cluster_speed = 0; + simgrid_parse_cluster_speed_isset = 0; + AX_simgrid_parse_cluster_suffix = 0; + simgrid_parse_cluster_suffix_isset = 0; + AX_simgrid_parse_cluster_topo___parameters = 0; + simgrid_parse_cluster_topo___parameters_isset = 0; + AX_simgrid_parse_cluster_topology = A_simgrid_parse_cluster_topology_FLAT; + simgrid_parse_cluster_topology_isset = 0; + ENTER(AL_simgrid_parse_cluster); pushbuffer(0); } YY_BREAK case 174: /* rule 174 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bb___bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in ");} surfxml_cluster_bb___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb___bw); +if (simgrid_parse_cluster_bb___bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in ");} simgrid_parse_cluster_bb___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_bb___bw); YY_BREAK case 175: /* rule 175 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bb___bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in ");} surfxml_cluster_bb___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb___bw); +if (simgrid_parse_cluster_bb___bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in ");} simgrid_parse_cluster_bb___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_bb___bw); YY_BREAK case 176: /* rule 176 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bb___lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in ");} surfxml_cluster_bb___lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb___lat); +if (simgrid_parse_cluster_bb___lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in ");} simgrid_parse_cluster_bb___lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_bb___lat); YY_BREAK case 177: /* rule 177 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bb___lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in ");} surfxml_cluster_bb___lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb___lat); +if (simgrid_parse_cluster_bb___lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in ");} simgrid_parse_cluster_bb___lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_bb___lat); YY_BREAK case 178: /* rule 178 can match eol */ case 179: /* rule 179 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_bb___sharing___policy = A_surfxml_cluster_bb___sharing___policy_SHARED; +A_simgrid_parse_cluster_bb___sharing___policy = A_simgrid_parse_cluster_bb___sharing___policy_SHARED; YY_BREAK case 180: /* rule 180 can match eol */ case 181: /* rule 181 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_bb___sharing___policy = A_surfxml_cluster_bb___sharing___policy_FATPIPE; +A_simgrid_parse_cluster_bb___sharing___policy = A_simgrid_parse_cluster_bb___sharing___policy_FATPIPE; YY_BREAK case 182: /* rule 182 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} surfxml_cluster_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw); +if (simgrid_parse_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} simgrid_parse_cluster_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_bw); YY_BREAK case 183: /* rule 183 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} surfxml_cluster_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw); +if (simgrid_parse_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in ");} simgrid_parse_cluster_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_bw); YY_BREAK case 184: /* rule 184 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} surfxml_cluster_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core); +if (simgrid_parse_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} simgrid_parse_cluster_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_core); YY_BREAK case 185: /* rule 185 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} surfxml_cluster_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core); +if (simgrid_parse_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} simgrid_parse_cluster_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_core); YY_BREAK case 186: /* rule 186 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_cluster_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id); +if (simgrid_parse_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_cluster_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_id); YY_BREAK case 187: /* rule 187 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_cluster_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id); +if (simgrid_parse_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_cluster_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_id); YY_BREAK case 188: /* rule 188 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_cluster_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat); +if (simgrid_parse_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_cluster_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_lat); YY_BREAK case 189: /* rule 189 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_cluster_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat); +if (simgrid_parse_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_cluster_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_lat); YY_BREAK case 190: /* rule 190 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_limiter___link_isset != 0) {FAIL("Multiple definition of attribute limiter_link in ");} surfxml_cluster_limiter___link_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_limiter___link); +if (simgrid_parse_cluster_limiter___link_isset != 0) {FAIL("Multiple definition of attribute limiter_link in ");} simgrid_parse_cluster_limiter___link_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_limiter___link); YY_BREAK case 191: /* rule 191 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_limiter___link_isset != 0) {FAIL("Multiple definition of attribute limiter_link in ");} surfxml_cluster_limiter___link_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_limiter___link); +if (simgrid_parse_cluster_limiter___link_isset != 0) {FAIL("Multiple definition of attribute limiter_link in ");} simgrid_parse_cluster_limiter___link_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_limiter___link); YY_BREAK case 192: /* rule 192 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_loopback___bw_isset != 0) {FAIL("Multiple definition of attribute loopback_bw in ");} surfxml_cluster_loopback___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_loopback___bw); +if (simgrid_parse_cluster_loopback___bw_isset != 0) {FAIL("Multiple definition of attribute loopback_bw in ");} simgrid_parse_cluster_loopback___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_loopback___bw); YY_BREAK case 193: /* rule 193 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_loopback___bw_isset != 0) {FAIL("Multiple definition of attribute loopback_bw in ");} surfxml_cluster_loopback___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_loopback___bw); +if (simgrid_parse_cluster_loopback___bw_isset != 0) {FAIL("Multiple definition of attribute loopback_bw in ");} simgrid_parse_cluster_loopback___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_loopback___bw); YY_BREAK case 194: /* rule 194 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_loopback___lat_isset != 0) {FAIL("Multiple definition of attribute loopback_lat in ");} surfxml_cluster_loopback___lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_loopback___lat); +if (simgrid_parse_cluster_loopback___lat_isset != 0) {FAIL("Multiple definition of attribute loopback_lat in ");} simgrid_parse_cluster_loopback___lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_loopback___lat); YY_BREAK case 195: /* rule 195 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_loopback___lat_isset != 0) {FAIL("Multiple definition of attribute loopback_lat in ");} surfxml_cluster_loopback___lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_loopback___lat); +if (simgrid_parse_cluster_loopback___lat_isset != 0) {FAIL("Multiple definition of attribute loopback_lat in ");} simgrid_parse_cluster_loopback___lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_loopback___lat); YY_BREAK case 196: /* rule 196 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} surfxml_cluster_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix); +if (simgrid_parse_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} simgrid_parse_cluster_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_prefix); YY_BREAK case 197: /* rule 197 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} surfxml_cluster_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix); +if (simgrid_parse_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in ");} simgrid_parse_cluster_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_prefix); YY_BREAK case 198: /* rule 198 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_cluster_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical); +if (simgrid_parse_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_cluster_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_radical); YY_BREAK case 199: /* rule 199 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_cluster_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical); +if (simgrid_parse_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_cluster_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_radical); YY_BREAK case 200: /* rule 200 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_router___id_isset != 0) {FAIL("Multiple definition of attribute router_id in ");} surfxml_cluster_router___id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_router___id); +if (simgrid_parse_cluster_router___id_isset != 0) {FAIL("Multiple definition of attribute router_id in ");} simgrid_parse_cluster_router___id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_router___id); YY_BREAK case 201: /* rule 201 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_router___id_isset != 0) {FAIL("Multiple definition of attribute router_id in ");} surfxml_cluster_router___id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_router___id); +if (simgrid_parse_cluster_router___id_isset != 0) {FAIL("Multiple definition of attribute router_id in ");} simgrid_parse_cluster_router___id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_router___id); YY_BREAK case 202: /* rule 202 can match eol */ case 203: /* rule 203 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_SHARED; +A_simgrid_parse_cluster_sharing___policy = A_simgrid_parse_cluster_sharing___policy_SHARED; YY_BREAK case 204: /* rule 204 can match eol */ case 205: /* rule 205 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_SPLITDUPLEX; +A_simgrid_parse_cluster_sharing___policy = A_simgrid_parse_cluster_sharing___policy_SPLITDUPLEX; YY_BREAK case 206: /* rule 206 can match eol */ case 207: /* rule 207 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_FULLDUPLEX; +A_simgrid_parse_cluster_sharing___policy = A_simgrid_parse_cluster_sharing___policy_FULLDUPLEX; YY_BREAK case 208: /* rule 208 can match eol */ case 209: /* rule 209 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_sharing___policy = A_surfxml_cluster_sharing___policy_FATPIPE; +A_simgrid_parse_cluster_sharing___policy = A_simgrid_parse_cluster_sharing___policy_FATPIPE; YY_BREAK case 210: /* rule 210 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_cluster_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_speed); +if (simgrid_parse_cluster_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_cluster_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_speed); YY_BREAK case 211: /* rule 211 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_cluster_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_speed); +if (simgrid_parse_cluster_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_cluster_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_speed); YY_BREAK case 212: /* rule 212 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} surfxml_cluster_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix); +if (simgrid_parse_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} simgrid_parse_cluster_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_suffix); YY_BREAK case 213: /* rule 213 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} surfxml_cluster_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix); +if (simgrid_parse_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in ");} simgrid_parse_cluster_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_suffix); YY_BREAK case 214: /* rule 214 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_topo___parameters_isset != 0) {FAIL("Multiple definition of attribute topo_parameters in ");} surfxml_cluster_topo___parameters_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_topo___parameters); +if (simgrid_parse_cluster_topo___parameters_isset != 0) {FAIL("Multiple definition of attribute topo_parameters in ");} simgrid_parse_cluster_topo___parameters_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_cluster_topo___parameters); YY_BREAK case 215: /* rule 215 can match eol */ YY_RULE_SETUP -if (surfxml_cluster_topo___parameters_isset != 0) {FAIL("Multiple definition of attribute topo_parameters in ");} surfxml_cluster_topo___parameters_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_topo___parameters); +if (simgrid_parse_cluster_topo___parameters_isset != 0) {FAIL("Multiple definition of attribute topo_parameters in ");} simgrid_parse_cluster_topo___parameters_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_cluster_topo___parameters); YY_BREAK case 216: /* rule 216 can match eol */ case 217: /* rule 217 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_topology = A_surfxml_cluster_topology_FLAT; +A_simgrid_parse_cluster_topology = A_simgrid_parse_cluster_topology_FLAT; YY_BREAK case 218: /* rule 218 can match eol */ case 219: /* rule 219 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_topology = A_surfxml_cluster_topology_TORUS; +A_simgrid_parse_cluster_topology = A_simgrid_parse_cluster_topology_TORUS; YY_BREAK case 220: /* rule 220 can match eol */ case 221: /* rule 221 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_topology = A_surfxml_cluster_topology_FAT___TREE; +A_simgrid_parse_cluster_topology = A_simgrid_parse_cluster_topology_FAT___TREE; YY_BREAK case 222: /* rule 222 can match eol */ case 223: /* rule 223 can match eol */ YY_RULE_SETUP -A_surfxml_cluster_topology = A_surfxml_cluster_topology_DRAGONFLY; +A_simgrid_parse_cluster_topology = A_simgrid_parse_cluster_topology_DRAGONFLY; YY_BREAK case 224: YY_RULE_SETUP { - if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element."); - if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element."); - if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element."); - if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element."); - if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element."); - if (!AX_surfxml_cluster_speed) FAIL("Required attribute `speed' not set for `cluster' element."); - if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element."); - LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(S_surfxml_cluster); + if (!AX_simgrid_parse_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_id) FAIL("Required attribute `id' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_speed) FAIL("Required attribute `speed' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element."); + LEAVE; STag_simgrid_parse_cluster();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_cluster); } YY_BREAK case 225: YY_RULE_SETUP { - if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element."); - if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element."); - if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element."); - if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element."); - if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element."); - if (!AX_surfxml_cluster_speed) FAIL("Required attribute `speed' not set for `cluster' element."); - if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element."); - LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_id) FAIL("Required attribute `id' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_speed) FAIL("Required attribute `speed' not set for `cluster' element."); + if (!AX_simgrid_parse_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element."); + LEAVE; STag_simgrid_parse_cluster(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_cluster(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8154,7 +8154,7 @@ case 227: YY_RULE_SETUP FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_cluster): +case YY_STATE_EOF(AL_simgrid_parse_cluster): FAIL("EOF in attribute list of `cluster' element."); YY_BREAK @@ -8163,13 +8163,13 @@ case 228: YY_RULE_SETUP { LEAVE; - ETag_surfxml_cluster(); + ETag_simgrid_parse_cluster(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8182,9 +8182,9 @@ case 230: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_cluster): -case YY_STATE_EOF(S_surfxml_cluster): -case YY_STATE_EOF(S_surfxml_cluster_2): +case YY_STATE_EOF(E_simgrid_parse_cluster): +case YY_STATE_EOF(S_simgrid_parse_cluster): +case YY_STATE_EOF(S_simgrid_parse_cluster_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8197,34 +8197,34 @@ case 232: /* rule 232 can match eol */ YY_RULE_SETUP { - AX_surfxml_config_id = 0; - surfxml_config_id_isset = 0; - ENTER(AL_surfxml_config); pushbuffer(0); + AX_simgrid_parse_config_id = 0; + simgrid_parse_config_id_isset = 0; + ENTER(AL_simgrid_parse_config); pushbuffer(0); } YY_BREAK case 233: /* rule 233 can match eol */ YY_RULE_SETUP -if (surfxml_config_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_config_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id); +if (simgrid_parse_config_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_config_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_config_id); YY_BREAK case 234: /* rule 234 can match eol */ YY_RULE_SETUP -if (surfxml_config_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_config_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id); +if (simgrid_parse_config_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_config_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_config_id); YY_BREAK case 235: YY_RULE_SETUP { - LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config); + LEAVE; STag_simgrid_parse_config();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_config); } YY_BREAK case 236: YY_RULE_SETUP { - LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */ + LEAVE; STag_simgrid_parse_config(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_config(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_2: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_2: case S_simgrid_parse_platform_3: SET(S_simgrid_parse_platform_3); break; } } YY_BREAK @@ -8236,7 +8236,7 @@ case 238: YY_RULE_SETUP FAIL("Bad attribute `%s' in `config' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_config): +case YY_STATE_EOF(AL_simgrid_parse_config): FAIL("EOF in attribute list of `config' element."); YY_BREAK @@ -8245,10 +8245,10 @@ case 239: YY_RULE_SETUP { LEAVE; - ETag_surfxml_config(); + ETag_simgrid_parse_config(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_2: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_2: case S_simgrid_parse_platform_3: SET(S_simgrid_parse_platform_3); break; } } YY_BREAK @@ -8261,9 +8261,9 @@ case 241: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_config): -case YY_STATE_EOF(S_surfxml_config): -case YY_STATE_EOF(S_surfxml_config_2): +case YY_STATE_EOF(E_simgrid_parse_config): +case YY_STATE_EOF(S_simgrid_parse_config): +case YY_STATE_EOF(S_simgrid_parse_config_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8276,62 +8276,62 @@ case 243: /* rule 243 can match eol */ YY_RULE_SETUP { - AX_surfxml_disk_id = 26; - surfxml_disk_id_isset = 0; - AX_surfxml_disk_read___bw = 0; - surfxml_disk_read___bw_isset = 0; - AX_surfxml_disk_write___bw = 0; - surfxml_disk_write___bw_isset = 0; - ENTER(AL_surfxml_disk); pushbuffer(0); + AX_simgrid_parse_disk_id = 26; + simgrid_parse_disk_id_isset = 0; + AX_simgrid_parse_disk_read___bw = 0; + simgrid_parse_disk_read___bw_isset = 0; + AX_simgrid_parse_disk_write___bw = 0; + simgrid_parse_disk_write___bw_isset = 0; + ENTER(AL_simgrid_parse_disk); pushbuffer(0); } YY_BREAK case 244: /* rule 244 can match eol */ YY_RULE_SETUP -if (surfxml_disk_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_disk_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_disk_id); +if (simgrid_parse_disk_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_disk_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_disk_id); YY_BREAK case 245: /* rule 245 can match eol */ YY_RULE_SETUP -if (surfxml_disk_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_disk_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_disk_id); +if (simgrid_parse_disk_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_disk_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_disk_id); YY_BREAK case 246: /* rule 246 can match eol */ YY_RULE_SETUP -if (surfxml_disk_read___bw_isset != 0) {FAIL("Multiple definition of attribute read_bw in ");} surfxml_disk_read___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_disk_read___bw); +if (simgrid_parse_disk_read___bw_isset != 0) {FAIL("Multiple definition of attribute read_bw in ");} simgrid_parse_disk_read___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_disk_read___bw); YY_BREAK case 247: /* rule 247 can match eol */ YY_RULE_SETUP -if (surfxml_disk_read___bw_isset != 0) {FAIL("Multiple definition of attribute read_bw in ");} surfxml_disk_read___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_disk_read___bw); +if (simgrid_parse_disk_read___bw_isset != 0) {FAIL("Multiple definition of attribute read_bw in ");} simgrid_parse_disk_read___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_disk_read___bw); YY_BREAK case 248: /* rule 248 can match eol */ YY_RULE_SETUP -if (surfxml_disk_write___bw_isset != 0) {FAIL("Multiple definition of attribute write_bw in ");} surfxml_disk_write___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_disk_write___bw); +if (simgrid_parse_disk_write___bw_isset != 0) {FAIL("Multiple definition of attribute write_bw in ");} simgrid_parse_disk_write___bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_disk_write___bw); YY_BREAK case 249: /* rule 249 can match eol */ YY_RULE_SETUP -if (surfxml_disk_write___bw_isset != 0) {FAIL("Multiple definition of attribute write_bw in ");} surfxml_disk_write___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_disk_write___bw); +if (simgrid_parse_disk_write___bw_isset != 0) {FAIL("Multiple definition of attribute write_bw in ");} simgrid_parse_disk_write___bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_disk_write___bw); YY_BREAK case 250: YY_RULE_SETUP { - if (!AX_surfxml_disk_read___bw) FAIL("Required attribute `read_bw' not set for `disk' element."); - if (!AX_surfxml_disk_write___bw) FAIL("Required attribute `write_bw' not set for `disk' element."); - LEAVE; STag_surfxml_disk();surfxml_pcdata_ix = 0; ENTER(S_surfxml_disk); + if (!AX_simgrid_parse_disk_read___bw) FAIL("Required attribute `read_bw' not set for `disk' element."); + if (!AX_simgrid_parse_disk_write___bw) FAIL("Required attribute `write_bw' not set for `disk' element."); + LEAVE; STag_simgrid_parse_disk();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_disk); } YY_BREAK case 251: YY_RULE_SETUP { - if (!AX_surfxml_disk_read___bw) FAIL("Required attribute `read_bw' not set for `disk' element."); - if (!AX_surfxml_disk_write___bw) FAIL("Required attribute `write_bw' not set for `disk' element."); - LEAVE; STag_surfxml_disk(); surfxml_pcdata_ix = 0; ETag_surfxml_disk(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_disk_read___bw) FAIL("Required attribute `read_bw' not set for `disk' element."); + if (!AX_simgrid_parse_disk_write___bw) FAIL("Required attribute `write_bw' not set for `disk' element."); + LEAVE; STag_simgrid_parse_disk(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_disk(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; } } YY_BREAK @@ -8343,7 +8343,7 @@ case 253: YY_RULE_SETUP FAIL("Bad attribute `%s' in `disk' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_disk): +case YY_STATE_EOF(AL_simgrid_parse_disk): FAIL("EOF in attribute list of `disk' element."); YY_BREAK @@ -8352,10 +8352,10 @@ case 254: YY_RULE_SETUP { LEAVE; - ETag_surfxml_disk(); + ETag_simgrid_parse_disk(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; } } YY_BREAK @@ -8368,9 +8368,9 @@ case 256: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_disk): -case YY_STATE_EOF(S_surfxml_disk): -case YY_STATE_EOF(S_surfxml_disk_2): +case YY_STATE_EOF(E_simgrid_parse_disk): +case YY_STATE_EOF(S_simgrid_parse_disk): +case YY_STATE_EOF(S_simgrid_parse_disk_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8385,123 +8385,123 @@ case 258: /* rule 258 can match eol */ YY_RULE_SETUP { - AX_surfxml_host_availability___file = 0; - surfxml_host_availability___file_isset = 0; - AX_surfxml_host_coordinates = 0; - surfxml_host_coordinates_isset = 0; - AX_surfxml_host_core = 20; - surfxml_host_core_isset = 0; - AX_surfxml_host_id = 0; - surfxml_host_id_isset = 0; - AX_surfxml_host_pstate = 22; - surfxml_host_pstate_isset = 0; - AX_surfxml_host_speed = 0; - surfxml_host_speed_isset = 0; - AX_surfxml_host_speed___file = 0; - surfxml_host_speed___file_isset = 0; - AX_surfxml_host_state___file = 0; - surfxml_host_state___file_isset = 0; - ENTER(AL_surfxml_host); pushbuffer(0); + AX_simgrid_parse_host_availability___file = 0; + simgrid_parse_host_availability___file_isset = 0; + AX_simgrid_parse_host_coordinates = 0; + simgrid_parse_host_coordinates_isset = 0; + AX_simgrid_parse_host_core = 20; + simgrid_parse_host_core_isset = 0; + AX_simgrid_parse_host_id = 0; + simgrid_parse_host_id_isset = 0; + AX_simgrid_parse_host_pstate = 22; + simgrid_parse_host_pstate_isset = 0; + AX_simgrid_parse_host_speed = 0; + simgrid_parse_host_speed_isset = 0; + AX_simgrid_parse_host_speed___file = 0; + simgrid_parse_host_speed___file_isset = 0; + AX_simgrid_parse_host_state___file = 0; + simgrid_parse_host_state___file_isset = 0; + ENTER(AL_simgrid_parse_host); pushbuffer(0); } YY_BREAK case 259: /* rule 259 can match eol */ YY_RULE_SETUP -if (surfxml_host_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} surfxml_host_availability___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability___file); +if (simgrid_parse_host_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} simgrid_parse_host_availability___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_availability___file); YY_BREAK case 260: /* rule 260 can match eol */ YY_RULE_SETUP -if (surfxml_host_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} surfxml_host_availability___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability___file); +if (simgrid_parse_host_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} simgrid_parse_host_availability___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_availability___file); YY_BREAK case 261: /* rule 261 can match eol */ YY_RULE_SETUP -if (surfxml_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_host_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates); +if (simgrid_parse_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_host_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_coordinates); YY_BREAK case 262: /* rule 262 can match eol */ YY_RULE_SETUP -if (surfxml_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_host_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates); +if (simgrid_parse_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_host_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_coordinates); YY_BREAK case 263: /* rule 263 can match eol */ YY_RULE_SETUP -if (surfxml_host_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} surfxml_host_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core); +if (simgrid_parse_host_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} simgrid_parse_host_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_core); YY_BREAK case 264: /* rule 264 can match eol */ YY_RULE_SETUP -if (surfxml_host_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} surfxml_host_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core); +if (simgrid_parse_host_core_isset != 0) {FAIL("Multiple definition of attribute core in ");} simgrid_parse_host_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_core); YY_BREAK case 265: /* rule 265 can match eol */ YY_RULE_SETUP -if (surfxml_host_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_host_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id); +if (simgrid_parse_host_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_host_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_id); YY_BREAK case 266: /* rule 266 can match eol */ YY_RULE_SETUP -if (surfxml_host_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_host_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id); +if (simgrid_parse_host_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_host_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_id); YY_BREAK case 267: /* rule 267 can match eol */ YY_RULE_SETUP -if (surfxml_host_pstate_isset != 0) {FAIL("Multiple definition of attribute pstate in ");} surfxml_host_pstate_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_pstate); +if (simgrid_parse_host_pstate_isset != 0) {FAIL("Multiple definition of attribute pstate in ");} simgrid_parse_host_pstate_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_pstate); YY_BREAK case 268: /* rule 268 can match eol */ YY_RULE_SETUP -if (surfxml_host_pstate_isset != 0) {FAIL("Multiple definition of attribute pstate in ");} surfxml_host_pstate_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_pstate); +if (simgrid_parse_host_pstate_isset != 0) {FAIL("Multiple definition of attribute pstate in ");} simgrid_parse_host_pstate_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_pstate); YY_BREAK case 269: /* rule 269 can match eol */ YY_RULE_SETUP -if (surfxml_host_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_host_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_speed); +if (simgrid_parse_host_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_host_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_speed); YY_BREAK case 270: /* rule 270 can match eol */ YY_RULE_SETUP -if (surfxml_host_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_host_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_speed); +if (simgrid_parse_host_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_host_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_speed); YY_BREAK case 271: /* rule 271 can match eol */ YY_RULE_SETUP -if (surfxml_host_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} surfxml_host_speed___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_speed___file); +if (simgrid_parse_host_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} simgrid_parse_host_speed___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_speed___file); YY_BREAK case 272: /* rule 272 can match eol */ YY_RULE_SETUP -if (surfxml_host_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} surfxml_host_speed___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_speed___file); +if (simgrid_parse_host_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} simgrid_parse_host_speed___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_speed___file); YY_BREAK case 273: /* rule 273 can match eol */ YY_RULE_SETUP -if (surfxml_host_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_host_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state___file); +if (simgrid_parse_host_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_host_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host_state___file); YY_BREAK case 274: /* rule 274 can match eol */ YY_RULE_SETUP -if (surfxml_host_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_host_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state___file); +if (simgrid_parse_host_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_host_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host_state___file); YY_BREAK case 275: YY_RULE_SETUP { - if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element."); - if (!AX_surfxml_host_speed) FAIL("Required attribute `speed' not set for `host' element."); - LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host); + if (!AX_simgrid_parse_host_id) FAIL("Required attribute `id' not set for `host' element."); + if (!AX_simgrid_parse_host_speed) FAIL("Required attribute `speed' not set for `host' element."); + LEAVE; STag_simgrid_parse_host();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_host); } YY_BREAK case 276: YY_RULE_SETUP { - if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element."); - if (!AX_surfxml_host_speed) FAIL("Required attribute `speed' not set for `host' element."); - LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_host_id) FAIL("Required attribute `id' not set for `host' element."); + if (!AX_simgrid_parse_host_speed) FAIL("Required attribute `speed' not set for `host' element."); + LEAVE; STag_simgrid_parse_host(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_host(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -8513,7 +8513,7 @@ case 278: YY_RULE_SETUP FAIL("Bad attribute `%s' in `host' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_host): +case YY_STATE_EOF(AL_simgrid_parse_host): FAIL("EOF in attribute list of `host' element."); YY_BREAK @@ -8522,11 +8522,11 @@ case 279: YY_RULE_SETUP { LEAVE; - ETag_surfxml_host(); + ETag_simgrid_parse_host(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -8539,9 +8539,9 @@ case 281: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_host): -case YY_STATE_EOF(S_surfxml_host): -case YY_STATE_EOF(S_surfxml_host_2): +case YY_STATE_EOF(E_simgrid_parse_host): +case YY_STATE_EOF(S_simgrid_parse_host): +case YY_STATE_EOF(S_simgrid_parse_host_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8554,65 +8554,65 @@ case 283: /* rule 283 can match eol */ YY_RULE_SETUP { - AX_surfxml_host___link_down = 0; - surfxml_host___link_down_isset = 0; - AX_surfxml_host___link_id = 0; - surfxml_host___link_id_isset = 0; - AX_surfxml_host___link_up = 0; - surfxml_host___link_up_isset = 0; - ENTER(AL_surfxml_host___link); pushbuffer(0); + AX_simgrid_parse_host___link_down = 0; + simgrid_parse_host___link_down_isset = 0; + AX_simgrid_parse_host___link_id = 0; + simgrid_parse_host___link_id_isset = 0; + AX_simgrid_parse_host___link_up = 0; + simgrid_parse_host___link_up_isset = 0; + ENTER(AL_simgrid_parse_host___link); pushbuffer(0); } YY_BREAK case 284: /* rule 284 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in ");} surfxml_host___link_down_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_down); +if (simgrid_parse_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in ");} simgrid_parse_host___link_down_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host___link_down); YY_BREAK case 285: /* rule 285 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in ");} surfxml_host___link_down_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_down); +if (simgrid_parse_host___link_down_isset != 0) {FAIL("Multiple definition of attribute down in ");} simgrid_parse_host___link_down_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host___link_down); YY_BREAK case 286: /* rule 286 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_host___link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_id); +if (simgrid_parse_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_host___link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host___link_id); YY_BREAK case 287: /* rule 287 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_host___link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_id); +if (simgrid_parse_host___link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_host___link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host___link_id); YY_BREAK case 288: /* rule 288 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in ");} surfxml_host___link_up_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host___link_up); +if (simgrid_parse_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in ");} simgrid_parse_host___link_up_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_host___link_up); YY_BREAK case 289: /* rule 289 can match eol */ YY_RULE_SETUP -if (surfxml_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in ");} surfxml_host___link_up_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host___link_up); +if (simgrid_parse_host___link_up_isset != 0) {FAIL("Multiple definition of attribute up in ");} simgrid_parse_host___link_up_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_host___link_up); YY_BREAK case 290: YY_RULE_SETUP { - if (!AX_surfxml_host___link_down) FAIL("Required attribute `down' not set for `host_link' element."); - if (!AX_surfxml_host___link_id) FAIL("Required attribute `id' not set for `host_link' element."); - if (!AX_surfxml_host___link_up) FAIL("Required attribute `up' not set for `host_link' element."); - LEAVE; STag_surfxml_host___link();surfxml_pcdata_ix = 0; ENTER(E_surfxml_host___link); + if (!AX_simgrid_parse_host___link_down) FAIL("Required attribute `down' not set for `host_link' element."); + if (!AX_simgrid_parse_host___link_id) FAIL("Required attribute `id' not set for `host_link' element."); + if (!AX_simgrid_parse_host___link_up) FAIL("Required attribute `up' not set for `host_link' element."); + LEAVE; STag_simgrid_parse_host___link();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_host___link); } YY_BREAK case 291: YY_RULE_SETUP { - if (!AX_surfxml_host___link_down) FAIL("Required attribute `down' not set for `host_link' element."); - if (!AX_surfxml_host___link_id) FAIL("Required attribute `id' not set for `host_link' element."); - if (!AX_surfxml_host___link_up) FAIL("Required attribute `up' not set for `host_link' element."); - LEAVE; STag_surfxml_host___link(); surfxml_pcdata_ix = 0; ETag_surfxml_host___link(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_host___link_down) FAIL("Required attribute `down' not set for `host_link' element."); + if (!AX_simgrid_parse_host___link_id) FAIL("Required attribute `id' not set for `host_link' element."); + if (!AX_simgrid_parse_host___link_up) FAIL("Required attribute `up' not set for `host_link' element."); + LEAVE; STag_simgrid_parse_host___link(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_host___link(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -8624,7 +8624,7 @@ case 293: YY_RULE_SETUP FAIL("Bad attribute `%s' in `host_link' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_host___link): +case YY_STATE_EOF(AL_simgrid_parse_host___link): FAIL("EOF in attribute list of `host_link' element."); YY_BREAK @@ -8633,11 +8633,11 @@ case 294: YY_RULE_SETUP { LEAVE; - ETag_surfxml_host___link(); + ETag_simgrid_parse_host___link(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -8650,7 +8650,7 @@ case 296: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_host___link): +case YY_STATE_EOF(E_simgrid_parse_host___link): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8664,41 +8664,41 @@ case 298: /* rule 298 can match eol */ YY_RULE_SETUP { - AX_surfxml_include_file = 0; - surfxml_include_file_isset = 0; - ENTER(AL_surfxml_include); pushbuffer(0); + AX_simgrid_parse_include_file = 0; + simgrid_parse_include_file_isset = 0; + ENTER(AL_simgrid_parse_include); pushbuffer(0); } YY_BREAK case 299: /* rule 299 can match eol */ YY_RULE_SETUP -if (surfxml_include_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} surfxml_include_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file); +if (simgrid_parse_include_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} simgrid_parse_include_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_include_file); YY_BREAK case 300: /* rule 300 can match eol */ YY_RULE_SETUP -if (surfxml_include_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} surfxml_include_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file); +if (simgrid_parse_include_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} simgrid_parse_include_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_include_file); YY_BREAK case 301: YY_RULE_SETUP { - if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element."); - LEAVE; STag_surfxml_include();surfxml_pcdata_ix = 0; ENTER(S_surfxml_include); + if (!AX_simgrid_parse_include_file) FAIL("Required attribute `file' not set for `include' element."); + LEAVE; STag_simgrid_parse_include();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_include); } YY_BREAK case 302: YY_RULE_SETUP { - if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element."); - LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_include_file) FAIL("Required attribute `file' not set for `include' element."); + LEAVE; STag_simgrid_parse_include(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_include(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8710,7 +8710,7 @@ case 304: YY_RULE_SETUP FAIL("Bad attribute `%s' in `include' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_include): +case YY_STATE_EOF(AL_simgrid_parse_include): FAIL("EOF in attribute list of `include' element."); YY_BREAK @@ -8719,15 +8719,15 @@ case 305: YY_RULE_SETUP { LEAVE; - ETag_surfxml_include(); + ETag_simgrid_parse_include(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8740,9 +8740,9 @@ case 307: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_include): -case YY_STATE_EOF(S_surfxml_include): -case YY_STATE_EOF(S_surfxml_include_2): +case YY_STATE_EOF(E_simgrid_parse_include): +case YY_STATE_EOF(S_simgrid_parse_include): +case YY_STATE_EOF(S_simgrid_parse_include_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8755,138 +8755,138 @@ case 309: /* rule 309 can match eol */ YY_RULE_SETUP { - AX_surfxml_link_bandwidth = 0; - surfxml_link_bandwidth_isset = 0; - AX_surfxml_link_bandwidth___file = 0; - surfxml_link_bandwidth___file_isset = 0; - AX_surfxml_link_id = 0; - surfxml_link_id_isset = 0; - AX_surfxml_link_latency = 0; - surfxml_link_latency_isset = 0; - AX_surfxml_link_latency___file = 0; - surfxml_link_latency___file_isset = 0; - AX_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_SHARED; - surfxml_link_sharing___policy_isset = 0; - AX_surfxml_link_state___file = 0; - surfxml_link_state___file_isset = 0; - ENTER(AL_surfxml_link); pushbuffer(0); + AX_simgrid_parse_link_bandwidth = 0; + simgrid_parse_link_bandwidth_isset = 0; + AX_simgrid_parse_link_bandwidth___file = 0; + simgrid_parse_link_bandwidth___file_isset = 0; + AX_simgrid_parse_link_id = 0; + simgrid_parse_link_id_isset = 0; + AX_simgrid_parse_link_latency = 0; + simgrid_parse_link_latency_isset = 0; + AX_simgrid_parse_link_latency___file = 0; + simgrid_parse_link_latency___file_isset = 0; + AX_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_SHARED; + simgrid_parse_link_sharing___policy_isset = 0; + AX_simgrid_parse_link_state___file = 0; + simgrid_parse_link_state___file_isset = 0; + ENTER(AL_simgrid_parse_link); pushbuffer(0); } YY_BREAK case 310: /* rule 310 can match eol */ YY_RULE_SETUP -if (surfxml_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} surfxml_link_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth); +if (simgrid_parse_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} simgrid_parse_link_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_bandwidth); YY_BREAK case 311: /* rule 311 can match eol */ YY_RULE_SETUP -if (surfxml_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} surfxml_link_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth); +if (simgrid_parse_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in ");} simgrid_parse_link_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_bandwidth); YY_BREAK case 312: /* rule 312 can match eol */ YY_RULE_SETUP -if (surfxml_link_bandwidth___file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in ");} surfxml_link_bandwidth___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth___file); +if (simgrid_parse_link_bandwidth___file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in ");} simgrid_parse_link_bandwidth___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_bandwidth___file); YY_BREAK case 313: /* rule 313 can match eol */ YY_RULE_SETUP -if (surfxml_link_bandwidth___file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in ");} surfxml_link_bandwidth___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth___file); +if (simgrid_parse_link_bandwidth___file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in ");} simgrid_parse_link_bandwidth___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_bandwidth___file); YY_BREAK case 314: /* rule 314 can match eol */ YY_RULE_SETUP -if (surfxml_link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id); +if (simgrid_parse_link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_id); YY_BREAK case 315: /* rule 315 can match eol */ YY_RULE_SETUP -if (surfxml_link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id); +if (simgrid_parse_link_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_id); YY_BREAK case 316: /* rule 316 can match eol */ YY_RULE_SETUP -if (surfxml_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} surfxml_link_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency); +if (simgrid_parse_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} simgrid_parse_link_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_latency); YY_BREAK case 317: /* rule 317 can match eol */ YY_RULE_SETUP -if (surfxml_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} surfxml_link_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency); +if (simgrid_parse_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in ");} simgrid_parse_link_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_latency); YY_BREAK case 318: /* rule 318 can match eol */ YY_RULE_SETUP -if (surfxml_link_latency___file_isset != 0) {FAIL("Multiple definition of attribute latency_file in ");} surfxml_link_latency___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency___file); +if (simgrid_parse_link_latency___file_isset != 0) {FAIL("Multiple definition of attribute latency_file in ");} simgrid_parse_link_latency___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_latency___file); YY_BREAK case 319: /* rule 319 can match eol */ YY_RULE_SETUP -if (surfxml_link_latency___file_isset != 0) {FAIL("Multiple definition of attribute latency_file in ");} surfxml_link_latency___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency___file); +if (simgrid_parse_link_latency___file_isset != 0) {FAIL("Multiple definition of attribute latency_file in ");} simgrid_parse_link_latency___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_latency___file); YY_BREAK case 320: /* rule 320 can match eol */ case 321: /* rule 321 can match eol */ YY_RULE_SETUP -A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_SHARED; +A_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_SHARED; YY_BREAK case 322: /* rule 322 can match eol */ case 323: /* rule 323 can match eol */ YY_RULE_SETUP -A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_SPLITDUPLEX; +A_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_SPLITDUPLEX; YY_BREAK case 324: /* rule 324 can match eol */ case 325: /* rule 325 can match eol */ YY_RULE_SETUP -A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_FULLDUPLEX; +A_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_FULLDUPLEX; YY_BREAK case 326: /* rule 326 can match eol */ case 327: /* rule 327 can match eol */ YY_RULE_SETUP -A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_FATPIPE; +A_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_FATPIPE; YY_BREAK case 328: /* rule 328 can match eol */ case 329: /* rule 329 can match eol */ YY_RULE_SETUP -A_surfxml_link_sharing___policy = A_surfxml_link_sharing___policy_WIFI; +A_simgrid_parse_link_sharing___policy = A_simgrid_parse_link_sharing___policy_WIFI; YY_BREAK case 330: /* rule 330 can match eol */ YY_RULE_SETUP -if (surfxml_link_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_link_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state___file); +if (simgrid_parse_link_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_link_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link_state___file); YY_BREAK case 331: /* rule 331 can match eol */ YY_RULE_SETUP -if (surfxml_link_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_link_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state___file); +if (simgrid_parse_link_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_link_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link_state___file); YY_BREAK case 332: YY_RULE_SETUP { - if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element."); - if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element."); - LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link); + if (!AX_simgrid_parse_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element."); + if (!AX_simgrid_parse_link_id) FAIL("Required attribute `id' not set for `link' element."); + LEAVE; STag_simgrid_parse_link();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_link); } YY_BREAK case 333: YY_RULE_SETUP { - if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element."); - if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element."); - LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element."); + if (!AX_simgrid_parse_link_id) FAIL("Required attribute `id' not set for `link' element."); + LEAVE; STag_simgrid_parse_link(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_link(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8898,7 +8898,7 @@ case 335: YY_RULE_SETUP FAIL("Bad attribute `%s' in `link' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_link): +case YY_STATE_EOF(AL_simgrid_parse_link): FAIL("EOF in attribute list of `link' element."); YY_BREAK @@ -8907,13 +8907,13 @@ case 336: YY_RULE_SETUP { LEAVE; - ETag_surfxml_link(); + ETag_simgrid_parse_link(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -8926,9 +8926,9 @@ case 338: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_link): -case YY_STATE_EOF(S_surfxml_link): -case YY_STATE_EOF(S_surfxml_link_2): +case YY_STATE_EOF(E_simgrid_parse_link): +case YY_STATE_EOF(S_simgrid_parse_link): +case YY_STATE_EOF(S_simgrid_parse_link_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -8941,11 +8941,11 @@ case 340: /* rule 340 can match eol */ YY_RULE_SETUP { - AX_surfxml_link___ctn_direction = A_surfxml_link___ctn_direction_NONE; - surfxml_link___ctn_direction_isset = 0; - AX_surfxml_link___ctn_id = 0; - surfxml_link___ctn_id_isset = 0; - ENTER(AL_surfxml_link___ctn); pushbuffer(0); + AX_simgrid_parse_link___ctn_direction = A_simgrid_parse_link___ctn_direction_NONE; + simgrid_parse_link___ctn_direction_isset = 0; + AX_simgrid_parse_link___ctn_id = 0; + simgrid_parse_link___ctn_id_isset = 0; + ENTER(AL_simgrid_parse_link___ctn); pushbuffer(0); } YY_BREAK @@ -8954,51 +8954,51 @@ case 341: case 342: /* rule 342 can match eol */ YY_RULE_SETUP -A_surfxml_link___ctn_direction = A_surfxml_link___ctn_direction_UP; +A_simgrid_parse_link___ctn_direction = A_simgrid_parse_link___ctn_direction_UP; YY_BREAK case 343: /* rule 343 can match eol */ case 344: /* rule 344 can match eol */ YY_RULE_SETUP -A_surfxml_link___ctn_direction = A_surfxml_link___ctn_direction_DOWN; +A_simgrid_parse_link___ctn_direction = A_simgrid_parse_link___ctn_direction_DOWN; YY_BREAK case 345: /* rule 345 can match eol */ case 346: /* rule 346 can match eol */ YY_RULE_SETUP -A_surfxml_link___ctn_direction = A_surfxml_link___ctn_direction_NONE; +A_simgrid_parse_link___ctn_direction = A_simgrid_parse_link___ctn_direction_NONE; YY_BREAK case 347: /* rule 347 can match eol */ YY_RULE_SETUP -if (surfxml_link___ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_link___ctn_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link___ctn_id); +if (simgrid_parse_link___ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_link___ctn_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_link___ctn_id); YY_BREAK case 348: /* rule 348 can match eol */ YY_RULE_SETUP -if (surfxml_link___ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_link___ctn_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link___ctn_id); +if (simgrid_parse_link___ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_link___ctn_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_link___ctn_id); YY_BREAK case 349: YY_RULE_SETUP { - if (!AX_surfxml_link___ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element."); - LEAVE; STag_surfxml_link___ctn();surfxml_pcdata_ix = 0; ENTER(E_surfxml_link___ctn); + if (!AX_simgrid_parse_link___ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element."); + LEAVE; STag_simgrid_parse_link___ctn();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_link___ctn); } YY_BREAK case 350: YY_RULE_SETUP { - if (!AX_surfxml_link___ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element."); - LEAVE; STag_surfxml_link___ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link___ctn(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_link___ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element."); + LEAVE; STag_simgrid_parse_link___ctn(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_link___ctn(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break; - case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_1: case S_surfxml_bypassASroute_2: SET(S_surfxml_bypassASroute_2); break; - case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_1: case S_surfxml_bypassRoute_2: SET(S_surfxml_bypassRoute_2); break; - case S_surfxml_bypassZoneRoute: case S_surfxml_bypassZoneRoute_1: case S_surfxml_bypassZoneRoute_2: SET(S_surfxml_bypassZoneRoute_2); break; - case S_surfxml_route: case S_surfxml_route_1: case S_surfxml_route_2: SET(S_surfxml_route_2); break; - case S_surfxml_zoneRoute: case S_surfxml_zoneRoute_1: case S_surfxml_zoneRoute_2: SET(S_surfxml_zoneRoute_2); break; + case S_simgrid_parse_ASroute: case S_simgrid_parse_ASroute_1: case S_simgrid_parse_ASroute_2: SET(S_simgrid_parse_ASroute_2); break; + case S_simgrid_parse_bypassASroute: case S_simgrid_parse_bypassASroute_1: case S_simgrid_parse_bypassASroute_2: SET(S_simgrid_parse_bypassASroute_2); break; + case S_simgrid_parse_bypassRoute: case S_simgrid_parse_bypassRoute_1: case S_simgrid_parse_bypassRoute_2: SET(S_simgrid_parse_bypassRoute_2); break; + case S_simgrid_parse_bypassZoneRoute: case S_simgrid_parse_bypassZoneRoute_1: case S_simgrid_parse_bypassZoneRoute_2: SET(S_simgrid_parse_bypassZoneRoute_2); break; + case S_simgrid_parse_route: case S_simgrid_parse_route_1: case S_simgrid_parse_route_2: SET(S_simgrid_parse_route_2); break; + case S_simgrid_parse_zoneRoute: case S_simgrid_parse_zoneRoute_1: case S_simgrid_parse_zoneRoute_2: SET(S_simgrid_parse_zoneRoute_2); break; } } YY_BREAK @@ -9010,7 +9010,7 @@ case 352: YY_RULE_SETUP FAIL("Bad attribute `%s' in `link_ctn' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_link___ctn): +case YY_STATE_EOF(AL_simgrid_parse_link___ctn): FAIL("EOF in attribute list of `link_ctn' element."); YY_BREAK @@ -9019,15 +9019,15 @@ case 353: YY_RULE_SETUP { LEAVE; - ETag_surfxml_link___ctn(); + ETag_simgrid_parse_link___ctn(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break; - case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_1: case S_surfxml_bypassASroute_2: SET(S_surfxml_bypassASroute_2); break; - case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_1: case S_surfxml_bypassRoute_2: SET(S_surfxml_bypassRoute_2); break; - case S_surfxml_bypassZoneRoute: case S_surfxml_bypassZoneRoute_1: case S_surfxml_bypassZoneRoute_2: SET(S_surfxml_bypassZoneRoute_2); break; - case S_surfxml_route: case S_surfxml_route_1: case S_surfxml_route_2: SET(S_surfxml_route_2); break; - case S_surfxml_zoneRoute: case S_surfxml_zoneRoute_1: case S_surfxml_zoneRoute_2: SET(S_surfxml_zoneRoute_2); break; + case S_simgrid_parse_ASroute: case S_simgrid_parse_ASroute_1: case S_simgrid_parse_ASroute_2: SET(S_simgrid_parse_ASroute_2); break; + case S_simgrid_parse_bypassASroute: case S_simgrid_parse_bypassASroute_1: case S_simgrid_parse_bypassASroute_2: SET(S_simgrid_parse_bypassASroute_2); break; + case S_simgrid_parse_bypassRoute: case S_simgrid_parse_bypassRoute_1: case S_simgrid_parse_bypassRoute_2: SET(S_simgrid_parse_bypassRoute_2); break; + case S_simgrid_parse_bypassZoneRoute: case S_simgrid_parse_bypassZoneRoute_1: case S_simgrid_parse_bypassZoneRoute_2: SET(S_simgrid_parse_bypassZoneRoute_2); break; + case S_simgrid_parse_route: case S_simgrid_parse_route_1: case S_simgrid_parse_route_2: SET(S_simgrid_parse_route_2); break; + case S_simgrid_parse_zoneRoute: case S_simgrid_parse_zoneRoute_1: case S_simgrid_parse_zoneRoute_2: SET(S_simgrid_parse_zoneRoute_2); break; } } YY_BREAK @@ -9040,7 +9040,7 @@ case 355: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_link___ctn): +case YY_STATE_EOF(E_simgrid_parse_link___ctn): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9055,50 +9055,50 @@ case 357: /* rule 357 can match eol */ YY_RULE_SETUP { - AX_surfxml_model___prop_id = 0; - surfxml_model___prop_id_isset = 0; - AX_surfxml_model___prop_value = 0; - surfxml_model___prop_value_isset = 0; - ENTER(AL_surfxml_model___prop); pushbuffer(0); + AX_simgrid_parse_model___prop_id = 0; + simgrid_parse_model___prop_id_isset = 0; + AX_simgrid_parse_model___prop_value = 0; + simgrid_parse_model___prop_value_isset = 0; + ENTER(AL_simgrid_parse_model___prop); pushbuffer(0); } YY_BREAK case 358: /* rule 358 can match eol */ YY_RULE_SETUP -if (surfxml_model___prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_model___prop_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_model___prop_id); +if (simgrid_parse_model___prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_model___prop_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_model___prop_id); YY_BREAK case 359: /* rule 359 can match eol */ YY_RULE_SETUP -if (surfxml_model___prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_model___prop_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_model___prop_id); +if (simgrid_parse_model___prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_model___prop_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_model___prop_id); YY_BREAK case 360: /* rule 360 can match eol */ YY_RULE_SETUP -if (surfxml_model___prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_model___prop_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_model___prop_value); +if (simgrid_parse_model___prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_model___prop_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_model___prop_value); YY_BREAK case 361: /* rule 361 can match eol */ YY_RULE_SETUP -if (surfxml_model___prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_model___prop_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_model___prop_value); +if (simgrid_parse_model___prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_model___prop_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_model___prop_value); YY_BREAK case 362: YY_RULE_SETUP { - if (!AX_surfxml_model___prop_id) FAIL("Required attribute `id' not set for `model_prop' element."); - if (!AX_surfxml_model___prop_value) FAIL("Required attribute `value' not set for `model_prop' element."); - LEAVE; STag_surfxml_model___prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_model___prop); + if (!AX_simgrid_parse_model___prop_id) FAIL("Required attribute `id' not set for `model_prop' element."); + if (!AX_simgrid_parse_model___prop_value) FAIL("Required attribute `value' not set for `model_prop' element."); + LEAVE; STag_simgrid_parse_model___prop();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_model___prop); } YY_BREAK case 363: YY_RULE_SETUP { - if (!AX_surfxml_model___prop_id) FAIL("Required attribute `id' not set for `model_prop' element."); - if (!AX_surfxml_model___prop_value) FAIL("Required attribute `value' not set for `model_prop' element."); - LEAVE; STag_surfxml_model___prop(); surfxml_pcdata_ix = 0; ETag_surfxml_model___prop(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_model___prop_id) FAIL("Required attribute `id' not set for `model_prop' element."); + if (!AX_simgrid_parse_model___prop_value) FAIL("Required attribute `value' not set for `model_prop' element."); + LEAVE; STag_simgrid_parse_model___prop(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_model___prop(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break; + case S_simgrid_parse_storage___type: case S_simgrid_parse_storage___type_1: case S_simgrid_parse_storage___type_2: SET(S_simgrid_parse_storage___type_2); break; } } YY_BREAK @@ -9110,7 +9110,7 @@ case 365: YY_RULE_SETUP FAIL("Bad attribute `%s' in `model_prop' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_model___prop): +case YY_STATE_EOF(AL_simgrid_parse_model___prop): FAIL("EOF in attribute list of `model_prop' element."); YY_BREAK @@ -9119,10 +9119,10 @@ case 366: YY_RULE_SETUP { LEAVE; - ETag_surfxml_model___prop(); + ETag_simgrid_parse_model___prop(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break; + case S_simgrid_parse_storage___type: case S_simgrid_parse_storage___type_1: case S_simgrid_parse_storage___type_2: SET(S_simgrid_parse_storage___type_2); break; } } YY_BREAK @@ -9135,7 +9135,7 @@ case 368: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_model___prop): +case YY_STATE_EOF(E_simgrid_parse_model___prop): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9148,50 +9148,50 @@ case 370: /* rule 370 can match eol */ YY_RULE_SETUP { - AX_surfxml_mount_name = 0; - surfxml_mount_name_isset = 0; - AX_surfxml_mount_storageId = 0; - surfxml_mount_storageId_isset = 0; - ENTER(AL_surfxml_mount); pushbuffer(0); + AX_simgrid_parse_mount_name = 0; + simgrid_parse_mount_name_isset = 0; + AX_simgrid_parse_mount_storageId = 0; + simgrid_parse_mount_storageId_isset = 0; + ENTER(AL_simgrid_parse_mount); pushbuffer(0); } YY_BREAK case 371: /* rule 371 can match eol */ YY_RULE_SETUP -if (surfxml_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in ");} surfxml_mount_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_name); +if (simgrid_parse_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in ");} simgrid_parse_mount_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_mount_name); YY_BREAK case 372: /* rule 372 can match eol */ YY_RULE_SETUP -if (surfxml_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in ");} surfxml_mount_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_name); +if (simgrid_parse_mount_name_isset != 0) {FAIL("Multiple definition of attribute name in ");} simgrid_parse_mount_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_mount_name); YY_BREAK case 373: /* rule 373 can match eol */ YY_RULE_SETUP -if (surfxml_mount_storageId_isset != 0) {FAIL("Multiple definition of attribute storageId in ");} surfxml_mount_storageId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_mount_storageId); +if (simgrid_parse_mount_storageId_isset != 0) {FAIL("Multiple definition of attribute storageId in ");} simgrid_parse_mount_storageId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_mount_storageId); YY_BREAK case 374: /* rule 374 can match eol */ YY_RULE_SETUP -if (surfxml_mount_storageId_isset != 0) {FAIL("Multiple definition of attribute storageId in ");} surfxml_mount_storageId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_mount_storageId); +if (simgrid_parse_mount_storageId_isset != 0) {FAIL("Multiple definition of attribute storageId in ");} simgrid_parse_mount_storageId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_mount_storageId); YY_BREAK case 375: YY_RULE_SETUP { - if (!AX_surfxml_mount_name) FAIL("Required attribute `name' not set for `mount' element."); - if (!AX_surfxml_mount_storageId) FAIL("Required attribute `storageId' not set for `mount' element."); - LEAVE; STag_surfxml_mount();surfxml_pcdata_ix = 0; ENTER(E_surfxml_mount); + if (!AX_simgrid_parse_mount_name) FAIL("Required attribute `name' not set for `mount' element."); + if (!AX_simgrid_parse_mount_storageId) FAIL("Required attribute `storageId' not set for `mount' element."); + LEAVE; STag_simgrid_parse_mount();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_mount); } YY_BREAK case 376: YY_RULE_SETUP { - if (!AX_surfxml_mount_name) FAIL("Required attribute `name' not set for `mount' element."); - if (!AX_surfxml_mount_storageId) FAIL("Required attribute `storageId' not set for `mount' element."); - LEAVE; STag_surfxml_mount(); surfxml_pcdata_ix = 0; ETag_surfxml_mount(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_mount_name) FAIL("Required attribute `name' not set for `mount' element."); + if (!AX_simgrid_parse_mount_storageId) FAIL("Required attribute `storageId' not set for `mount' element."); + LEAVE; STag_simgrid_parse_mount(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_mount(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; } } YY_BREAK @@ -9203,7 +9203,7 @@ case 378: YY_RULE_SETUP FAIL("Bad attribute `%s' in `mount' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_mount): +case YY_STATE_EOF(AL_simgrid_parse_mount): FAIL("EOF in attribute list of `mount' element."); YY_BREAK @@ -9212,10 +9212,10 @@ case 379: YY_RULE_SETUP { LEAVE; - ETag_surfxml_mount(); + ETag_simgrid_parse_mount(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; } } YY_BREAK @@ -9228,7 +9228,7 @@ case 381: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_mount): +case YY_STATE_EOF(E_simgrid_parse_mount): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9243,141 +9243,141 @@ case 383: /* rule 383 can match eol */ YY_RULE_SETUP { - AX_surfxml_peer_availability___file = 0; - surfxml_peer_availability___file_isset = 0; - AX_surfxml_peer_bw___in = 0; - surfxml_peer_bw___in_isset = 0; - AX_surfxml_peer_bw___out = 0; - surfxml_peer_bw___out_isset = 0; - AX_surfxml_peer_coordinates = 0; - surfxml_peer_coordinates_isset = 0; - AX_surfxml_peer_id = 0; - surfxml_peer_id_isset = 0; - AX_surfxml_peer_lat = 0; - surfxml_peer_lat_isset = 0; - AX_surfxml_peer_speed = 0; - surfxml_peer_speed_isset = 0; - AX_surfxml_peer_speed___file = 0; - surfxml_peer_speed___file_isset = 0; - AX_surfxml_peer_state___file = 0; - surfxml_peer_state___file_isset = 0; - ENTER(AL_surfxml_peer); pushbuffer(0); + AX_simgrid_parse_peer_availability___file = 0; + simgrid_parse_peer_availability___file_isset = 0; + AX_simgrid_parse_peer_bw___in = 0; + simgrid_parse_peer_bw___in_isset = 0; + AX_simgrid_parse_peer_bw___out = 0; + simgrid_parse_peer_bw___out_isset = 0; + AX_simgrid_parse_peer_coordinates = 0; + simgrid_parse_peer_coordinates_isset = 0; + AX_simgrid_parse_peer_id = 0; + simgrid_parse_peer_id_isset = 0; + AX_simgrid_parse_peer_lat = 0; + simgrid_parse_peer_lat_isset = 0; + AX_simgrid_parse_peer_speed = 0; + simgrid_parse_peer_speed_isset = 0; + AX_simgrid_parse_peer_speed___file = 0; + simgrid_parse_peer_speed___file_isset = 0; + AX_simgrid_parse_peer_state___file = 0; + simgrid_parse_peer_state___file_isset = 0; + ENTER(AL_simgrid_parse_peer); pushbuffer(0); } YY_BREAK case 384: /* rule 384 can match eol */ YY_RULE_SETUP -if (surfxml_peer_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} surfxml_peer_availability___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability___file); +if (simgrid_parse_peer_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} simgrid_parse_peer_availability___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_availability___file); YY_BREAK case 385: /* rule 385 can match eol */ YY_RULE_SETUP -if (surfxml_peer_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} surfxml_peer_availability___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability___file); +if (simgrid_parse_peer_availability___file_isset != 0) {FAIL("Multiple definition of attribute availability_file in ");} simgrid_parse_peer_availability___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_availability___file); YY_BREAK case 386: /* rule 386 can match eol */ YY_RULE_SETUP -if (surfxml_peer_bw___in_isset != 0) {FAIL("Multiple definition of attribute bw_in in ");} surfxml_peer_bw___in_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw___in); +if (simgrid_parse_peer_bw___in_isset != 0) {FAIL("Multiple definition of attribute bw_in in ");} simgrid_parse_peer_bw___in_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_bw___in); YY_BREAK case 387: /* rule 387 can match eol */ YY_RULE_SETUP -if (surfxml_peer_bw___in_isset != 0) {FAIL("Multiple definition of attribute bw_in in ");} surfxml_peer_bw___in_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw___in); +if (simgrid_parse_peer_bw___in_isset != 0) {FAIL("Multiple definition of attribute bw_in in ");} simgrid_parse_peer_bw___in_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_bw___in); YY_BREAK case 388: /* rule 388 can match eol */ YY_RULE_SETUP -if (surfxml_peer_bw___out_isset != 0) {FAIL("Multiple definition of attribute bw_out in ");} surfxml_peer_bw___out_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw___out); +if (simgrid_parse_peer_bw___out_isset != 0) {FAIL("Multiple definition of attribute bw_out in ");} simgrid_parse_peer_bw___out_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_bw___out); YY_BREAK case 389: /* rule 389 can match eol */ YY_RULE_SETUP -if (surfxml_peer_bw___out_isset != 0) {FAIL("Multiple definition of attribute bw_out in ");} surfxml_peer_bw___out_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw___out); +if (simgrid_parse_peer_bw___out_isset != 0) {FAIL("Multiple definition of attribute bw_out in ");} simgrid_parse_peer_bw___out_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_bw___out); YY_BREAK case 390: /* rule 390 can match eol */ YY_RULE_SETUP -if (surfxml_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_peer_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates); +if (simgrid_parse_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_peer_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_coordinates); YY_BREAK case 391: /* rule 391 can match eol */ YY_RULE_SETUP -if (surfxml_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_peer_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates); +if (simgrid_parse_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_peer_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_coordinates); YY_BREAK case 392: /* rule 392 can match eol */ YY_RULE_SETUP -if (surfxml_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_peer_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id); +if (simgrid_parse_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_peer_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_id); YY_BREAK case 393: /* rule 393 can match eol */ YY_RULE_SETUP -if (surfxml_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_peer_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id); +if (simgrid_parse_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_peer_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_id); YY_BREAK case 394: /* rule 394 can match eol */ YY_RULE_SETUP -if (surfxml_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_peer_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat); +if (simgrid_parse_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_peer_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_lat); YY_BREAK case 395: /* rule 395 can match eol */ YY_RULE_SETUP -if (surfxml_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} surfxml_peer_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat); +if (simgrid_parse_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in ");} simgrid_parse_peer_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_lat); YY_BREAK case 396: /* rule 396 can match eol */ YY_RULE_SETUP -if (surfxml_peer_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_peer_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_speed); +if (simgrid_parse_peer_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_peer_speed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_speed); YY_BREAK case 397: /* rule 397 can match eol */ YY_RULE_SETUP -if (surfxml_peer_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} surfxml_peer_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_speed); +if (simgrid_parse_peer_speed_isset != 0) {FAIL("Multiple definition of attribute speed in ");} simgrid_parse_peer_speed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_speed); YY_BREAK case 398: /* rule 398 can match eol */ YY_RULE_SETUP -if (surfxml_peer_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} surfxml_peer_speed___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_speed___file); +if (simgrid_parse_peer_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} simgrid_parse_peer_speed___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_speed___file); YY_BREAK case 399: /* rule 399 can match eol */ YY_RULE_SETUP -if (surfxml_peer_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} surfxml_peer_speed___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_speed___file); +if (simgrid_parse_peer_speed___file_isset != 0) {FAIL("Multiple definition of attribute speed_file in ");} simgrid_parse_peer_speed___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_speed___file); YY_BREAK case 400: /* rule 400 can match eol */ YY_RULE_SETUP -if (surfxml_peer_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_peer_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state___file); +if (simgrid_parse_peer_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_peer_state___file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_peer_state___file); YY_BREAK case 401: /* rule 401 can match eol */ YY_RULE_SETUP -if (surfxml_peer_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} surfxml_peer_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state___file); +if (simgrid_parse_peer_state___file_isset != 0) {FAIL("Multiple definition of attribute state_file in ");} simgrid_parse_peer_state___file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_peer_state___file); YY_BREAK case 402: YY_RULE_SETUP { - if (!AX_surfxml_peer_bw___in) FAIL("Required attribute `bw_in' not set for `peer' element."); - if (!AX_surfxml_peer_bw___out) FAIL("Required attribute `bw_out' not set for `peer' element."); - if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element."); - if (!AX_surfxml_peer_speed) FAIL("Required attribute `speed' not set for `peer' element."); - LEAVE; STag_surfxml_peer();surfxml_pcdata_ix = 0; ENTER(E_surfxml_peer); + if (!AX_simgrid_parse_peer_bw___in) FAIL("Required attribute `bw_in' not set for `peer' element."); + if (!AX_simgrid_parse_peer_bw___out) FAIL("Required attribute `bw_out' not set for `peer' element."); + if (!AX_simgrid_parse_peer_id) FAIL("Required attribute `id' not set for `peer' element."); + if (!AX_simgrid_parse_peer_speed) FAIL("Required attribute `speed' not set for `peer' element."); + LEAVE; STag_simgrid_parse_peer();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_peer); } YY_BREAK case 403: YY_RULE_SETUP { - if (!AX_surfxml_peer_bw___in) FAIL("Required attribute `bw_in' not set for `peer' element."); - if (!AX_surfxml_peer_bw___out) FAIL("Required attribute `bw_out' not set for `peer' element."); - if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element."); - if (!AX_surfxml_peer_speed) FAIL("Required attribute `speed' not set for `peer' element."); - LEAVE; STag_surfxml_peer(); surfxml_pcdata_ix = 0; ETag_surfxml_peer(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_peer_bw___in) FAIL("Required attribute `bw_in' not set for `peer' element."); + if (!AX_simgrid_parse_peer_bw___out) FAIL("Required attribute `bw_out' not set for `peer' element."); + if (!AX_simgrid_parse_peer_id) FAIL("Required attribute `id' not set for `peer' element."); + if (!AX_simgrid_parse_peer_speed) FAIL("Required attribute `speed' not set for `peer' element."); + LEAVE; STag_simgrid_parse_peer(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_peer(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -9389,7 +9389,7 @@ case 405: YY_RULE_SETUP FAIL("Bad attribute `%s' in `peer' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_peer): +case YY_STATE_EOF(AL_simgrid_parse_peer): FAIL("EOF in attribute list of `peer' element."); YY_BREAK @@ -9398,13 +9398,13 @@ case 406: YY_RULE_SETUP { LEAVE; - ETag_surfxml_peer(); + ETag_simgrid_parse_peer(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -9417,7 +9417,7 @@ case 408: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_peer): +case YY_STATE_EOF(E_simgrid_parse_peer): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9490,34 +9490,34 @@ case 410: /* rule 410 can match eol */ YY_RULE_SETUP { - AX_surfxml_platform_version = 1; - surfxml_platform_version_isset = 0; - ENTER(AL_surfxml_platform); pushbuffer(0); + AX_simgrid_parse_platform_version = 1; + simgrid_parse_platform_version_isset = 0; + ENTER(AL_simgrid_parse_platform); pushbuffer(0); } YY_BREAK case 411: /* rule 411 can match eol */ YY_RULE_SETUP -if (surfxml_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in ");} surfxml_platform_version_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version); +if (simgrid_parse_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in ");} simgrid_parse_platform_version_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_platform_version); YY_BREAK case 412: /* rule 412 can match eol */ YY_RULE_SETUP -if (surfxml_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in ");} surfxml_platform_version_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version); +if (simgrid_parse_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in ");} simgrid_parse_platform_version_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_platform_version); YY_BREAK case 413: YY_RULE_SETUP { - LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform); + LEAVE; STag_simgrid_parse_platform();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_platform); } YY_BREAK case 414: YY_RULE_SETUP { - LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */ + LEAVE; STag_simgrid_parse_platform(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_platform(); popbuffer(); /* attribute */ switch (YY_START) { - case ROOT_surfxml_platform: SET(EPILOG); break; + case ROOT_simgrid_parse_platform: SET(EPILOG); break; } } YY_BREAK @@ -9529,7 +9529,7 @@ case 416: YY_RULE_SETUP FAIL("Bad attribute `%s' in `platform' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_platform): +case YY_STATE_EOF(AL_simgrid_parse_platform): FAIL("EOF in attribute list of `platform' element."); YY_BREAK @@ -9538,10 +9538,10 @@ case 417: YY_RULE_SETUP { LEAVE; - ETag_surfxml_platform(); + ETag_simgrid_parse_platform(); popbuffer(); /* attribute */ switch (YY_START) { - case ROOT_surfxml_platform: SET(EPILOG); break; + case ROOT_simgrid_parse_platform: SET(EPILOG); break; } } YY_BREAK @@ -9554,13 +9554,13 @@ case 419: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_platform): -case YY_STATE_EOF(S_surfxml_platform): -case YY_STATE_EOF(S_surfxml_platform_1): -case YY_STATE_EOF(S_surfxml_platform_3): -case YY_STATE_EOF(S_surfxml_platform_4): -case YY_STATE_EOF(S_surfxml_platform_6): -case YY_STATE_EOF(S_surfxml_platform_8): +case YY_STATE_EOF(E_simgrid_parse_platform): +case YY_STATE_EOF(S_simgrid_parse_platform): +case YY_STATE_EOF(S_simgrid_parse_platform_1): +case YY_STATE_EOF(S_simgrid_parse_platform_3): +case YY_STATE_EOF(S_simgrid_parse_platform_4): +case YY_STATE_EOF(S_simgrid_parse_platform_6): +case YY_STATE_EOF(S_simgrid_parse_platform_8): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9574,90 +9574,90 @@ case 421: /* rule 421 can match eol */ YY_RULE_SETUP { - AX_surfxml_process_function = 0; - surfxml_process_function_isset = 0; - AX_surfxml_process_host = 0; - surfxml_process_host_isset = 0; - AX_surfxml_process_kill___time = 38; - surfxml_process_kill___time_isset = 0; - AX_surfxml_process_on___failure = A_surfxml_process_on___failure_DIE; - surfxml_process_on___failure_isset = 0; - AX_surfxml_process_start___time = 33; - surfxml_process_start___time_isset = 0; - ENTER(AL_surfxml_process); pushbuffer(0); + AX_simgrid_parse_process_function = 0; + simgrid_parse_process_function_isset = 0; + AX_simgrid_parse_process_host = 0; + simgrid_parse_process_host_isset = 0; + AX_simgrid_parse_process_kill___time = 38; + simgrid_parse_process_kill___time_isset = 0; + AX_simgrid_parse_process_on___failure = A_simgrid_parse_process_on___failure_DIE; + simgrid_parse_process_on___failure_isset = 0; + AX_simgrid_parse_process_start___time = 33; + simgrid_parse_process_start___time_isset = 0; + ENTER(AL_simgrid_parse_process); pushbuffer(0); } YY_BREAK case 422: /* rule 422 can match eol */ YY_RULE_SETUP -if (surfxml_process_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} surfxml_process_function_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function); +if (simgrid_parse_process_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} simgrid_parse_process_function_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_process_function); YY_BREAK case 423: /* rule 423 can match eol */ YY_RULE_SETUP -if (surfxml_process_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} surfxml_process_function_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function); +if (simgrid_parse_process_function_isset != 0) {FAIL("Multiple definition of attribute function in ");} simgrid_parse_process_function_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_process_function); YY_BREAK case 424: /* rule 424 can match eol */ YY_RULE_SETUP -if (surfxml_process_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} surfxml_process_host_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host); +if (simgrid_parse_process_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} simgrid_parse_process_host_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_process_host); YY_BREAK case 425: /* rule 425 can match eol */ YY_RULE_SETUP -if (surfxml_process_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} surfxml_process_host_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host); +if (simgrid_parse_process_host_isset != 0) {FAIL("Multiple definition of attribute host in ");} simgrid_parse_process_host_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_process_host); YY_BREAK case 426: /* rule 426 can match eol */ YY_RULE_SETUP -if (surfxml_process_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} surfxml_process_kill___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill___time); +if (simgrid_parse_process_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} simgrid_parse_process_kill___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_process_kill___time); YY_BREAK case 427: /* rule 427 can match eol */ YY_RULE_SETUP -if (surfxml_process_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} surfxml_process_kill___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill___time); +if (simgrid_parse_process_kill___time_isset != 0) {FAIL("Multiple definition of attribute kill_time in ");} simgrid_parse_process_kill___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_process_kill___time); YY_BREAK case 428: /* rule 428 can match eol */ case 429: /* rule 429 can match eol */ YY_RULE_SETUP -A_surfxml_process_on___failure = A_surfxml_process_on___failure_DIE; +A_simgrid_parse_process_on___failure = A_simgrid_parse_process_on___failure_DIE; YY_BREAK case 430: /* rule 430 can match eol */ case 431: /* rule 431 can match eol */ YY_RULE_SETUP -A_surfxml_process_on___failure = A_surfxml_process_on___failure_RESTART; +A_simgrid_parse_process_on___failure = A_simgrid_parse_process_on___failure_RESTART; YY_BREAK case 432: /* rule 432 can match eol */ YY_RULE_SETUP -if (surfxml_process_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} surfxml_process_start___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start___time); +if (simgrid_parse_process_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} simgrid_parse_process_start___time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_process_start___time); YY_BREAK case 433: /* rule 433 can match eol */ YY_RULE_SETUP -if (surfxml_process_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} surfxml_process_start___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start___time); +if (simgrid_parse_process_start___time_isset != 0) {FAIL("Multiple definition of attribute start_time in ");} simgrid_parse_process_start___time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_process_start___time); YY_BREAK case 434: YY_RULE_SETUP { - if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element."); - if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element."); - LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process); + if (!AX_simgrid_parse_process_function) FAIL("Required attribute `function' not set for `process' element."); + if (!AX_simgrid_parse_process_host) FAIL("Required attribute `host' not set for `process' element."); + LEAVE; STag_simgrid_parse_process();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_process); } YY_BREAK case 435: YY_RULE_SETUP { - if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element."); - if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element."); - LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_process_function) FAIL("Required attribute `function' not set for `process' element."); + if (!AX_simgrid_parse_process_host) FAIL("Required attribute `host' not set for `process' element."); + LEAVE; STag_simgrid_parse_process(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_process(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_4: case S_surfxml_platform_6: case S_surfxml_platform_7: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_4: case S_simgrid_parse_platform_6: case S_simgrid_parse_platform_7: case S_simgrid_parse_platform_8: SET(S_simgrid_parse_platform_8); break; } } YY_BREAK @@ -9669,7 +9669,7 @@ case 437: YY_RULE_SETUP FAIL("Bad attribute `%s' in `process' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_process): +case YY_STATE_EOF(AL_simgrid_parse_process): FAIL("EOF in attribute list of `process' element."); YY_BREAK @@ -9678,10 +9678,10 @@ case 438: YY_RULE_SETUP { LEAVE; - ETag_surfxml_process(); + ETag_simgrid_parse_process(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_4: case S_surfxml_platform_6: case S_surfxml_platform_7: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_4: case S_simgrid_parse_platform_6: case S_simgrid_parse_platform_7: case S_simgrid_parse_platform_8: SET(S_simgrid_parse_platform_8); break; } } YY_BREAK @@ -9694,9 +9694,9 @@ case 440: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_process): -case YY_STATE_EOF(S_surfxml_process): -case YY_STATE_EOF(S_surfxml_process_2): +case YY_STATE_EOF(E_simgrid_parse_process): +case YY_STATE_EOF(S_simgrid_parse_process): +case YY_STATE_EOF(S_simgrid_parse_process_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9711,60 +9711,60 @@ case 442: /* rule 442 can match eol */ YY_RULE_SETUP { - AX_surfxml_prop_id = 0; - surfxml_prop_id_isset = 0; - AX_surfxml_prop_value = 0; - surfxml_prop_value_isset = 0; - ENTER(AL_surfxml_prop); pushbuffer(0); + AX_simgrid_parse_prop_id = 0; + simgrid_parse_prop_id_isset = 0; + AX_simgrid_parse_prop_value = 0; + simgrid_parse_prop_value_isset = 0; + ENTER(AL_simgrid_parse_prop); pushbuffer(0); } YY_BREAK case 443: /* rule 443 can match eol */ YY_RULE_SETUP -if (surfxml_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_prop_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id); +if (simgrid_parse_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_prop_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_prop_id); YY_BREAK case 444: /* rule 444 can match eol */ YY_RULE_SETUP -if (surfxml_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_prop_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id); +if (simgrid_parse_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_prop_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_prop_id); YY_BREAK case 445: /* rule 445 can match eol */ YY_RULE_SETUP -if (surfxml_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_prop_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value); +if (simgrid_parse_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_prop_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_prop_value); YY_BREAK case 446: /* rule 446 can match eol */ YY_RULE_SETUP -if (surfxml_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} surfxml_prop_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value); +if (simgrid_parse_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in ");} simgrid_parse_prop_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_prop_value); YY_BREAK case 447: YY_RULE_SETUP { - if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element."); - if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element."); - LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop); + if (!AX_simgrid_parse_prop_id) FAIL("Required attribute `id' not set for `prop' element."); + if (!AX_simgrid_parse_prop_value) FAIL("Required attribute `value' not set for `prop' element."); + LEAVE; STag_simgrid_parse_prop();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_prop); } YY_BREAK case 448: YY_RULE_SETUP { - if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element."); - if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element."); - LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_prop_id) FAIL("Required attribute `id' not set for `prop' element."); + if (!AX_simgrid_parse_prop_value) FAIL("Required attribute `value' not set for `prop' element."); + LEAVE; STag_simgrid_parse_prop(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_prop(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break; - case S_surfxml_actor: case S_surfxml_actor_1: case S_surfxml_actor_2: SET(S_surfxml_actor_2); break; - case S_surfxml_cluster: case S_surfxml_cluster_1: case S_surfxml_cluster_2: SET(S_surfxml_cluster_2); break; - case S_surfxml_config: case S_surfxml_config_1: case S_surfxml_config_2: SET(S_surfxml_config_2); break; - case S_surfxml_disk: case S_surfxml_disk_1: case S_surfxml_disk_2: SET(S_surfxml_disk_2); break; - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; - case S_surfxml_link: case S_surfxml_link_1: case S_surfxml_link_2: SET(S_surfxml_link_2); break; - case S_surfxml_process: case S_surfxml_process_1: case S_surfxml_process_2: SET(S_surfxml_process_2); break; - case S_surfxml_storage: case S_surfxml_storage_1: case S_surfxml_storage_2: SET(S_surfxml_storage_2); break; - case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break; - case S_surfxml_zone: case S_surfxml_zone_2: case S_surfxml_zone_3: SET(S_surfxml_zone_3); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_2: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_3); break; + case S_simgrid_parse_actor: case S_simgrid_parse_actor_1: case S_simgrid_parse_actor_2: SET(S_simgrid_parse_actor_2); break; + case S_simgrid_parse_cluster: case S_simgrid_parse_cluster_1: case S_simgrid_parse_cluster_2: SET(S_simgrid_parse_cluster_2); break; + case S_simgrid_parse_config: case S_simgrid_parse_config_1: case S_simgrid_parse_config_2: SET(S_simgrid_parse_config_2); break; + case S_simgrid_parse_disk: case S_simgrid_parse_disk_1: case S_simgrid_parse_disk_2: SET(S_simgrid_parse_disk_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; + case S_simgrid_parse_link: case S_simgrid_parse_link_1: case S_simgrid_parse_link_2: SET(S_simgrid_parse_link_2); break; + case S_simgrid_parse_process: case S_simgrid_parse_process_1: case S_simgrid_parse_process_2: SET(S_simgrid_parse_process_2); break; + case S_simgrid_parse_storage: case S_simgrid_parse_storage_1: case S_simgrid_parse_storage_2: SET(S_simgrid_parse_storage_2); break; + case S_simgrid_parse_storage___type: case S_simgrid_parse_storage___type_1: case S_simgrid_parse_storage___type_2: SET(S_simgrid_parse_storage___type_2); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_2: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_3); break; } } YY_BREAK @@ -9776,7 +9776,7 @@ case 450: YY_RULE_SETUP FAIL("Bad attribute `%s' in `prop' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_prop): +case YY_STATE_EOF(AL_simgrid_parse_prop): FAIL("EOF in attribute list of `prop' element."); YY_BREAK @@ -9785,20 +9785,20 @@ case 451: YY_RULE_SETUP { LEAVE; - ETag_surfxml_prop(); + ETag_simgrid_parse_prop(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break; - case S_surfxml_actor: case S_surfxml_actor_1: case S_surfxml_actor_2: SET(S_surfxml_actor_2); break; - case S_surfxml_cluster: case S_surfxml_cluster_1: case S_surfxml_cluster_2: SET(S_surfxml_cluster_2); break; - case S_surfxml_config: case S_surfxml_config_1: case S_surfxml_config_2: SET(S_surfxml_config_2); break; - case S_surfxml_disk: case S_surfxml_disk_1: case S_surfxml_disk_2: SET(S_surfxml_disk_2); break; - case S_surfxml_host: case S_surfxml_host_1: case S_surfxml_host_2: SET(S_surfxml_host_2); break; - case S_surfxml_link: case S_surfxml_link_1: case S_surfxml_link_2: SET(S_surfxml_link_2); break; - case S_surfxml_process: case S_surfxml_process_1: case S_surfxml_process_2: SET(S_surfxml_process_2); break; - case S_surfxml_storage: case S_surfxml_storage_1: case S_surfxml_storage_2: SET(S_surfxml_storage_2); break; - case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break; - case S_surfxml_zone: case S_surfxml_zone_2: case S_surfxml_zone_3: SET(S_surfxml_zone_3); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_2: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_3); break; + case S_simgrid_parse_actor: case S_simgrid_parse_actor_1: case S_simgrid_parse_actor_2: SET(S_simgrid_parse_actor_2); break; + case S_simgrid_parse_cluster: case S_simgrid_parse_cluster_1: case S_simgrid_parse_cluster_2: SET(S_simgrid_parse_cluster_2); break; + case S_simgrid_parse_config: case S_simgrid_parse_config_1: case S_simgrid_parse_config_2: SET(S_simgrid_parse_config_2); break; + case S_simgrid_parse_disk: case S_simgrid_parse_disk_1: case S_simgrid_parse_disk_2: SET(S_simgrid_parse_disk_2); break; + case S_simgrid_parse_host: case S_simgrid_parse_host_1: case S_simgrid_parse_host_2: SET(S_simgrid_parse_host_2); break; + case S_simgrid_parse_link: case S_simgrid_parse_link_1: case S_simgrid_parse_link_2: SET(S_simgrid_parse_link_2); break; + case S_simgrid_parse_process: case S_simgrid_parse_process_1: case S_simgrid_parse_process_2: SET(S_simgrid_parse_process_2); break; + case S_simgrid_parse_storage: case S_simgrid_parse_storage_1: case S_simgrid_parse_storage_2: SET(S_simgrid_parse_storage_2); break; + case S_simgrid_parse_storage___type: case S_simgrid_parse_storage___type_1: case S_simgrid_parse_storage___type_2: SET(S_simgrid_parse_storage___type_2); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_2: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_3); break; } } YY_BREAK @@ -9811,7 +9811,7 @@ case 453: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_prop): +case YY_STATE_EOF(E_simgrid_parse_prop): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -9825,23 +9825,23 @@ case 455: /* rule 455 can match eol */ YY_RULE_SETUP { - AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48; - surfxml_random_generator_isset = 0; - AX_surfxml_random_id = 0; - surfxml_random_id_isset = 0; - AX_surfxml_random_max = 0; - surfxml_random_max_isset = 0; - AX_surfxml_random_mean = 0; - surfxml_random_mean_isset = 0; - AX_surfxml_random_min = 0; - surfxml_random_min_isset = 0; - AX_surfxml_random_radical = 0; - surfxml_random_radical_isset = 0; - AX_surfxml_random_seed = 5; - surfxml_random_seed_isset = 0; - AX_surfxml_random_std___deviation = 0; - surfxml_random_std___deviation_isset = 0; - ENTER(AL_surfxml_random); pushbuffer(0); + AX_simgrid_parse_random_generator = A_simgrid_parse_random_generator_DRAND48; + simgrid_parse_random_generator_isset = 0; + AX_simgrid_parse_random_id = 0; + simgrid_parse_random_id_isset = 0; + AX_simgrid_parse_random_max = 0; + simgrid_parse_random_max_isset = 0; + AX_simgrid_parse_random_mean = 0; + simgrid_parse_random_mean_isset = 0; + AX_simgrid_parse_random_min = 0; + simgrid_parse_random_min_isset = 0; + AX_simgrid_parse_random_radical = 0; + simgrid_parse_random_radical_isset = 0; + AX_simgrid_parse_random_seed = 5; + simgrid_parse_random_seed_isset = 0; + AX_simgrid_parse_random_std___deviation = 0; + simgrid_parse_random_std___deviation_isset = 0; + ENTER(AL_simgrid_parse_random); pushbuffer(0); } YY_BREAK @@ -9850,121 +9850,121 @@ case 456: case 457: /* rule 457 can match eol */ YY_RULE_SETUP -A_surfxml_random_generator = A_surfxml_random_generator_DRAND48; +A_simgrid_parse_random_generator = A_simgrid_parse_random_generator_DRAND48; YY_BREAK case 458: /* rule 458 can match eol */ case 459: /* rule 459 can match eol */ YY_RULE_SETUP -A_surfxml_random_generator = A_surfxml_random_generator_RAND; +A_simgrid_parse_random_generator = A_simgrid_parse_random_generator_RAND; YY_BREAK case 460: /* rule 460 can match eol */ case 461: /* rule 461 can match eol */ YY_RULE_SETUP -A_surfxml_random_generator = A_surfxml_random_generator_RNGSTREAM; +A_simgrid_parse_random_generator = A_simgrid_parse_random_generator_RNGSTREAM; YY_BREAK case 462: /* rule 462 can match eol */ case 463: /* rule 463 can match eol */ YY_RULE_SETUP -A_surfxml_random_generator = A_surfxml_random_generator_NONE; +A_simgrid_parse_random_generator = A_simgrid_parse_random_generator_NONE; YY_BREAK case 464: /* rule 464 can match eol */ YY_RULE_SETUP -if (surfxml_random_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_random_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id); +if (simgrid_parse_random_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_random_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_id); YY_BREAK case 465: /* rule 465 can match eol */ YY_RULE_SETUP -if (surfxml_random_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_random_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id); +if (simgrid_parse_random_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_random_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_id); YY_BREAK case 466: /* rule 466 can match eol */ YY_RULE_SETUP -if (surfxml_random_max_isset != 0) {FAIL("Multiple definition of attribute max in ");} surfxml_random_max_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max); +if (simgrid_parse_random_max_isset != 0) {FAIL("Multiple definition of attribute max in ");} simgrid_parse_random_max_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_max); YY_BREAK case 467: /* rule 467 can match eol */ YY_RULE_SETUP -if (surfxml_random_max_isset != 0) {FAIL("Multiple definition of attribute max in ");} surfxml_random_max_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max); +if (simgrid_parse_random_max_isset != 0) {FAIL("Multiple definition of attribute max in ");} simgrid_parse_random_max_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_max); YY_BREAK case 468: /* rule 468 can match eol */ YY_RULE_SETUP -if (surfxml_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in ");} surfxml_random_mean_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean); +if (simgrid_parse_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in ");} simgrid_parse_random_mean_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_mean); YY_BREAK case 469: /* rule 469 can match eol */ YY_RULE_SETUP -if (surfxml_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in ");} surfxml_random_mean_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean); +if (simgrid_parse_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in ");} simgrid_parse_random_mean_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_mean); YY_BREAK case 470: /* rule 470 can match eol */ YY_RULE_SETUP -if (surfxml_random_min_isset != 0) {FAIL("Multiple definition of attribute min in ");} surfxml_random_min_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min); +if (simgrid_parse_random_min_isset != 0) {FAIL("Multiple definition of attribute min in ");} simgrid_parse_random_min_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_min); YY_BREAK case 471: /* rule 471 can match eol */ YY_RULE_SETUP -if (surfxml_random_min_isset != 0) {FAIL("Multiple definition of attribute min in ");} surfxml_random_min_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min); +if (simgrid_parse_random_min_isset != 0) {FAIL("Multiple definition of attribute min in ");} simgrid_parse_random_min_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_min); YY_BREAK case 472: /* rule 472 can match eol */ YY_RULE_SETUP -if (surfxml_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_random_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_radical); +if (simgrid_parse_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_random_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_radical); YY_BREAK case 473: /* rule 473 can match eol */ YY_RULE_SETUP -if (surfxml_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} surfxml_random_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_radical); +if (simgrid_parse_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in ");} simgrid_parse_random_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_radical); YY_BREAK case 474: /* rule 474 can match eol */ YY_RULE_SETUP -if (surfxml_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in ");} surfxml_random_seed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_seed); +if (simgrid_parse_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in ");} simgrid_parse_random_seed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_seed); YY_BREAK case 475: /* rule 475 can match eol */ YY_RULE_SETUP -if (surfxml_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in ");} surfxml_random_seed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_seed); +if (simgrid_parse_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in ");} simgrid_parse_random_seed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_seed); YY_BREAK case 476: /* rule 476 can match eol */ YY_RULE_SETUP -if (surfxml_random_std___deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in ");} surfxml_random_std___deviation_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std___deviation); +if (simgrid_parse_random_std___deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in ");} simgrid_parse_random_std___deviation_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_random_std___deviation); YY_BREAK case 477: /* rule 477 can match eol */ YY_RULE_SETUP -if (surfxml_random_std___deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in ");} surfxml_random_std___deviation_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std___deviation); +if (simgrid_parse_random_std___deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in ");} simgrid_parse_random_std___deviation_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_random_std___deviation); YY_BREAK case 478: YY_RULE_SETUP { - if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element."); - if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element."); - if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element."); - if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element."); - if (!AX_surfxml_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element."); - LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(E_surfxml_random); + if (!AX_simgrid_parse_random_id) FAIL("Required attribute `id' not set for `random' element."); + if (!AX_simgrid_parse_random_max) FAIL("Required attribute `max' not set for `random' element."); + if (!AX_simgrid_parse_random_mean) FAIL("Required attribute `mean' not set for `random' element."); + if (!AX_simgrid_parse_random_min) FAIL("Required attribute `min' not set for `random' element."); + if (!AX_simgrid_parse_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element."); + LEAVE; STag_simgrid_parse_random();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_random); } YY_BREAK case 479: YY_RULE_SETUP { - if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element."); - if (!AX_surfxml_random_max) FAIL("Required attribute `max' not set for `random' element."); - if (!AX_surfxml_random_mean) FAIL("Required attribute `mean' not set for `random' element."); - if (!AX_surfxml_random_min) FAIL("Required attribute `min' not set for `random' element."); - if (!AX_surfxml_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element."); - LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_random_id) FAIL("Required attribute `id' not set for `random' element."); + if (!AX_simgrid_parse_random_max) FAIL("Required attribute `max' not set for `random' element."); + if (!AX_simgrid_parse_random_mean) FAIL("Required attribute `mean' not set for `random' element."); + if (!AX_simgrid_parse_random_min) FAIL("Required attribute `min' not set for `random' element."); + if (!AX_simgrid_parse_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element."); + LEAVE; STag_simgrid_parse_random(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_random(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_2: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_2: case S_simgrid_parse_platform_3: SET(S_simgrid_parse_platform_3); break; } } YY_BREAK @@ -9976,7 +9976,7 @@ case 481: YY_RULE_SETUP FAIL("Bad attribute `%s' in `random' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_random): +case YY_STATE_EOF(AL_simgrid_parse_random): FAIL("EOF in attribute list of `random' element."); YY_BREAK @@ -9985,10 +9985,10 @@ case 482: YY_RULE_SETUP { LEAVE; - ETag_surfxml_random(); + ETag_simgrid_parse_random(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_platform: case S_surfxml_platform_2: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_2: case S_simgrid_parse_platform_3: SET(S_simgrid_parse_platform_3); break; } } YY_BREAK @@ -10001,7 +10001,7 @@ case 484: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_random): +case YY_STATE_EOF(E_simgrid_parse_random): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10014,81 +10014,81 @@ case 486: /* rule 486 can match eol */ YY_RULE_SETUP { - AX_surfxml_route_dst = 0; - surfxml_route_dst_isset = 0; - AX_surfxml_route_src = 0; - surfxml_route_src_isset = 0; - AX_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES; - surfxml_route_symmetrical_isset = 0; - ENTER(AL_surfxml_route); pushbuffer(0); + AX_simgrid_parse_route_dst = 0; + simgrid_parse_route_dst_isset = 0; + AX_simgrid_parse_route_src = 0; + simgrid_parse_route_src_isset = 0; + AX_simgrid_parse_route_symmetrical = A_simgrid_parse_route_symmetrical_YES; + simgrid_parse_route_symmetrical_isset = 0; + ENTER(AL_simgrid_parse_route); pushbuffer(0); } YY_BREAK case 487: /* rule 487 can match eol */ YY_RULE_SETUP -if (surfxml_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_route_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst); +if (simgrid_parse_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_route_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_route_dst); YY_BREAK case 488: /* rule 488 can match eol */ YY_RULE_SETUP -if (surfxml_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_route_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst); +if (simgrid_parse_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_route_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_route_dst); YY_BREAK case 489: /* rule 489 can match eol */ YY_RULE_SETUP -if (surfxml_route_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_route_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src); +if (simgrid_parse_route_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_route_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_route_src); YY_BREAK case 490: /* rule 490 can match eol */ YY_RULE_SETUP -if (surfxml_route_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_route_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src); +if (simgrid_parse_route_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_route_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_route_src); YY_BREAK case 491: /* rule 491 can match eol */ case 492: /* rule 492 can match eol */ YY_RULE_SETUP -A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES; +A_simgrid_parse_route_symmetrical = A_simgrid_parse_route_symmetrical_YES; YY_BREAK case 493: /* rule 493 can match eol */ case 494: /* rule 494 can match eol */ YY_RULE_SETUP -A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO; +A_simgrid_parse_route_symmetrical = A_simgrid_parse_route_symmetrical_NO; YY_BREAK case 495: /* rule 495 can match eol */ case 496: /* rule 496 can match eol */ YY_RULE_SETUP -A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_yes; +A_simgrid_parse_route_symmetrical = A_simgrid_parse_route_symmetrical_yes; YY_BREAK case 497: /* rule 497 can match eol */ case 498: /* rule 498 can match eol */ YY_RULE_SETUP -A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_no; +A_simgrid_parse_route_symmetrical = A_simgrid_parse_route_symmetrical_no; YY_BREAK case 499: YY_RULE_SETUP { - if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element."); - if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element."); - LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route); + if (!AX_simgrid_parse_route_dst) FAIL("Required attribute `dst' not set for `route' element."); + if (!AX_simgrid_parse_route_src) FAIL("Required attribute `src' not set for `route' element."); + LEAVE; STag_simgrid_parse_route();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_route); } YY_BREAK case 500: YY_RULE_SETUP { - if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element."); - if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element."); - LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_route_dst) FAIL("Required attribute `dst' not set for `route' element."); + if (!AX_simgrid_parse_route_src) FAIL("Required attribute `src' not set for `route' element."); + LEAVE; STag_simgrid_parse_route(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_route(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_16); break; - case S_surfxml_zone: case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_16); break; } } YY_BREAK @@ -10100,7 +10100,7 @@ case 502: YY_RULE_SETUP FAIL("Bad attribute `%s' in `route' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_route): +case YY_STATE_EOF(AL_simgrid_parse_route): FAIL("EOF in attribute list of `route' element."); YY_BREAK @@ -10109,11 +10109,11 @@ case 503: YY_RULE_SETUP { LEAVE; - ETag_surfxml_route(); + ETag_simgrid_parse_route(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_16); break; - case S_surfxml_zone: case S_surfxml_zone_12: case S_surfxml_zone_14: case S_surfxml_zone_15: case S_surfxml_zone_16: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_16); break; } } YY_BREAK @@ -10126,9 +10126,9 @@ case 505: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_route): -case YY_STATE_EOF(S_surfxml_route): -case YY_STATE_EOF(S_surfxml_route_2): +case YY_STATE_EOF(E_simgrid_parse_route): +case YY_STATE_EOF(S_simgrid_parse_route): +case YY_STATE_EOF(S_simgrid_parse_route_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10141,49 +10141,49 @@ case 507: /* rule 507 can match eol */ YY_RULE_SETUP { - AX_surfxml_router_coordinates = 0; - surfxml_router_coordinates_isset = 0; - AX_surfxml_router_id = 0; - surfxml_router_id_isset = 0; - ENTER(AL_surfxml_router); pushbuffer(0); + AX_simgrid_parse_router_coordinates = 0; + simgrid_parse_router_coordinates_isset = 0; + AX_simgrid_parse_router_id = 0; + simgrid_parse_router_id_isset = 0; + ENTER(AL_simgrid_parse_router); pushbuffer(0); } YY_BREAK case 508: /* rule 508 can match eol */ YY_RULE_SETUP -if (surfxml_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_router_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates); +if (simgrid_parse_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_router_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_router_coordinates); YY_BREAK case 509: /* rule 509 can match eol */ YY_RULE_SETUP -if (surfxml_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} surfxml_router_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates); +if (simgrid_parse_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in ");} simgrid_parse_router_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_router_coordinates); YY_BREAK case 510: /* rule 510 can match eol */ YY_RULE_SETUP -if (surfxml_router_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_router_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id); +if (simgrid_parse_router_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_router_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_router_id); YY_BREAK case 511: /* rule 511 can match eol */ YY_RULE_SETUP -if (surfxml_router_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_router_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id); +if (simgrid_parse_router_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_router_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_router_id); YY_BREAK case 512: YY_RULE_SETUP { - if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element."); - LEAVE; STag_surfxml_router();surfxml_pcdata_ix = 0; ENTER(E_surfxml_router); + if (!AX_simgrid_parse_router_id) FAIL("Required attribute `id' not set for `router' element."); + LEAVE; STag_simgrid_parse_router();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_router); } YY_BREAK case 513: YY_RULE_SETUP { - if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element."); - LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_router_id) FAIL("Required attribute `id' not set for `router' element."); + LEAVE; STag_simgrid_parse_router(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_router(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10195,7 +10195,7 @@ case 515: YY_RULE_SETUP FAIL("Bad attribute `%s' in `router' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_router): +case YY_STATE_EOF(AL_simgrid_parse_router): FAIL("EOF in attribute list of `router' element."); YY_BREAK @@ -10204,11 +10204,11 @@ case 516: YY_RULE_SETUP { LEAVE; - ETag_surfxml_router(); + ETag_simgrid_parse_router(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10221,7 +10221,7 @@ case 518: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_router): +case YY_STATE_EOF(E_simgrid_parse_router): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10234,77 +10234,77 @@ case 520: /* rule 520 can match eol */ YY_RULE_SETUP { - AX_surfxml_storage_attach = 0; - surfxml_storage_attach_isset = 0; - AX_surfxml_storage_content = 0; - surfxml_storage_content_isset = 0; - AX_surfxml_storage_id = 0; - surfxml_storage_id_isset = 0; - AX_surfxml_storage_typeId = 0; - surfxml_storage_typeId_isset = 0; - ENTER(AL_surfxml_storage); pushbuffer(0); + AX_simgrid_parse_storage_attach = 0; + simgrid_parse_storage_attach_isset = 0; + AX_simgrid_parse_storage_content = 0; + simgrid_parse_storage_content_isset = 0; + AX_simgrid_parse_storage_id = 0; + simgrid_parse_storage_id_isset = 0; + AX_simgrid_parse_storage_typeId = 0; + simgrid_parse_storage_typeId_isset = 0; + ENTER(AL_simgrid_parse_storage); pushbuffer(0); } YY_BREAK case 521: /* rule 521 can match eol */ YY_RULE_SETUP -if (surfxml_storage_attach_isset != 0) {FAIL("Multiple definition of attribute attach in ");} surfxml_storage_attach_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_attach); +if (simgrid_parse_storage_attach_isset != 0) {FAIL("Multiple definition of attribute attach in ");} simgrid_parse_storage_attach_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage_attach); YY_BREAK case 522: /* rule 522 can match eol */ YY_RULE_SETUP -if (surfxml_storage_attach_isset != 0) {FAIL("Multiple definition of attribute attach in ");} surfxml_storage_attach_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_attach); +if (simgrid_parse_storage_attach_isset != 0) {FAIL("Multiple definition of attribute attach in ");} simgrid_parse_storage_attach_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage_attach); YY_BREAK case 523: /* rule 523 can match eol */ YY_RULE_SETUP -if (surfxml_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} surfxml_storage_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_content); +if (simgrid_parse_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} simgrid_parse_storage_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage_content); YY_BREAK case 524: /* rule 524 can match eol */ YY_RULE_SETUP -if (surfxml_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} surfxml_storage_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_content); +if (simgrid_parse_storage_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} simgrid_parse_storage_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage_content); YY_BREAK case 525: /* rule 525 can match eol */ YY_RULE_SETUP -if (surfxml_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_storage_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_id); +if (simgrid_parse_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_storage_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage_id); YY_BREAK case 526: /* rule 526 can match eol */ YY_RULE_SETUP -if (surfxml_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_storage_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_id); +if (simgrid_parse_storage_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_storage_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage_id); YY_BREAK case 527: /* rule 527 can match eol */ YY_RULE_SETUP -if (surfxml_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in ");} surfxml_storage_typeId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage_typeId); +if (simgrid_parse_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in ");} simgrid_parse_storage_typeId_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage_typeId); YY_BREAK case 528: /* rule 528 can match eol */ YY_RULE_SETUP -if (surfxml_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in ");} surfxml_storage_typeId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage_typeId); +if (simgrid_parse_storage_typeId_isset != 0) {FAIL("Multiple definition of attribute typeId in ");} simgrid_parse_storage_typeId_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage_typeId); YY_BREAK case 529: YY_RULE_SETUP { - if (!AX_surfxml_storage_attach) FAIL("Required attribute `attach' not set for `storage' element."); - if (!AX_surfxml_storage_id) FAIL("Required attribute `id' not set for `storage' element."); - if (!AX_surfxml_storage_typeId) FAIL("Required attribute `typeId' not set for `storage' element."); - LEAVE; STag_surfxml_storage();surfxml_pcdata_ix = 0; ENTER(S_surfxml_storage); + if (!AX_simgrid_parse_storage_attach) FAIL("Required attribute `attach' not set for `storage' element."); + if (!AX_simgrid_parse_storage_id) FAIL("Required attribute `id' not set for `storage' element."); + if (!AX_simgrid_parse_storage_typeId) FAIL("Required attribute `typeId' not set for `storage' element."); + LEAVE; STag_simgrid_parse_storage();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_storage); } YY_BREAK case 530: YY_RULE_SETUP { - if (!AX_surfxml_storage_attach) FAIL("Required attribute `attach' not set for `storage' element."); - if (!AX_surfxml_storage_id) FAIL("Required attribute `id' not set for `storage' element."); - if (!AX_surfxml_storage_typeId) FAIL("Required attribute `typeId' not set for `storage' element."); - LEAVE; STag_surfxml_storage(); surfxml_pcdata_ix = 0; ETag_surfxml_storage(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_storage_attach) FAIL("Required attribute `attach' not set for `storage' element."); + if (!AX_simgrid_parse_storage_id) FAIL("Required attribute `id' not set for `storage' element."); + if (!AX_simgrid_parse_storage_typeId) FAIL("Required attribute `typeId' not set for `storage' element."); + LEAVE; STag_simgrid_parse_storage(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_storage(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10316,7 +10316,7 @@ case 532: YY_RULE_SETUP FAIL("Bad attribute `%s' in `storage' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_storage): +case YY_STATE_EOF(AL_simgrid_parse_storage): FAIL("EOF in attribute list of `storage' element."); YY_BREAK @@ -10325,11 +10325,11 @@ case 533: YY_RULE_SETUP { LEAVE; - ETag_surfxml_storage(); + ETag_simgrid_parse_storage(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10342,9 +10342,9 @@ case 535: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_storage): -case YY_STATE_EOF(S_surfxml_storage): -case YY_STATE_EOF(S_surfxml_storage_2): +case YY_STATE_EOF(E_simgrid_parse_storage): +case YY_STATE_EOF(S_simgrid_parse_storage): +case YY_STATE_EOF(S_simgrid_parse_storage_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10358,75 +10358,75 @@ case 537: /* rule 537 can match eol */ YY_RULE_SETUP { - AX_surfxml_storage___type_content = 0; - surfxml_storage___type_content_isset = 0; - AX_surfxml_storage___type_id = 0; - surfxml_storage___type_id_isset = 0; - AX_surfxml_storage___type_model = 16; - surfxml_storage___type_model_isset = 0; - AX_surfxml_storage___type_size = 0; - surfxml_storage___type_size_isset = 0; - ENTER(AL_surfxml_storage___type); pushbuffer(0); + AX_simgrid_parse_storage___type_content = 0; + simgrid_parse_storage___type_content_isset = 0; + AX_simgrid_parse_storage___type_id = 0; + simgrid_parse_storage___type_id_isset = 0; + AX_simgrid_parse_storage___type_model = 16; + simgrid_parse_storage___type_model_isset = 0; + AX_simgrid_parse_storage___type_size = 0; + simgrid_parse_storage___type_size_isset = 0; + ENTER(AL_simgrid_parse_storage___type); pushbuffer(0); } YY_BREAK case 538: /* rule 538 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} surfxml_storage___type_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_content); +if (simgrid_parse_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} simgrid_parse_storage___type_content_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage___type_content); YY_BREAK case 539: /* rule 539 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} surfxml_storage___type_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_content); +if (simgrid_parse_storage___type_content_isset != 0) {FAIL("Multiple definition of attribute content in ");} simgrid_parse_storage___type_content_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage___type_content); YY_BREAK case 540: /* rule 540 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_storage___type_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_id); +if (simgrid_parse_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_storage___type_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage___type_id); YY_BREAK case 541: /* rule 541 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_storage___type_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_id); +if (simgrid_parse_storage___type_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_storage___type_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage___type_id); YY_BREAK case 542: /* rule 542 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in ");} surfxml_storage___type_model_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_model); +if (simgrid_parse_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in ");} simgrid_parse_storage___type_model_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage___type_model); YY_BREAK case 543: /* rule 543 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in ");} surfxml_storage___type_model_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_model); +if (simgrid_parse_storage___type_model_isset != 0) {FAIL("Multiple definition of attribute model in ");} simgrid_parse_storage___type_model_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage___type_model); YY_BREAK case 544: /* rule 544 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in ");} surfxml_storage___type_size_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_storage___type_size); +if (simgrid_parse_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in ");} simgrid_parse_storage___type_size_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_storage___type_size); YY_BREAK case 545: /* rule 545 can match eol */ YY_RULE_SETUP -if (surfxml_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in ");} surfxml_storage___type_size_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_storage___type_size); +if (simgrid_parse_storage___type_size_isset != 0) {FAIL("Multiple definition of attribute size in ");} simgrid_parse_storage___type_size_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_storage___type_size); YY_BREAK case 546: YY_RULE_SETUP { - if (!AX_surfxml_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element."); - if (!AX_surfxml_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element."); - LEAVE; STag_surfxml_storage___type();surfxml_pcdata_ix = 0; ENTER(S_surfxml_storage___type); + if (!AX_simgrid_parse_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element."); + if (!AX_simgrid_parse_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element."); + LEAVE; STag_simgrid_parse_storage___type();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_storage___type); } YY_BREAK case 547: YY_RULE_SETUP { - if (!AX_surfxml_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element."); - if (!AX_surfxml_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element."); - LEAVE; STag_surfxml_storage___type(); surfxml_pcdata_ix = 0; ETag_surfxml_storage___type(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_storage___type_id) FAIL("Required attribute `id' not set for `storage_type' element."); + if (!AX_simgrid_parse_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element."); + LEAVE; STag_simgrid_parse_storage___type(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_storage___type(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10438,7 +10438,7 @@ case 549: YY_RULE_SETUP FAIL("Bad attribute `%s' in `storage_type' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_storage___type): +case YY_STATE_EOF(AL_simgrid_parse_storage___type): FAIL("EOF in attribute list of `storage_type' element."); YY_BREAK @@ -10447,11 +10447,11 @@ case 550: YY_RULE_SETUP { LEAVE; - ETag_surfxml_storage___type(); + ETag_simgrid_parse_storage___type(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break; - case S_surfxml_zone: case S_surfxml_zone_13: case S_surfxml_zone_14: case S_surfxml_zone_1: case S_surfxml_zone_3: SET(S_surfxml_zone_14); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break; } } YY_BREAK @@ -10464,9 +10464,9 @@ case 552: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_storage___type): -case YY_STATE_EOF(S_surfxml_storage___type): -case YY_STATE_EOF(S_surfxml_storage___type_2): +case YY_STATE_EOF(E_simgrid_parse_storage___type): +case YY_STATE_EOF(S_simgrid_parse_storage___type): +case YY_STATE_EOF(S_simgrid_parse_storage___type_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10479,73 +10479,73 @@ case 554: /* rule 554 can match eol */ YY_RULE_SETUP { - AX_surfxml_trace_file = 0; - surfxml_trace_file_isset = 0; - AX_surfxml_trace_id = 0; - surfxml_trace_id_isset = 0; - AX_surfxml_trace_periodicity = 0; - surfxml_trace_periodicity_isset = 0; - ENTER(AL_surfxml_trace); pushbuffer(0); + AX_simgrid_parse_trace_file = 0; + simgrid_parse_trace_file_isset = 0; + AX_simgrid_parse_trace_id = 0; + simgrid_parse_trace_id_isset = 0; + AX_simgrid_parse_trace_periodicity = 0; + simgrid_parse_trace_periodicity_isset = 0; + ENTER(AL_simgrid_parse_trace); pushbuffer(0); } YY_BREAK case 555: /* rule 555 can match eol */ YY_RULE_SETUP -if (surfxml_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} surfxml_trace_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file); +if (simgrid_parse_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} simgrid_parse_trace_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_trace_file); YY_BREAK case 556: /* rule 556 can match eol */ YY_RULE_SETUP -if (surfxml_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} surfxml_trace_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file); +if (simgrid_parse_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in ");} simgrid_parse_trace_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_trace_file); YY_BREAK case 557: /* rule 557 can match eol */ YY_RULE_SETUP -if (surfxml_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_trace_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id); +if (simgrid_parse_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_trace_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_trace_id); YY_BREAK case 558: /* rule 558 can match eol */ YY_RULE_SETUP -if (surfxml_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_trace_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id); +if (simgrid_parse_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_trace_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_trace_id); YY_BREAK case 559: /* rule 559 can match eol */ YY_RULE_SETUP -if (surfxml_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in ");} surfxml_trace_periodicity_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity); +if (simgrid_parse_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in ");} simgrid_parse_trace_periodicity_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_trace_periodicity); YY_BREAK case 560: /* rule 560 can match eol */ YY_RULE_SETUP -if (surfxml_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in ");} surfxml_trace_periodicity_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity); +if (simgrid_parse_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in ");} simgrid_parse_trace_periodicity_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_trace_periodicity); YY_BREAK case 561: YY_RULE_SETUP { - if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element."); - if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element."); - LEAVE; STag_surfxml_trace();pushbuffer(surfxml_pcdata_ix); BUFFERSET(surfxml_pcdata_ix);; ENTER(IN_trace); + if (!AX_simgrid_parse_trace_id) FAIL("Required attribute `id' not set for `trace' element."); + if (!AX_simgrid_parse_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element."); + LEAVE; STag_simgrid_parse_trace();pushbuffer(simgrid_parse_pcdata_ix); BUFFERSET(simgrid_parse_pcdata_ix);; ENTER(IN_trace); } YY_BREAK case 562: YY_RULE_SETUP { - if (!AX_surfxml_trace_id) FAIL("Required attribute `id' not set for `trace' element."); - if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element."); - LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_trace_id) FAIL("Required attribute `id' not set for `trace' element."); + if (!AX_simgrid_parse_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element."); + LEAVE; STag_simgrid_parse_trace(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_trace(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break; - case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break; - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break; - case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break; - case S_surfxml_zone_5: SET(S_surfxml_zone_6); break; - case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break; + case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break; + case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -10557,7 +10557,7 @@ case 564: YY_RULE_SETUP FAIL("Bad attribute `%s' in `trace' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_trace): +case YY_STATE_EOF(AL_simgrid_parse_trace): FAIL("EOF in attribute list of `trace' element."); YY_BREAK @@ -10567,22 +10567,22 @@ YY_RULE_SETUP { LEAVE; BUFFERDONE; - ETag_surfxml_trace(); - surfxml_pcdata_ix = popbuffer(); + ETag_simgrid_parse_trace(); + simgrid_parse_pcdata_ix = popbuffer(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break; - case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break; - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break; - case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break; - case S_surfxml_zone_5: SET(S_surfxml_zone_6); break; - case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break; + case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break; + case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -10604,98 +10604,98 @@ case 568: /* rule 568 can match eol */ YY_RULE_SETUP { - AX_surfxml_trace___connect_element = 0; - surfxml_trace___connect_element_isset = 0; - AX_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_HOST___AVAIL; - surfxml_trace___connect_kind_isset = 0; - AX_surfxml_trace___connect_trace = 0; - surfxml_trace___connect_trace_isset = 0; - ENTER(AL_surfxml_trace___connect); pushbuffer(0); + AX_simgrid_parse_trace___connect_element = 0; + simgrid_parse_trace___connect_element_isset = 0; + AX_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_HOST___AVAIL; + simgrid_parse_trace___connect_kind_isset = 0; + AX_simgrid_parse_trace___connect_trace = 0; + simgrid_parse_trace___connect_trace_isset = 0; + ENTER(AL_simgrid_parse_trace___connect); pushbuffer(0); } YY_BREAK case 569: /* rule 569 can match eol */ YY_RULE_SETUP -if (surfxml_trace___connect_element_isset != 0) {FAIL("Multiple definition of attribute element in ");} surfxml_trace___connect_element_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace___connect_element); +if (simgrid_parse_trace___connect_element_isset != 0) {FAIL("Multiple definition of attribute element in ");} simgrid_parse_trace___connect_element_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_trace___connect_element); YY_BREAK case 570: /* rule 570 can match eol */ YY_RULE_SETUP -if (surfxml_trace___connect_element_isset != 0) {FAIL("Multiple definition of attribute element in ");} surfxml_trace___connect_element_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace___connect_element); +if (simgrid_parse_trace___connect_element_isset != 0) {FAIL("Multiple definition of attribute element in ");} simgrid_parse_trace___connect_element_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_trace___connect_element); YY_BREAK case 571: /* rule 571 can match eol */ case 572: /* rule 572 can match eol */ YY_RULE_SETUP -A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_HOST___AVAIL; +A_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_HOST___AVAIL; YY_BREAK case 573: /* rule 573 can match eol */ case 574: /* rule 574 can match eol */ YY_RULE_SETUP -A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_SPEED; +A_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_SPEED; YY_BREAK case 575: /* rule 575 can match eol */ case 576: /* rule 576 can match eol */ YY_RULE_SETUP -A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_LINK___AVAIL; +A_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_LINK___AVAIL; YY_BREAK case 577: /* rule 577 can match eol */ case 578: /* rule 578 can match eol */ YY_RULE_SETUP -A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_BANDWIDTH; +A_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_BANDWIDTH; YY_BREAK case 579: /* rule 579 can match eol */ case 580: /* rule 580 can match eol */ YY_RULE_SETUP -A_surfxml_trace___connect_kind = A_surfxml_trace___connect_kind_LATENCY; +A_simgrid_parse_trace___connect_kind = A_simgrid_parse_trace___connect_kind_LATENCY; YY_BREAK case 581: /* rule 581 can match eol */ YY_RULE_SETUP -if (surfxml_trace___connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in ");} surfxml_trace___connect_trace_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace___connect_trace); +if (simgrid_parse_trace___connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in ");} simgrid_parse_trace___connect_trace_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_trace___connect_trace); YY_BREAK case 582: /* rule 582 can match eol */ YY_RULE_SETUP -if (surfxml_trace___connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in ");} surfxml_trace___connect_trace_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace___connect_trace); +if (simgrid_parse_trace___connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in ");} simgrid_parse_trace___connect_trace_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_trace___connect_trace); YY_BREAK case 583: YY_RULE_SETUP { - if (!AX_surfxml_trace___connect_element) FAIL("Required attribute `element' not set for `trace_connect' element."); - if (!AX_surfxml_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element."); - LEAVE; STag_surfxml_trace___connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace___connect); + if (!AX_simgrid_parse_trace___connect_element) FAIL("Required attribute `element' not set for `trace_connect' element."); + if (!AX_simgrid_parse_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element."); + LEAVE; STag_simgrid_parse_trace___connect();simgrid_parse_pcdata_ix = 0; ENTER(E_simgrid_parse_trace___connect); } YY_BREAK case 584: YY_RULE_SETUP { - if (!AX_surfxml_trace___connect_element) FAIL("Required attribute `element' not set for `trace_connect' element."); - if (!AX_surfxml_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element."); - LEAVE; STag_surfxml_trace___connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace___connect(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_trace___connect_element) FAIL("Required attribute `element' not set for `trace_connect' element."); + if (!AX_simgrid_parse_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element."); + LEAVE; STag_simgrid_parse_trace___connect(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_trace___connect(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break; - case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break; - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break; - case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break; - case S_surfxml_zone_5: SET(S_surfxml_zone_6); break; - case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break; + case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break; + case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -10707,7 +10707,7 @@ case 586: YY_RULE_SETUP FAIL("Bad attribute `%s' in `trace_connect' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_trace___connect): +case YY_STATE_EOF(AL_simgrid_parse_trace___connect): FAIL("EOF in attribute list of `trace_connect' element."); YY_BREAK @@ -10716,21 +10716,21 @@ case 587: YY_RULE_SETUP { LEAVE; - ETag_surfxml_trace___connect(); + ETag_simgrid_parse_trace___connect(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS_10: case S_surfxml_AS_11: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_9: SET(S_surfxml_AS_11); break; - case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break; - case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break; - case S_surfxml_AS_5: SET(S_surfxml_AS_6); break; - case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_10: case S_surfxml_zone_11: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_7: SET(S_surfxml_zone_11); break; - case S_surfxml_zone_13: case S_surfxml_zone_14: SET(S_surfxml_zone_14); break; - case S_surfxml_zone_12: case S_surfxml_zone_15: case S_surfxml_zone_16: SET(S_surfxml_zone_16); break; - case S_surfxml_zone_5: SET(S_surfxml_zone_6); break; - case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break; + case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break; + case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break; + case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break; + case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break; + case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -10743,7 +10743,7 @@ case 589: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_trace___connect): +case YY_STATE_EOF(E_simgrid_parse_trace___connect): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10763,53 +10763,53 @@ case 591: /* rule 591 can match eol */ YY_RULE_SETUP { - AX_surfxml_zone_id = 0; - surfxml_zone_id_isset = 0; - AX_surfxml_zone_routing = 0; - surfxml_zone_routing_isset = 0; - ENTER(AL_surfxml_zone); pushbuffer(0); + AX_simgrid_parse_zone_id = 0; + simgrid_parse_zone_id_isset = 0; + AX_simgrid_parse_zone_routing = 0; + simgrid_parse_zone_routing_isset = 0; + ENTER(AL_simgrid_parse_zone); pushbuffer(0); } YY_BREAK case 592: /* rule 592 can match eol */ YY_RULE_SETUP -if (surfxml_zone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_zone_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zone_id); +if (simgrid_parse_zone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_zone_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zone_id); YY_BREAK case 593: /* rule 593 can match eol */ YY_RULE_SETUP -if (surfxml_zone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} surfxml_zone_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zone_id); +if (simgrid_parse_zone_id_isset != 0) {FAIL("Multiple definition of attribute id in ");} simgrid_parse_zone_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zone_id); YY_BREAK case 594: /* rule 594 can match eol */ YY_RULE_SETUP -if (surfxml_zone_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} surfxml_zone_routing_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zone_routing); +if (simgrid_parse_zone_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} simgrid_parse_zone_routing_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zone_routing); YY_BREAK case 595: /* rule 595 can match eol */ YY_RULE_SETUP -if (surfxml_zone_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} surfxml_zone_routing_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zone_routing); +if (simgrid_parse_zone_routing_isset != 0) {FAIL("Multiple definition of attribute routing in ");} simgrid_parse_zone_routing_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zone_routing); YY_BREAK case 596: YY_RULE_SETUP { - if (!AX_surfxml_zone_id) FAIL("Required attribute `id' not set for `zone' element."); - if (!AX_surfxml_zone_routing) FAIL("Required attribute `routing' not set for `zone' element."); - LEAVE; STag_surfxml_zone();surfxml_pcdata_ix = 0; ENTER(S_surfxml_zone); + if (!AX_simgrid_parse_zone_id) FAIL("Required attribute `id' not set for `zone' element."); + if (!AX_simgrid_parse_zone_routing) FAIL("Required attribute `routing' not set for `zone' element."); + LEAVE; STag_simgrid_parse_zone();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_zone); } YY_BREAK case 597: YY_RULE_SETUP { - if (!AX_surfxml_zone_id) FAIL("Required attribute `id' not set for `zone' element."); - if (!AX_surfxml_zone_routing) FAIL("Required attribute `routing' not set for `zone' element."); - LEAVE; STag_surfxml_zone(); surfxml_pcdata_ix = 0; ETag_surfxml_zone(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_zone_id) FAIL("Required attribute `id' not set for `zone' element."); + if (!AX_simgrid_parse_zone_routing) FAIL("Required attribute `routing' not set for `zone' element."); + LEAVE; STag_simgrid_parse_zone(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_zone(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -10821,7 +10821,7 @@ case 599: YY_RULE_SETUP FAIL("Bad attribute `%s' in `zone' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_zone): +case YY_STATE_EOF(AL_simgrid_parse_zone): FAIL("EOF in attribute list of `zone' element."); YY_BREAK @@ -10830,13 +10830,13 @@ case 600: YY_RULE_SETUP { LEAVE; - ETag_surfxml_zone(); + ETag_simgrid_parse_zone(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break; - case S_surfxml_include: case S_surfxml_include_1: case S_surfxml_include_2: SET(S_surfxml_include_2); break; - case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_5: case S_surfxml_zone_6: SET(S_surfxml_zone_6); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break; + case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break; + case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break; } } YY_BREAK @@ -10849,18 +10849,18 @@ case 602: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_zone): -case YY_STATE_EOF(S_surfxml_zone): -case YY_STATE_EOF(S_surfxml_zone_1): -case YY_STATE_EOF(S_surfxml_zone_11): -case YY_STATE_EOF(S_surfxml_zone_12): -case YY_STATE_EOF(S_surfxml_zone_14): -case YY_STATE_EOF(S_surfxml_zone_16): -case YY_STATE_EOF(S_surfxml_zone_3): -case YY_STATE_EOF(S_surfxml_zone_4): -case YY_STATE_EOF(S_surfxml_zone_6): -case YY_STATE_EOF(S_surfxml_zone_7): -case YY_STATE_EOF(S_surfxml_zone_9): +case YY_STATE_EOF(E_simgrid_parse_zone): +case YY_STATE_EOF(S_simgrid_parse_zone): +case YY_STATE_EOF(S_simgrid_parse_zone_1): +case YY_STATE_EOF(S_simgrid_parse_zone_11): +case YY_STATE_EOF(S_simgrid_parse_zone_12): +case YY_STATE_EOF(S_simgrid_parse_zone_14): +case YY_STATE_EOF(S_simgrid_parse_zone_16): +case YY_STATE_EOF(S_simgrid_parse_zone_3): +case YY_STATE_EOF(S_simgrid_parse_zone_4): +case YY_STATE_EOF(S_simgrid_parse_zone_6): +case YY_STATE_EOF(S_simgrid_parse_zone_7): +case YY_STATE_EOF(S_simgrid_parse_zone_9): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -10873,109 +10873,109 @@ case 604: /* rule 604 can match eol */ YY_RULE_SETUP { - AX_surfxml_zoneRoute_dst = 0; - surfxml_zoneRoute_dst_isset = 0; - AX_surfxml_zoneRoute_gw___dst = 0; - surfxml_zoneRoute_gw___dst_isset = 0; - AX_surfxml_zoneRoute_gw___src = 0; - surfxml_zoneRoute_gw___src_isset = 0; - AX_surfxml_zoneRoute_src = 0; - surfxml_zoneRoute_src_isset = 0; - AX_surfxml_zoneRoute_symmetrical = A_surfxml_zoneRoute_symmetrical_YES; - surfxml_zoneRoute_symmetrical_isset = 0; - ENTER(AL_surfxml_zoneRoute); pushbuffer(0); + AX_simgrid_parse_zoneRoute_dst = 0; + simgrid_parse_zoneRoute_dst_isset = 0; + AX_simgrid_parse_zoneRoute_gw___dst = 0; + simgrid_parse_zoneRoute_gw___dst_isset = 0; + AX_simgrid_parse_zoneRoute_gw___src = 0; + simgrid_parse_zoneRoute_gw___src_isset = 0; + AX_simgrid_parse_zoneRoute_src = 0; + simgrid_parse_zoneRoute_src_isset = 0; + AX_simgrid_parse_zoneRoute_symmetrical = A_simgrid_parse_zoneRoute_symmetrical_YES; + simgrid_parse_zoneRoute_symmetrical_isset = 0; + ENTER(AL_simgrid_parse_zoneRoute); pushbuffer(0); } YY_BREAK case 605: /* rule 605 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_zoneRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zoneRoute_dst); +if (simgrid_parse_zoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_zoneRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zoneRoute_dst); YY_BREAK case 606: /* rule 606 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} surfxml_zoneRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zoneRoute_dst); +if (simgrid_parse_zoneRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in ");} simgrid_parse_zoneRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zoneRoute_dst); YY_BREAK case 607: /* rule 607 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_zoneRoute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zoneRoute_gw___dst); +if (simgrid_parse_zoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_zoneRoute_gw___dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zoneRoute_gw___dst); YY_BREAK case 608: /* rule 608 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} surfxml_zoneRoute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zoneRoute_gw___dst); +if (simgrid_parse_zoneRoute_gw___dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in ");} simgrid_parse_zoneRoute_gw___dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zoneRoute_gw___dst); YY_BREAK case 609: /* rule 609 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_zoneRoute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zoneRoute_gw___src); +if (simgrid_parse_zoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_zoneRoute_gw___src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zoneRoute_gw___src); YY_BREAK case 610: /* rule 610 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} surfxml_zoneRoute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zoneRoute_gw___src); +if (simgrid_parse_zoneRoute_gw___src_isset != 0) {FAIL("Multiple definition of attribute gw_src in ");} simgrid_parse_zoneRoute_gw___src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zoneRoute_gw___src); YY_BREAK case 611: /* rule 611 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_zoneRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_zoneRoute_src); +if (simgrid_parse_zoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_zoneRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_simgrid_parse_zoneRoute_src); YY_BREAK case 612: /* rule 612 can match eol */ YY_RULE_SETUP -if (surfxml_zoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} surfxml_zoneRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_zoneRoute_src); +if (simgrid_parse_zoneRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in ");} simgrid_parse_zoneRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_simgrid_parse_zoneRoute_src); YY_BREAK case 613: /* rule 613 can match eol */ case 614: /* rule 614 can match eol */ YY_RULE_SETUP -A_surfxml_zoneRoute_symmetrical = A_surfxml_zoneRoute_symmetrical_YES; +A_simgrid_parse_zoneRoute_symmetrical = A_simgrid_parse_zoneRoute_symmetrical_YES; YY_BREAK case 615: /* rule 615 can match eol */ case 616: /* rule 616 can match eol */ YY_RULE_SETUP -A_surfxml_zoneRoute_symmetrical = A_surfxml_zoneRoute_symmetrical_NO; +A_simgrid_parse_zoneRoute_symmetrical = A_simgrid_parse_zoneRoute_symmetrical_NO; YY_BREAK case 617: /* rule 617 can match eol */ case 618: /* rule 618 can match eol */ YY_RULE_SETUP -A_surfxml_zoneRoute_symmetrical = A_surfxml_zoneRoute_symmetrical_yes; +A_simgrid_parse_zoneRoute_symmetrical = A_simgrid_parse_zoneRoute_symmetrical_yes; YY_BREAK case 619: /* rule 619 can match eol */ case 620: /* rule 620 can match eol */ YY_RULE_SETUP -A_surfxml_zoneRoute_symmetrical = A_surfxml_zoneRoute_symmetrical_no; +A_simgrid_parse_zoneRoute_symmetrical = A_simgrid_parse_zoneRoute_symmetrical_no; YY_BREAK case 621: YY_RULE_SETUP { - if (!AX_surfxml_zoneRoute_dst) FAIL("Required attribute `dst' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_src) FAIL("Required attribute `src' not set for `zoneRoute' element."); - LEAVE; STag_surfxml_zoneRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_zoneRoute); + if (!AX_simgrid_parse_zoneRoute_dst) FAIL("Required attribute `dst' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_src) FAIL("Required attribute `src' not set for `zoneRoute' element."); + LEAVE; STag_simgrid_parse_zoneRoute();simgrid_parse_pcdata_ix = 0; ENTER(S_simgrid_parse_zoneRoute); } YY_BREAK case 622: YY_RULE_SETUP { - if (!AX_surfxml_zoneRoute_dst) FAIL("Required attribute `dst' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `zoneRoute' element."); - if (!AX_surfxml_zoneRoute_src) FAIL("Required attribute `src' not set for `zoneRoute' element."); - LEAVE; STag_surfxml_zoneRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_zoneRoute(); popbuffer(); /* attribute */ + if (!AX_simgrid_parse_zoneRoute_dst) FAIL("Required attribute `dst' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_gw___dst) FAIL("Required attribute `gw_dst' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_gw___src) FAIL("Required attribute `gw_src' not set for `zoneRoute' element."); + if (!AX_simgrid_parse_zoneRoute_src) FAIL("Required attribute `src' not set for `zoneRoute' element."); + LEAVE; STag_simgrid_parse_zoneRoute(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_zoneRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -10987,7 +10987,7 @@ case 624: YY_RULE_SETUP FAIL("Bad attribute `%s' in `zoneRoute' element start tag.",yytext); YY_BREAK -case YY_STATE_EOF(AL_surfxml_zoneRoute): +case YY_STATE_EOF(AL_simgrid_parse_zoneRoute): FAIL("EOF in attribute list of `zoneRoute' element."); YY_BREAK @@ -10996,11 +10996,11 @@ case 625: YY_RULE_SETUP { LEAVE; - ETag_surfxml_zoneRoute(); + ETag_simgrid_parse_zoneRoute(); popbuffer(); /* attribute */ switch (YY_START) { - case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break; - case S_surfxml_zone: case S_surfxml_zone_1: case S_surfxml_zone_3: case S_surfxml_zone_4: case S_surfxml_zone_6: case S_surfxml_zone_8: case S_surfxml_zone_9: SET(S_surfxml_zone_9); break; + case S_simgrid_parse_AS: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_8: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_9); break; + case S_simgrid_parse_zone: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break; } } YY_BREAK @@ -11013,9 +11013,9 @@ case 627: YY_RULE_SETUP FAIL("Unexpected character `%c': `' expected.",yytext[0]); YY_BREAK -case YY_STATE_EOF(E_surfxml_zoneRoute): -case YY_STATE_EOF(S_surfxml_zoneRoute): -case YY_STATE_EOF(S_surfxml_zoneRoute_2): +case YY_STATE_EOF(E_simgrid_parse_zoneRoute): +case YY_STATE_EOF(S_simgrid_parse_zoneRoute): +case YY_STATE_EOF(S_simgrid_parse_zoneRoute_2): FAIL("Premature EOF: `' expected."); YY_BREAK @@ -11137,38 +11137,38 @@ YY_RULE_SETUP ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(S_surfxml_AS_2): -case YY_STATE_EOF(S_surfxml_AS_5): -case YY_STATE_EOF(S_surfxml_AS_8): -case YY_STATE_EOF(S_surfxml_AS_10): -case YY_STATE_EOF(S_surfxml_AS_13): -case YY_STATE_EOF(S_surfxml_AS_15): -case YY_STATE_EOF(S_surfxml_ASroute_1): -case YY_STATE_EOF(S_surfxml_actor_1): -case YY_STATE_EOF(S_surfxml_bypassASroute_1): -case YY_STATE_EOF(S_surfxml_bypassRoute_1): -case YY_STATE_EOF(S_surfxml_bypassZoneRoute_1): -case YY_STATE_EOF(S_surfxml_cluster_1): -case YY_STATE_EOF(S_surfxml_config_1): -case YY_STATE_EOF(S_surfxml_disk_1): -case YY_STATE_EOF(S_surfxml_host_1): -case YY_STATE_EOF(S_surfxml_include_1): -case YY_STATE_EOF(S_surfxml_link_1): -case YY_STATE_EOF(ROOT_surfxml_platform): -case YY_STATE_EOF(S_surfxml_platform_2): -case YY_STATE_EOF(S_surfxml_platform_5): -case YY_STATE_EOF(S_surfxml_platform_7): -case YY_STATE_EOF(S_surfxml_process_1): -case YY_STATE_EOF(S_surfxml_route_1): -case YY_STATE_EOF(S_surfxml_storage_1): -case YY_STATE_EOF(S_surfxml_storage___type_1): -case YY_STATE_EOF(S_surfxml_zone_2): -case YY_STATE_EOF(S_surfxml_zone_5): -case YY_STATE_EOF(S_surfxml_zone_8): -case YY_STATE_EOF(S_surfxml_zone_10): -case YY_STATE_EOF(S_surfxml_zone_13): -case YY_STATE_EOF(S_surfxml_zone_15): -case YY_STATE_EOF(S_surfxml_zoneRoute_1): +case YY_STATE_EOF(S_simgrid_parse_AS_2): +case YY_STATE_EOF(S_simgrid_parse_AS_5): +case YY_STATE_EOF(S_simgrid_parse_AS_8): +case YY_STATE_EOF(S_simgrid_parse_AS_10): +case YY_STATE_EOF(S_simgrid_parse_AS_13): +case YY_STATE_EOF(S_simgrid_parse_AS_15): +case YY_STATE_EOF(S_simgrid_parse_ASroute_1): +case YY_STATE_EOF(S_simgrid_parse_actor_1): +case YY_STATE_EOF(S_simgrid_parse_bypassASroute_1): +case YY_STATE_EOF(S_simgrid_parse_bypassRoute_1): +case YY_STATE_EOF(S_simgrid_parse_bypassZoneRoute_1): +case YY_STATE_EOF(S_simgrid_parse_cluster_1): +case YY_STATE_EOF(S_simgrid_parse_config_1): +case YY_STATE_EOF(S_simgrid_parse_disk_1): +case YY_STATE_EOF(S_simgrid_parse_host_1): +case YY_STATE_EOF(S_simgrid_parse_include_1): +case YY_STATE_EOF(S_simgrid_parse_link_1): +case YY_STATE_EOF(ROOT_simgrid_parse_platform): +case YY_STATE_EOF(S_simgrid_parse_platform_2): +case YY_STATE_EOF(S_simgrid_parse_platform_5): +case YY_STATE_EOF(S_simgrid_parse_platform_7): +case YY_STATE_EOF(S_simgrid_parse_process_1): +case YY_STATE_EOF(S_simgrid_parse_route_1): +case YY_STATE_EOF(S_simgrid_parse_storage_1): +case YY_STATE_EOF(S_simgrid_parse_storage___type_1): +case YY_STATE_EOF(S_simgrid_parse_zone_2): +case YY_STATE_EOF(S_simgrid_parse_zone_5): +case YY_STATE_EOF(S_simgrid_parse_zone_8): +case YY_STATE_EOF(S_simgrid_parse_zone_10): +case YY_STATE_EOF(S_simgrid_parse_zone_13): +case YY_STATE_EOF(S_simgrid_parse_zone_15): +case YY_STATE_EOF(S_simgrid_parse_zoneRoute_1): case YY_STATE_EOF(IMPOSSIBLE): yyterminate(); @@ -12186,7 +12186,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" /* Element context stack lookup. */ -int surfxml_element_context(int i) +int simgrid_parse_element_context(int i) { return (0& whereto) const // <----- send ACTORS_STATUS_REPLY // <----- send `N` `s_mc_message_actors_status_one_t` structs // <----- send `M` `s_mc_message_simcall_probe_one_t` structs - s_mc_message_t msg; - memset(&msg, 0, sizeof msg); - msg.type = simgrid::mc::MessageType::ACTORS_STATUS; - model_checker_->channel().send(msg); + model_checker_->channel().send(MessageType::ACTORS_STATUS); s_mc_message_actors_status_answer_t answer; ssize_t received = model_checker_->channel().receive(answer); @@ -182,31 +179,44 @@ void RemoteApp::get_actors_status(std::map& whereto) const to_c_str(answer.type), (int)answer.type, (int)received, (int)MessageType::ACTORS_STATUS_REPLY, (int)sizeof(answer)); + // Message sanity checks + xbt_assert(answer.count >= 0, "Received an ACTOR_STATUS_REPLY message with an actor count of '%d' < 0", answer.count); + xbt_assert(answer.transition_count >= 0, "Received an ACTOR_STATUS_REPLY message with transition_count '%d' < 0", + answer.transition_count); + xbt_assert(answer.transition_count == 0 || answer.count >= 0, + "Received an ACTOR_STATUS_REPLY message with no actor data " + "but with transition data nonetheless"); + std::vector status(answer.count); if (answer.count > 0) { - size_t size = status.size() * sizeof(s_mc_message_actors_status_one_t); - received = model_checker_->channel().receive(status.data(), size); - xbt_assert(static_cast(received) == size); - } - - std::vector action_pool(answer.transition_count); - if (answer.transition_count > 0) { - size_t size = action_pool.size() * sizeof(s_mc_message_simcall_probe_one_t); - received = model_checker_->channel().receive(action_pool.data(), size); + size_t size = status.size() * sizeof(s_mc_message_actors_status_one_t); + ssize_t received = model_checker_->channel().receive(status.data(), size); xbt_assert(static_cast(received) == size); } - // Ensures that each actor sends precisely `actor.max_considered` transitions. While technically + // Ensures that each actor sends precisely `answer.transition_count` transitions. While technically // this doesn't catch the edge case where actor A sends 3 instead of 2 and actor B sends 2 instead // of 3 transitions, that is ignored here since that invariant needs to be enforced on the AppSide const auto expected_transitions = std::accumulate( status.begin(), status.end(), 0, [](int total, const auto& actor) { return total + actor.n_transitions; }); - xbt_assert(expected_transitions == static_cast(action_pool.size()), - "Expected to receive %d transition(s) but was only notified of %lu by the app side", expected_transitions, - action_pool.size()); + xbt_assert(expected_transitions == answer.transition_count, + "Expected to receive %d transition(s) but was only notified of %d by the app side", expected_transitions, + answer.transition_count); + + std::vector probes(answer.transition_count); + if (answer.transition_count > 0) { + for (auto& probe : probes) { + size_t size = sizeof(s_mc_message_simcall_probe_one_t); + ssize_t received = model_checker_->channel().receive(&probe, size); + xbt_assert(received >= 0, "Could not receive response to ACTORS_PROBE message (%s)", strerror(errno)); + xbt_assert(static_cast(received) == size, + "Could not receive response to ACTORS_PROBE message (%zd bytes received != %zu bytes expected", + received, size); + } + } whereto.clear(); - auto action_pool_iter = std::move_iterator(action_pool.begin()); + auto probes_iter = std::move_iterator(probes.begin()); for (const auto& actor : status) { xbt_assert(actor.n_transitions == 0 || actor.n_transitions == actor.max_considered, @@ -216,8 +226,8 @@ void RemoteApp::get_actors_status(std::map& whereto) const actor.max_considered, actor.n_transitions); auto actor_transitions = std::vector>(actor.n_transitions); - for (int times_considered = 0; times_considered < actor.n_transitions; times_considered++, action_pool_iter++) { - std::stringstream stream((*action_pool_iter).buffer.data()); + for (int times_considered = 0; times_considered < actor.n_transitions; times_considered++, probes_iter++) { + std::stringstream stream((*probes_iter).buffer.data()); auto transition = std::unique_ptr(deserialize_transition(actor.aid, times_considered, stream)); actor_transitions[times_considered] = std::move(transition); } diff --git a/src/mc/api/State.cpp b/src/mc/api/State.cpp index 36535b1f38..98c229f7ad 100644 --- a/src/mc/api/State.cpp +++ b/src/mc/api/State.cpp @@ -14,12 +14,10 @@ namespace simgrid::mc { long State::expended_states_ = 0; -State::State(const RemoteApp& remote_app) : default_transition(std::make_unique()), num_(++expended_states_) +State::State(const RemoteApp& remote_app) : num_(++expended_states_) { remote_app.get_actors_status(actors_to_run_); - transition_ = default_transition.get(); - /* Stateful model checking */ if ((_sg_mc_checkpoint > 0 && (num_ % _sg_mc_checkpoint == 0)) || _sg_mc_termination) { system_state_ = std::make_shared(num_); @@ -77,10 +75,7 @@ void State::mark_all_todo() Transition* State::get_transition() const { - if (transition_ == nullptr) { - return default_transition.get(); - } - return transition_; + return transition_; } aid_t State::next_transition() const diff --git a/src/mc/api/State.hpp b/src/mc/api/State.hpp index 723a5f11e7..168ee8de44 100644 --- a/src/mc/api/State.hpp +++ b/src/mc/api/State.hpp @@ -17,6 +17,11 @@ namespace simgrid::mc { class XBT_PRIVATE State : public xbt::Extendable { static long expended_states_; /* Count total amount of states, for stats */ + /** + * @brief An empty transition that leads to this state by default + */ + const std::unique_ptr default_transition_ = std::make_unique(); + /** * @brief The outgoing transition: what was the last transition that * we took to leave this state? @@ -25,12 +30,7 @@ class XBT_PRIVATE State : public xbt::Extendable { * or a reference to the internal default transition `Transition()` if no transition has been * set */ - Transition* transition_ = nullptr; - - /** - * @brief An empty transition that leads to this state by default - */ - const std::unique_ptr default_transition; + Transition* transition_ = default_transition_.get(); /** Sequential state ID (used for debugging) */ long num_ = 0; diff --git a/src/include/mc/datatypes.h b/src/mc/datatypes.h similarity index 84% rename from src/include/mc/datatypes.h rename to src/mc/datatypes.h index f0e2f0aec0..faf354b37f 100644 --- a/src/include/mc/datatypes.h +++ b/src/mc/datatypes.h @@ -15,15 +15,15 @@ SG_BEGIN_DECL -struct s_stack_region{ - void *address; +struct s_stack_region { + void* address; #if HAVE_UCONTEXT_H ucontext_t* context; #endif size_t size; int block; }; -typedef struct s_stack_region s_stack_region_t; +typedef struct s_stack_region s_stack_region_t; SG_END_DECL diff --git a/src/mc/explo/simgrid_mc.cpp b/src/mc/explo/simgrid_mc.cpp index b6625d5ccd..00debdc8d7 100644 --- a/src/mc/explo/simgrid_mc.cpp +++ b/src/mc/explo/simgrid_mc.cpp @@ -3,10 +3,10 @@ /* 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/sg_config.hpp" #include "src/mc/explo/Exploration.hpp" #include "src/mc/mc_config.hpp" #include "src/mc/mc_exit.hpp" +#include "src/simgrid/sg_config.hpp" #if HAVE_SMPI #include "smpi/smpi.h" diff --git a/src/include/mc/mc.h b/src/mc/mc.h similarity index 83% rename from src/include/mc/mc.h rename to src/mc/mc.h index 5784e5a49d..017b09ee53 100644 --- a/src/include/mc/mc.h +++ b/src/mc/mc.h @@ -7,7 +7,7 @@ #define MC_MC_H #include -#include /* our public interface (and definition of SIMGRID_HAVE_MC) */ +#include /* our public interface */ #ifdef __cplusplus XBT_PUBLIC void MC_process_clock_add(const simgrid::kernel::actor::ActorImpl*, double); diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index e9812f0341..64a2ae63a7 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -4,11 +4,11 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/mc/mc_base.hpp" -#include "mc/mc.h" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/activity/MutexImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" #if SIMGRID_HAVE_MC diff --git a/src/mc/mc_config.cpp b/src/mc/mc_config.cpp index 6b6ea8b919..b4900fe947 100644 --- a/src/mc/mc_config.cpp +++ b/src/mc/mc_config.cpp @@ -5,8 +5,8 @@ #include "src/mc/mc_config.hpp" #include "src/mc/mc_replay.hpp" +#include "src/simgrid/sg_config.hpp" #include -#include #if SIMGRID_HAVE_MC #include diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index ae7c449bf6..bc444ffb5a 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -3,8 +3,8 @@ /* 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 "mc/mc.h" #include "src/kernel/actor/ActorImpl.hpp" +#include "src/mc/mc.h" #if SIMGRID_HAVE_MC #include "src/mc/api/RemoteApp.hpp" diff --git a/src/mc/mc_private.hpp b/src/mc/mc_private.hpp index 3ad2861c90..facb90d12b 100644 --- a/src/mc/mc_private.hpp +++ b/src/mc/mc_private.hpp @@ -6,7 +6,7 @@ #ifndef SIMGRID_MC_PRIVATE_HPP #define SIMGRID_MC_PRIVATE_HPP -#include "mc/mc.h" +#include "src/mc/mc.h" #include "xbt/automaton.h" #include "src/mc/mc_forward.hpp" diff --git a/src/mc/remote/AppSide.cpp b/src/mc/remote/AppSide.cpp index 80e4c5230a..9db7806dc8 100644 --- a/src/mc/remote/AppSide.cpp +++ b/src/mc/remote/AppSide.cpp @@ -16,9 +16,8 @@ #include "src/smpi/include/private.hpp" #endif #include "src/sthread/sthread.h" -#include "xbt/coverage.h" +#include "src/xbt/coverage.h" #include "xbt/str.h" -#include "xbt/xbt_modinter.h" /* mmalloc_preinit to get the default mmalloc arena address */ #include #include @@ -216,10 +215,12 @@ void AppSide::handle_actors_status() const // each SIMCALL_EXECUTE provides a `times_considered` to be used to prepare // the transition before execution. } - - size_t size = probes.size() * sizeof(s_mc_message_simcall_probe_one_t); XBT_DEBUG("Deliver ACTOR_TRANSITION_PROBE payload"); - xbt_assert(channel_.send(probes.data(), size) == 0, "Could not send ACTOR_TRANSITION_PROBE payload"); + + for (const auto& probe : probes) { + size_t size = sizeof(s_mc_message_simcall_probe_one_t); + xbt_assert(channel_.send(&probe, size) == 0, "Could not send ACTOR_TRANSITION_PROBE payload (%zu bytes)", size); + } } } @@ -236,6 +237,8 @@ void AppSide::handle_messages() const ssize_t received_size = channel_.receive(message_buffer.data(), message_buffer.size()); xbt_assert(received_size >= 0, "Could not receive commands from the model-checker"); + xbt_assert(static_cast(received_size) >= sizeof(s_mc_message_t), "Cannot handle short message (size=%zd)", + received_size); const s_mc_message_t* message = (s_mc_message_t*)message_buffer.data(); switch (message->type) { diff --git a/src/mc/remote/Channel.cpp b/src/mc/remote/Channel.cpp index 1d3c38903c..dfd07e5fe1 100644 --- a/src/mc/remote/Channel.cpp +++ b/src/mc/remote/Channel.cpp @@ -33,10 +33,10 @@ int Channel::send(const void* message, size_t size) const } } - if (is_valid_MessageType(*(int*)message)) { - XBT_DEBUG("Sending %s (%lu bytes sent)", to_c_str(*(MessageType*)message), size); + if (is_valid_MessageType(*static_cast(message))) { + XBT_DEBUG("Sending %s (%zu bytes sent)", to_c_str(*static_cast(message)), size); } else { - XBT_DEBUG("Sending bytes directly (from address %p) (%lu bytes sent)", message, size); + XBT_DEBUG("Sending bytes directly (from address %p) (%zu bytes sent)", message, size); } return 0; @@ -46,10 +46,10 @@ ssize_t Channel::receive(void* message, size_t size, bool block) const { ssize_t res = recv(this->socket_, message, size, block ? 0 : MSG_DONTWAIT); if (res != -1) { - if (is_valid_MessageType(*(int*)message)) { - XBT_DEBUG("Receive %s (requested %lu; received %ld)", to_c_str(*(MessageType*)message), size, res); + if (is_valid_MessageType(*static_cast(message))) { + XBT_DEBUG("Receive %s (requested %zu; received %zd)", to_c_str(*static_cast(message)), size, res); } else { - XBT_DEBUG("Receive %ld bytes", res); + XBT_DEBUG("Receive %zd bytes", res); } } else { XBT_ERROR("Channel::receive failure: %s", strerror(errno)); diff --git a/src/mc/remote/RemoteProcess.hpp b/src/mc/remote/RemoteProcess.hpp index 360f52391a..3a6b24eb30 100644 --- a/src/mc/remote/RemoteProcess.hpp +++ b/src/mc/remote/RemoteProcess.hpp @@ -8,8 +8,8 @@ #ifndef SIMGRID_MC_PROCESS_H #define SIMGRID_MC_PROCESS_H -#include "mc/datatypes.h" #include "src/mc/AddressSpace.hpp" +#include "src/mc/datatypes.h" #include "src/mc/inspect/ObjectInformation.hpp" #include "src/mc/remote/RemotePtr.hpp" #include "src/xbt/memory_map.hpp" diff --git a/src/mc/remote/mc_protocol.h b/src/mc/remote/mc_protocol.h index 156e3c7173..8636b5c2d5 100644 --- a/src/mc/remote/mc_protocol.h +++ b/src/mc/remote/mc_protocol.h @@ -12,13 +12,13 @@ #include "src/kernel/actor/SimcallObserver.hpp" -#include "mc/datatypes.h" #include "simgrid/forward.h" // aid_t +#include "src/mc/datatypes.h" +#include "src/xbt/mmalloc/mmalloc.h" +#include + #include #include -#include -#include -#include // ***** Messages namespace simgrid::mc { diff --git a/src/mc/sosp/PageStore.cpp b/src/mc/sosp/PageStore.cpp index 8172352518..83061b0de5 100644 --- a/src/mc/sosp/PageStore.cpp +++ b/src/mc/sosp/PageStore.cpp @@ -12,7 +12,7 @@ #include "xbt/log.h" #include "xbt/sysdep.h" -#include "src/include/xxhash.hpp" +#include "src/3rd-party/xxhash.hpp" #include "src/mc/mc_mmu.hpp" #include "src/mc/sosp/PageStore.hpp" diff --git a/src/mc/sosp/PageStore_test.cpp b/src/mc/sosp/PageStore_test.cpp index 0105996ea4..05e1d72251 100644 --- a/src/mc/sosp/PageStore_test.cpp +++ b/src/mc/sosp/PageStore_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" #include #include diff --git a/src/mc/sosp/Snapshot_test.cpp b/src/mc/sosp/Snapshot_test.cpp index 7fb24fd1dc..ff2ff0bd0d 100644 --- a/src/mc/sosp/Snapshot_test.cpp +++ b/src/mc/sosp/Snapshot_test.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" #include "src/mc/mc_config.hpp" #include "src/mc/sosp/Snapshot.hpp" diff --git a/src/plugins/file_system/s4u_FileSystem.cpp b/src/plugins/file_system/s4u_FileSystem.cpp index 929cf17441..15f1871d4b 100644 --- a/src/plugins/file_system/s4u_FileSystem.cpp +++ b/src/plugins/file_system/s4u_FileSystem.cpp @@ -15,8 +15,6 @@ #include #include -#include "src/surf/surf_interface.hpp" - #include #include #include diff --git a/src/plugins/host_dvfs.cpp b/src/plugins/host_dvfs.cpp index 242aca25d4..0a5ac5865d 100644 --- a/src/plugins/host_dvfs.cpp +++ b/src/plugins/host_dvfs.cpp @@ -14,6 +14,7 @@ #include "src/internal_config.h" // HAVE_SMPI #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" +#include "src/simgrid/module.hpp" #if HAVE_SMPI #include "src/smpi/include/smpi_request.hpp" #include "src/smpi/plugins/ampi/ampi.hpp" @@ -58,12 +59,6 @@ static simgrid::config::Flag cfg_max_pstate("plugin/dvfs/max-pstate", "Which pstate is the maximum (and hence slowest) pstate for this governor?", MAX_PSTATE_NOT_LIMITED); -/** @addtogroup SURF_plugin_load - - This plugin makes it very simple for users to obtain the current load for each host. - -*/ - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_dvfs, kernel, "Logging specific to the HostDvfs plugin"); namespace simgrid::plugin::dvfs { @@ -307,7 +302,7 @@ public: // FIXME I think that this fires at the same time for all hosts, so when the src sends something, // the dst will be notified even though it didn't even arrive at the recv yet kernel::activity::CommImpl::on_start.connect([this](const kernel::activity::CommImpl& comm) { - const auto* act = static_cast(comm.surf_action_); + const auto* act = static_cast(comm.model_action_); if ((get_host() == &act->get_src() || get_host() == &act->get_dst()) && iteration_running) { post_task(); } diff --git a/src/plugins/host_energy.cpp b/src/plugins/host_energy.cpp index 32af0e36b4..2bf95b1065 100644 --- a/src/plugins/host_energy.cpp +++ b/src/plugins/host_energy.cpp @@ -12,6 +12,7 @@ #include #include "src/kernel/resource/CpuImpl.hpp" +#include "src/simgrid/module.hpp" #include #include @@ -59,14 +60,25 @@ This is enough to compute the wattage as a function of the amount of loaded core - - +
#Cores loadedWattageExplanation
0 (idle) 100 Watts  Idle value
0 (not idle) 120 Watts Epsilon value
0 (idle) 100 Watts Idle value
1 140 Watts Linear extrapolation between Epsilon and AllCores
2 160 Watts Linear extrapolation between Epsilon and AllCores
3 180 Watts Linear extrapolation between Epsilon and AllCores
4 200 Watts AllCores value
+Here is how it looks graphically: + +.. image:: img/plugin-energy.svg + :scale: 80% + :align: center + +As you can see, the ``Epsilon`` parameter allows to freely specify the slope you want, while using the 2 parameters +version of the model (with only ``Idle`` and ``AllCores``) requires that the ``Idle`` value is on the extension of the +line crossing the consumption you mesure for each core amount. Please note that specifying the consumption for each core +amount separately was not a solution because parallel tasks can use an amount of cores that is not an integer. The good +news is that it was not necessary, as our experiments (detailed in the paper) show that the proposed linear model is +sufficient to capture reality. .. raw:: html diff --git a/src/plugins/host_load.cpp b/src/plugins/host_load.cpp index 2ea7c479f8..6479b3a4f3 100644 --- a/src/plugins/host_load.cpp +++ b/src/plugins/host_load.cpp @@ -124,7 +124,7 @@ void HostLoad::update() while (iter != end(current_activities)) { auto& activity = iter->first; // Just an alias auto& remaining_cost_after_last_update = iter->second; // Just an alias - auto& action = activity->surf_action_; + auto& action = activity->model_action_; auto current_iter = iter; ++iter; diff --git a/src/plugins/link_energy.cpp b/src/plugins/link_energy.cpp index 116d5aea41..29b37004aa 100644 --- a/src/plugins/link_energy.cpp +++ b/src/plugins/link_energy.cpp @@ -9,7 +9,7 @@ #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Link.hpp" #include "src/kernel/activity/CommImpl.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/module.hpp" #include #include diff --git a/src/plugins/link_energy_wifi.cpp b/src/plugins/link_energy_wifi.cpp index be74ee658c..481f1f2400 100644 --- a/src/plugins/link_energy_wifi.cpp +++ b/src/plugins/link_energy_wifi.cpp @@ -10,6 +10,7 @@ #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include "src/kernel/resource/WifiLinkImpl.hpp" +#include "src/simgrid/module.hpp" #include #include diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 284faaa1f4..ea0ea365f0 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -11,11 +11,11 @@ #include #include -#include "src/include/mc/mc.h" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" -#include "src/surf/HostImpl.hpp" #include @@ -313,13 +313,13 @@ void sleep_for(double duration) if (duration <= 0) /* that's a no-op */ return; - if (duration < sg_surf_precision) { + if (duration < sg_precision_timing) { static unsigned int warned = 0; // At most 20 such warnings warned++; if (warned <= 20) XBT_INFO("The parameter to sleep_for() is smaller than the SimGrid numerical accuracy (%g < %g). " "Please refer to https://simgrid.org/doc/latest/Configuring_SimGrid.html#numerical-precision", - duration, sg_surf_precision); + duration, sg_precision_timing); if (warned == 20) XBT_VERB("(further warnings about the numerical accuracy of sleep_for() will be omitted)."); } diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index dcacfd0b3e..87174d50fd 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -10,10 +10,10 @@ #include #include -#include "mc/mc.h" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_comm, s4u_activity, "S4U asynchronous communications"); diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index d994ec074c..c20cd8e857 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -9,14 +9,14 @@ #include #include -#include "mc/mc.h" #include "src/instr/instr_private.hpp" #include "src/kernel/EngineImpl.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" #include "src/kernel/resource/SplitDuplexLinkImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" -#include "src/surf/HostImpl.hpp" #include "xbt/config.hpp" #include diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 597120ebeb..9ea3b10720 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -221,7 +221,7 @@ ExecPtr Exec::unset_host() double Exec::get_cost() const { - return (pimpl_->surf_action_ == nullptr) ? -1 : pimpl_->surf_action_->get_cost(); + return (pimpl_->model_action_ == nullptr) ? -1 : pimpl_->model_action_->get_cost(); } double Exec::get_remaining() const diff --git a/src/s4u/s4u_Host.cpp b/src/s4u/s4u_Host.cpp index bfd02d9343..ba4a844e81 100644 --- a/src/s4u/s4u_Host.cpp +++ b/src/s4u/s4u_Host.cpp @@ -14,9 +14,9 @@ #include #include "simgrid/simix.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include "src/kernel/resource/VirtualMachineImpl.hpp" -#include "src/surf/HostImpl.hpp" #include diff --git a/src/s4u/s4u_VirtualMachine.cpp b/src/s4u/s4u_VirtualMachine.cpp index 2f15e4e21d..1c305bee47 100644 --- a/src/s4u/s4u_VirtualMachine.cpp +++ b/src/s4u/s4u_VirtualMachine.cpp @@ -9,7 +9,7 @@ #include #include "src/kernel/resource/VirtualMachineImpl.hpp" -#include "src/surf/cpu_cas01.hpp" +#include "src/kernel/resource/models/cpu_cas01.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_vm, s4u, "S4U virtual machines"); diff --git a/src/surf/surf_interface.hpp b/src/simgrid/math_utils.h similarity index 56% rename from src/surf/surf_interface.hpp rename to src/simgrid/math_utils.h index 23bf1e7a71..84aa9d489d 100644 --- a/src/surf/surf_interface.hpp +++ b/src/simgrid/math_utils.h @@ -3,41 +3,14 @@ /* 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 SURF_MODEL_H_ -#define SURF_MODEL_H_ +#ifndef SIMGRID_MATH_UTILS_H_ +#define SIMGRID_MATH_UTILS_H_ -#include "src/simgrid/module.hpp" #include #include -#include "src/internal_config.h" -#include "src/kernel/resource/profile/Profile.hpp" - #include -#include -#include -#include -#include -#include -#include - -/********* - * Utils * - *********/ - -/* user-visible parameters */ -XBT_PUBLIC_DATA double sg_maxmin_precision; -XBT_PUBLIC_DATA double sg_surf_precision; -XBT_PUBLIC_DATA int sg_concurrency_limit; - -extern XBT_PRIVATE std::unordered_map traces_set_list; - -/** set of hosts for which one want to be notified if they ever restart */ -inline auto& watched_hosts() // avoid static initialization order fiasco -{ - static std::set> value; - return value; -} +#include static inline void double_update(double* variable, double value, double precision) { @@ -63,6 +36,4 @@ static inline int double_equals(double value1, double value2, double precision) return (fabs(value1 - value2) < precision); } -XBT_PUBLIC void surf_vm_model_init_HL13(); - -#endif /* SURF_MODEL_H_ */ +#endif /* SIMGRID_MATH_UTILS_H_ */ diff --git a/src/simgrid/module.cpp b/src/simgrid/module.cpp index 2ed2f70beb..5724971873 100644 --- a/src/simgrid/module.cpp +++ b/src/simgrid/module.cpp @@ -6,9 +6,8 @@ #include #include -#include "simgrid/sg_config.hpp" #include "src/simgrid/module.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simgrid/sg_config.hpp" #include @@ -43,14 +42,14 @@ void ModuleGroup::create_flag(const std::string& opt_name, const std::string& de by_name(value); // Simply ensure that this value exists, it will be picked up later }); } -void ModuleGroup::init_from_flag_value() +void ModuleGroup::init_from_flag_value() const { by_name(simgrid::config::get_value(opt_name_)).init(); } ModuleGroup& ModuleGroup::add(const char* id, const char* desc, std::function init) { - table_.emplace_back(Module(id, desc, init)); + table_.emplace_back(id, desc, std::move(init)); return *this; } diff --git a/src/simgrid/module.hpp b/src/simgrid/module.hpp index ab175add49..771fe09c92 100644 --- a/src/simgrid/module.hpp +++ b/src/simgrid/module.hpp @@ -19,7 +19,7 @@ struct Module { const char* description_; std::function init; Module(const char* id, const char* desc, std::function init_fun) - : name_(id), description_(desc), init(init_fun) + : name_(id), description_(desc), init(std::move(init_fun)) { } }; @@ -30,16 +30,16 @@ class ModuleGroup { std::string opt_name_; public: - ModuleGroup(const std::string& kind) : kind_(kind) {} + explicit ModuleGroup(const std::string& kind) : kind_(kind) {} ModuleGroup& add(const char* id, const char* desc, std::function init); Module const& by_name(const std::string& name) const; void help() const; - const std::string get_kind() const { return kind_; } + const std::string& get_kind() const { return kind_; } std::string existing_values() const; void create_flag(const std::string& opt_name, const std::string& descr, const std::string& default_value, bool init_now); - void init_from_flag_value(); + void init_from_flag_value() const; }; }; // namespace simgrid @@ -104,4 +104,6 @@ inline auto& simgrid_host_models() // Function to avoid static initialization or return models; } +XBT_PUBLIC void simgrid_vm_model_init_HL13(); + #endif diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index ed9b59a100..ddaec3f509 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -10,8 +10,6 @@ #include #include -#include "simgrid/sg_config.hpp" -#include "src/include/xbt/mmalloc.h" #include "src/instr/instr_private.hpp" #include "src/internal_config.h" #include "src/kernel/context/Context.hpp" @@ -20,8 +18,9 @@ #include "src/mc/mc_config.hpp" #include "src/mc/mc_replay.hpp" #include "src/simgrid/module.hpp" +#include "src/simgrid/sg_config.hpp" #include "src/smpi/include/smpi_config.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/xbt/mmalloc/mmalloc.h" #include @@ -139,17 +138,17 @@ void sg_config_init(int *argc, char **argv) return; } - /* Plugins configuration */ + /* Plugins and models configuration */ simgrid_plugins().create_flag("plugin", "The plugins", "", true); simgrid_cpu_models().create_flag("cpu/model", "The model to use for the CPU", "Cas01", false); simgrid_network_models().create_flag("network/model", "The model to use for the network", "LV08", false); simgrid_host_models().create_flag("host/model", "The model to use for the host", "default", false); simgrid_disk_models().create_flag("disk/model", "The model to use for the disk", "S19", false); - simgrid::config::bind_flag(sg_surf_precision, "surf/precision", + simgrid::config::bind_flag(sg_precision_timing, "precision/timing", {"surf/precision"}, "Numerical precision used when updating simulation times (in seconds)"); - simgrid::config::bind_flag(sg_maxmin_precision, "maxmin/precision", + simgrid::config::bind_flag(sg_precision_workamount, "precision/work-amount", {"maxmin/precision"}, "Numerical precision used when computing resource sharing (in flops/sec or bytes/sec)"); simgrid::config::bind_flag(sg_concurrency_limit, "maxmin/concurrency-limit", diff --git a/src/include/simgrid/sg_config.hpp b/src/simgrid/sg_config.hpp similarity index 100% rename from src/include/simgrid/sg_config.hpp rename to src/simgrid/sg_config.hpp diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index 16e8250043..833d76128d 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -5,10 +5,10 @@ #include "private.hpp" #include "simgrid/modelchecker.h" -#include "simgrid/sg_config.hpp" #include "smpi_comm.hpp" #include "smpi_file.hpp" #include "smpi_win.hpp" +#include "src/simgrid/sg_config.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)"); diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index ab7341114e..3168044af7 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -152,10 +152,10 @@ double PMPI_Wtime() return smpi_mpi_wtime(); } -extern double sg_maxmin_precision; +extern double sg_precision_timing; double PMPI_Wtick() { - return sg_maxmin_precision; + return sg_precision_timing; } int PMPI_Address(const void* location, MPI_Aint* address) diff --git a/src/smpi/internals/instr_smpi.cpp b/src/smpi/internals/instr_smpi.cpp index 3d9ad04508..993c7286e0 100644 --- a/src/smpi/internals/instr_smpi.cpp +++ b/src/smpi/internals/instr_smpi.cpp @@ -4,17 +4,17 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "private.hpp" -#include -#include +#include "src/simgrid/sg_config.hpp" +#include "src/smpi/include/smpi_actor.hpp" #include #include #include -#include + +#include +#include #include #include -#include "src/smpi/include/smpi_actor.hpp" - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI"); static std::unordered_map> keys; diff --git a/src/smpi/internals/smpi_actor.cpp b/src/smpi/internals/smpi_actor.cpp index 3b9921e138..308ebf109a 100644 --- a/src/smpi/internals/smpi_actor.cpp +++ b/src/smpi/internals/smpi_actor.cpp @@ -4,11 +4,11 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/smpi/include/smpi_actor.hpp" -#include "mc/mc.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Mutex.hpp" #include "smpi_comm.hpp" #include "smpi_info.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" #include "xbt/str.h" diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index 520cd14847..82752a6e5f 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -12,8 +12,8 @@ #include "smpi_comm.hpp" #include "smpi_utils.hpp" #include "src/internal_config.h" +#include "src/kernel/lmm/System.hpp" // sg_precision_timing #include "src/mc/mc_replay.hpp" -#include "src/surf/surf_interface.hpp" // sg_surf_precision #include "xbt/config.hpp" #include "xbt/file.hpp" @@ -256,13 +256,13 @@ double smpi_mpi_wtime() unsigned long long smpi_rastro_resolution () { const SmpiBenchGuard suspend_bench; - return static_cast(1.0 / sg_surf_precision); + return static_cast(1.0 / sg_precision_timing); } unsigned long long smpi_rastro_timestamp () { const SmpiBenchGuard suspend_bench; - return static_cast(simgrid::s4u::Engine::get_clock() / sg_surf_precision); + return static_cast(simgrid::s4u::Engine::get_clock() / sg_precision_timing); } /* ****************************** Functions related to the SMPI_SAMPLE_ macros ************************************/ diff --git a/src/smpi/internals/smpi_config.cpp b/src/smpi/internals/smpi_config.cpp index d4e357b648..5008538ce7 100644 --- a/src/smpi/internals/smpi_config.cpp +++ b/src/smpi/internals/smpi_config.cpp @@ -21,11 +21,11 @@ #undef _GNU_SOURCE #endif -#include "smpi_config.hpp" #include "include/xbt/config.hpp" -#include "mc/mc.h" #include "private.hpp" #include "smpi_coll.hpp" +#include "smpi_config.hpp" +#include "src/mc/mc.h" #include "xbt/ex.h" #include "xbt/parse_units.hpp" diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index fce781e94c..4fc8716066 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -3,7 +3,6 @@ /* 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 "mc/mc.h" #include "simgrid/Exception.hpp" #include "simgrid/plugins/file_system.h" #include "simgrid/s4u/Engine.hpp" @@ -13,6 +12,7 @@ #include "smpi_host.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/CommImpl.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" #include "src/smpi/include/smpi_actor.hpp" #include "xbt/config.hpp" diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index 46249714c6..09688d88f2 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -7,7 +7,7 @@ #include "private.hpp" #include "smpi_config.hpp" -#include "src/surf/xml/platf.hpp" +#include "src/kernel/xml/platf.hpp" #include "xbt/ex.h" #include "xbt/file.hpp" #include "xbt/log.h" diff --git a/src/smpi/mpi/smpi_comm.cpp b/src/smpi/mpi/smpi_comm.cpp index 4fffa24fb0..ba3cf8100b 100644 --- a/src/smpi/mpi/smpi_comm.cpp +++ b/src/smpi/mpi/smpi_comm.cpp @@ -10,8 +10,8 @@ #include "smpi_info.hpp" #include "smpi_request.hpp" #include "smpi_win.hpp" +#include "src/kernel/resource/HostImpl.hpp" #include "src/smpi/include/smpi_actor.hpp" -#include "src/surf/HostImpl.hpp" #include diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index fd1a79cbae..1a24c54631 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -5,7 +5,6 @@ #include "smpi_request.hpp" -#include "mc/mc.h" #include "private.hpp" #include "simgrid/Exception.hpp" #include "simgrid/s4u/ConditionVariable.hpp" @@ -19,6 +18,7 @@ #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SimcallObserver.hpp" +#include "src/mc/mc.h" #include "src/mc/mc_replay.hpp" #include "src/smpi/include/smpi_actor.hpp" diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 27da2cc919..2e949968d3 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -27,7 +27,7 @@ PRIVATIZE="--cfg=smpi/privatization:${SMPI_PRIVATIZATION:-@HAVE_PRIVATIZATION@}" NUMPROCS=0 DEPLOYOPTS="" -SIMOPTS="--cfg=surf/precision:1e-9 --cfg=network/model:SMPI" +SIMOPTS="--cfg=precision/timing:1e-9 --cfg=network/model:SMPI" SMPITMPDIR="$(dirname $(mktemp -u))" diff --git a/src/surf/xml/platf.hpp b/src/surf/xml/platf.hpp deleted file mode 100644 index 203ca09b1e..0000000000 --- a/src/surf/xml/platf.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2006-2023. 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 SURF_SURFXML_PARSE_HPP -#define SURF_SURFXML_PARSE_HPP - -#include -#include -#include - -/* Module management functions */ -XBT_PUBLIC void sg_platf_parser_finalize(); - -XBT_PUBLIC void surf_parse_open(const std::string& file); -XBT_PUBLIC void surf_parse_close(); -XBT_PUBLIC void surf_parse_assert(bool cond, const std::string& msg); -XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(const std::string& msg); -XBT_PUBLIC void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, - const std::string& post); - -XBT_PUBLIC double surf_parse_get_double(const std::string& s); -XBT_PUBLIC int surf_parse_get_int(const std::string& s); - -XBT_PUBLIC void surf_parse(); /* Entry-point to the parser */ -XBT_PUBLIC void parse_platform_file(const std::string& file); - -#endif diff --git a/src/surf/xml/simgrid_dtd.h b/src/surf/xml/simgrid_dtd.h deleted file mode 100644 index 7558fc01ff..0000000000 --- a/src/surf/xml/simgrid_dtd.h +++ /dev/null @@ -1,774 +0,0 @@ -/* XML processor/application API for src/surf/xml/simgrid.dtd. - * - * This program was generated with the FleXML XML processor generator. - * FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved. - * FleXML is Copyright (C) 2003-2013 Martin Quinson. All rights reserved. - * (1.9.6). - * - * There are two, intertwined parts to this program, part A and part B. - * - * Part A - * ------ - * - * Some parts, here collectively called "Part A", are found in the - * FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose - * and Copyright (C) 2003-2013 Martin Quinson. All rights reserved. - * - * You can redistribute, use, perform, display and/or modify "Part A" - * provided the following two conditions hold: - * - * 1. The program is distributed WITHOUT ANY WARRANTY from the author of - * FleXML; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * - * 2. The program distribution conditions do not in any way affect the - * distribution conditions of the FleXML system used to generate this - * file or any version of FleXML derived from that system. - * - * Notice that these are explicit rights granted to you for files - * generated by the FleXML system. For your rights in connection with - * the FleXML system itself please consult the GNU General Public License. - * - * Part B - * ------ - * - * The other parts, here collectively called "Part B", and which came - * from the DTD used by FleXML to generate this program, can be - * distributed (or not, as the case may be) under the terms of whoever - * wrote them, provided these terms respect and obey the two conditions - * above under the heading "Part A". - * - * The author of and contributors to FleXML specifically disclaim - * any copyright interest in "Part B", unless "Part B" was written - * by the author of or contributors to FleXML. - * - */ - -#ifndef _FLEXML_simgrid_H -#define _FLEXML_simgrid_H - -/* XML application entry points. */ -XBT_PUBLIC void STag_surfxml_AS(void); -XBT_PUBLIC void ETag_surfxml_AS(void); -XBT_PUBLIC void STag_surfxml_ASroute(void); -XBT_PUBLIC void ETag_surfxml_ASroute(void); -XBT_PUBLIC void STag_surfxml_actor(void); -XBT_PUBLIC void ETag_surfxml_actor(void); -XBT_PUBLIC void STag_surfxml_argument(void); -XBT_PUBLIC void ETag_surfxml_argument(void); -XBT_PUBLIC void STag_surfxml_backbone(void); -XBT_PUBLIC void ETag_surfxml_backbone(void); -XBT_PUBLIC void STag_surfxml_bypassASroute(void); -XBT_PUBLIC void ETag_surfxml_bypassASroute(void); -XBT_PUBLIC void STag_surfxml_bypassRoute(void); -XBT_PUBLIC void ETag_surfxml_bypassRoute(void); -XBT_PUBLIC void STag_surfxml_bypassZoneRoute(void); -XBT_PUBLIC void ETag_surfxml_bypassZoneRoute(void); -XBT_PUBLIC void STag_surfxml_cabinet(void); -XBT_PUBLIC void ETag_surfxml_cabinet(void); -XBT_PUBLIC void STag_surfxml_cluster(void); -XBT_PUBLIC void ETag_surfxml_cluster(void); -XBT_PUBLIC void STag_surfxml_config(void); -XBT_PUBLIC void ETag_surfxml_config(void); -XBT_PUBLIC void STag_surfxml_disk(void); -XBT_PUBLIC void ETag_surfxml_disk(void); -XBT_PUBLIC void STag_surfxml_host(void); -XBT_PUBLIC void ETag_surfxml_host(void); -XBT_PUBLIC void STag_surfxml_host___link(void); -XBT_PUBLIC void ETag_surfxml_host___link(void); -XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_include(void); -XBT_PUBLIC void ETag_surfxml_include(void); -XBT_PUBLIC void STag_surfxml_link(void); -XBT_PUBLIC void ETag_surfxml_link(void); -XBT_PUBLIC void STag_surfxml_link___ctn(void); -XBT_PUBLIC void ETag_surfxml_link___ctn(void); -XBT_PUBLIC void STag_surfxml_model___prop(void); -XBT_PUBLIC void ETag_surfxml_model___prop(void); -XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_mount(void); -XBT_PUBLIC void ETag_surfxml_mount(void); -XBT_PUBLIC void STag_surfxml_peer(void); -XBT_PUBLIC void ETag_surfxml_peer(void); -XBT_PUBLIC void STag_surfxml_platform(void); -XBT_PUBLIC void ETag_surfxml_platform(void); -XBT_PUBLIC void STag_surfxml_process(void); -XBT_PUBLIC void ETag_surfxml_process(void); -XBT_PUBLIC void STag_surfxml_prop(void); -XBT_PUBLIC void ETag_surfxml_prop(void); -XBT_PUBLIC void STag_surfxml_random(void); -XBT_PUBLIC void ETag_surfxml_random(void); -XBT_PUBLIC void STag_surfxml_route(void); -XBT_PUBLIC void ETag_surfxml_route(void); -XBT_PUBLIC void STag_surfxml_router(void); -XBT_PUBLIC void ETag_surfxml_router(void); -XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_storage(void); -XBT_PUBLIC void ETag_surfxml_storage(void); -XBT_ATTRIB_NORETURN XBT_PUBLIC void STag_surfxml_storage___type(void); -XBT_PUBLIC void ETag_surfxml_storage___type(void); -XBT_PUBLIC void STag_surfxml_trace(void); -XBT_PUBLIC void ETag_surfxml_trace(void); -XBT_PUBLIC void STag_surfxml_trace___connect(void); -XBT_PUBLIC void ETag_surfxml_trace___connect(void); -XBT_PUBLIC void STag_surfxml_zone(void); -XBT_PUBLIC void ETag_surfxml_zone(void); -XBT_PUBLIC void STag_surfxml_zoneRoute(void); -XBT_PUBLIC void ETag_surfxml_zoneRoute(void); - -/* XML application data. */ -typedef int AT_surfxml_AS_id; -#define AU_surfxml_AS_id NULL -typedef int AT_surfxml_AS_routing; -#define AU_surfxml_AS_routing NULL -typedef int AT_surfxml_ASroute_dst; -#define AU_surfxml_ASroute_dst NULL -typedef int AT_surfxml_ASroute_gw___dst; -#define AU_surfxml_ASroute_gw___dst NULL -typedef int AT_surfxml_ASroute_gw___src; -#define AU_surfxml_ASroute_gw___src NULL -typedef int AT_surfxml_ASroute_src; -#define AU_surfxml_ASroute_src NULL -typedef enum { AU_surfxml_ASroute_symmetrical, A_surfxml_ASroute_symmetrical_YES,A_surfxml_ASroute_symmetrical_NO,A_surfxml_ASroute_symmetrical_yes,A_surfxml_ASroute_symmetrical_no } AT_surfxml_ASroute_symmetrical; -typedef int AT_surfxml_actor_function; -#define AU_surfxml_actor_function NULL -typedef int AT_surfxml_actor_host; -#define AU_surfxml_actor_host NULL -typedef int AT_surfxml_actor_kill___time; -#define AU_surfxml_actor_kill___time NULL -typedef enum { AU_surfxml_actor_on___failure, A_surfxml_actor_on___failure_DIE,A_surfxml_actor_on___failure_RESTART } AT_surfxml_actor_on___failure; -typedef int AT_surfxml_actor_start___time; -#define AU_surfxml_actor_start___time NULL -typedef int AT_surfxml_argument_value; -#define AU_surfxml_argument_value NULL -typedef int AT_surfxml_backbone_bandwidth; -#define AU_surfxml_backbone_bandwidth NULL -typedef int AT_surfxml_backbone_id; -#define AU_surfxml_backbone_id NULL -typedef int AT_surfxml_backbone_latency; -#define AU_surfxml_backbone_latency NULL -typedef int AT_surfxml_bypassASroute_dst; -#define AU_surfxml_bypassASroute_dst NULL -typedef int AT_surfxml_bypassASroute_gw___dst; -#define AU_surfxml_bypassASroute_gw___dst NULL -typedef int AT_surfxml_bypassASroute_gw___src; -#define AU_surfxml_bypassASroute_gw___src NULL -typedef int AT_surfxml_bypassASroute_src; -#define AU_surfxml_bypassASroute_src NULL -typedef int AT_surfxml_bypassRoute_dst; -#define AU_surfxml_bypassRoute_dst NULL -typedef int AT_surfxml_bypassRoute_src; -#define AU_surfxml_bypassRoute_src NULL -typedef int AT_surfxml_bypassZoneRoute_dst; -#define AU_surfxml_bypassZoneRoute_dst NULL -typedef int AT_surfxml_bypassZoneRoute_gw___dst; -#define AU_surfxml_bypassZoneRoute_gw___dst NULL -typedef int AT_surfxml_bypassZoneRoute_gw___src; -#define AU_surfxml_bypassZoneRoute_gw___src NULL -typedef int AT_surfxml_bypassZoneRoute_src; -#define AU_surfxml_bypassZoneRoute_src NULL -typedef int AT_surfxml_cabinet_bw; -#define AU_surfxml_cabinet_bw NULL -typedef int AT_surfxml_cabinet_id; -#define AU_surfxml_cabinet_id NULL -typedef int AT_surfxml_cabinet_lat; -#define AU_surfxml_cabinet_lat NULL -typedef int AT_surfxml_cabinet_prefix; -#define AU_surfxml_cabinet_prefix NULL -typedef int AT_surfxml_cabinet_radical; -#define AU_surfxml_cabinet_radical NULL -typedef int AT_surfxml_cabinet_speed; -#define AU_surfxml_cabinet_speed NULL -typedef int AT_surfxml_cabinet_suffix; -#define AU_surfxml_cabinet_suffix NULL -typedef int AT_surfxml_cluster_bb___bw; -#define AU_surfxml_cluster_bb___bw NULL -typedef int AT_surfxml_cluster_bb___lat; -#define AU_surfxml_cluster_bb___lat NULL -typedef enum { AU_surfxml_cluster_bb___sharing___policy, A_surfxml_cluster_bb___sharing___policy_SHARED,A_surfxml_cluster_bb___sharing___policy_FATPIPE } AT_surfxml_cluster_bb___sharing___policy; -typedef int AT_surfxml_cluster_bw; -#define AU_surfxml_cluster_bw NULL -typedef int AT_surfxml_cluster_core; -#define AU_surfxml_cluster_core NULL -typedef int AT_surfxml_cluster_id; -#define AU_surfxml_cluster_id NULL -typedef int AT_surfxml_cluster_lat; -#define AU_surfxml_cluster_lat NULL -typedef int AT_surfxml_cluster_limiter___link; -#define AU_surfxml_cluster_limiter___link NULL -typedef int AT_surfxml_cluster_loopback___bw; -#define AU_surfxml_cluster_loopback___bw NULL -typedef int AT_surfxml_cluster_loopback___lat; -#define AU_surfxml_cluster_loopback___lat NULL -typedef int AT_surfxml_cluster_prefix; -#define AU_surfxml_cluster_prefix NULL -typedef int AT_surfxml_cluster_radical; -#define AU_surfxml_cluster_radical NULL -typedef int AT_surfxml_cluster_router___id; -#define AU_surfxml_cluster_router___id NULL -typedef enum { AU_surfxml_cluster_sharing___policy, A_surfxml_cluster_sharing___policy_SHARED,A_surfxml_cluster_sharing___policy_SPLITDUPLEX,A_surfxml_cluster_sharing___policy_FULLDUPLEX,A_surfxml_cluster_sharing___policy_FATPIPE } AT_surfxml_cluster_sharing___policy; -typedef int AT_surfxml_cluster_speed; -#define AU_surfxml_cluster_speed NULL -typedef int AT_surfxml_cluster_suffix; -#define AU_surfxml_cluster_suffix NULL -typedef int AT_surfxml_cluster_topo___parameters; -#define AU_surfxml_cluster_topo___parameters NULL -typedef enum { AU_surfxml_cluster_topology, A_surfxml_cluster_topology_FLAT,A_surfxml_cluster_topology_TORUS,A_surfxml_cluster_topology_FAT___TREE,A_surfxml_cluster_topology_DRAGONFLY } AT_surfxml_cluster_topology; -typedef int AT_surfxml_config_id; -#define AU_surfxml_config_id NULL -typedef int AT_surfxml_disk_id; -#define AU_surfxml_disk_id NULL -typedef int AT_surfxml_disk_read___bw; -#define AU_surfxml_disk_read___bw NULL -typedef int AT_surfxml_disk_write___bw; -#define AU_surfxml_disk_write___bw NULL -typedef int AT_surfxml_host_availability___file; -#define AU_surfxml_host_availability___file NULL -typedef int AT_surfxml_host_coordinates; -#define AU_surfxml_host_coordinates NULL -typedef int AT_surfxml_host_core; -#define AU_surfxml_host_core NULL -typedef int AT_surfxml_host_id; -#define AU_surfxml_host_id NULL -typedef int AT_surfxml_host_pstate; -#define AU_surfxml_host_pstate NULL -typedef int AT_surfxml_host_speed; -#define AU_surfxml_host_speed NULL -typedef int AT_surfxml_host_speed___file; -#define AU_surfxml_host_speed___file NULL -typedef int AT_surfxml_host_state___file; -#define AU_surfxml_host_state___file NULL -typedef int AT_surfxml_host___link_down; -#define AU_surfxml_host___link_down NULL -typedef int AT_surfxml_host___link_id; -#define AU_surfxml_host___link_id NULL -typedef int AT_surfxml_host___link_up; -#define AU_surfxml_host___link_up NULL -typedef int AT_surfxml_include_file; -#define AU_surfxml_include_file NULL -typedef int AT_surfxml_link_bandwidth; -#define AU_surfxml_link_bandwidth NULL -typedef int AT_surfxml_link_bandwidth___file; -#define AU_surfxml_link_bandwidth___file NULL -typedef int AT_surfxml_link_id; -#define AU_surfxml_link_id NULL -typedef int AT_surfxml_link_latency; -#define AU_surfxml_link_latency NULL -typedef int AT_surfxml_link_latency___file; -#define AU_surfxml_link_latency___file NULL -typedef enum { AU_surfxml_link_sharing___policy, A_surfxml_link_sharing___policy_SHARED,A_surfxml_link_sharing___policy_SPLITDUPLEX,A_surfxml_link_sharing___policy_FULLDUPLEX,A_surfxml_link_sharing___policy_FATPIPE,A_surfxml_link_sharing___policy_WIFI } AT_surfxml_link_sharing___policy; -typedef int AT_surfxml_link_state___file; -#define AU_surfxml_link_state___file NULL -typedef enum { AU_surfxml_link___ctn_direction, A_surfxml_link___ctn_direction_UP,A_surfxml_link___ctn_direction_DOWN,A_surfxml_link___ctn_direction_NONE } AT_surfxml_link___ctn_direction; -typedef int AT_surfxml_link___ctn_id; -#define AU_surfxml_link___ctn_id NULL -typedef int AT_surfxml_model___prop_id; -#define AU_surfxml_model___prop_id NULL -typedef int AT_surfxml_model___prop_value; -#define AU_surfxml_model___prop_value NULL -typedef int AT_surfxml_mount_name; -#define AU_surfxml_mount_name NULL -typedef int AT_surfxml_mount_storageId; -#define AU_surfxml_mount_storageId NULL -typedef int AT_surfxml_peer_availability___file; -#define AU_surfxml_peer_availability___file NULL -typedef int AT_surfxml_peer_bw___in; -#define AU_surfxml_peer_bw___in NULL -typedef int AT_surfxml_peer_bw___out; -#define AU_surfxml_peer_bw___out NULL -typedef int AT_surfxml_peer_coordinates; -#define AU_surfxml_peer_coordinates NULL -typedef int AT_surfxml_peer_id; -#define AU_surfxml_peer_id NULL -typedef int AT_surfxml_peer_lat; -#define AU_surfxml_peer_lat NULL -typedef int AT_surfxml_peer_speed; -#define AU_surfxml_peer_speed NULL -typedef int AT_surfxml_peer_speed___file; -#define AU_surfxml_peer_speed___file NULL -typedef int AT_surfxml_peer_state___file; -#define AU_surfxml_peer_state___file NULL -typedef int AT_surfxml_platform_version; -#define AU_surfxml_platform_version NULL -typedef int AT_surfxml_process_function; -#define AU_surfxml_process_function NULL -typedef int AT_surfxml_process_host; -#define AU_surfxml_process_host NULL -typedef int AT_surfxml_process_kill___time; -#define AU_surfxml_process_kill___time NULL -typedef enum { AU_surfxml_process_on___failure, A_surfxml_process_on___failure_DIE,A_surfxml_process_on___failure_RESTART } AT_surfxml_process_on___failure; -typedef int AT_surfxml_process_start___time; -#define AU_surfxml_process_start___time NULL -typedef int AT_surfxml_prop_id; -#define AU_surfxml_prop_id NULL -typedef int AT_surfxml_prop_value; -#define AU_surfxml_prop_value NULL -typedef enum { AU_surfxml_random_generator, A_surfxml_random_generator_DRAND48,A_surfxml_random_generator_RAND,A_surfxml_random_generator_RNGSTREAM,A_surfxml_random_generator_NONE } AT_surfxml_random_generator; -typedef int AT_surfxml_random_id; -#define AU_surfxml_random_id NULL -typedef int AT_surfxml_random_max; -#define AU_surfxml_random_max NULL -typedef int AT_surfxml_random_mean; -#define AU_surfxml_random_mean NULL -typedef int AT_surfxml_random_min; -#define AU_surfxml_random_min NULL -typedef int AT_surfxml_random_radical; -#define AU_surfxml_random_radical NULL -typedef int AT_surfxml_random_seed; -#define AU_surfxml_random_seed NULL -typedef int AT_surfxml_random_std___deviation; -#define AU_surfxml_random_std___deviation NULL -typedef int AT_surfxml_route_dst; -#define AU_surfxml_route_dst NULL -typedef int AT_surfxml_route_src; -#define AU_surfxml_route_src NULL -typedef enum { AU_surfxml_route_symmetrical, A_surfxml_route_symmetrical_YES,A_surfxml_route_symmetrical_NO,A_surfxml_route_symmetrical_yes,A_surfxml_route_symmetrical_no } AT_surfxml_route_symmetrical; -typedef int AT_surfxml_router_coordinates; -#define AU_surfxml_router_coordinates NULL -typedef int AT_surfxml_router_id; -#define AU_surfxml_router_id NULL -typedef int AT_surfxml_storage_attach; -#define AU_surfxml_storage_attach NULL -typedef int AT_surfxml_storage_content; -#define AU_surfxml_storage_content NULL -typedef int AT_surfxml_storage_id; -#define AU_surfxml_storage_id NULL -typedef int AT_surfxml_storage_typeId; -#define AU_surfxml_storage_typeId NULL -typedef int AT_surfxml_storage___type_content; -#define AU_surfxml_storage___type_content NULL -typedef int AT_surfxml_storage___type_id; -#define AU_surfxml_storage___type_id NULL -typedef int AT_surfxml_storage___type_model; -#define AU_surfxml_storage___type_model NULL -typedef int AT_surfxml_storage___type_size; -#define AU_surfxml_storage___type_size NULL -typedef int AT_surfxml_trace_file; -#define AU_surfxml_trace_file NULL -typedef int AT_surfxml_trace_id; -#define AU_surfxml_trace_id NULL -typedef int AT_surfxml_trace_periodicity; -#define AU_surfxml_trace_periodicity NULL -typedef int AT_surfxml_trace___connect_element; -#define AU_surfxml_trace___connect_element NULL -typedef enum { AU_surfxml_trace___connect_kind, A_surfxml_trace___connect_kind_HOST___AVAIL,A_surfxml_trace___connect_kind_SPEED,A_surfxml_trace___connect_kind_LINK___AVAIL,A_surfxml_trace___connect_kind_BANDWIDTH,A_surfxml_trace___connect_kind_LATENCY } AT_surfxml_trace___connect_kind; -typedef int AT_surfxml_trace___connect_trace; -#define AU_surfxml_trace___connect_trace NULL -typedef int AT_surfxml_zone_id; -#define AU_surfxml_zone_id NULL -typedef int AT_surfxml_zone_routing; -#define AU_surfxml_zone_routing NULL -typedef int AT_surfxml_zoneRoute_dst; -#define AU_surfxml_zoneRoute_dst NULL -typedef int AT_surfxml_zoneRoute_gw___dst; -#define AU_surfxml_zoneRoute_gw___dst NULL -typedef int AT_surfxml_zoneRoute_gw___src; -#define AU_surfxml_zoneRoute_gw___src NULL -typedef int AT_surfxml_zoneRoute_src; -#define AU_surfxml_zoneRoute_src NULL -typedef enum { AU_surfxml_zoneRoute_symmetrical, A_surfxml_zoneRoute_symmetrical_YES,A_surfxml_zoneRoute_symmetrical_NO,A_surfxml_zoneRoute_symmetrical_yes,A_surfxml_zoneRoute_symmetrical_no } AT_surfxml_zoneRoute_symmetrical; - -/* FleXML-provided data. */ -XBT_PUBLIC_DATA int surfxml_pcdata_ix; -XBT_PUBLIC_DATA char *surfxml_bufferstack; -#define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix) -XBT_PUBLIC_DATA AT_surfxml_AS_id AX_surfxml_AS_id; -#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id) -XBT_PUBLIC_DATA short int surfxml_AS_id_isset; -XBT_PUBLIC_DATA AT_surfxml_AS_routing AX_surfxml_AS_routing; -#define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing) -XBT_PUBLIC_DATA short int surfxml_AS_routing_isset; -XBT_PUBLIC_DATA AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst; -#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst) -XBT_PUBLIC_DATA short int surfxml_ASroute_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_ASroute_gw___dst AX_surfxml_ASroute_gw___dst; -#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst) -XBT_PUBLIC_DATA short int surfxml_ASroute_gw___dst_isset; -XBT_PUBLIC_DATA AT_surfxml_ASroute_gw___src AX_surfxml_ASroute_gw___src; -#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src) -XBT_PUBLIC_DATA short int surfxml_ASroute_gw___src_isset; -XBT_PUBLIC_DATA AT_surfxml_ASroute_src AX_surfxml_ASroute_src; -#define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src) -XBT_PUBLIC_DATA short int surfxml_ASroute_src_isset; -XBT_PUBLIC_DATA AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical; -#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical -XBT_PUBLIC_DATA short int surfxml_ASroute_symmetrical_isset; -XBT_PUBLIC_DATA AT_surfxml_actor_function AX_surfxml_actor_function; -#define A_surfxml_actor_function (surfxml_bufferstack + AX_surfxml_actor_function) -XBT_PUBLIC_DATA short int surfxml_actor_function_isset; -XBT_PUBLIC_DATA AT_surfxml_actor_host AX_surfxml_actor_host; -#define A_surfxml_actor_host (surfxml_bufferstack + AX_surfxml_actor_host) -XBT_PUBLIC_DATA short int surfxml_actor_host_isset; -XBT_PUBLIC_DATA AT_surfxml_actor_kill___time AX_surfxml_actor_kill___time; -#define A_surfxml_actor_kill___time (surfxml_bufferstack + AX_surfxml_actor_kill___time) -XBT_PUBLIC_DATA short int surfxml_actor_kill___time_isset; -XBT_PUBLIC_DATA AT_surfxml_actor_on___failure AX_surfxml_actor_on___failure; -#define A_surfxml_actor_on___failure AX_surfxml_actor_on___failure -XBT_PUBLIC_DATA short int surfxml_actor_on___failure_isset; -XBT_PUBLIC_DATA AT_surfxml_actor_start___time AX_surfxml_actor_start___time; -#define A_surfxml_actor_start___time (surfxml_bufferstack + AX_surfxml_actor_start___time) -XBT_PUBLIC_DATA short int surfxml_actor_start___time_isset; -XBT_PUBLIC_DATA AT_surfxml_argument_value AX_surfxml_argument_value; -#define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value) -XBT_PUBLIC_DATA short int surfxml_argument_value_isset; -XBT_PUBLIC_DATA AT_surfxml_backbone_bandwidth AX_surfxml_backbone_bandwidth; -#define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth) -XBT_PUBLIC_DATA short int surfxml_backbone_bandwidth_isset; -XBT_PUBLIC_DATA AT_surfxml_backbone_id AX_surfxml_backbone_id; -#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id) -XBT_PUBLIC_DATA short int surfxml_backbone_id_isset; -XBT_PUBLIC_DATA AT_surfxml_backbone_latency AX_surfxml_backbone_latency; -#define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency) -XBT_PUBLIC_DATA short int surfxml_backbone_latency_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassASroute_dst AX_surfxml_bypassASroute_dst; -#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst) -XBT_PUBLIC_DATA short int surfxml_bypassASroute_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassASroute_gw___dst AX_surfxml_bypassASroute_gw___dst; -#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst) -XBT_PUBLIC_DATA short int surfxml_bypassASroute_gw___dst_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src; -#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src) -XBT_PUBLIC_DATA short int surfxml_bypassASroute_gw___src_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassASroute_src AX_surfxml_bypassASroute_src; -#define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src) -XBT_PUBLIC_DATA short int surfxml_bypassASroute_src_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst; -#define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst) -XBT_PUBLIC_DATA short int surfxml_bypassRoute_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src; -#define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src) -XBT_PUBLIC_DATA short int surfxml_bypassRoute_src_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_dst AX_surfxml_bypassZoneRoute_dst; -#define A_surfxml_bypassZoneRoute_dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_dst) -XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_gw___dst AX_surfxml_bypassZoneRoute_gw___dst; -#define A_surfxml_bypassZoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___dst) -XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_gw___dst_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_gw___src AX_surfxml_bypassZoneRoute_gw___src; -#define A_surfxml_bypassZoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___src) -XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_gw___src_isset; -XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_src AX_surfxml_bypassZoneRoute_src; -#define A_surfxml_bypassZoneRoute_src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_src) -XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_src_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_bw AX_surfxml_cabinet_bw; -#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw) -XBT_PUBLIC_DATA short int surfxml_cabinet_bw_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_id AX_surfxml_cabinet_id; -#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id) -XBT_PUBLIC_DATA short int surfxml_cabinet_id_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_lat AX_surfxml_cabinet_lat; -#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat) -XBT_PUBLIC_DATA short int surfxml_cabinet_lat_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_prefix AX_surfxml_cabinet_prefix; -#define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix) -XBT_PUBLIC_DATA short int surfxml_cabinet_prefix_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_radical AX_surfxml_cabinet_radical; -#define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical) -XBT_PUBLIC_DATA short int surfxml_cabinet_radical_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_speed AX_surfxml_cabinet_speed; -#define A_surfxml_cabinet_speed (surfxml_bufferstack + AX_surfxml_cabinet_speed) -XBT_PUBLIC_DATA short int surfxml_cabinet_speed_isset; -XBT_PUBLIC_DATA AT_surfxml_cabinet_suffix AX_surfxml_cabinet_suffix; -#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix) -XBT_PUBLIC_DATA short int surfxml_cabinet_suffix_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_bb___bw AX_surfxml_cluster_bb___bw; -#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw) -XBT_PUBLIC_DATA short int surfxml_cluster_bb___bw_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_bb___lat AX_surfxml_cluster_bb___lat; -#define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat) -XBT_PUBLIC_DATA short int surfxml_cluster_bb___lat_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy; -#define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy -XBT_PUBLIC_DATA short int surfxml_cluster_bb___sharing___policy_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_bw AX_surfxml_cluster_bw; -#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw) -XBT_PUBLIC_DATA short int surfxml_cluster_bw_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_core AX_surfxml_cluster_core; -#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core) -XBT_PUBLIC_DATA short int surfxml_cluster_core_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_id AX_surfxml_cluster_id; -#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id) -XBT_PUBLIC_DATA short int surfxml_cluster_id_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_lat AX_surfxml_cluster_lat; -#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat) -XBT_PUBLIC_DATA short int surfxml_cluster_lat_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_limiter___link AX_surfxml_cluster_limiter___link; -#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link) -XBT_PUBLIC_DATA short int surfxml_cluster_limiter___link_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_loopback___bw AX_surfxml_cluster_loopback___bw; -#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw) -XBT_PUBLIC_DATA short int surfxml_cluster_loopback___bw_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_loopback___lat AX_surfxml_cluster_loopback___lat; -#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat) -XBT_PUBLIC_DATA short int surfxml_cluster_loopback___lat_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix; -#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix) -XBT_PUBLIC_DATA short int surfxml_cluster_prefix_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_radical AX_surfxml_cluster_radical; -#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical) -XBT_PUBLIC_DATA short int surfxml_cluster_radical_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_router___id AX_surfxml_cluster_router___id; -#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id) -XBT_PUBLIC_DATA short int surfxml_cluster_router___id_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy; -#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy -XBT_PUBLIC_DATA short int surfxml_cluster_sharing___policy_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_speed AX_surfxml_cluster_speed; -#define A_surfxml_cluster_speed (surfxml_bufferstack + AX_surfxml_cluster_speed) -XBT_PUBLIC_DATA short int surfxml_cluster_speed_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix; -#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix) -XBT_PUBLIC_DATA short int surfxml_cluster_suffix_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_topo___parameters AX_surfxml_cluster_topo___parameters; -#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters) -XBT_PUBLIC_DATA short int surfxml_cluster_topo___parameters_isset; -XBT_PUBLIC_DATA AT_surfxml_cluster_topology AX_surfxml_cluster_topology; -#define A_surfxml_cluster_topology AX_surfxml_cluster_topology -XBT_PUBLIC_DATA short int surfxml_cluster_topology_isset; -XBT_PUBLIC_DATA AT_surfxml_config_id AX_surfxml_config_id; -#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id) -XBT_PUBLIC_DATA short int surfxml_config_id_isset; -XBT_PUBLIC_DATA AT_surfxml_disk_id AX_surfxml_disk_id; -#define A_surfxml_disk_id (surfxml_bufferstack + AX_surfxml_disk_id) -XBT_PUBLIC_DATA short int surfxml_disk_id_isset; -XBT_PUBLIC_DATA AT_surfxml_disk_read___bw AX_surfxml_disk_read___bw; -#define A_surfxml_disk_read___bw (surfxml_bufferstack + AX_surfxml_disk_read___bw) -XBT_PUBLIC_DATA short int surfxml_disk_read___bw_isset; -XBT_PUBLIC_DATA AT_surfxml_disk_write___bw AX_surfxml_disk_write___bw; -#define A_surfxml_disk_write___bw (surfxml_bufferstack + AX_surfxml_disk_write___bw) -XBT_PUBLIC_DATA short int surfxml_disk_write___bw_isset; -XBT_PUBLIC_DATA AT_surfxml_host_availability___file AX_surfxml_host_availability___file; -#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file) -XBT_PUBLIC_DATA short int surfxml_host_availability___file_isset; -XBT_PUBLIC_DATA AT_surfxml_host_coordinates AX_surfxml_host_coordinates; -#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates) -XBT_PUBLIC_DATA short int surfxml_host_coordinates_isset; -XBT_PUBLIC_DATA AT_surfxml_host_core AX_surfxml_host_core; -#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core) -XBT_PUBLIC_DATA short int surfxml_host_core_isset; -XBT_PUBLIC_DATA AT_surfxml_host_id AX_surfxml_host_id; -#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id) -XBT_PUBLIC_DATA short int surfxml_host_id_isset; -XBT_PUBLIC_DATA AT_surfxml_host_pstate AX_surfxml_host_pstate; -#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate) -XBT_PUBLIC_DATA short int surfxml_host_pstate_isset; -XBT_PUBLIC_DATA AT_surfxml_host_speed AX_surfxml_host_speed; -#define A_surfxml_host_speed (surfxml_bufferstack + AX_surfxml_host_speed) -XBT_PUBLIC_DATA short int surfxml_host_speed_isset; -XBT_PUBLIC_DATA AT_surfxml_host_speed___file AX_surfxml_host_speed___file; -#define A_surfxml_host_speed___file (surfxml_bufferstack + AX_surfxml_host_speed___file) -XBT_PUBLIC_DATA short int surfxml_host_speed___file_isset; -XBT_PUBLIC_DATA AT_surfxml_host_state___file AX_surfxml_host_state___file; -#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file) -XBT_PUBLIC_DATA short int surfxml_host_state___file_isset; -XBT_PUBLIC_DATA AT_surfxml_host___link_down AX_surfxml_host___link_down; -#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down) -XBT_PUBLIC_DATA short int surfxml_host___link_down_isset; -XBT_PUBLIC_DATA AT_surfxml_host___link_id AX_surfxml_host___link_id; -#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id) -XBT_PUBLIC_DATA short int surfxml_host___link_id_isset; -XBT_PUBLIC_DATA AT_surfxml_host___link_up AX_surfxml_host___link_up; -#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up) -XBT_PUBLIC_DATA short int surfxml_host___link_up_isset; -XBT_PUBLIC_DATA AT_surfxml_include_file AX_surfxml_include_file; -#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file) -XBT_PUBLIC_DATA short int surfxml_include_file_isset; -XBT_PUBLIC_DATA AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth; -#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth) -XBT_PUBLIC_DATA short int surfxml_link_bandwidth_isset; -XBT_PUBLIC_DATA AT_surfxml_link_bandwidth___file AX_surfxml_link_bandwidth___file; -#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file) -XBT_PUBLIC_DATA short int surfxml_link_bandwidth___file_isset; -XBT_PUBLIC_DATA AT_surfxml_link_id AX_surfxml_link_id; -#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id) -XBT_PUBLIC_DATA short int surfxml_link_id_isset; -XBT_PUBLIC_DATA AT_surfxml_link_latency AX_surfxml_link_latency; -#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency) -XBT_PUBLIC_DATA short int surfxml_link_latency_isset; -XBT_PUBLIC_DATA AT_surfxml_link_latency___file AX_surfxml_link_latency___file; -#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file) -XBT_PUBLIC_DATA short int surfxml_link_latency___file_isset; -XBT_PUBLIC_DATA AT_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy; -#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy -XBT_PUBLIC_DATA short int surfxml_link_sharing___policy_isset; -XBT_PUBLIC_DATA AT_surfxml_link_state___file AX_surfxml_link_state___file; -#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file) -XBT_PUBLIC_DATA short int surfxml_link_state___file_isset; -XBT_PUBLIC_DATA AT_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction; -#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction -XBT_PUBLIC_DATA short int surfxml_link___ctn_direction_isset; -XBT_PUBLIC_DATA AT_surfxml_link___ctn_id AX_surfxml_link___ctn_id; -#define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id) -XBT_PUBLIC_DATA short int surfxml_link___ctn_id_isset; -XBT_PUBLIC_DATA AT_surfxml_model___prop_id AX_surfxml_model___prop_id; -#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id) -XBT_PUBLIC_DATA short int surfxml_model___prop_id_isset; -XBT_PUBLIC_DATA AT_surfxml_model___prop_value AX_surfxml_model___prop_value; -#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value) -XBT_PUBLIC_DATA short int surfxml_model___prop_value_isset; -XBT_PUBLIC_DATA AT_surfxml_mount_name AX_surfxml_mount_name; -#define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name) -XBT_PUBLIC_DATA short int surfxml_mount_name_isset; -XBT_PUBLIC_DATA AT_surfxml_mount_storageId AX_surfxml_mount_storageId; -#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId) -XBT_PUBLIC_DATA short int surfxml_mount_storageId_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_availability___file AX_surfxml_peer_availability___file; -#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file) -XBT_PUBLIC_DATA short int surfxml_peer_availability___file_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_bw___in AX_surfxml_peer_bw___in; -#define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in) -XBT_PUBLIC_DATA short int surfxml_peer_bw___in_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_bw___out AX_surfxml_peer_bw___out; -#define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out) -XBT_PUBLIC_DATA short int surfxml_peer_bw___out_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates; -#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates) -XBT_PUBLIC_DATA short int surfxml_peer_coordinates_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_id AX_surfxml_peer_id; -#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id) -XBT_PUBLIC_DATA short int surfxml_peer_id_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_lat AX_surfxml_peer_lat; -#define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat) -XBT_PUBLIC_DATA short int surfxml_peer_lat_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_speed AX_surfxml_peer_speed; -#define A_surfxml_peer_speed (surfxml_bufferstack + AX_surfxml_peer_speed) -XBT_PUBLIC_DATA short int surfxml_peer_speed_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_speed___file AX_surfxml_peer_speed___file; -#define A_surfxml_peer_speed___file (surfxml_bufferstack + AX_surfxml_peer_speed___file) -XBT_PUBLIC_DATA short int surfxml_peer_speed___file_isset; -XBT_PUBLIC_DATA AT_surfxml_peer_state___file AX_surfxml_peer_state___file; -#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file) -XBT_PUBLIC_DATA short int surfxml_peer_state___file_isset; -XBT_PUBLIC_DATA AT_surfxml_platform_version AX_surfxml_platform_version; -#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version) -XBT_PUBLIC_DATA short int surfxml_platform_version_isset; -XBT_PUBLIC_DATA AT_surfxml_process_function AX_surfxml_process_function; -#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function) -XBT_PUBLIC_DATA short int surfxml_process_function_isset; -XBT_PUBLIC_DATA AT_surfxml_process_host AX_surfxml_process_host; -#define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host) -XBT_PUBLIC_DATA short int surfxml_process_host_isset; -XBT_PUBLIC_DATA AT_surfxml_process_kill___time AX_surfxml_process_kill___time; -#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time) -XBT_PUBLIC_DATA short int surfxml_process_kill___time_isset; -XBT_PUBLIC_DATA AT_surfxml_process_on___failure AX_surfxml_process_on___failure; -#define A_surfxml_process_on___failure AX_surfxml_process_on___failure -XBT_PUBLIC_DATA short int surfxml_process_on___failure_isset; -XBT_PUBLIC_DATA AT_surfxml_process_start___time AX_surfxml_process_start___time; -#define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time) -XBT_PUBLIC_DATA short int surfxml_process_start___time_isset; -XBT_PUBLIC_DATA AT_surfxml_prop_id AX_surfxml_prop_id; -#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id) -XBT_PUBLIC_DATA short int surfxml_prop_id_isset; -XBT_PUBLIC_DATA AT_surfxml_prop_value AX_surfxml_prop_value; -#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value) -XBT_PUBLIC_DATA short int surfxml_prop_value_isset; -XBT_PUBLIC_DATA AT_surfxml_random_generator AX_surfxml_random_generator; -#define A_surfxml_random_generator AX_surfxml_random_generator -XBT_PUBLIC_DATA short int surfxml_random_generator_isset; -XBT_PUBLIC_DATA AT_surfxml_random_id AX_surfxml_random_id; -#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id) -XBT_PUBLIC_DATA short int surfxml_random_id_isset; -XBT_PUBLIC_DATA AT_surfxml_random_max AX_surfxml_random_max; -#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max) -XBT_PUBLIC_DATA short int surfxml_random_max_isset; -XBT_PUBLIC_DATA AT_surfxml_random_mean AX_surfxml_random_mean; -#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean) -XBT_PUBLIC_DATA short int surfxml_random_mean_isset; -XBT_PUBLIC_DATA AT_surfxml_random_min AX_surfxml_random_min; -#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min) -XBT_PUBLIC_DATA short int surfxml_random_min_isset; -XBT_PUBLIC_DATA AT_surfxml_random_radical AX_surfxml_random_radical; -#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical) -XBT_PUBLIC_DATA short int surfxml_random_radical_isset; -XBT_PUBLIC_DATA AT_surfxml_random_seed AX_surfxml_random_seed; -#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed) -XBT_PUBLIC_DATA short int surfxml_random_seed_isset; -XBT_PUBLIC_DATA AT_surfxml_random_std___deviation AX_surfxml_random_std___deviation; -#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation) -XBT_PUBLIC_DATA short int surfxml_random_std___deviation_isset; -XBT_PUBLIC_DATA AT_surfxml_route_dst AX_surfxml_route_dst; -#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst) -XBT_PUBLIC_DATA short int surfxml_route_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_route_src AX_surfxml_route_src; -#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src) -XBT_PUBLIC_DATA short int surfxml_route_src_isset; -XBT_PUBLIC_DATA AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical; -#define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical -XBT_PUBLIC_DATA short int surfxml_route_symmetrical_isset; -XBT_PUBLIC_DATA AT_surfxml_router_coordinates AX_surfxml_router_coordinates; -#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates) -XBT_PUBLIC_DATA short int surfxml_router_coordinates_isset; -XBT_PUBLIC_DATA AT_surfxml_router_id AX_surfxml_router_id; -#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id) -XBT_PUBLIC_DATA short int surfxml_router_id_isset; -XBT_PUBLIC_DATA AT_surfxml_storage_attach AX_surfxml_storage_attach; -#define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach) -XBT_PUBLIC_DATA short int surfxml_storage_attach_isset; -XBT_PUBLIC_DATA AT_surfxml_storage_content AX_surfxml_storage_content; -#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content) -XBT_PUBLIC_DATA short int surfxml_storage_content_isset; -XBT_PUBLIC_DATA AT_surfxml_storage_id AX_surfxml_storage_id; -#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id) -XBT_PUBLIC_DATA short int surfxml_storage_id_isset; -XBT_PUBLIC_DATA AT_surfxml_storage_typeId AX_surfxml_storage_typeId; -#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId) -XBT_PUBLIC_DATA short int surfxml_storage_typeId_isset; -XBT_PUBLIC_DATA AT_surfxml_storage___type_content AX_surfxml_storage___type_content; -#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content) -XBT_PUBLIC_DATA short int surfxml_storage___type_content_isset; -XBT_PUBLIC_DATA AT_surfxml_storage___type_id AX_surfxml_storage___type_id; -#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id) -XBT_PUBLIC_DATA short int surfxml_storage___type_id_isset; -XBT_PUBLIC_DATA AT_surfxml_storage___type_model AX_surfxml_storage___type_model; -#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model) -XBT_PUBLIC_DATA short int surfxml_storage___type_model_isset; -XBT_PUBLIC_DATA AT_surfxml_storage___type_size AX_surfxml_storage___type_size; -#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size) -XBT_PUBLIC_DATA short int surfxml_storage___type_size_isset; -XBT_PUBLIC_DATA AT_surfxml_trace_file AX_surfxml_trace_file; -#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file) -XBT_PUBLIC_DATA short int surfxml_trace_file_isset; -XBT_PUBLIC_DATA AT_surfxml_trace_id AX_surfxml_trace_id; -#define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id) -XBT_PUBLIC_DATA short int surfxml_trace_id_isset; -XBT_PUBLIC_DATA AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity; -#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity) -XBT_PUBLIC_DATA short int surfxml_trace_periodicity_isset; -XBT_PUBLIC_DATA AT_surfxml_trace___connect_element AX_surfxml_trace___connect_element; -#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element) -XBT_PUBLIC_DATA short int surfxml_trace___connect_element_isset; -XBT_PUBLIC_DATA AT_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind; -#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind -XBT_PUBLIC_DATA short int surfxml_trace___connect_kind_isset; -XBT_PUBLIC_DATA AT_surfxml_trace___connect_trace AX_surfxml_trace___connect_trace; -#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace) -XBT_PUBLIC_DATA short int surfxml_trace___connect_trace_isset; -XBT_PUBLIC_DATA AT_surfxml_zone_id AX_surfxml_zone_id; -#define A_surfxml_zone_id (surfxml_bufferstack + AX_surfxml_zone_id) -XBT_PUBLIC_DATA short int surfxml_zone_id_isset; -XBT_PUBLIC_DATA AT_surfxml_zone_routing AX_surfxml_zone_routing; -#define A_surfxml_zone_routing (surfxml_bufferstack + AX_surfxml_zone_routing) -XBT_PUBLIC_DATA short int surfxml_zone_routing_isset; -XBT_PUBLIC_DATA AT_surfxml_zoneRoute_dst AX_surfxml_zoneRoute_dst; -#define A_surfxml_zoneRoute_dst (surfxml_bufferstack + AX_surfxml_zoneRoute_dst) -XBT_PUBLIC_DATA short int surfxml_zoneRoute_dst_isset; -XBT_PUBLIC_DATA AT_surfxml_zoneRoute_gw___dst AX_surfxml_zoneRoute_gw___dst; -#define A_surfxml_zoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___dst) -XBT_PUBLIC_DATA short int surfxml_zoneRoute_gw___dst_isset; -XBT_PUBLIC_DATA AT_surfxml_zoneRoute_gw___src AX_surfxml_zoneRoute_gw___src; -#define A_surfxml_zoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___src) -XBT_PUBLIC_DATA short int surfxml_zoneRoute_gw___src_isset; -XBT_PUBLIC_DATA AT_surfxml_zoneRoute_src AX_surfxml_zoneRoute_src; -#define A_surfxml_zoneRoute_src (surfxml_bufferstack + AX_surfxml_zoneRoute_src) -XBT_PUBLIC_DATA short int surfxml_zoneRoute_src_isset; -XBT_PUBLIC_DATA AT_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical; -#define A_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical -XBT_PUBLIC_DATA short int surfxml_zoneRoute_symmetrical_isset; - -/* XML application utilities. */ -XBT_PUBLIC int surfxml_element_context(int); - -/* XML processor entry point. */ -XBT_PUBLIC int yylex(void); - -/* Flexml error handling function (useful only when -q flag passed to flexml) */ -const char * surfxml_parse_err_msg(void); -#endif diff --git a/src/surf/xml/surfxml_parseplatf.cpp b/src/surf/xml/surfxml_parseplatf.cpp deleted file mode 100644 index 951b12a0d4..0000000000 --- a/src/surf/xml/surfxml_parseplatf.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2006-2023. 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 - -#include "src/kernel/resource/CpuImpl.hpp" -#include "src/kernel/resource/LinkImpl.hpp" -#include "src/surf/surf_interface.hpp" -#include "src/surf/xml/platf.hpp" -#include "src/surf/xml/platf_private.hpp" - -#include - -/* Trace related stuff */ -XBT_PRIVATE std::unordered_map traces_set_list; -static std::unordered_map trace_connect_list_host_avail; -static std::unordered_map trace_connect_list_host_speed; -static std::unordered_map trace_connect_list_link_avail; -static std::unordered_map trace_connect_list_link_bw; -static std::unordered_map trace_connect_list_link_lat; - -void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect) -{ - surf_parse_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(), - "Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element + - ": trace unknown"); - - switch (trace_connect->kind) { - case simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL: - trace_connect_list_host_avail.try_emplace(trace_connect->trace, trace_connect->element); - break; - case simgrid::kernel::routing::TraceConnectKind::SPEED: - trace_connect_list_host_speed.try_emplace(trace_connect->trace, trace_connect->element); - break; - case simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL: - trace_connect_list_link_avail.try_emplace(trace_connect->trace, trace_connect->element); - break; - case simgrid::kernel::routing::TraceConnectKind::BANDWIDTH: - trace_connect_list_link_bw.try_emplace(trace_connect->trace, trace_connect->element); - break; - case simgrid::kernel::routing::TraceConnectKind::LATENCY: - trace_connect_list_link_lat.try_emplace(trace_connect->trace, trace_connect->element); - break; - default: - surf_parse_error("Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element + - ": unknown kind of trace"); - } -} - -/* This function acts as a main in the parsing area. */ -void parse_platform_file(const std::string& file) -{ - /* init the flex parser */ - surf_parse_open(file); - - /* Do the actual parsing */ - surf_parse(); - - /* Get the Engine singleton once and for all*/ - const auto engine = simgrid::s4u::Engine::get_instance(); - - /* connect all profiles relative to hosts */ - for (auto const& [trace, name] : trace_connect_list_host_avail) { - surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), - ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); - - auto host = engine->host_by_name_or_null(name); - surf_parse_assert(host, ": Host " + name + " undefined."); - host->set_state_profile(profile); - } - - for (auto const& [trace, name] : trace_connect_list_host_speed) { - surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), - ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); - - auto host = engine->host_by_name_or_null(name); - surf_parse_assert(host, ": Host " + name + " undefined."); - host->set_speed_profile(profile); - } - - for (auto const& [trace, name] : trace_connect_list_link_avail) { - surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), - ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); - - auto link = engine->link_by_name_or_null(name); - surf_parse_assert(link, ": Link " + name + " undefined."); - link->set_state_profile(profile); - } - - for (auto const& [trace, name] : trace_connect_list_link_bw) { - surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), - ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); - - auto link = engine->link_by_name_or_null(name); - surf_parse_assert(link, ": Link " + name + " undefined."); - link->set_bandwidth_profile(profile); - } - - for (auto const& [trace, name] : trace_connect_list_link_lat) { - surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), - ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); - - auto link = engine->link_by_name_or_null(name); - surf_parse_assert(link, ": Link " + name + " undefined."); - link->set_latency_profile(profile); - } - - surf_parse_close(); -} diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp deleted file mode 100644 index ad0431a697..0000000000 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ /dev/null @@ -1,862 +0,0 @@ -/* Copyright (c) 2006-2023. 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 -#include -#include -#include -#include - -#include "simgrid/sg_config.hpp" -#include "src/kernel/resource/LinkImpl.hpp" -#include "src/kernel/resource/profile/FutureEvtSet.hpp" -#include "src/kernel/resource/profile/Profile.hpp" -#include "src/surf/surf_interface.hpp" -#include "src/surf/xml/platf.hpp" -#include "src/surf/xml/platf_private.hpp" - -#include -#include -#include -#include -#include -#include - -#include "simgrid_dtd.c" - -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(platf_parse, ker_platform, "Logging specific to the parsing of platform files"); - -std::string surf_parsed_filename; // Currently parsed file (for the error messages) -static std::vector parsed_link_list; /* temporary store of current link list of a route */ - -/* Helping functions */ -void surf_parse_assert(bool cond, const std::string& msg) -{ - if (not cond) - surf_parse_error(msg); -} - -void surf_parse_error(const std::string& msg) -{ - throw simgrid::ParseError(surf_parsed_filename, surf_parse_lineno, msg); -} - -void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post) -{ - if (simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(hostname) != nullptr) // found - return; - - std::string msg = pre + hostname + post + " Existing netpoints:\n"; - - std::vector netpoints = - simgrid::s4u::Engine::get_instance()->get_all_netpoints(); - std::sort(netpoints.begin(), netpoints.end(), - [](const simgrid::kernel::routing::NetPoint* a, const simgrid::kernel::routing::NetPoint* b) { - return a->get_name() < b->get_name(); - }); - bool first = true; - for (auto const& np : netpoints) { - if (np->is_netzone()) - continue; - - if (not first) - msg += ","; - first = false; - msg += "'" + np->get_name() + "'"; - if (msg.length() > 4096) { - msg.pop_back(); // remove trailing quote - msg += "...(list truncated)......"; - break; - } - } - surf_parse_error(msg); -} - -double surf_parse_get_double(const std::string& s) -{ - try { - return std::stod(s); - } catch (const std::invalid_argument&) { - surf_parse_error(s + " is not a double"); - } -} - -int surf_parse_get_int(const std::string& s) -{ - try { - return std::stoi(s); - } catch (const std::invalid_argument&) { - surf_parse_error(s + " is not an int"); - } -} - -/* Turn something like "1-4,6,9-11" into the vector {1,2,3,4,6,9,10,11} */ -static void explodesRadical(const std::string& radicals, std::vector* exploded) -{ - // Make all hosts - std::vector radical_elements; - boost::split(radical_elements, radicals, boost::is_any_of(",")); - for (auto const& group : radical_elements) { - std::vector radical_ends; - boost::split(radical_ends, group, boost::is_any_of("-")); - int start = surf_parse_get_int(radical_ends.front()); - int end = 0; - - switch (radical_ends.size()) { - case 1: - end = start; - break; - case 2: - end = surf_parse_get_int(radical_ends.back()); - break; - default: - surf_parse_error("Malformed radical: " + group); - } - for (int i = start; i <= end; i++) - exploded->push_back(i); - } -} - - -/* - * All the callback lists that can be overridden anywhere. - * (this list should probably be reduced to the bare minimum to allow the models to work) - */ - -/* make sure these symbols are defined as strong ones in this file so that the linker can resolve them */ - -static std::vector> property_sets; - -static FILE* surf_file_to_parse = nullptr; - -/* Stuff relative to storage */ -void STag_surfxml_storage() -{ - xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); -} - -void ETag_surfxml_storage() -{ - /* Won't happen since is now removed since v3.27. */ -} -void STag_surfxml_storage___type() -{ - xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); -} -void ETag_surfxml_storage___type() -{ - /* Won't happen since is now removed since v3.27. */ -} - -void STag_surfxml_mount() -{ - xbt_die(" tag was removed in SimGrid v3.27. Please stop using it now."); -} - -void ETag_surfxml_mount() -{ - /* Won't happen since is now removed since v3.27. */ -} - -void STag_surfxml_include() -{ - xbt_die(" tag was removed in SimGrid v3.18. Please stop using it now."); -} - -void ETag_surfxml_include() -{ - /* Won't happen since is now removed since v3.18. */ -} - -/* Stag and Etag parse functions */ -void STag_surfxml_platform() { - /* Use fixed point arithmetic to avoid rounding errors ("4.1" for example cannot be represented exactly as a floating - * point number) */ - const long int version = lround(100.0 * surf_parse_get_double(A_surfxml_platform_version)); - const std::string version_string = std::to_string(version / 100) + "." + std::to_string(version % 100); - - surf_parse_assert(version >= 100L, "******* BIG FAT WARNING *********\n " - "You're using an ancient XML file.\n" - "Since SimGrid 3.1, units are Bytes, Flops, and seconds " - "instead of MBytes, MFlops and seconds.\n" - - "Use simgrid_update_xml to update your file automatically. " - "This program is installed automatically with SimGrid, or " - "available in the tools/ directory of the source archive.\n" - - "Please check also out the SURF section of the ChangeLog for " - "the 3.1 version for more information."); - surf_parse_assert(version >= 300L, "******* BIG FAT WARNING *********\n " - "You're using an old XML file.\n" - "Use simgrid_update_xml to update your file automatically. " - "This program is installed automatically with SimGrid, or " - "available in the tools/ directory of the source archive."); - surf_parse_assert( - version >= 400L, - "******* THIS FILE IS TOO OLD (v:" + version_string + - ") *********\n " - "Changes introduced in SimGrid 3.13:\n" - " - 'power' attribute of hosts (and others) got renamed to 'speed'.\n" - " - In , attribute kind=\"POWER\" is now kind=\"SPEED\".\n" - " - DOCTYPE now point to the rignt URL.\n" - " - speed, bandwidth and latency attributes now MUST have an explicit unit (f, Bps, s by default)" - "\n\n" - "Use simgrid_update_xml to update your file automatically. " - "This program is installed automatically with SimGrid, or " - "available in the tools/ directory of the source archive."); - if (version < 410L) { - XBT_INFO("You're using a v%s XML file (%s) while the current standard is v4.1 " - "That's fine, the new version is backward compatible. \n\n" - "Use simgrid_update_xml to update your file automatically to get rid of this warning. " - "This program is installed automatically with SimGrid, or " - "available in the tools/ directory of the source archive.", - version_string.c_str(), surf_parsed_filename.c_str()); - } - surf_parse_assert(version <= 410L, "******* THIS FILE COMES FROM THE FUTURE (v:" + version_string + - ") *********\n " - "The most recent formalism that this version of SimGrid understands is v4.1.\n" - "Please update your code, or use another, more adapted, file."); -} -void ETag_surfxml_platform(){ - simgrid::s4u::Engine::on_platform_created(); -} - -void STag_surfxml_prop() -{ - property_sets.back().try_emplace(A_surfxml_prop_id, A_surfxml_prop_value); - XBT_DEBUG("add prop %s=%s into current property set %p", A_surfxml_prop_id, A_surfxml_prop_value, - &(property_sets.back())); -} - -void STag_surfxml_host() -{ - simgrid::kernel::routing::HostCreationArgs host; - property_sets.emplace_back(); - host.id = A_surfxml_host_id; - - host.speed_per_pstate = xbt_parse_get_all_speeds(surf_parsed_filename, surf_parse_lineno, A_surfxml_host_speed, - "speed of host " + host.id); - - XBT_DEBUG("pstate: %s", A_surfxml_host_pstate); - host.core_amount = surf_parse_get_int(A_surfxml_host_core); - - if (A_surfxml_host_availability___file[0] != '\0') { - XBT_WARN("The availability_file attribute in is now deprecated. Please, use 'speed_file' instead."); - host.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_host_availability___file); - } - if (A_surfxml_host_speed___file[0] != '\0') - host.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_host_speed___file); - host.state_trace = A_surfxml_host_state___file[0] - ? simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_host_state___file) - : nullptr; - host.coord = A_surfxml_host_coordinates; - - sg_platf_new_host_begin(&host); -} - -void ETag_surfxml_host() -{ - sg_platf_new_host_set_properties(property_sets.back()); - property_sets.pop_back(); - - sg_platf_new_host_seal(surf_parse_get_int(A_surfxml_host_pstate)); -} - -void STag_surfxml_disk() { - property_sets.emplace_back(); -} - -void ETag_surfxml_disk() { - simgrid::kernel::routing::DiskCreationArgs disk; - disk.properties = property_sets.back(); - property_sets.pop_back(); - - disk.id = A_surfxml_disk_id; - disk.read_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_disk_read___bw, - "read_bw of disk " + disk.id); - disk.write_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_disk_write___bw, - "write_bw of disk " + disk.id); - - sg_platf_new_disk(&disk); -} - -void STag_surfxml_host___link(){ - XBT_DEBUG("Create a Host_link for %s",A_surfxml_host___link_id); - simgrid::kernel::routing::HostLinkCreationArgs host_link; - - host_link.id = A_surfxml_host___link_id; - host_link.link_up = A_surfxml_host___link_up; - host_link.link_down = A_surfxml_host___link_down; - sg_platf_new_hostlink(&host_link); -} - -void STag_surfxml_router(){ - sg_platf_new_router(A_surfxml_router_id, A_surfxml_router_coordinates); -} - -void ETag_surfxml_cluster(){ - simgrid::kernel::routing::ClusterCreationArgs cluster; - cluster.properties = property_sets.back(); - property_sets.pop_back(); - - cluster.id = A_surfxml_cluster_id; - cluster.prefix = A_surfxml_cluster_prefix; - cluster.suffix = A_surfxml_cluster_suffix; - explodesRadical(A_surfxml_cluster_radical, &cluster.radicals); - - cluster.speeds = xbt_parse_get_all_speeds(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_speed, - "speed of cluster " + cluster.id); - cluster.core_amount = surf_parse_get_int(A_surfxml_cluster_core); - cluster.bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_bw, - "bw of cluster " + cluster.id); - cluster.lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_lat, - "lat of cluster " + cluster.id); - if(strcmp(A_surfxml_cluster_bb___bw,"")) - cluster.bb_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_bb___bw, - "bb_bw of cluster " + cluster.id); - if(strcmp(A_surfxml_cluster_bb___lat,"")) - cluster.bb_lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_bb___lat, - "bb_lat of cluster " + cluster.id); - if(strcmp(A_surfxml_cluster_limiter___link,"")) - cluster.limiter_link = - xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_limiter___link, - "limiter_link of cluster " + cluster.id); - if(strcmp(A_surfxml_cluster_loopback___bw,"")) - cluster.loopback_bw = - xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_loopback___bw, - "loopback_bw of cluster " + cluster.id); - if(strcmp(A_surfxml_cluster_loopback___lat,"")) - cluster.loopback_lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_cluster_loopback___lat, - "loopback_lat of cluster " + cluster.id); - - switch(AX_surfxml_cluster_topology){ - case A_surfxml_cluster_topology_FLAT: - cluster.topology = simgrid::kernel::routing::ClusterTopology::FLAT; - break; - case A_surfxml_cluster_topology_TORUS: - cluster.topology = simgrid::kernel::routing::ClusterTopology::TORUS; - break; - case A_surfxml_cluster_topology_FAT___TREE: - cluster.topology = simgrid::kernel::routing::ClusterTopology::FAT_TREE; - break; - case A_surfxml_cluster_topology_DRAGONFLY: - cluster.topology = simgrid::kernel::routing::ClusterTopology::DRAGONFLY; - break; - default: - surf_parse_error("Invalid cluster topology for cluster " + cluster.id); - } - cluster.topo_parameters = A_surfxml_cluster_topo___parameters; - cluster.router_id = A_surfxml_cluster_router___id; - - switch (AX_surfxml_cluster_sharing___policy) { - case A_surfxml_cluster_sharing___policy_SHARED: - cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SHARED; - break; - case A_surfxml_cluster_sharing___policy_FULLDUPLEX: - XBT_WARN("FULLDUPLEX is now deprecated. Please update your platform file to use SPLITDUPLEX instead."); - cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; - break; - case A_surfxml_cluster_sharing___policy_SPLITDUPLEX: - cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; - break; - case A_surfxml_cluster_sharing___policy_FATPIPE: - cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; - break; - default: - surf_parse_error("Invalid cluster sharing policy for cluster " + cluster.id); - } - switch (AX_surfxml_cluster_bb___sharing___policy) { - case A_surfxml_cluster_bb___sharing___policy_FATPIPE: - cluster.bb_sharing_policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; - break; - case A_surfxml_cluster_bb___sharing___policy_SHARED: - cluster.bb_sharing_policy = simgrid::s4u::Link::SharingPolicy::SHARED; - break; - default: - surf_parse_error("Invalid bb sharing policy in cluster " + cluster.id); - } - - sg_platf_new_tag_cluster(&cluster); -} - -void STag_surfxml_cluster(){ - property_sets.emplace_back(); -} - -void STag_surfxml_cabinet(){ - simgrid::kernel::routing::CabinetCreationArgs cabinet; - cabinet.id = A_surfxml_cabinet_id; - cabinet.prefix = A_surfxml_cabinet_prefix; - cabinet.suffix = A_surfxml_cabinet_suffix; - cabinet.speed = xbt_parse_get_speed(surf_parsed_filename, surf_parse_lineno, A_surfxml_cabinet_speed, - "speed of cabinet " + cabinet.id); - cabinet.bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_cabinet_bw, - "bw of cabinet " + cabinet.id); - cabinet.lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_cabinet_lat, - "lat of cabinet " + cabinet.id); - explodesRadical(A_surfxml_cabinet_radical, &cabinet.radicals); - - sg_platf_new_cabinet(&cabinet); -} - -void STag_surfxml_peer(){ - simgrid::kernel::routing::PeerCreationArgs peer; - - peer.id = A_surfxml_peer_id; - peer.speed = - xbt_parse_get_speed(surf_parsed_filename, surf_parse_lineno, A_surfxml_peer_speed, "speed of peer " + peer.id); - peer.bw_in = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_peer_bw___in, - "bw_in of peer " + peer.id); - peer.bw_out = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_surfxml_peer_bw___out, - "bw_out of peer " + peer.id); - peer.coord = A_surfxml_peer_coordinates; - peer.speed_trace = nullptr; - if (A_surfxml_peer_availability___file[0] != '\0') { - XBT_WARN("The availability_file attribute in is now deprecated. Please, use 'speed_file' instead."); - peer.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_peer_availability___file); - } - if (A_surfxml_peer_speed___file[0] != '\0') - peer.speed_trace = simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_peer_speed___file); - peer.state_trace = A_surfxml_peer_state___file[0] - ? simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_peer_state___file) - : nullptr; - - if (A_surfxml_peer_lat[0] != '\0') - XBT_WARN("The latency attribute in is now deprecated. Use the z coordinate instead of '%s'.", - A_surfxml_peer_lat); - - sg_platf_new_peer(&peer); -} - -void STag_surfxml_link(){ - property_sets.emplace_back(); -} - -void ETag_surfxml_link(){ - simgrid::kernel::routing::LinkCreationArgs link; - - link.properties = property_sets.back(); - property_sets.pop_back(); - - link.id = A_surfxml_link_id; - link.bandwidths = xbt_parse_get_bandwidths(surf_parsed_filename, surf_parse_lineno, A_surfxml_link_bandwidth, - "bandwidth of link " + link.id); - link.bandwidth_trace = A_surfxml_link_bandwidth___file[0] - ? simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_link_bandwidth___file) - : nullptr; - link.latency = - xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_link_latency, "latency of link " + link.id); - link.latency_trace = A_surfxml_link_latency___file[0] - ? simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_link_latency___file) - : nullptr; - link.state_trace = A_surfxml_link_state___file[0] - ? simgrid::kernel::profile::ProfileBuilder::from_file(A_surfxml_link_state___file) - : nullptr; - - switch (A_surfxml_link_sharing___policy) { - case A_surfxml_link_sharing___policy_SHARED: - link.policy = simgrid::s4u::Link::SharingPolicy::SHARED; - break; - case A_surfxml_link_sharing___policy_FATPIPE: - link.policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; - break; - case A_surfxml_link_sharing___policy_FULLDUPLEX: - XBT_WARN("FULLDUPLEX is now deprecated. Please update your platform file to use SPLITDUPLEX instead."); - link.policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; - break; - case A_surfxml_link_sharing___policy_SPLITDUPLEX: - link.policy = simgrid::s4u::Link::SharingPolicy::SPLITDUPLEX; - break; - case A_surfxml_link_sharing___policy_WIFI: - link.policy = simgrid::s4u::Link::SharingPolicy::WIFI; - break; - default: - surf_parse_error("Invalid sharing policy in link " + link.id); - } - - sg_platf_new_link(&link); -} - -void STag_surfxml_link___ctn() -{ - const auto engine = simgrid::s4u::Engine::get_instance(); - const simgrid::s4u::Link* link; - simgrid::s4u::LinkInRoute::Direction direction = simgrid::s4u::LinkInRoute::Direction::NONE; - switch (A_surfxml_link___ctn_direction) { - case AU_surfxml_link___ctn_direction: - case A_surfxml_link___ctn_direction_NONE: - link = engine->link_by_name(A_surfxml_link___ctn_id); - break; - case A_surfxml_link___ctn_direction_UP: - link = engine->split_duplex_link_by_name(A_surfxml_link___ctn_id); - direction = simgrid::s4u::LinkInRoute::Direction::UP; - break; - case A_surfxml_link___ctn_direction_DOWN: - link = engine->split_duplex_link_by_name(A_surfxml_link___ctn_id); - direction = simgrid::s4u::LinkInRoute::Direction::DOWN; - break; - default: - surf_parse_error(std::string("Invalid direction for link ") + A_surfxml_link___ctn_id); - } - - const char* dirname; - switch (A_surfxml_link___ctn_direction) { - case A_surfxml_link___ctn_direction_UP: - dirname = " (upward)"; - break; - case A_surfxml_link___ctn_direction_DOWN: - dirname = " (downward)"; - break; - default: - dirname = ""; - } - surf_parse_assert(link != nullptr, std::string("No such link: '") + A_surfxml_link___ctn_id + "'" + dirname); - parsed_link_list.emplace_back(link, direction); -} - -void ETag_surfxml_backbone() -{ - auto link = std::make_unique(); - - link->id = A_surfxml_backbone_id; - link->bandwidths.push_back(xbt_parse_get_bandwidth( - surf_parsed_filename, surf_parse_lineno, A_surfxml_backbone_bandwidth, "bandwidth of backbone " + link->id)); - link->latency = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_surfxml_backbone_latency, - "latency of backbone " + link->id); - link->policy = simgrid::s4u::Link::SharingPolicy::SHARED; - - routing_cluster_add_backbone(std::move(link)); -} - -void STag_surfxml_route(){ - surf_parse_assert_netpoint(A_surfxml_route_src, "Route src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_route_dst, "Route dst='", "' does name a node."); -} - -void STag_surfxml_ASroute(){ - surf_parse_assert_netpoint(A_surfxml_ASroute_src, "ASroute src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_ASroute_dst, "ASroute dst='", "' does name a node."); - - surf_parse_assert_netpoint(A_surfxml_ASroute_gw___src, "ASroute gw_src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_ASroute_gw___dst, "ASroute gw_dst='", "' does name a node."); -} -void STag_surfxml_zoneRoute(){ - surf_parse_assert_netpoint(A_surfxml_zoneRoute_src, "zoneRoute src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_zoneRoute_dst, "zoneRoute dst='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_zoneRoute_gw___src, "zoneRoute gw_src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_zoneRoute_gw___dst, "zoneRoute gw_dst='", "' does name a node."); -} - -void STag_surfxml_bypassRoute(){ - surf_parse_assert_netpoint(A_surfxml_bypassRoute_src, "bypassRoute src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassRoute_dst, "bypassRoute dst='", "' does name a node."); -} - -void STag_surfxml_bypassASroute(){ - surf_parse_assert_netpoint(A_surfxml_bypassASroute_src, "bypassASroute src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassASroute_dst, "bypassASroute dst='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassASroute_gw___src, "bypassASroute gw_src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassASroute_gw___dst, "bypassASroute gw_dst='", "' does name a node."); -} -void STag_surfxml_bypassZoneRoute(){ - surf_parse_assert_netpoint(A_surfxml_bypassZoneRoute_src, "bypassZoneRoute src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassZoneRoute_dst, "bypassZoneRoute dst='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassZoneRoute_gw___src, "bypassZoneRoute gw_src='", "' does name a node."); - surf_parse_assert_netpoint(A_surfxml_bypassZoneRoute_gw___dst, "bypassZoneRoute gw_dst='", "' does name a node."); -} - -void ETag_surfxml_route(){ - simgrid::kernel::routing::RouteCreationArgs route; - - route.src = sg_netpoint_by_name_or_null(A_surfxml_route_src); // tested to not be nullptr in start tag - route.dst = sg_netpoint_by_name_or_null(A_surfxml_route_dst); // tested to not be nullptr in start tag - route.symmetrical = (A_surfxml_route_symmetrical == AU_surfxml_route_symmetrical || - A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES || - A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_yes); - - route.link_list.swap(parsed_link_list); - - sg_platf_new_route(&route); -} - -void ETag_surfxml_ASroute() -{ - AX_surfxml_zoneRoute_src = AX_surfxml_ASroute_src; - AX_surfxml_zoneRoute_dst = AX_surfxml_ASroute_dst; - AX_surfxml_zoneRoute_gw___src = AX_surfxml_ASroute_gw___src; - AX_surfxml_zoneRoute_gw___dst = AX_surfxml_ASroute_gw___dst; - AX_surfxml_zoneRoute_symmetrical = (AT_surfxml_zoneRoute_symmetrical)AX_surfxml_ASroute_symmetrical; - ETag_surfxml_zoneRoute(); -} -void ETag_surfxml_zoneRoute() -{ - simgrid::kernel::routing::RouteCreationArgs ASroute; - - ASroute.src = sg_netpoint_by_name_or_null(A_surfxml_zoneRoute_src); // tested to not be nullptr in start tag - ASroute.dst = sg_netpoint_by_name_or_null(A_surfxml_zoneRoute_dst); // tested to not be nullptr in start tag - - ASroute.gw_src = sg_netpoint_by_name_or_null(A_surfxml_zoneRoute_gw___src); // tested to not be nullptr in start tag - ASroute.gw_dst = sg_netpoint_by_name_or_null(A_surfxml_zoneRoute_gw___dst); // tested to not be nullptr in start tag - - ASroute.link_list.swap(parsed_link_list); - - ASroute.symmetrical = (A_surfxml_zoneRoute_symmetrical == AU_surfxml_zoneRoute_symmetrical || - A_surfxml_zoneRoute_symmetrical == A_surfxml_zoneRoute_symmetrical_YES || - A_surfxml_zoneRoute_symmetrical == A_surfxml_zoneRoute_symmetrical_yes); - - sg_platf_new_route(&ASroute); -} - -void ETag_surfxml_bypassRoute(){ - simgrid::kernel::routing::RouteCreationArgs route; - - route.src = sg_netpoint_by_name_or_null(A_surfxml_bypassRoute_src); // tested to not be nullptr in start tag - route.dst = sg_netpoint_by_name_or_null(A_surfxml_bypassRoute_dst); // tested to not be nullptr in start tag - route.symmetrical = false; - - route.link_list.swap(parsed_link_list); - - sg_platf_new_bypass_route(&route); -} - -void ETag_surfxml_bypassASroute() -{ - AX_surfxml_bypassZoneRoute_src = AX_surfxml_bypassASroute_src; - AX_surfxml_bypassZoneRoute_dst = AX_surfxml_bypassASroute_dst; - AX_surfxml_bypassZoneRoute_gw___src = AX_surfxml_bypassASroute_gw___src; - AX_surfxml_bypassZoneRoute_gw___dst = AX_surfxml_bypassASroute_gw___dst; - ETag_surfxml_bypassZoneRoute(); -} -void ETag_surfxml_bypassZoneRoute() -{ - simgrid::kernel::routing::RouteCreationArgs ASroute; - - ASroute.src = sg_netpoint_by_name_or_null(A_surfxml_bypassZoneRoute_src); - ASroute.dst = sg_netpoint_by_name_or_null(A_surfxml_bypassZoneRoute_dst); - ASroute.link_list.swap(parsed_link_list); - - ASroute.symmetrical = false; - - ASroute.gw_src = sg_netpoint_by_name_or_null(A_surfxml_bypassZoneRoute_gw___src); - ASroute.gw_dst = sg_netpoint_by_name_or_null(A_surfxml_bypassZoneRoute_gw___dst); - - sg_platf_new_bypass_route(&ASroute); -} - -void ETag_surfxml_trace(){ - simgrid::kernel::routing::ProfileCreationArgs trace; - - trace.id = A_surfxml_trace_id; - trace.file = A_surfxml_trace_file; - trace.periodicity = surf_parse_get_double(A_surfxml_trace_periodicity); - trace.pc_data = surfxml_pcdata; - - sg_platf_new_trace(&trace); -} - -void STag_surfxml_trace___connect() -{ - simgrid::kernel::routing::TraceConnectCreationArgs trace_connect; - - trace_connect.element = A_surfxml_trace___connect_element; - trace_connect.trace = A_surfxml_trace___connect_trace; - - switch (A_surfxml_trace___connect_kind) { - case AU_surfxml_trace___connect_kind: - case A_surfxml_trace___connect_kind_SPEED: - trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::SPEED; - break; - case A_surfxml_trace___connect_kind_BANDWIDTH: - trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::BANDWIDTH; - break; - case A_surfxml_trace___connect_kind_HOST___AVAIL: - trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL; - break; - case A_surfxml_trace___connect_kind_LATENCY: - trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LATENCY; - break; - case A_surfxml_trace___connect_kind_LINK___AVAIL: - trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL; - break; - default: - surf_parse_error("Invalid trace kind"); - } - sg_platf_trace_connect(&trace_connect); -} - -void STag_surfxml_AS() -{ - AX_surfxml_zone_id = AX_surfxml_AS_id; - AX_surfxml_zone_routing = AX_surfxml_AS_routing; - STag_surfxml_zone(); -} - -void ETag_surfxml_AS() -{ - ETag_surfxml_zone(); -} - -void STag_surfxml_zone() -{ - property_sets.emplace_back(); - simgrid::kernel::routing::ZoneCreationArgs zone; - zone.id = A_surfxml_zone_id; - zone.routing = A_surfxml_zone_routing; - sg_platf_new_zone_begin(&zone); -} - -void ETag_surfxml_zone() -{ - sg_platf_new_zone_set_properties(property_sets.back()); - property_sets.pop_back(); - sg_platf_new_zone_seal(); -} - -void STag_surfxml_config() -{ - property_sets.emplace_back(); - XBT_DEBUG("START configuration name = %s",A_surfxml_config_id); - if (_sg_cfg_init_status == 2) { - surf_parse_error("All tags must be given before any platform elements (such as , , , " - ", etc)."); - } -} - -void ETag_surfxml_config() -{ - // Sort config elements before applying. - // That's a little waste of time, but not doing so would break the tests - auto current_property_set = property_sets.back(); - - std::vector keys; - for (auto const& [key, _] : current_property_set) { - keys.push_back(key); - } - std::sort(keys.begin(), keys.end()); - for (const std::string& key : keys) { - if (simgrid::config::is_default(key.c_str())) { - std::string cfg = key + ":" + current_property_set.at(key); - simgrid::config::set_parse(cfg); - } else - XBT_INFO("The custom configuration '%s' is already defined by user!", key.c_str()); - } - XBT_DEBUG("End configuration name = %s",A_surfxml_config_id); - - property_sets.pop_back(); -} - -static std::vector arguments; - -void STag_surfxml_process() -{ - AX_surfxml_actor_function = AX_surfxml_process_function; - STag_surfxml_actor(); -} - -void STag_surfxml_actor() -{ - property_sets.emplace_back(); - arguments.assign(1, A_surfxml_actor_function); -} - -void ETag_surfxml_process() -{ - AX_surfxml_actor_host = AX_surfxml_process_host; - AX_surfxml_actor_function = AX_surfxml_process_function; - AX_surfxml_actor_start___time = AX_surfxml_process_start___time; - AX_surfxml_actor_kill___time = AX_surfxml_process_kill___time; - AX_surfxml_actor_on___failure = (AT_surfxml_actor_on___failure)AX_surfxml_process_on___failure; - ETag_surfxml_actor(); -} - -void ETag_surfxml_actor() -{ - simgrid::kernel::routing::ActorCreationArgs actor; - - actor.properties = property_sets.back(); - property_sets.pop_back(); - - actor.args.swap(arguments); - actor.host = A_surfxml_actor_host; - actor.function = A_surfxml_actor_function; - actor.start_time = surf_parse_get_double(A_surfxml_actor_start___time); - actor.kill_time = surf_parse_get_double(A_surfxml_actor_kill___time); - - switch (A_surfxml_actor_on___failure) { - case AU_surfxml_actor_on___failure: - case A_surfxml_actor_on___failure_DIE: - actor.restart_on_failure = false; - break; - case A_surfxml_actor_on___failure_RESTART: - actor.restart_on_failure = true; - break; - default: - surf_parse_error("Invalid on failure behavior"); - } - - sg_platf_new_actor(&actor); -} - -void STag_surfxml_argument(){ - arguments.emplace_back(A_surfxml_argument_value); -} - -void STag_surfxml_model___prop(){ - XBT_INFO("Deprecated tag ignored"); -} - -void ETag_surfxml_prop(){/* Nothing to do */} -void STag_surfxml_random(){/* Nothing to do */} -void ETag_surfxml_random(){/* Nothing to do */} -void ETag_surfxml_trace___connect() -{ /* Nothing to do */ -} -void STag_surfxml_trace() -{ /* Nothing to do */ -} -void ETag_surfxml_router(){/*Nothing to do*/} -void ETag_surfxml_host___link(){/* Nothing to do */} -void ETag_surfxml_cabinet(){/* Nothing to do */} -void ETag_surfxml_peer(){/* Nothing to do */} -void STag_surfxml_backbone(){/* Nothing to do */} -void ETag_surfxml_link___ctn(){/* Nothing to do */} -void ETag_surfxml_argument(){/* Nothing to do */} -void ETag_surfxml_model___prop(){/* Nothing to do */} - -/* Open and Close parse file */ -static YY_BUFFER_STATE surf_input_buffer; - -void surf_parse_open(const std::string& file) -{ - surf_parsed_filename = file; - std::string dir = simgrid::xbt::Path(file).get_dir_name(); - simgrid::xbt::path_push(dir); - - surf_file_to_parse = simgrid::xbt::path_fopen(file, "r"); - if (surf_file_to_parse == nullptr) - throw std::invalid_argument("Unable to open '" + file + "' from '" + simgrid::xbt::Path().get_name() + - "'. Does this file exist?"); - surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE); - surf_parse__switch_to_buffer(surf_input_buffer); - surf_parse_lineno = 1; -} - -void surf_parse_close() -{ - simgrid::xbt::path_pop(); // remove the dirname of the opened file, that was added in surf_parse_open() - - if (surf_file_to_parse) { - surf_parse__delete_buffer(surf_input_buffer); - fclose(surf_file_to_parse); - surf_file_to_parse = nullptr; //Must be reset for Bypass - } -} - -/* Call the lexer to parse the currently opened file */ -void surf_parse() -{ - bool err = surf_parse_lex(); - surf_parse_assert(not err, "Flex returned an error code"); -} diff --git a/src/xbt/automaton/parserPromela.tab.cacc b/src/xbt/automaton/parserPromela.tab.cacc index 57a86d335c..776faa8fe4 100644 --- a/src/xbt/automaton/parserPromela.tab.cacc +++ b/src/xbt/automaton/parserPromela.tab.cacc @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -304,12 +304,18 @@ typedef int yy_state_fast_t; # define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -525,7 +531,7 @@ static const yytype_int8 yytranslate[] = }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int8 yyrline[] = { 0, 60, 60, 63, 64, 64, 67, 68, 71, 72, @@ -559,17 +565,6 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277 -}; -#endif - #define YYPACT_NINF (-16) #define yypact_value_is_default(Yyn) \ @@ -580,8 +575,8 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int8 yypact[] = { 0, -15, 10, -13, -16, 2, 1, -16, -16, 16, @@ -590,9 +585,9 @@ static const yytype_int8 yypact[] = 8, -16 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int8 yydefact[] = { 0, 0, 0, 3, 1, 0, 0, 4, 2, 0, @@ -601,21 +596,21 @@ static const yytype_int8 yydefact[] = 6, 7 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -16, -16, 4, -16, -7, -9 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { 0, 2, 6, 9, 12, 17 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int8 yytable[] = { 13, 14, 3, 1, 19, 20, 15, 22, 23, 5, @@ -630,8 +625,8 @@ static const yytype_int8 yycheck[] = 4, 13, 5, 30, -1, 7, 15, 22, 24 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int8 yystos[] = { 0, 3, 24, 17, 0, 22, 25, 14, 18, 26, @@ -640,14 +635,14 @@ static const yytype_int8 yystos[] = 22, 27 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { 0, 23, 24, 25, 26, 25, 27, 27, 28, 28, 28, 28, 28, 28 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 4, 0, 0, 8, 0, 6, 3, 3, @@ -663,6 +658,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -703,10 +699,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -733,10 +726,6 @@ yy_symbol_value_print (FILE *yyo, YY_USE (yyoutput); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END @@ -921,6 +910,7 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -946,7 +936,7 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -974,7 +964,7 @@ yysetstate: # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -985,7 +975,7 @@ yysetstate: YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -1007,6 +997,7 @@ yysetstate: } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -1121,53 +1112,53 @@ yyreduce: case 4: /* $@1: %empty */ #line 64 "parserPromela.yacc" { new_state((yyvsp[-1].string), 1);} -#line 1125 "parserPromela.tab.cacc" +#line 1116 "parserPromela.tab.cacc" break; case 7: /* option: CASE exp IMPLIES GOTO ID option */ #line 68 "parserPromela.yacc" { new_transition((yyvsp[-1].string), (yyvsp[-4].label));} -#line 1131 "parserPromela.tab.cacc" +#line 1122 "parserPromela.tab.cacc" break; case 8: /* exp: LEFT_PAR exp RIGHT_PAR */ #line 71 "parserPromela.yacc" { (yyval.label) = (yyvsp[-1].label); } -#line 1137 "parserPromela.tab.cacc" +#line 1128 "parserPromela.tab.cacc" break; case 9: /* exp: exp OR exp */ #line 72 "parserPromela.yacc" { (yyval.label) = xbt_automaton_exp_label_new_or((yyvsp[-2].label), (yyvsp[0].label)); } -#line 1143 "parserPromela.tab.cacc" +#line 1134 "parserPromela.tab.cacc" break; case 10: /* exp: exp AND exp */ #line 73 "parserPromela.yacc" { (yyval.label) = xbt_automaton_exp_label_new_and((yyvsp[-2].label), (yyvsp[0].label)); } -#line 1149 "parserPromela.tab.cacc" +#line 1140 "parserPromela.tab.cacc" break; case 11: /* exp: NOT exp */ #line 74 "parserPromela.yacc" { (yyval.label) = xbt_automaton_exp_label_new_not((yyvsp[0].label)); } -#line 1155 "parserPromela.tab.cacc" +#line 1146 "parserPromela.tab.cacc" break; case 12: /* exp: CASE_TRUE */ #line 75 "parserPromela.yacc" { (yyval.label) = xbt_automaton_exp_label_new_one(); } -#line 1161 "parserPromela.tab.cacc" +#line 1152 "parserPromela.tab.cacc" break; case 13: /* exp: ID */ #line 76 "parserPromela.yacc" { (yyval.label) = xbt_automaton_exp_label_new_predicat((yyvsp[0].string)); } -#line 1167 "parserPromela.tab.cacc" +#line 1158 "parserPromela.tab.cacc" break; -#line 1171 "parserPromela.tab.cacc" +#line 1162 "parserPromela.tab.cacc" default: break; } @@ -1249,6 +1240,7 @@ yyerrorlab: label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -1309,7 +1301,7 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -1317,24 +1309,22 @@ yyacceptlab: `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if !defined yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at diff --git a/src/xbt/automaton/parserPromela.tab.hacc b/src/xbt/automaton/parserPromela.tab.hacc index 66ae1660cd..9579e0bd57 100644 --- a/src/xbt/automaton/parserPromela.tab.hacc +++ b/src/xbt/automaton/parserPromela.tab.hacc @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C @@ -100,6 +100,8 @@ typedef union YYSTYPE YYSTYPE; extern YYSTYPE xbt_automaton_parser_lval; + int xbt_automaton_parser_parse (void); + #endif /* !YY_XBT_AUTOMATON_PARSER_PARSERPROMELA_TAB_HACC_INCLUDED */ diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index bed3b1c177..3cebd1effb 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -3,6 +3,15 @@ /* 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/Exception.hpp" +#include "src/simgrid/sg_config.hpp" +#include "xbt/dynar.h" +#include "xbt/log.h" +#include "xbt/misc.h" +#include "xbt/sysdep.h" +#include +#include + #include #include @@ -18,15 +27,6 @@ #include #include -#include "simgrid/Exception.hpp" -#include "simgrid/sg_config.hpp" -#include "xbt/dynar.h" -#include "xbt/log.h" -#include "xbt/misc.h" -#include "xbt/sysdep.h" -#include -#include - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support"); xbt_cfg_t simgrid_config = nullptr; diff --git a/src/xbt/config_test.cpp b/src/xbt/config_test.cpp index d02767aac8..0c28bac760 100644 --- a/src/xbt/config_test.cpp +++ b/src/xbt/config_test.cpp @@ -9,7 +9,7 @@ #include #include -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" XBT_PUBLIC_DATA simgrid::config::Config* simgrid_config; diff --git a/src/include/xbt/coverage.h b/src/xbt/coverage.h similarity index 100% rename from src/include/xbt/coverage.h rename to src/xbt/coverage.h diff --git a/src/xbt/dict.cpp b/src/xbt/dict.cpp index ef3516d5e0..a155e19a01 100644 --- a/src/xbt/dict.cpp +++ b/src/xbt/dict.cpp @@ -8,12 +8,12 @@ #include "xbt/dict.h" #include "dict_private.h" #include "simgrid/Exception.hpp" +#include "src/xbt/xbt_modinter.h" #include "xbt/ex.h" #include "xbt/log.h" #include "xbt/mallocator.h" #include "xbt/str.h" #include "xbt/string.hpp" -#include "xbt/xbt_modinter.h" #include #include diff --git a/src/xbt/dict_test.cpp b/src/xbt/dict_test.cpp index 23b15cef29..4e7613791e 100644 --- a/src/xbt/dict_test.cpp +++ b/src/xbt/dict_test.cpp @@ -12,7 +12,7 @@ #include #include -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #define STR(str) ((str) ? (str) : "(null)") diff --git a/src/xbt/dynar_test.cpp b/src/xbt/dynar_test.cpp index 56ebb69574..cf36c745ab 100644 --- a/src/xbt/dynar_test.cpp +++ b/src/xbt/dynar_test.cpp @@ -8,7 +8,7 @@ #include "xbt/dynar.h" #include "xbt/sysdep.h" -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include diff --git a/src/xbt/log.cpp b/src/xbt/log.cpp index 88726a9fca..e9c6542863 100644 --- a/src/xbt/log.cpp +++ b/src/xbt/log.cpp @@ -6,9 +6,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/xbt/log_private.hpp" +#include "src/xbt/xbt_modinter.h" #include "xbt/string.hpp" #include "xbt/sysdep.h" -#include "xbt/xbt_modinter.h" #include #include diff --git a/src/xbt/mallocator.c b/src/xbt/mallocator.c index 5e83335611..d5a0a55156 100644 --- a/src/xbt/mallocator.c +++ b/src/xbt/mallocator.c @@ -64,14 +64,15 @@ static inline void lock_release(xbt_mallocator_t m) } /** - * This function must be called once the framework configuration is done. If not, mallocators will never get used. - * Check the implementation notes in src/xbt/mallocator.c for the justification of this. + * This function must be called once the framework configuration is done. mallocators will not get used until it's + * called (check the implementation notes above for more info). * - * For example, surf_config uses this function to tell to the mallocators that the simgrid configuration is now - * finished and that it can create them if not done yet */ -void xbt_mallocator_initialization_is_done(int protect) + * sg_config uses this function to inform the mallocators when simgrid is configured, and whether lock protection is + * needed. + */ +void xbt_mallocator_initialization_is_done(int need_protection) { - initialization_done = protect ? 2 : 1; + initialization_done = need_protection ? 2 : 1; } /** used by the module to know if it's time to activate the mallocators yet */ diff --git a/src/xbt/mmalloc/mfree.c b/src/xbt/mmalloc/mfree.c index 423d78a5e2..8572826534 100644 --- a/src/xbt/mmalloc/mfree.c +++ b/src/xbt/mmalloc/mfree.c @@ -11,7 +11,7 @@ Heavily modified Mar 1992 by Fred Fish. (fnf@cygnus.com) */ #include "mmprivate.h" -#include "mc/mc.h" +#include "src/mc/mc.h" /* Return memory to the heap. Like `mfree' but don't call a mfree_hook if there is one. */ diff --git a/src/include/xbt/mmalloc.h b/src/xbt/mmalloc/mmalloc.h similarity index 100% rename from src/include/xbt/mmalloc.h rename to src/xbt/mmalloc/mmalloc.h diff --git a/src/xbt/mmalloc/mmprivate.h b/src/xbt/mmalloc/mmprivate.h index 216e5eb2d9..e7ae79a573 100644 --- a/src/xbt/mmalloc/mmprivate.h +++ b/src/xbt/mmalloc/mmprivate.h @@ -13,9 +13,9 @@ #ifndef XBT_MMPRIVATE_H #define XBT_MMPRIVATE_H 1 -#include "swag.h" #include "src/internal_config.h" -#include "xbt/mmalloc.h" +#include "src/xbt/mmalloc/mmalloc.h" +#include "swag.h" #include #include diff --git a/src/include/xbt/parmap.hpp b/src/xbt/parmap.hpp similarity index 95% rename from src/include/xbt/parmap.hpp rename to src/xbt/parmap.hpp index 8250bf5487..d8b5eb722c 100644 --- a/src/include/xbt/parmap.hpp +++ b/src/xbt/parmap.hpp @@ -39,7 +39,7 @@ namespace simgrid::xbt { template class Parmap { public: Parmap(unsigned num_workers, e_xbt_parmap_mode_t mode); - Parmap(const Parmap&) = delete; + Parmap(const Parmap&) = delete; Parmap& operator=(const Parmap&) = delete; ~Parmap(); void apply(std::function&& fun, const std::vector& data); @@ -139,11 +139,11 @@ private: bool destroying = false; /**< is the parmap being destroyed? */ std::atomic_uint work_round{0}; /**< index of the current round */ std::vector workers; /**< worker thread handlers */ - unsigned num_workers; /**< total number of worker threads including the controller */ - Synchro* synchro; /**< synchronization object */ + unsigned num_workers; /**< total number of worker threads including the controller */ + Synchro* synchro; /**< synchronization object */ - std::atomic_uint thread_counter{0}; /**< number of workers that have done the work */ - std::function worker_fun; /**< function to run in parallel on each element of data */ + std::atomic_uint thread_counter{0}; /**< number of workers that have done the work */ + std::function worker_fun; /**< function to run in parallel on each element of data */ const std::vector* common_data = nullptr; /**< parameters to pass to fun in parallel */ std::atomic_uint common_index{0}; /**< index of the next element of data to pick */ }; @@ -283,8 +283,8 @@ template typename Parmap::Synchro* Parmap::new_synchro(e_xbt_ template void Parmap::worker_main(ThreadData* data) { auto engine = simgrid::kernel::EngineImpl::get_instance(); - Parmap& parmap = data->parmap; - unsigned round = 0; + Parmap& parmap = data->parmap; + unsigned round = 0; kernel::context::Context* context = engine->get_context_factory()->create_context(std::function(), nullptr); kernel::context::Context::set_current(context); diff --git a/src/xbt/random_test.cpp b/src/xbt/random_test.cpp index b43579f83c..e5f23befb4 100644 --- a/src/xbt/random_test.cpp +++ b/src/xbt/random_test.cpp @@ -3,11 +3,11 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" #include "xbt/log.h" #include "xbt/random.hpp" -#include #include +#include #define EpsilonApprox(a) Catch::Matchers::WithinAbs((a), 100 * std::numeric_limits::epsilon()) diff --git a/src/xbt/unit-tests_main.cpp b/src/xbt/unit-tests_main.cpp index 51cc11f47c..6654841f33 100644 --- a/src/xbt/unit-tests_main.cpp +++ b/src/xbt/unit-tests_main.cpp @@ -5,7 +5,7 @@ #define CATCH_CONFIG_RUNNER // we supply our own main() -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include "xbt/log.h" diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 8e70ab99c8..ee40cfc25f 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -8,18 +8,18 @@ #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */ #include "simgrid/config.h" -#include "simgrid/sg_config.hpp" #include "src/internal_config.h" +#include "src/simgrid/sg_config.hpp" #include "src/sthread/sthread.h" // sthread_inside_simgrid +#include "src/xbt/coverage.h" +#include "src/xbt/xbt_modinter.h" /* prototype of other module's init/exit in XBT */ #include "xbt/config.hpp" -#include "xbt/coverage.h" #include "xbt/dynar.h" #include "xbt/log.h" #include "xbt/log.hpp" #include "xbt/misc.h" #include "xbt/module.h" /* this module */ #include "xbt/sysdep.h" -#include "xbt/xbt_modinter.h" /* prototype of other module's init/exit in XBT */ #include #include diff --git a/src/include/xbt/xbt_modinter.h b/src/xbt/xbt_modinter.h similarity index 95% rename from src/include/xbt/xbt_modinter.h rename to src/xbt/xbt_modinter.h index 5077da522f..6eee62f40f 100644 --- a/src/include/xbt/xbt_modinter.h +++ b/src/xbt/xbt_modinter.h @@ -8,7 +8,6 @@ #ifndef XBT_MODINTER_H #define XBT_MODINTER_H #include "xbt/misc.h" -#include "xbt/mmalloc.h" SG_BEGIN_DECL diff --git a/src/xbt/xbt_str_test.cpp b/src/xbt/xbt_str_test.cpp index 394d509392..1b98a83ca8 100644 --- a/src/xbt/xbt_str_test.cpp +++ b/src/xbt/xbt_str_test.cpp @@ -10,7 +10,7 @@ #include "simgrid/Exception.hpp" -#include "catch.hpp" +#include "src/3rd-party/catch.hpp" #include #include diff --git a/teshsuite/catch_simgrid.cpp b/teshsuite/catch_simgrid.cpp index de6c217fd0..21c2dc1800 100644 --- a/teshsuite/catch_simgrid.cpp +++ b/teshsuite/catch_simgrid.cpp @@ -5,7 +5,7 @@ #define CATCH_CONFIG_RUNNER // we supply our own main() -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" #include diff --git a/src/include/catch_simgrid.hpp b/teshsuite/catch_simgrid.hpp similarity index 98% rename from src/include/catch_simgrid.hpp rename to teshsuite/catch_simgrid.hpp index f05c81b302..5da78608e6 100644 --- a/src/include/catch_simgrid.hpp +++ b/teshsuite/catch_simgrid.hpp @@ -6,7 +6,7 @@ #ifndef ACTIVITY_LIFECYCLE_HPP #define ACTIVITY_LIFECYCLE_HPP -#include +#include "src/3rd-party/catch.hpp" #include #include diff --git a/teshsuite/mc/dwarf/dwarf.cpp b/teshsuite/mc/dwarf/dwarf.cpp index 6548c502d8..18a0c3121f 100644 --- a/teshsuite/mc/dwarf/dwarf.cpp +++ b/teshsuite/mc/dwarf/dwarf.cpp @@ -7,10 +7,10 @@ #undef NDEBUG #endif -#include #include -#include "mc/datatypes.h" +#include "src/mc/datatypes.h" +#include "src/mc/mc.h" #include "src/mc/mc_private.hpp" #include "src/mc/inspect/ObjectInformation.hpp" diff --git a/teshsuite/models/CMakeLists.txt b/teshsuite/models/CMakeLists.txt index 2a3644e9a2..407b1bb124 100644 --- a/teshsuite/models/CMakeLists.txt +++ b/teshsuite/models/CMakeLists.txt @@ -6,7 +6,8 @@ else() set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh) endforeach() endif() -foreach(x cloud-sharing ptask_L07_usage wifi_usage wifi_usage_decay cm02-set-lat-bw cm02-tcpgamma issue105 ${optional_examples}) +foreach(x lmm_usage core_usage core_usage2 + cloud-sharing ptask_L07_usage wifi_usage wifi_usage_decay cm02-set-lat-bw cm02-tcpgamma issue105 ${optional_examples}) add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp) target_link_libraries(${x} simgrid) set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) @@ -34,6 +35,17 @@ foreach(x cm02-set-lat-bw) endif() endforeach() +# Benchmarking MaxMin +add_executable (maxmin_bench EXCLUDE_FROM_ALL maxmin_bench/maxmin_bench.cpp) +target_link_libraries(maxmin_bench simgrid) +set_target_properties(maxmin_bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/maxmin_bench) +set_property(TARGET maxmin_bench APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") +add_dependencies(tests maxmin_bench) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench.cpp) +foreach(x small medium large) + set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench_${x}.tesh) + ADD_TESH(tesh-maxmin-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/models/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/models/maxmin_bench maxmin_bench_${x}.tesh) +endforeach() set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) set(tesh_files ${tesh_files} PARENT_SCOPE) diff --git a/teshsuite/surf/surf_usage/surf_usage.cpp b/teshsuite/models/core_usage/core_usage.cpp similarity index 92% rename from teshsuite/surf/surf_usage/surf_usage.cpp rename to teshsuite/models/core_usage/core_usage.cpp index aa78b59ca1..a2948c761e 100644 --- a/teshsuite/surf/surf_usage/surf_usage.cpp +++ b/teshsuite/models/core_usage/core_usage.cpp @@ -1,4 +1,4 @@ -/* A few basic tests for the surf library */ +/* A few basic tests for the model solving mechanism */ /* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */ @@ -14,21 +14,21 @@ #include "src/kernel/resource/NetworkModel.hpp" #include "xbt/config.hpp" -XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(core_usage, "Messages specific to this test case"); static const char* string_action(simgrid::kernel::resource::Action::State state) { switch (state) { case simgrid::kernel::resource::Action::State::INITED: - return "SURF_ACTION_INITED"; + return "ACTION_INITED"; case simgrid::kernel::resource::Action::State::STARTED: - return "SURF_ACTION_RUNNING"; + return "ACTION_RUNNING"; case simgrid::kernel::resource::Action::State::FAILED: - return "SURF_ACTION_FAILED"; + return "ACTION_FAILED"; case simgrid::kernel::resource::Action::State::FINISHED: - return "SURF_ACTION_DONE"; + return "ACTION_DONE"; case simgrid::kernel::resource::Action::State::IGNORED: - return "SURF_ACTION_IGNORED"; + return "ACTION_IGNORED"; default: return "INVALID STATE"; } diff --git a/teshsuite/models/core_usage/core_usage.tesh b/teshsuite/models/core_usage/core_usage.tesh new file mode 100644 index 0000000000..4c286bd27a --- /dev/null +++ b/teshsuite/models/core_usage/core_usage.tesh @@ -0,0 +1,68 @@ +#!/usr/bin/env tesh + +$ ${bindir:=.}/core_usage ${platfdir}/two_hosts_profiles.xml +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02' +> [0.000000] [core_usage/INFO] actionA state: ACTION_RUNNING +> [0.000000] [core_usage/INFO] actionB state: ACTION_RUNNING +> [0.000000] [core_usage/INFO] actionC state: ACTION_RUNNING +> [0.200000] [core_usage/INFO] Next Event : 0.2 +> [0.200016] [core_usage/INFO] Next Event : 0.200016 +> [0.200016] [core_usage/INFO] Network Done action +> [1.000000] [core_usage/INFO] Next Event : 1 +> [1.000000] [core_usage/INFO] CPU Failed action +> [2.000000] [core_usage/INFO] Next Event : 2 +> [7.320000] [core_usage/INFO] Next Event : 7.32 +> [7.320000] [core_usage/INFO] CPU Done action +> [10.000000] [core_usage/INFO] Next Event : 10 +> [11.000000] [core_usage/INFO] Next Event : 11 +> [12.000000] [core_usage/INFO] Next Event : 12 +> [20.000000] [core_usage/INFO] Next Event : 20 +> [21.000000] [core_usage/INFO] Next Event : 21 +> [22.000000] [core_usage/INFO] Next Event : 22 +> [30.000000] [core_usage/INFO] Next Event : 30 +> [31.000000] [core_usage/INFO] Next Event : 31 +> [32.000000] [core_usage/INFO] Next Event : 32 +> [40.000000] [core_usage/INFO] Next Event : 40 +> [41.000000] [core_usage/INFO] Next Event : 41 +> [42.000000] [core_usage/INFO] Next Event : 42 +> [50.000000] [core_usage/INFO] Next Event : 50 +> [51.000000] [core_usage/INFO] Next Event : 51 +> [52.000000] [core_usage/INFO] Next Event : 52 +> [53.000000] [core_usage/INFO] Next Event : 53 +> [60.000000] [core_usage/INFO] Next Event : 60 +> [61.000000] [core_usage/INFO] Next Event : 61 +> [62.000000] [core_usage/INFO] Next Event : 62 +> [63.000000] [core_usage/INFO] Next Event : 63 +> [70.000000] [core_usage/INFO] Next Event : 70 +> [71.000000] [core_usage/INFO] Next Event : 71 +> [72.000000] [core_usage/INFO] Next Event : 72 +> [74.000000] [core_usage/INFO] Next Event : 74 +> [80.000000] [core_usage/INFO] Next Event : 80 +> [81.000000] [core_usage/INFO] Next Event : 81 +> [82.000000] [core_usage/INFO] Next Event : 82 +> [83.000000] [core_usage/INFO] Next Event : 83 +> [84.000000] [core_usage/INFO] Next Event : 84 +> [90.000000] [core_usage/INFO] Next Event : 90 +> [91.000000] [core_usage/INFO] Next Event : 91 +> [92.000000] [core_usage/INFO] Next Event : 92 +> [95.000000] [core_usage/INFO] Next Event : 95 +> [100.000000] [core_usage/INFO] Next Event : 100 +> [101.000000] [core_usage/INFO] Next Event : 101 +> [102.000000] [core_usage/INFO] Next Event : 102 +> [104.000000] [core_usage/INFO] Next Event : 104 +> [105.000000] [core_usage/INFO] Next Event : 105 +> [110.000000] [core_usage/INFO] Next Event : 110 +> [111.000000] [core_usage/INFO] Next Event : 111 +> [112.000000] [core_usage/INFO] Next Event : 112 +> [116.000000] [core_usage/INFO] Next Event : 116 +> [120.000000] [core_usage/INFO] Next Event : 120 +> [121.000000] [core_usage/INFO] Next Event : 121 +> [122.000000] [core_usage/INFO] Next Event : 122 +> [125.000000] [core_usage/INFO] Next Event : 125 +> [126.000000] [core_usage/INFO] Next Event : 126 +> [130.000000] [core_usage/INFO] Next Event : 130 +> [131.000000] [core_usage/INFO] Next Event : 131 +> [132.000000] [core_usage/INFO] Next Event : 132 +> [132.500000] [core_usage/INFO] Next Event : 132.5 +> [132.500000] [core_usage/INFO] CPU Done action diff --git a/teshsuite/surf/surf_usage2/surf_usage2.cpp b/teshsuite/models/core_usage2/core_usage2.cpp similarity index 93% rename from teshsuite/surf/surf_usage2/surf_usage2.cpp rename to teshsuite/models/core_usage2/core_usage2.cpp index c8a2859381..608c7ac1a8 100644 --- a/teshsuite/surf/surf_usage2/surf_usage2.cpp +++ b/teshsuite/models/core_usage2/core_usage2.cpp @@ -1,4 +1,4 @@ -/* A few basic tests for the surf library */ +/* A few basic tests for the model solving mechanism */ /* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */ @@ -12,10 +12,9 @@ #include "src/kernel/EngineImpl.hpp" #include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/config.hpp" -XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(core_usage2, "Messages specific to this test case"); int main(int argc, char** argv) { diff --git a/teshsuite/models/core_usage2/core_usage2.tesh b/teshsuite/models/core_usage2/core_usage2.tesh new file mode 100644 index 0000000000..9be15bce43 --- /dev/null +++ b/teshsuite/models/core_usage2/core_usage2.tesh @@ -0,0 +1,66 @@ +#!/usr/bin/env tesh + +$ ${bindir:=.}/core_usage2 ${platfdir}/two_hosts_profiles.xml +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01' +> [0.200000] [core_usage2/INFO] Next Event : 0.2 +> [0.200016] [core_usage2/INFO] Next Event : 0.200016 +> [0.200016] [core_usage2/INFO] * Done Action +> [1.000000] [core_usage2/INFO] Next Event : 1 +> [1.000000] [core_usage2/INFO] * Done Action +> [2.000000] [core_usage2/INFO] Next Event : 2 +> [7.320000] [core_usage2/INFO] Next Event : 7.32 +> [7.320000] [core_usage2/INFO] * Done Action +> [10.000000] [core_usage2/INFO] Next Event : 10 +> [11.000000] [core_usage2/INFO] Next Event : 11 +> [12.000000] [core_usage2/INFO] Next Event : 12 +> [20.000000] [core_usage2/INFO] Next Event : 20 +> [21.000000] [core_usage2/INFO] Next Event : 21 +> [22.000000] [core_usage2/INFO] Next Event : 22 +> [30.000000] [core_usage2/INFO] Next Event : 30 +> [31.000000] [core_usage2/INFO] Next Event : 31 +> [32.000000] [core_usage2/INFO] Next Event : 32 +> [40.000000] [core_usage2/INFO] Next Event : 40 +> [41.000000] [core_usage2/INFO] Next Event : 41 +> [42.000000] [core_usage2/INFO] Next Event : 42 +> [50.000000] [core_usage2/INFO] Next Event : 50 +> [51.000000] [core_usage2/INFO] Next Event : 51 +> [52.000000] [core_usage2/INFO] Next Event : 52 +> [53.000000] [core_usage2/INFO] Next Event : 53 +> [60.000000] [core_usage2/INFO] Next Event : 60 +> [61.000000] [core_usage2/INFO] Next Event : 61 +> [62.000000] [core_usage2/INFO] Next Event : 62 +> [63.000000] [core_usage2/INFO] Next Event : 63 +> [70.000000] [core_usage2/INFO] Next Event : 70 +> [71.000000] [core_usage2/INFO] Next Event : 71 +> [72.000000] [core_usage2/INFO] Next Event : 72 +> [74.000000] [core_usage2/INFO] Next Event : 74 +> [80.000000] [core_usage2/INFO] Next Event : 80 +> [81.000000] [core_usage2/INFO] Next Event : 81 +> [82.000000] [core_usage2/INFO] Next Event : 82 +> [83.000000] [core_usage2/INFO] Next Event : 83 +> [84.000000] [core_usage2/INFO] Next Event : 84 +> [90.000000] [core_usage2/INFO] Next Event : 90 +> [91.000000] [core_usage2/INFO] Next Event : 91 +> [92.000000] [core_usage2/INFO] Next Event : 92 +> [95.000000] [core_usage2/INFO] Next Event : 95 +> [100.000000] [core_usage2/INFO] Next Event : 100 +> [101.000000] [core_usage2/INFO] Next Event : 101 +> [102.000000] [core_usage2/INFO] Next Event : 102 +> [104.000000] [core_usage2/INFO] Next Event : 104 +> [105.000000] [core_usage2/INFO] Next Event : 105 +> [110.000000] [core_usage2/INFO] Next Event : 110 +> [111.000000] [core_usage2/INFO] Next Event : 111 +> [112.000000] [core_usage2/INFO] Next Event : 112 +> [116.000000] [core_usage2/INFO] Next Event : 116 +> [120.000000] [core_usage2/INFO] Next Event : 120 +> [121.000000] [core_usage2/INFO] Next Event : 121 +> [122.000000] [core_usage2/INFO] Next Event : 122 +> [125.000000] [core_usage2/INFO] Next Event : 125 +> [126.000000] [core_usage2/INFO] Next Event : 126 +> [130.000000] [core_usage2/INFO] Next Event : 130 +> [131.000000] [core_usage2/INFO] Next Event : 131 +> [132.000000] [core_usage2/INFO] Next Event : 132 +> [132.500000] [core_usage2/INFO] Next Event : 132.5 +> [132.500000] [core_usage2/INFO] * Done Action +> [132.500000] [core_usage2/INFO] Simulation Terminated diff --git a/teshsuite/surf/lmm_usage/lmm_usage.cpp b/teshsuite/models/lmm_usage/lmm_usage.cpp similarity index 80% rename from teshsuite/surf/lmm_usage/lmm_usage.cpp rename to teshsuite/models/lmm_usage/lmm_usage.cpp index 6e841acadd..c37cfdc0c1 100644 --- a/teshsuite/surf/lmm_usage/lmm_usage.cpp +++ b/teshsuite/models/lmm_usage/lmm_usage.cpp @@ -7,7 +7,6 @@ #include "simgrid/s4u/Engine.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "src/surf/surf_interface.hpp" #include "xbt/log.h" #include "xbt/module.h" #include "xbt/sysdep.h" @@ -15,7 +14,7 @@ #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific for this example"); namespace lmm = simgrid::kernel::lmm; @@ -111,21 +110,21 @@ static void test3() } /*matrix that store the constraints/topology */ - A[0][1] = A[0][7] = 1.0; - A[1][1] = A[1][7] = A[1][8] = 1.0; - A[2][1] = A[2][8] = 1.0; - A[3][8] = 1.0; - A[4][0] = A[4][3] = A[4][9] = 1.0; - A[5][0] = A[5][3] = A[5][4] = A[5][9] = 1.0; - A[6][0] = A[6][4] = A[6][9] = A[6][10] = 1.0; + A[0][1] = A[0][7] = 1.0; + A[1][1] = A[1][7] = A[1][8] = 1.0; + A[2][1] = A[2][8] = 1.0; + A[3][8] = 1.0; + A[4][0] = A[4][3] = A[4][9] = 1.0; + A[5][0] = A[5][3] = A[5][4] = A[5][9] = 1.0; + A[6][0] = A[6][4] = A[6][9] = A[6][10] = 1.0; A[7][2] = A[7][4] = A[7][6] = A[7][9] = A[7][10] = 1.0; - A[8][2] = A[8][10] = 1.0; - A[9][5] = A[9][6] = A[9][9] = 1.0; - A[10][11] = 1.0; - A[11][12] = 1.0; - A[12][13] = 1.0; - A[13][14] = 1.0; - A[14][15] = 1.0; + A[8][2] = A[8][10] = 1.0; + A[9][5] = A[9][6] = A[9][9] = 1.0; + A[10][11] = 1.0; + A[11][12] = 1.0; + A[12][13] = 1.0; + A[13][14] = 1.0; + A[14][15] = 1.0; lmm::MaxMin Sys(false); diff --git a/teshsuite/models/lmm_usage/lmm_usage.tesh b/teshsuite/models/lmm_usage/lmm_usage.tesh new file mode 100644 index 0000000000..77ce1b73dc --- /dev/null +++ b/teshsuite/models/lmm_usage/lmm_usage.tesh @@ -0,0 +1,6 @@ +#!/usr/bin/env tesh + +$ ${bindir:=.}/lmm_usage +> [0.000000] [test/INFO] ***** Test 1 +> [0.000000] [test/INFO] ***** Test 2 +> [0.000000] [test/INFO] ***** Test 3 diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench.cpp b/teshsuite/models/maxmin_bench/maxmin_bench.cpp similarity index 71% rename from teshsuite/surf/maxmin_bench/maxmin_bench.cpp rename to teshsuite/models/maxmin_bench/maxmin_bench.cpp index d316afdf42..d905956d18 100644 --- a/teshsuite/surf/maxmin_bench/maxmin_bench.cpp +++ b/teshsuite/models/maxmin_bench/maxmin_bench.cpp @@ -5,8 +5,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/kernel/lmm/maxmin.hpp" #include "simgrid/s4u/Engine.hpp" +#include "src/kernel/lmm/maxmin.hpp" #include "xbt/module.h" #include "xbt/random.hpp" #include "xbt/sysdep.h" /* time manipulation for benchmarking */ @@ -41,7 +41,7 @@ static double test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_li for (auto& var : variables) { var = Sys.variable_new(nullptr, 1.0, -1.0, nb_elem); - //Have a few variables with a concurrency share of two (e.g. cross-traffic in some cases) + // Have a few variables with a concurrency share of two (e.g. cross-traffic in some cases) short concurrency_share = 1 + static_cast(simgrid::xbt::random::uniform_int(0, max_share - 1)); std::vector used(nb_cnst, 0); @@ -61,22 +61,22 @@ static double test(int nb_cnst, int nb_var, int nb_elem, unsigned int pw_base_li Sys.solve(); date = (xbt_os_time() - date) * 1e6; - if(mode==2){ - fprintf(stderr,"Max concurrency:\n"); - int l=0; + if (mode == 2) { + fprintf(stderr, "Max concurrency:\n"); + int l = 0; for (int i = 0; i < nb_cnst; i++) { int j = constraints[i]->get_concurrency_maximum(); int k = constraints[i]->get_concurrency_limit(); - xbt_assert(k<0 || j<=k); - if(j>l) - l=j; - fprintf(stderr,"(%i):%i/%i ",i,j,k); + xbt_assert(k < 0 || j <= k); + if (j > l) + l = j; + fprintf(stderr, "(%i):%i/%i ", i, j, k); constraints[i]->reset_concurrency_maximum(); xbt_assert(not constraints[i]->get_concurrency_maximum()); - if(i%10==9) - fprintf(stderr,"\n"); + if (i % 10 == 9) + fprintf(stderr, "\n"); } - fprintf(stderr,"\nTotal maximum concurrency is %i\n",l); + fprintf(stderr, "\nTotal maximum concurrency is %i\n", l); Sys.print(); } @@ -95,7 +95,7 @@ constexpr std::array, 4> TestClasses{{ {{20000, 20000, 7, 10}} // huge }}; -int main(int argc, char **argv) +int main(int argc, char** argv) { simgrid::s4u::Engine e(&argc, argv); @@ -104,12 +104,12 @@ int main(int argc, char **argv) double acc_date2 = 0.0; int testclass; - if(argc<3) { + if (argc < 3) { fprintf(stderr, "Syntax: [test|debug|perf]\n"); return -1; } - //what class? + // what class? if (not strcmp(argv[1], "small")) testclass = 0; else if (not strcmp(argv[1], "medium")) @@ -119,57 +119,58 @@ int main(int argc, char **argv) else if (not strcmp(argv[1], "huge")) testclass = 3; else { - fprintf(stderr, "Unknown class \"%s\", aborting!\n",argv[1]); + fprintf(stderr, "Unknown class \"%s\", aborting!\n", argv[1]); return -2; } - //How many times? - int testcount=atoi(argv[2]); + // How many times? + int testcount = atoi(argv[2]); - //Show me everything (debug or performance)! - int mode=0; - if(argc>=4 && strcmp(argv[3],"test")==0) - mode=1; - if(argc>=4 && strcmp(argv[3],"debug")==0) - mode=2; - if(argc>=4 && strcmp(argv[3],"perf")==0) - mode=3; + // Show me everything (debug or performance)! + int mode = 0; + if (argc >= 4 && strcmp(argv[3], "test") == 0) + mode = 1; + if (argc >= 4 && strcmp(argv[3], "debug") == 0) + mode = 2; + if (argc >= 4 && strcmp(argv[3], "perf") == 0) + mode = 3; - if(mode==1) + if (mode == 1) xbt_log_control_set("ker_lmm.threshold:DEBUG ker_lmm.fmt:'[%r]: [%c/%p] %m%n' " "kernel.threshold:DEBUG kernel.fmt:'[%r]: [%c/%p] %m%n' "); - if(mode==2) + if (mode == 2) xbt_log_control_set("ker_lmm.threshold:DEBUG kernel.threshold:DEBUG"); - unsigned int nb_cnst= TestClasses[testclass][0]; - unsigned int nb_var= TestClasses[testclass][1]; - unsigned int pw_base_limit= TestClasses[testclass][2]; - unsigned int pw_max_limit= TestClasses[testclass][3]; - unsigned int max_share = 2; // 1<<(pw_base_limit/2+1) + unsigned int nb_cnst = TestClasses[testclass][0]; + unsigned int nb_var = TestClasses[testclass][1]; + unsigned int pw_base_limit = TestClasses[testclass][2]; + unsigned int pw_max_limit = TestClasses[testclass][3]; + unsigned int max_share = 2; // 1<<(pw_base_limit/2+1) - //If you want to test concurrency, you need nb_elem >> 2^pw_base_limit: - unsigned int nb_elem= (1<> 2^pw_base_limit: + unsigned int nb_elem = (1 << pw_base_limit) + (1 << (8 * pw_max_limit / 10)); + // Otherwise, just set it to a constant value (and set rate_no_limit to 1.0): + // nb_elem=200 - for(int i=0;i(testcount); double stdev_date = sqrt(acc_date2 / static_cast(testcount) - mean_date * mean_date); - fprintf(stderr, "%ix One shot execution time for a total of %u constraints, " - "%u variables with %u active constraint each, concurrency in [%i,%i] and max concurrency share %u\n", + fprintf(stderr, + "%ix One shot execution time for a total of %u constraints, " + "%u variables with %u active constraint each, concurrency in [%i,%i] and max concurrency share %u\n", testcount, nb_cnst, nb_var, nb_elem, (1 << pw_base_limit), (1 << pw_base_limit) + (1 << pw_max_limit), max_share); - if(mode==3) - fprintf(stderr, "Execution time: %g +- %g microseconds \n",mean_date, stdev_date); + if (mode == 3) + fprintf(stderr, "Execution time: %g +- %g microseconds \n", mean_date, stdev_date); return 0; } diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench_large.tesh b/teshsuite/models/maxmin_bench/maxmin_bench_large.tesh similarity index 100% rename from teshsuite/surf/maxmin_bench/maxmin_bench_large.tesh rename to teshsuite/models/maxmin_bench/maxmin_bench_large.tesh diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench_medium.tesh b/teshsuite/models/maxmin_bench/maxmin_bench_medium.tesh similarity index 100% rename from teshsuite/surf/maxmin_bench/maxmin_bench_medium.tesh rename to teshsuite/models/maxmin_bench/maxmin_bench_medium.tesh diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench_small.tesh b/teshsuite/models/maxmin_bench/maxmin_bench_small.tesh similarity index 100% rename from teshsuite/surf/maxmin_bench/maxmin_bench_small.tesh rename to teshsuite/models/maxmin_bench/maxmin_bench_small.tesh diff --git a/teshsuite/platforms/properties.xml b/teshsuite/platforms/properties.xml index fd238af7af..6f06059e68 100644 --- a/teshsuite/platforms/properties.xml +++ b/teshsuite/platforms/properties.xml @@ -2,7 +2,7 @@ - + diff --git a/teshsuite/s4u/CMakeLists.txt b/teshsuite/s4u/CMakeLists.txt index 57b21fef88..70317ad1d1 100644 --- a/teshsuite/s4u/CMakeLists.txt +++ b/teshsuite/s4u/CMakeLists.txt @@ -144,7 +144,7 @@ ADD_TEST(tesh-parser-full-links01 ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-par ADD_TEST(tesh-parser-full-links02 ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/two_clusters_one_name.xml FULL_LINK) ADD_TEST(tesh-parser-one-link-g5k ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK) -set(teshsuite_src ${teshsuite_src} ${CMAKE_SOURCE_DIR}/src/include/catch_simgrid.hpp PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_SOURCE_DIR}/teshsuite/catch_simgrid.hpp PARENT_SCOPE) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/testing_platform.xml diff --git a/teshsuite/s4u/activity-lifecycle/testing_comm.cpp b/teshsuite/s4u/activity-lifecycle/testing_comm.cpp index 04fb363b5e..f485fc831b 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_comm.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_comm.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" #include static void test_link_off_helper(double delay) @@ -172,7 +172,7 @@ TEST_CASE("Activity lifecycle: comm activities") simgrid::s4u::this_actor::sleep_for(2); receiver_basic(recv_done, true, 1); - // Sleep long enough to let the test ends by itself. 1 + surf_precision should be enough. + // Sleep long enough to let the test ends by itself. 1 + precision_timing should be enough. simgrid::s4u::this_actor::sleep_for(4); INFO("Sender or receiver killed somehow. It shouldn't"); REQUIRE(dsend_done); @@ -191,7 +191,7 @@ TEST_CASE("Activity lifecycle: comm activities") simgrid::s4u::this_actor::sleep_for(2); sender_dtach(dsend_done, true, 0); - // Sleep long enough to let the test ends by itself. 3 + surf_precision should be enough. + // Sleep long enough to let the test ends by itself. 3 + precision_timing should be enough. simgrid::s4u::this_actor::sleep_for(4); INFO("Sender or receiver killed somehow. It shouldn't"); REQUIRE(dsend_done); @@ -219,7 +219,7 @@ TEST_CASE("Activity lifecycle: comm activities") simgrid::s4u::this_actor::sleep_for(2); sender->kill(); - // let the test ends by itself. waiting for surf_precision should be enough. + // let the test ends by itself. waiting for precision_timing should be enough. simgrid::s4u::this_actor::sleep_for(0.00001); INFO("Sender was not killed properly or receiver killed somehow. It shouldn't"); diff --git a/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp b/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp index 32c6e7ab5d..4b9d72f8eb 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" TEST_CASE("Activity lifecycle: direct communication (sendto) activities") { diff --git a/teshsuite/s4u/activity-lifecycle/testing_exec.cpp b/teshsuite/s4u/activity-lifecycle/testing_exec.cpp index 3d278c67d3..8e2930cf80 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_exec.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_exec.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" TEST_CASE("Activity lifecycle: exec activities") { diff --git a/teshsuite/s4u/activity-lifecycle/testing_sleep.cpp b/teshsuite/s4u/activity-lifecycle/testing_sleep.cpp index 32b7d44bfd..362b3c0bc1 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_sleep.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_sleep.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" TEST_CASE("Activity lifecycle: sleep activities") { diff --git a/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp b/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp index ee38d07e0a..35867e0981 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_test-wait.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "catch_simgrid.hpp" +#include "teshsuite/catch_simgrid.hpp" //========== Creators: create an async activity diff --git a/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh b/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh index 66e38a49e5..2a3d976604 100644 --- a/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh +++ b/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh @@ -37,11 +37,11 @@ $ ${bindir:=.}/basic-parsing-test ${platfdir:=.}/cloud.xml --log=root.fmt=%m%n $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/properties.xml --log=root.fmt=%m%n > Configuration change: Set 'cpu/optim' to 'TI' -> Configuration change: Set 'maxmin/precision' to '0.000010' +> Configuration change: Set 'precision/work-amount' to '0.000010' > Workstation number: 1, link number: 1 $ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../platforms/properties.xml --cfg=cpu/optim:TI --log=root.fmt=%m%n > Configuration change: Set 'cpu/optim' to 'TI' > The custom configuration 'cpu/optim' is already defined by user! -> Configuration change: Set 'maxmin/precision' to '0.000010' +> Configuration change: Set 'precision/work-amount' to '0.000010' > Workstation number: 1, link number: 1 diff --git a/teshsuite/s4u/storage_client_server/storage_client_server.tesh b/teshsuite/s4u/storage_client_server/storage_client_server.tesh index 463c56c2ce..10822fe557 100644 --- a/teshsuite/s4u/storage_client_server/storage_client_server.tesh +++ b/teshsuite/s4u/storage_client_server/storage_client_server.tesh @@ -32,9 +32,9 @@ $ ./storage_client_server ${platfdir}/hosts_with_disks.xml "--log=root.fmt:[%10. > [ 0.000000] (server@alice) /include/mc/modelchecker.h size: 96 bytes > [ 0.000000] (server@alice) /include/msg/datatypes.h size: 4635 bytes > [ 0.000000] (server@alice) /include/simdag/simdag.h size: 10325 bytes +> [ 0.000000] (server@alice) /include/simgrid_dtd.h size: 23583 bytes > [ 0.000000] (server@alice) /include/simix/simix.h size: 13003 bytes > [ 0.000000] (server@alice) /include/smpi/mpif.h size: 4826 bytes -> [ 0.000000] (server@alice) /include/surf/simgrid_dtd.h size: 23583 bytes > [ 0.000000] (server@alice) /include/xbt/fifo.h size: 3626 bytes > [ 0.000000] (server@alice) /lib/libsimgrid.so.3.6.2 size: 12710497 bytes > [ 0.000000] (server@alice) Server waiting for transfers ... @@ -80,9 +80,9 @@ $ ./storage_client_server ${platfdir}/hosts_with_disks.xml "--log=root.fmt:[%10. > [ 1.207952] (server@alice) /include/mc/modelchecker.h size: 96 bytes > [ 1.207952] (server@alice) /include/msg/datatypes.h size: 4635 bytes > [ 1.207952] (server@alice) /include/simdag/simdag.h size: 10325 bytes +> [ 1.207952] (server@alice) /include/simgrid_dtd.h size: 23583 bytes > [ 1.207952] (server@alice) /include/simix/simix.h size: 13003 bytes > [ 1.207952] (server@alice) /include/smpi/mpif.h size: 4826 bytes -> [ 1.207952] (server@alice) /include/surf/simgrid_dtd.h size: 23583 bytes > [ 1.207952] (server@alice) /include/xbt/fifo.h size: 3626 bytes > [ 1.207952] (server@alice) /lib/libsimgrid.so.3.6.2 size: 12710497 bytes > [ 1.207952] (server@alice) /tmp/tata.c size: 6217 bytes diff --git a/teshsuite/surf/CMakeLists.txt b/teshsuite/surf/CMakeLists.txt deleted file mode 100644 index a9346ba940..0000000000 --- a/teshsuite/surf/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -foreach(x lmm_usage surf_usage surf_usage2) - add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp) - target_link_libraries(${x} simgrid) - set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) - set_property(TARGET ${x} APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") - add_dependencies(tests ${x}) - - set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh) - set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp) - - ADD_TESH(tesh-surf-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/${x} ${x}.tesh) -endforeach() - -add_executable (maxmin_bench EXCLUDE_FROM_ALL maxmin_bench/maxmin_bench.cpp) -target_link_libraries(maxmin_bench simgrid) -set_target_properties(maxmin_bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/maxmin_bench) -set_property(TARGET maxmin_bench APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") -add_dependencies(tests maxmin_bench) - -foreach(x small medium large) - set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench_${x}.tesh) -endforeach() - -set(tesh_files ${tesh_files} PARENT_SCOPE) -set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench.cpp PARENT_SCOPE) - -ADD_TESH(tesh-surf-maxmin-large --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_large.tesh) - -if(enable_debug) - foreach(x small medium) - ADD_TESH(tesh-surf-maxmin-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_${x}.tesh) - endforeach() -endif() \ No newline at end of file diff --git a/teshsuite/surf/lmm_usage/lmm_usage.tesh b/teshsuite/surf/lmm_usage/lmm_usage.tesh deleted file mode 100644 index 1ab150d6b2..0000000000 --- a/teshsuite/surf/lmm_usage/lmm_usage.tesh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env tesh - -$ ${bindir:=.}/lmm_usage -> [0.000000] [surf_test/INFO] ***** Test 1 -> [0.000000] [surf_test/INFO] ***** Test 2 -> [0.000000] [surf_test/INFO] ***** Test 3 diff --git a/teshsuite/surf/surf_usage/surf_usage.tesh b/teshsuite/surf/surf_usage/surf_usage.tesh deleted file mode 100644 index 083d5528b8..0000000000 --- a/teshsuite/surf/surf_usage/surf_usage.tesh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env tesh - -$ ${bindir:=.}/surf_usage ${platfdir}/two_hosts_profiles.xml -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01' -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02' -> [0.000000] [surf_test/INFO] actionA state: SURF_ACTION_RUNNING -> [0.000000] [surf_test/INFO] actionB state: SURF_ACTION_RUNNING -> [0.000000] [surf_test/INFO] actionC state: SURF_ACTION_RUNNING -> [0.200000] [surf_test/INFO] Next Event : 0.2 -> [0.200016] [surf_test/INFO] Next Event : 0.200016 -> [0.200016] [surf_test/INFO] Network Done action -> [1.000000] [surf_test/INFO] Next Event : 1 -> [1.000000] [surf_test/INFO] CPU Failed action -> [2.000000] [surf_test/INFO] Next Event : 2 -> [7.320000] [surf_test/INFO] Next Event : 7.32 -> [7.320000] [surf_test/INFO] CPU Done action -> [10.000000] [surf_test/INFO] Next Event : 10 -> [11.000000] [surf_test/INFO] Next Event : 11 -> [12.000000] [surf_test/INFO] Next Event : 12 -> [20.000000] [surf_test/INFO] Next Event : 20 -> [21.000000] [surf_test/INFO] Next Event : 21 -> [22.000000] [surf_test/INFO] Next Event : 22 -> [30.000000] [surf_test/INFO] Next Event : 30 -> [31.000000] [surf_test/INFO] Next Event : 31 -> [32.000000] [surf_test/INFO] Next Event : 32 -> [40.000000] [surf_test/INFO] Next Event : 40 -> [41.000000] [surf_test/INFO] Next Event : 41 -> [42.000000] [surf_test/INFO] Next Event : 42 -> [50.000000] [surf_test/INFO] Next Event : 50 -> [51.000000] [surf_test/INFO] Next Event : 51 -> [52.000000] [surf_test/INFO] Next Event : 52 -> [53.000000] [surf_test/INFO] Next Event : 53 -> [60.000000] [surf_test/INFO] Next Event : 60 -> [61.000000] [surf_test/INFO] Next Event : 61 -> [62.000000] [surf_test/INFO] Next Event : 62 -> [63.000000] [surf_test/INFO] Next Event : 63 -> [70.000000] [surf_test/INFO] Next Event : 70 -> [71.000000] [surf_test/INFO] Next Event : 71 -> [72.000000] [surf_test/INFO] Next Event : 72 -> [74.000000] [surf_test/INFO] Next Event : 74 -> [80.000000] [surf_test/INFO] Next Event : 80 -> [81.000000] [surf_test/INFO] Next Event : 81 -> [82.000000] [surf_test/INFO] Next Event : 82 -> [83.000000] [surf_test/INFO] Next Event : 83 -> [84.000000] [surf_test/INFO] Next Event : 84 -> [90.000000] [surf_test/INFO] Next Event : 90 -> [91.000000] [surf_test/INFO] Next Event : 91 -> [92.000000] [surf_test/INFO] Next Event : 92 -> [95.000000] [surf_test/INFO] Next Event : 95 -> [100.000000] [surf_test/INFO] Next Event : 100 -> [101.000000] [surf_test/INFO] Next Event : 101 -> [102.000000] [surf_test/INFO] Next Event : 102 -> [104.000000] [surf_test/INFO] Next Event : 104 -> [105.000000] [surf_test/INFO] Next Event : 105 -> [110.000000] [surf_test/INFO] Next Event : 110 -> [111.000000] [surf_test/INFO] Next Event : 111 -> [112.000000] [surf_test/INFO] Next Event : 112 -> [116.000000] [surf_test/INFO] Next Event : 116 -> [120.000000] [surf_test/INFO] Next Event : 120 -> [121.000000] [surf_test/INFO] Next Event : 121 -> [122.000000] [surf_test/INFO] Next Event : 122 -> [125.000000] [surf_test/INFO] Next Event : 125 -> [126.000000] [surf_test/INFO] Next Event : 126 -> [130.000000] [surf_test/INFO] Next Event : 130 -> [131.000000] [surf_test/INFO] Next Event : 131 -> [132.000000] [surf_test/INFO] Next Event : 132 -> [132.500000] [surf_test/INFO] Next Event : 132.5 -> [132.500000] [surf_test/INFO] CPU Done action diff --git a/teshsuite/surf/surf_usage2/surf_usage2.tesh b/teshsuite/surf/surf_usage2/surf_usage2.tesh deleted file mode 100644 index a89c4fe129..0000000000 --- a/teshsuite/surf/surf_usage2/surf_usage2.tesh +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env tesh - -$ ${bindir:=.}/surf_usage2 ${platfdir}/two_hosts_profiles.xml -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02' -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01' -> [0.200000] [surf_test/INFO] Next Event : 0.2 -> [0.200016] [surf_test/INFO] Next Event : 0.200016 -> [0.200016] [surf_test/INFO] * Done Action -> [1.000000] [surf_test/INFO] Next Event : 1 -> [1.000000] [surf_test/INFO] * Done Action -> [2.000000] [surf_test/INFO] Next Event : 2 -> [7.320000] [surf_test/INFO] Next Event : 7.32 -> [7.320000] [surf_test/INFO] * Done Action -> [10.000000] [surf_test/INFO] Next Event : 10 -> [11.000000] [surf_test/INFO] Next Event : 11 -> [12.000000] [surf_test/INFO] Next Event : 12 -> [20.000000] [surf_test/INFO] Next Event : 20 -> [21.000000] [surf_test/INFO] Next Event : 21 -> [22.000000] [surf_test/INFO] Next Event : 22 -> [30.000000] [surf_test/INFO] Next Event : 30 -> [31.000000] [surf_test/INFO] Next Event : 31 -> [32.000000] [surf_test/INFO] Next Event : 32 -> [40.000000] [surf_test/INFO] Next Event : 40 -> [41.000000] [surf_test/INFO] Next Event : 41 -> [42.000000] [surf_test/INFO] Next Event : 42 -> [50.000000] [surf_test/INFO] Next Event : 50 -> [51.000000] [surf_test/INFO] Next Event : 51 -> [52.000000] [surf_test/INFO] Next Event : 52 -> [53.000000] [surf_test/INFO] Next Event : 53 -> [60.000000] [surf_test/INFO] Next Event : 60 -> [61.000000] [surf_test/INFO] Next Event : 61 -> [62.000000] [surf_test/INFO] Next Event : 62 -> [63.000000] [surf_test/INFO] Next Event : 63 -> [70.000000] [surf_test/INFO] Next Event : 70 -> [71.000000] [surf_test/INFO] Next Event : 71 -> [72.000000] [surf_test/INFO] Next Event : 72 -> [74.000000] [surf_test/INFO] Next Event : 74 -> [80.000000] [surf_test/INFO] Next Event : 80 -> [81.000000] [surf_test/INFO] Next Event : 81 -> [82.000000] [surf_test/INFO] Next Event : 82 -> [83.000000] [surf_test/INFO] Next Event : 83 -> [84.000000] [surf_test/INFO] Next Event : 84 -> [90.000000] [surf_test/INFO] Next Event : 90 -> [91.000000] [surf_test/INFO] Next Event : 91 -> [92.000000] [surf_test/INFO] Next Event : 92 -> [95.000000] [surf_test/INFO] Next Event : 95 -> [100.000000] [surf_test/INFO] Next Event : 100 -> [101.000000] [surf_test/INFO] Next Event : 101 -> [102.000000] [surf_test/INFO] Next Event : 102 -> [104.000000] [surf_test/INFO] Next Event : 104 -> [105.000000] [surf_test/INFO] Next Event : 105 -> [110.000000] [surf_test/INFO] Next Event : 110 -> [111.000000] [surf_test/INFO] Next Event : 111 -> [112.000000] [surf_test/INFO] Next Event : 112 -> [116.000000] [surf_test/INFO] Next Event : 116 -> [120.000000] [surf_test/INFO] Next Event : 120 -> [121.000000] [surf_test/INFO] Next Event : 121 -> [122.000000] [surf_test/INFO] Next Event : 122 -> [125.000000] [surf_test/INFO] Next Event : 125 -> [126.000000] [surf_test/INFO] Next Event : 126 -> [130.000000] [surf_test/INFO] Next Event : 130 -> [131.000000] [surf_test/INFO] Next Event : 131 -> [132.000000] [surf_test/INFO] Next Event : 132 -> [132.500000] [surf_test/INFO] Next Event : 132.5 -> [132.500000] [surf_test/INFO] * Done Action -> [132.500000] [surf_test/INFO] Simulation Terminated diff --git a/teshsuite/xbt/mmalloc/mmalloc_test.cpp b/teshsuite/xbt/mmalloc/mmalloc_test.cpp index 5c6e4159e4..3b03ea9ae5 100644 --- a/teshsuite/xbt/mmalloc/mmalloc_test.cpp +++ b/teshsuite/xbt/mmalloc/mmalloc_test.cpp @@ -4,8 +4,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/Exception.hpp" +#include "src/xbt/mmalloc/mmalloc.h" #include "xbt.h" -#include "xbt/mmalloc.h" #include #include diff --git a/teshsuite/xbt/parmap_bench/parmap_bench.cpp b/teshsuite/xbt/parmap_bench/parmap_bench.cpp index ccab38bb79..42d0692717 100644 --- a/teshsuite/xbt/parmap_bench/parmap_bench.cpp +++ b/teshsuite/xbt/parmap_bench/parmap_bench.cpp @@ -4,7 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/internal_config.h" // HAVE_FUTEX_H -#include "xbt/parmap.hpp" +#include "src/xbt/parmap.hpp" #include #include diff --git a/teshsuite/xbt/parmap_test/parmap_test.cpp b/teshsuite/xbt/parmap_test/parmap_test.cpp index e79cb393e0..0e63aaa9f0 100644 --- a/teshsuite/xbt/parmap_test/parmap_test.cpp +++ b/teshsuite/xbt/parmap_test/parmap_test.cpp @@ -6,9 +6,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/internal_config.h" // HAVE_FUTEX_H +#include "src/xbt/parmap.hpp" #include #include -#include #include #include diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 8bb7958d20..c30d4cd519 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -1,28 +1,39 @@ ### define source packages set(EXTRA_DIST + src/3rd-party/catch.hpp + src/3rd-party/xxhash.hpp src/bindings/python/simgrid_python.cpp src/dag/dax.dtd src/dag/dax_dtd.c src/dag/dax_dtd.h - src/include/catch.hpp - src/include/mc/datatypes.h - src/include/mc/mc.h - src/include/simgrid/sg_config.hpp - src/include/xbt/coverage.h - src/include/xbt/mmalloc.h - src/include/xbt/parmap.hpp - src/include/xbt/xbt_modinter.h - src/include/xxhash.hpp src/kernel/actor/Simcall.hpp + src/kernel/resource/HostImpl.hpp src/kernel/resource/LinkImpl.hpp src/kernel/resource/NetworkModel.hpp src/kernel/resource/NetworkModelFactors.hpp src/kernel/resource/SplitDuplexLinkImpl.hpp src/kernel/resource/StandardLinkImpl.hpp src/kernel/resource/WifiLinkImpl.hpp + src/kernel/resource/models/cpu_cas01.hpp + src/kernel/resource/models/cpu_ti.hpp + src/kernel/resource/models/disk_s19.hpp + src/kernel/resource/models/host_clm03.hpp + src/kernel/resource/models/network_cm02.hpp + src/kernel/resource/models/network_constant.hpp + src/kernel/resource/models/network_ib.hpp + src/kernel/resource/models/network_ns3.hpp + src/kernel/resource/models/ns3/ns3_simulator.hpp + src/kernel/resource/models/ptask_L07.hpp + + src/mc/datatypes.h + src/mc/mc.h src/mc/mc_mmu.hpp src/mc/mc_record.hpp + + src/simgrid/sg_config.hpp + src/simgrid/math_utils.h + src/smpi/colls/coll_tuned_topo.hpp src/smpi/colls/colls_private.hpp src/smpi/colls/smpi_mvapich2_selector_stampede.hpp @@ -30,32 +41,24 @@ set(EXTRA_DIST src/smpi/include/smpi_utils.hpp src/smpi/smpi_main.c src/smpi/smpi_replay_main.cpp - src/surf/HostImpl.hpp - src/surf/cpu_cas01.hpp - src/surf/cpu_ti.hpp - src/surf/disk_s19.hpp - src/surf/host_clm03.hpp - src/surf/network_cm02.hpp - src/surf/network_constant.hpp - src/surf/network_ib.hpp - src/surf/network_ns3.hpp - src/surf/ns3/ns3_simulator.hpp - src/surf/ptask_L07.hpp - src/surf/surf_interface.hpp - src/surf/xml/simgrid.dtd - src/surf/xml/simgrid_dtd.c - src/surf/xml/simgrid_dtd.h - src/surf/xml/surfxml_sax_cb.cpp + src/kernel/xml/simgrid.dtd + src/kernel/xml/simgrid_dtd.c + src/kernel/xml/simgrid_dtd.h + src/kernel/xml/platf_sax_cb.cpp src/xbt/automaton/automaton_lexer.yy.c src/xbt/automaton/parserPromela.lex src/xbt/automaton/parserPromela.tab.cacc src/xbt/automaton/parserPromela.tab.hacc src/xbt/automaton/parserPromela.yacc + src/xbt/coverage.h src/xbt/dict_private.h src/xbt/log_private.hpp src/xbt/mallocator_private.h - + src/xbt/parmap.hpp + src/xbt/xbt_modinter.h + + src/xbt/mmalloc/mmalloc.h src/xbt/mmalloc/mfree.c src/xbt/mmalloc/mm_legacy.c src/xbt/mmalloc/mm_module.c @@ -243,7 +246,7 @@ set(SMPI_SRC src/smpi/plugins/ampi/ampi.hpp src/smpi/plugins/ampi/instr_ampi.cpp src/smpi/plugins/ampi/instr_ampi.hpp - src/surf/network_ib.cpp + src/kernel/resource/models/network_ib.cpp ) set(STHREAD_SRC src/sthread/sthread_impl.cpp @@ -292,14 +295,58 @@ else() endif() set(NS3_SRC - src/surf/network_ns3.cpp - src/surf/ns3/ns3_simulator.cpp + src/kernel/resource/models/network_ns3.cpp + src/kernel/resource/models/ns3/ns3_simulator.cpp ) -set(SURF_SRC +set(KERNEL_SRC + src/deprecated.cpp + src/kernel/EngineImpl.cpp src/kernel/EngineImpl.hpp + src/kernel/activity/ActivityImpl.cpp + src/kernel/activity/ActivityImpl.hpp + src/kernel/activity/BarrierImpl.cpp + src/kernel/activity/BarrierImpl.hpp + src/kernel/activity/CommImpl.cpp + src/kernel/activity/CommImpl.hpp + src/kernel/activity/ConditionVariableImpl.cpp + src/kernel/activity/ConditionVariableImpl.hpp + src/kernel/activity/ExecImpl.cpp + src/kernel/activity/ExecImpl.hpp + src/kernel/activity/IoImpl.cpp + src/kernel/activity/IoImpl.hpp + src/kernel/activity/MailboxImpl.cpp + src/kernel/activity/MailboxImpl.hpp + src/kernel/activity/MutexImpl.cpp + src/kernel/activity/MutexImpl.hpp + src/kernel/activity/SemaphoreImpl.cpp + src/kernel/activity/SemaphoreImpl.hpp + src/kernel/activity/SleepImpl.cpp + src/kernel/activity/SleepImpl.hpp + src/kernel/activity/Synchro.cpp + src/kernel/activity/Synchro.hpp + + src/kernel/actor/ActorImpl.cpp + src/kernel/actor/ActorImpl.hpp + src/kernel/actor/CommObserver.cpp + src/kernel/actor/CommObserver.hpp + src/kernel/actor/Simcall.cpp + src/kernel/actor/SimcallObserver.cpp + src/kernel/actor/SimcallObserver.hpp + src/kernel/actor/SynchroObserver.cpp + src/kernel/actor/SynchroObserver.hpp + + src/kernel/context/Context.cpp + src/kernel/context/Context.hpp + src/kernel/context/ContextRaw.cpp + src/kernel/context/ContextRaw.hpp + src/kernel/context/ContextSwapped.cpp + src/kernel/context/ContextSwapped.hpp + src/kernel/context/ContextThread.cpp + src/kernel/context/ContextThread.hpp + src/kernel/lmm/System.cpp src/kernel/lmm/System.hpp src/kernel/lmm/fair_bottleneck.cpp @@ -314,6 +361,7 @@ set(SURF_SRC src/kernel/resource/DiskImpl.hpp src/kernel/resource/FactorSet.cpp src/kernel/resource/FactorSet.hpp + src/kernel/resource/HostImpl.cpp src/kernel/resource/Model.cpp src/kernel/resource/NetworkModel.cpp src/kernel/resource/NetworkModelFactors.cpp @@ -324,6 +372,14 @@ set(SURF_SRC src/kernel/resource/VirtualMachineImpl.hpp src/kernel/resource/WifiLinkImpl.cpp + src/kernel/resource/models/cpu_cas01.cpp + src/kernel/resource/models/cpu_ti.cpp + src/kernel/resource/models/disk_s19.cpp + src/kernel/resource/models/host_clm03.cpp + src/kernel/resource/models/network_cm02.cpp + src/kernel/resource/models/network_constant.cpp + src/kernel/resource/models/ptask_L07.cpp + src/kernel/resource/profile/Event.hpp src/kernel/resource/profile/FutureEvtSet.cpp src/kernel/resource/profile/FutureEvtSet.hpp @@ -350,23 +406,14 @@ set(SURF_SRC src/kernel/timer/Timer.cpp - src/surf/HostImpl.cpp - src/surf/cpu_cas01.cpp - src/surf/cpu_ti.cpp - src/surf/disk_s19.cpp - src/surf/host_clm03.cpp - src/surf/network_cm02.cpp - src/surf/network_constant.cpp - src/surf/ptask_L07.cpp - src/surf/sg_platf.cpp - src/surf/xml/platf.hpp - src/surf/xml/platf_private.hpp - src/surf/xml/surfxml_parseplatf.cpp - src/surf/xml/surfxml_sax_cb.cpp + src/kernel/xml/platf.hpp + src/kernel/xml/platf_private.hpp + src/kernel/xml/sg_platf.cpp + src/kernel/xml/platf_sax_cb.cpp ) if (Eigen3_FOUND) - set(SURF_SRC - ${SURF_SRC} + set(KERNEL_SRC + ${KERNEL_SRC} src/kernel/lmm/bmf.cpp src/kernel/lmm/bmf.hpp) else() @@ -375,6 +422,18 @@ else() src/kernel/lmm/bmf.cpp src/kernel/lmm/bmf.hpp) endif() +# Boost context may not be available +if (HAVE_BOOST_CONTEXTS) + set(KERNEL_SRC + ${KERNEL_SRC} + src/kernel/context/ContextBoost.cpp + src/kernel/context/ContextBoost.hpp) +else() + set(EXTRA_DIST + ${EXTRA_DIST} + src/kernel/context/ContextBoost.cpp + src/kernel/context/ContextBoost.hpp) +endif() set(PLUGINS_SRC src/plugins/ProducerConsumer.cpp @@ -391,61 +450,6 @@ set(PLUGINS_SRC src/plugins/vm/dirty_page_tracking.cpp ) -set(SIMIX_SRC - src/kernel/activity/ActivityImpl.cpp - src/kernel/activity/ActivityImpl.hpp - src/kernel/activity/BarrierImpl.cpp - src/kernel/activity/BarrierImpl.hpp - src/kernel/activity/CommImpl.cpp - src/kernel/activity/CommImpl.hpp - src/kernel/activity/ConditionVariableImpl.cpp - src/kernel/activity/ConditionVariableImpl.hpp - src/kernel/activity/ExecImpl.cpp - src/kernel/activity/ExecImpl.hpp - src/kernel/activity/IoImpl.cpp - src/kernel/activity/IoImpl.hpp - src/kernel/activity/MailboxImpl.cpp - src/kernel/activity/MailboxImpl.hpp - src/kernel/activity/MutexImpl.cpp - src/kernel/activity/MutexImpl.hpp - src/kernel/activity/SemaphoreImpl.cpp - src/kernel/activity/SemaphoreImpl.hpp - src/kernel/activity/SleepImpl.cpp - src/kernel/activity/SleepImpl.hpp - src/kernel/activity/Synchro.cpp - src/kernel/activity/Synchro.hpp - src/kernel/actor/ActorImpl.cpp - src/kernel/actor/ActorImpl.hpp - src/kernel/actor/CommObserver.cpp - src/kernel/actor/CommObserver.hpp - src/kernel/actor/Simcall.cpp - src/kernel/actor/SimcallObserver.cpp - src/kernel/actor/SimcallObserver.hpp - src/kernel/actor/SynchroObserver.cpp - src/kernel/actor/SynchroObserver.hpp - src/kernel/context/Context.cpp - src/kernel/context/Context.hpp - src/kernel/context/ContextRaw.cpp - src/kernel/context/ContextRaw.hpp - src/kernel/context/ContextSwapped.cpp - src/kernel/context/ContextSwapped.hpp - src/kernel/context/ContextThread.cpp - src/kernel/context/ContextThread.hpp - src/simix/libsmx.cpp - ) - -# Boost context may not be available -if (HAVE_BOOST_CONTEXTS) - set(SIMIX_SRC - ${SIMIX_SRC} - src/kernel/context/ContextBoost.cpp - src/kernel/context/ContextBoost.hpp) -else() - set(EXTRA_DIST - ${EXTRA_DIST} - src/kernel/context/ContextBoost.cpp - src/kernel/context/ContextBoost.hpp) -endif() set(S4U_SRC src/s4u/s4u_Activity.cpp @@ -715,7 +719,7 @@ set(source_of_generated_headers ### depend of some variables set upper if(${HAVE_UCONTEXT_CONTEXTS}) #ucontext - set(SIMIX_SRC ${SIMIX_SRC} src/kernel/context/ContextUnix.hpp + set(KERNEL_SRC ${KERNEL_SRC} src/kernel/context/ContextUnix.hpp src/kernel/context/ContextUnix.cpp) else() # NOT ucontext set(EXTRA_DIST ${EXTRA_DIST} src/kernel/context/ContextUnix.hpp @@ -727,8 +731,7 @@ set(simgrid_sources ${S4U_SRC} ${SIMGRID_SRC} ${MC_SRC_BASE} - ${SIMIX_SRC} - ${SURF_SRC} + ${KERNEL_SRC} ${TRACING_SRC} ${XBT_SRC} ${PLUGINS_SRC} @@ -787,6 +790,7 @@ set(DOC_SOURCES docs/source/img/extlink.svg docs/source/img/graphical-toc.svg docs/source/img/lmm-overview.svg + docs/source/img/plugin-energy.svg docs/source/img/smpi_simgrid_alltoall_pair_16.png docs/source/img/smpi_simgrid_alltoall_ring_16.png docs/source/img/starzone.drawio @@ -982,7 +986,6 @@ set(CMAKEFILES_TXT teshsuite/smpi/mpich3-test/rma/CMakeLists.txt teshsuite/smpi/mpich3-test/topo/CMakeLists.txt - teshsuite/surf/CMakeLists.txt teshsuite/xbt/CMakeLists.txt tools/CMakeLists.txt tools/graphicator/CMakeLists.txt diff --git a/tools/cmake/Distrib.cmake b/tools/cmake/Distrib.cmake index 9ce7f2b516..10fddafee0 100644 --- a/tools/cmake/Distrib.cmake +++ b/tools/cmake/Distrib.cmake @@ -86,9 +86,8 @@ set(source_to_pack ${PLUGINS_SRC} ${DAG_SRC} ${SIMGRID_SRC} - ${SIMIX_SRC} ${SMPI_SRC} - ${SURF_SRC} + ${KERNEL_SRC} ${TRACING_SRC} ${XBT_RL_SRC} ${XBT_SRC} @@ -205,14 +204,6 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/) add_dependencies(dist dist-dir) -if(NOT enable_maintainer_mode) - add_custom_target(echo-dist - COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------" - COMMAND ${CMAKE_COMMAND} -E echo "WARNING: Distrib is generated without option maintainer mode " - COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------") - add_dependencies(dist echo-dist) -endif() - ########################################### ### Fill in the "make distcheck" target ### ########################################### diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 7ba00168ed..f90b2b40e8 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -14,7 +14,7 @@ set(optCFLAGS "") set(warnCXXFLAGS "") if(enable_compile_warnings) - set(warnCFLAGS "-fno-common -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing") + set(warnCFLAGS "-fno-common -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wwrite-strings -Wno-unused-function -Wno-unused-local-typedefs -Wno-unused-parameter -Wno-strict-aliasing") if (CMAKE_CXX_COMPILER_ID MATCHES "Intel") # ignore remarks: @@ -32,7 +32,7 @@ if(enable_compile_warnings) set(warnCXXFLAGS "${warnCFLAGS}") if(CMAKE_COMPILER_IS_GNUCC) - set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes -Wno-error=maybe-uninitialized") + set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wformat-signedness -Wno-error=clobbered -Wno-error=attributes -Wno-error=maybe-uninitialized") endif() if(CMAKE_COMPILER_IS_GNUCXX) @@ -186,10 +186,10 @@ if(enable_model-checking AND enable_compile_optimizations) # But you can still optimize this: set(src_list ${simgrid_sources}) # except... - list(REMOVE_ITEM src_list ${SIMIX_SRC} ${S4U_SRC}) - # but... - list(APPEND src_list - src/kernel/actor/Simcall.cpp) + list(FILTER src_list EXCLUDE REGEX "^src/kernel/activity/") + list(FILTER src_list EXCLUDE REGEX "^src/kernel/actor/") + list(FILTER src_list EXCLUDE REGEX "^src/kernel/context/") + list(FILTER src_list EXCLUDE REGEX "^src/s4u/") foreach(src ${src_list}) set (mcCFLAGS "-O3 -funroll-loops -fno-strict-aliasing") if(CMAKE_COMPILER_IS_GNUCC) @@ -218,11 +218,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE") endif() -# Avoid a failure seen with gcc 7.2.0 and ns3 3.27 -if(enable_ns3) - set_source_files_properties(src/surf/network_ns3.cpp PROPERTIES COMPILE_FLAGS " -Wno-unused-local-typedef") -endif() - set(TESH_OPTION "") if(enable_coverage) find_program(GCOV_PATH NAMES ENV{GCOV} gcov) diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index 971d318f8d..b31d336099 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -129,26 +129,26 @@ if(enable_maintainer_mode) set(string1 "'s/extern /XBT_PUBLIC_DATA /'") set(string2 "'s/XBT_PUBLIC_DATA \\([^(]*\\)(/XBT_PUBLIC \\1(/'") - set(string3 "'s/XBT_PUBLIC void STag_surfxml_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd - set(string4 "'s/XBT_PUBLIC void STag_surfxml_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd + set(string3 "'s/XBT_PUBLIC void STag_simgrid_parse_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd + set(string4 "'s/XBT_PUBLIC void STag_simgrid_parse_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd set(string5 "'s/SET(DOCTYPE)/SET(ROOT_dax__adag)/'") set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'") ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h + OUTPUT ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h - ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c + ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c - DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd + DEPENDS ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd - #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml - COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=https://simgrid.org/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd - COMMAND ${PERL_EXE} ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/fixup_simgrid_dtd_l.pl < src/surf/xml/simgrid_dtd.l > src/surf/xml/simgrid_dtd.l.tmp - COMMAND mv src/surf/xml/simgrid_dtd.l.tmp src/surf/xml/simgrid_dtd.l - COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l" + #${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/kernel/xml + COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -S src/kernel/xml/simgrid_dtd.l -L src/kernel/xml/simgrid.dtd + COMMAND ${PERL_EXE} ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/fixup_simgrid_dtd_l.pl < src/kernel/xml/simgrid_dtd.l > src/kernel/xml/simgrid_dtd.l.tmp + COMMAND mv src/kernel/xml/simgrid_dtd.l.tmp src/kernel/xml/simgrid_dtd.l + COMMAND ${CMAKE_COMMAND} -E echo " Generated src/kernel/xml/simgrid_dtd.l" #${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd COMMAND ${FLEXML_EXE} -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S src/dag/dax_dtd.l -L src/dag/dax.dtd @@ -156,15 +156,14 @@ if(enable_maintainer_mode) COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.l COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.l" - #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid.h - COMMAND ${FLEXML_EXE} --root-tags platform -P surfxml --sysid=https://simgrid.org/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd - COMMAND ${SED_EXE} -i ${string1} src/surf/xml/simgrid_dtd.h - COMMAND ${SED_EXE} -i ${string2} src/surf/xml/simgrid_dtd.h - COMMAND ${SED_EXE} -i ${string3} src/surf/xml/simgrid_dtd.h - COMMAND ${SED_EXE} -i ${string4} src/surf/xml/simgrid_dtd.h - COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h - COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.h" + #${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd + COMMAND ${FLEXML_EXE} --root-tags platform -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -H src/kernel/xml/simgrid_dtd.h -L src/kernel/xml/simgrid.dtd + COMMAND ${SED_EXE} -i ${string1} src/kernel/xml/simgrid_dtd.h + COMMAND ${SED_EXE} -i ${string2} src/kernel/xml/simgrid_dtd.h + COMMAND ${SED_EXE} -i ${string3} src/kernel/xml/simgrid_dtd.h + COMMAND ${SED_EXE} -i ${string4} src/kernel/xml/simgrid_dtd.h + COMMAND ${SED_EXE} -i ${string14} src/kernel/xml/simgrid_dtd.h + COMMAND ${CMAKE_COMMAND} -E echo " Generated src/kernel/xml/simgrid_dtd.h" #${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h @@ -174,10 +173,10 @@ if(enable_maintainer_mode) COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.h COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.h" - #surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c - COMMAND ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psurf_parse_ --noline src/surf/xml/simgrid_dtd.l - COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c" + #kernel/xml/simgrid_dtd.c: kernel/xml/simgrid_dtd.l + COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c + COMMAND ${FLEX_EXE} -o src/kernel/xml/simgrid_dtd.c -Psimgrid_parse_ --noline src/kernel/xml/simgrid_dtd.l + COMMAND ${CMAKE_COMMAND} -E echo " Generated kernel/xml/simgrid_dtd.c" #dag/dax_dtd.c: dag/dax_dtd.l COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c @@ -206,8 +205,8 @@ if(enable_maintainer_mode) endif() add_custom_target(maintainer_files - DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h - ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c + DEPENDS ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h + ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c ) diff --git a/tools/cmake/scripts/fixup_simgrid_dtd_l.pl b/tools/cmake/scripts/fixup_simgrid_dtd_l.pl index 67f66de210..7a2d251526 100755 --- a/tools/cmake/scripts/fixup_simgrid_dtd_l.pl +++ b/tools/cmake/scripts/fixup_simgrid_dtd_l.pl @@ -10,12 +10,12 @@ while (<>) { # Accept the alternative DTD location if (/DOCTYPE.*simgrid.org.simgrid.dtd/) { - print ' "" SET(ROOT_surfxml_platform);'."\n"; + print ' "" SET(ROOT_simgrid_parse_platform);'."\n"; } # Completely rewrite the error handling mechanism to use exceptions instead of printing to stderr if (/fprintf.stderr, .*? flexml_err_msg.;/) { - print(' surf_parse_error(flexml_err_msg);'."\n"); + print(' simgrid_parse_error(flexml_err_msg);'."\n"); next; } diff --git a/tools/internal/check_dist_archive.exclude b/tools/internal/check_dist_archive.exclude index eb8674270c..0bf5d2782b 100644 --- a/tools/internal/check_dist_archive.exclude +++ b/tools/internal/check_dist_archive.exclude @@ -32,4 +32,4 @@ + tools/internal/.* + tools/jenkins/.* -+ src/simix/simix_network\.tla ++ doc/simix_network\.tla diff --git a/tools/jenkins/Coverage.sh b/tools/jenkins/Coverage.sh index d38aac208c..98c2cfdc55 100755 --- a/tools/jenkins/Coverage.sh +++ b/tools/jenkins/Coverage.sh @@ -95,7 +95,7 @@ if [ -f Testing/TAG ] ; then sloccount --duplicates --wide --details "$WORKSPACE" | grep -v -e '.git' -e 'mpich3-test' -e 'sloccount.sc' -e 'build/' -e 'xml_coverage.xml' -e 'CTestResults_memcheck.xml' -e 'DynamicAnalysis.xml' > "$WORKSPACE"/sloccount.sc #generate PVS-studio report - EXCLUDEDPATH="-e $WORKSPACE/src/include/catch.hpp -e $WORKSPACE/src/include/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e *_dtd.c -e *_dtd.h -e *.yy.c -e *.tab.cacc -e *.tab.hacc -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.cq" + EXCLUDEDPATH="-e $WORKSPACE/src/3rd-party/catch.hpp -e $WORKSPACE/src/3rd-party/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e *_dtd.c -e *_dtd.h -e *.yy.c -e *.tab.cacc -e *.tab.hacc -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.cq" pvs-studio-analyzer analyze -f "$BUILDFOLDER"/compile_commands.json -o "$WORKSPACE"/pvs.log $EXCLUDEDPATH -j$NUMPROC # Disable: # V521 Such expressions using the ',' operator are dangerous. (-> commas in catch.hpp),