Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge back the master trunk into the smpi branch
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 18:03:09 +0000 (19:03 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Dec 2011 18:03:09 +0000 (19:03 +0100)
507 files changed:
.gitignore
CMakeLists.txt
COPYING
ChangeLog
NEWS
README.coding
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Distrib.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/GenerateDoc.cmake
buildtools/Cmake/MaintainerMode.cmake
buildtools/Cmake/MakeExe.cmake
buildtools/Cmake/MakeLib.cmake
buildtools/Cmake/MakeLibWin.cmake
buildtools/Cmake/Modules/FindNS3.cmake
buildtools/Cmake/Modules/FindPCRE.cmake
buildtools/Cmake/Option.cmake
buildtools/Cmake/PrintArgs.cmake
buildtools/Cmake/generate_memcheck_tests.pl
buildtools/Cmake/gras_config.h.in
buildtools/Cmake/memcheck_tests.cmake
buildtools/Cmake/simgrid.nsi.in
buildtools/Cmake/test_g5k.xml [deleted file]
buildtools/pipol/Experimental.sh [changed mode: 0644->0755]
buildtools/pipol/Experimental_bindings.sh [changed mode: 0644->0755]
buildtools/pipol/MemCheck.sh [changed mode: 0644->0755]
buildtools/pipol/Nightly_memCheck.sh [new file with mode: 0755]
buildtools/pipol/Nightly_simgrid.sh [changed mode: 0644->0755]
buildtools/pipol/deploy.sh [changed mode: 0644->0755]
buildtools/pipol/rc.debian
buildtools/pipol/rc.fedora
buildtools/pipol/rc.mac
buildtools/pipol/rc.ubuntu
doc/.gitignore [deleted file]
doc/Doxyfile.in
doc/FAQ.doc [deleted file]
doc/HelloWorld/CMakeLists.txt
doc/HelloWorld/FindPCRE.cmake
doc/all.bib [deleted file]
doc/bindings.doc [new file with mode: 0644]
doc/contrib.doc [deleted file]
doc/gtut-files/.gitignore [deleted file]
doc/gtut-files/11-explicitwait.c
doc/gtut-tour-00-install.doc
doc/history.doc [deleted file]
doc/index.doc
doc/index.php.in [deleted file]
doc/installSimgrid.doc [new file with mode: 0644]
doc/module-msg.doc
doc/module-xbt.doc
doc/options.doc [new file with mode: 0644]
doc/people.doc [deleted file]
doc/pls.doc [new file with mode: 0644]
doc/publis.doc [deleted file]
doc/tracing.doc [new file with mode: 0644]
doc/use.doc [new file with mode: 0644]
doc/webcruft/fish.gif [deleted file]
doc/webcruft/robots.txt [deleted file]
doc/webcruft/simgrid_logo_2011.png [new file with mode: 0644]
doc/webcruft/win_install_01.png [new file with mode: 0644]
doc/webcruft/win_install_02.png [new file with mode: 0644]
doc/webcruft/win_install_03.png [new file with mode: 0644]
doc/webcruft/win_install_04.png [new file with mode: 0644]
examples/SimGrid.tesh [deleted file]
examples/amok/bandwidth/bandwidth.c
examples/gras/all2all/all2all.c
examples/gras/all2all/test_sg_64.tesh
examples/gras/console/gras_platform_script.lua
examples/gras/console/ping_client.c
examples/gras/mmrpc/mmrpc_client.c
examples/gras/mmrpc/mmrpc_server.c
examples/gras/ping/ping_client.c
examples/gras/pmm/pmm.c
examples/gras/pmm/test_sg_64.tesh
examples/gras/properties/properties.c
examples/gras/properties/test_sg.tesh
examples/gras/replay/replay.c
examples/gras/replay/xbt_workload.c
examples/gras/rpc/rpc.c
examples/lua/README
examples/lua/SimSplay/TODO [new file with mode: 0644]
examples/lua/SimSplay/platform_script.lua
examples/lua/SimSplay/sim_splay.lua
examples/lua/SimSplay/splay_school.lua
examples/lua/chord/chord.lua [new file with mode: 0644]
examples/lua/console/deploy.lua
examples/lua/console/master.lua
examples/lua/console/master_slave_bypass.lua
examples/lua/console/platform.lua
examples/lua/console/slave.lua
examples/lua/masterslave/master.lua
examples/lua/masterslave/master_slave.lua
examples/lua/masterslave/master_slave.tesh
examples/lua/masterslave/platform.lua
examples/lua/masterslave/slave.lua
examples/lua/mult_matrix.lua [deleted file]
examples/lua/multi_matrix/mult_matrix.lua
examples/lua/multi_matrix/receiver.lua
examples/lua/multi_matrix/sender.lua
examples/lua/splaySim/master.lua
examples/lua/splaySim/slave.lua
examples/lua/splaySim/splay_deploy_masterslave.lua
examples/lua/splaySim/splay_platform.lua
examples/lua/state_cloner/deployment_duplicated_globals.xml [new file with mode: 0644]
examples/lua/state_cloner/duplicated_globals.lua [new file with mode: 0644]
examples/lua/state_cloner/duplicated_globals.tesh [new file with mode: 0644]
examples/lua/tracing/master.lua
examples/lua/tracing/master_slave_trace.lua
examples/lua/tracing/slave.lua
examples/msg/actions/actions.c
examples/msg/actions/actions.tesh
examples/msg/chord/chord.c
examples/msg/chord/chord.tesh
examples/msg/gtnets/crosstraffic-d.xml [moved from examples/msg/gtnets/fullduplex-d.xml with 100% similarity]
examples/msg/gtnets/crosstraffic-p.xml [moved from examples/msg/gtnets/fullduplex-p.xml with 100% similarity]
examples/msg/gtnets/gtnets-crosstraffic.tesh [moved from examples/msg/gtnets/gtnets-fullduplex.tesh with 53% similarity]
examples/msg/gtnets/gtnets.c
examples/msg/icomms/peer.c
examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/masterslave/CMakeLists.txt
examples/msg/masterslave/deployment_masterslave_kill.xml [new file with mode: 0644]
examples/msg/masterslave/masterslave_arg.c [new file with mode: 0644]
examples/msg/masterslave/masterslave_bypass.c
examples/msg/masterslave/masterslave_cluster.c
examples/msg/masterslave/masterslave_console.c
examples/msg/masterslave/masterslave_console.tesh
examples/msg/masterslave/masterslave_cpu_ti.tesh
examples/msg/masterslave/masterslave_failure.c
examples/msg/masterslave/masterslave_forwarder.c
examples/msg/masterslave/masterslave_kill.c [new file with mode: 0644]
examples/msg/masterslave/masterslave_kill.tesh [new file with mode: 0644]
examples/msg/masterslave/masterslave_mailbox.c
examples/msg/masterslave/masterslave_multicore.tesh
examples/msg/masterslave/masterslave_vivaldi.tesh
examples/msg/masterslave/platform_kill.xml [new file with mode: 0644]
examples/msg/masterslave/platform_script.lua
examples/msg/mc/centralized_mutex.c
examples/msg/ns3/3hosts_2links_d.xml [new file with mode: 0644]
examples/msg/ns3/3hosts_2links_p.xml [new file with mode: 0644]
examples/msg/ns3/3links-d-timer.xml [new file with mode: 0644]
examples/msg/ns3/3links-d.xml [new file with mode: 0644]
examples/msg/ns3/3links-p.xml [new file with mode: 0644]
examples/msg/ns3/CMakeLists.txt [new file with mode: 0644]
examples/msg/ns3/One_cluster-d.xml [new file with mode: 0644]
examples/msg/ns3/One_cluster.xml [new file with mode: 0644]
examples/msg/ns3/Two_clusters-d.xml [new file with mode: 0644]
examples/msg/ns3/Two_clusters.xml [new file with mode: 0644]
examples/msg/ns3/dogbone-d.xml [new file with mode: 0644]
examples/msg/ns3/dogbone-p.xml [new file with mode: 0644]
examples/msg/ns3/ns3.c [new file with mode: 0644]
examples/msg/ns3/ns3.tesh [new file with mode: 0644]
examples/msg/parallel_task/test_ptask.c
examples/msg/priority/priority.c
examples/msg/properties/deployment_properties.xml
examples/msg/properties/msg_prop.c
examples/msg/properties/msg_prop.tesh
examples/msg/sendrecv/sendrecv_CLM03.tesh
examples/msg/sendrecv/sendrecv_KCCFLN05.tesh
examples/msg/token_ring/ring_call.c
examples/msg/token_ring/token_ring.tesh
examples/msg/trace/trace.tesh
examples/msg/tracing/categories.tesh
examples/msg/tracing/ms.tesh
examples/msg/tracing/procmig.c
examples/msg/tracing/procmig.tesh
examples/msg/tracing/tasks.c
examples/msg/tracing/tasks.tesh
examples/platforms/One_cluster.xml
examples/platforms/One_cluster_no_backbone.xml
examples/platforms/One_cluster_one_host.xml [new file with mode: 0644]
examples/platforms/cloud.xml [new file with mode: 0644]
examples/platforms/conf/gridpp_grid_2004.conf [new file with mode: 0644]
examples/platforms/conf/gridpp_grid_2004.xml [new file with mode: 0644]
examples/platforms/conf/lcg_sept2004_grid.conf [new file with mode: 0644]
examples/platforms/conf/lcg_sept2004_grid.xml [new file with mode: 0644]
examples/platforms/conf/transform_optorsim_platform.pl [new file with mode: 0644]
examples/platforms/data_center.xml [new file with mode: 0644]
examples/platforms/g5k_cabinets.xml
examples/platforms/generation_scripts/create_hierarchical_clusters.pl [new file with mode: 0755]
examples/platforms/generation_scripts/enhancedDTDwithHierarchicalCluster.pl [new file with mode: 0755]
examples/platforms/generation_scripts/generate_g5k_platform.pl [moved from buildtools/Cmake/generate_g5k_platform.pl with 97% similarity]
examples/platforms/generation_scripts/generate_g5k_platform_cabinets.pl [moved from buildtools/Cmake/generate_g5k_platform_cabinets.pl with 97% similarity, mode: 0755]
examples/platforms/syscoord/generate_peer_platform.pl [moved from buildtools/Cmake/generate_peer_platform.pl with 84% similarity]
examples/platforms/syscoord/median_harvard.syscoord [moved from examples/platforms/median_harvard.syscoord with 100% similarity]
examples/platforms/syscoord/median_harvard.xml [moved from examples/platforms/median_harvard.xml with 99% similarity]
examples/platforms/syscoord/median_meridian.syscoord [moved from examples/platforms/median_meridian.syscoord with 100% similarity]
examples/platforms/syscoord/median_meridian.xml [new file with mode: 0644]
examples/platforms/syscoord/median_p2psim.syscoord [moved from examples/platforms/median_p2psim.syscoord with 100% similarity]
examples/platforms/syscoord/median_p2psim.xml [new file with mode: 0644]
examples/platforms/vivaldi.xml
examples/simdag/dot/dot_test.c
examples/simdag/goal/CMakeLists.txt [new file with mode: 0644]
examples/simdag/goal/goal_test.c [new file with mode: 0644]
examples/simdag/platform_script.lua
examples/simdag/properties/sd_prop.c
examples/simdag/scheduling/minmin_test.c
examples/simdag/sd_seq_access.c
examples/simdag/simdag_trace.c
examples/smpi/bcast.tesh
examples/smpi/reduce.tesh
examples/xbt/sem_sched.c
include/msg/datatypes.h
include/msg/msg.h
include/simgrid/platf.h [new file with mode: 0644]
include/simgrid_config.h.in
include/simix/context.h
include/simix/simix.h
include/surf/simgrid_dtd.h
include/surf/surf_routing.h
include/surf/surfxml_parse.h
include/xbt/config.h
include/xbt/dict.h
include/xbt/dynar.h
include/xbt/ex.h
include/xbt/fifo.h
include/xbt/graphxml.h
include/xbt/graphxml_parse.h
include/xbt/hash.h
include/xbt/heap.h
include/xbt/lib.h
include/xbt/log.h
include/xbt/parmap.h
include/xbt/queue.h
include/xbt/str.h
include/xbt/strbuff.h
include/xbt/swag.h
include/xbt/synchro_core.h
include/xbt/sysdep.h
src/.gitignore [deleted file]
src/amok/Bandwidth/bandwidth.c
src/amok/Bandwidth/saturate.c
src/amok/PeerManagement/peermanagement.c
src/bindings/lua/lua_console.c
src/bindings/lua/lua_state_cloner.c [new file with mode: 0644]
src/bindings/lua/lua_state_cloner.h [new file with mode: 0644]
src/bindings/lua/lua_stub_generator.c
src/bindings/lua/lua_utils.c [new file with mode: 0644]
src/bindings/lua/lua_utils.h [new file with mode: 0644]
src/bindings/lua/master_slave.lua [deleted file]
src/bindings/lua/mult_matrix.lua [deleted file]
src/bindings/lua/simgrid_lua.c
src/bindings/lua/simgrid_lua.h
src/bindings/rubyDag/Makefile [deleted file]
src/bindings/rubyDag/example.rb [deleted file]
src/bindings/rubyDag/extconfig.rb [deleted file]
src/bindings/rubyDag/platform.xml [deleted file]
src/bindings/rubyDag/platform_.xml [deleted file]
src/bindings/rubyDag/rb_SD_task.c [deleted file]
src/bindings/rubyDag/rb_SD_task.h [deleted file]
src/bindings/rubyDag/rb_SD_workstation.c [deleted file]
src/bindings/rubyDag/rb_SD_workstation.h [deleted file]
src/bindings/rubyDag/rb_simdag.c [deleted file]
src/bindings/rubyDag/simdag.rb [deleted file]
src/context_sysv_config.h.in
src/gras/DataDesc/cbps.c
src/gras/DataDesc/datadesc.c
src/gras/DataDesc/ddt_convert.c
src/gras/DataDesc/ddt_create.c
src/gras/DataDesc/ddt_exchange.c
src/gras/DataDesc/ddt_parse.c
src/gras/Msg/gras_msg_exchange.c
src/gras/Msg/gras_msg_types.c
src/gras/Msg/msg_private.h
src/gras/Msg/rpc.c
src/gras/Msg/timer.c
src/gras/Transport/transport.c
src/gras/Transport/transport_plugin_sg.c
src/gras/Transport/transport_plugin_tcp.c
src/gras/Virtu/gras_module.c
src/gras/Virtu/process.c
src/gras/Virtu/rl_process.c
src/gras/Virtu/sg_emul.c
src/gras/Virtu/sg_process.c
src/gras/gras.c
src/include/mc/datatypes.h
src/include/mc/mc.h
src/include/simgrid/platf_interface.h [new file with mode: 0644]
src/include/surf/datatypes.h
src/include/surf/maxmin.h
src/include/surf/surf.h
src/include/surf/surf_resource.h
src/include/surf/surf_resource_lmm.h
src/include/surf/surfxml_parse_private.h [deleted file]
src/include/surf/surfxml_parse_values.h [new file with mode: 0644]
src/include/surf/trace_mgr.h
src/instr/instr_config.c
src/instr/instr_interface.c
src/instr/instr_paje.c
src/instr/instr_paje_trace.c
src/instr/instr_resource_utilization.c
src/instr/instr_routing.c
src/instr/instr_smpi.c
src/instr/jedule/jedule_events.c
src/instr/jedule/jedule_platform.c
src/instr/jedule/jedule_sd_binding.c
src/mc/mc_global.c
src/mc/memory_map.c
src/mc/private.h
src/mk_supernovae.pl [changed mode: 0755->0644]
src/msg/msg_actions.c
src/msg/msg_config.c
src/msg/msg_deployment.c [moved from src/msg/deployment.c with 99% similarity]
src/msg/msg_environment.c [moved from src/msg/environment.c with 97% similarity]
src/msg/msg_global.c [moved from src/msg/global.c with 98% similarity]
src/msg/msg_gos.c [moved from src/msg/gos.c with 92% similarity]
src/msg/msg_host.c [moved from src/msg/host.c with 95% similarity]
src/msg/msg_mailbox.c
src/msg/msg_mailbox.h [moved from src/msg/mailbox.h with 100% similarity]
src/msg/msg_private.h [moved from src/msg/private.h with 93% similarity]
src/msg/msg_process.c [moved from src/msg/m_process.c with 97% similarity]
src/msg/msg_task.c [moved from src/msg/task.c with 93% similarity]
src/rngstreams/RngStream.c
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/simdag/dax_dtd.l [deleted file]
src/simdag/private.h
src/simdag/sd_daxloader.c
src/simdag/sd_dotloader.c
src/simdag/sd_global.c
src/simdag/sd_link.c
src/simdag/sd_task.c
src/simdag/sd_workstation.c
src/simix/private.h
src/simix/process_private.h
src/simix/smurf_private.h
src/simix/smx_context.c
src/simix/smx_context_base.c
src/simix/smx_context_raw.c
src/simix/smx_context_sysv.c
src/simix/smx_context_sysv_private.h [deleted file]
src/simix/smx_context_thread.c
src/simix/smx_deployment.c
src/simix/smx_environment.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_network.c
src/simix/smx_process.c
src/simix/smx_smurf.c
src/simix/smx_synchro.c
src/simix/smx_user.c
src/smpi/smpi_bench.c
src/smpi/smpi_f77.c
src/smpi/smpi_global.c
src/smpi/smpicc.in
src/smpi/smpirun.in
src/surf/cpu.c [deleted file]
src/surf/cpu_cas01.c [moved from src/surf/cpu_im.c with 52% similarity]
src/surf/cpu_ti.c
src/surf/fair_bottleneck.c
src/surf/gtnets/gtnets_interface.cc
src/surf/gtnets/gtnets_simulator.cc
src/surf/gtnets/gtnets_topology.cc
src/surf/gtnets/gtnets_topology.h
src/surf/lagrange.c
src/surf/maxmin.c
src/surf/maxmin_private.h
src/surf/network.c
src/surf/network_constant.c
src/surf/network_gtnets.c
src/surf/network_im.c [deleted file]
src/surf/network_ns3.c
src/surf/network_ns3_private.h
src/surf/network_private.h
src/surf/ns3/my-point-to-point-helper.cc [new file with mode: 0644]
src/surf/ns3/my-point-to-point-helper.h [new file with mode: 0644]
src/surf/ns3/ns3_interface.cc
src/surf/ns3/ns3_interface.h
src/surf/ns3/ns3_simulator.cc
src/surf/ns3/ns3_simulator.h
src/surf/ns3/red-queue.cc [new file with mode: 0644]
src/surf/ns3/red-queue.h [new file with mode: 0644]
src/surf/sg_platf.c [new file with mode: 0644]
src/surf/simgrid.dtd
src/surf/simgrid_dtd.c
src/surf/simgrid_dtd.l [deleted file]
src/surf/surf.c
src/surf/surf_action.c
src/surf/surf_config.c
src/surf/surf_model.c
src/surf/surf_private.h
src/surf/surf_routing.c
src/surf/surf_routing_cluster.c [new file with mode: 0644]
src/surf/surf_routing_dijkstra.c
src/surf/surf_routing_floyd.c
src/surf/surf_routing_full.c
src/surf/surf_routing_generic.c [new file with mode: 0644]
src/surf/surf_routing_none.c
src/surf/surf_routing_private.h
src/surf/surf_routing_rulebased.c
src/surf/surf_routing_vivaldi.c [new file with mode: 0644]
src/surf/surfxml_parse.c
src/surf/surfxml_parseplatf.c [new file with mode: 0644]
src/surf/trace_mgr.c
src/surf/workstation.c
src/surf/workstation_ptask_L07.c
src/xbt/backtrace_dummy.c
src/xbt/backtrace_linux.c
src/xbt/backtrace_windows.c
src/xbt/config.c
src/xbt/dict.c
src/xbt/dict_cursor.c
src/xbt/dict_elm.c
src/xbt/dict_multi.c
src/xbt/dict_private.h
src/xbt/dynar.c
src/xbt/ex.c
src/xbt/fifo.c
src/xbt/graph.c
src/xbt/graphxml.c
src/xbt/graphxml.l [deleted file]
src/xbt/graphxml_parse.c
src/xbt/heap.c
src/xbt/heap_private.h
src/xbt/lib.c
src/xbt/log.c
src/xbt/log_private.h
src/xbt/mallocator.c
src/xbt/mallocator_private.h
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/mmalloc/mmalloc.c
src/xbt/mmalloc/mmcheck.c
src/xbt/mmalloc/mrealloc.c
src/xbt/parmap.c
src/xbt/parmap_private.h [deleted file]
src/xbt/set.c
src/xbt/swag.c
src/xbt/win32_ucontext.c
src/xbt/xbt_log_appender_file.c
src/xbt/xbt_log_layout_format.c
src/xbt/xbt_log_layout_simple.c
src/xbt/xbt_main.c
src/xbt/xbt_matrix.c
src/xbt/xbt_os_thread.c
src/xbt/xbt_peer.c
src/xbt/xbt_queue.c
src/xbt/xbt_replay_trace_reader.c
src/xbt/xbt_rl_synchro.c
src/xbt/xbt_sg_synchro.c
src/xbt/xbt_str.c
src/xbt/xbt_strbuff.c
src/xbt/xbt_synchro.c
teshsuite/gras/datadesc/datadesc_usage.c
teshsuite/gras/empty_main/empty_main.c
teshsuite/gras/msg_handle/msg_handle.c
teshsuite/gras/small_sleep/small_sleep.c
teshsuite/simdag/.gitignore [deleted file]
teshsuite/simdag/basic6.c
teshsuite/simdag/network/.gitignore [deleted file]
teshsuite/simdag/network/mxn/.gitignore [deleted file]
teshsuite/simdag/network/p2p/.gitignore [deleted file]
teshsuite/simdag/partask/.gitignore [deleted file]
teshsuite/simdag/platforms/CMakeLists.txt
teshsuite/simdag/platforms/Evaluate_get_route_time.c
teshsuite/simdag/platforms/Evaluate_parse_time.c
teshsuite/simdag/platforms/Two_clusters_rulebased.xml [new file with mode: 0644]
teshsuite/simdag/platforms/basic_parsing_test.c
teshsuite/simdag/platforms/basic_parsing_test.tesh
teshsuite/simdag/platforms/basic_parsing_test_bypass.tesh [new file with mode: 0644]
teshsuite/simdag/platforms/basic_parsing_test_sym_full.tesh
teshsuite/simdag/platforms/basic_tracing.c [new file with mode: 0644]
teshsuite/simdag/platforms/flatifier.c
teshsuite/simdag/platforms/flatifier.tesh
teshsuite/simdag/platforms/get_full_link.tesh
teshsuite/simdag/platforms/is_router_test.c
teshsuite/simdag/platforms/one_cluster_router_id.xml [new file with mode: 0644]
teshsuite/simdag/platforms/platform_include.xml
teshsuite/simdag/platforms/properties.xml
teshsuite/simdag/platforms/three_clusters_bypass.xml [new file with mode: 0644]
teshsuite/simdag/platforms/two_clusters_router_id.xml [new file with mode: 0644]
teshsuite/xbt/.gitignore [deleted file]
testsuite/.gitignore [deleted file]
testsuite/surf/.gitignore [deleted file]
testsuite/surf/lmm_usage.c
testsuite/surf/maxmin_bench.c
testsuite/surf/surf_usage.c
testsuite/surf/surf_usage2.c
testsuite/xbt/.gitignore [deleted file]
testsuite/xbt/graphxml_usage.c
tools/.gitignore [deleted file]
tools/doxygen/doxygen_postprocesser.pl
tools/gras/.gitignore [deleted file]
tools/gras/gras_stub_generator.h
tools/gras/stub_generator.c
tools/gras/unix_stub_generator.c
tools/gras/windows_stub_generator.c
tools/indent [new file with mode: 0755]
tools/tesh/.gitignore [deleted file]
tools/tesh/IO-orders.tesh
tools/tesh/basic.tesh
tools/tesh/basic2.tesh [new file with mode: 0644]
tools/tesh/catch-return.tesh
tools/tesh/catch-signal.tesh
tools/tesh/catch-timeout.tesh
tools/tesh/catch-wrong-output.tesh
tools/tesh/cd.tesh
tools/tesh/run_context.c
tools/tesh/set-ignore-output.tesh
tools/tesh/tesh.c
tools/tesh/tesh.h
win32_test_app/src/TBuffer.c
win32_test_app/src/TStream.c
win32_test_app/src/TTestCaseContext.c
win32_test_app/src/TThreadDynarray.c

index d079e1a..b5b3b84 100644 (file)
-################################################\r
-###OTHER CAT\r
-*.l[oa]\r
-*.loT\r
-*.[oa]\r
-*~\r
-*.log\r
-*_simulator\r
-*.mk\r
-*.swp\r
-*.patch\r
-*.plist\r
-*.trace\r
-\r
-################################################\r
-### Libraries links \r
-src/bindings/ruby/simgrid.so\r
-examples/ruby/simgrid.so\r
-examples/lua/simgrid.so\r
-src/bindings/ruby/libsimgrid.so\r
-examples/gras/console/simgrid.so\r
-examples/msg/masterslave/simgrid.so\r
-examples/simdag/simgrid.so\r
-\r
-################################################\r
-### Units and supernovae files\r
-src/simgrid_units_main.c\r
-src/*_unit.c\r
-src/supernovae_*.c\r
-\r
-################################################\r
-### Generated files\r
-_*.c\r
-include/simgrid_config.h\r
-include/xbt/version.h\r
-include/instr/tracing_config.h\r
-include/smpi/smpif.h\r
-src/context_sysv_config.h\r
-src/gras_config.h\r
-src/smpi/smpicc\r
-src/smpi/smpirun\r
-simgrid-*.tar.gz\r
-\r
-################################################\r
-### Cmake files\r
-CPackConfig.cmake\r
-CPackSourceConfig.cmake\r
-CTestTestfile.cmake\r
-conftestval\r
-cmake_install.cmake\r
-CMakeFiles\r
-install_manifest.txt\r
-_CPack_Packages/\r
-CMakeFiles\r
-CMakeCache.txt\r
-DartConfiguration.tcl\r
-simgrid.nsi\r
-Testing/\r
-Makefile\r
-bin/\r
-lib/\r
-build_dir/\r
-build/\r
-buildtools/Cmake/test_prog/prog_va_copy.c\r
-\r
-\r
-################################################\r
-### windows borland\r
-*.bpr\r
-*.bpf\r
-\r
-################################################\r
-### Documentation\r
-doc/all_bib.html\r
-doc/logcategories.sh\r
-doc/publis_core.bib\r
-doc/publis_core_bib.html\r
-doc/publis_count.html\r
-doc/publis_extern.bib\r
-doc/publis_extern_bib.html\r
-doc/publis_intra.bib\r
-doc/publis_intra_bib.html\r
-doc/realtoc.sh\r
-doc/tmp.realtoc\r
-doc/using_bib.html\r
-doc/Doxyfile\r
-doc/footer.html\r
-\r
-################################################\r
-### Specific of project \r
-.cproject\r
-.project\r
-.settings/\r
-.anjuta\r
-.anjuta_sym_db.db\r
-simgrid.anjuta\r
-.externalToolBuilders/\r
-Debug/\r
-.emacs.desktop\r
-tags\r
-callgrind.out.*\r
-\r
-################################################\r
-### Examples and traces\r
-*.exe\r
-testgraph.dot\r
-testgraph.xml\r
-examples/msg/ms.trace\r
-examples/msg/procmig.trace\r
-examples/msg/tasks.trace\r
-examples/msg/volume.trace\r
-examples/msg/zmsg_test.trace\r
-examples/msg/categories.trace\r
-examples/msg/masterslave/toto.txt\r
-examples/msg/simulation.trace\r
-examples/msg/toto.txt\r
-examples/msg/z_gtnets.trace\r
-examples/msg/tracing/procmig\r
-examples/msg/tracing/tasks\r
-examples/msg/tracing/volume\r
-examples/msg/mc/bugged3\r
-examples/msg/mc/random_test\r
-examples/msg/chord/chord\r
-examples/msg/token_ring/token_ring\r
-examples/simdag/ex_sd_seq_access\r
-examples/simdag/sd_seq_access\r
-examples/msg/icomms/peer\r
-examples/msg/icomms/peer2\r
-examples/gras/console/ping_client_console\r
-examples/gras/console/ping_server_console\r
-examples/gras/console/ping_simulator_console\r
-examples/msg/icomms/.kdbgrc.peer3\r
-examples/msg/icomms/peer3\r
-examples/msg/icomms/toto.txt\r
-examples/msg/masterslave/masterslave_console\r
-examples/simdag/ex_sd_test_console\r
-examples/simdag/sd_test_console\r
-examples/simdag/scheduling/Montage_25.jed\r
-examples/msg/irc_isend/peer\r
-examples/msg/irc_isend/toto.txt\r
-examples/simdag/dot/dot_test\r
-examples/simdag/dot/dot_test2\r
-examples/smpi/toto.txt\r
-examples/java/*/classnoinst.stamp\r
-examples/amok/bandwidth/bandwidth_maestro\r
-examples/amok/bandwidth/bandwidth_sensor\r
-examples/amok/saturate/saturate_maestro\r
-examples/amok/saturate/saturate_sensor\r
-examples/gras/all2all/all2all_receiver\r
-examples/gras/all2all/all2all_sender\r
-examples/gras/chrono/chrono_multiplier\r
-examples/gras/mmrpc/mmrpc_client\r
-examples/gras/mmrpc/mmrpc_server\r
-examples/gras/mutual_exclusion/simple_token/simple_token_node\r
-examples/gras/mutual_exclusion/simple_token/simple_token_checker\r
-examples/gras/ping/ping_client\r
-examples/gras/ping/ping_server\r
-examples/gras/ping/ping_checker\r
-examples/gras/pmm/pmm_master\r
-examples/gras/pmm/pmm_slave\r
-examples/gras/properties/properties_alice\r
-examples/gras/properties/properties_bob\r
-examples/gras/properties/properties_master\r
-examples/gras/properties/properties_slave\r
-examples/gras/rpc/rpc_client\r
-examples/gras/rpc/rpc_forwarder\r
-examples/gras/rpc/rpc_server\r
-examples/gras/spawn/spawn_server\r
-examples/gras/synchro/synchro_philosopher\r
-examples/gras/timer/timer_client\r
-examples/gras/replay/replay_simulator\r
-examples/gras/replay/replay_master\r
-examples/gras/replay/replay_worker\r
-examples/msg/actions/actions\r
-examples/msg/gtnets/gtnets\r
-examples/msg/masterslave/masterslave_bypass\r
-examples/msg/masterslave/masterslave_failure\r
-examples/msg/masterslave/masterslave_forwarder\r
-examples/msg/masterslave/masterslave_mailbox\r
-examples/msg/migration/migration\r
-examples/msg/parallel_task/parallel_task\r
-examples/msg/parallel_task/test_ptask\r
-examples/msg/priority/priority\r
-examples/msg/properties/msg_prop\r
-examples/msg/sendrecv/sendrecv\r
-examples/msg/suspend/suspend\r
-examples/msg/trace/test_trace_integration\r
-examples/msg/mc/centralized\r
-examples/msg/mc/bugged2\r
-examples/msg/mc/bugged1\r
-examples/msg/parallel_contexts/pcontexts\r
-examples/msg/parallel_contexts/pcontexts2\r
-examples/msg/pmm/msg_pmm\r
-examples/simdag/ex_sd_test\r
-examples/simdag/ex_sd_test2\r
-examples/simdag/metaxml/sd_meta\r
-examples/simdag/properties/sd_prop\r
-examples/simdag/sd_test\r
-examples/simdag/sd_test2\r
-examples/simdag/dax/dax_test\r
-examples/simdag/scheduling/minmin_test\r
-examples/smpi/reduce\r
-examples/smpi/bcast\r
-examples/smpi/bcbench\r
-examples/smpi/compute\r
-examples/smpi/compute2\r
-examples/smpi/compute3\r
-examples/smpi/first\r
-examples/smpi/mvmul\r
-examples/smpi/ring_c\r
-examples/smpi/second\r
-examples/smpi/split\r
-examples/smpi/allreduce\r
-examples/smpi/pingpong\r
-examples/smpi/scatter\r
-examples/smpi/alltoall2\r
-examples/smpi/alltoall_basic\r
-examples/smpi/alltoallv\r
-examples/smpi/sendrecv\r
-examples/smpi/smpi_sendrecv\r
-examples/smpi/mc_bugged1\r
-examples/smpi/mc_bugged2\r
-src/replay/replay\r
-src/testall\r
-teshsuite/gras/datadesc/datadesc_usage\r
-teshsuite/gras/empty_main/empty_main_function\r
-teshsuite/gras/msg_handle/msg_handle_client\r
-teshsuite/gras/msg_handle/msg_handle_server\r
-teshsuite/gras/small_sleep/log.txt\r
-teshsuite/gras/small_sleep/small_sleep_function\r
-teshsuite/gras/modelcheck/modelcheck_checker\r
-teshsuite/msg/get_sender\r
-teshsuite/simdag/basic0\r
-teshsuite/simdag/basic1\r
-teshsuite/simdag/basic2\r
-teshsuite/simdag/basic3\r
-teshsuite/simdag/basic4\r
-teshsuite/simdag/basic5\r
-teshsuite/simdag/basic6\r
-teshsuite/simdag/network/mxn/test_intra_all2all\r
-teshsuite/simdag/network/mxn/test_intra_independent_comm\r
-teshsuite/simdag/network/mxn/test_intra_scatter\r
-teshsuite/simdag/network/p2p/test_latency1\r
-teshsuite/simdag/network/p2p/test_latency2\r
-teshsuite/simdag/network/p2p/test_latency3\r
-teshsuite/simdag/network/p2p/test_latency_bound\r
-teshsuite/simdag/network/test_reinit_costs\r
-teshsuite/simdag/platforms/basic_parsing_test\r
-teshsuite/simdag/platforms/flatifier\r
-teshsuite/simdag/partask/test_comp_only_par\r
-teshsuite/simdag/partask/test_comp_only_seq\r
-teshsuite/xbt/log_large_test\r
-teshsuite/xbt/parallel_log_crashtest\r
-testsuite/run_tests\r
-testsuite/simdag/sd_test\r
-testsuite/surf/lmm_usage\r
-testsuite/surf/maxmin_bench\r
-testsuite/surf/surf_usage\r
-testsuite/surf/surf_usage2\r
-testsuite/surf/trace_usage\r
-testsuite/testgraph.dot\r
-testsuite/testgraph.xml\r
-testsuite/xbt/context_usage\r
-testsuite/xbt/graphxml_usage\r
-testsuite/xbt/heap_bench\r
-testsuite/xbt/log_usage\r
-tools/gras/gras_stub_generator\r
-tools/tesh/tesh\r
-examples/msg/tracing/categories\r
-examples/msg/tracing/ms\r
-teshsuite/simdag/platforms/is_router_test\r
-examples/msg/masterslave/masterslave_cluster\r
-examples/simdag/simdag_tracing\r
-examples/gras/spawn/spawn_child\r
-examples/gras/spawn/spawn_father\r
-examples/smpi/smpi_traced\r
-examples/smpi/ttest01\r
-teshsuite/datadesc_usage.out\r
-test_rl\r
-test_sg\r
-examples/smpi/smpi_traced.trace\r
-examples/simdag/dot/simulate_dot\r
-teshsuite/simdag/platforms/graphicator\r
+################################################
+###OTHER CAT
+*.l[oa]
+*.loT
+*.[oa]
+*~
+*.log
+*_simulator
+*.mk
+*.swp
+*.patch
+*.plist
+*.trace
+
+################################################
+### Maintainer mode
+src/simdag/dax_dtd.l
+src/surf/simgrid_dtd.l
+src/xbt/graphxml.l
+
+################################################
+### Jedule
+examples/simdag/scheduling/simgrid.jed
+teshsuite/simdag/platforms/simgrid.jed
+
+################################################
+### Libraries links 
+src/bindings/ruby/simgrid.so
+examples/ruby/simgrid.so
+examples/lua/simgrid.so
+src/bindings/ruby/libsimgrid.so
+examples/gras/console/simgrid.so
+examples/msg/masterslave/simgrid.so
+examples/simdag/simgrid.so
+
+################################################
+### Units and supernovae files
+src/simgrid_units_main.c
+src/*_unit.c
+src/supernovae_*.c
+
+################################################
+### Generated files
+_*.c
+include/simgrid_config.h
+include/xbt/version.h
+include/instr/tracing_config.h
+include/smpi/smpif.h
+src/context_sysv_config.h
+src/gras_config.h
+src/smpi/smpicc
+src/smpi/smpirun
+simgrid-*.tar.gz
+
+################################################
+### Cmake files
+CPackConfig.cmake
+CPackSourceConfig.cmake
+CTestTestfile.cmake
+conftestval
+cmake_install.cmake
+CMakeFiles
+install_manifest.txt
+_CPack_Packages/
+CMakeFiles
+CMakeCache.txt
+DartConfiguration.tcl
+simgrid.nsi
+Testing/
+Makefile
+bin/
+lib/
+build_dir/
+build/
+buildtools/Cmake/test_prog/prog_va_copy.c
+
+
+################################################
+### windows borland
+*.bpr
+*.bpf
+
+################################################
+### Documentation
+doc/all_bib.html
+doc/logcategories.sh
+doc/realtoc.sh
+doc/tmp.realtoc
+doc/using_bib.html
+doc/Doxyfile
+doc/footer.html
+*.doc.toc
+doc/latex/
+doc/html
+doc/index-API.doc
+doc/index.php
+doc/simgrid.tag
+doc/simgrid_modules.map
+doc/publis_core.bib
+doc/publis_core_bib.html
+doc/publis_count.html
+doc/publis_extern.bib
+doc/publis_extern_bib.html
+doc/publis_intra.bib
+doc/publis_intra_bib.html
+
+################################################
+### Specific of project 
+.cproject
+.project
+.settings/
+.anjuta
+.anjuta_sym_db.db
+simgrid.anjuta
+.externalToolBuilders/
+Debug/
+.emacs.desktop
+tags
+callgrind.out.*
+
+################################################
+### Examples and traces
+*.exe
+testgraph.dot
+testgraph.xml
+examples/msg/ms.trace
+examples/msg/procmig.trace
+examples/msg/tasks.trace
+examples/msg/volume.trace
+examples/msg/zmsg_test.trace
+examples/msg/categories.trace
+examples/msg/masterslave/toto.txt
+examples/msg/simulation.trace
+examples/msg/toto.txt
+examples/msg/z_gtnets.trace
+examples/msg/tracing/procmig
+examples/msg/tracing/tasks
+examples/msg/tracing/volume
+examples/msg/mc/bugged3
+examples/msg/mc/random_test
+examples/msg/chord/chord
+examples/msg/chord/chord*.xml
+examples/msg/token_ring/token_ring
+examples/simdag/ex_sd_seq_access
+examples/simdag/sd_seq_access
+examples/msg/icomms/peer
+examples/msg/icomms/peer2
+examples/gras/console/ping_client_console
+examples/gras/console/ping_server_console
+examples/gras/console/ping_simulator_console
+examples/msg/icomms/.kdbgrc.peer3
+examples/msg/icomms/peer3
+examples/msg/icomms/toto.txt
+examples/msg/masterslave/masterslave_console
+examples/simdag/ex_sd_test_console
+examples/simdag/sd_test_console
+examples/simdag/scheduling/Montage_25.jed
+examples/msg/irc_isend/peer
+examples/msg/irc_isend/toto.txt
+examples/simdag/dot/dot_test
+examples/simdag/dot/dot_test2
+examples/smpi/toto.txt
+examples/java/*/classnoinst.stamp
+examples/amok/bandwidth/bandwidth_maestro
+examples/amok/bandwidth/bandwidth_sensor
+examples/amok/saturate/saturate_maestro
+examples/amok/saturate/saturate_sensor
+examples/gras/all2all/all2all_receiver
+examples/gras/all2all/all2all_sender
+examples/gras/chrono/chrono_multiplier
+examples/gras/mmrpc/mmrpc_client
+examples/gras/mmrpc/mmrpc_server
+examples/gras/mutual_exclusion/simple_token/simple_token_node
+examples/gras/mutual_exclusion/simple_token/simple_token_checker
+examples/gras/ping/ping_client
+examples/gras/ping/ping_server
+examples/gras/ping/ping_checker
+examples/gras/pmm/pmm_master
+examples/gras/pmm/pmm_slave
+examples/gras/properties/properties_alice
+examples/gras/properties/properties_bob
+examples/gras/properties/properties_master
+examples/gras/properties/properties_slave
+examples/gras/rpc/rpc_client
+examples/gras/rpc/rpc_forwarder
+examples/gras/rpc/rpc_server
+examples/gras/spawn/spawn_server
+examples/gras/synchro/synchro_philosopher
+examples/gras/timer/timer_client
+examples/gras/replay/replay_simulator
+examples/gras/replay/replay_master
+examples/gras/replay/replay_worker
+examples/msg/actions/actions
+examples/msg/gtnets/gtnets
+examples/msg/masterslave/masterslave_bypass
+examples/msg/masterslave/masterslave_failure
+examples/msg/masterslave/masterslave_forwarder
+examples/msg/masterslave/masterslave_mailbox
+examples/msg/migration/migration
+examples/msg/parallel_task/parallel_task
+examples/msg/parallel_task/test_ptask
+examples/msg/priority/priority
+examples/msg/properties/msg_prop
+examples/msg/sendrecv/sendrecv
+examples/msg/suspend/suspend
+examples/msg/trace/test_trace_integration
+examples/msg/mc/centralized
+examples/msg/mc/bugged2
+examples/msg/mc/bugged1
+examples/msg/parallel_contexts/pcontexts
+examples/msg/parallel_contexts/pcontexts2
+examples/msg/pmm/msg_pmm
+examples/simdag/ex_sd_test
+examples/simdag/ex_sd_test2
+examples/simdag/metaxml/sd_meta
+examples/simdag/properties/sd_prop
+examples/simdag/sd_test
+examples/simdag/sd_test2
+examples/simdag/dax/dax_test
+examples/simdag/goal/goal_test
+examples/simdag/scheduling/minmin_test
+examples/smpi/reduce
+examples/smpi/bcast
+examples/smpi/bcbench
+examples/smpi/compute
+examples/smpi/compute2
+examples/smpi/compute3
+examples/smpi/first
+examples/smpi/mvmul
+examples/smpi/ring_c
+examples/smpi/second
+examples/smpi/split
+examples/smpi/allreduce
+examples/smpi/pingpong
+examples/smpi/scatter
+examples/smpi/alltoall2
+examples/smpi/alltoall_basic
+examples/smpi/alltoallv
+examples/smpi/sendrecv
+examples/smpi/smpi_sendrecv
+examples/smpi/mc_bugged1
+examples/smpi/mc_bugged2
+src/replay/replay
+src/testall
+teshsuite/gras/datadesc/datadesc_usage
+teshsuite/gras/empty_main/empty_main_function
+teshsuite/gras/msg_handle/msg_handle_client
+teshsuite/gras/msg_handle/msg_handle_server
+teshsuite/gras/small_sleep/log.txt
+teshsuite/gras/small_sleep/small_sleep_function
+teshsuite/gras/modelcheck/modelcheck_checker
+teshsuite/msg/get_sender
+teshsuite/simdag/basic0
+teshsuite/simdag/basic1
+teshsuite/simdag/basic2
+teshsuite/simdag/basic3
+teshsuite/simdag/basic4
+teshsuite/simdag/basic5
+teshsuite/simdag/basic6
+teshsuite/simdag/network/mxn/test_intra_all2all
+teshsuite/simdag/network/mxn/test_intra_independent_comm
+teshsuite/simdag/network/mxn/test_intra_scatter
+teshsuite/simdag/network/p2p/test_latency1
+teshsuite/simdag/network/p2p/test_latency2
+teshsuite/simdag/network/p2p/test_latency3
+teshsuite/simdag/network/p2p/test_latency_bound
+teshsuite/simdag/network/test_reinit_costs
+teshsuite/simdag/platforms/basic_parsing_test
+teshsuite/simdag/platforms/flatifier
+teshsuite/simdag/partask/test_comp_only_par
+teshsuite/simdag/partask/test_comp_only_seq
+teshsuite/xbt/log_large_test
+teshsuite/xbt/parallel_log_crashtest
+testsuite/run_tests
+testsuite/simdag/sd_test
+testsuite/surf/lmm_usage
+testsuite/surf/maxmin_bench
+testsuite/surf/surf_usage
+testsuite/surf/surf_usage2
+testsuite/surf/trace_usage
+testsuite/testgraph.dot
+testsuite/testgraph.xml
+testsuite/xbt/context_usage
+testsuite/xbt/graphxml_usage
+testsuite/xbt/heap_bench
+testsuite/xbt/log_usage
+tools/gras/gras_stub_generator
+tools/tesh/tesh
+examples/msg/tracing/categories
+examples/msg/tracing/ms
+teshsuite/simdag/platforms/is_router_test
+examples/msg/masterslave/masterslave_cluster
+examples/simdag/simdag_tracing
+examples/gras/spawn/spawn_child
+examples/gras/spawn/spawn_father
+examples/smpi/smpi_traced
+examples/smpi/ttest01
+teshsuite/datadesc_usage.out
+test_rl
+test_sg
+examples/smpi/smpi_traced.trace
+examples/simdag/dot/simulate_dot
+teshsuite/simdag/platforms/graphicator
+
+#########################################""
+## tutorial files
+doc/gtut-files/01-bones_client
+doc/gtut-files/01-bones_server
+doc/gtut-files/02-simple_client
+doc/gtut-files/02-simple_server
+doc/gtut-files/03-args_client
+doc/gtut-files/03-args_server
+doc/gtut-files/04-callback_client
+doc/gtut-files/04-callback_server
+doc/gtut-files/05-globals_client
+doc/gtut-files/05-globals_server
+doc/gtut-files/06-logs_client
+doc/gtut-files/06-logs_server
+doc/gtut-files/07-timers_client
+doc/gtut-files/07-timers_server
+doc/gtut-files/08-exceptions_client
+doc/gtut-files/08-exceptions_server
+doc/gtut-files/09-simpledata_client
+doc/gtut-files/09-simpledata_server
+doc/gtut-files/10-rpc_client
+doc/gtut-files/10-rpc_server
+doc/gtut-files/11-explicitwait_client
+doc/gtut-files/11-explicitwait_server
index 02e569b..f136823 100644 (file)
@@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 2.6)
 if(WIN32)
     SET(CMAKE_RC_COMPILER "windres")
 endif(WIN32)
-project(simgrid CXX C)
+project(SimGrid CXX C)
+
 set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE)
 set(CMAKE_CXX_FLAGS "" CACHE TYPE INTERNAL FORCE)
 set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE)
@@ -12,11 +13,12 @@ set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE)
 # 3.5.99 -> alpha1 (oops)
 # 3.5.9{1,2} -> beta{1,2}
 # 3.5.9{3,4,5} -> rc{1,2,3}
-# 3.6.{0,1} -> release 3.6, 3.6.1
+# 3.6.{0,1,2} -> release 3.6, 3.6.1, 3.6.2
+# 3.7.0
 
 set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "6")
-set(SIMGRID_VERSION_PATCH "1")
+set(SIMGRID_VERSION_MINOR "7")
+set(SIMGRID_VERSION_PATCH "0")
 
 if(${SIMGRID_VERSION_PATCH} EQUAL "0")
        set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}")
@@ -171,9 +173,12 @@ if(WIN32)
     
     if(ARCH_32_BITS)   ### Arch 32bits
         set(_WIN32 1)
+        set(NSIS_WIN_VERSION "win32")
     else(ARCH_32_BITS) ### Arch 64bits
         set(_WIN64 1)
+        set(NSIS_WIN_VERSION "win64")
     endif(ARCH_32_BITS)
+
     
     set(_XBT_WIN32 1)
     
diff --git a/COPYING b/COPYING
index 7f93632..37b50f0 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -7,6 +7,30 @@ Some perticular files distributed with the project have other
 licenses. More specifically, these files are listed below, along with
 their license.
 
+=========================================================================
+
+We have embeded pcre 8.12 library into the windows installer.
+
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+Release 8 of PCRE is distributed under the terms of the "BSD" licence.
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions.
+
+/*
+*      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.
+*/
+
 ==========================================================================
 
 The file src/xbt/snprintf.c contains this license text:
index c53ae08..5107163 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,93 @@
-SimGrid (3.7) unstable; urgency=low 
+SimGrid (3.7) NOT RELEASED; urgency=low
+
+  The "Simplicity does not preceed complexity, but follows it" release.
+
+  Models:
+  * Use the partial invalidation optimization by default for the
+    network too. Should produce the exact same results, only faster.
+  * Major cleanup in surf to merge models and split some optimization
+    mechanisms from the core of the models. As a result you can now
+    specify which model to use (e.g., --cfg=network/model:LV08
+    --cfg=cpu/model:Cas01) and which optimization mode to use
+    (e.g., --cfg=network/optim:lazy --cfg=cpu/optim:TI).
+    Incompatible combinations should err at initialization. See
+    --help-models for the list of all models and optimization modes.
+  * The CLM03 workstation model were dropped for simplicity because it
+    used the deprecated CM02 network model. Use default instead.
+  * Rename the TCP_gamma configuration option to network/TCP_gamma
+  * Rename the coordinates configuration option to
+    network/coordinates, and document it
+  * Use now crosstraffic keyword instead of the terribly missleading 
+    fullduplex keyword. Use --cfg=network/crosstraffic:1. This is
+    activated by default now in the current default model.
+
+  Simix:
+  * Stabilize the parallel execution mode of user contexts
+  * Introduce configuration variables to control parallel execution:
+    - contexts/synchro: Synchronization mode to use when running
+      contexts in parallel (either futex, posix or busy_wait)
+    - contexts/parallel_threshold: Minimal number of user contexts
+      to be run in parallel (raw contexts only)
+
+  SimDag:
+  * Performance boost by using a swag internally to compute the set of
+    tasks that are finished and should constitute the return value of
+    SD_simulate.
 
- -- `LC_ALL=C date` Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
- SIMDAG
- [dot loader]
- * Bug fix: correction of the dot file parsing with the libcgraph
+  XBT:
+  * Mallocators: allow value NULL for the reset function.
+  * Dicts: new function xbt_dict_new_homogeneous(void(*)(void*)) to
+    create homogeneous dictionaries, where all the elements share the
+    same free function.
+
+  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
+
+SimGrid (3.6.2) stable; urgency=low
+
+ The "Not coding new stuff allows to polish old things" release.
+
+ General
+ * New bindings to the NS3 packet level simulator (experimental)
+ * Use the raw (efficient) execution contextes instead of the sysv
+   (portable) ones when possible.
+ * libpcre is now mandatory in any cases since not using it led to
+    severe performance loss and possibly other issues
+ * Update the XML platforms:
+   - G5K: include the lastest machine in Nancy
+   - GridPP and LCG: new platforms
+ * Documentation was partially updated, at least (more to come)
+
+ Bug fixes, cosmetics and small improvements
+ * Free terminated processes before the end of the simulation to avoid
+   exhausting the memory of users having very dynamic amount of
+   processes.
+ * Bug fix and cosmetics about canceling non-running tasks
+ * Bug fix about the dot loader's issues when using libcgraph
+
+ Portability
+ * Create an installer for windows with nsis (amd64 and win32)
+   - Add an hello world project to illustrate simgrid project creation.
+   - Embed libpcre into the Simgrid installer to avoid
+     its compilation burden
+ * The raw execution contextes should work on Apple now
+ * Port to Windows 64 bits
+    - Sysv contextes now have an implementation for this arch
+    - GRAS communication features now support this arch
+ * Drop support for borland compiler on windows
+    - this code was not maintained, and we kinda depend on gcc nowadays
+ * Fix portability issues on kfreebsd/gnu: build error about semaphores
+ * Fix portability issue on unstable ubuntu: linker became picky on
+   argument order
 
+ -- Wed Oct  5 15:51:01 CEST 2011 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
-SimGrid (3.6.1) unstable; urgency=low 
+
+SimGrid (3.6.1) stable; urgency=low
 
  The "Oops, we broke Macs too" release
 
  Portability
- * Fixed contextes detection so that raw ones are used when possible   
+ * Fixed contextes detection so that raw ones are used when possible
  * On Mac, do not use Posix Ucontextes with gcc v4.[1-5] since this
    leads to a strange error, with user code segfaulting sometimes when
    the generated code is not perfectly aligned (which is not
@@ -26,14 +102,14 @@ SimGrid (3.6) stable; urgency=medium
 
  The Summer Release, also known as the "OMG! They Killed Kenny!" version
 
- Java and Ruby: 
+ Java and Ruby:
  * Bindings now constitute their own package, separated from the main one.
    Rationale: reduce our maintainance nightmare by reducing the module coupling
-   They will soon be released on their own on gforge. 
+   They will soon be released on their own on gforge.
  * In the meanwhile:
    svn co svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-java
    svn co svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-ruby
+
  GRAS: It is not considered as stable anymore, but experimental. Sorry.
  * It's not quite deprecated for now because we have no replacement,
    but it may soon become the case.
@@ -83,6 +159,8 @@ SimGrid (3.6) stable; urgency=medium
    combine Vivaldi based latencies with last-mile platforms.
 
  SIMIX
+ * Added a check for NaN of IEEE754 infinite in the double entries of
+   the smx_user.c file
  * Introduce a new context factory "raw", highly inspirated from the
    ucontext factory, but using manually crafted functions in assembly to
    do the work in an efficient manner.
@@ -97,7 +175,7 @@ SimGrid (3.6) stable; urgency=medium
    When nthreads > 1, you can use --cfg=contexts/threshold:P to run the user
    processes in parallel only when their number is greater than or equal to P
    (the default is 2).
- * Added a check for NaN of IEEE754 infinite in the double entries of 
+ * Added a check for NaN of IEEE754 infinite in the double entries of
    the smx_user.c file
 
  XBT
@@ -143,9 +221,9 @@ SimGrid (3.6) stable; urgency=medium
    at the tools directory (fix-paje-trace.sh) can be used to put the events
    in order. We have changed the tracing so it can generate ordered timestamped
    events in the final trace, but depending on the simulator (and how much time
-   is simulated) that can lead to a huge memory utilization. It is desactivated 
+   is simulated) that can lead to a huge memory utilization. It is desactivated
    by default, but it can be activated using the --cfg=tracing/buffer:1 switch.
-   
+
  Build Infrastructure
  * Define a SIMGRID_VERSION macro in simgrid_config.h.
    - We are trying hard to keep the API stable, but it may happen that
@@ -1091,7 +1169,7 @@ SimGrid (3.2) stable; urgency=high
     and (2) msg_size. This was changed to (1) msg_size and (2) amount of
     messages. This was need for the fool willing to send more than MAXINT
     bytes on quite fat pipes.
-       
+
   AMOK:
   * Do really rename the hostmanagement module to peermanagement. [Mt]
     Ie, rename functions from amok_hm_* to amok_pm_*. This breaks the API,
@@ -1169,7 +1247,7 @@ SimGrid (3.1) stable; urgency=high
     directly on top of SURF and provides an API rather close to the old
     SG. Some old codes using SG are currently under rewrite to check that
     all needful functions are provided. [Christophe Thiery]
-       
+
   SURF:
   * Complete rewrite of the KCCFLN05 workstation model. It is now an
     extension of the classical CLM03 model that gracefully handles
@@ -1283,7 +1361,7 @@ SimGrid (3.0.1) stable; urgency=low
   SURF:
   * Add additionnal checkings on communications. Assert that two
     communicating hosts are connected by a set of links... [AL]
-       
+
   MSG:
   * Add additionnal checkings on channel values in communication [AL]
   * New: MSG_task_get_source to see on which host a task was generated [HC]
@@ -1292,7 +1370,7 @@ SimGrid (3.0.1) stable; urgency=low
     by host. [AL]
   * New: MSG_error_t MSG_task_get_from_host(m_task_t * task, int channel, m_host_t host);
     waits for the first task coming from a given host.. [AL]
-       
+
   GRAS new functionnalities: [MQ]
   * Enhance the parsing macro to allow the size of multidimentional objects
     to be given thru annotations.
@@ -1355,7 +1433,7 @@ SimGrid (3.00) stable; urgency=high
   * New! Give the possibility to hijack the surf parser and thus bypass
     MSG_create_environment and MSG_launch_application. Have a look at
     examples/msg/msg_test_surfxml_bypassed.c to see how it can be done.
-       
+
  -- Arnaud Legrand <simgrid-devel@lists.gforge.inria.fr>  Sat, 20 Aug 2005 23:25:25 -0700
 
 SimGrid (2.96) unstable; urgency=low
@@ -1693,7 +1771,7 @@ SimGrid (2.90) unstable; urgency=low
   - Main loop and datastructures of SURF. A cpu resource object is
     functional. Surf can thus be used to create cpu's with variable
     performance on which you can execute some actions.
-       
+
 2004-11-15 Martin Quinson
   - Port to ARM. Simply added the alignment and size descriptions. Should
     work, but the ARM machines are so slow that I didn't had the opportunity
diff --git a/NEWS b/NEWS
index dea8725..094dca6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,19 +1,41 @@
-
-                    _               _____ _____ 
+                    _               ____  _____
 __   _____ _ __ ___(_) ___  _ __   |___ /|___  |
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   / / 
- \ V /  __/ |  \__ \ | (_) | | | |  ___) | / /  
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_/   
-                                                
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   / /
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | / /
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_/
 
+The "Simplicity does not preceed complexity, but follows it" release.
 (still to be done)
-
-                    _               _____  __   
-__   _____ _ __ ___(_) ___  _ __   |___ / / /_  
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| '_ \ 
+                    _               _____  __    ____
+__   _____ _ __ ___(_) ___  _ __   |___ / / /_  |___ \
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| '_ \   __) |
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | (_) | / __/
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)___(_)_____|
+                Oct 5 2011
+
+The "Not coding new stuff allows to polish old things" release.
+
+ * Portability to Mac and Windows improved.
+ * Possible misconfigurations (contextes, libPCRE) made impossible by
+   removing the option or providing sane default value.
+ * Exerimental support to NS3 simulator as a backend.
+
+                    _               _____  __    _
+__   _____ _ __ ___(_) ___  _ __   |___ / / /_  / |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| '_ \ | |
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | (_) || |
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)___(_)_|
+                Jun 27 2011
+
+The "Oops, we broke Macs too" release.
+Bug fix to an issue preventing SimGrid from working on Mac OSX.
+
+                    _               _____  __
+__   _____ _ __ ___(_) ___  _ __   |___ / / /_
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| '_ \
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | (_) |
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)___/ 
-                                                
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)___/
+                Jun 21 2011
 
 The "OMG! They Killed Kenny!" version. Major changes:
 
@@ -29,14 +51,15 @@ The "OMG! They Killed Kenny!" version. Major changes:
  * Improved SMPI: Faster Fortran, automatic privatization of C globals
  * Tracing: trace contains the full platform hierarchy
    exactly as declared using the ASes of the platform file
+
 Plus numerous other goodies (check the ChangeLog for details)
 
-                    _               _____  ____                    
-__   _____ _ __ ___(_) ___  _ __   |___ / | ___| 
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ |___ \ 
+                    _               _____  ____
+__   _____ _ __ ___(_) ___  _ __   |___ / | ___|
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ |___ \
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____/
+                01 Dec 2010
 
 The "Winter in Frejus" release. Also known as "ANR/ADT funding helps"
 Major changes are:
@@ -56,37 +79,38 @@ Major changes are:
     - Windows port: should be usable now but still considered experimental
     - Autotools have now been completely removed
 
-
-                    _               _____ _  _    _ 
+                    _               _____ _  _    _
 __   _____ _ __ ___(_) ___  _ __   |___ /| || |  / |
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| || |_ | |
  \ V /  __/ |  \__ \ | (_) | | | |  ___) |__   _|| |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_) |_|(_)_|
+                04 May 2010
 
 The "Polishing easter eggs is probably a good idea" release.
-This is a bug fixes release only. 
-                    _               _____ _  _   
-__   _____ _ __ ___(_) ___  _ __   |___ /| || |  
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| || |_ 
+This is a bug fixes release only.
+                    _               _____ _  _
+__   _____ _ __ ___(_) ___  _ __   |___ /| || |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \| || |_
  \ V /  __/ |  \__ \ | (_) | | | |  ___) |__   _|
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_) |_|  
-
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_) |_|
+                28 Apr 2010
 
 The "Easter in Cargese" release. Also known as (major changes):
+
  * the "se habla Java, Ruby 話せます, fala-se Lua (and deaf-friendly)"
    ~> bindings were greatly improved
    ~> new tracing infrastructure for better visualization introduced
-    
+
  * the "Welcome to configury modernity" release.
    ~> we switched from autotools to cmake, and improved our cdash
-   
-                    _               _____  _____ _  _   
-__   _____ _ __ ___(_) ___  _ __   |___ / |___ /| || |  
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \| || |_ 
+
+                    _               _____  _____ _  _
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ /| || |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \| || |_
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |__   _|
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_) |_|  
-                                           
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_) |_|
+                24 Dec 2009
+
 The "Desktop Grid needs love too" release (also called "Xmas release").
 Most important changes:
  * Big speedup through lazy evaluation of the linear models
@@ -94,22 +118,24 @@ Most important changes:
  * Simix network module for internal cleanups
  * Load DAX of applications into SimDag
  * Lot of small cleanups and other bug fixes
-                    _               _____  _____  _____ 
-__   _____ _ __ ___(_) ___  _ __   |___ / |___ / |___ / 
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \   |_ \ 
+
+                    _               _____  _____  _____
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ / |___ /
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \   |_ \
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) | ___) |
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_)____/ 
-                                                        
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_)____/
+                20 Aug 2009
+
 The "Need for Speed" release.
 Big speedup through some function inlining.
 
-                    _               _____  _____  ____  
-__   _____ _ __ ___(_) ___  _ __   |___ / |___ / |___ \ 
+                    _               _____  _____  ____
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ / |___ \
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \   __) |
- \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) | / __/ 
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) | / __/
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_)_____|
-                                                        
+                19 Aug 2009
+
 The "Simplicity does not preceed complexity, but follows it" release.
 Most important changes:
  * surf and simix modules reworked for simplification.
@@ -118,19 +144,19 @@ Most important changes:
 
 On the way, we gained a bit more than 5% on the classical master/slave
 example. More to come on this in future releases.
-                    _               _____  _____  _ 
+                    _               _____  _____  _
 __   _____ _ __ ___(_) ___  _ __   |___ / |___ / / |
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \ | |
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) || |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____(_)_|
-
+                27 Jun 2009
 
 This dot release is mainly a maintainance one. Most important changes:
  * We fixed a large amount of bugs all around
+
  * We sanitized the way configuration is handled internally.
    Try passing --cfg-help to binaries compiled against this version.
-   
+
  * SMPI is in better shape: lot of bugs fixing & usability improvements
    It may be worth trying it (even if all bugs are not gone yet)
 
@@ -138,21 +164,21 @@ This version may have a bit more of memleaks than 3.3. This will be
 fixed in a latter release.
 
 
-     ____  _            ____      _     _ 
+     ____  _            ____      _     _
     / ___|(_)_ __ ___  / ___|_ __(_) __| |
     \___ \| | '_ ` _ \| |  _| '__| |/ _` |
      ___) | | | | | | | |_| | |  | | (_| |
-    |____/|_|_| |_| |_|\____|_|  |_|\__,_|                                       
-                    _               _____  _____ 
-__   _____ _ __ ___(_) ___  _ __   |___ / |___ / 
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \ 
- \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |  
-  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____/ 
-               _             _           _ 
+    |____/|_|_| |_| |_|\____|_|  |_|\__,_|
+                    _               _____  _____
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ /
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____/
+               _             _           _
      _  _ _ _ | |___ __ _ __| |_  ___ __| |
     | || | ' \| / -_) _` (_-< ' \/ -_) _` |
      \_,_|_||_|_\___\__,_/__/_||_\___\__,_|
-                                       
+               Mar 16 2007
 
 homepage: http://simgrid.gforge.inria.fr/
 download: http://gforge.inria.fr/frs/?group_id=12
@@ -160,22 +186,22 @@ download: http://gforge.inria.fr/frs/?group_id=12
 At least, after 2 years of hard work, we managed to release the 3.3
 version of the SimGrid framework. There is so many changes that the
 changelog only lists the most important ones, leaving alone the small
-improvements, bug fixing and new gadgets. 
+improvements, bug fixing and new gadgets.
 
 In short:
  * Java bindings
  * New simulation models, and improvement of the GTNetS wrapper
+
  * Large memory savings (mainly in parser)
  * Faster (twice faster is not uncommon, and from 20 hours to 2
            minutes on very large scenarios)
  * Much better scalability (tested up to 250,000 processes)
+
  * Complete regression testing framework so that you can trust the tool
  * Lot of neat new modules in the XBT toolbox
+
 This version was throughfully tested on linux 32bits and 64bits
-(debian), as well as Mac OSX (leopard). 
+(debian), as well as Mac OSX (leopard).
 
 Unfortunately, our windows-guy left, and we cannot release the windows
 version at the same time than the other archs. Any help would be
@@ -185,7 +211,7 @@ Some of the 96 included test suites are known to fail, but everything
 should work anyway (don't panic):
  * The amok module does not work in real deployment ATM, but I don't
    see this as release critical since I'm not aware of anyone needing
-   this right now   
+   this right now
  * Some tests about the ability of GRAS to receive messages from
    exotic platforms fail because I've lost access to these platforms
    (such as AIX)
@@ -194,7 +220,7 @@ should work anyway (don't panic):
  * the tesh auto-tests "fail" on Mac OSX. This is because "rm -rf" is
    sometimes too verbose (when the OS creates hidden files, I
    suspect), but tesh definitly work as the rest on this arch.
-   
+
 We hope to manage to do more timely releases in the future, even if
 that may turn out difficult since big stuff is comming (I don't say
 much here for the suspense ;)
index 2a8302a..791d365 100644 (file)
@@ -66,9 +66,9 @@ The tree is not splited on projects, but on file finality:
 Most files use the Kernighan & Ritchie coding style with 2 spaces of
 indentation. The indent program can help you to stick to it:
 
-indent -kr -br -brs -ce -bbo --dont-break-procedure-type --no-tabs
---cuddle-do-while --cuddle-else --indent-level2 --leave-preprocessor-space
---no-space-after-function-call-names <myfile>
+indent -kr -l80 -nut -i2 -lps -npcs -br -brs -ce -cdw -bbo -npsl <myfile>
+
+The script ./tools/indent runs indent with the appropriate options.
 
 FIXME: this list of arguments is still to be discussed, maybe
 
index a923771..b0df9c3 100644 (file)
@@ -10,7 +10,6 @@ if(enable_smpi AND NOT WIN32)
        exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
 endif(enable_smpi AND NOT WIN32)
        
-       
 ### For code coverage
 ### Set some variables
 SET(UPDATE_TYPE "svn")
@@ -25,358 +24,364 @@ INCLUDE(CTest)
 ENABLE_TESTING()
 
 if(NOT enable_memcheck)
-ADD_TEST(tesh-self-basic               ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" basic.tesh)
-ADD_TEST(tesh-self-cd                  ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/cd.tesh)
-ADD_TEST(tesh-self-IO-broken-pipe      ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" IO-broken-pipe.tesh)
-ADD_TEST(tesh-self-IO-orders           ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/IO-orders.tesh)
-ADD_TEST(tesh-self-IO-bigsize          ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" IO-bigsize.tesh)
-ADD_TEST(tesh-self-set-return          ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-return.tesh)
-ADD_TEST(tesh-self-set-signal          ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-signal.tesh)
-ADD_TEST(tesh-self-set-timeout         ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-timeout.tesh)
-ADD_TEST(tesh-self-set-ignore-output   ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/set-ignore-output.tesh)
-ADD_TEST(tesh-self-catch-return                ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-return.tesh)
-ADD_TEST(tesh-self-catch-signal                ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-signal.tesh)
-ADD_TEST(tesh-self-catch-timeout       ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-timeout.tesh)
-ADD_TEST(tesh-self-catch-wrong-output  ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-wrong-output.tesh)
-ADD_TEST(tesh-self-bg-basic            ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" bg-basic.tesh)
-ADD_TEST(tesh-self-bg-set-signal       ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" bg-set-signal.tesh)
-ADD_TEST(tesh-self-background          ${CMAKE_BINARY_DIR}/bin/tesh --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" background.tesh)
+ADD_TEST(tesh-self-basic               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" basic.tesh)
+ADD_TEST(tesh-self-cd                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/cd.tesh)
+ADD_TEST(tesh-self-IO-broken-pipe      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" IO-broken-pipe.tesh)
+ADD_TEST(tesh-self-IO-orders           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/IO-orders.tesh)
+ADD_TEST(tesh-self-IO-bigsize          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" IO-bigsize.tesh)
+ADD_TEST(tesh-self-set-return          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-return.tesh)
+ADD_TEST(tesh-self-set-signal          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-signal.tesh)
+ADD_TEST(tesh-self-set-timeout         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" set-timeout.tesh)
+ADD_TEST(tesh-self-set-ignore-output   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/set-ignore-output.tesh)
+ADD_TEST(tesh-self-catch-return                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-return.tesh)
+ADD_TEST(tesh-self-catch-signal                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-signal.tesh)
+ADD_TEST(tesh-self-catch-timeout       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-timeout.tesh)
+ADD_TEST(tesh-self-catch-wrong-output  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_BINARY_DIR}/bin" ${CMAKE_HOME_DIRECTORY}/tools/tesh/catch-wrong-output.tesh)
+ADD_TEST(tesh-self-bg-basic            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" bg-basic.tesh)
+ADD_TEST(tesh-self-bg-set-signal       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" bg-set-signal.tesh)
+ADD_TEST(tesh-self-background          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd "${CMAKE_HOME_DIRECTORY}/tools/tesh" background.tesh)
 
 # BEGIN TESH TESTS
 
+# test for code coverage
+ADD_TEST(help ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help)
+ADD_TEST(help-models ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-models)
+
 # teshsuite/xbt
-ADD_TEST(tesh-log-large                ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_large_test.tesh)
-ADD_TEST(tesh-log-parallel     ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parallel_log_crashtest.tesh)
+ADD_TEST(tesh-log-large                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_large_test.tesh)
+ADD_TEST(tesh-log-parallel     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/parallel_log_crashtest.tesh)
 
 # teshsuite/gras/datadesc directory
-ADD_TEST(tesh-gras-dd-mem      ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_mem.tesh)
-ADD_TEST(tesh-gras-dd-rw       ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_rw.tesh)
-ADD_TEST(tesh-gras-dd-r-little32-4     ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite  --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_little32_4.tesh)
-ADD_TEST(tesh-gras-dd-r-little64       ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite  --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_little64.tesh)
-ADD_TEST(tesh-gras-dd-r-big32-8-4      ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite  --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_big32_8_4.tesh)
+ADD_TEST(tesh-gras-dd-mem      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_mem.tesh)
+ADD_TEST(tesh-gras-dd-rw       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_rw.tesh)
+ADD_TEST(tesh-gras-dd-r-little32-4     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite   --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_little32_4.tesh)
+ADD_TEST(tesh-gras-dd-r-little64       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite   --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_little64.tesh)
+ADD_TEST(tesh-gras-dd-r-big32-8-4      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite   --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc_r_big32_8_4.tesh)
 
 IF(${ARCH_32_BITS})
-  ADD_TEST(tesh-gras-msg-handle-sg-32  ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/test_sg_32.tesh)
+  ADD_TEST(tesh-gras-msg-handle-sg-32  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/test_sg_32.tesh)
 ELSE(${ARCH_32_BITS})
-  ADD_TEST(tesh-gras-msg-handle-sg-64  ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/test_sg_64.tesh)
+  ADD_TEST(tesh-gras-msg-handle-sg-64  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/test_sg_64.tesh)
 ENDIF(${ARCH_32_BITS})
 
-ADD_TEST(tesh-gras-empty-main-rl       ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/empty_main/test_rl.tesh)
-ADD_TEST(tesh-gras-empty-main-sg       ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/empty_main/test_sg.tesh)
+ADD_TEST(tesh-gras-empty-main-rl       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main       --cd ${CMAKE_HOME_DIRECTORY}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/empty_main/test_rl.tesh)
+ADD_TEST(tesh-gras-empty-main-sg       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main       --cd ${CMAKE_HOME_DIRECTORY}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/empty_main/test_sg.tesh)
 
 IF(${ARCH_32_BITS})
-  ADD_TEST(tesh-gras-small-sleep-sg-32 ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep     --cd ${CMAKE_HOME_DIRECTORY}/teshsuite gras/small_sleep/test_sg_32.tesh)
+  ADD_TEST(tesh-gras-small-sleep-sg-32 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite gras/small_sleep/test_sg_32.tesh)
 ELSE(${ARCH_32_BITS})
-  ADD_TEST(tesh-gras-small-sleep-sg-64 ${CMAKE_BINARY_DIR}/bin/tesh --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep     --cd ${CMAKE_HOME_DIRECTORY}/teshsuite gras/small_sleep/test_sg_64.tesh)
+  ADD_TEST(tesh-gras-small-sleep-sg-64 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite gras/small_sleep/test_sg_64.tesh)
 ENDIF(${ARCH_32_BITS})
 
 # GRAS examples
-ADD_TEST(gras-ping-rl                  ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/ping     ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_rl.tesh)
-ADD_TEST(gras-rpc-rl                   ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc              ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_rl.tesh)
-ADD_TEST(gras-spawn-rl                 ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn    ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_rl.tesh)
-ADD_TEST(gras-timer-rl                 ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/timer    ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_rl.tesh)
-ADD_TEST(gras-chrono-rl                        ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono   ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_rl.tesh)
-ADD_TEST(gras-simple-token-rl  ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_rl.tesh)
-ADD_TEST(gras-mmrpc-rl                 ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc    ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_rl.tesh)
-ADD_TEST(gras-all2all-rl               ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all  ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_rl.tesh)
-ADD_TEST(gras-pmm-rl                   ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm              ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_rl.tesh)
-ADD_TEST(gras-synchro-rl               ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro  ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_rl.tesh)
-ADD_TEST(gras-properties-rl            ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_rl.tesh)
+ADD_TEST(gras-ping-rl                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/ping     ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_rl.tesh)
+ADD_TEST(gras-rpc-rl                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc              ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_rl.tesh)
+ADD_TEST(gras-spawn-rl                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn    ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_rl.tesh)
+ADD_TEST(gras-timer-rl                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer    ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_rl.tesh)
+ADD_TEST(gras-chrono-rl                        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono   ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_rl.tesh)
+ADD_TEST(gras-simple-token-rl  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_rl.tesh)
+ADD_TEST(gras-mmrpc-rl                 ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc    ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_rl.tesh)
+ADD_TEST(gras-all2all-rl               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all  ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_rl.tesh)
+ADD_TEST(gras-pmm-rl                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm              ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_rl.tesh)
+ADD_TEST(gras-synchro-rl               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro  ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_rl.tesh)
+ADD_TEST(gras-properties-rl            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_rl.tesh)
 
 # BEGIN CONTEXTS FACTORY
-ADD_TEST(tesh-msg-get-sender-thread    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
-ADD_TEST(tesh-simdag-reinit-costs-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/test_reinit_costs.tesh)
-ADD_TEST(tesh-simdag-parser-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test.tesh)
+ADD_TEST(tesh-msg-get-sender-thread    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
 if(HAVE_RAWCTX)
-       ADD_TEST(tesh-msg-get-sender-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
-       ADD_TEST(tesh-simdag-reinit-costs-raw           ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/test_reinit_costs.tesh)
-       ADD_TEST(tesh-simdag-parser-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test.tesh)
+       ADD_TEST(tesh-msg-get-sender-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
 endif(HAVE_RAWCTX)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(tesh-msg-get-sender-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
-       ADD_TEST(tesh-simdag-reinit-costs-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/test_reinit_costs.tesh)
-       ADD_TEST(tesh-simdag-parser-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test.tesh)
+       ADD_TEST(tesh-msg-get-sender-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.tesh)
 endif(HAVE_UCONTEXT_H)
 
 IF(enable_debug) # these tests need the assertion mechanism
-       if(HAVE_RAWCTX)
-               ADD_TEST(tesh-simdag-parser-bogus-symmetric-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
-       endif(HAVE_RAWCTX)
-       if(HAVE_UCONTEXT_H)
-               ADD_TEST(tesh-simdag-parser-bogus-symmetric-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
-       endif(HAVE_UCONTEXT_H)
-       ADD_TEST(tesh-simdag-parser-bogus-symmetric-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
+       ADD_TEST(tesh-simdag-parser-bogus-symmetric     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}             --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms two_hosts_asymetric.tesh)
 ENDIF(enable_debug)
 
-ADD_TEST(tesh-simdag-parser-sym-full           ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test_sym_full.tesh)
-ADD_TEST(tesh-simdag-flatifier         ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms flatifier.tesh)
-ADD_TEST(tesh-simdag-full-links                ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms get_full_link.tesh)
-ADD_TEST(tesh-simdag-basic0            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic0.tesh)
-ADD_TEST(tesh-simdag-basic1            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic1.tesh)
-ADD_TEST(tesh-simdag-basic2            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic2.tesh)
-ADD_TEST(tesh-simdag-basic3            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic3.tesh)
-ADD_TEST(tesh-simdag-basic4            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic4.tesh)
-ADD_TEST(tesh-simdag-basic5            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic5.tesh)
-ADD_TEST(tesh-simdag-basic6            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic6.tesh)
-ADD_TEST(tesh-simdag-p2p-1             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency1.tesh)
-ADD_TEST(tesh-simdag-p2p-2             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency2.tesh)
-ADD_TEST(tesh-simdag-p2p-3             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency3.tesh)
-ADD_TEST(tesh-simdag-p2p-4             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency_bound.tesh)
-ADD_TEST(tesh-simdag-mxn-1             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_all2all.tesh)
-ADD_TEST(tesh-simdag-mxn-2             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_independent_comm.tesh)
-ADD_TEST(tesh-simdag-mxn-3             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_scatter.tesh)
-ADD_TEST(tesh-simdag-par-1             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_seq.tesh)
-ADD_TEST(tesh-simdag-par-2             ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_par.tesh)
+ADD_TEST(tesh-simdag-reinit-costs      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/test_reinit_costs.tesh)
+ADD_TEST(tesh-simdag-parser    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}             --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test.tesh)
+ADD_TEST(tesh-simdag-parser-sym-full           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test_sym_full.tesh)
+ADD_TEST(tesh-simdag-flatifier         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms flatifier.tesh)
+ADD_TEST(tesh-simdag-full-links                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms get_full_link.tesh)
+ADD_TEST(tesh-simdag-parser-bypass ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms  --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test_bypass.tesh)
+ADD_TEST(tesh-simdag-basic0            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic0.tesh)
+ADD_TEST(tesh-simdag-basic1            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic1.tesh)
+ADD_TEST(tesh-simdag-basic2            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic2.tesh)
+ADD_TEST(tesh-simdag-basic3            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic3.tesh)
+ADD_TEST(tesh-simdag-basic4            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic4.tesh)
+ADD_TEST(tesh-simdag-basic5            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic5.tesh)
+ADD_TEST(tesh-simdag-basic6            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic6.tesh)
+ADD_TEST(tesh-simdag-p2p-1             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency1.tesh)
+ADD_TEST(tesh-simdag-p2p-2             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency2.tesh)
+ADD_TEST(tesh-simdag-p2p-3             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency3.tesh)
+ADD_TEST(tesh-simdag-p2p-4             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/test_latency_bound.tesh)
+ADD_TEST(tesh-simdag-mxn-1             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_all2all.tesh)
+ADD_TEST(tesh-simdag-mxn-2             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_independent_comm.tesh)
+ADD_TEST(tesh-simdag-mxn-3             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/test_intra_scatter.tesh)
+ADD_TEST(tesh-simdag-par-1             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_seq.tesh)
+ADD_TEST(tesh-simdag-par-2             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite       --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/test_comp_only_par.tesh)
 
 # MSG examples
-ADD_TEST(msg-sendrecv-CLM03-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
-ADD_TEST(msg-sendrecv-Vegas-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
-ADD_TEST(msg-sendrecv-Reno-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
-ADD_TEST(msg-suspend-thread    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
-ADD_TEST(msg-masterslave-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
-ADD_TEST(msg-masterslave-forwarder-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
-ADD_TEST(msg-masterslave-failure-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
-ADD_TEST(msg-masterslave-bypass-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
-ADD_TEST(msg-masterslave-mailbox-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+ADD_TEST(msg-sendrecv-CLM03-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
+ADD_TEST(msg-sendrecv-Vegas-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
+ADD_TEST(msg-sendrecv-Reno-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
+ADD_TEST(msg-suspend-thread    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
+ADD_TEST(msg-masterslave-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
+ADD_TEST(msg-masterslave-forwarder-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
+ADD_TEST(msg-masterslave-failure-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
+ADD_TEST(msg-masterslave-bypass-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
+ADD_TEST(msg-masterslave-mailbox-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+ADD_TEST(msg-masterslave-kill-thread   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
 
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(msg-sendrecv-CLM03-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
-       ADD_TEST(msg-sendrecv-Vegas-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
-       ADD_TEST(msg-sendrecv-Reno-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
-       ADD_TEST(msg-suspend-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
-       ADD_TEST(msg-masterslave-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
-       ADD_TEST(msg-masterslave-forwarder-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
-       ADD_TEST(msg-masterslave-failure-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
-       ADD_TEST(msg-masterslave-bypass-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
-       ADD_TEST(msg-masterslave-mailbox-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+       ADD_TEST(msg-sendrecv-CLM03-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
+       ADD_TEST(msg-sendrecv-Vegas-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
+       ADD_TEST(msg-sendrecv-Reno-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
+       ADD_TEST(msg-suspend-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
+       ADD_TEST(msg-masterslave-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
+       ADD_TEST(msg-masterslave-forwarder-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
+       ADD_TEST(msg-masterslave-failure-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
+       ADD_TEST(msg-masterslave-bypass-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
+       ADD_TEST(msg-masterslave-mailbox-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+    ADD_TEST(msg-masterslave-kill-ucontext         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
 endif(HAVE_UCONTEXT_H)
 
 if(HAVE_RAWCTX)
-  ADD_TEST(msg-sendrecv-CLM03-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
-  ADD_TEST(msg-sendrecv-Vegas-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
-  ADD_TEST(msg-sendrecv-Reno-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
-  ADD_TEST(msg-suspend-raw             ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
-  ADD_TEST(msg-masterslave-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
-  ADD_TEST(msg-masterslave-forwarder-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
-  ADD_TEST(msg-masterslave-failure-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
-  ADD_TEST(msg-masterslave-bypass-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
-  ADD_TEST(msg-masterslave-mailbox-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+  ADD_TEST(msg-sendrecv-CLM03-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
+  ADD_TEST(msg-sendrecv-Vegas-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
+  ADD_TEST(msg-sendrecv-Reno-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Reno.tesh)
+  ADD_TEST(msg-suspend-raw             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/suspend.tesh)
+  ADD_TEST(msg-masterslave-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
+  ADD_TEST(msg-masterslave-forwarder-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
+  ADD_TEST(msg-masterslave-failure-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
+  ADD_TEST(msg-masterslave-bypass-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_bypass.tesh)
+  ADD_TEST(msg-masterslave-mailbox-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
+  ADD_TEST(msg-masterslave-kill-raw            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
 endif(HAVE_RAWCTX)
 
-if (enable_pcre)
-  ADD_TEST(msg-masterslave-vivaldi-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
-  ADD_TEST(msg-token-ring-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
-  if(HAVE_RAWCTX)
-    ADD_TEST(msg-masterslave-vivaldi-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
-    ADD_TEST(msg-token-ring-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
-  endif(HAVE_RAWCTX)
-  if(HAVE_UCONTEXT_H)
-       ADD_TEST(msg-masterslave-vivaldi-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
-       ADD_TEST(msg-token-ring-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
-  endif(HAVE_UCONTEXT_H)
-endif (enable_pcre)
-
-ADD_TEST(msg-masterslave-multicore-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
-ADD_TEST(msg-migration-thread  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
-ADD_TEST(msg-ptask-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
-ADD_TEST(msg-priority-thread   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
-ADD_TEST(msg-properties-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
-ADD_TEST(msg-icomms-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
-ADD_TEST(msg-actions-thread    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
-ADD_TEST(msg-masterslave-cpu-ti-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
-ADD_TEST(msg-trace-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
-ADD_TEST(msg-chord-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
-ADD_TEST(msg-chord-thread-parallel     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+ADD_TEST(msg-masterslave-vivaldi-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
+ADD_TEST(msg-token-ring-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
+if(HAVE_RAWCTX)
+  ADD_TEST(msg-masterslave-vivaldi-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
+  ADD_TEST(msg-token-ring-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
+endif(HAVE_RAWCTX)
+if(HAVE_UCONTEXT_H)
+       ADD_TEST(msg-masterslave-vivaldi-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
+       ADD_TEST(msg-token-ring-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring         --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
+endif(HAVE_UCONTEXT_H)
+
+ADD_TEST(msg-masterslave-multicore-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
+ADD_TEST(msg-migration-thread  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
+ADD_TEST(msg-ptask-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
+ADD_TEST(msg-priority-thread   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
+ADD_TEST(msg-properties-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
+ADD_TEST(msg-icomms-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
+ADD_TEST(msg-actions-thread    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
+ADD_TEST(msg-masterslave-cpu-ti-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
+ADD_TEST(msg-trace-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
+ADD_TEST(msg-chord-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+ADD_TEST(msg-chord-thread-parallel     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(msg-masterslave-multicore-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
-       ADD_TEST(msg-migration-ucontext ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
-       ADD_TEST(msg-ptask-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
-       ADD_TEST(msg-priority-ucontext  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
-       ADD_TEST(msg-properties-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
-       ADD_TEST(msg-icomms-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
-       ADD_TEST(msg-actions-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
-       ADD_TEST(msg-masterslave-cpu-ti-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
-       ADD_TEST(msg-trace-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
-       ADD_TEST(msg-chord-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
-       ADD_TEST(msg-chord-ucontext-parallel    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+       ADD_TEST(msg-masterslave-multicore-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
+       ADD_TEST(msg-migration-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
+       ADD_TEST(msg-ptask-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
+       ADD_TEST(msg-priority-ucontext  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
+       ADD_TEST(msg-properties-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
+       ADD_TEST(msg-icomms-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
+       ADD_TEST(msg-actions-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
+       ADD_TEST(msg-masterslave-cpu-ti-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
+       ADD_TEST(msg-trace-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
+       ADD_TEST(msg-chord-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+       ADD_TEST(msg-chord-ucontext-parallel    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-  ADD_TEST(msg-masterslave-multicore-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
-  ADD_TEST(msg-migration-raw           ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
-  ADD_TEST(msg-ptask-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
-  ADD_TEST(msg-priority-raw            ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
-  ADD_TEST(msg-actions-raw             ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
-  ADD_TEST(msg-icomms-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
-  ADD_TEST(msg-properties-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
-  ADD_TEST(msg-masterslave-cpu-ti-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
-  ADD_TEST(msg-trace-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
-  ADD_TEST(msg-chord-raw       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
-  ADD_TEST(msg-chord-raw-parallel      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw      --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+  ADD_TEST(msg-masterslave-multicore-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
+  ADD_TEST(msg-migration-raw           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
+  ADD_TEST(msg-ptask-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
+  ADD_TEST(msg-priority-raw            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/priority.tesh)
+  ADD_TEST(msg-actions-raw             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/actions        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions actions.tesh)
+  ADD_TEST(msg-icomms-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms     --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
+  ADD_TEST(msg-properties-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/msg_prop.tesh)
+  ADD_TEST(msg-masterslave-cpu-ti-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave    --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
+  ADD_TEST(msg-trace-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg trace/trace.tesh)
+  ADD_TEST(msg-chord-raw       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
+  ADD_TEST(msg-chord-raw-parallel      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw      --cfg contexts/nthreads:4       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/chord  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord chord.tesh)
 endif(HAVE_RAWCTX)
 
 IF(${ARCH_32_BITS})
-ADD_TEST(gras-ping-sg-32-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
-ADD_TEST(gras-rpc-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
-ADD_TEST(gras-spawn-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
-ADD_TEST(gras-timer-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
-ADD_TEST(gras-chrono-sg-32-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
-ADD_TEST(gras-simple-token-sg-32-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
-ADD_TEST(gras-mmrpc-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
-ADD_TEST(gras-all2all-sg-32-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
-ADD_TEST(gras-pmm-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
-ADD_TEST(gras-synchro-sg-32-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
+ADD_TEST(gras-ping-sg-32-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
+ADD_TEST(gras-rpc-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
+ADD_TEST(gras-spawn-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
+ADD_TEST(gras-timer-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
+ADD_TEST(gras-chrono-sg-32-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
+ADD_TEST(gras-simple-token-sg-32-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
+ADD_TEST(gras-mmrpc-sg-32-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
+ADD_TEST(gras-all2all-sg-32-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
+ADD_TEST(gras-pmm-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
+ADD_TEST(gras-synchro-sg-32-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(gras-ping-sg-32-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
-       ADD_TEST(gras-rpc-sg-32-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
-       ADD_TEST(gras-spawn-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
-       ADD_TEST(gras-timer-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
-       ADD_TEST(gras-chrono-sg-32-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
-       ADD_TEST(gras-simple-token-sg-32-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
-       ADD_TEST(gras-mmrpc-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
-       ADD_TEST(gras-all2all-sg-32-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
-       ADD_TEST(gras-pmm-sg-32-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
-       ADD_TEST(gras-synchro-sg-32-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
+       ADD_TEST(gras-ping-sg-32-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
+       ADD_TEST(gras-rpc-sg-32-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
+       ADD_TEST(gras-spawn-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
+       ADD_TEST(gras-timer-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
+       ADD_TEST(gras-chrono-sg-32-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
+       ADD_TEST(gras-simple-token-sg-32-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
+       ADD_TEST(gras-mmrpc-sg-32-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
+       ADD_TEST(gras-all2all-sg-32-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
+       ADD_TEST(gras-pmm-sg-32-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
+       ADD_TEST(gras-synchro-sg-32-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-  ADD_TEST(gras-ping-sg-32-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
-  ADD_TEST(gras-rpc-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
-  ADD_TEST(gras-spawn-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
-  ADD_TEST(gras-timer-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
-  ADD_TEST(gras-chrono-sg-32-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
-  ADD_TEST(gras-simple-token-sg-32-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
-  ADD_TEST(gras-mmrpc-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
-  ADD_TEST(gras-all2all-sg-32-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
-  ADD_TEST(gras-pmm-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
-  ADD_TEST(gras-synchro-sg-32-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
+  ADD_TEST(gras-ping-sg-32-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_32.tesh)
+  ADD_TEST(gras-rpc-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_32.tesh)
+  ADD_TEST(gras-spawn-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_32.tesh)
+  ADD_TEST(gras-timer-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_32.tesh)
+  ADD_TEST(gras-chrono-sg-32-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_32.tesh)
+  ADD_TEST(gras-simple-token-sg-32-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_32.tesh)
+  ADD_TEST(gras-mmrpc-sg-32-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_32.tesh)
+  ADD_TEST(gras-all2all-sg-32-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_32.tesh)
+  ADD_TEST(gras-pmm-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_32.tesh)
+  ADD_TEST(gras-synchro-sg-32-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_32.tesh)
 endif(HAVE_RAWCTX)
 
 ELSE(${ARCH_32_BITS})
-ADD_TEST(gras-ping-sg-64-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
-ADD_TEST(gras-rpc-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
-ADD_TEST(gras-spawn-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
-ADD_TEST(gras-timer-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
-ADD_TEST(gras-chrono-sg-64-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
-ADD_TEST(gras-simple-token-sg-64-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
-ADD_TEST(gras-mmrpc-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
-ADD_TEST(gras-all2all-sg-64-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
-ADD_TEST(gras-pmm-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
-ADD_TEST(gras-synchro-sg-64-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
+ADD_TEST(gras-ping-sg-64-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
+ADD_TEST(gras-rpc-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
+ADD_TEST(gras-spawn-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
+ADD_TEST(gras-timer-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
+ADD_TEST(gras-chrono-sg-64-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
+ADD_TEST(gras-simple-token-sg-64-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
+ADD_TEST(gras-mmrpc-sg-64-thread       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
+ADD_TEST(gras-all2all-sg-64-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
+ADD_TEST(gras-pmm-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
+ADD_TEST(gras-synchro-sg-64-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(gras-ping-sg-64-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
-       ADD_TEST(gras-rpc-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
-       ADD_TEST(gras-spawn-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
-       ADD_TEST(gras-timer-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
-       ADD_TEST(gras-chrono-sg-64-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
-       ADD_TEST(gras-simple-token-sg-64-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
-       ADD_TEST(gras-mmrpc-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
-       ADD_TEST(gras-all2all-sg-64-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
-       ADD_TEST(gras-pmm-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
-       ADD_TEST(gras-synchro-sg-64-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
+       ADD_TEST(gras-ping-sg-64-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
+       ADD_TEST(gras-rpc-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
+       ADD_TEST(gras-spawn-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
+       ADD_TEST(gras-timer-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
+       ADD_TEST(gras-chrono-sg-64-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
+       ADD_TEST(gras-simple-token-sg-64-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
+       ADD_TEST(gras-mmrpc-sg-64-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
+       ADD_TEST(gras-all2all-sg-64-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
+       ADD_TEST(gras-pmm-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
+       ADD_TEST(gras-synchro-sg-64-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-  ADD_TEST(gras-ping-sg-64-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
-  ADD_TEST(gras-rpc-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
-  ADD_TEST(gras-spawn-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
-  ADD_TEST(gras-timer-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
-  ADD_TEST(gras-chrono-sg-64-raw               ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
-  ADD_TEST(gras-simple-token-sg-64-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
-  ADD_TEST(gras-mmrpc-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
-  ADD_TEST(gras-all2all-sg-64-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
-  ADD_TEST(gras-pmm-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
-  ADD_TEST(gras-synchro-sg-64-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
+  ADD_TEST(gras-ping-sg-64-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/ping      --cd ${CMAKE_BINARY_DIR}/examples/gras/ping ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/test_sg_64.tesh)
+  ADD_TEST(gras-rpc-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/rpc       --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/test_sg_64.tesh)
+  ADD_TEST(gras-spawn-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/spawn     --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/test_sg_64.tesh)
+  ADD_TEST(gras-timer-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/timer     --cd ${CMAKE_BINARY_DIR}/examples/gras/timer ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/test_sg_64.tesh)
+  ADD_TEST(gras-chrono-sg-64-raw               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/chrono    --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/test_sg_64.tesh)
+  ADD_TEST(gras-simple-token-sg-64-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token     --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/test_sg_64.tesh)
+  ADD_TEST(gras-mmrpc-sg-64-raw                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc     --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/test_sg_64.tesh)
+  ADD_TEST(gras-all2all-sg-64-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/all2all   --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/test_sg_64.tesh)
+  ADD_TEST(gras-pmm-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/pmm       --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/test_sg_64.tesh)
+  ADD_TEST(gras-synchro-sg-64-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/synchro   --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/test_sg_64.tesh)
 endif(HAVE_RAWCTX)
 
 ENDIF(${ARCH_32_BITS})
-ADD_TEST(gras-properties-sg-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
+ADD_TEST(gras-properties-sg-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(gras-properties-sg-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
+       ADD_TEST(gras-properties-sg-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-  ADD_TEST(gras-properties-sg-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
+  ADD_TEST(gras-properties-sg-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/gras/properties        --cd ${CMAKE_BINARY_DIR}/examples/gras/properties ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/test_sg.tesh)
 endif(HAVE_RAWCTX)
 
 # amok examples
-ADD_TEST(amok-bandwidth-rl     ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_rl.tesh)
-ADD_TEST(amok-saturate-rl      ${CMAKE_BINARY_DIR}/bin/tesh    --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_rl.tesh)
+ADD_TEST(amok-bandwidth-rl     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_rl.tesh)
+ADD_TEST(amok-saturate-rl      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_rl.tesh)
 
 IF(${ARCH_32_BITS})
-  ADD_TEST(amok-bandwidth-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
-  ADD_TEST(amok-saturate-sg-32-thread  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
+  ADD_TEST(amok-bandwidth-sg-32-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
+  ADD_TEST(amok-saturate-sg-32-thread  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
   if(HAVE_RAWCTX)
-    ADD_TEST(amok-bandwidth-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
-    ADD_TEST(amok-saturate-sg-32-raw           ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
+    ADD_TEST(amok-bandwidth-sg-32-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
+    ADD_TEST(amok-saturate-sg-32-raw           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
   endif(HAVE_RAWCTX)
   if(HAVE_UCONTEXT_H)
-       ADD_TEST(amok-bandwidth-sg-32-ucontext  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
-       ADD_TEST(amok-saturate-sg-32-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
+       ADD_TEST(amok-bandwidth-sg-32-ucontext  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_32.tesh)
+       ADD_TEST(amok-saturate-sg-32-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_32.tesh)
   endif(HAVE_UCONTEXT_H)
 ELSE(${ARCH_32_BITS})
-  ADD_TEST(amok-bandwidth-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
-  ADD_TEST(amok-saturate-sg-64-thread  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
+  ADD_TEST(amok-bandwidth-sg-64-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
+  ADD_TEST(amok-saturate-sg-64-thread  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
   if(HAVE_RAWCTX)
-    ADD_TEST(amok-bandwidth-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
-    ADD_TEST(amok-saturate-sg-64-raw           ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
+    ADD_TEST(amok-bandwidth-sg-64-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
+    ADD_TEST(amok-saturate-sg-64-raw           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
   endif(HAVE_RAWCTX)
   if(HAVE_UCONTEXT_H)
-         ADD_TEST(amok-saturate-sg-64-ucontext ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
-         ADD_TEST(amok-bandwidth-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
+         ADD_TEST(amok-saturate-sg-64-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate_sg_64.tesh)
+         ADD_TEST(amok-bandwidth-sg-64-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/amok   --cd ${CMAKE_BINARY_DIR}/examples/amok ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth_sg_64.tesh)
   endif(HAVE_UCONTEXT_H)
 ENDIF(${ARCH_32_BITS})
 
 # simdag examples
-ADD_TEST(simdag-test-simdag            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag.tesh)
-ADD_TEST(simdag-test-simdag2           ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag2.tesh)
-ADD_TEST(simdag-test-simdag-seq-access         ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_seq_access.tesh)
-ADD_TEST(simdag-test-prop              ${CMAKE_BINARY_DIR}/bin/tesh    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/properties/test_prop.tesh)
-ADD_TEST(simdag-minmin-test            ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/scheduling  --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/scheduling test_minmin.tesh)
+ADD_TEST(simdag-test-simdag            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag.tesh)
+ADD_TEST(simdag-test-simdag2           ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag2.tesh)
+ADD_TEST(simdag-test-simdag-seq-access         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_seq_access.tesh)
+ADD_TEST(simdag-test-prop              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag         --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/properties/test_prop.tesh)
+ADD_TEST(simdag-minmin-test            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/scheduling  --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/scheduling test_minmin.tesh)
+
+ADD_TEST(msg-gtnets-crosstraffic-thread   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-crosstraffic.tesh)
+ADD_TEST(msg-gtnets-crosstraffic-ucontext ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-crosstraffic.tesh)
+ADD_TEST(msg-gtnets-crosstraffic-raw      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:raw      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-crosstraffic.tesh)
 
 if(HAVE_GTNETS)
-ADD_TEST(msg-gtnets-waxman-thread      ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
-ADD_TEST(msg-gtnets-dogbone-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
-ADD_TEST(msg-gtnets-onelink-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
-ADD_TEST(msg-gtnets-dogbone-lv08-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
-ADD_TEST(msg-gtnets-onelink-lv08-thread        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
-ADD_TEST(msg-gtnets-fullduplex-thread  ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-fullduplex.tesh)
+ADD_TEST(msg-gtnets-waxman-thread      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
+ADD_TEST(msg-gtnets-dogbone-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
+ADD_TEST(msg-gtnets-onelink-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
+ADD_TEST(msg-gtnets-dogbone-lv08-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
+ADD_TEST(msg-gtnets-onelink-lv08-thread        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(msg-gtnets-waxman-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
-       ADD_TEST(msg-gtnets-dogbone-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
-       ADD_TEST(msg-gtnets-onelink-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
-       ADD_TEST(msg-gtnets-dogbone-lv08-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
-       ADD_TEST(msg-gtnets-onelink-lv08-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
-       ADD_TEST(msg-gtnets-fullduplex-ucontext ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-fullduplex.tesh)
+       ADD_TEST(msg-gtnets-waxman-ucontext     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
+       ADD_TEST(msg-gtnets-dogbone-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
+       ADD_TEST(msg-gtnets-onelink-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
+       ADD_TEST(msg-gtnets-dogbone-lv08-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
+       ADD_TEST(msg-gtnets-onelink-lv08-ucontext       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-       ADD_TEST(msg-gtnets-waxman-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
-       ADD_TEST(msg-gtnets-dogbone-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
-       ADD_TEST(msg-gtnets-onelink-raw         ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
-       ADD_TEST(msg-gtnets-dogbone-lv08-raw            ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
-       ADD_TEST(msg-gtnets-onelink-lv08-raw            ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
-       ADD_TEST(msg-gtnets-fullduplex-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-fullduplex.tesh)
+       ADD_TEST(msg-gtnets-waxman-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-waxman.tesh)
+       ADD_TEST(msg-gtnets-dogbone-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-gtnets.tesh)
+       ADD_TEST(msg-gtnets-onelink-raw         ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
+       ADD_TEST(msg-gtnets-dogbone-lv08-raw            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
+       ADD_TEST(msg-gtnets-onelink-lv08-raw            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
 endif(HAVE_RAWCTX)
 
   if(HAVE_TRACING)
-  ADD_TEST(msg-tracing-gtnets-waxman                   ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg       --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-waxman.tesh)
-  ADD_TEST(msg-tracing-gtnets-dogbone                  ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg       --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-gtnets.tesh)
-  ADD_TEST(msg-tracing-gtnets-onelink                  ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg       --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-gtnets.tesh)
-  ADD_TEST(msg-tracing-gtnets-dogbone-lv08             ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg       --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-lv08.tesh)
-  ADD_TEST(msg-tracing-gtnets-onelink-lv08             ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg       --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-lv08.tesh)
+  ADD_TEST(msg-tracing-gtnets-waxman                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg        --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-waxman.tesh)
+  ADD_TEST(msg-tracing-gtnets-dogbone                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg        --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-gtnets.tesh)
+  ADD_TEST(msg-tracing-gtnets-onelink                  ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg        --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-gtnets.tesh)
+  ADD_TEST(msg-tracing-gtnets-dogbone-lv08             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg        --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-lv08.tesh)
+  ADD_TEST(msg-tracing-gtnets-onelink-lv08             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg        --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-lv08.tesh)
   endif(HAVE_TRACING)
 endif(HAVE_GTNETS)
 
+if(HAVE_NS3)
+ADD_TEST(msg-ns3-thread            ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+ADD_TEST(msg-ns3-ucontext      ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+ADD_TEST(msg-ns3-raw        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}        --cfg contexts/factory:raw              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg    --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
+endif(HAVE_NS3)
+
 IF(HAVE_TRACING)
-  ADD_TEST(tracing-ms                          ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
-  ADD_TEST(tracing-categories          ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
-  ADD_TEST(tracing-tasks                       ${CMAKE_BINARY_DIR}/bin/tesh    --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/tasks.tesh)
-  ADD_TEST(tracing-process-migration ${CMAKE_BINARY_DIR}/bin/tesh      --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
-  ADD_TEST(graphicator ${CMAKE_BINARY_DIR}/bin/tesh --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator graphicator.tesh)
+  ADD_TEST(tracing-help             ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
+  ADD_TEST(tracing-ms                          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
+  ADD_TEST(tracing-categories          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
+  ADD_TEST(tracing-tasks                       ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/tasks.tesh)
+  ADD_TEST(tracing-process-migration ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}       --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg        --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
+  ADD_TEST(graphicator ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator graphicator.tesh)
 ENDIF(HAVE_TRACING)
 
 # Lua examples
 if(HAVE_LUA)
-ADD_TEST(lua-masterslave                               ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/masterslave master_slave.tesh)
-ADD_TEST(lua-mult-matrix                               ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/multi_matrix mult_matrix.tesh)
-ADD_TEST(lua-masterslave-bypass                ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/console master_slave_bypass.tesh)
-ADD_TEST(lua-msg-masterslave-console   ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/examples/msg/masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_console.tesh)
+ADD_TEST(lua-duplicated-globals                                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/state_cloner duplicated_globals.tesh)
+ADD_TEST(lua-masterslave                               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/masterslave master_slave.tesh)
+ADD_TEST(lua-mult-matrix                               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/multi_matrix mult_matrix.tesh)
+ADD_TEST(lua-masterslave-bypass                ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/console master_slave_bypass.tesh)
+ADD_TEST(lua-msg-masterslave-console   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/msg/masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave  ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_console.tesh)
+set_tests_properties(lua-duplicated-globals                            PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(lua-masterslave                           PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(lua-mult-matrix                           PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(lua-masterslave-bypass            PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
@@ -387,35 +392,35 @@ endif(HAVE_LUA)
 
 if(enable_smpi)
 # smpi examples
-ADD_TEST(smpi-bcast-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread                   --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-ADD_TEST(smpi-reduce-thread    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread                   --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
+ADD_TEST(smpi-bcast-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread                   --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
+ADD_TEST(smpi-reduce-thread    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread                   --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
 if(HAVE_RAWCTX)
-  ADD_TEST(smpi-bcast-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw                      --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-  ADD_TEST(smpi-reduce-raw             ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw                      --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
+  ADD_TEST(smpi-bcast-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw                      --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
+  ADD_TEST(smpi-reduce-raw             ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw                      --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
 endif(HAVE_RAWCTX)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(smpi-bcast-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext                 --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
-       ADD_TEST(smpi-reduce-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext                 --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
+       ADD_TEST(smpi-bcast-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext                 --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/bcast.tesh)
+       ADD_TEST(smpi-reduce-ucontext   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext                 --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/reduce.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_TRACING)
-  ADD_TEST(smpi-tracing-ptp ${CMAKE_BINARY_DIR}/bin/tesh --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_traced.tesh)
+  ADD_TEST(smpi-tracing-ptp ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_traced.tesh)
 endif(HAVE_TRACING)
 endif(enable_smpi)
                                                                
 # examples/msg/mc
 if(HAVE_MC)
-ADD_TEST(mc-bugged1-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
-ADD_TEST(mc-bugged2-thread     ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
-ADD_TEST(mc-centralized-thread ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
+ADD_TEST(mc-bugged1-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
+ADD_TEST(mc-bugged2-thread     ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
+ADD_TEST(mc-centralized-thread ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:thread           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
 if(HAVE_UCONTEXT_H)
-       ADD_TEST(mc-bugged1-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
-       ADD_TEST(mc-bugged2-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
-       ADD_TEST(mc-centralized-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
+       ADD_TEST(mc-bugged1-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
+       ADD_TEST(mc-bugged2-ucontext    ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
+       ADD_TEST(mc-centralized-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:ucontext         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
 endif(HAVE_UCONTEXT_H)
 if(HAVE_RAWCTX)
-  ADD_TEST(mc-bugged1-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
-  ADD_TEST(mc-bugged2-raw              ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
-  ADD_TEST(mc-centralized-raw          ${CMAKE_BINARY_DIR}/bin/tesh    --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
+  ADD_TEST(mc-bugged1-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
+  ADD_TEST(mc-bugged2-raw              ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
+  ADD_TEST(mc-centralized-raw          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION}     --cfg contexts/factory:raw              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc     --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc centralized.tesh)
 endif(HAVE_RAWCTX)
 endif(HAVE_MC)
 
index d251d51..8a03a12 100644 (file)
@@ -67,17 +67,17 @@ include(TestBigEndian)
 TEST_BIG_ENDIAN(BIGENDIAN)
 
 include(FindGraphviz)
-
-string(TOUPPER ${enable_pcre} enable_pcre)
-if(enable_pcre STREQUAL "AUTO" OR enable_pcre STREQUAL "ON")
 include(FindPCRE)
-endif(enable_pcre STREQUAL "AUTO" OR enable_pcre STREQUAL "ON")
+
 set(HAVE_GTNETS 0)
 if(enable_gtnets)      
        include(FindGTnets)
 endif(enable_gtnets)
 if(enable_smpi)
        include(FindF2c)
+       if(HAVE_F2C_H)
+        SET(HAVE_SMPI 1)
+    endif(HAVE_F2C_H)
 endif(enable_smpi)
 if(enable_lua)
        include(FindLua51Simgrid)
@@ -211,7 +211,7 @@ if(pthread)
        ### Test that we have a way to create semaphores
        
        if(HAVE_SEM_OPEN_LIB)
-               exec_program("${CMAKE_C_COMPILER} -lpthread ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -o testprog"
+               exec_program("${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -lpthread -o testprog"
                             OUTPUT_VARIABLE HAVE_SEM_OPEN_run)
                if(HAVE_SEM_OPEN_run)
                        set(HAVE_SEM_OPEN 0)
@@ -230,7 +230,7 @@ if(pthread)
        endif(HAVE_SEM_OPEN_LIB)
 
        if(HAVE_SEM_INIT_LIB)
-               exec_program("${CMAKE_C_COMPILER} -lpthread ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -o testprog" 
+               exec_program("${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -lpthread -o testprog"
                             OUTPUT_VARIABLE HAVE_SEM_INIT_run)
                if(HAVE_SEM_INIT_run)
                        set(HAVE_SEM_INIT 0)
@@ -297,14 +297,14 @@ IF(CMAKE_CROSSCOMPILING)
        ENDIF(WIN32)
 ELSE(CMAKE_CROSSCOMPILING)
        try_run(RUN_mcsc_VAR COMPILE_mcsc_VAR
-               ${simgrid_BINARY_DIR}
+               ${PROJECT_BINARY_DIR}
                ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c
                COMPILE_DEFINITIONS "${mcsc_flags}"
                OUTPUT_VARIABLE var_compil
                )
                
-               if(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
-                       file(READ "${simgrid_BINARY_DIR}/conftestval" mcsc)
+               if(EXISTS "${PROJECT_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
+                       file(READ "${PROJECT_BINARY_DIR}/conftestval" mcsc)
                        STRING(REPLACE "\n" "" mcsc "${mcsc}")
                        if(mcsc)
                                set(mcsc "yes")
@@ -312,9 +312,9 @@ ELSE(CMAKE_CROSSCOMPILING)
                        else(mcsc)
                                set(mcsc "no")
                        endif(mcsc)
-           else(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
+           else(EXISTS "${PROJECT_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
                        set(mcsc "no")
-               endif(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
+               endif(EXISTS "${PROJECT_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
 ENDIF(CMAKE_CROSSCOMPILING)
 
 if(mcsc MATCHES "no" AND pthread)
@@ -352,7 +352,8 @@ endif(pthread)
 ###############
 ## SVN version check
 ##
-exec_program("git remote" OUTPUT_VARIABLE remote RETURN_VALUE ret)
+if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/)
+exec_program("git remote | head -n 1" OUTPUT_VARIABLE remote RETURN_VALUE ret)
 exec_program("git config --get remote.${remote}.url" OUTPUT_VARIABLE url RETURN_VALUE ret)
 
 if(url)
@@ -365,7 +366,7 @@ if(url)
        STRING(REPLACE " " "~" GIT_DATE ${GIT_DATE})
        STRING(REPLACE ":" "-" GIT_DATE ${GIT_DATE})
 endif(url)
-
+endif(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/)
 
 ###################################
 ## SimGrid and GRAS specific checks
@@ -374,7 +375,7 @@ endif(url)
 IF(NOT CMAKE_CROSSCOMPILING)
 # Check architecture signature begin
 try_run(RUN_GRAS_VAR COMPILE_GRAS_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_GRAS_ARCH.c
        RUN_OUTPUT_VARIABLE var1
        )
@@ -485,7 +486,7 @@ endif(GRAS_THISARCH MATCHES "none")
 
 # Check architecture signature end
 try_run(RUN_GRAS_VAR COMPILE_GRAS_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_GRAS_CHECK_STRUCT_COMPACTION.c
        RUN_OUTPUT_VARIABLE var2
        )
@@ -496,7 +497,7 @@ endforeach(var_tmp ${var2})
 
 # Check for [SIZEOF_MAX]
 try_run(RUN_SM_VAR COMPILE_SM_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_max_size.c
        RUN_OUTPUT_VARIABLE var3
        )
@@ -522,11 +523,11 @@ if(HAVE_MAKECONTEXT OR WIN32)
        endif(WIN32 AND __GNUC__)
        
        try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
-               ${simgrid_BINARY_DIR}
+               ${PROJECT_BINARY_DIR}
                ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_stacksetup.c
                COMPILE_DEFINITIONS "${makecontext_CPPFLAGS} ${makecontext_CPPFLAGS_2}"
                )
-       file(READ ${simgrid_BINARY_DIR}/conftestval MAKECONTEXT_ADDR_SIZE)
+       file(READ ${PROJECT_BINARY_DIR}/conftestval MAKECONTEXT_ADDR_SIZE)
        string(REPLACE "\n" "" MAKECONTEXT_ADDR_SIZE "${MAKECONTEXT_ADDR_SIZE}")
        string(REGEX MATCH ;^.*,;MAKECONTEXT_ADDR "${MAKECONTEXT_ADDR_SIZE}")
        string(REGEX MATCH ;,.*$; MAKECONTEXT_SIZE "${MAKECONTEXT_ADDR_SIZE}")
@@ -542,10 +543,10 @@ endif(HAVE_MAKECONTEXT OR WIN32)
 ### check for stackgrowth
 if (NOT CMAKE_CROSSCOMPILING)
        try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
-               ${simgrid_BINARY_DIR}
+               ${PROJECT_BINARY_DIR}
                ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_stackgrowth.c
                )
-file(READ "${simgrid_BINARY_DIR}/conftestval" stack)
+file(READ "${PROJECT_BINARY_DIR}/conftestval" stack)
 if(stack MATCHES "down")
        set(PTH_STACKGROWTH "-1")
 endif(stack MATCHES "down")
@@ -567,7 +568,7 @@ endif(NOT CMAKE_CROSSCOMPILING)
 
 #AC_PRINTF_NULL
 try_run(RUN_PRINTF_NULL_VAR COMPILE_PRINTF_NULL_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_printf_null.c
        )
 
@@ -620,7 +621,7 @@ foreach(fct ${diff_va})
        }"
        )
        try_compile(COMPILE_VA_NULL_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_va_copy.c
        )
        if(COMPILE_VA_NULL_VAR)
@@ -678,7 +679,7 @@ endforeach(fct ${diff_va})
 #--------------------------------------------------------------------------------------------------
 ### check for getline
 try_compile(COMPILE_RESULT_VAR
-       ${simgrid_BINARY_DIR}
+       ${PROJECT_BINARY_DIR}
        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_getline.c
        )
 
@@ -702,7 +703,7 @@ if(HAVE_SNPRINTF AND HAVE_VSNPRINTF OR WIN32)
                #set(PREFER_PORTABLE_SNPRINTF 1)
        else(CMAKE_CROSSCOMPILING)
            try_run(RUN_SNPRINTF_FUNC_VAR COMPILE_SNPRINTF_FUNC_VAR
-               ${simgrid_BINARY_DIR}
+               ${PROJECT_BINARY_DIR}
                ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_snprintf.c
            )   
        endif(CMAKE_CROSSCOMPILING)
@@ -712,7 +713,7 @@ if(HAVE_SNPRINTF AND HAVE_VSNPRINTF OR WIN32)
                set(PREFER_PORTABLE_VSNPRINTF 1)
        else(CMAKE_CROSSCOMPILING)
           try_run(RUN_VSNPRINTF_FUNC_VAR COMPILE_VSNPRINTF_FUNC_VAR
-               ${simgrid_BINARY_DIR}
+               ${PROJECT_BINARY_DIR}
                ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_vsnprintf.c
           )
        endif(CMAKE_CROSSCOMPILING)
index 5cc94d0..fac0192 100644 (file)
@@ -8,7 +8,6 @@ set(EXTRA_DIST
        src/xbt/fifo_private.h
        src/xbt/graph_private.h
        src/xbt/graphxml_parse.c
-       src/xbt/graphxml.l
        src/xbt/graphxml.c
        src/xbt/graphxml.dtd
        src/xbt/log_private.h
@@ -17,7 +16,6 @@ set(EXTRA_DIST
        src/xbt/backtrace_windows.c
        src/xbt/backtrace_dummy.c
        src/xbt/setset_private.h
-       src/xbt/parmap_private.h
        src/xbt/mmalloc/attach.c
        src/xbt/mmalloc/detach.c        
        src/xbt/mmalloc/keys.c
@@ -40,7 +38,6 @@ set(EXTRA_DIST
        src/surf/trace_mgr_private.h
        src/surf/surf_private.h
        src/surf/surfxml_parse.c
-       src/surf/simgrid_dtd.l
        src/surf/simgrid_dtd.c
        src/surf/simgrid.dtd
        src/surf/network_private.h
@@ -50,12 +47,13 @@ set(EXTRA_DIST
        src/surf/gtnets/gtnets_topology.h
        src/surf/cpu_ti_private.h
        src/surf/surf_routing_private.h
+       src/include/simgrid/platf_interface.h
        src/include/surf/surf_resource.h
        src/include/surf/datatypes.h
        src/include/surf/maxmin.h
        src/include/surf/trace_mgr.h
        src/include/surf/surf.h
-       src/include/surf/surfxml_parse_private.h
+       src/include/surf/surfxml_parse_values.h
        src/include/surf/random_mgr.h
        src/include/surf/surf_resource_lmm.h
        src/include/xbt/wine_dbghelp.h
@@ -64,11 +62,10 @@ set(EXTRA_DIST
        src/include/mc/datatypes.h
        src/include/mc/mc.h
        src/include/simix/context.h
-       src/msg/private.h
-       src/msg/mailbox.h
+       src/msg/msg_private.h
+       src/msg/msg_mailbox.h
        src/simdag/private.h
        src/simdag/dax.dtd
-       src/simdag/dax_dtd.l
        src/simdag/dax_dtd.h
        src/simdag/dax_dtd.c
        src/gras/DataDesc/ddt_parse.yy.l
@@ -99,6 +96,12 @@ set(EXTRA_DIST
        tools/gras/gras_stub_generator.h
        tools/tesh/run_context.h  
        tools/tesh/tesh.h
+       
+       src/surf/network_ns3_private.h
+       src/surf/ns3/ns3_interface.h
+       src/surf/ns3/ns3_simulator.h
+       src/surf/ns3/my-point-to-point-helper.h
+       src/surf/ns3/red-queue.h
 )
 
 set(XBT_RL_SRC 
@@ -196,17 +199,22 @@ set(NS3_SRC
        src/surf/network_ns3.c
        src/surf/ns3/ns3_interface.cc
        src/surf/ns3/ns3_simulator.cc
-       )
-
+       src/surf/ns3/red-queue.cc
+       src/surf/ns3/my-point-to-point-helper.cc
+)
+       
 set(SURF_SRC 
        src/surf/surf_model.c
        src/surf/surf_action.c
        src/surf/surf_routing.c
+       src/surf/surf_routing_none.c
+       src/surf/surf_routing_generic.c
        src/surf/surf_routing_full.c
        src/surf/surf_routing_floyd.c
        src/surf/surf_routing_rulebased.c
        src/surf/surf_routing_dijkstra.c
-       src/surf/surf_routing_none.c
+       src/surf/surf_routing_cluster.c
+       src/surf/surf_routing_vivaldi.c
        src/surf/surf_config.c
        src/surf/maxmin.c
        src/surf/fair_bottleneck.c
@@ -215,14 +223,14 @@ set(SURF_SRC
        src/surf/random_mgr.c
        src/surf/surf.c
        src/surf/surfxml_parse.c
-       src/surf/cpu.c
+       src/surf/surfxml_parseplatf.c
        src/surf/network.c
-       src/surf/network_im.c
        src/surf/network_constant.c
        src/surf/workstation.c
        src/surf/workstation_ptask_L07.c
        src/surf/cpu_ti.c
-       src/surf/cpu_im.c
+       src/surf/cpu_cas01.c
+       src/surf/sg_platf.c
        src/xbt/xbt_sg_stubs.c
 )
 
@@ -243,13 +251,13 @@ set(SIMIX_SRC
 
 set(MSG_SRC
        src/msg/msg_config.c
-       src/msg/task.c
-       src/msg/host.c
-       src/msg/m_process.c
-       src/msg/gos.c
-       src/msg/global.c
-       src/msg/environment.c
-       src/msg/deployment.c
+       src/msg/msg_task.c
+       src/msg/msg_host.c
+       src/msg/msg_process.c
+       src/msg/msg_gos.c
+       src/msg/msg_global.c
+       src/msg/msg_environment.c
+       src/msg/msg_deployment.c
        src/msg/msg_mailbox.c
        src/msg/msg_actions.c
 )
@@ -317,6 +325,8 @@ set(LUA_SRC
        src/bindings/lua/simgrid_lua.c
        src/bindings/lua/lua_stub_generator.c
        src/bindings/lua/lua_console.c
+        src/bindings/lua/lua_utils.c
+        src/bindings/lua/lua_state_cloner.c
 )
 
 set(TRACING_SRC
@@ -397,6 +407,7 @@ set(headers_to_install
        include/xbt/mmalloc.h
        include/xbt/replay_trace_reader.h
        include/xbt/parmap.h
+       include/simgrid/platf.h
        include/mc/modelchecker.h
        include/msg/msg.h
        include/msg/datatypes.h
@@ -544,9 +555,15 @@ file(GLOB_RECURSE examples_to_install_in_doc
 "examples/*README"
 )
 
+
+    
 set(DOC_SOURCES
-       doc/contrib.doc
-       doc/FAQ.doc
+       doc/installSimgrid.doc
+       doc/bindings.doc
+       doc/options.doc
+       doc/use.doc
+       doc/tracing.doc
+       doc/pls.doc
        doc/gtut-howto-design.doc
        doc/gtut-howto.doc
        doc/gtut-introduction.doc
@@ -570,7 +587,7 @@ set(DOC_SOURCES
        doc/gtut-tour-16-exchangecb.doc
        doc/gtut-tour.doc
        doc/gtut-tour-recap-messages.doc
-       doc/history.doc
+       
        #doc/index-API.doc
        doc/index.doc
        doc/module-amok.doc
@@ -580,8 +597,6 @@ set(DOC_SOURCES
        doc/modules.doc
        doc/module-surf.doc
        doc/module-xbt.doc
-       doc/people.doc  
-       doc/publis.doc
        
        doc/gtut-files/01-bones.c
        doc/gtut-files/01-bones.output
@@ -622,10 +637,8 @@ set(DOC_SOURCES
        doc/webcruft/Paje_MSG_screenshot.jpg
        doc/webcruft/Paje_MSG_screenshot_thn.jpg
        doc/webcruft/poster_thumbnail.png
-       doc/webcruft/robots.txt
        doc/webcruft/simgrid_logo.png
        doc/webcruft/simgrid_logo_small.png
-       doc/webcruft/fish.gif
        doc/triva-graph_configuration.png
        doc/triva-graph_visualization.png
        doc/simgrid.css
@@ -633,13 +646,11 @@ set(DOC_SOURCES
        doc/Doxyfile.in
        doc/footer.html.in
        
-       tools/doxygen/bibtex2html_table_count.pl
        tools/doxygen/doxygen_postprocesser.pl
        tools/doxygen/index_create.pl
        tools/doxygen/toc_create.pl
        tools/doxygen/bibtex2html_wrapper.pl
        tools/doxygen/fig2dev_postprocessor.pl
-       tools/doxygen/index_php.pl
        tools/doxygen/xbt_log_extract_hierarchy.pl
 )
 
@@ -651,10 +662,6 @@ set(DOC_FIGS
        ${CMAKE_HOME_DIRECTORY}/doc/fig/gras_comm.fig
 )
 
-set(DOC_bib
-       ${CMAKE_HOME_DIRECTORY}/doc/all.bib
-)
-
 file(GLOB_RECURSE add_src_files
 "teshsuite/*.c"
 "teshsuite/*.cxx"
@@ -683,7 +690,6 @@ set(add_src_files
        src/smpi/smpif2c.in
        src/smpi/smpiff.in
        src/smpi/smpirun.in
-       src/simix/smx_context_sysv_private.h
 )
 
 file(GLOB_RECURSE xml_files
@@ -823,6 +829,7 @@ set(source_to_pack
        ${GRAS_RL_SRC}
        ${XBT_SRC}
        ${GTNETS_SRC}
+       ${NS3_SRC}
        ${SURF_SRC}
        ${SIMIX_SRC}
        ${TRACING_SRC}
@@ -843,7 +850,6 @@ set(source_to_pack
        ${bin_files}
        ${DOC_SOURCES}
        ${DOC_FIGS}
-       ${DOC_bib}
        ${README_files}
        buildtools/Cmake/simgrid.nsi.in 
 )
index 81bf320..0e63df6 100644 (file)
@@ -15,15 +15,20 @@ install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/html/"
 )
 
 #### Generate the manpages
-if( NOT MANPAGE_DIR )
-       set( MANPAGE_DIR $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/man/share/man/man1 )
+if(NOT WIN32)
+if( NOT MANPAGE_DIR)
+       set( MANPAGE_DIR ${CMAKE_BINARY_DIR}/manpages )
 endif( NOT MANPAGE_DIR)
 
-add_custom_target(TARGET install
+add_custom_target(manpages ALL
         COMMAND ${CMAKE_COMMAND} -E make_directory ${MANPAGE_DIR}
-       COMMAND pod2man tools/simgrid_update_xml.pl > ${MANPAGE_DIR}/simgrid_update_xml.1
+       COMMAND pod2man ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl > ${MANPAGE_DIR}/simgrid_update_xml.1
        COMMENT "Generating manpages"
 )
+install(FILES ${MANPAGE_DIR}/simgrid_update_xml.1
+        DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/usr/share/man/man1)
+
+endif(NOT WIN32)
 
 # binaries
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/smpicc
@@ -170,11 +175,11 @@ endif(HAVE_LUA)
 
 add_custom_target(dist-dir
   COMMENT "Generating the distribution directory"
-  COMMAND test -e simgrid-${release_version}/ && chmod -R a+w simgrid-${release_version}/ || true
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/
-  COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}
-  COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/doc/html/
-  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_HOME_DIRECTORY}/doc/html/ simgrid-${release_version}/doc/html/
+  COMMAND test -e ${PROJECT_NAME}-${release_version}/ && chmod -R a+w ${PROJECT_NAME}-${release_version}/ || true
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/doc/html/
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_HOME_DIRECTORY}/doc/html/ ${PROJECT_NAME}-${release_version}/doc/html/
 )
 add_dependencies(dist-dir simgrid_documentation)
 add_dependencies(dist-dir maintainer_files)
@@ -192,19 +197,19 @@ foreach(file ${source_to_pack})
        set(dirs_in_tarball "${dirs_in_tarball};${file_location};")
        add_custom_command(
          TARGET dist-dir
-         COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/${file_location}/
+         COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/${file_location}/
        )       
    endif(NOT OPERATION)
    
    # Actually copy the file
    add_custom_command(
      TARGET dist-dir
-     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/${file} simgrid-${release_version}/${file_location}/
+     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/${file} ${PROJECT_NAME}-${release_version}/${file_location}/
    )
    
    add_custom_command(
      TARGET dist-dir
-     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Makefile.default simgrid-${release_version}/Makefile
+     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Makefile.default ${PROJECT_NAME}-${release_version}/Makefile
    )
 endforeach(file ${source_to_pack})
 
@@ -213,14 +218,14 @@ endforeach(file ${source_to_pack})
 ######################################
 
 add_custom_target(dist
-  DEPENDS ${CMAKE_BINARY_DIR}/simgrid-${release_version}.tar.gz
+  DEPENDS ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz
 )
 add_custom_command(
-       OUTPUT ${CMAKE_BINARY_DIR}/simgrid-${release_version}.tar.gz    
+       OUTPUT ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz    
        COMMENT "Compressing the archive from the distribution directory"
-       COMMAND ${CMAKE_COMMAND} -E tar cf simgrid-${release_version}.tar simgrid-${release_version}/
-       COMMAND gzip -9v simgrid-${release_version}.tar
-       COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/
+       COMMAND ${CMAKE_COMMAND} -E tar cf ${PROJECT_NAME}-${release_version}.tar ${PROJECT_NAME}-${release_version}/
+       COMMAND gzip -9v ${PROJECT_NAME}-${release_version}.tar
+       COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/
 )
 add_dependencies(dist dist-dir)
 
@@ -231,44 +236,44 @@ add_dependencies(dist dist-dir)
 # Allow to test the "make dist"
 add_custom_target(distcheck
   COMMAND ${CMAKE_COMMAND} -E echo "XXX remove old copy"
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}.cpy 
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}.cpy 
   COMMAND ${CMAKE_COMMAND} -E echo "XXX copy again the source tree"
-  COMMAND ${CMAKE_COMMAND} -E copy_directory simgrid-${release_version}/ simgrid-${release_version}.cpy 
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_NAME}-${release_version}/ ${PROJECT_NAME}-${release_version}.cpy 
   COMMAND ${CMAKE_COMMAND} -E echo "XXX create build and install subtrees"
-  COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/_build
-  COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/_inst
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/_build
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/_inst
  
   # This stupid cmake creates a directory in source, killing the purpose of the chmod
   # (tricking around)
   COMMAND ${CMAKE_COMMAND} -E echo "XXX change the modes of directories"
-  COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/CMakeFiles 
-  COMMAND chmod -R a-w simgrid-${release_version}/ # FIXME: we should pass without commenting that line
-  COMMAND chmod -R a+w simgrid-${release_version}/_build
-  COMMAND chmod -R a+w simgrid-${release_version}/_inst
-  COMMAND chmod -R a+w simgrid-${release_version}/CMakeFiles
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/CMakeFiles 
+  COMMAND chmod -R a-w ${PROJECT_NAME}-${release_version}/ # FIXME: we should pass without commenting that line
+  COMMAND chmod -R a+w ${PROJECT_NAME}-${release_version}/_build
+  COMMAND chmod -R a+w ${PROJECT_NAME}-${release_version}/_inst
+  COMMAND chmod -R a+w ${PROJECT_NAME}-${release_version}/CMakeFiles
   
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Configure"
-  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build ${CMAKE_COMMAND} build ..  -DCMAKE_INSTALL_PREFIX=../_inst -Wno-dev -Denable_doc=OFF
-#  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build make dist-dir
+  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build ${CMAKE_COMMAND} build ..  -DCMAKE_INSTALL_PREFIX=../_inst -Wno-dev -Denable_doc=OFF
+#  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build make dist-dir
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Build"
-  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build make VERBOSE=1
+  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build make VERBOSE=1
   
   # This fails, unfortunately, because GRAS is broken for now
-  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build ctest -j5 --output-on-failure
+  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build ctest -j5 --output-on-failure
 
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Check that cleaning works"
-  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build make clean
+  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build make clean
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Display what is remaining after make clean"
-  COMMAND ${CMAKE_COMMAND} -E chdir simgrid-${release_version}/_build ls -lR
+  COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_NAME}-${release_version}/_build ls -lR
   COMMAND ${CMAKE_COMMAND} -E echo "XXX Remove _build and _inst directories"
-  COMMAND chmod a+w simgrid-${release_version}/
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/_build
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/_inst
+  COMMAND chmod a+w ${PROJECT_NAME}-${release_version}/
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/_build
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/_inst
   COMMAND ${CMAKE_COMMAND} -E echo "XXX The output of the diff follows"
-  COMMAND diff -ruN simgrid-${release_version}.cpy simgrid-${release_version}
+  COMMAND diff -ruN ${PROJECT_NAME}-${release_version}.cpy ${PROJECT_NAME}-${release_version}
   COMMAND ${CMAKE_COMMAND} -E echo "XXX end of the diff, random cleanups now"
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}.cpy 
-  COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}.cpy 
+  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}
 )
 add_dependencies(distcheck dist-dir)
 
@@ -320,15 +325,25 @@ WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
 add_custom_target(sync-gforge-doc
 COMMAND chmod g+rw -R doc/
 COMMAND chmod a+rX -R doc/
-COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times doc/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/doc/ || true
-COMMAND scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
-COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/fish.gif doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
+COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times 
+doc/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/doc/ || true
+COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo.png  doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/
 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
 )
+add_dependencies(sync-gforge-doc simgrid_documentation)
+
 add_custom_target(sync-gforge-dtd
-COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
+COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/${release_version}/
 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
 )
 
+#PIPOL
+add_custom_target(sync-pipol
+COMMAND scp -r Experimental_bindings.sh Experimental.sh  MemCheck.sh pre-simgrid.sh navarro@pipol.inria.fr:~/
+COMMAND scp -r rc.* navarro@pipol.inria.fr:~/.pipol/
+COMMAND scp -r Nightly* navarro@pipol.inria.fr:~/.pipol/nightly
+COMMAND ssh navarro@pipol.inria.fr "chmod a=rwx ~/* ~/.pipol/rc.* ~/.pipol/nightly/*"
+WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}/buildtools/pipol/"
+)
 
 include(CPack)
index 95b1ae5..57f3d70 100644 (file)
@@ -3,25 +3,34 @@ set(optCFLAGS "")
 
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-g3")
 else(NOT __VISUALC__ AND NOT __BORLANDC__)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}/Zi")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/Zi")
 endif(NOT __VISUALC__ AND NOT __BORLANDC__)
 
 if(enable_compile_warnings)
-       set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
+       set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Werror=clobbered -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
 endif(enable_compile_warnings)
 
-if(enable_compile_warnings AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
-    set(warnCFLAGS "${warnCFLAGS} -Wno-error=unused-but-set-variable ")
-endif(enable_compile_warnings AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
+if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
+       set(warnCFLAGS "${warnCFLAGS} -Wno-error=unused-but-set-variable ")
+endif(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5")
 
 if(enable_compile_optimizations)
        set(optCFLAGS "-O3 -finline-functions -funroll-loops -fno-strict-aliasing ")
+       if(${COMPILER_C_VERSION_MAJOR_MINOR} STRGREATER "4.5")
+           set(optCFLAGS "${optCFLAGS}-flto ")
+       endif(${COMPILER_C_VERSION_MAJOR_MINOR} STRGREATER "4.5")
 else(enable_compile_optimizations)
         set(optCFLAGS "-O0 ")
 endif(enable_compile_optimizations)
 
+if(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")     
+    set(optCFLAGS "-O0 ")
+endif(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
+
 if(NOT enable_debug)
                set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}")
 endif(NOT enable_debug)
@@ -29,23 +38,22 @@ endif(NOT enable_debug)
 set(CMAKE_C_FLAGS "${optCFLAGS}${warnCFLAGS}${CMAKE_C_FLAGS}")
 
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${custom_flags}")
-
-if(HAVE_PCRE_LIB AND WIN32)
-       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPCRE_STATIC")
-endif(HAVE_PCRE_LIB AND WIN32)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${optCFLAGS}")
 
 # Try to make Mac a bit more complient to open source standards
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
+set(TESH_OPTION "")
 if(enable_coverage)
        find_program(GCOV_PATH gcov)
        if(GCOV_PATH)
                SET(COVERAGE_COMMAND "${GCOV_PATH}" CACHE TYPE FILEPATH FORCE)
                set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+               set(TESH_OPTION --enable-coverage)
                add_definitions(-fprofile-arcs -ftest-coverage)
-               endif(GCOV_PATH)
+       endif(GCOV_PATH)
 endif(enable_coverage)
 
index e478ee1..56acede 100644 (file)
@@ -8,8 +8,6 @@ endif(BIBTEX2HTML)
 
 find_path(FIG2DEV_PATH NAMES fig2dev   PATHS NO_DEFAULT_PATHS)
 find_path(DOXYGEN_PATH NAMES doxygen   PATHS NO_DEFAULT_PATHS)
-find_path(BIBTOOL_PATH NAMES bibtool   PATHS NO_DEFAULT_PATHS)
-find_path(ICONV_PATH   NAMES iconv     PATHS NO_DEFAULT_PATHS)
 
 ### Check whether the bibtex2html that we found is the one that Arnaud requires
 exec_program("${BIBTEX2HTML_PATH}/bibtex2html -version" OUTPUT_VARIABLE OUTPUT_BIBTEX2HTML_VERSION)
@@ -27,7 +25,7 @@ else(${OUTPUT_BIBTEX2HTML_VERSION_2} STREQUAL ${OUTPUT_BIBTEX2HTML_VERSION}) # g
        SET(GOOD_BIBTEX2HTML_VERSION 1)
 endif(${OUTPUT_BIBTEX2HTML_VERSION_2} STREQUAL ${OUTPUT_BIBTEX2HTML_VERSION})
 
-if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV_PATH AND GOOD_BIBTEX2HTML_VERSION)
+if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION)
 
        string(REGEX REPLACE ";.*logcategories.doc" "" LISTE_DEUX "${LISTE_DEUX}")
 
@@ -38,8 +36,13 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV
 
        set(DOC_PNGS 
                ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo.png
+               ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png
                ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_small.png
                ${CMAKE_HOME_DIRECTORY}/doc/webcruft/poster_thumbnail.png
+               ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_01.png
+               ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_02.png
+               ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_03.png
+               ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_04.png
        )
        
        configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY)
@@ -47,11 +50,13 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV
        
        ADD_CUSTOM_TARGET(simgrid_documentation
                COMMENT "Generating the SimGrid documentation..."
-               DEPENDS ${DOC_SOURCES} ${DOC_FIGS} ${source_doxygen} ${DOC_bib}
+               DEPENDS ${DOC_SOURCES} ${DOC_FIGS} ${source_doxygen}
+               COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/html
+           COMMAND ${CMAKE_COMMAND} -E make_directory   ${CMAKE_HOME_DIRECTORY}/doc/html
                COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/fig/simgrid_modules.fig | perl -pe 's/imagemap/simgrid_modules/g'| perl -pe 's/<IMG/<IMG style=border:0px/g' | ${CMAKE_HOME_DIRECTORY}/tools/doxygen/fig2dev_postprocessor.pl > ${CMAKE_HOME_DIRECTORY}/doc/simgrid_modules.map
                WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc
        )
-
+               
        ADD_CUSTOM_COMMAND(
                OUTPUT ${CMAKE_HOME_DIRECTORY}/doc/logcategories.doc
                DEPENDS ${source_doxygen}
@@ -86,7 +91,7 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV
            COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
                COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
                COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl simgrid.tag index-API.doc
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/toc_create.pl FAQ.doc index.doc contrib.doc gtut-introduction.doc history.doc
+               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/toc_create.pl pls.doc index.doc gtut-introduction.doc installSimgrid.doc bindings.doc options.doc tracing.doc
                
                COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
                COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
@@ -94,7 +99,6 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV
                COMMAND ${CMAKE_COMMAND} -E echo "XX Post-processing Doxygen result"
                COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/html/dir*
                COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/doxygen_postprocesser.pl
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_php.pl index.php.in html/index.html index.php
                
                COMMAND ${CMAKE_COMMAND} -E echo "XX Create shortcuts pages"
                COMMAND ${CMAKE_COMMAND} -E echo \"<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>\" > ${CMAKE_HOME_DIRECTORY}/doc/html/gras.html
@@ -110,30 +114,8 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV
                COMMAND ${CMAKE_COMMAND} -E echo \"<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>DAG Simulator.</a></h2></center></html>\" >> ${CMAKE_HOME_DIRECTORY}/doc/html/simdag.html
                WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/
        )
-
-       ADD_CUSTOM_TARGET(bib_files
-               DEPENDS ${CMAKE_HOME_DIRECTORY}/doc/all.bib
-               COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/html
-               COMMAND ${CMAKE_COMMAND} -E make_directory   ${CMAKE_HOME_DIRECTORY}/doc/html
-               COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_core.bib publis_extern.bib publis_intra.bib"
-               COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"core\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_core.bib
-               COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"extern\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_extern.bib
-               COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"intra\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_intra.bib
-
-               COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_count.html"
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_table_count.pl < ${CMAKE_HOME_DIRECTORY}/doc/all.bib > ${CMAKE_HOME_DIRECTORY}/doc/publis_count.html
-               
-               COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_core.html publis_extern.html publis_intra.html"
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_core
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_extern
-               COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_intra
-               
-               WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/
-       )
-
-       add_dependencies(simgrid_documentation bib_files)
        
-else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV_PATH AND GOOD_BIBTEX2HTML_VERSION)
+else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION)
 
        ADD_CUSTOM_TARGET(simgrid_documentation
                        COMMENT "Generating the SimGrid documentation..."
@@ -152,16 +134,14 @@ else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICO
        ADD_CUSTOM_COMMAND(TARGET simgrid_documentation
                        COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH          = ${DOXYGEN_PATH}"
                        COMMAND ${CMAKE_COMMAND} -E echo "FIG2DEV_PATH          = ${FIG2DEV_PATH}"
-                       COMMAND ${CMAKE_COMMAND} -E echo "BIBTOOL_PATH          = ${BIBTOOL_PATH}"
                        COMMAND ${CMAKE_COMMAND} -E echo "BIBTEX2HTML_PATH      = ${BIBTEX2HTML_PATH}"
-                       COMMAND ${CMAKE_COMMAND} -E echo "ICONV_PATH            = ${ICONV_PATH}"
                        COMMAND ${CMAKE_COMMAND} -E echo "IN ORDER TO GENERATE THE DOCUMENTATION YOU NEED ALL TOOLS !!!"
                        COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..."
                        COMMAND false
                        )
 
                
-endif(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV_PATH AND GOOD_BIBTEX2HTML_VERSION)
+endif(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION)
 
 ##############################################################################"
 
@@ -279,3 +259,17 @@ else(compare_files)
 endif(compare_files)   
   
 file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc)
+
+ADD_CUSTOM_TARGET(pdf
+    COMMAND ${CMAKE_COMMAND} -E echo "XX First pass simgrid_documentation.pdf"
+    COMMAND make clean
+    COMMAND make pdf || true
+    COMMAND ${CMAKE_COMMAND} -E echo "XX Second pass simgrid_documentation.pdf"
+    COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf
+    COMMAND make pdf || true
+    COMMAND ${CMAKE_COMMAND} -E echo "XX Write Simgrid_documentation.pdf"
+    COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf ${CMAKE_HOME_DIRECTORY}/doc/latex/simgrid_documentation.pdf
+  
+    WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/latex/
+)
+add_dependencies(pdf simgrid_documentation)
index d1fa739..4c74e07 100644 (file)
@@ -44,6 +44,7 @@ set(string11 "'s/#include <unistd.h>/#if defined(_XBT_WIN32) || defined(__WIN32_
 set(string12 "'s/#if defined(_WIN32)/#if defined(_XBT_WIN32)/g'")
 set(string13 "'s/#include <unistd.h>/#if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)\\n#  ifndef __STRICT_ANSI__\\n#    include <io.h>\\n#    include <process.h>\\n#  endif\\n#else\\n#  include <unistd.h>\\n#endif/g'")
 set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'")
+set(string15 "'s/FAIL(\"Premature EOF/if(!ETag_surfxml_include_state()) FAIL(\"Premature EOF/'")
 
 ADD_CUSTOM_COMMAND(
        OUTPUT  ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid_dtd.h
@@ -100,6 +101,8 @@ ADD_CUSTOM_COMMAND(
        COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf
        COMMAND ${FLEX_EXE} -o src/surf/simgrid_dtd.c -Psurf_parse_ --noline src/surf/simgrid_dtd.l
        COMMAND ${SED_EXE} -i ${string9} src/surf/simgrid_dtd.c
+    COMMAND ${SED_EXE} -i ${string15} src/surf/simgrid_dtd.c
+       
        COMMAND ${CMAKE_COMMAND} -E echo "surf/simgrid_dtd.c"
        #xbt/graphxml.c: xbt/graphxml.l
        COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.c
index 3048580..3974506 100644 (file)
@@ -65,15 +65,18 @@ if(HAVE_MC)
        add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/mc)\r
 endif(HAVE_MC)\r
 \r
-if(HAVE_GTNETS)\r
-       add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets)\r
-endif(HAVE_GTNETS)\r
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets)\r
+\r
+if(HAVE_NS3)\r
+       add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/ns3)\r
+endif(HAVE_NS3)\r
 \r
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth)\r
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/amok/saturate)\r
 \r
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag)\r
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag/dax)\r
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag/goal)\r
 if(HAVE_GRAPHVIZ)\r
   add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/simdag/dot)\r
 endif(HAVE_GRAPHVIZ)\r
index 1c41430..9bc0d11 100644 (file)
@@ -47,7 +47,7 @@ endif(enable_supernovae)
 
 # Compute the dependencies of GRAS
 ##################################
-set(GRAS_DEP "-lm -lpthread")
+set(GRAS_DEP "-lm -pthread")
 
 if(HAVE_POSIX_GETTIME)
        SET(GRAS_DEP "${GRAS_DEP} -lrt")
@@ -66,14 +66,11 @@ target_link_libraries(gras  ${GRAS_DEP})
 
 # Compute the dependencies of SimGrid
 #####################################
-set(SIMGRID_DEP "-lm")
-if(HAVE_PCRE_LIB)
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -lpcre")
-endif(HAVE_PCRE_LIB)
+set(SIMGRID_DEP "-lm -lpcre")
 
 if(pthread)
        if(${CONTEXT_THREADS})
-               SET(SIMGRID_DEP "${SIMGRID_DEP} -lpthread")
+               SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
        endif(${CONTEXT_THREADS})       
 endif(pthread)
 
@@ -118,7 +115,13 @@ if(HAVE_GTNETS)
 endif(HAVE_GTNETS)
 
 if(HAVE_NS3)
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -lns3")
+    if(${NS3_VERSION} EQUAL 310)
+           SET(SIMGRID_DEP "${SIMGRID_DEP} -lns3")
+           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_NS3_3_10")
+           set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_NS3_3_10")
+       else(${NS3_VERSION} EQUAL 310)
+           SET(SIMGRID_DEP "${SIMGRID_DEP} -lns3-core -lns3-csma -lns3-point-to-point -lns3-internet -lns3-applications")
+       endif(${NS3_VERSION} EQUAL 310)
 endif(HAVE_NS3)
 
 if(HAVE_POSIX_GETTIME)
index fea8907..0047b48 100644 (file)
@@ -20,11 +20,7 @@ else(MSVC)
 endif(MSVC)\r
 \r
 set(GRAS_DEP "ws2_32")\r
-set(SIMGRID_DEP "ws2_32")\r
-\r
-if(HAVE_PCRE_LIB)\r
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -lpcre")\r
-endif(HAVE_PCRE_LIB)\r
+set(SIMGRID_DEP "ws2_32 -lpcre")\r
 \r
 target_link_libraries(simgrid  ${SIMGRID_DEP})\r
 target_link_libraries(gras     ${GRAS_DEP})\r
index 1482f39..c8e34bb 100644 (file)
@@ -13,6 +13,21 @@ find_library(HAVE_NS3_LIB
     ${ns3_path}
 )
 
+find_library(HAVE_NS3_CORE_LIB
+    NAME ns3-core
+    HINTS
+    $ENV{LD_LIBRARY_PATH}
+    $ENV{HOME}
+    PATH_SUFFIXES lib64 lib ns3/lib
+    PATHS
+    /opt
+    /opt/local
+    /opt/csw
+    /sw
+    /usr
+    ${ns3_path}
+)
+
 find_path(HAVE_CORE_MODULE_H
        NAME ns3/core-module.h
     HINTS
@@ -43,16 +58,35 @@ message(STATUS "Looking for lib ns3 - not found")
 endif(HAVE_NS3_LIB)
 mark_as_advanced(HAVE_NS3_LIB)
 
-if(HAVE_NS3_LIB AND HAVE_CORE_MODULE_H)
-       set(HAVE_NS3 1)
-       string(REPLACE "/libns3.${LIB_EXE}" ""  HAVE_NS3_LIB "${HAVE_NS3_LIB}")
+message(STATUS "Looking for lib ns3-core")
+if(HAVE_NS3_CORE_LIB)
+message(STATUS "Looking for lib ns3-core - found")
+else(HAVE_NS3_CORE_LIB)
+message(STATUS "Looking for lib ns3-core - not found")
+endif(HAVE_NS3_CORE_LIB)
+mark_as_advanced(HAVE_NS3_LIB)
+mark_as_advanced(HAVE_NS3_CORE_LIB)
+
+if(HAVE_CORE_MODULE_H)
+    if(HAVE_NS3_LIB)
+        message(STATUS "Warning: NS-3 version <= 3.10")
+        set(HAVE_NS3 1)
+        set(NS3_VERSION 310)
+        string(REPLACE "/libns3.${LIB_EXE}" ""  HAVE_NS3_LIB "${HAVE_NS3_LIB}")
+    endif(HAVE_NS3_LIB)
+    if(HAVE_NS3_CORE_LIB)
+        message(STATUS "NS-3 version > 3.10")
+        set(HAVE_NS3 1)
+        set(NS3_VERSION 312)
+        string(REPLACE "/libns3-core.${LIB_EXE}" ""  HAVE_NS3_LIB "${HAVE_NS3_CORE_LIB}")
+    endif(HAVE_NS3_CORE_LIB)
+endif(HAVE_CORE_MODULE_H)
+
+if(HAVE_NS3)
        string(REGEX MATCH "${HAVE_NS3_LIB}" operation "$ENV{LD_LIBRARY_PATH}")
-       
        if(NOT operation)
-       
                message(STATUS "Warning: To use NS-3 don't forget to set LD_LIBRARY_PATH with:  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HAVE_NS3_LIB}")
                set(HAVE_NS3 0)
-               
        else(NOT operation)
        
                string(REGEX MATCH "-L${HAVE_NS3_LIB} " operation1 "${CMAKE_C_FLAGS}")
@@ -67,5 +101,10 @@ if(HAVE_NS3_LIB AND HAVE_CORE_MODULE_H)
        
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-I${HAVE_CORE_MODULE_H} -L${HAVE_NS3_LIB} ")
        endif(NOT operation)            
+else(HAVE_NS3)
+    message(STATUS "Warning: To use NS-3 Please install ns3 at least version 3.10 (http://www.nsnam.org/releases/)")
+endif(HAVE_NS3)
 
-endif(HAVE_NS3_LIB AND HAVE_CORE_MODULE_H)
\ No newline at end of file
+if(HAVE_NS3 AND enable_supernovae)
+    set(enable_supernovae OFF)
+endif(HAVE_NS3 AND enable_supernovae)
\ No newline at end of file
index 93fd14d..0b3db37 100644 (file)
@@ -12,6 +12,15 @@ find_library(PATH_PCRE_LIB
     /sw
     /usr)
     
+string(REGEX MATCH ".dll.a" operation "${PATH_PCRE_LIB}")
+
+if(NOT operation)
+    if(WIN32)
+           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-DPCRE_STATIC ")
+    endif(WIN32)
+endif(NOT operation)
+
+
 find_path(PATH_PCRE_H "pcre.h"
     HINTS
     $ENV{SIMGRID_PCRE_LIBRARY_PATH}
@@ -24,8 +33,6 @@ find_path(PATH_PCRE_H "pcre.h"
     /opt/csw
     /sw
     /usr)
-       
-set(HAVE_PCRE_LIB 0)
 
 message(STATUS "Looking for pcre.h")
 if(PATH_PCRE_H)
@@ -73,13 +80,8 @@ if(PATH_PCRE_LIB AND PATH_PCRE_H)
           if(NOT operation)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${PATH_PCRE_H} ")
           endif(NOT operation)    
-       set(HAVE_PCRE_LIB 1)
 else(PATH_PCRE_LIB)
-               if(enable_pcre STREQUAL "ON")
-                       message(FATAL_ERROR "Please install the libpcre3-dev package or equivalent before using it.")
-               else(enable_pcre STREQUAL "ON")
-                       message(STATUS "Warning: You should install libpcre (please install the libpcre3-dev package or equivalent).")
-               endif(enable_pcre STREQUAL "ON")
+          message(FATAL_ERROR "Please install the libpcre3-dev package or equivalent before using SimGrid.")
 endif(PATH_PCRE_LIB AND PATH_PCRE_H)
     
 mark_as_advanced(PATH_PCRE_H)
index 170f0aa..de8377d 100644 (file)
@@ -1,8 +1,6 @@
 ### ARGs use -D[var]=[ON/OFF] or [1/0] or [true/false](see after)
 ### ex: cmake -Denable_java=ON -Denable_gtnets=ON ./
 
-
-
 set(BIBTEX2HTML ${BIBTEX2HTML} CACHE PATH "Path to bibtex2html")
 set(gtnets_path ${gtnets_path} CACHE PATH "Path to gtnets lib and include")
 set(ns3_path ${ns3_path} CACHE PATH "Path to ns3 lib and include")
@@ -17,26 +15,16 @@ endif(NOT CMAKE_INSTALL_PREFIX)
 set(pipol_user ${pipol_user} CACHE TYPE INTERNAL FORCE)
 
 option(release "Whether Release Mode is activated (disable tests on experimental parts)" on)
+option(enable_compile_optimizations "" on)
+option(enable_debug "Set NDEBUG flag" on)
 
-option(enable_gtnets "Whether gtnets model is activated." on)
+option(enable_gtnets "Whether gtnets model is activated." off)
 option(enable_ns3    "Whether ns3 model is activated." off)
 option(enable_smpi "This variable set smpi lib." off)
-option(enable_lua "Whether the lua bindings are activated." on)
-set(enable_pcre ${enable_pcre} CACHE FORCE "Whether the pcre lib is activated.")
-if(enable_pcre STREQUAL "")
-       set(enable_pcre "AUTO")
-endif(enable_pcre STREQUAL "")
-
-if(WIN32 OR APPLE) 
-set(enable_smpi off CACHE TYPE INTERNAL FORCE)
-set(enable_lua off CACHE TYPE INTERNAL FORCE)
-endif(WIN32 OR APPLE) 
-
-option(enable_compile_optimizations "" on)
+option(enable_lua "Whether the lua bindings are activated." off)
 option(enable_compile_warnings "Whether compilation warnings should be turned into errors." off)
 option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt." off)
-option(enable_supernovae "Whether Supernovae mode (helping compiler optimization) is activated." on)
-option(enable_tracing "Tracing simulations for visualization." on)
+option(enable_tracing "Tracing simulations for visualization." off)
 option(enable_latency_bound_tracking "" off)
 option(enable_coverage "Enable coverage." off)
 option(enable_memcheck "Enable memcheck." off)
@@ -45,6 +33,7 @@ option(enable_model-checking "" off)
 option(enable_lib_static "" off)
 option(enable_jedule "Jedule output of SimDAG." off)
 option(enable_debug "Set NDEBUG flag" on)
+option(enable_supernovae "Whether Supernovae mode (helping compiler optimization) is activated." on)
 
 if(enable_supernovae AND enable_model-checking)
        set(enable_model-checking false CACHE TYPE INTERNAL FORCE)
index d39ef8d..5b9912f 100644 (file)
@@ -96,7 +96,6 @@ endif(NOT APPLE AND NOT WIN32)
 message("      Compile Lua    :        ${HAVE_LUA}")
 message("      Compile Smpi   :        ${enable_smpi}")
 message("      Compile Static :        ${enable_lib_static}")
-message("      Compile pcre   :        ${enable_pcre}")
 message("")
 message("      Maintainer mode:        ${enable_maintainer_mode}")
 message("      Supernovae mode:        ${enable_supernovae}")
@@ -112,9 +111,9 @@ message("   Smpi dependencies   :   ${SMPI_DEP}")
 message("")
 message("      INSTALL_PREFIX:         ${CMAKE_INSTALL_PREFIX}")
 
-exec_program("${CMAKE_COMMAND} -E make_directory ${simgrid_BINARY_DIR}/Testing/Notes/" OUTPUT_VARIABLE OKIDOKI)
-file(WRITE ${simgrid_BINARY_DIR}/Testing/Notes/Build  "SVN version : ${SVN_VERSION}\n")
-file(APPEND ${simgrid_BINARY_DIR}/Testing/Notes/Build "Release     : simgrid-${release_version}\n")
-file(APPEND ${simgrid_BINARY_DIR}/Testing/Notes/Build "Pipol user  : $ENV{PIPOL_USER}\n")
-file(APPEND ${simgrid_BINARY_DIR}/Testing/Notes/Build "Pipol image : $ENV{PIPOL_IMAGE}\n")
+exec_program("${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/Testing/Notes/" OUTPUT_VARIABLE OKIDOKI)
+file(WRITE ${PROJECT_BINARY_DIR}/Testing/Notes/Build  "SVN version : ${SVN_VERSION}\n")
+file(APPEND ${PROJECT_BINARY_DIR}/Testing/Notes/Build "Release     : simgrid-${release_version}\n")
+file(APPEND ${PROJECT_BINARY_DIR}/Testing/Notes/Build "Pipol user  : $ENV{PIPOL_USER}\n")
+file(APPEND ${PROJECT_BINARY_DIR}/Testing/Notes/Build "Pipol image : $ENV{PIPOL_IMAGE}\n")
  
index ece91f7..6ee5e4c 100755 (executable)
@@ -3,164 +3,147 @@ use strict;
 
 # input file = AddTest.txt
 
-if($#ARGV!=1) {
+if ( $#ARGV != 1 ) {
     die "Usage: generate_memcheck_tests.pl <CMAKE_HOME_DIRECTORY> AddTests.cmake\n";
 }
 
-my($proj_dir)=$ARGV[0];
+my ($proj_dir) = $ARGV[0];
 open MAKETEST, $ARGV[1] or die "Unable to open $ARGV[1]. $!\n";
 
-my(@test_list)=();
-my($nb_test)=0;
-my($line);
-my($path);
-my($dump)=0;
-my($srcdir);
-my($bindir);
-my($tesh_file);
-my($config_var);
-my($name_test);
+sub var_subst {
+    my ($text, $name, $value) = @_;
+    if ($value) {
+        $text =~ s/\${$name(?::=[^}]*)?}/$value/g;
+        $text =~ s/\$$name(\W|$)/$value$1/g;
+    }
+    else {
+        $text =~ s/\${$name:=([^}]*)}/$1/g;
+        $text =~ s/\${$name}//g;
+        $text =~ s/\$$name(\W|$)/$1/g;
+    }
+    return $text;
+}
+
+my (@test_list) = ();
+my ($nb_test)   = 0;
+my ($line);
+my ($path);
+my ($dump) = 0;
+my ($srcdir);
+my ($bindir);
+my ($tesh_file);
+my ($config_var);
+my ($name_test);
 
-while(defined($line=<MAKETEST>))
-{
+while ( defined( $line = <MAKETEST> ) ) {
     chomp $line;
-    if($line =~ /BEGIN TESH TESTS/) {
-               $dump = 1;
-               next;
-           } 
-    if($line =~ /END TESH TESTS/) {
-               $dump = 0;
-               last;
-           }
-    if($dump) 
-    {
-               if($line =~ /ADD_TEST/) 
-               {       $srcdir = "";
-                       $bindir = "";
-                       $config_var = "";
-                       $path = "";
-                       $nb_test++;
-                       $tesh_file = "";
-                       $name_test = "";
-                       
-                       if($line =~ /ADD_TEST\(([\S]+)/)
-                       {
-                               $name_test =($1);
-                       }
-                       if($line =~ /--cfg\s*\t*(\S*)/)
-                       {
-                               $config_var = "--cfg=$1 $config_var";
-                       }
-                       if($line =~ /--cd\s*(\S+)/)
-                       {
-                               $path=($1);
-                               $path=~ s/\"//g;
-#                              $path =~ s/\$\{CMAKE_BINARY_DIR\}/$proj_dir/g;
-                               $path =~ s/\$\{CMAKE_HOME_DIRECTORY\}/$proj_dir/g;
-                       }
-                       if($line =~ /--setenv\s*\t*(\S*)\=(\S*)/)
-                       {
-                               my($env_var,$value_var)=($1,$2);
-                               $value_var =~ s/\$\{CMAKE_BINARY_DIR\}/$proj_dir/g;
-                               $value_var =~ s/\$\{CMAKE_HOME_DIRECTORY\}/$proj_dir/g;
-                               if($env_var =~ /srcdir/)
-                               {
-                                       $srcdir = $value_var;
-                               }
-                               if($env_var =~ /bindir/)
-                               {
-                                       $bindir = $value_var;                                   
-                               }
-                       }
-                       if($line =~ /([\S]+)[)]$/)
-                       {
-                               $tesh_file =($1);
-                               $tesh_file =~ s/\${CMAKE_HOME_DIRECTORY}/$proj_dir/g;
-                               if ( -e "$tesh_file")
-                               {
-                                       
-                               }
-                               elsif( -e "$path/$tesh_file")
-                               {
-                                       $tesh_file = "$path\/$tesh_file";
-                                       
-                               }
-                               else
-                               {
-                                       print "tesh_file : $tesh_file not exists!\n";
-                                       print "tesh_file : $path\/$tesh_file not exists!\n";
-                                       die;
-                               }
-                               
-                       }
-                       
-#                      print "test_name = $name_test\n";
-#                      print "$config_var\n";
-#                      print "path = $path\n";
-#                      print "srcdir=$srcdir\n";
-#                      print "bindir=$bindir\n";
-#                      print "tesh_file = $tesh_file\n";
-#                      print "\n\n";
-                       
-                       my($count)=0;
-                       my($count_first)=0;
-                       my($count_second)=0;
-                       open TESH_FILE, $tesh_file or die "Unable to open $tesh_file $!\n";
-                       my($l);
-                       while(defined($l=<TESH_FILE>))
-                       {
-                           chomp $l;
-                           if($l =~ /^\$ (.*)$/) 
-                           {
-                               my($command) = $1;
-                               $command =~ s/\${srcdir:=.}/$srcdir/g;
-                               $command =~ s/\${bindir:=.}/$bindir/g;
-                               $command =~ s/\${EXEEXT:=}//g;
-                               $command =~ s/\$SG_TEST_EXENV //g;
-                               $command =~ s/\$SG_TEST_ENV //g;
-                               $command =~ s/\$SG_EXENV_TEST //g; 
-                               $command =~ s/\$EXEEXT//g;
-                               $command =~ s/\${EXEEXT}//g;
-                               $command =~ s/\${srcdir}/\${CMAKE_HOME_DIRECTORY}\/src/g;
-                               $command =~ s/ \$ARGS//g;
-                               $command =~ s/ \$@ //g; 
-                               $command =~ s/..\/..\/bin\/smpirun/\${CMAKE_BINARY_DIR\}\/bin\/smpirun/g;
-                if($command =~ /^[^\/\$\s]+\//) {
-                       $command = $path."/".$command;
-                       $command =~ s/\/(.?\/)+/\//g;
+    if ( $line =~ /BEGIN TESH TESTS/ ) {
+        $dump = 1;
+        next;
+    }
+    if ( $line =~ /END TESH TESTS/ ) {
+        $dump = 0;
+        last;
+    }
+    if ($dump) {
+        if ( $line =~ /ADD_TEST\(\S+\s+\S*\/tesh\s/ ) {
+            $srcdir     = "";
+            $bindir     = "";
+            $config_var = "";
+            $path       = "";
+            $nb_test++;
+            $tesh_file = "";
+            $name_test = "";
+
+            if ( $line =~ /ADD_TEST\((\S+)/ ) {
+                $name_test = ($1);
+            }
+            while ( $line =~ /--cfg\s+(\S+)/g ) {
+                $config_var = "--cfg=$1 $config_var";
+            }
+            while ( $line =~ /--cd\s+(\S+)/g ) {
+                $path = ($1);
+                $path =~ s/\"//g;
+            }
+            while ( $line =~ /--setenv\s+(\S+)\=(\S+)/g ) {
+                my ( $env_var, $value_var ) = ( $1, $2 );
+                if ( $env_var =~ /srcdir/ ) {
+                    $srcdir = $value_var;
                 }
-                $command =~ s/$proj_dir/\$\{CMAKE_BINARY_DIR\}/g;
-                if ($config_var)
-                {
-                       $command = "$command $config_var";
+                elsif ( $env_var =~ /bindir/ ) {
+                    $bindir = $value_var;
                 }
-                               print "ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n";
-                               #push @test_list, "memcheck-$name_test-$count";
-                               $count++;
-                           }
-                           if($l =~ /^\& (.*)$/) 
-                           {
-                               last;
-                           }
-                       }
-                       close(TESH_FILE);
-               } 
-               elsif($line =~ /set_tests_properties/)
-               {
-                       if($line =~ /set_tests_properties\(([\S]+)/)
-                       {
-                               my($name_temp)=($1);
-                               $line =~ s/$name_temp/memcheck-$name_temp-0/g;
-                               print $line."\n";
-                       }
-               }
-               else
-               {
-                   print $line."\n";
-               }
-       }   
+            }
+            if ( $line =~ /(\S+)\)$/ ) {
+                $tesh_file = $1;
+                $tesh_file =~ s/^[^\/\$]/$path\/$&/;
+                $tesh_file =~ s/\${CMAKE_HOME_DIRECTORY}/$proj_dir/g;
+                if ( ! -e "$tesh_file" ) {
+                    print "tesh_file : $tesh_file not exists!\n";
+                    die;
+                }
+            }
+
+            if (0) {
+                print "test_name = $name_test\n";
+                print "$config_var\n";
+                print "path = $path\n";
+                print "srcdir=$srcdir\n";
+                print "bindir=$bindir\n";
+                print "tesh_file = $tesh_file\n";
+                print "\n\n";
+            }
+
+            my ($count)        = 0;
+            my ($count_first)  = 0;
+            my ($count_second) = 0;
+            open TESH_FILE, $tesh_file or die "Unable to open $tesh_file $!\n";
+            my ($l);
+            while ( defined( $l = <TESH_FILE> ) ) {
+                chomp $l;
+                if ( $l =~ /^\$ (.*)$/ ) {
+                    my ($command) = $1;
+                    $command = var_subst($command, "srcdir", $srcdir);
+                    $command = var_subst($command, "bindir", $bindir);
+                    $command = var_subst($command, "EXEEXT", "");
+                    $command = var_subst($command, "SG_TEST_EXENV", "");
+                    $command = var_subst($command, "SG_TEST_ENV", "");
+                    $command = var_subst($command, "SG_EXENV_TEST", "");
+                    $command = var_subst($command, "ARGS", "");
+                    $command =~ s/\$@//g;
+#                    $command =~ s/..\/..\/bin\/smpirun/\${CMAKE_BINARY_DIR\}\/bin\/smpirun/g;
+                    $command =~ s/^\s+//;
+                    $command =~ s/^[^\/\$]\S*\//$path\/$&/;
+                    $command =~ s/^(\S*\/)(?:\.\/)+/$1/g;
+
+                    if ($config_var) {
+                        $command = "$command $config_var";
+                    }
+                    print "ADD_TEST(memcheck-$name_test-$count $command --cd $path\/)\n";
+
+                    #push @test_list, "memcheck-$name_test-$count";
+                    $count++;
+                }
+                if ( $l =~ /^\& (.*)$/ ) {
+                    last;
+                }
+            }
+            close(TESH_FILE);
+        }
+        elsif ( $line =~ /set_tests_properties/ ) {
+            if ( $line =~ /set_tests_properties\(([\S]+)/ ) {
+                my ($name_temp) = ($1);
+                $line =~ s/$name_temp/memcheck-$name_temp-0/g;
+                print $line. "\n";
+            }
+        }
+        else {
+            print $line. "\n";
+        }
+    }
 }
 close(MAKETEST);
+
 #print "nb_test = $nb_test\n";
 #print "set(MEMCHECK_LIST\n";
 #print (join("\n", @test_list));
index c58ef93..73e4257 100644 (file)
@@ -46,9 +46,6 @@
 /* Set to true if have the mergesort function */
 #cmakedefine HAVE_MERGESORT @HAVE_MERGESORT@
 
-/* Set to true if lib pcre is present */
-#cmakedefine HAVE_PCRE_LIB @HAVE_PCRE_LIB@
-
 /* If have linux_futex.h */
 #cmakedefine HAVE_FUTEX_H @HAVE_FUTEX_H@
 
 /* Indicates that we have GTNETS support */
 #cmakedefine HAVE_GTNETS @HAVE_GTNETS@
 
+/* Indicates that we have SMPI support */
+#cmakedefine HAVE_SMPI @HAVE_SMPI@
+
 /* Indicates that we have NS3 support */
 #cmakedefine HAVE_NS3 @HAVE_NS3@
 
index 0c24cd0..0567077 100644 (file)
@@ -1,4 +1,8 @@
 
+# test for code coverage
+ADD_TEST(help ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help)
+ADD_TEST(help-models ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-models)
+
 # teshsuite/xbt
 ADD_TEST(memcheck-tesh-log-large-0 ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_large_test "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 ADD_TEST(memcheck-tesh-log-large-1 ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_large_test "--log=root.fmt:%m%n"  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
@@ -9,544 +13,476 @@ ADD_TEST(memcheck-tesh-gras-dd-mem-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc
 ADD_TEST(memcheck-tesh-gras-dd-rw-0 rm -f datadesc_usage.out --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 ADD_TEST(memcheck-tesh-gras-dd-rw-1 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --write "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 ADD_TEST(memcheck-tesh-gras-dd-rw-2 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-gras-dd-r-little32-4-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc.little32_4 "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-gras-dd-r-little64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc.little64 "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-gras-dd-r-big32-8-4-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc.big32_8_4 "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-dd-r-little32-4-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc.little32_4  --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-dd-r-little64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc.little64  --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n"  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-dd-r-big32-8-4-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/datadesc/datadesc_usage --read ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/datadesc/datadesc.big32_8_4 --log=test.thres:verbose --log=structs.thres:info "--log=root.fmt:%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 
 IF(${ARCH_32_BITS})
-ADD_TEST(memcheck-tesh-gras-msg-handle-sg-32-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle_simulator ${CMAKE_BINARY_DIR}/teshsuite/../examples/msg/small_platform.xml ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-msg-handle-sg-32-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle_simulator ${CMAKE_HOME_DIRECTORY}/teshsuite/../examples/msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/msg_handle.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 ELSE(${ARCH_32_BITS})
-ADD_TEST(memcheck-tesh-gras-msg-handle-sg-64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle_simulator ${CMAKE_BINARY_DIR}/teshsuite/../examples/msg/small_platform.xml ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-msg-handle-sg-64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/msg_handle/msg_handle_simulator ${CMAKE_HOME_DIRECTORY}/teshsuite/../examples/msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/teshsuite/gras/msg_handle/msg_handle.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 ENDIF(${ARCH_32_BITS})
 
-ADD_TEST(memcheck-tesh-gras-empty-main-sg-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main/empty_main_simulator /../examples/msg/small_platform.xml /gras/empty_main/empty_main.xml --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-empty-main-sg-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/empty_main/empty_main_simulator ./../examples/msg/small_platform.xml ./gras/empty_main/empty_main.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/)
 
 IF(${ARCH_32_BITS})
-ADD_TEST(memcheck-tesh-gras-small-sleep-sg-32-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep/small_sleep_simulator /../examples/msg/small_platform.xml /gras/small_sleep/small_sleep.xml --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-small-sleep-sg-32-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep/small_sleep_simulator ./../examples/msg/small_platform.xml ./gras/small_sleep/small_sleep.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/)
 ELSE(${ARCH_32_BITS})
-ADD_TEST(memcheck-tesh-gras-small-sleep-sg-64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep/small_sleep_simulator /../examples/msg/small_platform.xml /gras/small_sleep/small_sleep.xml --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/)
+ADD_TEST(memcheck-tesh-gras-small-sleep-sg-64-0 ${CMAKE_BINARY_DIR}/teshsuite/gras/small_sleep/small_sleep_simulator ./../examples/msg/small_platform.xml ./gras/small_sleep/small_sleep.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/)
 ENDIF(${ARCH_32_BITS})
 
 # GRAS examples
 ADD_TEST(memcheck-gras-spawn-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_server --log=root.fmt=%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
 ADD_TEST(memcheck-gras-timer-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_client --log=root.fmt:%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-chrono-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_multiplier --log=root.fmt:%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-chrono-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_multiplier --log=root.fmt:%m%n   --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
 ADD_TEST(memcheck-gras-synchro-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_philosopher 4 --log=root.fmt=%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
-ADD_TEST(memcheck-gras-properties-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_alice --log=root.fmt=%P:%t%e%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
-ADD_TEST(memcheck-gras-properties-rl-1 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_bob --log=root.fmt=%P:%t%e%m%n --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+ADD_TEST(memcheck-gras-properties-rl-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_alice --log=root.fmt=%P:%t%e%m%n  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+ADD_TEST(memcheck-gras-properties-rl-1 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_bob --log=root.fmt=%P:%t%e%m%n  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
 
 # BEGIN CONTEXTS FACTORY
-ADD_TEST(memcheck-tesh-msg-get-sender-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-msg-get-sender-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-msg-get-sender-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-reinit-costs-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/test_reinit_costs ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-reinit-costs-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/test_reinit_costs ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-reinit-costs-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/test_reinit_costs ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_off.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_on.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_shared.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-17 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-18 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-19 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-20 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-21 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./one_cluster_file.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-raw-22 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/is_router_test ./test_of_is_router.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_off.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_on.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_shared.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-17 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-18 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-19 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-20 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-21 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./one_cluster_file.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-thread-22 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/is_router_test ./test_of_is_router.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_off.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_on.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_shared.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-17 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-18 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-19 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-20 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-21 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./one_cluster_file.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-ucontext-22 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/is_router_test ./test_of_is_router.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS2.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS2.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS2.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-raw-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-raw-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test Dijkstra.xml FULL_LINK --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-thread-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-thread-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test Dijkstra.xml FULL_LINK --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-ucontext-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-parser-sym-full-ucontext-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test Dijkstra.xml FULL_LINK --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_properties.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_off.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_on.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-raw-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_properties.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_off.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_on.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-thread-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_properties.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_off.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_on.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-flatifier-ucontext-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-full-links-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/teshsuite/simdag/platforms/)
-ADD_TEST(memcheck-tesh-simdag-basic0-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic0-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic0-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic1-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic1-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic1-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic2-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic2-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic2-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic3-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic3-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic3-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic4-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic4-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic4-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic5-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic5-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic5-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic6-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic6-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-basic6-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-1-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-2-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-raw-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-thread-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-3-ucontext-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-4-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency_bound ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1bb.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-4-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency_bound ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1bb.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-p2p-4-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency_bound ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/platform_2p_1bb.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-1-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_all2all ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-1-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_all2all ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-1-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_all2all ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-2-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_independent_comm ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-2-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_independent_comm ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-2-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_independent_comm ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-3-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_scatter ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-3-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_scatter ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-mxn-3-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_scatter ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-1-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_seq ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-1-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_seq ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-1-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_seq ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-raw-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl_hetero.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-thread-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl_hetero.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
-ADD_TEST(memcheck-tesh-simdag-par-2-ucontext-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/platform_2p_1sl_hetero.xml --surf-path=${CMAKE_HOME_DIRECTORY}/src --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-msg-get-sender-thread-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-tesh-msg-get-sender-raw-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+endif(HAVE_RAWCTX)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-tesh-msg-get-sender-ucontext-0 ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+endif(HAVE_UCONTEXT_H)
+
+IF(enable_debug) # these tests need the assertion mechanism
+ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-bogus-symmetric-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_asymetric_BOGUS2.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ENDIF(enable_debug)
+
+ADD_TEST(memcheck-tesh-simdag-reinit-costs-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/test_reinit_costs ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-parser-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_off.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_state_on.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_host.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_availability.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_shared.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_link_state_file.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-17 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-18 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-19 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-20 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-21 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./one_cluster_file.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-22 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/is_router_test ./test_of_is_router.xml --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-23 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./Two_clusters_rulebased.xml ONE_LINK --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-sym-full-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-sym-full-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-sym-full-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-sym-full-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-sym-full-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test Dijkstra.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_properties.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-3 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-4 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_off.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-5 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_state_on.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-6 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-7 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host_trace_inside.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-8 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-9 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_availability.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-10 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-11 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-12 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier one_link_state_file.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-13 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-14 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-15 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-16 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-flatifier-17 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/flatifier three_clusters_bypass.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-full-links-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-full-links-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-parser-bypass-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test ./three_clusters_bypass.xml FULL_LINK --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/)
+ADD_TEST(memcheck-tesh-simdag-basic0-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic0 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic1-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic1 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic2-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic2 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic3-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic3 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic4-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic4 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic5-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic5 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic_platform.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-basic6-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic6 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-1-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-1-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-1-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency1 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-2-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-2-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-2-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency2 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-3-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-3-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1fl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-3-2 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency3 ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-p2p-4-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/p2p/test_latency_bound ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p/platform_2p_1bb.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-mxn-1-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_all2all ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-mxn-2-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_independent_comm ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-mxn-3-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/network/mxn/test_intra_scatter ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn/platform_4p_1switch.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-par-1-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_seq ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-par-2-0 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/platform_2p_1sl.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
+ADD_TEST(memcheck-tesh-simdag-par-2-1 ${CMAKE_BINARY_DIR}/teshsuite/simdag/partask/test_comp_only_par ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask/platform_2p_1sl_hetero.xml --surf-path=${CMAKE_HOME_DIRECTORY}/teshsuite --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/teshsuite/)
 
 # MSG examples
-ADD_TEST(memcheck-msg-sendrecv-CLM03-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-CLM03-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-CLM03-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Vegas-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Vegas-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Vegas-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Reno-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Reno-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-sendrecv-Reno-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-suspend-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-suspend-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-suspend-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-forwarder-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-forwarder-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-forwarder-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-failure-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_failures.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-failure-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_failures.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-failure-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_failures.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-bypass-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-bypass-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-bypass-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-mailbox-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-mailbox-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-mailbox-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/small_platform_with_routers.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-vivaldi-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_BINARY_DIR}/examples/msg/../platforms/vivaldi.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-vivaldi-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_BINARY_DIR}/examples/msg/../platforms/vivaldi.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-vivaldi-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_BINARY_DIR}/examples/msg/../platforms/vivaldi.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-multicore-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-multicore-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-multicore-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_BINARY_DIR}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_BINARY_DIR}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-migration-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-migration-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-migration-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_BINARY_DIR}/examples/msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-ptask-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-priority-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml  ${CMAKE_BINARY_DIR}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-priority-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml  ${CMAKE_BINARY_DIR}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-priority-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_BINARY_DIR}/examples/msg/small_platform.xml  ${CMAKE_BINARY_DIR}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-properties-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_BINARY_DIR}/examples/msg/../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-properties-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_BINARY_DIR}/examples/msg/../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-properties-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_BINARY_DIR}/examples/msg/../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-icomms-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-icomms-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/small_platform.xml ${CMAKE_BINARY_DIR}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
-ADD_TEST(memcheck-msg-actions-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-raw-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-thread-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-actions-ucontext-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/actions/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/src --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-raw-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-thread-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-trace-ucontext-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-msg-token-ring-raw-0 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_clusters.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n  --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
-ADD_TEST(memcheck-msg-token-ring-raw-1 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_peers.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
-ADD_TEST(memcheck-msg-token-ring-thread-0 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_clusters.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n  --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
-ADD_TEST(memcheck-msg-token-ring-thread-1 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_peers.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
-ADD_TEST(memcheck-msg-token-ring-ucontext-0 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_clusters.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n  --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
-ADD_TEST(memcheck-msg-token-ring-ucontext-1 token_ring ${CMAKE_BINARY_DIR}/examples/msg/token_ring/two_peers.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+ADD_TEST(memcheck-msg-sendrecv-CLM03-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Vegas-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Reno-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-suspend-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-forwarder-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-failure-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_failures.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/examples/msg "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-bypass-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-mailbox-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-kill-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_kill ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/platform_kill.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_kill.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-msg-sendrecv-CLM03-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Vegas-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Reno-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-suspend-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-forwarder-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-failure-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_failures.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/examples/msg "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-bypass-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-mailbox-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-kill-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_kill ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/platform_kill.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_kill.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+endif(HAVE_UCONTEXT_H)
+
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-msg-sendrecv-CLM03-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Vegas-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-sendrecv-Reno-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/sendrecv/sendrecv ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/platform_sendrecv.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-suspend-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/suspend/suspend ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/suspend/deployment_suspend.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-forwarder-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_forwarder.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-failure-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_failures.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave.xml --cfg=path:${CMAKE_HOME_DIRECTORY}/examples/msg "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-bypass-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-mailbox-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform_with_routers.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox.xml --trace "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-kill-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_kill ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/platform_kill.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_kill.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+endif(HAVE_RAWCTX)
+
+ADD_TEST(memcheck-msg-masterslave-vivaldi-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/vivaldi.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-token-ring-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+ADD_TEST(memcheck-msg-token-ring-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_peers.xml --cfg=coordinates:yes "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-msg-masterslave-vivaldi-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/vivaldi.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-token-ring-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+ADD_TEST(memcheck-msg-token-ring-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_peers.xml --cfg=coordinates:yes "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+endif(HAVE_RAWCTX)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-msg-masterslave-vivaldi-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox  ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/vivaldi.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-token-ring-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+ADD_TEST(memcheck-msg-token-ring-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/token_ring/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/two_peers.xml --cfg=coordinates:yes "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring/)
+endif(HAVE_UCONTEXT_H)
+
+ADD_TEST(memcheck-msg-masterslave-multicore-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-migration-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-priority-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml  ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-properties-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-icomms-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-actions-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-thread-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path: --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-thread-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-chord-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+ADD_TEST(memcheck-msg-chord-thread-parallel-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/nthreads:4 --cfg=contexts/factory:thread  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-msg-masterslave-multicore-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-migration-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-priority-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml  ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-properties-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-icomms-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-actions-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-ucontext-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path: --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-ucontext-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-chord-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+ADD_TEST(memcheck-msg-chord-ucontext-parallel-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/nthreads:4 --cfg=contexts/factory:ucontext  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+endif(HAVE_UCONTEXT_H)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-msg-masterslave-multicore-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_mailbox ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/multicore_machine.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-migration-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/migration/migration ${CMAKE_HOME_DIRECTORY}/examples/msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.deploy  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/parallel_task ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ptask-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/parallel_task/test_ptask ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-priority-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/priority/priority ${CMAKE_HOME_DIRECTORY}/examples/msg/small_platform.xml  ${CMAKE_HOME_DIRECTORY}/examples/msg/priority/deployment_priority.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-actions-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment_split.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_allReduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_barrier.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_bcast.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_reduce.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-actions-raw-5 ${CMAKE_BINARY_DIR}/examples/msg/actions/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deployment.xml actions_with_isend.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/actions/)
+ADD_TEST(memcheck-msg-icomms-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer01.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer02.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer03.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer04.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-icomms-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer2 ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms/)
+ADD_TEST(memcheck-msg-properties-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/properties/msg_prop ${CMAKE_HOME_DIRECTORY}/examples/msg/../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/properties/deployment_properties.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_forwarder msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_failure --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path: --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-masterslave-cpu-ti-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-5 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-6 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-7 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-8 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-9 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-trace-raw-10 ${CMAKE_BINARY_DIR}/examples/msg/trace/test_trace_integration ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-msg-chord-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+ADD_TEST(memcheck-msg-chord-raw-parallel-0 ${CMAKE_BINARY_DIR}/examples/msg/chord/chord -nb_bits=6 ./../msg_platform.xml ./chord.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/nthreads:4 --cfg=contexts/factory:raw  --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/chord/)
+endif(HAVE_RAWCTX)
 
 IF(${ARCH_32_BITS})
-ADD_TEST(memcheck-gras-ping-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-ping-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-ping-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-rpc-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-rpc-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-rpc-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-spawn-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-spawn-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-spawn-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-timer-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-timer-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-timer-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-chrono-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-chrono-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-chrono-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-simple-token-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-simple-token-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-simple-token-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-mmrpc-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-mmrpc-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-mmrpc-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-all2all-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-all2all-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-all2all-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-pmm-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-pmm-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-pmm-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-synchro-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
-ADD_TEST(memcheck-gras-synchro-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
-ADD_TEST(memcheck-gras-synchro-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+ADD_TEST(memcheck-gras-ping-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-gras-ping-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+endif(HAVE_UCONTEXT_H)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-gras-ping-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+endif(HAVE_RAWCTX)
+
 ELSE(${ARCH_32_BITS})
-ADD_TEST(memcheck-gras-ping-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-ping-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-ping-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_BINARY_DIR}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
-ADD_TEST(memcheck-gras-rpc-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-rpc-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-rpc-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
-ADD_TEST(memcheck-gras-spawn-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-spawn-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-spawn-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_BINARY_DIR}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
-ADD_TEST(memcheck-gras-timer-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-timer-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-timer-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_BINARY_DIR}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/timer/timer.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
-ADD_TEST(memcheck-gras-chrono-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-chrono-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-chrono-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_BINARY_DIR}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
-ADD_TEST(memcheck-gras-simple-token-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-simple-token-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-simple-token-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
-ADD_TEST(memcheck-gras-mmrpc-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-mmrpc-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-mmrpc-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
-ADD_TEST(memcheck-gras-all2all-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-all2all-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-all2all-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_BINARY_DIR}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
-ADD_TEST(memcheck-gras-pmm-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-pmm-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-pmm-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_BINARY_DIR}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
-ADD_TEST(memcheck-gras-synchro-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
-ADD_TEST(memcheck-gras-synchro-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
-ADD_TEST(memcheck-gras-synchro-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_BINARY_DIR}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+ADD_TEST(memcheck-gras-ping-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-gras-ping-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+endif(HAVE_UCONTEXT_H)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-gras-ping-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/ping/ping_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/ping/ping.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/ping/)
+ADD_TEST(memcheck-gras-rpc-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/rpc/rpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/rpc/rpc.xml "--log=root.fmt:[0]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/rpc/)
+ADD_TEST(memcheck-gras-spawn-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/spawn/spawn_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/spawn/spawn.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/spawn/)
+ADD_TEST(memcheck-gras-timer-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/timer/timer_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/timer/timer.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/timer/)
+ADD_TEST(memcheck-gras-chrono-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/chrono/chrono_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/chrono/chrono.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/chrono/)
+ADD_TEST(memcheck-gras-simple-token-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/simple_token_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/../../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mutual_exclusion/simple_token/simple_token.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mutual_exclusion/simple_token/)
+ADD_TEST(memcheck-gras-mmrpc-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/mmrpc_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/mmrpc/mmrpc.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/mmrpc/)
+ADD_TEST(memcheck-gras-all2all-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/all2all/all2all_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/all2all/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/all2all/)
+ADD_TEST(memcheck-gras-pmm-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/pmm/pmm_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/../../msg/msg_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/pmm/pmm.xml "--log=root.fmt:[%10.6r]%e(%2i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/pmm/)
+ADD_TEST(memcheck-gras-synchro-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/synchro/synchro_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/../../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/synchro/synchro.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/synchro/)
+endif(HAVE_RAWCTX)
+
 ENDIF(${ARCH_32_BITS})
-ADD_TEST(memcheck-gras-properties-sg-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_BINARY_DIR}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/gras/properties/properties.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
-ADD_TEST(memcheck-gras-properties-sg-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_BINARY_DIR}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/gras/properties/properties.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
-ADD_TEST(memcheck-gras-properties-sg-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_BINARY_DIR}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_BINARY_DIR}/examples/gras/properties/properties.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+ADD_TEST(memcheck-gras-properties-sg-thread-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-gras-properties-sg-ucontext-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+endif(HAVE_UCONTEXT_H)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-gras-properties-sg-raw-0 ${CMAKE_BINARY_DIR}/examples/gras/properties/properties_simulator ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/../../platforms/prop.xml ${CMAKE_HOME_DIRECTORY}/examples/gras/properties/properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/gras/properties/)
+endif(HAVE_RAWCTX)
 
 # amok examples
+
 IF(${ARCH_32_BITS})
-ADD_TEST(memcheck-amok-bandwidth-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-bandwidth-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-bandwidth-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-bandwidth-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-saturate-sg-32-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  if(HAVE_RAWCTX)
+ADD_TEST(memcheck-amok-bandwidth-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-saturate-sg-32-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  endif(HAVE_RAWCTX)
+  if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-amok-bandwidth-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-saturate-sg-32-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  endif(HAVE_UCONTEXT_H)
 ELSE(${ARCH_32_BITS})
-ADD_TEST(memcheck-amok-bandwidth-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-bandwidth-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-bandwidth-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
-ADD_TEST(memcheck-amok-saturate-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_BINARY_DIR}/examples/amok/../msg/small_platform.xml ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-bandwidth-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-saturate-sg-64-thread-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  if(HAVE_RAWCTX)
+ADD_TEST(memcheck-amok-bandwidth-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-saturate-sg-64-raw-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  endif(HAVE_RAWCTX)
+  if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-amok-saturate-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/saturate/saturate_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/saturate/saturate.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+ADD_TEST(memcheck-amok-bandwidth-sg-64-ucontext-0 ${CMAKE_BINARY_DIR}/examples/amok/bandwidth/bandwidth_simulator ${CMAKE_HOME_DIRECTORY}/examples/amok/../msg/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/amok/bandwidth/bandwidth.xml --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/amok/)
+  endif(HAVE_UCONTEXT_H)
 ENDIF(${ARCH_32_BITS})
 
 # simdag examples
-ADD_TEST(memcheck-simdag-test-simdag-raw-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test ${CMAKE_BINARY_DIR}/examples/simdag/../msg/msg_platform.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag-thread-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test ${CMAKE_BINARY_DIR}/examples/simdag/../msg/msg_platform.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag-ucontext-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test ${CMAKE_BINARY_DIR}/examples/simdag/../msg/msg_platform.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag2-raw-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test2 ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag2-thread-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test2 ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag2-ucontext-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test2 ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag-seq-access-raw-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_seq_access ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag-seq-access-thread-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_seq_access ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-simdag-seq-access-ucontext-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_seq_access ${CMAKE_BINARY_DIR}/examples/simdag/2clusters.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-prop-raw-0 ${CMAKE_BINARY_DIR}/examples/simdag/properties/sd_prop ${CMAKE_BINARY_DIR}/examples/simdag/../platforms/prop.xml --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-prop-thread-0 ${CMAKE_BINARY_DIR}/examples/simdag/properties/sd_prop ${CMAKE_BINARY_DIR}/examples/simdag/../platforms/prop.xml --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-test-prop-ucontext-0 ${CMAKE_BINARY_DIR}/examples/simdag/properties/sd_prop ${CMAKE_BINARY_DIR}/examples/simdag/../platforms/prop.xml --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
-ADD_TEST(memcheck-simdag-minmin-test-raw-0 ${CMAKE_BINARY_DIR}/examples/simdag/scheduling/minmin_test --log=sd_daxparse.thresh:critical /simulacrum_7_hosts.xml /Montage_25.xml --cfg contexts/factory:raw  --cd /home/navarrop/simgrid/simgrid/trunk/examples/simdag/scheduling/)
-ADD_TEST(memcheck-simdag-minmin-test-thread-0 ${CMAKE_BINARY_DIR}/examples/simdag/scheduling/minmin_test --log=sd_daxparse.thresh:critical /simulacrum_7_hosts.xml /Montage_25.xml --cfg contexts/factory:thread  --cd /home/navarrop/simgrid/simgrid/trunk/examples/simdag/scheduling/)
-ADD_TEST(memcheck-simdag-minmin-test-ucontext-0 ${CMAKE_BINARY_DIR}/examples/simdag/scheduling/minmin_test --log=sd_daxparse.thresh:critical /simulacrum_7_hosts.xml /Montage_25.xml --cfg contexts/factory:ucontext  --cd /home/navarrop/simgrid/simgrid/trunk/examples/simdag/scheduling/)
+ADD_TEST(memcheck-simdag-test-simdag-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test ${CMAKE_HOME_DIRECTORY}/examples/simdag/../msg/msg_platform.xml --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
+ADD_TEST(memcheck-simdag-test-simdag2-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_test2 ${CMAKE_HOME_DIRECTORY}/examples/simdag/2clusters.xml --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
+ADD_TEST(memcheck-simdag-test-simdag-seq-access-0 ${CMAKE_BINARY_DIR}/examples/simdag/sd_seq_access ${CMAKE_HOME_DIRECTORY}/examples/simdag/2clusters.xml --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
+ADD_TEST(memcheck-simdag-test-prop-0 ${CMAKE_BINARY_DIR}/examples/simdag/properties/sd_prop ${CMAKE_HOME_DIRECTORY}/examples/simdag/../platforms/prop.xml --cd ${CMAKE_BINARY_DIR}/examples/simdag/)
+ADD_TEST(memcheck-simdag-minmin-test-0 ${CMAKE_BINARY_DIR}/examples/simdag/scheduling/minmin_test --log=sd_daxparse.thresh:critical ./simulacrum_7_hosts.xml ./Montage_25.xml --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/scheduling/)
 
 if(HAVE_GTNETS)
-ADD_TEST(memcheck-msg-gtnets-waxman-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-waxman-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-waxman-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-lv08-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-lv08-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-onelink-lv08-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-gtnets-fullduplex-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-waxman-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-lv08-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+if(HAVE_UCONTEXT_H)
+ADD_TEST(memcheck-msg-gtnets-waxman-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-lv08-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+endif(HAVE_UCONTEXT_H)
+if(HAVE_RAWCTX)
+ADD_TEST(memcheck-msg-gtnets-waxman-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-dogbone-lv08-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-onelink-lv08-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:0 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-gtnets-fullduplex-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/fullduplex-d.xml --cfg=fullduplex:1 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+endif(HAVE_RAWCTX)
+
   if(HAVE_TRACING)
-ADD_TEST(memcheck-msg-tracing-gtnets-waxman-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-tracing-gtnets-dogbone-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-tracing-gtnets-onelink-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-tracing-gtnets-dogbone-lv08-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cd ${CMAKE_BINARY_DIR}/examples/msg/)
-ADD_TEST(memcheck-msg-tracing-gtnets-onelink-lv08-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-p.xml ${CMAKE_BINARY_DIR}/examples/msg/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-tracing-gtnets-waxman-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-tracing-gtnets-dogbone-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-tracing-gtnets-onelink-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-tracing-gtnets-dogbone-lv08-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-tracing-gtnets-onelink-lv08-0 ${CMAKE_BINARY_DIR}/examples/msg/gtnets/gtnets ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:1 --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO --cd ${CMAKE_BINARY_DIR}/examples/msg/)
   endif(HAVE_TRACING)
 endif(HAVE_GTNETS)
 
+if(HAVE_NS3)
+ADD_TEST(memcheck-msg-ns3-thread-0 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-thread-1 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-thread-2 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-thread-3 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-thread-4 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:thread  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-ucontext-0 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-ucontext-1 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-ucontext-2 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-ucontext-3 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-ucontext-4 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:ucontext  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-raw-0 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-raw-1 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-raw-2 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-p.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-raw-3 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+ADD_TEST(memcheck-msg-ns3-raw-4 ${CMAKE_BINARY_DIR}/examples/msg/ns3/ns3 ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3 --cfg=contexts/factory:raw  --cd ${CMAKE_BINARY_DIR}/examples/msg/)
+endif(HAVE_NS3)
+
 IF(HAVE_TRACING)
-ADD_TEST(memcheck-tracing-ms-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/ms --cfg=tracing:1 --cfg=tracing/filename:tracing/ms.trace --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1 --cfg=triva/categorized:tracing/ms.cat.plist --cfg=triva/uncategorized:tracing/ms.uncat.plist --log=instr_paje.thres:debug --log=instr_paje_trace.thres:debug "--log=root.fmt:[%10.6r]%e\(%i:%P@%h\)%e%m%n" /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-ms-1 cat tracing/ms.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-ms-2 cat tracing/ms.uncat.plist --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-ms-3 rm -rf tracing/ms.trace tracing/ms.cat.plist tracing/ms.uncat.plist --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-categories-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/categories --cfg=tracing:1 --cfg=tracing/filename:tracing/categories.trace --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1 --cfg=triva/categorized:tracing/categories.cat.plist --cfg=triva/uncategorized:tracing/categories.uncat.plist /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-categories-1 cat tracing/categories.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-categories-2 rm -rf tracing/categories.trace tracing/categories.cat.plist tracing/categories.uncat.plist --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-tasks-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/tasks --cfg=tracing:1 --cfg=tracing/msg/task:1 --cfg=tracing/filename:tracing/tasks.trace /tracing/platform.xml /tracing/deployment.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-tasks-1 cat tracing/tasks.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-tasks-2 rm -rf tracing/tasks.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-process-migration-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/procmig --cfg=tracing:1 --cfg=tracing/filename:tracing/procmig.trace --cfg=tracing/msg/process:1 /tracing/platform.xml /tracing/procmig-deploy.xml --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-process-migration-1 cat tracing/procmig.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
-ADD_TEST(memcheck-tracing-process-migration-2 rm -rf tracing/procmig.trace --cd /home/navarrop/simgrid/simgrid/trunk/examples/msg/)
+  ADD_TEST(tracing-help             ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
+ADD_TEST(memcheck-tracing-ms-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/ms --cfg=tracing:1 --cfg=tracing/buffer:1 --cfg=tracing/buffer:1 --cfg=tracing/filename:tracing/ms.trace --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1 --cfg=triva/categorized:tracing/ms.cat.plist --cfg=triva/uncategorized:tracing/ms.uncat.plist --log=instr_paje.thres:debug --log=instr_paje_trace.thres:debug "--log=root.fmt:[%10.6r]%e\(%i:%P@%h\)%e%m%n" ./tracing/platform.xml ./tracing/deployment.xml --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-ms-1 cat tracing/ms.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-ms-2 cat tracing/ms.uncat.plist --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-ms-3 cat tracing/ms.cat.plist --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-ms-4 rm -rf tracing/ms.trace tracing/ms.cat.plist tracing/ms.uncat.plist --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-categories-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/categories --cfg=tracing:1 --cfg=tracing/buffer:1 --cfg=tracing/filename:tracing/categories.trace --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1 --cfg=triva/categorized:tracing/categories.cat.plist --cfg=triva/uncategorized:tracing/categories.uncat.plist ./tracing/platform.xml ./tracing/deployment.xml --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-categories-1 cat tracing/categories.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-categories-2 rm -rf tracing/categories.trace tracing/categories.cat.plist tracing/categories.uncat.plist --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-tasks-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/tasks --cfg=tracing:1 --cfg=tracing/categorized:1 --cfg=tracing/buffer:1 --cfg=tracing/msg/task:1 --cfg=tracing/filename:tracing/tasks.trace ./tracing/platform.xml ./tracing/deployment.xml --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-tasks-1 cat tracing/tasks.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-tasks-2 rm -rf tracing/tasks.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-process-migration-0 ${CMAKE_BINARY_DIR}/examples/msg/tracing/procmig --cfg=tracing:1 --cfg=tracing/buffer:1 --cfg=tracing/filename:tracing/procmig.trace --cfg=tracing/msg/process:1 ./tracing/platform.xml ./tracing/procmig-deploy.xml --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-process-migration-1 cat tracing/procmig.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-tracing-process-migration-2 rm -rf tracing/procmig.trace --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/)
+ADD_TEST(memcheck-graphicator-0 ${CMAKE_BINARY_DIR}/bin/graphicator ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/one_cluster.xml --cfg=tracing:1 --cfg=tracing/platform:1 test.dot --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator/)
+ADD_TEST(memcheck-graphicator-1 rm test.dot --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator/)
 ENDIF(HAVE_TRACING)
 
 # Lua examples
 if(HAVE_LUA)
-ADD_TEST(memcheck-lua-masterslave-0 lua master_slave.lua --cd /home/navarrop/simgrid/simgrid/trunk/examples/lua/)
-ADD_TEST(memcheck-lua-mult-matrix-0 lua mult_matrix.lua "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd /home/navarrop/simgrid/simgrid/trunk/examples/lua/)
-ADD_TEST(memcheck-lua-masterslave-bypass-0 lua master_slave.lua --log=surf_parse.thres:critical --cd /home/navarrop/simgrid/simgrid/trunk/examples/lua/)
-ADD_TEST(memcheck-lua-msg-masterslave-console-0 masterslave_console ${CMAKE_BINARY_DIR}/examples/msg/masterslave/platform_script.lua --log=surf_parse.thres:critical "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/examples/msg/masterslave/)
+ADD_TEST(memcheck-lua-duplicated-globals-0 lua duplicated_globals.lua --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/state_cloner/)
+ADD_TEST(memcheck-lua-masterslave-0 lua master_slave.lua --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/masterslave/)
+ADD_TEST(memcheck-lua-mult-matrix-0 lua mult_matrix.lua "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/multi_matrix/)
+ADD_TEST(memcheck-lua-masterslave-bypass-0 lua master_slave_bypass.lua --log=surf_parse.thres:critical --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/console/)
+ADD_TEST(memcheck-lua-msg-masterslave-console-0 ${CMAKE_BINARY_DIR}/examples/msg/masterslave/masterslave_console ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/platform_script.lua --log=surf_parse.thres:critical "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cd ${CMAKE_BINARY_DIR}/examples/msg/masterslave/)
+set_tests_properties(memcheck-lua-duplicated-globals-0                                 PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(memcheck-lua-masterslave-0                                PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(memcheck-lua-mult-matrix-0                                PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
 set_tests_properties(memcheck-lua-masterslave-bypass-0                 PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so")
index e2f6151..d627181 100644 (file)
@@ -27,7 +27,7 @@
 ;--------------------------------\r
 \r
 Name "Simgrid"\r
-outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@SIMGRID_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@NSIS_WIN_VERSION@@BIN_EXE@"\r
 Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
 \r
 # set the default installation directory\r
@@ -35,6 +35,13 @@ InstallDir c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VE
 \r
 Section "Libraries and Headers" LibSection\r
 \r
+       setOutPath $INSTDIR\r
+       file @CMAKE_HOME_DIRECTORY@\AUTHORS\r
+       file @CMAKE_HOME_DIRECTORY@\Changelog\r
+       file @CMAKE_HOME_DIRECTORY@\COPYING\r
+       file @CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1\r
+       file @CMAKE_HOME_DIRECTORY@\NEWS\r
+\r
        # install lib\r
        CreateDirectory $INSTDIR\lib\r
        setOutPath $INSTDIR\lib\r
@@ -165,17 +172,33 @@ Section "Documentation" DocSection
        # create a shortcut in the start menu programs directory\r
        CreateDirectory "$SMPROGRAMS\SimGrid"\r
        createShortCut  "$SMPROGRAMS\SimGrid\Documentation.lnk" "$INSTDIR\doc\html\index.html"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Website.lnk"       "http://simgrid.gforge.inria.fr/"\r
        \r
 SectionEnd\r
 Section "Examples" ExamplesSection     \r
-       \r
-       # install examples\r
+\r
        CreateDirectory $INSTDIR\examples\r
        setOutPath $INSTDIR\examples\r
+       \r
+       #install examples for platforms\r
        file /r @CMAKE_HOME_DIRECTORY@\examples\platforms\r
+       \r
+       # install example HelloWorld\r
        file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\r
-       # create a shortcut in the start menu programs directory\r
-       createShortCut  "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"    "$INSTDIR\examples\HelloWorld"  \r
+               \r
+       # install example MasterSlave\r
+       CreateDirectory $INSTDIR\examples\MasterSlave\r
+       setOutPath $INSTDIR\examples\MasterSlave\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\masterslave_forwarder.c\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\deployment_masterslave_forwarder.xml\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\msg_platform.xml\r
+       file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\CMakeLists.txt\r
+       file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\FindPCRE.cmake\r
+       \r
+       # create shortcuts in the start menu programs directory\r
+       CreateDirectory "$SMPROGRAMS\SimGrid\Examples\"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Examples\HelloWorld project.lnk"   "$INSTDIR\examples\HelloWorld"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Examples\MasterSlave project.lnk"  "$INSTDIR\examples\MasterSlave"\r
        \r
 SectionEnd\r
 Section "Pcre library" PCRESection     \r
@@ -335,7 +358,16 @@ section "Uninstall"
        # delete link\r
        delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
        delete "$SMPROGRAMS\SimGrid\Documentation.lnk"\r
-       delete "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Website.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Examples\HelloWorld project.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Examples\MasterSlave project.lnk"\r
+       \r
+       # delete EXTRA FILES\r
+       delete $INSTDIR\AUTHORS\r
+       delete $INSTDIR\Changelog\r
+       delete $INSTDIR\COPYING\r
+       delete $INSTDIR\LICENSE-LGPL-2.1\r
+       delete $INSTDIR\NEWS\r
        \r
        # now delete directories\r
        RMDir  "$INSTDIR\bin"\r
@@ -353,17 +385,21 @@ section "Uninstall"
        RMDir  "$INSTDIR\include"\r
        RMDir  /r "$INSTDIR\doc"\r
        RMDir  /r "$INSTDIR\examples"\r
+       RMDir  "$SMPROGRAMS\SimGrid\Examples"\r
        RMDir  "$SMPROGRAMS\SimGrid"\r
        \r
        # delete PCRE\r
-       RMDir   "$INSTDIR\GnuWin32"\r
+       RMDir   /r "$INSTDIR\GnuWin32"\r
        \r
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
        DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH\r
        DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION\r
-      DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    \r
+    # delete INSTDIR\r
+    RMDir  /r "$INSTDIR"\r
     \r
 # uninstall section end\r
 sectionEnd
\ No newline at end of file
diff --git a/buildtools/Cmake/test_g5k.xml b/buildtools/Cmake/test_g5k.xml
deleted file mode 100644 (file)
index 46898bd..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
-       <AS id="AS_grid5000" routing="Floyd" >
-               <AS id="AS_interne" routing="Floyd">
-                       <router id="lille"/>
-                       <router id="paris"/>
-                       <router id="nancy"/>
-                       <router id="rennes"/>
-                       <router id="lyon"/>
-                       <router id="bordeaux"/>
-                       <router id="grenoble"/>
-                       <router id="marseille"/>
-                       <router id="toulouse"/>
-                       <router id="sophia"/>
-
-                       <link id="Lille_Paris"        bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Paris_Nancy"        bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Paris_Rennes"       bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Paris_Lyon"         bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Bordeaux_Lyon"      bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Lyon_Grenoble"      bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Lyon_Marseille"     bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Marseille_Sophia"   bandwidth="1.25E9" latency="1.0E-4"/>
-                       <link id="Marseille_Toulouse" bandwidth="1.25E9" latency="1.0E-4"/>
-
-               <route src="lille"     dst="paris"     ><link_ctn id="Lille_Paris"/></route>
-               <route src="paris"     dst="nancy"     ><link_ctn id="Paris_Nancy"/></route>
-               <route src="paris"     dst="rennes"    ><link_ctn id="Paris_Rennes"/></route>
-               <route src="paris"     dst="lyon"      ><link_ctn id="Paris_Lyon"/></route>
-               <route src="bordeaux"  dst="lyon"      ><link_ctn id="Bordeaux_Lyon"/></route>
-               <route src="lyon"      dst="grenoble"  ><link_ctn id="Lyon_Grenoble"/></route>
-               <route src="lyon"      dst="marseille" ><link_ctn id="Lyon_Marseille"/></route>
-               <route src="marseille" dst="sophia"    ><link_ctn id="Marseille_Sophia"/></route>
-               <route src="marseille" dst="toulouse"  ><link_ctn id="Marseille_Toulouse"/></route>
-               </AS>
-               <AS id="AS_bordeaux" routing="RuleBased" >
-                       <cluster id="AS_bordeplage" prefix="bordeplage-" suffix=".bordeplage.grid5000.fr"
-                               radical="1-51" power="5.2297E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_bordeplage" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_bordereau" prefix="bordereau-" suffix=".bordereau.grid5000.fr"
-                               radical="1-93" power="8.8925E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_bordereau" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_borderline" prefix="borderline-" suffix=".borderline.grid5000.fr"
-                               radical="1-10" power="13.357E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_borderline" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_bordeaux" routing="Full">
-                               <router id="gw_bordeaux"/>
-                       </AS>
-                       <link   id="link_gw_bordeaux" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_grenoble" routing="RuleBased" >
-                       <cluster id="AS_adonis" prefix="adonis-" suffix=".adonis.grid5000.fr"
-                               radical="1-12" power="23.681E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_adonis" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_edel" prefix="edel-" suffix=".edel.grid5000.fr"
-                               radical="1-72" power="23.492E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_edel" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_genepi" prefix="genepi-" suffix=".genepi.grid5000.fr"
-                               radical="1-34" power="21.175E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_genepi" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_grenoble" routing="Full">
-                               <router id="gw_grenoble"/>
-                       </AS>
-                       <link   id="link_gw_grenoble" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_lille" routing="RuleBased" >
-                       <cluster id="AS_chicon" prefix="chicon-" suffix=".chicon.grid5000.fr"
-                               radical="1-26" power="8.9618E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_chicon" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_chinqchint" prefix="chinqchint-" suffix=".chinqchint.grid5000.fr"
-                               radical="1-46" power="22.270E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_chinqchint" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_lille" routing="Full">
-                               <router id="gw_lille"/>
-                       </AS>
-                       <link   id="link_gw_lille" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_lyon" routing="RuleBased" >
-                       <cluster id="AS_capricorne" prefix="capricorne-" suffix=".capricorne.grid5000.fr"
-                               radical="1-56" power="4.7233E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_capricorne" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_sagittaire" prefix="sagittaire-" suffix=".sagittaire.grid5000.fr"
-                               radical="1-79" power="5.6693E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_sagittaire" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_lyon" routing="Full">
-                               <router id="gw_lyon"/>
-                       </AS>
-                       <link   id="link_gw_lyon" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_nancy" routing="RuleBased" >
-                       <cluster id="AS_graphene" prefix="graphene-" suffix=".graphene.grid5000.fr"
-                               radical="1-144" power="16.673E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_graphene" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_griffon" prefix="griffon-" suffix=".griffon.grid5000.fr"
-                               radical="1-92" power="20.678E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_griffon" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_nancy" routing="Full">
-                               <router id="gw_nancy"/>
-                       </AS>
-                       <link   id="link_gw_nancy" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_orsay" routing="RuleBased" >
-                       <cluster id="AS_gdx" prefix="gdx-" suffix=".gdx.grid5000.fr"
-                               radical="1-310" power="4.7153E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_gdx" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_netgdx" prefix="netgdx-" suffix=".netgdx.grid5000.fr"
-                               radical="1-30" power="4.7144E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_netgdx" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_orsay" routing="Full">
-                               <router id="gw_orsay"/>
-                       </AS>
-                       <link   id="link_gw_orsay" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_rennes" routing="RuleBased" >
-                       <cluster id="AS_paradent" prefix="paradent-" suffix=".paradent.grid5000.fr"
-                               radical="1-64" power="21.496E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_paradent" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_paramount" prefix="paramount-" suffix=".paramount.grid5000.fr"
-                               radical="1-33" power="12.910E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_paramount" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_parapide" prefix="parapide-" suffix=".parapide.grid5000.fr"
-                               radical="1-25" power="30.130E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_parapide" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_parapluie" prefix="parapluie-" suffix=".parapluie.grid5000.fr"
-                               radical="1-40" power="27.391E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_parapluie" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_rennes" routing="Full">
-                               <router id="gw_rennes"/>
-                       </AS>
-                       <link   id="link_gw_rennes" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_sophia" routing="RuleBased" >
-                       <cluster id="AS_helios" prefix="helios-" suffix=".helios.grid5000.fr"
-                               radical="1-56" power="7.7318E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_helios" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_sol" prefix="sol-" suffix=".sol.grid5000.fr"
-                               radical="1-50" power="8.9388E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_sol" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_suno" prefix="suno-" suffix=".suno.grid5000.fr"
-                               radical="1-45" power="23.530E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_suno" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_sophia" routing="Full">
-                               <router id="gw_sophia"/>
-                       </AS>
-                       <link   id="link_gw_sophia" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <AS id="AS_toulouse" routing="RuleBased" >
-                       <cluster id="AS_pastel" prefix="pastel-" suffix=".pastel.grid5000.fr"
-                               radical="1-80" power="9.5674E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_pastel" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <cluster id="AS_violette" prefix="violette-" suffix=".violette.grid5000.fr"
-                               radical="1-52" power="5.1143E9" bw="1.25E8" lat="1.0E-4"
-                               bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
-                       <link   id="link_violette" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <AS id="gw_AS_toulouse" routing="Full">
-                               <router id="gw_toulouse"/>
-                       </AS>
-                       <link   id="link_gw_toulouse" bandwidth="1.25E9" latency="1.0E-4"/>
-
-                       <ASroute src="^AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="YES">
-                                       <link_ctn id="link_$1src"/>
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-                       <ASroute src="^AS_(.*)$" dst="^gw_AS_(.*)$"
-                               gw_src="$1src-AS_$1src_router.$1src.grid5000.fr"
-                               gw_dst="gw_$1dst"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1src"/>
-                       </ASroute>
-
-                       <ASroute src="^gw_AS_(.*)$" dst="^AS_(.*)$"
-                               gw_src="gw_$1src"
-                               gw_dst="$1dst-AS_$1dst_router.$1dst.grid5000.fr"
-                               symmetrical="NO">
-                                       <link_ctn id="link_$1dst"/>
-                       </ASroute>
-
-               </AS>
-               <ASroute src="AS_toulouse" dst="AS_interne" gw_src="gw_toulouse" gw_dst="toulouse" symmetrical="YES">
-                       <link_ctn id="link_gw_toulouse"/>
-               </ASroute>
-               <ASroute src="AS_sophia" dst="AS_interne" gw_src="gw_sophia" gw_dst="sophia" symmetrical="YES">
-                       <link_ctn id="link_gw_sophia"/>
-               </ASroute>
-               <ASroute src="AS_rennes" dst="AS_interne" gw_src="gw_rennes" gw_dst="rennes" symmetrical="YES">
-                       <link_ctn id="link_gw_rennes"/>
-               </ASroute>
-               <ASroute src="AS_orsay" dst="AS_interne" gw_src="gw_orsay" gw_dst="paris" symmetrical="YES">
-                       <link_ctn id="link_gw_orsay"/>
-               </ASroute>
-               <ASroute src="AS_nancy" dst="AS_interne" gw_src="gw_nancy" gw_dst="nancy" symmetrical="YES">
-                       <link_ctn id="link_gw_nancy"/>
-               </ASroute>
-               <ASroute src="AS_lyon" dst="AS_interne" gw_src="gw_lyon" gw_dst="lyon" symmetrical="YES">
-                       <link_ctn id="link_gw_lyon"/>
-               </ASroute>
-               <ASroute src="AS_lille" dst="AS_interne" gw_src="gw_lille" gw_dst="lille" symmetrical="YES">
-                       <link_ctn id="link_gw_lille"/>
-               </ASroute>
-               <ASroute src="AS_grenoble" dst="AS_interne" gw_src="gw_grenoble" gw_dst="grenoble" symmetrical="YES">
-                       <link_ctn id="link_gw_grenoble"/>
-               </ASroute>
-               <ASroute src="AS_bordeaux" dst="AS_interne" gw_src="gw_bordeaux" gw_dst="bordeaux" symmetrical="YES">
-                       <link_ctn id="link_gw_bordeaux"/>
-               </ASroute>
-       </AS>
-</platform>
old mode 100644 (file)
new mode 100755 (executable)
index 7b457c7..c5cfd88
@@ -13,99 +13,37 @@ cd ./pipol/$PIPOL_HOST
 git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid --quiet
 cd simgrid
 
-if [ x$PIPOL_IMAGE == "xamd64-windows-server-2008-64bits.dd.gz" ] ; then
+perl ./buildtools/pipol/cmake.pl
+perl ./buildtools/pipol/ruby.pl
 
-       export PATH=/cygdrive/c/:/cygdrive/c/GnuWin32/bin/:/cygdrive/c/Windows/system32:/cygdrive/c/Windows
-       export PATH=$PATH:/cygdrive/c/CMake\ 2.8/bin/:/cygdrive/c/strawberry/c/bin:/cygdrive/c/strawberry/perl/site/bin:/cygdrive/c/strawberry/perl/bin
-       
-       cmake \
-       -G"Unix Makefiles" \
-       -Denable_lua=off \
-       -Denable_tracing=off \
-       -Denable_smpi=off \
-       -Denable_supernovae=off \
-       -Denable_compile_optimizations=off \
-       -Denable_compile_warnings=off \
-       -Denable_lib_static=off \
-       -Denable_model-checking=off \
-       -Denable_latency_bound_tracking=off \
-       -Drelease=on \
-       -Denable_gtnets=off .
-       ctest -D ExperimentalStart
-       ctest -D ExperimentalConfigure
-       ctest -D ExperimentalBuild
-       ctest -D ExperimentalSubmit
+if [ -e /usr/bin/gcc-4.6 ] ; then
+export CC=gcc-4.6
+export CXX=g++-4.6
 else
+export CC=gcc
+export CXX=g++
+fi
 
-       perl ./buildtools/pipol/cmake.pl
-       perl ./buildtools/pipol/ruby.pl
-               
-       if [ x$PIPOL_IMAGE == "xamd64_2010-linux-ubuntu-maverick.dd.gz" ] ; then
-               #mem-check
-               cmake \
-               -Denable_lua=off \
-               -Denable_tracing=off \
-               -Denable_smpi=off \
-               -Denable_supernovae=off \
-               -Denable_compile_optimizations=off \
-               -Denable_compile_warnings=on \
-               -Denable_lib_static=off \
-               -Denable_model-checking=off \
-               -Denable_latency_bound_tracking=off \
-               -Denable_gtnets=off \
-               -Denable_jedule=off \
-               -Drelease=on \
-               -Denable_memcheck=on ./
-               ctest -D ExperimentalStart
-               ctest -D ExperimentalConfigure
-               ctest -D ExperimentalBuild
-               ctest -D ExperimentalMemCheck
-               ctest -D ExperimentalSubmit
-       else
-               sh ./buildtools/pipol/install_gtnets.sh ./gtnets_install
-               SIMGRID_ROOT=`pwd`
-               export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SIMGRID_ROOT/gtnets_install/lib
+#Those 3 lines is for GTNetS
+#sh ./buildtools/pipol/install_gtnets.sh ./gtnets_install
+#SIMGRID_ROOT=`pwd`
+#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SIMGRID_ROOT/gtnets_install/lib
 
-               #supernovae
-               cmake \
-               -Denable_lua=on \
-               -Denable_ruby=on \
-               -Denable_java=on \
-               -Denable_tracing=on \
-               -Denable_smpi=on \
-               -Denable_supernovae=on \
-               -Denable_compile_optimizations=on \
-               -Denable_compile_warnings=on \
-               -Denable_lib_static=off \
-               -Denable_model-checking=off \
-               -Denable_latency_bound_tracking=off \
-               -Drelease=on \
-               -Denable_gtnets=off .
-               ctest -D ExperimentalStart
-               ctest -D ExperimentalConfigure
-               ctest -D ExperimentalBuild
-               ctest -D ExperimentalTest
-               ctest -D ExperimentalSubmit
-               make clean
-               
-               #MC
-               cmake \
-               -Denable_latency_bound_tracking=on \
-               -Denable_gtnets=on \
-               -Dgtnets_path=./gtnets_install \
-               -Denable_coverage=on \
-               -Denable_model-checking=on \
-               -Denable_compile_optimizations=off \
-               -Denable_auto_install=on \
-               -DCMAKE_INSTALL_PREFIX=./simgrid_install \
-               -Drelease=on \
-               -Denable_supernovae=off .
-               ctest -D ExperimentalStart
-               ctest -D ExperimentalConfigure
-               ctest -D ExperimentalBuild
-               ctest -D ExperimentalTest
-               ctest -D ExperimentalCoverage
-               ctest -D ExperimentalSubmit
-               make clean
-       fi
-fi
+#MC
+cmake \
+-Denable_latency_bound_tracking=on \
+-Denable_gtnets=on \
+-Dgtnets_path=./gtnets_install \
+-Denable_coverage=on \
+-Denable_model-checking=on \
+-Denable_compile_optimizations=off \
+-Denable_auto_install=on \
+-DCMAKE_INSTALL_PREFIX=./simgrid_install \
+-Drelease=on .
+ctest -D ExperimentalStart
+ctest -D ExperimentalConfigure
+ctest -D ExperimentalBuild
+ctest -D ExperimentalTest
+ctest -D ExperimentalCoverage
+ctest -D ExperimentalSubmit
+make clean
old mode 100644 (file)
new mode 100755 (executable)
index 15f870a..73a6f13
@@ -16,7 +16,14 @@ cd simgrid
 perl ./buildtools/pipol/cmake.pl
 perl ./buildtools/pipol/ruby.pl
 
-#supernovae
+if [ -e /usr/bin/gcc-4.6 ] ; then
+export CC=gcc-4.6
+export CXX=g++-4.6
+else
+export CC=gcc
+export CXX=g++
+fi
+
 cmake -Drelease=on .
 ctest -D ExperimentalStart
 ctest -D ExperimentalConfigure
@@ -26,10 +33,14 @@ ctest -D ExperimentalSubmit
 
 export SIMGRID_ROOT=`pwd`
 export LD_LIBRARY_PATH=`pwd`/lib
+export DYLD_LIBRARY_PATH=`pwd`/lib #for mac
 
 cd ../
-svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-java simgrid-java --quiet
+git clone git://scm.gforge.inria.fr/simgrid/simgrid-java.git simgrid-java --quiet
 cd simgrid-java
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:`pwd`/lib
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib #for mac
+
 cmake .
 ctest -D ExperimentalStart
 ctest -D ExperimentalConfigure
@@ -38,8 +49,9 @@ ctest -D ExperimentalTest
 ctest -D ExperimentalSubmit
 
 cd ../
-svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-ruby simgrid-ruby --quiet
+git clone git://scm.gforge.inria.fr/simgrid/simgrid-ruby.git simgrid-ruby --quiet
 cd simgrid-ruby
+
 cmake .
 ctest -D ExperimentalStart
 ctest -D ExperimentalConfigure
old mode 100644 (file)
new mode 100755 (executable)
index f6909a3..ffc42ba
@@ -16,12 +16,18 @@ cd simgrid
 perl ./buildtools/pipol/cmake.pl
 perl ./buildtools/pipol/ruby.pl
 
+if [ -e /usr/bin/gcc-4.6 ] ; then
+export CC=gcc-4.6
+export CXX=g++-4.6
+else
+export CC=gcc
+export CXX=g++
+fi
+
 #mem-check
 cmake \
 -Denable_lua=off \
 -Denable_tracing=off \
--Denable_smpi=off \
--Denable_supernovae=off \
 -Denable_compile_optimizations=off \
 -Denable_compile_warnings=on \
 -Denable_lib_static=off \
@@ -29,6 +35,7 @@ cmake \
 -Denable_latency_bound_tracking=off \
 -Denable_gtnets=off \
 -Denable_jedule=off \
+-Drelease=on \
 -Denable_memcheck=on ./
 ctest -D ExperimentalStart
 ctest -D ExperimentalConfigure
diff --git a/buildtools/pipol/Nightly_memCheck.sh b/buildtools/pipol/Nightly_memCheck.sh
new file mode 100755 (executable)
index 0000000..5efe385
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+#PIPOL esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 --user --silent
+
+if [ -e ./pipol ] ; then
+       rm -rf ./pipol/$PIPOL_HOST
+       mkdir ./pipol/$PIPOL_HOST
+else
+       mkdir ./pipol
+       rm -rf ./pipol/$PIPOL_HOST
+       mkdir ./pipol/$PIPOL_HOST
+fi
+cd ./pipol/$PIPOL_HOST
+
+git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid --quiet
+cd simgrid
+
+perl ./buildtools/pipol/cmake.pl
+perl ./buildtools/pipol/ruby.pl
+
+if [ -e /usr/bin/gcc-4.6 ] ; then
+export CC=gcc-4.6
+export CXX=g++-4.6
+else
+export CC=gcc
+export CXX=g++
+fi
+
+#mem-check
+cmake \
+-Denable_lua=off \
+-Denable_tracing=off \
+-Denable_smpi=off \
+-Denable_compile_optimizations=off \
+-Denable_compile_warnings=on \
+-Denable_lib_static=off \
+-Denable_model-checking=off \
+-Denable_latency_bound_tracking=off \
+-Denable_gtnets=off \
+-Denable_jedule=off \
+-Denable_memcheck=on ./
+ctest -D NightlyStart
+ctest -D NightlyConfigure
+ctest -D NightlyBuild
+ctest -D NightlyMemCheck
+ctest -D NightlySubmit
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 2bc4c3c..b9ead54
 
 #PRE-PIPOL /home/mescal/navarro/pre-simgrid.sh
 
+#___________________________________________________________________________________________________
+#Ubuntu 9.10________________________________________________________________________________________
 #PIPOL esn i386-linux-ubuntu-karmic.dd.gz none 02:00 --user --silent
 #PIPOL esn amd64-linux-ubuntu-karmic.dd.gz none 02:00 --user --silent
+
+#Ubuntu 10.04
 #PIPOL esn i386-linux-ubuntu-lucid.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-ubuntu-lucid.dd.gz none 02:00 --user --silent
+#PIPOL esn amd64-linux-ubuntu-lucid.dd.gz pipol8 05:00 --user --silent
+
+#Ubuntu 10.10
 #PIPOL esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 --user --silent
 
+#___________________________________________________________________________________________________
+#Fedora 12__________________________________________________________________________________________
 #PIPOL esn i386-linux-fedora-core12.dd.gz none 02:00 --user --silent
 #PIPOL esn amd64-linux-fedora-core12.dd.gz none 02:00 --user --silent
+
+#Fedora 13
 #PIPOL esn i386-linux-fedora-core13.dd.gz none 02:00 --user --silent
 #PIPOL esn amd64-linux-fedora-core13.dd.gz none 02:00 --user --silent
 
-#PIPOL esn i386_kvm-linux-debian-lenny none 02:00 --user --silent
-#PIPOL esn amd64_kvm-linux-debian-lenny none 02:00 --user --silent
-#PIPOL esn i386_kvm-linux-debian-testing none 02:00 --user --silent
-#PIPOL esn amd64_kvm-linux-debian-testing none 02:00 --user --silent
+#Fedora 14
+#PIPOL esn amd64_2010-linux-fedora-core14.dd.gz none 02:00 --user --silent
+#PIPOL esn i386_2010-linux-fedora-core14.dd.gz none 02:00 --user --silent
+
+#__________________________________________________________________________________________________
+#Debian Lenny 5.0___________________________________________________________________________________
+#PIPOL esn i386-linux-debian-lenny.dd.gz none 02:00 --user --silent
+#PIPOL esn amd64-linux-debian-lenny.dd.gz none 02:00 --user --silent
 
-#PIPOL  esn x86_64_mac-mac-osx-server-snow-leopard.dd.gz none 02:00 --user --silent
-#PIPOL  esn x86_mac-mac-osx-server-snow-leopard.dd.gz none 02:00 --user --silent
+#Debian Lenny 6.0
+#PIPOL esn amd64_2010-linux-debian-squeeze.dd.gz none 02:00 --user --silent
+#PIPOL esn i386_2010-linux-debian-squeeze-navarro-2011-10-03-171100.dd.gz none 02:00 --user --silent
 
-#PIPOL esn amd64-windows-server-2008-64bits.dd.gz none 02:00 --root
+#Debian Testing
+#PIPOL esn i386-linux-debian-testing none 02:00 --user --silent
+#PIPOL esn amd64-linux-debian-testing none 02:00 --user --silent
+
+#___________________________________________________________________________________________________
+#MacOS Snow Leopard 10.6____________________________________________________________________________
+#PIPOL esn x86_mac-mac-osx-server-snow-leopard-navarro-2011-09-22-113726.dd.gz none 02:00 --user --silent
+
+#___________________________________________________________________________________________________
+#windows-server-2008-64bits_________________________________________________________________________
+#PIPOL esn amd64-windows-server-2008-64bits.dd.gz none 02:00 --root --user --silent
 
 if [ -e ./pipol ] ; then
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
+        rm -rf ./pipol/$PIPOL_HOST
+        mkdir ./pipol/$PIPOL_HOST
 else
-       mkdir ./pipol
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
+        mkdir ./pipol
+        rm -rf ./pipol/$PIPOL_HOST
+        mkdir ./pipol/$PIPOL_HOST
 fi
 cd ./pipol/$PIPOL_HOST
 
 git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid --quiet
 cd simgrid
 
-if [ x$PIPOL_IMAGE == "xamd64-windows-server-2008-64bits.dd.gz" ] ; then
-
-       export PATH=/cygdrive/c/:/cygdrive/c/GnuWin32/bin/:/cygdrive/c/Windows/system32:/cygdrive/c/Windows
-       export PATH=$PATH:/cygdrive/c/CMake\ 2.8/bin/:/cygdrive/c/strawberry/c/bin:/cygdrive/c/strawberry/perl/site/bin:/cygdrive/c/strawberry/perl/bin
-
-       cmake \
-       -G"Unix Makefiles" \
-       -Denable_lua=off \
-       -Denable_tracing=off \
-       -Denable_smpi=off \
-       -Denable_supernovae=off \
-       -Denable_compile_optimizations=off \
-       -Denable_compile_warnings=off \
-       -Denable_lib_static=off \
-       -Denable_model-checking=off \
-       -Denable_latency_bound_tracking=off \
-       -Drelease=on \
-       -Denable_gtnets=off .
-       ctest -D NightlyStart
-       ctest -D NightlyConfigure
-       ctest -D NightlyBuild
-       ctest -D NightlySubmit
+perl ./buildtools/pipol/cmake.pl
+perl ./buildtools/pipol/ruby.pl
+
+if [ -e /usr/bin/gcc-4.6 ] ; then
+export CC=gcc-4.6
+export CXX=g++-4.6
 else
-       sh ./buildtools/pipol/install_gtnets.sh ./gtnets_install
-       SIMGRID_DIR=`pwd`
-       export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SIMGRID_DIR/gtnets_install/lib
-       perl ./buildtools/pipol/cmake.pl
-       perl ./buildtools/pipol/ruby.pl
-       
-       if [ x$PIPOL_IMAGE == "xamd64_2010-linux-ubuntu-maverick.dd.gz" ] ; then
-               #mem-check
-               cmake \
-               -Denable_lua=off \
-               -Denable_tracing=off \
-               -Denable_smpi=off \
-               -Denable_supernovae=off \
-               -Denable_compile_optimizations=off \
-               -Denable_compile_warnings=on \
-               -Denable_lib_static=off \
-               -Denable_model-checking=off \
-               -Denable_latency_bound_tracking=off \
-               -Denable_gtnets=off \
-               -Denable_jedule=off \
-               -Drelease=on \
-               -Denable_memcheck=on ./
-               ctest -D NightlyStart
-               ctest -D NightlyConfigure
-               ctest -D NightlyBuild
-               ctest -D NightlyMemCheck
-               ctest -D NightlySubmit
-       else
-               #supernovae
-               cmake \
-               -Denable_lua=on \
-               -Denable_tracing=on \
-               -Denable_smpi=on \
-               -Denable_supernovae=on \
-               -Denable_compile_optimizations=on \
-               -Denable_compile_warnings=on \
-               -Denable_lib_static=off \
-               -Denable_model-checking=off \
-               -Denable_latency_bound_tracking=off \
-               -Drelease=on \
-               -Denable_gtnets=off .
-               ctest -D NightlyStart
-               ctest -D NightlyConfigure
-               ctest -D NightlyBuild
-               ctest -D NightlyTest
-               ctest -D NightlySubmit
-               make clean
-               
-               #MC
-               cmake \
-               -Denable_latency_bound_tracking=on \
-               -Denable_gtnets=on \
-               -Dgtnets_path=./gtnets_install \
-               -Denable_coverage=on \
-               -Denable_model-checking=on \
-               -Denable_compile_optimizations=off \
-               -Denable_auto_install=on \
-               -DCMAKE_INSTALL_PREFIX=./simgrid_install \
-               -Drelease=on \
-               -Denable_supernovae=off .
-               ctest -D NightlyStart
-               ctest -D NightlyConfigure
-               ctest -D NightlyBuild
-               ctest -D NightlyTest
-               ctest -D NightlyCoverage
-               ctest -D NightlySubmit
-       fi
-       
-       export SIMGRID_ROOT=`pwd`
-       export LD_LIBRARY_PATH=`pwd`/lib
-       
-       cd ../
-       svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-java simgrid-java --quiet
-       cd simgrid-java
-       cmake .
-       ctest -D NightlyStart
-       ctest -D NightlyConfigure
-       ctest -D NightlyBuild
-       ctest -D NightlyTest
-       ctest -D NightlySubmit
-       
-       cd ../
-       svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/simgrid-ruby simgrid-ruby --quiet
-       cd simgrid-ruby
-       cmake .
-       ctest -D NightlyStart
-       ctest -D NightlyConfigure
-       ctest -D NightlyBuild
-       ctest -D NightlyTest
-       ctest -D NightlySubmit
-fi
\ No newline at end of file
+export CC=gcc
+export CXX=g++
+fi
+
+#DEFAULT CONF
+cmake -Drelease=on .
+ctest -D NightlyStart
+ctest -D NightlyConfigure
+ctest -D NightlyBuild
+ctest -D NightlyTest
+ctest -D NightlySubmit
+make clean
+
+#MC
+cmake \
+-Denable_coverage=on \
+-Denable_model-checking=on \
+-Denable_compile_optimizations=off \
+-Drelease=on .
+ctest -D NightlyStart
+ctest -D NightlyConfigure
+ctest -D NightlyBuild
+ctest -D NightlyTest
+ctest -D NightlyCoverage
+ctest -D NightlySubmit
+
+export SIMGRID_ROOT=`pwd`
+export LD_LIBRARY_PATH=`pwd`/lib
+export DYLD_LIBRARY_PATH=`pwd`/lib              
+cd ../
+git clone git://scm.gforge.inria.fr/simgrid/simgrid-java.git simgrid-java --quiet
+cd simgrid-java
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:`pwd`/lib
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib
+
+cmake .
+ctest -D NightlyStart
+ctest -D NightlyConfigure
+ctest -D NightlyBuild
+ctest -D NightlyTest
+ctest -D NightlySubmit
+
+cd ../
+git clone git://scm.gforge.inria.fr/simgrid/simgrid-ruby.git simgrid-ruby --quiet
+cd simgrid-ruby
+
+cmake .
+ctest -D NightlyStart
+ctest -D NightlyConfigure
+ctest -D NightlyBuild
+ctest -D NightlyTest
+ctest -D NightlySubmit
old mode 100644 (file)
new mode 100755 (executable)
index aea016b..8895ee5
@@ -10,7 +10,7 @@ ssh pipol pipol-sub esn i386-linux-ubuntu-lucid.dd.gz none 02:00 "~/Experimental
 ssh pipol pipol-sub esn amd64-linux-ubuntu-lucid.dd.gz none 02:00 "~/Experimental_bindings.sh"
 
 #Ubuntu 10.10
-#ssh pipol pipol-sub esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 "~/Experimental_bindings.sh"        # PASSE PAS
+ssh pipol pipol-sub esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 "~/Experimental_bindings.sh"
 
 #___________________________________________________________________________________________________
 #Fedora 12__________________________________________________________________________________________
@@ -21,19 +21,27 @@ ssh pipol pipol-sub esn amd64-linux-fedora-core12.dd.gz none 02:00 "~/Experiment
 ssh pipol pipol-sub esn i386-linux-fedora-core13.dd.gz none 02:00 "~/Experimental_bindings.sh"
 ssh pipol pipol-sub esn amd64-linux-fedora-core13.dd.gz none 02:00 "~/Experimental_bindings.sh"
 
+#Fedora 14
+ssh pipol pipol-sub esn amd64_2010-linux-fedora-core14.dd.gz none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn i386_2010-linux-fedora-core14.dd.gz none 02:00 "~/Experimental_bindings.sh"
+
 #___________________________________________________________________________________________________
 #Debian Lenny 5.0___________________________________________________________________________________
-ssh pipol pipol-sub esn i386_kvm-linux-debian-lenny none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64_kvm-linux-debian-lenny none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn i386-linux-debian-lenny.dd.gz none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn amd64-linux-debian-lenny.dd.gz none 02:00 "~/Experimental_bindings.sh"
+
+#Debian Lenny 6.0
+ssh pipol pipol-sub esn amd64_2010-linux-debian-squeeze.dd.gz none 02:00 "~/Experimental_bindings.sh"
+#ssh pipol pipol-sub esn i386_2010-linux-debian-squeeze.dd.gz none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn i386_2010-linux-debian-squeeze-navarro-2011-10-03-171100.dd.gz none 02:00 "~/Experimental_bindings.sh"
 
 #Debian Testing
-ssh pipol pipol-sub esn i386_kvm-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64_kvm-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn i386-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn amd64-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
 
 #___________________________________________________________________________________________________
 #MacOS Snow Leopard 10.6____________________________________________________________________________
-#ssh pipol pipol-sub esn x86_64_mac-mac-osx-server-snow-leopard.dd.gz none 02:00 "~/Experimental_bindings.sh" # PASSE PAS
-ssh pipol pipol-sub esn x86_mac-mac-osx-server-snow-leopard-navarro-2011-06-22-203726.dd.gz none 02:00 "~/Experimental_bindings.sh"
+ssh pipol pipol-sub esn x86_mac-mac-osx-server-snow-leopard-navarro-2011-09-22-113726.dd.gz none 02:00 "~/Experimental_bindings.sh"
 
 #___________________________________________________________________________________________________
 #windows-server-2008-64bits_________________________________________________________________________
index 9065a17..7d6668e 100644 (file)
@@ -1,22 +1,16 @@
 #!/bin/bash
 
-sudo apt-get update
-
-sudo apt-get -y -qq install subversion
-sudo apt-get -y -qq install gcc
-sudo apt-get -y -qq install g++
-sudo apt-get -y -qq install make
-sudo apt-get -y -qq install openjdk-6-jdk
-sudo apt-get -y -qq install liblua5.1-dev lua5.1
-sudo apt-get -y -qq install unzip
-sudo apt-get -y -qq install cmake
-sudo apt-get -y -qq install wget
-sudo apt-get -y -qq install perl
-sudo apt-get -y -qq install graphviz-dev graphviz
-sudo apt-get -y -qq install libpcre3-dev
-sudo apt-get -y -qq install f2c
-sudo apt-get -y -qq install valgrind
-sudo apt-get -y -qq install git-core
+sudo aptitude update
+sudo aptitude -y install make
+sudo aptitude -y install git
+sudo aptitude -y install git-core
+sudo aptitude -y install openjdk-6-jdk
+sudo aptitude -y install valgrind
+sudo aptitude -y install f2c
+sudo aptitude -y install gcc-4.6
+sudo aptitude -y install g++-4.6
+sudo aptitude -y install libpcre3-dev
+sudo aptitude -y install cmake
 
 which_svn=`which svn`          #svn necessary
 which_gcc=`which gcc`          #gcc gcc necessary
index 292b93d..31d923f 100644 (file)
@@ -2,7 +2,6 @@
 
 sudo yum -y -q update
 
-sudo yum -y -q install subversion
 sudo yum -y -q install gcc
 sudo yum -y -q install make
 sudo yum -y -q install java-1.6.0-openjdk
@@ -15,6 +14,7 @@ sudo yum -y -q install graphviz-dev graphviz
 sudo yum -y -q install f2c
 sudo yum -y -q install pcre-devel pcre-static
 sudo yum -y -q install git-core
+sudo yum -y -q install ruby ruby-devel
 
 which_svn=`which svn`          #svn necessary
 which_gcc=`which gcc`          #gcc gcc necessary
@@ -45,11 +45,4 @@ echo $which_perl
 echo $which_f2c
 echo $which_gcov
 echo $which_git
-echo "FIN------------------------------------"
-
-wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.1-p378.tar.gz
-tar zxvf ruby-1.9.1-p378.tar.gz
-cd ./ruby-1.9.1-p378
-./configure -prefix=/usr
-make
-sudo make install
\ No newline at end of file
+echo "FIN------------------------------------"
\ No newline at end of file
index 35e1222..c14e3ea 100644 (file)
@@ -1,19 +1,17 @@
 #!/bin/bash
 
-sudo fink -y -q -b selfupdate
-sudo fink -y -q -b selfupdate-rsync
+#sudo port install wget
+#sudo port install pcre
+#sudo port install gcc46
+#sudo port install graphviz-devel
+#sudo port install lua
+#sudo port select bf2c
 
-sudo fink -y -q -b install make
-sudo fink -y -q -b install lua51-dev lua51
-sudo fink -y -q -b install unzip
-sudo fink -y -q -b install cmake
-sudo fink -y -q -b install wget
-sudo fink -y -q -b install perl
-sudo fink -y -q -b install gd2 graphviz graphviz-dev
-sudo fink -y -q -b install pcre
-sudo fink -y -q -b install f2c
-sudo fink -y -q -b install git
-sudo fink -y -q -b install gcc45
+sudo port install ruby19
+sudo ln -sf /opt/local/lib/libruby.1.9.1.dylib /usr/lib/libruby.dylib
+sudo ln -sf /opt/local/bin/ruby1.9 /usr/bin/ruby
+
+#sudo port select gcc mp-gcc46
 
 which_gcc=`which gcc`          #gcc gcc necessary
 which_gpp=`which g++`          #gcc g++ necessary
index 9065a17..c5bf5ce 100644 (file)
@@ -2,7 +2,6 @@
 
 sudo apt-get update
 
-sudo apt-get -y -qq install subversion
 sudo apt-get -y -qq install gcc
 sudo apt-get -y -qq install g++
 sudo apt-get -y -qq install make
diff --git a/doc/.gitignore b/doc/.gitignore
deleted file mode 100644 (file)
index 2eca0a3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Doxyfile
-.FAQ.doc.toc
-.contrib.doc.toc
-.gtut-introduction.doc.toc
-.history.doc.toc
-.index.doc.toc
-html
-index-API.doc
-index.php
-logcategories.doc
-simgrid.tag
-simgrid_modules.map
-simgrid_modules.png
-simgrid_modules2.png
index ee1b029..c1dd9e6 100644 (file)
@@ -34,13 +34,13 @@ PROJECT_NAME           = SimGrid
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         =
+PROJECT_NUMBER         = @release_version@
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer
 # a quick idea about the purpose of the project. Keep the description short.
 
-PROJECT_BRIEF          =
+PROJECT_BRIEF          = "<i>Scalable simulation of distributed systems</i>"
 
 # With the PROJECT_LOGO tag one can specify an logo or icon that is
 # included in the documentation. The maximum height of the logo should not
@@ -284,7 +284,7 @@ SUBGROUPING            = YES
 # @ingroup) instead of on a separate page (for HTML and Man pages) or
 # section (for LaTeX and RTF).
 
-INLINE_GROUPED_CLASSES = NO
+#INLINE_GROUPED_CLASSES = NO
 
 # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
 # is documented as struct, union, or enum with the name of the typedef. So
@@ -614,11 +614,12 @@ WARN_LOGFILE           =
 # with spaces.
 
 INPUT                  = index.doc \
-                         FAQ.doc \
-                         contrib.doc \
-                         publis.doc \
-                         people.doc \
-                         history.doc \
+                                                installSimgrid.doc \
+                         bindings.doc \
+                         options.doc \
+                         tracing.doc \
+                         use.doc \
+                         pls.doc \
                          ./index-API.doc \
                          modules.doc \
                          module-xbt.doc \
@@ -923,7 +924,7 @@ HTML_STYLESHEET        =
 # files. In the HTML_STYLESHEET file, use the file name only. Also note that
 # the files will be copied as-is; there are no commands or markers available.
 
-HTML_EXTRA_FILES       =
+#HTML_EXTRA_FILES       =
 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
 # Doxygen will adjust the colors in the stylesheet and background images
@@ -1223,7 +1224,7 @@ SERVER_BASED_SEARCH    = NO
 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
-GENERATE_LATEX         = NO
+GENERATE_LATEX         = YES
 
 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1274,20 +1275,20 @@ LATEX_HEADER           =
 # the last chapter. If it is left blank doxygen will generate a
 # standard footer. Notice: only use this tag if you know what you are doing!
 
-LATEX_FOOTER           =
+#LATEX_FOOTER           =
 
 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
 # is prepared for conversion to pdf (using ps2pdf). The pdf file will
 # contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
-PDF_HYPERLINKS         = NO
+PDF_HYPERLINKS         = YES
 
 # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
 # plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
-USE_PDFLATEX           = NO
+USE_PDFLATEX           = YES
 
 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
 # command to the generated LaTeX files. This will instruct LaTeX to keep
diff --git a/doc/FAQ.doc b/doc/FAQ.doc
deleted file mode 100644 (file)
index f0889d3..0000000
+++ /dev/null
@@ -1,2856 +0,0 @@
-/*! \page faq Frequently Asked Questions
-
-\htmlinclude .FAQ.doc.toc
-
-\section faq_simgrid I'm new to SimGrid. I have some questions. Where should I start?
-
-You are at the right  place... Having a look to these
-<a href="http://www.loria.fr/~quinson/blog/2010/06/28/Tutorial_at_HPCS/">the slides of the HPCS'10 tutorial</a>
-(or to these <a href="http://graal.ens-lyon.fr/~alegrand/articles/slides_g5k_simul.pdf">ancient
-slides</a>, or to these
-<a href="http://graal.ens-lyon.fr/~alegrand/articles/Simgrid-Introduction.pdf">"obsolete" slides</a>)
-may give you some insights on what SimGrid can help you to do and what
-are its limitations. Then you definitely should read the \ref
-MSG_examples. The \ref GRAS_tut can also help you.
-
-If you are stuck at any point and if this FAQ cannot help you, please drop us a
-mail to the user mailing list: <simgrid-user@lists.gforge.inria.fr>.
-
-\subsection faq_interfaces What is the difference between MSG, SimDag, and GRAS? Do they serve the same purpose?
-
-It depend on how you define "purpose", I guess ;)
-
-They all allow you to build a prototype of application which you can run
-within the simulator afterward. They all share the same simulation kernel,
-which is the core of the SimGrid project. They differ by the way you express
-your application.
-
-With SimDag, you express your code as a collection of interdependent
-parallel tasks. So, in this model, applications can be seen as a DAG of
-tasks. This is the interface of choice for people wanting to port old
-code designed for SimGrid v1 or v2 to the framework current version.
-
-With both GRAS and MSG, your application is seen as a set of communicating
-processes, exchanging data by the way of messages and performing computation
-on their own.
-
-The difference between both is that MSG is somehow easier to use, but GRAS
-is not limited to the simulator. Once you're done writing your GRAS code,
-you can run your code both in the simulator or on a real platform. For this,
-there is two implementations of the GRAS interface, one for simulation, one
-for real execution. So, you just have to relink your code to chose one of
-both world. 
-
-\subsection faq_generic First steps with SimGrid
-
-If you decide to go for the MSG interface, please read carefully the
-\ref MSG_examples. You'll find in \ref MSG_ex_master_slave a very
-simple consisting of a master (that owns a bunch of tasks and
-distributes them) , some slaves (that process tasks whenever they
-receive one) and some forwarder agents (that simply pass the tasks
-they receive to some slaves).
-
-If you decide to go for the GRAS interface, you should definitively
-read the \ref GRAS_tut. The first section constitutes an introduction
-to the tool and presents the model we use. The second section
-constitutes a complete step-by-step tutorial building a distributed
-application from the beginning and exemplifying most of the GRAS
-features in the process. The last section groups some HOWTOS
-highlighting a given feature of the framework in a more concise way.
-
-If you decide to go for another interface, I'm afraid your only sources
-of information will be the source code and the mailing lists...
-
-\subsection faq_visualization Visualizing and analyzing the results
-
-It is sometime convenient to "see" how the agents are behaving. If you
-like colors, you can use <tt>tools/MSG_visualization/colorize.pl </tt>
-as a filter to your MSG outputs. It works directly with INFO. Beware,
-INFO() prints on stderr. Do not forget to redirect if you want to
-filter (e.g. with bash): 
-\verbatim 
-./msg_test small_platform.xml small_deployment.xml 2>&1 | ../../tools/MSG_visualization/colorize.pl
-\endverbatim
-
-We also have a more graphical output. Have a look at section \ref faq_tracing.
-
-\subsection faq_C Argh! Do I really have to code in C?
-
-Up until now, there is no binding for other languages. If you use C++,
-you should be able to use the SimGrid library as a standard C library
-and everything should work fine (simply <i>link</i> against this
-library; recompiling SimGrid with a C++ compiler won't work and it
-wouldn't help if you could).
-
-In fact, we are currently working on Java bindings of MSG to allow
-all the undergrad students of the world to use this tool. This is a
-little more tricky than I would have expected, but the work is moving
-fast forward [2006/05/13]. More languages are evaluated, but for now,
-we do not feel a real demand for any other language. Please speak up!
-
-\section faq_cmake Installing the SimGrid library with Cmake (since V3.4)
-
-\subsection faq_intro Some generalitty
-
-\subsubsection faq_intro1 What is Cmake?
-
-CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. For more information see official web site <a href="http://www.cmake.org/">here</a>.
-
-\subsubsection faq_intro2 Why cmake?
-
-CMake permits to developers to compil projects on different plateforms. Then many tools are embedded like ctest for making test, a link to cdash for vizualise results but also test coverage and bug reports. 
-
-\subsubsection faq_intro3 What cmake need?
-
-CMake needs some prerequists like :
-
-For Unix and MacOS:
-  \li make
-  \li perl and libpcre
-  \li c, c++ and java compiler regards to developers
-  \li ccmake for graphical used of CMake
-  \li cmake <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
-
-For Windows :
-  \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
-  \li perl strawberry <a href="http://www.strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0.msi">(download page)</a>
-  \li pcre-7.0 <a href="http://sourceforge.net/projects/gnuwin32/files/pcre/7.0/pcre-7.0.exe/download">(download page)</a>
-  \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
-  
-\subsubsection faq_cmakeoption1 Liste of options
-
-\verbatim
-"cmake -D[name]=[value] ... ./"
-
-[name]         enable_gtnets           [value] ON/OFF or TRUE/FALSE or 1/0
-       enable_lua                      ON/OFF or TRUE/FALSE or 1/0
-       enable_compile_optimizations    ON/OFF or TRUE/FALSE or 1/0
-       enable_compile_warnings         ON/OFF or TRUE/FALSE or 1/0
-       enable_smpi                     ON/OFF or TRUE/FALSE or 1/0
-       enable_maintainer_mode          ON/OFF or TRUE/FALSE or 1/0
-       enable_supernovae               ON/OFF or TRUE/FALSE or 1/0
-       enable_tracing                  ON/OFF or TRUE/FALSE or 1/0
-       enable_coverage                 ON/OFF or TRUE/FALSE or 1/0
-       enable_memcheck                 ON/OFF or TRUE/FALSE or 1/0
-       enable_model-checking           ON/OFF or TRUE/FALSE or 1/0
-       enable_debug                    ON/OFF or TRUE/FALSE or 1/0
-       enable_jedule                   ON/OFF or TRUE/FALSE or 1/0
-       enable_latency_bound_tracking   ON/OFF or TRUE/FALSE or 1/0
-       enable_lib_static               ON/OFF or TRUE/FALSE or 1/0
-       enable_pcre                     ON/OFF or TRUE/FALSE or 1/0
-       custom_flags                    <flags>
-       gtnets_path                     <path_to_gtnets_directory>
-       CMAKE_INSTALL_PREFIX            <path_to_install_directory>
-       pipol_user                      <pipol_username>
-\endverbatim
-                                                                                                                                                          
-\subsubsection faq_cmakeoption2 Options explaination
-
-  \li enable_gtnets : set to true implie that user wants to use gtnets.
-
-  \li enable_lua : set to true implie that user wants to add lua langage into simgrid compilation.
-
-  \li enable_compile_optimizations : add flags "-O3 -finline-functions -funroll-loops -fno-strict-aliasing"
-
-  \li enable_compile_warnings : add flags "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror"
-
-  \li enable_smpi : Set to true if you want to use smpi lib. Actually on simgrid v3.4.1 Mac doesn't support lib smpi.
-
-  \li enable_maintainer_mode : set to true it remakes some files. 
-
-  \li enable_supernovae : set to true make one file for each lib and compile with those generated files.
-
-  \li enable_tracing : To enable the generation of simulation traces for visualization.
-
-  \li enable_coverage : When set to true this option enable code coverage by setting -fprofile-arcs -ftest-coverage flags.
-
-  \li enable_memcheck : When set to true this option enable tests for memcheck.
-
-  \li enable_model-checking : Enable the model checking when set to true.
-
-  \li enable_debug : If enable_debug is set to 'off' Simgrid compil flag has '-DNDEBUG' option.
-  
-  \li enable_jedule : To enable jedule mode, which creates visualizations of task schedules with Simdag. 
-  
-  \li enable_latency_bound_tracking : Set to on if you want to be warned when communications are limited by round trip time.
-  
-  \li enable_lib_static : Enable generated Simgrid and smpi static libraries.
-  
-  \li enable_pcre : Use or not the pcre lib for memory optimization.   
-  
-  \li custom_flags : If user wants to use a specific flag during compilation, give here.
-
-  \li gtnets_path : Path to gtnets install directory (ex /usr)
-
-  \li CMAKE_INSTALL_PREFIX : Path where are installed lib/ doc/ and include/ directories (ex /usr/local)
-  
-  \li pipol_user : specify your pipol username if you want to use the pipol-remote command.
-
-\subsubsection faq_cmakeoption3 Initialisation
-
-Those options are initialized the first time you launch "cmake ." whithout specified option.
-
-\verbatim
-enable_gtnets                  on
-enable_lua                     on
-enable_smpi                    on
-enable_supernovae              on
-enable_tracing                 on
-enable_compile_optimizations   on
-enable_debug                   on
-enable_pcre                    on
-enable_compile_warnings                off
-enable_maintainer_mode         off
-enable_coverage                off
-enable_memcheck                off
-enable_model-checking          off
-enable_jedule                  off
-enable_latency_bound_tracking  off 
-enable_lib_static              off
-CMAKE_INSTALL_PREFIX           /usr/local
-custom_flags                   null
-gtnets_path                    null
-pipol_user                     null
-\endverbatim
-
-\subsubsection faq_cmakeoption4 Option's cache and how to reset?
-
-When options have been set they are keep into a cache file named "CMakeCache.txt". So if you want 
-reset values you just delete this file located to the project directory.
-
-\subsection faq_cmakecompilation Cmake compilation
-
-\subsubsection faq_cmakecompilation1 With command line.
-
-\verbatim
-cmake -D[name]=[value] ... ./
-make
-\endverbatim
-
-On Windows
-
-Open the "Git Bash" window.
-\verbatim
-cmake -G"Unix Makefiles" -D[name]=[value] ... ./
-gmake
-\endverbatim
-
-\subsubsection faq_cmakecompilation2 With ccmake tool.
-
-\verbatim
-"ccmake ./"
-\endverbatim
-Then follow instructions.
-
-\subsubsection faq_cmakecompilation2bis Build out of source.
-
-As cmake generate many files used for compilation, we recommand to make a build directory.
-For examples you can make :
-
-\verbatim
-"navarrop@caraja:~/Developments$ cd simgrid/"
-"navarrop@caraja:~/Developments/simgrid$ mkdir build_directory"
-"navarrop@caraja:~/Developments/simgrid$ cd build_directory/"
-"navarrop@caraja:~/Developments/simgrid/build_directory$ cmake ../"
-"navarrop@caraja:~/Developments/simgrid/build_directory$ make"
-\endverbatim
-
-Or complety out of sources :
-
-\verbatim
-"navarrop@caraja:~/Developments$ mkdir build_dir"
-"navarrop@caraja:~/Developments$ cd build_dir/"
-"navarrop@caraja:~/Developments/build_dir$ cmake ../simgrid/"
-"navarrop@caraja:~/Developments/build_dir$ make"
-\endverbatim
-
-Those two kind of compilation permit to delete files created by compilation easier.
-
-\subsubsection faq_cmakecompilation3 Resume of command line
-
- \li CMake
-\verbatim
-cmake <path>                   configure the project
-make                           build all targets
-make VERBOSE=1                 build all targets and print build command lines
-make check                     test all targets and summarize
-make dist                      make the distrib
-make distcheck                 check the dist (make + make dist + make check) 
-make install                   install the project (doc/ bin/ lib/ include/)
-make uninstall                 uninstall the project (doc/ bin/ lib/ include/)
-make clean                     clean all targets
-make simgrid_documentation     Create simgrid documentation
-\endverbatim
-
-When the project have been succesfully compiling and build you can make tests.
-
- \li CTest
-\verbatim
-ctest                  launch only tests
-ctest -D Continuous
-ctest -D Continuous(Start|Update|Configure|Build)
-ctest -D Continuous(Test|Coverage|MemCheck|Submit)
-ctest -D Experimental
-ctest -D Experimental(Start|Update|Configure|Build)
-ctest -D Experimental(Test|Coverage|MemCheck|Submit)
-ctest -D Nightly                               
-ctest -D Nightly(Start|Update|Configure|Build)
-ctest -D Nightly(Test|Coverage|MemCheck|Submit)
-ctest -D NightlyMemoryCheck
-\endverbatim
-
-If you want to test before make a commit you can simply make "ctest -D Experimental" and then you can visualize results submitted into Cdash. <a href="http://cdash.inria.fr/CDash/index.php?project=Simgrid">(Go to Cdash site)</a>.
-
-\subsection faq_cmakeinstall How to install with cmake?
-
-\subsubsection faq_cmakeinstall1 From svn. 
-
-For Unix and MacOS:
-\verbatim
-cmake -Denable_maintainer_mode=on -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
-make 
-make install
-\endverbatim
-
-For Windows:
-
-\verbatim
-cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=C:\simgrid_install ./
-gmake
-gmake install
-\endverbatim
-
-\subsubsection faq_cmakeinstall2 From a distrib
-
-\verbatim
-For version 3.4.1 and 3.4
-       cmake -Dprefix=/home/navarrop/Bureau/install_simgrid ./
-       make
-       make install-simgrid
-Since version 3.5
-       cmake -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
-       make
-       make install
-\endverbatim
-
-\subsection faq_cmakeWHATisInstall What is installed by cmake?
-
-\subsubsection faq_cmakeWHATisInstallBIN CMAKE_INSTALL_PREFIX/bin
-\verbatim
-tesh
-graphicator
-gras_stub_generator
-simgrid_update_xml
-simgrid-colorizer
-smpicc
-smpiff
-smpif2c
-smpirun
-\endverbatim
-\subsubsection faq_cmakeWHATisInstallDOC CMAKE_INSTALL_PREFIX/doc 
-\verbatim
-simgrid/examples/
-simgrid/html/
-\endverbatim
-\subsubsection faq_cmakeWHATisInstallINCLUDE CMAKE_INSTALL_PREFIX/include
-\verbatim
-amok/
-gras/
-instr/
-mc/
-msg/
-simdag/
-simix/
-smpi/
-surf/
-xbt/
-gras.h
-simgrid_config.h
-xbt.h
-\endverbatim
-\subsubsection faq_cmakeWHATisInstallLIB CMAKE_INSTALL_PREFIX/lib
-\verbatim
-libgras.so.3.5
-libsimgrid.so.3.5
-libsmpi.so.3.5
-libsimgrid.so -> libsimgrid.so.3.5
-libgras.so -> libgras.so.3.5
-libsmpi.so -> libsmpi.so.3.5
-lua/5.1/simgrid.so -> ../../libsimgrid.so
-ruby/1.9.0/x86_64-linux/libsimgrid.so -> ../../../libsimgrid.so
-ruby/1.9.0/x86_64-linux/simgrid.rb
-\endverbatim
-\subsection faq_cmakehowto How to modified sources files for developers
-
-\subsubsection faq_cmakehowto1 Add an executable or examples.
-
-If you want make an executable you have to create a CMakeList.txt to the src directory. 
-You must specified where to create the executable, source list, dependencies and the name of the binary.
-
-\verbatim
-cmake_minimum_required(VERSION 2.6)
-
-set(EXECUTABLE_OUTPUT_PATH "./")                       
-set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
-
-add_executable(get_sender get_sender.c)                                        #add_executable(<name_of_target> <src list>)
-
-### Add definitions for compile
-target_link_libraries(get_sender simgrid m pthread)    #target_link_libraries(<name_of_targe> <dependencies>)
-\endverbatim
-
-Then you have to modified <project/directory>/buildtools/Cmake/MakeExeLib.cmake and add 
-this line :
-\verbatim
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
-\endverbatim
-
-\subsubsection faq_cmakehowto2 Delete/add sources to lib.
-
-If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake
-
-\verbatim
-set(JMSG_JAVA_SRC
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgException.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/JniException.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/NativeException.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/HostNotFoundException.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ProcessNotFoundException.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Msg.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Process.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Host.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Task.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgNative.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ApplicationHandler.java
-       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Sem.java
-)
-\endverbatim
-
-\subsubsection faq_cmakehowto3 Add test
-
-If you want modified, add or delete tests you have to edit <project/directory>/buildtools/Cmake/AddTests.cmake 
-with this function : ADD_TEST(<name> <bin> <ARGS>)
-
-\verbatim
-add_test(test-simdag-1 ${CMAKE_HOME_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${CMAKE_HOME_DIRECTORY}/testsuite/simdag small_platform_variable.xml)
-\endverbatim
-
-\subsection faq_PIPOL Pipol-remote
-
-Now we offer the possibility to test your local sources on pipol platforms before a commit. Of course you have to be user of pipol <a href="https://pipol.inria.fr/users/">(Account request)</a> cause you need to give your pipol_username to cmake. Here is a list of available systems :
-\verbatim
-    amd64_kvm-linux-debian-lenny
-    amd64_kvm-linux-debian-testing
-    amd64_kvm-windows-7
-    amd64-linux-centos-5.dd.gz
-    amd64-linux-debian-etch.dd.gz
-    amd64-linux-debian-lenny.dd.gz
-    amd64-linux-debian-testing.dd.gz
-    amd64-linux-fedora-core10.dd.gz
-    amd64-linux-fedora-core11.dd.gz
-    amd64-linux-fedora-core12.dd.gz
-    amd64-linux-fedora-core13.dd.gz
-    amd64-linux-fedora-core7.dd.gz
-    amd64-linux-fedora-core8.dd.gz
-    amd64-linux-fedora-core9.dd.gz
-    amd64-linux-mandriva-2007_springs_powerpack.dd.gz
-    amd64-linux-mandriva-2009_powerpack.dd.gz
-    amd64-linux-opensuse-11.dd.gz
-    amd64-linux-redhatEL-5.0.dd.gz
-    amd64-linux-suse-LES10.dd.gz
-    amd64-linux-ubuntu-feisty.dd.gz
-    amd64-linux-ubuntu-hardy.dd.gz
-    amd64-linux-ubuntu-intrepid.dd.gz
-    amd64-linux-ubuntu-jaunty.dd.gz
-    amd64-linux-ubuntu-karmic.dd.gz
-    amd64-linux-ubuntu-lucid.dd.gz
-    amd64-unix-freebsd-7.dd.gz
-    amd64-windows-server-2003-64bits.dd.gz
-    amd64-windows-server-2008-64bits.dd.gz
-    i386_kvm-linux-debian-lenny
-    i386_kvm-linux-debian-testing
-    i386_kvm-linux-fedora-core13
-    i386_kvm-windows-xp-pro-sp3
-    i386-linux-centos-5.dd.gz
-    i386-linux-debian-etch.dd.gz
-    i386-linux-debian-lenny.dd.gz
-    i386-linux-debian-testing.dd.gz
-    i386-linux-fedora-core10.dd.gz
-    i386-linux-fedora-core11.dd.gz
-    i386-linux-fedora-core12.dd.gz
-    i386-linux-fedora-core13.dd.gz
-    i386-linux-fedora-core7.dd.gz
-    i386-linux-fedora-core8.dd.gz
-    i386-linux-fedora-core9.dd.gz
-    i386-linux-mandriva-2007_springs_powerpack.dd.gz
-    i386-linux-mandriva-2009_powerpack.dd.gz
-    i386-linux-opensuse-11.dd.gz
-    i386-linux-redhatEL-5.0.dd.gz
-    i386-linux-suse-LES10.dd.gz
-    i386-linux-ubuntu-feisty.dd.gz
-    i386-linux-ubuntu-hardy.dd.gz
-    i386-linux-ubuntu-intrepid.dd.gz
-    i386-linux-ubuntu-jaunty.dd.gz
-    i386-linux-ubuntu-karmic.dd.gz
-    i386-linux-ubuntu-lucid.dd.gz
-    i386_mac-mac-osx-server-leopard.dd.gz
-    i386-unix-freebsd-7.dd.gz
-    i386-unix-opensolaris-10.dd.gz
-    i386-unix-opensolaris-11.dd.gz
-    i386-unix-solaris-10.dd.gz
-    ia64-linux-debian-lenny.dd
-    ia64-linux-fedora-core9.dd
-    ia64-linux-redhatEL-5.0.dd
-    x86_64_mac-mac-osx-server-snow-leopard.dd.gz
-    x86_mac-mac-osx-server-snow-leopard.dd.gz
-\endverbatim
-
-Two kind of uses are possible : 
-\verbatim
-This command copy your source and execute a configure then a build and finish with tests.
-       bob@caraja:~/Developments/simgrid/tmp_build$ make <name_of_image> 
-
-This command copy your source and execute a \"ctest -D Experimental\" and submit the result to cdash.
-       bob@caraja:~/Developments/simgrid/tmp_build$ make <name_of_image>_experimental 
-\endverbatim   
-All commands are resumed with :
-\verbatim
-bob@caraja:~/Developments/simgrid/tmp_build$ make pipol_experimental_list_images
-bob@caraja:~/Developments/simgrid/tmp_build$ make pipol_test_list_images
-\endverbatim
-
-\section faq_installation Installing the SimGrid library with Autotools (valid until V3.3.4)
-
-Many people have been asking me questions on how to use SimGrid. Quite
-often, the questions were not really about SimGrid but on the
-installation process. This section is intended to help people that are
-not familiar with compiling C files under UNIX. If you follow these
-instructions and still have some troubles, drop an e-mail to
-<simgrid-user@lists.gforge.inria.fr>.
-
-\subsection faq_compiling Compiling SimGrid from a stable archive
-
-First of all, you need to download the latest version of SimGrid from 
-<a href="http://gforge.inria.fr/frs/?group_id=12">here</a>.
-Suppose you have uncompressed SimGrid in some temporary location of
-your home directory (say <tt>/home/joe/tmp/simgrid-3.0.1 </tt>). The
-simplest way to use SimGrid is to install it in your home
-directory. Change your directory to
-<tt>/home/joe/tmp/simgrid-3.0.1</tt> and type
-
-\verbatim
-./configure --prefix=$HOME
-make
-make install
-\endverbatim
-
-If at some point, something fails, check the section \ref faq_trouble_compil .
-If it does not help, you can report this problem to the
-list but, please, avoid sending a laconic mail like "There is a problem. Is it
-okay?". Send the config.log file which is automatically generated by
-configure. Try to capture both the standard output and the error output of the
-<tt>make</tt> command with <tt>script</tt>. There is no way for us to help you
-without the relevant bits of information.
-
-Now, the following directory should have been created : 
-
-      \li <tt>/home/joe/doc/simgrid/html/</tt>
-      \li <tt>/home/joe/lib/</tt>
-      \li <tt>/home/joe/include/</tt>
-
-SimGrid is not a binary, it is a library. Both a static and a dynamic
-version are available. Here is what you can find if you try a <tt>ls
-/home/joe/lib</tt>:
-
-\verbatim libsimgrid.a libsimgrid.la libsimgrid.so libsimgrid.so.0 libsimgrid.so.0.0.1
-\endverbatim
-
-Thus, there is two ways to link your program with SimGrid:
-      \li Either you use the static version, e.g 
-\verbatim gcc libsimgrid.a -o MainProgram MainProgram.c
-\endverbatim
-          In this case, all the SimGrid functions are directly
-          included in <tt>MainProgram</tt> (hence a bigger binary).
-      \li Either you use the dynamic version (the preferred method)
-\verbatim gcc -lsimgrid -o MainProgram MainProgram.c
-\endverbatim
-          In this case, the SimGrid functions are not included in
-          <tt>MainProgram</tt> and you need to set your environment
-          variable in such a way that <tt>libsimgrid.so</tt> will be
-          found at runtime. This can be done by adding the following
-          line in your .bashrc (if you use bash and if you have
-          installed the SimGrid libraries in your home directory):
-\verbatim export LD_LIBRARY_PATH=$HOME/lib/:$LD_LIBRARY_PATH
-\endverbatim
-
-\subsection faq_compiling_java Java bindings don't get compiled
-
-The configure script detects automatically whether you have the
-softwares needed to use the Java bindings or not. At the end of the
-configure, you can see the configuration picked by the script, which
-should look similar to 
-\verbatim Configuration of package simgrid' (version 3.3.4-svn) on
-little64 (=4):
-
-        Compiler:       gcc (version: )
-        
-        CFlags:          -O3 -finline-functions -funroll-loops -fno-strict-aliasing -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror -g3
-        CPPFlags:   
-         LDFlags:       
-                                  
-         Context backend: ucontext
-         Compile Java: no
-                                                        
-         Maintainer mode: no
-         Supernovae mode: yes
-\endverbatim      
-
-In this example, Java backends won't be compiled. 
-
-On Debian-like systems (which includes ubuntu), you need the following
-packages: sun-java6-jdk libgcj10-dev. If you cannot find the
-libgcj10-dev, try another version, like libgcj9-dev (on Ubuntu before
-9.10) or libgcj11-dev (not released yet, but certainly one day).
-Please note that you need to activate the contrib and non-free
-repositories in Debian, and the universe ones in Ubuntu. Java comes at
-this price...
-
-\subsection faq_compiling_snapshoot SimGrid development snapshots
-
-We have very high standards on software quality, and we are reluctant releasing
-a stable release as long as there is still some known bug in the code base. In
-addition, we added quite an extensive test base, making sure that we correctly
-test the most important parts of the tool. 
-
-As an unfortunate conclusion, there may be some time between the stable
-releases. If you want to benefit from the most recent features we introduced,
-but don't want to take the risk of an untested version from the SVN, then
-development snapshots are done for you. 
-
-These are pre-releases of SimGrid that still fail some tests about features
-that almost nobody use, or on platforms not being in our core target (which is
-Linux, Mac, other Unixes and Windows, from the most important to the less
-one). That means that using this development releases should be safe for most
-users. 
-
-These archives can be found on 
-<a href="http://www.loria.fr/~quinson/Research/SimGrid/">this web page</a>. Once you 
-got the lastest archive, you can compile it just like any archive (see above).
-
-\subsection faq_compiling_svn Compiling SimGrid from the SVN
-
-The project development takes place in the SVN, where all changes are
-committed when they happen. Then every once in a while, we make sure that the
-code quality meets our standard and release an archive from the code in the
-SVN. We afterward go back to the development in the SVN. So, if you need a
-recently added feature and can afford some little problem with the stability
-of the lastest features, you may want to use the SVN version instead of a
-released one.
-
-For that, you first need to get the "simgrid" module from
-<a href="http://gforge.inria.fr/scm/?group_id=12">here</a>. 
-
-You won't find any <tt>configure</tt> and a few other things
-(<tt>Makefile.in</tt>'s, documentation, ...) will be missing as well. The
-reason for that is that all these files have to be regenerated using the
-latest versions of <tt>autoconf</tt>, <tt>libtool</tt>, <tt>automake</tt>
-(>1.9) and <tt>doxygen</tt> (>1.4). To generate the <tt>configure</tt> and
-the <tt>Makefile.in</tt>'s, you just have to launch the <tt>bootstrap</tt>
-command that resides in the top of the source tree. Then just follow the
-instructions of Section \ref faq_compiling.
-
-We insist on the fact that you really need the latest versions of
-autoconf, automake and libtool. Doing this step on exotic architectures/systems
-(i.e. anything different from a recent linux distribution) may be
-... uncertain. If you need to compile the SVN version on a machine where all these
-dependencies are not met, the easiest is to do <tt>make dist</tt> in the SVN
-directory of another machine where all dependencies are met. It will create an
-archive you may deploy on other sites just as a regular stable release.
-
-In summary, the following commands will checkout the SVN, regenerate the
-configure script and friends, configure SimGrid and build it.
-
-\verbatim svn checkout svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk simgrid
-cd simgrid
-./bootstrap
-./configure --enable-maintainer-mode --prefix=<where to install SimGrid>
-make \endverbatim
-
-Then, if you want to install SimGrid on the current box, just do:
-\verbatim make install \endverbatim
-
-If you want to build an snapshot of the SVN to deploy it on another box (for
-example because the other machine don't have the autotools), do:
-\verbatim make dist \endverbatim
-
-Moreover, you should never call the autotools manually since you must run
-them in a specific order with specific arguments. Most of the times, the
-makefiles will automatically call the tools for you. When it's not possible
-(such as the first time you checkout the SVN), use the ./bootstrap command
-to call them explicitly.
-
-
-\subsection faq_setting_MSG Setting up your own MSG code
-
-Do not build your simulator by modifying the SimGrid examples.  Go
-outside the SimGrid source tree and create your own working directory
-(say <tt>/home/joe/SimGrid/MyFirstScheduler/</tt>).
-
-Suppose your simulation has the following structure (remember it is
-just an example to illustrate a possible way to compile everything;
-feel free to organize it as you want).
-
-      \li <tt>sched.h</tt>: a description of the core of the
-          scheduler (i.e. which functions are can be used by the
-          agents). For example we could find the following functions
-          (master, forwarder, slave).
-
-      \li <tt>sched.c</tt>: a C file including <tt>sched.h</tt> and
-          implementing the core of the scheduler. Most of these
-          functions use the MSG functions defined in section \ref
-          msg_gos_functions.
-
-      \li <tt>masterslave.c</tt>: a C file with the main function, i.e.
-          the MSG initialization (MSG_global_init()), the platform
-          creation (e.g. with MSG_create_environment()), the
-          deployment phase (e.g. with MSG_function_register() and
-          MSG_launch_application()) and the call to
-          MSG_main()).
-
-To compile such a program, we suggest to use the following
-Makefile. It is a generic Makefile that we have used many times with
-our students when we teach the C language.
-
-\verbatim
-all: masterslave 
-masterslave: masterslave.o sched.o
-
-INSTALL_PATH = $$HOME
-CC = gcc
-PEDANTIC_PARANOID_FREAK =       -O0 -Wshadow -Wcast-align \
-                               -Waggregate-return -Wmissing-prototypes -Wmissing-declarations \
-                               -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
-                               -Wmissing-noreturn -Wredundant-decls -Wnested-externs \
-                               -Wpointer-arith -Wwrite-strings -finline-functions
-REASONABLY_CAREFUL_DUDE =      -Wall
-NO_PRAYER_FOR_THE_WICKED =     -w -O2 
-WARNINGS =                     $(REASONABLY_CAREFUL_DUDE)
-CFLAGS = -g $(WARNINGS)
-
-INCLUDES = -I$(INSTALL_PATH)/include
-DEFS = -L$(INSTALL_PATH)/lib/
-LDADD = -lm -lsimgrid 
-LIBS = 
-
-%: %.o
-       $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@ 
-
-%.o: %.c
-       $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<
-
-clean:
-       rm -f $(BIN_FILES) *.o *~
-.SUFFIXES:
-.PHONY : clean
-
-\endverbatim
-
-The first two lines indicates what should be build when typing make
-(<tt>masterslave</tt>) and of which files it is to be made of
-(<tt>masterslave.o</tt> and <tt>sched.o</tt>). This makefile assumes
-that you have set up correctly your <tt>LD_LIBRARY_PATH</tt> variable
-(look, there is a <tt>LDADD = -lm -lsimgrid</tt>). If you prefer using
-the static version, remove the <tt>-lsimgrid</tt> and add a
-<tt>$(INSTALL_PATH)/lib/libsimgrid.a</tt> on the next line, right
-after the <tt>LIBS = </tt>.
-
-More generally, if you have never written a Makefile by yourself, type
-in a terminal : <tt>info make</tt> and read the introduction. The
-previous example should be enough for a first try but you may want to
-perform some more complex compilations...
-
-\subsection faq_setting_GRAS Setting up your own GRAS code
-
-If you use the GRAS interface instead of the MSG one, then previous section
-is not the better source of information. Instead, you should check the GRAS
-tutorial in general, and the \ref GRAS_tut_tour_setup in particular.
-
-\section faq_howto Feature related questions
-
-\subsection faq_MIA "Could you please add (your favorite feature here) to SimGrid?"
-
-Here is the deal. The whole SimGrid project (MSG, SURF, GRAS, ...) is
-meant to be kept as simple and generic as possible. We cannot add
-functions for everybody's needs when these functions can easily be
-built from the ones already in the API. Most of the time, it is
-possible and when it was not possible we always have upgraded the API
-accordingly. When somebody asks us a question like "How to do that?
-Is there a function in the API to simply do this?", we're always glad
-to answer and help. However if we don't need this code for our own
-need, there is no chance we're going to write it... it's your job! :)
-The counterpart to our answers is that once you come up with a neat
-implementation of this feature (task duplication, RPC, thread
-synchronization, ...), you should send it to us and we will be glad to
-add it to the distribution. Thus, other people will take advantage of
-it (and we don't have to answer this question again and again ;).
-
-You'll find in this section a few "Missing In Action" features. Many
-people have asked about it and we have given hints on how to simply do
-it with MSG. Feel free to contribute...
-
-\subsection faq_MIA_MSG MSG features
-
-\subsubsection faq_MIA_examples I want some more complex MSG examples!
-
-Many people have come to ask me a more complex example and each time,
-they have realized afterward that the basics were in the previous three
-examples. 
-
-Of course they have often been needing more complex functions like
-MSG_process_suspend(), MSG_process_resume() and
-MSG_process_isSuspended() (to perform synchronization), or
-MSG_task_Iprobe() and MSG_process_sleep() (to avoid blocking
-receptions), or even MSG_process_create() (to design asynchronous
-communications or computations). But the examples are sufficient to
-start.
-
-We know. We should add some more examples, but not really some more
-complex ones... We should add some examples that illustrate some other
-functionalists (like how to simply encode asynchronous
-communications, RPC, process migrations, thread synchronization, ...)
-and we will do it when we will have a little bit more time. We have
-tried to document the examples so that they are understandable. Tell
-us if something is not clear and once again feel free to participate!
-:)
-
-\subsubsection faq_MIA_taskdup Missing in action: MSG Task duplication/replication
-
-There is no task duplication in MSG. When you create a task, you can
-process it or send it somewhere else. As soon as a process has sent
-this task, he doesn't have this task anymore. It's gone. The receiver
-process has got the task. However, you could decide upon receiving to
-create a "copy" of a task but you have to handle by yourself the
-semantic associated to this "duplication".
-
-As we already told, we prefer keeping the API as simple as
-possible. This kind of feature is rather easy to implement by users
-and the semantic you associate really depends on people. Having a
-*generic* task duplication mechanism is not that trivial (in
-particular because of the data field). That is why I would recommand
-that you write it by yourself even if I can give you advice on how to
-do it.
-
-You have the following functions to get informations about a task:
-MSG_task_get_name(), MSG_task_get_compute_duration(),
-MSG_task_get_remaining_computation(), MSG_task_get_data_size(),
-and MSG_task_get_data().
-
-You could use a dictionary (#xbt_dict_t) of dynars (#xbt_dynar_t). If
-you still don't see how to do it, please come back to us...
-
-\subsubsection faq_MIA_asynchronous I want to do asynchronous communications in MSG
-
-In the past (version <= 3.4), there was no function to perform asynchronous communications. 
-It could easily be implemented by creating new process when needed though. Since version 3.5, 
-we have introduced the following functions:
- - MSG_task_isend()
- - MSG_task_irecv()
- - MSG_comm_test()
- - MSG_comm_wait()
- - MSG_comm_waitall()
- - MSG_comm_waitany()
- - MSG_comm_destroy()
-
-We refer you to the description of these functions for more details on their usage as well 
-as to the exemple section on \ref MSG_ex_asynchronous_communications.
-
-\subsubsection faq_MIA_thread_synchronization I need to synchronize my MSG processes
-
-You obviously cannot use pthread_mutexes of pthread_conds since we handle every 
-scheduling related decision within SimGrid. 
-
-In the past (version <=3.3.4) you could do it by playing with
-MSG_process_suspend() and MSG_process_resume() or with fake communications (using MSG_task_get(),
-MSG_task_put() and MSG_task_Iprobe()).
-
-Since version 3.4, you can use classical synchronization structures. See page \ref XBT_synchro or simply check in
-include/xbt/synchro_core.h.
-
-\subsubsection faq_MIA_host_load Where is the get_host_load function hidden in MSG?
-
-There is no such thing because its semantic wouldn't be really
-clear. Of course, it is something about the amount of host throughput,
-but there is as many definition of "host load" as people asking for
-this function. First, you have to remember that resource availability
-may vary over time, which make any load notion harder to define.
-
-It may be instantaneous value or an average one. Moreover it may be only the
-power of the computer, or may take the background load into account, or may
-even take the currently running tasks into account. In some SURF models,
-communications have an influence on computational power. Should it be taken
-into account too?
-
-First of all, it's near to impossible to predict the load beforehands in the
-simulator since it depends on too much parameters (background load
-variation, bandwidth sharing algorithmic complexity) some of them even being
-not known beforehands (other task starting at the same time). So, getting
-this information is really hard (just like in real life). It's not just that
-we want MSG to be as painful as real life. But as it is in some way
-realistic, we face some of the same problems as we would face in real life.
-
-How would you do it for real? The most common option is to use something
-like NWS that performs active probes. The best solution is probably to do
-the same within MSG, as in next code snippet. It is very close from what you
-would have to do out of the simulator, and thus gives you information that
-you could also get in real settings to not hinder the realism of your
-simulation. 
-
-\verbatim
-double get_host_load() {
-   m_task_t task = MSG_task_create("test", 0.001, 0, NULL);
-   double date = MSG_get_clock();
-
-   MSG_task_execute(task);
-   date = MSG_get_clock() - date;
-   MSG_task_destroy(task);
-   return (0.001/date);
-}
-\endverbatim
-
-Of course, it may not match your personal definition of "host load". In this
-case, please detail what you mean on the mailing list, and we will extend
-this FAQ section to fit your taste if possible.
-
-\subsubsection faq_MIA_communication_time How can I get the *real* communication time?  
-
-Communications are synchronous and thus if you simply get the time
-before and after a communication, you'll only get the transmission
-time and the time spent to really communicate (it will also take into
-account the time spent waiting for the other party to be
-ready). However, getting the *real* communication time is not really
-hard either. The following solution is a good starting point.
-
-\verbatim
-int sender()
-{
-  m_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size, 
-                                  calloc(1,sizeof(double)));
-  *((double*) task->data) = MSG_get_clock();
-  MSG_task_put(task, slaves[i % slaves_count], PORT_22);
-  XBT_INFO("Send completed");
-  return 0;
-}
-int receiver()
-{
-  m_task_t task = NULL;
-  double time1,time2;
-
-  time1 = MSG_get_clock();
-  a = MSG_task_get(&(task), PORT_22);
-  time2 = MSG_get_clock();
-  if(time1<*((double *)task->data))
-     time1 = *((double *) task->data);
-  XBT_INFO("Communication time :  \"%f\" ", time2-time1);
-  free(task->data);
-  MSG_task_destroy(task);
-  return 0;
-}
-\endverbatim
-
-\subsection faq_MIA_SimDag SimDag related questions
-
-\subsubsection faq_SG_comm Implementing communication delays between tasks.
-
-A classic question of SimDag newcomers is about how to express a
-communication delay between tasks. The thing is that in SimDag, both
-computation and communication are seen as tasks.  So, if you want to
-model a data dependency between two DAG tasks t1 and t2, you have to
-create 3 SD_tasks: t1, t2 and c and add dependencies in the following
-way:
-
-\verbatim
-SD_task_dependency_add(NULL, NULL, t1, c);
-SD_task_dependency_add(NULL, NULL, c, t2);
-\endverbatim
-
-This way task t2 cannot start before the termination of communication c
-which in turn cannot start before t1 ends.
-
-When creating task c, you have to associate an amount of data (in bytes)
-corresponding to what has to be sent by t1 to t2.
-
-Finally to schedule the communication task c, you have to build a list
-comprising the workstations on which t1 and t2 are scheduled (w1 and w2
-for example) and build a communication matrix that should look like
-[0;amount ; 0; 0].
-
-\subsubsection faq_SG_DAG How to implement a distributed dynamic scheduler of DAGs.
-
-Distributed is somehow "contagious". If you start making distributed
-decisions, there is no way to handle DAGs directly anymore (unless I
-am missing something). You have to encode your DAGs in term of
-communicating process to make the whole scheduling process
-distributed. Here is an example of how you could do that. Assume T1
-has to be done before T2.
-
-\verbatim
- int your_agent(int argc, char *argv[] {
-   ...
-   T1 = MSG_task_create(...);
-   T2 = MSG_task_create(...);
-   ...
-   while(1) {
-     ...
-     if(cond) MSG_task_execute(T1);
-     ...
-     if((MSG_task_get_remaining_computation(T1)=0.0) && (you_re_in_a_good_mood))
-        MSG_task_execute(T2)
-     else {
-        /* do something else */
-     }
-   }
- }
-\endverbatim
-If you decide that the distributed part is not that much important and that
-DAG is really the level of abstraction you want to work with, then you should
-give a try to \ref SD_API.
-
-\subsection faq_MIA_generic Generic features
-
-\subsubsection faq_more_processes Increasing the amount of simulated processes
-
-Here are a few tricks you can apply if you want to increase the amount
-of processes in your simulations.
-
- - <b>A few thousands of simulated processes</b> (soft tricks)\n
-   SimGrid can use either pthreads library or the UNIX98 contextes. On
-   most systems, the number of pthreads is limited and then your
-   simulation may be limited for a stupid reason. This is especially
-   true with the current linux pthreads, and I cannot get more than
-   2000 simulated processes with pthreads on my box. The UNIX98
-   contexts allow me to raise the limit to 25,000 simulated processes
-   on my laptop.\n\n
-   The <tt>--with-context</tt> option of the <tt>./configure</tt>
-   script allows you to choose between UNIX98 contextes
-   (<tt>--with-context=ucontext</tt>) and the pthread version
-   (<tt>--with-context=pthread</tt>). The default value is ucontext
-   when the script detect a working UNIX98 context implementation. On
-   Windows boxes, the provided value is discarded and an adapted
-   version is picked up.\n\n
-   We experienced some issues with contextes on some rare systems
-   (solaris 8 and lower or old alpha linuxes comes to mind). The main
-   problem is that the configure script detect the contextes as being
-   functional when it's not true. If you happen to use such a system,
-   switch manually to the pthread version, and provide us with a good
-   patch for the configure script so that it is done automatically ;)
-
- - <b>Hundred thousands of simulated processes</b> (hard-core tricks)\n 
-   As explained above, SimGrid can use UNIX98 contextes to represent
-   and handle the simulated processes. Thanks to this, the main
-   limitation to the number of simulated processes becomes the
-   available memory.\n\n
-   Here are some tricks I had to use in order to run a token ring
-   between 25,000 processes on my laptop (1Gb memory, 1.5Gb swap).\n
-   - First of all, make sure your code runs for a few hundreds
-     processes before trying to push the limit. Make sure it's
-     valgrind-clean, ie that valgrind does not report neither memory
-     error nor memory leaks. Indeed, numerous simulated processes
-     result in *fat* simulation hindering debugging.
-   - It was really boring to write 25,000 entries in the deployment
-     file, so I wrote a little script
-     <tt>examples/gras/mutual_exclusion/simple_token/make_deployment.pl</tt>, which you may
-     want to adapt to your case. You could also think about hijacking
-     the SURFXML parser (have look at \ref faq_flexml_bypassing).
-   - The deployment file became quite big, so I had to do what is in
-     the FAQ entry \ref faq_flexml_limit
-   - Each UNIX98 context has its own stack entry. As debugging this is
-     quite hairly, the default value is a bit overestimated so that
-     user don't get into trouble about this. You want to tune this
-     size to increse the number of processes. This is the
-     <tt>STACK_SIZE</tt> define in 
-     <tt>src/xbt/xbt_context_sysv.c</tt>, which is 128kb by default.
-     Reduce this as much as you can, but be warned that if this value
-     is too low, you'll get a segfault. The token ring example, which
-     is quite simple, runs with 40kb stacks.     
-   - You may tweak the logs to reduce the stack size further.  When
-     logging something, we try to build the string to display in a
-     char array on the stack. The size of this array is constant (and
-     equal to XBT_LOG_BUFF_SIZE, defined in include/xbt/log/h). If the
-     string is too large to fit this buffer, we move to a dynamically
-     sized buffer. In which case, we have to traverse one time the log
-     event arguments to compute the size we need for the buffer,
-     malloc it, and traverse the argument list again to do the actual
-     job.\n     
-     The idea here is to move XBT_LOG_BUFF_SIZE to 1, forcing the logs
-     to use a dynamic array each time. This allows us to lower further
-     the stack size at the price of some performance loss...\n
-     This allowed me to run the reduce the stack size to ... 4k. Ie,
-     on my 1Gb laptop, I can run more than 250,000 processes!
-
-\subsubsection faq_MIA_batch_scheduler Is there a native support for batch schedulers in SimGrid?
-
-No, there is no native support for batch schedulers and none is
-planned because this is a very specific need (and doing it in a
-generic way is thus very hard). However some people have implemented
-their own batch schedulers. Vincent Garonne wrote one during his PhD
-and put his code in the contrib directory of our SVN so that other can
-keep working on it. You may find inspiring ideas in it.
-
-\subsubsection faq_MIA_checkpointing I need a checkpointing thing
-
-Actually, it depends on whether you want to checkpoint the simulation, or to
-simulate checkpoints. 
-
-The first one could help if your simulation is a long standing process you
-want to keep running even on hardware issues. It could also help to
-<i>rewind</i> the simulation by jumping sometimes on an old checkpoint to
-cancel recent calculations.\n 
-Unfortunately, such thing will probably never exist in SG. One would have to
-duplicate all data structures because doing a rewind at the simulator level
-is very very hard (not talking about the malloc free operations that might
-have been done in between). Instead, you may be interested in the Libckpt
-library (http://www.cs.utk.edu/~plank/plank/www/libckpt.html). This is the
-checkpointing solution used in the condor project, for example. It makes it
-easy to create checkpoints (at the OS level, creating something like core
-files), and rerunning them on need.
-
-If you want to simulate checkpoints instead, it means that you want the
-state of an executing task (in particular, the progress made towards
-completion) to be saved somewhere.  So if a host (and the task executing on
-it) fails (cf. #MSG_HOST_FAILURE), then the task can be restarted
-from the last checkpoint.\n
-
-Actually, such a thing does not exists in SimGrid either, but it's just
-because we don't think it is fundamental and it may be done in the user code
-at relatively low cost. You could for example use a watcher that
-periodically get the remaining amount of things to do (using
-MSG_task_get_remaining_computation()), or fragment the task in smaller
-subtasks.
-
-\subsection faq_platform Platform building and Dynamic resources
-
-\subsubsection faq_platform_example Where can I find SimGrid platform files?
-
-There is several little examples in the archive, in the examples/msg
-directory. From time to time, we are asked for other files, but we
-don't have much at hand right now. 
-
-You should refer to the Platform Description Archive
-(http://pda.gforge.inria.fr) project to see the other platform file we
-have available, as well as the Simulacrum simulator, meant to generate
-SimGrid platforms using all classical generation algorithms.
-
-\subsubsection faq_platform_alnem How can I automatically map an existing platform?
-
-We are working on a project called ALNeM (Application-Level Network
-Mapper) which goal is to automatically discover the topology of an
-existing network. Its output will be a platform description file
-following the SimGrid syntax, so everybody will get the ability to map
-their own lab network (and contribute them to the catalog project).
-This tool is not ready yet, but it move quite fast forward. Just stay
-tuned.
-
-\subsubsection faq_platform_synthetic Generating synthetic but realistic platforms
-
-The third possibility to get a platform file (after manual or
-automatic mapping of real platforms) is to generate synthetic
-platforms. Getting a realistic result is not a trivial task, and
-moreover, nobody is really able to define what "realistic" means when
-speaking of topology files. You can find some more thoughts on this
-topic in these
-<a href="http://graal.ens-lyon.fr/~alegrand/articles/Simgrid-Introduction.pdf">slides</a>.
-
-If you are looking for an actual tool, there we have a little tool to
-annotate Tiers-generated topologies. This perl-script is in
-<tt>tools/platform_generation/</tt> directory of the SVN. Dinda et Al.
-released a very comparable tool, and called it GridG.
-
-\subsubsection faq_SURF_multicore Modeling multi-core resources 
-
-There is currently no native support for multi-core or SMP machines in
-SimGrid. We are currently working on it, but coming up with the right
-model is very hard: Cores share caches and bus to access memory and
-thus interfere with each others. Memory contention is a crucial
-component of multi-core modeling.
-
-In the meanwhile, some user-level tricks can reveal sufficient for
-you. For example, you may model each core by a CPU and add some very
-high speed links between them. This complicates a bit the user code
-since you have to remember that when you assign something to a (real)
-host, it can be any of the (fake) hosts representing the cores of a
-given machine. For that, you can use the prop tag of the XML files as
-follows. Your code should then look at the ‘machine’ property
-associated with each workstation, and run parallel tasks over all
-cores of the machine.
-
-\verbatim
-  <host id="machine0/core0" power="91500E6">
-    <prop id="machine" value="machine0"/>
-    <prop id="core" value="0"/>
-  </host>
-  <host id="machine0/core1" power="91500E6">
-    <prop id="machine" value="machine0"/>
-    <prop id="core" value="1"/>
-</host>
-
-
-\endverbatim
-
-\subsubsection faq_SURF_dynamic Modeling dynamic resource availability 
-
-A nice feature of SimGrid is that it enables you to seamlessly have
-resources whose availability change over time. When you build a
-platform, you generally declare hosts like that:
-
-\verbatim
-  <host id="host A" power="100.00"/>
-\endverbatim 
-
-If you want the availability of "host A" to change over time, the only
-thing you have to do is change this definition like that:
-
-\verbatim
-  <host id="host A" power="100.00" availability_file="trace_A.txt" state_file="trace_A_failure.txt"/>
-\endverbatim
-
-For hosts, availability files are expressed in fraction of available
-power. Let's have a look at what "trace_A.txt" may look like:
-
-\verbatim
-PERIODICITY 1.0
-0.0 1.0
-11.0 0.5
-20.0 0.9
-\endverbatim
-
-At time 0, our host will deliver 100 flop/s. At time 11.0, it will
-deliver only 50 flop/s until time 20.0 where it will will start
-delivering 90 flop/s. Last at time 21.0 (20.0 plus the periodicity
-1.0), we'll be back to the beginning and it will deliver 100 flop/s.
-
-Now let's look at the state file:
-\verbatim
-PERIODICITY 10.0
-1.0 -1.0
-2.0 1.0
-\endverbatim
-
-A negative value means "off" while a positive one means "on". At time
-1.0, the host is on. At time 1.0, it is turned off and at time 2.0, it
-is turned on again until time 12 (2.0 plus the periodicity 10.0). It
-will be turned on again at time 13.0 until time 23.0, and so on.
-
-Now, let's look how the same kind of thing can be done for network
-links. A usual declaration looks like:
-
-\verbatim
-  <link id="LinkA" bandwidth="10.0" latency="0.2"/>
-\endverbatim
-
-You have at your disposal the following options: bandwidth_file,
-latency_file and state_file. The only difference with hosts is that
-bandwidth_file and latency_file do not express fraction of available
-power but are expressed directly in bytes per seconds and seconds.
-
-\subsubsection faq_platform_multipath How to express multipath routing in platform files?
-
-It is unfortunately impossible to express the fact that there is more
-than one routing path between two given hosts. Let's consider the
-following platform file:
-
-\verbatim
-<route src="A" dst="B">
-   <link:ctn id="1"/>
-</route>
-<route src="B" dst="C">
-  <link:ctn id="2"/>
-</route>
-<route src="A" dst="C">
-  <link:ctn id="3"/>
-</route>
-\endverbatim
-
-Although it is perfectly valid, it does not mean that data traveling
-from A to C can either go directly (using link 3) or through B (using
-links 1 and 2). It simply means that the routing on the graph is not
-trivial, and that data do not following the shortest path in number of
-hops on this graph. Another way to say it is that there is no implicit
-in these routing descriptions. The system will only use the routes you
-declare (such as &lt;route src="A" dst="C"&gt;&lt;link:ctn
-id="3"/&gt;&lt;/route&gt;), without trying to build new routes by aggregating
-the provided ones.
-  
-You are also free to declare platform where the routing is not
-symmetric. For example, add the following to the previous file:
-
-\verbatim
-<route src="C" dst="A">
-  <link:ctn id="2"/>
-  <link:ctn id="1"/>
-</route>
-\endverbatim
-
-This makes sure that data from C to A go through B where data from A
-to C go directly. Don't worry about realism of such settings since
-we've seen ways more weird situation in real settings (in fact, that's
-the realism of very regular platforms which is questionable, but
-that's another story).
-
-\subsubsection faq_flexml_bypassing Bypassing the XML parser with your own C functions
-
-So you want to bypass the XML files parser, uh? Maybe doing some parameter
-sweep experiments on your simulations or so? This is possible, and
-it's not even really difficult (well. Such a brutal idea could be
-harder to implement). Here is how it goes.
-
-For this, you have to first remember that the XML parsing in SimGrid is done
-using a tool called FleXML. Given a DTD, this gives a flex-based parser. If
-you want to bypass the parser, you need to provide some code mimicking what
-it does and replacing it in its interactions with the SURF code. So, let's
-have a look at these interactions.
-
-FleXML parser are close to classical SAX parsers. It means that a
-well-formed SimGrid platform XML file might result in the following
-"events":
-
-  - start "platform_description" with attribute version="2"
-  - start "host" with attributes id="host1" power="1.0"
-  - end "host"
-  - start "host" with attributes id="host2" power="2.0"
-  - end "host"
-  - start "link" with ...
-  - end "link"
-  - start "route" with ...
-  - start "link:ctn" with ...
-  - end "link:ctn"
-  - end "route"
-  - end "platform_description"
-
-The communication from the parser to the SURF code uses two means:
-Attributes get copied into some global variables, and a surf-provided
-function gets called by the parser for each event. For example, the event
-  - start "host" with attributes id="host1" power="1.0"
-
-let the parser do something roughly equivalent to:
-\verbatim
-  strcpy(A_host_id,"host1");
-  A_host_power = 1.0;
-  STag_host();
-\endverbatim
-
-In SURF, we attach callbacks to the different events by initializing the
-pointer functions to some the right surf functions. Since there can be
-more than one callback attached to the same event (if more than one
-model is in use, for example), they are stored in a dynar. Example in
-workstation_ptask_L07.c:
-\verbatim
-  /* Adding callback functions */
-  surf_parse_reset_parser();
-  surfxml_add_callback(STag_surfxml_host_cb_list, &parse_cpu_init);
-  surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
-  surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
-  surfxml_add_callback(STag_surfxml_route_cb_list, &parse_route_set_endpoints);
-  surfxml_add_callback(ETag_surfxml_link_c_ctn_cb_list, &parse_route_elem);
-  surfxml_add_callback(ETag_surfxml_route_cb_list, &parse_route_set_route);
-                
-  /* Parse the file */
-  surf_parse_open(file);
-  xbt_assert(!surf_parse(), "Parse error in %s", file);
-  surf_parse_close();
-\endverbatim
-    
-So, to bypass the FleXML parser, you need to write your own version of the
-surf_parse function, which should do the following:
-   - Fill the A_<tag>_<attribute> variables with the wanted values
-   - Call the corresponding STag_<tag>_fun function to simulate tag start
-   - Call the corresponding ETag_<tag>_fun function to simulate tag end
-   - (do the same for the next set of values, and loop)
-
-Then, tell SimGrid that you want to use your own "parser" instead of the stock one:
-\verbatim
-  surf_parse = surf_parse_bypass_environment;
-  MSG_create_environment(NULL);
-  surf_parse = surf_parse_bypass_application;
-  MSG_launch_application(NULL);
-\endverbatim
-
-A set of macros are provided at the end of
-include/surf/surfxml_parse.h to ease the writing of the bypass
-functions. An example of this trick is distributed in the file
-examples/msg/masterslave/masterslave_bypass.c
-
-\subsection faq_simgrid_configuration Changing SimGrid's behavior
-
-A number of options can be given at runtime to change the default
-SimGrid behavior. In particular, you can change the default cpu and
-network models...
-
-\subsubsection faq_simgrid_configuration_fullduplex Using Fullduplex
-
-Experimental fullduplex support is now available on the svn branch. In order to fullduple to work your platform must have two links for each pair
-of interconnected hosts, see an example here:
-\verbatim
-       simgrid_svn_sources/exemples/msg/gtnets/fullduplex-p.xml
-\endverbatim
-
-Using fullduplex support ongoing and incoming communication flows are
-treated independently for most models. The exception is the LV08 model which 
-adds 0.05 of usage on the opposite direction for each new created flow. This 
-can be useful to simulate some important TCP phenomena such as ack compression. 
-
-Running a fullduplex example:
-\verbatim
-       cd simgrid_svn_sources/exemples/msg/gtnets
-       ./gtnets fullduplex-p.xml fullduplex-d.xml --cfg=fullduplex:1
-\endverbatim
-
-
-
-
-
-\subsubsection faq_simgrid_configuration_gtnets Using GTNetS
-
-It is possible to use a packet-level network simulator
-instead of the default flow-based simulation. You may want to use such
-an approach if you have doubts about the validity of the default model
-or if you want to perform some validation experiments. At the moment,
-we support the GTNetS simulator (it is still rather experimental
-though, so leave us a message if you play with it). 
-
-
-<i>
-To enable GTNetS model inside SimGrid it is needed to patch the GTNetS simulator source code 
-and build/install it from scratch
-</i>
-
- - <b>Download and enter the recent downloaded GTNetS directory</b>
-
- \verbatim
- svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/
- cd GTNetS
- \endverbatim
-
-
- - <b>Use the following commands to unzip and patch GTNetS package to work within SimGrid.</b>
-
- \verbatim
- unzip gtnets-current.zip
- tar zxvf gtnets-current-patch.tgz 
- cd gtnets-current
- cat ../00*.patch | patch -p1
- \endverbatim
-
-  - <b>OPTIONALLY</b> you can use a patch for itanium 64bit processor family.
-
-  \verbatim
-  cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1
-  \endverbatim
-
- - <b>Compile GTNetS</b>
-
-   Due to portability issues it is possible that GTNetS does not compile in your architecture. The patches furnished in SimGrid SVN repository are intended for use in Linux architecture only. Unfortunately, we do not have the time, the money, neither the manpower to guarantee GTNetS portability. We advice you to use one of GTNetS communication channel to get more help in compiling GTNetS. 
-
-
- \verbatim
- ln -sf Makefile.linux Makefile
- make depend
- make debug
- \endverbatim
-
-
- - <b>NOTE</b> A lot of warnings are expected but the application should compile
- just fine. If the makefile insists in compiling some QT libraries
- please try a make clean before asking for help.
-
-
- - <b>To compile optimized version</b>
-
- \verbatim
- make opt
- \endverbatim
-
-
- - <b>Installing GTNetS</b>
-
- It is important to put the full path of your libgtsim-xxxx.so file when creating the symbolic link. Replace < userhome > by some path you have write access to.
-
- \verbatim
- ln -sf /<absolute_path>/gtnets_current/libgtsim-debug.so /<userhome>/usr/lib/libgtnets.so
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<userhome>/usr/lib/libgtnets.so
- mkdir /<userhome>/usr/include/gtnets
- cp -fr SRC/*.h /<userhome>/usr/include/gtnets
- \endverbatim
-
-
- - <b>Enable GTNetS support in SimGrid</b>
-In order to enable gtnets with simgrid you have to give where is gtnets. (path to \<gtnets_path\>/lib and \<gtnets_path\>/include)
-
-   \verbatim
-   Since v3.4 (with cmake)
-   cmake . -Dgtnets_path=/<userhome>/usr
-   
-   Until v3.4 (with autotools)
-   ./configure --with-gtnets=/<userhome>/usr
-   \endverbatim
-
- - <b>Once you have followed all the instructions for compiling and
-   installing successfully you can activate this feature at 
-   runntime with the following options:</b>
-
-   \verbatim
-   Since v3.4 (with cmake)
-   cd simgrid
-   make
-   ctest -R gtnets
-   
-   Until v3.4 (with autotools)
-   cd simgrid/example/msg/
-   make
-   make check
-   \endverbatim
-
-
- - <b>Or try the GTNetS model dogbone example with</b>
-
- \verbatim
- gtnets/gtnets gtnets/onelink-p.xml gtnets/onelink-d.xml --cfg=network_model:GTNets
- \endverbatim
-
- A long version of this <a href="http://gforge.inria.fr/docman/view.php/12/6283/GTNetS HowTo.html">HowTo</a>  it is available 
-
-
- More about GTNetS simulator at <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/index.html">GTNetS Website</a>
-
-
- - <b>DISCLAIMER</b>
- The patches provided by us worked successfully with GTNetS found 
- <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/software/gtnets-current.zip">here</a>, 
- dated from 12th June 2008. Due to the discontinuing development of
- GTNetS it is impossible to precise a version number. We STRONGLY recommend you
- to download and install the GTNetS version found in SimGrid repository as explained above.
-
-
-
-\subsubsection faq_simgrid_configuration_alternate_network Using alternative flow models
-
-The default simgrid network model uses a max-min based approach as
-explained in the research report
-<a href="ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.gz">A Network Model for Simulation of Grid Application</a>.
-Other models have been proposed and implemented since then (see for example 
-<a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>)
-and can be activated at runtime. For example:
-\verbatim
-./mycode platform.xml deployment.xml --cfg=workstation/model:compound --cfg=network/model:LV08 -cfg=cpu/model:Cas01
-\endverbatim
-
-Possible models for the network are currently "Constant", "CM02",
-"LegrandVelho", "GTNets", Reno", "Reno2", "Vegas". Others will
-probably be added in the future and many of the previous ones are
-experimental and are likely to disappear without notice... To know the
-list of the currently  implemented models, you should use the
---help-models command line option.
-
-\verbatim
-./masterslave_forwarder ../small_platform.xml deployment_masterslave.xml  --help-models
-Long description of the workstation models accepted by this simulator:
-  CLM03: Default workstation model, using LV08 and CM02 as network and CPU
-  compound: Workstation model allowing you to use other network and CPU models
-  ptask_L07: Workstation model with better parallel task modeling
-Long description of the CPU models accepted by this simulator:
-  Cas01_fullupdate: CPU classical model time=size/power
-  Cas01: Variation of Cas01_fullupdate with partial invalidation optimization of lmm system. Should produce the same values, only faster
-  CpuTI: Variation of Cas01 with also trace integration. Should produce the same values, only faster if you use availability traces
-Long description of the network models accepted by this simulator:
-  Constant: Simplistic network model where all communication take a constant time (one second)
-  CM02: Realistic network model with lmm_solve and no correction factors
-  LV08: Realistic network model with lmm_solve and these correction factors: latency*=10.4, bandwidth*=.92, S=8775
-  Reno: Model using lagrange_solve instead of lmm_solve (experts only)
-  Reno2: Model using lagrange_solve instead of lmm_solve (experts only)
-  Vegas: Model using lagrange_solve instead of lmm_solve (experts only)
-\endverbatim
-
-\subsection faq_tracing Tracing Simulations for Visualization
-
-The trace visualization is widely used to observe and understand the behavior
-of parallel applications and distributed algorithms. Usually, this is done in a
-two-step fashion: the user instruments the application and the traces are
-analyzed after the end of the execution. The visualization itself can highlights
-unexpected behaviors, bottlenecks and sometimes can be used to correct
-distributed algorithms. The SimGrid team has instrumented the library
-in order to let users trace their simulations and analyze them. This part of the
-user manual explains how the tracing-related features can be enabled and used
-during the development of simulators using the SimGrid library.
-
-\subsubsection faq_tracing_howitworks How it works
-
-For now, the SimGrid library is instrumented so users can trace the <b>platform
-utilization</b> using the MSG, SimDAG and SMPI interface. This means that the tracing will
-register how much power is used for each host and how much bandwidth is used for
-each link of the platform. The idea with this type of tracing is to observe the
-overall view of resources utilization in the first place, especially the
-identification of bottlenecks, load-balancing among hosts, and so on.
-
-The idea of the tracing facilities is to give SimGrid users to possibility to
-classify MSG and SimDAG tasks by category, tracing the platform utilization
-(hosts and links) for each of the categories. For that,
-the tracing interface enables the declaration of categories and a function to
-mark a task with a previously declared category. <em>The tasks that are not
-classified according to a category are not traced</em>. Even if the user
-does not specify any category, the simulations can still be traced in terms
-of resource utilization by using a special parameter that is detailed below.
-
-\subsubsection faq_tracing_enabling Enabling using CMake
-
-With the sources of SimGrid, it is possible to enable the tracing 
-using the parameter <b>-Denable_tracing=ON</b> when the cmake is executed.
-The section \ref faq_tracing_functions describes all the functions available
-when this Cmake options is activated. These functions will have no effect
-if SimGrid is configured without this option (they are wiped-out by the
-C-preprocessor).
-
-\verbatim
-$ cmake -Denable_tracing=ON .
-$ make
-\endverbatim
-
-\subsubsection faq_tracing_functions Tracing Functions
-
-\li <b>\c TRACE_category (const char *category)</b>: This function should be used
-to define a user category. The category can be used to differentiate the tasks
-that are created during the simulation (for example, tasks from server1,
-server2, or request tasks, computation tasks, communication tasks).
-All resource utilization (host power and link bandwidth) will be
-classified according to the task category. Tasks that do not belong to a
-category are not traced. The color for the category that is being declared
-is random (use next function to specify a color).
-
-\li <b>\c TRACE_category_with_color (const char *category, const char *color)</b>: Same
-as TRACE_category, but let user specify a color encoded as a RGB-like string with
-three floats from 0 to 1. So, to specify a red color, the user can pass "1 0 0" as
-color parameter. A light-gray color can be specified using "0.7 0.7 0.7" as color.
-
-\li <b>\c TRACE_msg_set_task_category (m_task_t task, const char *category)</b>:
-This function should be called after the creation of a MSG task, to define the
-category of that task. The first parameter \c task must contain a task that was
-created with the function \c MSG_task_create. The second parameter
-\c category must contain a category that was previously defined by the function
-\c TRACE_category.
-
-\li <b>\c TRACE_sd_set_task_category (SD_task_t task, const char *category)</b>:
-This function should be called after the creation of a SimDAG task, to define the
-category of that task. The first parameter \c task must contain a task that was
-created with the function \c MSG_task_create. The second parameter
-\c category must contain a category that was previously defined by the function
-\c TRACE_category.
-
-\li <b>\c TRACE_[host|link]_variable_declare (const char *variable)</b>:
-Declare a user variable that will be associated to host/link. A variable can
-be used to trace user variables such as the number of tasks in a server,
-the number of clients in an application (for hosts), and so on.
-
-\li <b>\c TRACE_[host|link]_variable_[set|add|sub] (const char *[host|link], const char *variable, double value)</b>:
-Set the value of a given user variable for a given host/link. The value
-of this variable is always associated to the host/link. The host/link 
-parameters should be its name as the one listed in the platform file.
-
-\li <b>\c TRACE_[host|link]_variable_[set|add|sub]_with_time (double time, const char *[host|link], const char *variable, double value)</b>:
-Same as TRACE_[host|link]_variable_[set|add|sub], but let user specify
-the time used to trace it. Users can specify a time that is not the 
-simulated clock time as defined by the core simulator. This allows
-a fine-grain control of time definition, but should be used with 
-caution since the trace can be inconsistent if resource utilization
-traces are also traced.
-
-\li <b>\c TRACE_link_srcdst_variable_[set|add|sub] (const char *src, const char *dst, const char *variable, double value)</b>:
-Same as TRACE_link_variable_[set|add|sub], but now users specify a source and
-destination hosts (as the names from the platform file). The tracing library
-will get the corresponding route that connects those two hosts (src and dst) and
-[set|add|sub] the value's variable for all the links of the route.
-
-\li <b>\c TRACE_link_srcdst_variable_[set|add|sub]_with_time (double time, const char *src, const char *dst, const char *variable, double value)</b>: 
-Same as TRACE_link_srcdst_variable_[set|add|sub], but user specify a time different from the simulated time.
-
-\subsubsection faq_tracing_options Tracing configuration Options
-
-These are the options accepted by the tracing system of SimGrid:
-
-\li <b>\c 
-tracing
-</b>:
-  Safe switch. It activates (or deactivates) the tracing system.
-  No other tracing options take effect if this one is not activated.
-
-\li <b>\c
-tracing/platform
-</b>:
-  Register the simulation platform in the trace file.
-
-\li <b>\c
-tracing/onelink_only
-</b>:
-  By default, the tracing system uses all routes in the platform file
-  to re-create a "graph" of the platform and register it in the trace file.
-  This option let the user tell the tracing system to use only the routes
-  that are composed with just one link.
-
-\li <b>\c 
-tracing/categorized
-</b>:
-  It activates the categorized resource utilization tracing. It should
-  be enabled if tracing categories are used by this simulator.
-
-\li <b>\c 
-tracing/uncategorized
-</b>:
-  It activates the uncategorized resource utilization tracing. Use it if
-  this simulator do not use tracing categories and resource use have to be
-  traced.
-
-\li <b>\c 
-tracing/filename
-</b>:
-  A file with this name will be created to register the simulation. The file
-  is in the Paje format and can be analyzed using Triva or Paje visualization
-  tools. More information can be found in these webpages:
-     <a href="http://triva.gforge.inria.fr/">http://triva.gforge.inria.fr/</a>
-     <a href="http://paje.sourceforge.net/">http://paje.sourceforge.net/</a>
-
-\li <b>\c 
-tracing/smpi
-</b>:
-  This option only has effect if this simulator is SMPI-based. Traces the MPI
-  interface and generates a trace that can be analyzed using Gantt-like
-  visualizations. Every MPI function (implemented by SMPI) is transformed in a
-  state, and point-to-point communications can be analyzed with arrows.
-
-\li <b>\c 
-tracing/smpi/group
-</b>:
-  This option only has effect if this simulator is SMPI-based. The processes
-  are grouped by the hosts where they were executed.
-
-\li <b>\c 
-tracing/msg/task
-</b>:
-  This option only has effect if this simulator is MSG-based. It traces the
-  behavior of all categorized MSG tasks, grouping them by hosts.
-
-\li <b>\c 
-tracing/msg/process
-</b>:
-  This option only has effect if this simulator is MSG-based. It traces the
-  behavior of all categorized MSG processes, grouping them by hosts. This option
-  can be used to track process location if this simulator has process migration.
-
-
-\li <b>\c 
-triva/categorized:graph_categorized.plist
-</b>:
-  This option generates a graph configuration file for Triva considering
-  categorized resource utilization.
-
-\li <b>\c 
-triva/uncategorized:graph_uncategorized.plist
-</b>:
-  This option generates a graph configuration file for Triva considering
-  uncategorized resource utilization.
-
-\subsubsection faq_tracing_example Example of Instrumentation
-
-A simplified example using the tracing mandatory functions.
-
-\verbatim
-int main (int argc, char **argv)
-{
-  MSG_global_init (&argc, &argv);
-
-  //(... after deployment ...)
-
-  //note that category declaration must be called after MSG_create_environment
-  TRACE_category_with_color ("request", "1 0 0");
-  TRACE_category_with_color ("computation", "0.3 1 0.4");
-  TRACE_category ("finalize");
-
-  m_task_t req1 = MSG_task_create("1st_request_task", 10, 10, NULL);
-  m_task_t req2 = MSG_task_create("2nd_request_task", 10, 10, NULL);
-  m_task_t req3 = MSG_task_create("3rd_request_task", 10, 10, NULL);
-  m_task_t req4 = MSG_task_create("4th_request_task", 10, 10, NULL);
-  TRACE_msg_set_task_category (req1, "request");
-  TRACE_msg_set_task_category (req2, "request");
-  TRACE_msg_set_task_category (req3, "request");
-  TRACE_msg_set_task_category (req4, "request");
-
-  m_task_t comp = MSG_task_create ("comp_task", 100, 100, NULL);
-  TRACE_msg_set_task_category (comp, "computation");
-
-  m_task_t finalize = MSG_task_create ("finalize", 0, 0, NULL);
-  TRACE_msg_set_task_category (finalize, "finalize");
-
-  //(...)
-
-  MSG_clean();
-  return 0;
-}
-\endverbatim
-
-\subsubsection faq_tracing_analyzing Analyzing the SimGrid Traces
-
-The SimGrid library, during an instrumented simulation, creates a trace file in
-the Paje file format that contains the platform utilization for the simulation
-that was executed. The visualization analysis of this file is performed with the
-visualization tool <a href="http://triva.gforge.inria.fr">Triva</a>, with
-special configurations tunned to SimGrid needs. This part of the documentation
-explains how to configure and use Triva to analyse a SimGrid trace file.
-
-- <b>Installing Triva</b>: the tool is available in the INRIAGforge, 
-at <a href="http://triva.gforge.inria.fr">http://triva.gforge.inria.fr</a>.
-Use the following command to get the sources, and then check the file
-<i>INSTALL</i>. This file contains instructions to install
-the tool's dependencies in a Ubuntu/Debian Linux. The tool can also
-be compiled in MacOSes natively, check <i>INSTALL.mac</i> file.
-\verbatim
-$ svn checkout svn://scm.gforge.inria.fr/svn/triva
-$ cd triva
-$ cat INSTALL
-\endverbatim
-
-- <b>Executing Triva</b>: a binary called <i>Triva</i> is available after the
-  installation (you can execute it passing <em>--help</em> to check its
-options). If the triva binary is not available after following the
-installation instructions, you may want to execute the following command to
-initialize the GNUstep environment variables. We strongly recommend that you
-use the latest GNUstep packages, and not the packages available through apt-get
-in Ubuntu/Debian packaging systems. If you install GNUstep using the latest
-available packages, you can execute this command:
-\verbatim
-$ source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
-\endverbatim
-You should be able to see this output after the installation of triva:
-\verbatim
-$ ./Triva.app/Triva --help
-Usage: Triva [OPTIONS...] TRACE0 [TRACE1]
-Trace Analysis through Visualization
-
-TimeInterval
-    --ti_frequency {double}    Animation: frequency of updates
-    --ti_hide                  Hide the TimeInterval window
-    --ti_forward {double}      Animation: value to move time-slice
-    --ti_apply                 Apply the configuration
-    --ti_update                Update on slider change
-    --ti_animate               Start animation
-    --ti_start {double}        Start of time slice
-    --ti_size {double}         Size of time slice
-Triva
-    --comparison               Compare Trace Files (Experimental)
-    --graph                    Configurable Graph
-    --list                     Print Trace Type Hierarchy
-    --hierarchy                Export Trace Type Hierarchy (dot)
-    --stat                     Trace Statistics and Memory Utilization
-    --instances                List All Trace Entities
-    --linkview                 Link View (Experimental)
-    --treemap                  Squarified Treemap
-    --merge                    Merge Trace Files (Experimental)
-    --check                    Check Trace File Integrity
-GraphConfiguration
-    --gc_conf {file}           Graph Configuration in Property List Format
-    --gc_apply                 Apply the configuration
-    --gc_hide                  Hide the GraphConfiguration window
-\endverbatim
-Triva expects that the user choose one of the available options 
-(currently <em>--graph</em> or <em>--treemap</em> for a visualization analysis)
-and the trace file from the simulation.
-
-- <b>Understanding Triva - time-slice</b>: the analysis of a trace file using
-  the tool always takes into account the concept of the <em>time-slice</em>.
-This concept means that what is being visualized in the screen is always
-calculated considering a specific time frame, with its beggining and end
-timestamp. The time-slice is configured by the user and can be changed
-dynamically through the window called <em>Time Interval</em> that is opened
-whenever a trace file is being analyzed. The next figure depicts the time-slice
-configuration window.
-In the top of the window, in the space named <i>Trace Time</i>,
-the two fields show the beggining of the trace (which usually starts in 0) and
-the end (that depends on the time simulated by SimGrid). The middle of the
-window, in the square named <i>Time Slice Configuration</i>, contains the
-aspects related to the time-slice, including its <i>start</i> and its
-<i>size</i>. The gray rectangle in the bottom of this part indicates the 
-<i>current time-slice</i> that is considered for the drawings. If the checkbox 
-<i>Update Drawings on Sliders Change</i> is not selected, the button
-<i>Apply</i> must be clicked in order to inform triva that the
-new time-slice must be considered. The bottom part of the window, in the space
-indicated by the square <i>Time Slice Animation</i> can be used to advance
-the time-frame automatically. The user configures the amount of time that the
-time-frame will forward and how frequent this update will happen. Once this is
-configured, the user clicks the <i>Play</i> button in order to see the dynamic
-changes on the drawings.
-<center>
-\htmlonly
-<a href="triva-time_interval.png" border=0><img src="triva-time_interval.png" width="50%" border=0></a>
-\endhtmlonly
-</center>
-<b>Remarks:</b> when the trace has too many hosts or links, the computation to
-take into account a new time-slice can be expensive. When this happens, the
-<i>Frequency</i> parameter, but also updates caused by change on configurations
-when the checkbox <i>Update Drawings on Sliders
-Change</i> is selected will not be followed.
-
-- <b>Understanding Triva - graph</b>: this part of the documention explains how
-  to analyze the traces using the graph view of Triva, when the user executes
-the tool passing <em>--graph</em> as parameter. Triva opens three windows when
-this parameter is used: the <i>Time Interval</i> window (previously described),
-the <i>Graph Representation</i> window, and the <em>Graph Configuration</em>
-window. The Graph Representation is the window where drawings take place.
-Initially, it is completely white waiting for a proper graph configuration input
-by the user. We start the description of this type of analysis by describing the
-<i>Graph Configuration</i> window (depicted below). By using a particular
-configuration, triva
-can be used to customize the graph drawing according to
-the SimGrid trace that was created with user-specific categories. Before delving
-into the details of this customization, let us first explain the major parts of
-the graph configuration window. The buttons located in the top-right corner can
-be used to delete, copy and create a new configuration. The checkbox in the
-top-middle part of the window indicates if the configuration typed in the
-textfield is syntactically correct (we are using the non-XML 
-<a href="http://en.wikipedia.org/wiki/Property_list">Property List Format</a> to
-describe the configuration). The pop-up button located on the top-left corner 
-indicates the selected configuration (the user can have multiple graph
-configurations). The bottom-left text field contains the name of the current
-configuration (updates on this field must be followed by typing enter on the
-keyboard to take into account the name change). The bottom-right <em>Apply</em>
-button activates the current configuration, resulting on an update on the graph
-drawings.
-<center>
-\htmlonly
-<a href="triva-graph_configuration.png" border=0><img src="triva-graph_configuration.png" width="50%" border=0></a>
-\endhtmlonly
-</center>
-<b>Basic SimGrid Configuration</b>: The figure shows in the big textfield the
-basic configuration that should be used during the analysis of a SimGrid trace
-file. The basic logic of the configuration is as follows:
-\verbatim
-{
-  node = (HOST);
-  edge = (LINK);
-\endverbatim
-The nodes of the graph will be created based on the <i>node</i> parameter, which
-in this case is the different <em>"HOST"</em>s of the platform 
-used to simulate. The <i>edge</i> parameter indicates that the edges of the
-graph will be created based on the <em>"LINK"</em>s of the platform. After the
-definition of these two parameters, the configuration must detail how
-<em>HOST</em>s and <em>LINK</em>s should be drawn. For that, the configuration
-must have an entry for each of the types used. For <em>HOST</em>, as basic
-configuration, we have:
-\verbatim
-  HOST = {
-    size = power;
-    scale = global;
-  };
-\endverbatim
-The parameter <em>size</em> indicates which variable from the trace file will be
-used to define the size of the node HOST in the visualization. If the simulation
-was executed with availability traces, the size of the nodes will be changed
-according to these traces. The parameter <em>scale</em> indicates if the value
-of the variable is <em>global</em> or <em>local</em>. If it is global, the value
-will be relative to the power of all other hosts, if it is local, the value will
-be relative locally.
-For <em>LINK</em> we have:
-\verbatim
-  LINK = {
-    src = source;
-    dst = destination;
-    
-    size = bandwidth;
-    scale = global;
-  };
-\endverbatim
-For the types specified in the <em>edge</em> parameter (such as <em>LINK</em>),
-the configuration must contain two additional parameters: <em>src</em> and
-<em>dst</em> that are used to properly identify which nodes this edge is
-connecting. The values <em>source</em> and <em>destination</em> are always present
-in the SimGrid trace file and should not be changed in the configuration. The
-parameter <em>size</em> for the LINK, in this case, is configured as the
-variable <em>bandwidth</em>, with a <em>global</em> scale. The scale meaning
-here is exactly the same used for nodes. The last parameter is the GraphViz
-algorithm used to calculate the position of the nodes in the graph
-representation.
-\verbatim
-  graphviz-algorithm = neato;
-}
-\endverbatim
-<b>Customizing the Graph Representation</b>: triva is capable to handle
-a customized graph representation based on the variables present in the trace
-file. In the case of SimGrid, every time a category is created for tasks, two
-variables in the trace file are defined: one to indicate node utilization (how
-much power was used by that task category), and another to indicate link
-utilization (how much bandwidth was used by that category). For instance, if the
-user declares a category named <i>request</i>, there will be variables named
-<b>p</b><i>request</i> and a <b>b</b><i>request</i> (<b>p</b> for power and
-<b>b</b> for bandwidth). It is important to notice that the variable
-<i>prequest</i> in this case is only available for HOST, and
-<i>brequest</i> is only available for LINK. <b>Example</b>: suppose there are
-two categories for tasks: request and compute. To create a customized graph
-representation with a proportional separation of host and link utilization, use
-as configuration for HOST and LINK this:
-\verbatim
-  HOST = {
-    size = power;
-    scale = global;
-  
-    sep_host = {
-      type = separation;
-      size = power;
-      values = (prequest, pcomputation);
-    };
-  };
-
-  LINK = {
-    src = source;
-    dst = destination;
-    size = bandwidth;
-    scale = global;
-
-    sep_link = {
-      type = separation;
-      size = bandwidth;
-      values = (brequest, bcomputation);
-    };
-  };
-\endverbatim
-Where <i>sep_host</i> contains a composition of type <i>separation</i> where
-its max size is the <i>power</i> of the host and the variables <i>prequest</i>
-and <i>pcomputation</i> are drawn proportionally to the size of the HOST. And
-<i>sep_link</i> is also a separation where max is defined as the
-<i>bandwidth</i> of the link, and the variables <i>brequest</i> and
-<i>bcomputation</i> are drawn proportionally within a LINK.
-<i>This configuration enables the analysis of resource utilization by MSG tasks,
-and the identification of load-balancing issues, network bottlenecks, for
-instance.</i> \n
-<b>Other compositions</b>: besides <i>separation</i>, it is possible to use
-other types of compositions, such as gradients, and colors, like this:
-\verbatim
-    gra_host = {
-      type = gradient;
-      scale = global;
-      values = (numberOfTasks);
-    };
-    color_host = {
-      type = color;
-      values = (is_server);
-    };
-\endverbatim
-Where <i>gra_host</i> creates a gradient within a node of the graph, using a
-global scale and using as value a variable called <i>numberOfTasks</i>, that
-could be declared by the user using the optional tracing functions of SimGrid.
-If scale is global, the max and min value for the gradient will be equal to the
-max and min numberOfTasks among all hosts, and if scale is local, the max and
-min value based on the value of numberOfTasks locally in each host.
-And <i>color_host</i> composition draws a square based on a positive value of
-the variable <i>is_server</i>, that could also be defined by the user using the
-SimGrid tracing functions. \n
-<b>The Graph Visualization</b>: The next figure shows a graph visualization of a
-given time-slice of the masterslave_forwarder example (present in the SimGrid
-sources). The red color indicates tasks from the <i>compute</i> category. This
-visualization was generated with the following configuration:
-\verbatim
-{
-  node = (HOST);
-  edge = (LINK);
-
-  HOST = {
-    size = power;
-    scale = global;
-  
-    sep_host = {
-      type = separation;
-      size = power;
-      values = (pcompute, pfinalize);
-    };
-  };
-  LINK = {
-    src = source;
-    dst = destination;
-    size = bandwidth;
-    scale = global;
-
-    sep_link = {
-      type = separation;
-      size = bandwidth;
-      values = (bcompute, bfinalize);
-    };
-  };
-  graphviz-algorithm = neato;
-}
-\endverbatim
-<center>
-\htmlonly
-<a href="triva-graph_visualization.png" border=0><img src="triva-graph_visualization.png" width="50%" border=0></a>
-\endhtmlonly
-</center>
-
-- <b>Understading Triva - colors</b>: An important issue when using Triva is how
-  to define colors. To do that, we have to know which variables are defined in
-the trace file generated by the SimGrid library. The parameter <em>--list</em> 
-lists the variables for a given trace file:
-\verbatim
-$ Triva -l masterslave_forwarder.trace
-iFile
-c  platform
-c    HOST
-v     power
-v     is_slave
-v     is_master
-v     task_creation
-v     task_computation
-v     pcompute
-v     pfinalize
-c    LINK
-v     bandwidth
-v     latency
-v     bcompute
-v     bfinalize
-c  user_type
-\endverbatim
-We can see that HOST has seven variables (from power to pfinalize) and LINK has
-four (from bandwidth to bfinalize). To define a red color for the
-<i>pcompute</i> and <i>bcompute</i> (which are defined based on user category
-<i>compute</i>), execute:
-\verbatim
-$ defaults write Triva 'pcompute Color' '1 0 0'
-$ defaults write Triva 'bcompute Color' '1 0 0'
-\endverbatim
-Where the three numbers in each line are the RGB color with values from 0 to 1.
-
-\subsection faq_modelchecking Model-Checking
-\subsubsection faq_modelchecking_howto How to use it
-To enable the experimental SimGrid model-checking support the program should
-be executed with the command line argument 
-\verbatim
---cfg=model-check:1 
-\endverbatim
-Properties are expressed as assertions using the function
-\verbatim
-void MC_assert(int prop);
-\endverbatim
-
-\subsection faq_binding_lua Lua Binding
-Most of Simgrid modules require a  good level in C programming, since simgrid is used to be as standard C library.
- Sometime users prefer using some kind of « easy scripts » or a language easier to code with, for their works,
- which avoid dealing with C errors, and sometime an important  gain of time.
-Besides Java Binding, Lua  and Ruby bindings are available since version 3.4 of Simgrid
-for MSG Module, and we are currenlty working on bindings for other modules.
-
-
-\subsubsection faq_binding_lua_about What is lua ?
-Lua is a lightweight, reflective, imperative and functional programming language,
- designed as a scripting language with extensible semantics as a primary goal (see official web site <a href="http://www.lua.org">here</a>).
-\subsubsection faq_binding_lua_why Why lua ?
-Lua is a fast, portable and powerful script language, quite simple to use for developpers.
-it combines procedural features with powerful data description facilities,
- by using a simple, yet powerful, mechanism of tables.
-Lua has a relatively simple C API compared to other scripting languages,
-and accordingly it provides a robust, easy to use it.
-\subsubsection faq_binding_lua_simgrid How to use lua in Simgrid ?
-Actually, the use of lua in Simgrid is quite simple, you have just to follow the same steps as coding with C in Simgird :
-  - Coding functions coresponding to each process
-  - loading the platforme/deployment XML file that describe the environment of simulation
-  - and … Running the Simulation.
-  
-\dontinclude lua/masterslave/master.lua
-\subsubsection faq_binding_lua_example_master_slave Master/Slave Example
-
- \li Master Code
- \until end_of_master
-we mainly  use   simgrid.Task.new(task_name,computation_size,communication_size) to create our MSG Task, 
-        then simgrid.Task.send(task,alias) to send it.
-we use also simgrid.Task.name(task), to get the task's name. 
-
-\dontinclude lua/masterslave/slave.lua
-\li Slave Code
-\until end_of_slave
-Here, we see the use of simgrid.Task.recv(alias) to receive a task with a specific alias,
-this function return directly the task recevied.
-
-\dontinclude lua/masterslave/master_slave.lua
-\li Set Environmenet and run application
-\until simgrid.clean()
-
-\subsubsection faq_binding_lua_example_data Exchanging Data
-You can also exchange data between Process using lua. for that, you have to deal with lua task as a table,
-since lua is based itself on a mechanism of tables,
-so you can exchange any kind of data (tables, matrix, strings,…) between process via tasks.
-
-\li Sender process
-\verbatim 
-  task = simgrid.Task.new("data_task",task_comp,task_comm);
-  task['matrix'] = my_matrix;
-  task['table'] = my_table;
-  task['message'] = "Hello from (Lua || Simgrid ) !! "
-  …
-  simgrid.Task.send(task,alias)
-\endverbatim
-       After creating task, we associate to it various kind of data with a specific key (string in this case)
-       to distinguish between data variables. The receiver will use this key to access easily to datas.
-
-
-\li Receiver processe
-\verbatim
-  task = simgrid.Task.recv(alias);
-  sender_matrix = task['matrix'];
-  sender_table = task['table'];
-  sender_message = task['message']
-  ...
-\endverbatim
-       Note that in lua, both sender and receiver share the same lua task.
-       So that the receiver could joint data directly on the received task without sending it back.
-       You can find  a complet example (matrix multiplication case) in the file example/lua/mult_matrix.lua. 
-
-
-\subsubsection faq_binding_lua_example_bypass Bypass XML
-       maybe you wonder if there is a way to bypass the XML files,
-        and describe your platform directly from the code, with lua bindings it's Possible !! how ?
-       We provide some additional (tricky?) functions in lua that allows you to set up your own platform without using the XML files
-     ( this can be useful for large platforms, so a simple for loop will avoid you to deal with an annoying XML File ;) )
-     
-
-\li set Routing mode
-\verbatim
-   simgrid.AS.new{id="AS0",mode="Full"};
-\endverbatim
-
-\li set Hosts
-\verbatim
-  simgrid.Host.new{id="Tremblay",power=98095000};
-  simgrid.Host.new{id="Jupiter",power=76296000};
-  simgrid.Host.new{id="Fafard",power=76296000};
-  simgrid.Host.new{id="Ginette",power=48492000};
-  simgrid.Host.new{id="Bourassa",power=48492000};
-\endverbatim
-  we use simgrid.Host.new{id=id_host,power=power_host} to instanciate our hosts.
-
-\li set Links
-\verbatim
-  for i=0,11 do
-    simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};    --  some crazy values ;)
-  end
-\endverbatim
-  we used simgrid.Link.new{id=link_id,bandwidth=bw,latency=lat} with a simple for loop to create all links we need (much easier than XML hein ?)
-
-\li set Routes
-\verbatim
--- simgrid.Route.new(src_id,des_id,links_nb,links_list)
-   simgrid.Route.new("Tremblay","Jupiter",1,{"1"});
-   simgrid.Route.new("Tremblay","Fafard",6,{"0","1","2","3","4","8"});
-   simgrid.Route.new("Tremblay","Ginette",3,{"3","4","5"});
-   simgrid.Route.new("Tremblay","Bourassa",7,{"0","1","3","2","4","6","7"});
-
-   simgrid.Route.new("Jupiter","Tremblay",1,{"1"});
-   simgrid.Route.new("Jupiter","Fafard",7,{"0","1","2","3","4","8","9"});
-   simgrid.Route.new("Jupiter","Ginette",4,{"3","4","5","9"});
-   simgrid.Route.new("Jupiter","Bourassa",8,{"0","1","2","3","4","6","7","9"});
-   ...
-\endverbatim
-  for each host you have to specify which route to choose to access to the rest of hosts connected in the grid.
-  
-\li Save platform
-\verbatim
-  simgrid.register_platform();
-\endverbatim
-Don't forget to register your platform, that SURF callbacks starts their work ;)
-
-\li set application
-\verbatim
-   simgrid.Host.setFunction("Tremblay","Master",4,{"20","550000000","1000000","4"});
-   simgrid.Host.setFunction("Bourassa","Slave",1,{"0"});
-   simgrid.Host.setFunction("Jupiter","Slave",1,{"1"});
-   simgrid.Host.setFunction("Fafard","Slave",1,{"2"});
-   simgrid.Host.setFunction("Ginette","Slave",1,{"3"});
-\endverbatim
-  you don't  need to use a deployment XML file, thanks to  simgrid.Host.setFunction(host_id,function,args_number,args_list) 
-  you can associate functions for each host with arguments if needed .
-
-\li
-\verbatim
-   simgrid.register_application();
-\endverbatim
-Yes, Here too you have to resgiter your application before running the simulation.
-
-the full example is distributed in the file examples/lua/master_slave_bypass.lua
-
-\subsection faq_binding_ruby Ruby Binding
-
-
-\subsubsection faq_binding_ruby_simgrid Use Ruby in Simgrid
-Since v3.4, the use of <a href="http://ruby-lang.org">ruby</a> in simgrid is available for the MSG Module.
-you can find almost all MSG functionalities in Ruby code, that allows you to set up your environment, manage tasks between hosts and run the simulation.
-
-\subsubsection faq_binding_ruby_example Master/Slave Ruby Application
-for each process method(master and slave in this example), you have to associate a ruby class, that should inherit from <i>MSG::Process</i> ruby class,
-  with a 'main' function that describe the behaviour of the process during the simulation.
-\li required stuff
-\verbatim
-require 'simgrid'
-include MSG
-\endverbatim
-
-\li Master code
-\verbatim
-class Master < MSG::Process 
-  # main : that function that will be executed when running simulation
-
-  def main(args) # args is an array containing arguments for function master
-   size = args.size
-   for i in 0..size-1
-     MSG::info("args["+String(i)+"]="+args[i])
-   end
-  
-   raise "Master needs 3 arguments" if size < 3 
-   numberOfTask = Integer(args[0]) 
-   taskComputeSize = Float(args[1])
-   taskCommunicationSize = Float(args[2])
-   slaveCount = Integer(args[3]) 
-   
-   # Creates and sends the tasks
-    for i in 0..numberOfTask-1
-     task = Task.new("Task_"+ i.to_s, taskComputeSize , taskCommunicationSize);
-     mailbox = "slave " + (i%slaveCount).to_s
-     MSG::info("Master Sending "+ task.name + " to " + mailbox + " with Comput Size " + 
-           task.compSize.to_s)
-     task.send(mailbox)
-     MSG::info("Master Done Sending " + task.name + " to " + mailbox)
-    end
-  
-   # Sending Finalize MSG::Tasks
-   MSG::info("Master: All tasks have been dispatched. Let's tell everybody the computation is over.")
-   for i in 0..slaveCount-1
-     mailbox = "slave " + i.to_s
-     finalize_task = Task.new("finalize",0,0)
-     finalize_task.send(mailbox)
-   end
-   MSG::info("Master : Everything's Done")
-  end    
-end
-\endverbatim
-
-
-the class MSG::Task contains methods that allows the management of the native MSG tasks.
-in master ruby code we used : 
-  - <i>MSG::Task.new(task_name,compute_size,communication_size)</i> : to instanciate a new task.
-  - <i>MSG::Task.send(mailbox)</i> : to send the task via a mailbox alias.
-  - <i>MSG::Task.name</i> : to get the task's name.
-
-\li Slave code
-\verbatim
-class Slave < MSG::Process
-
-  def main(args)
-    mailbox = "slave " + args[0]
-    for i in 0..args.size-1
-      MSG::debug("args["+String(i)+"]="+args[i])
-    end
-
-    while true
-       MSG::info("Slave '"+ mailbox +"' waiting for new task");
-       task = Task.receive(mailbox)
-       if (task.name == "finalize")
-              break
-       end
-       task.execute
-       MSG::info("Slave '" + mailbox + "' done executing task "+ task.name + ".")
-    end
-    MSG::info("I'm done, see you")
-  end
-end
-\enverbatim
-to receive a task, we use the method <i>MSG::Task.receive(mailbox)</i> that return a MSG:Task object (received task).
-
-\li Main chunk
-
-\verbatim
-require 'simgrid'
-include MSG
-(...)
-
-if (ARGV.length == 2) 
-       MSG.createEnvironment(ARGV[0])
-       MSG.deployApplication(ARGV[1])
-
-else
-
-       MSG.createEnvironment("platform.xml")
-       MSG.deployApplication("deploy.xml")
-end
-MSG.run
-puts "Simulation time : " + MSG.getClock.to_s
-MSG.exit
-\endverbatim
-
-- <i>MSG.createEnvironment(platform_file)</i> : set up the environment
-- <i>MSG.deployApplication(deployment_file)</i> : load the deployment file description.
-- <i>MSG.run</i> : run the simulation
-
-\subsubsection faq_binding_ruby_data Exchanging data 
-ruby bindings provides two ways to exchange data between ruby processes.
-\li MSG::Task.join & MSG::Task.data <br/>
-
-  the MSG::Task class contains 2 methods that allows a data exchange between 2 process.
-  
-  -<i>MSG::Task.join</i> : makes possible to join any kind of ruby data within a task.
-  \verbatim
-   ...
-   myTable = Array.new
-   myTable <<1<<-2<<45<<67<<87<<76<<89<<56<<78<<3<<-4<<99
-   # Creates and send Task With the Table inside
-   task = MSG::Task.new("quicksort_task",taskComputeSize, taskCommunicationSize);
-   task.join(myTable);
-   ...
-   task.send(mailbox);
-   \endverbatim
-   -<i>MSG::Task.data</i> : to access to the data contained into the task.
-   \verbatim
-   ...
-   task = MSG::Task.receive(recv_mailbox.to_s)
-   table = task.data
-   quicksort(table,0,table.size-1)
-   ...
-   \endverbatim
-you can find a complet example illustrating the use of those methods  in file /example/ruby/Quicksort.rb
-
-\li inheritence 
- another 'object-oriented' way to do it, is to make your own 'task' class that inherit from  MSG::Task ,
- and contains data you want to deal with, the only 'tricky' thing is that "the initializer" method has no effect ! 
- the use of some getter/setter methods would be the simple way to manage your data :)
- \verbatim
-class PingPongTask < MSG::Task
-  # The initialize method has no effect 
-  @time 
-  def setTime(t)
-    @time = t
-  end
-  def getTime()
-    return @time
-  end
-end
- \endverbatim
- you can find an example of use in file example/ruby/PingPong.rb
-
-\section faq_troubleshooting Troubleshooting
-
-\subsection faq_trouble_lib_compil SimGrid compilation and installation problems
-
-\subsubsection faq_trouble_lib_config cmake fails!
-
-We know only one reason for the configure to fail:
-
- - <b>You are using a broken build environment</b>\n
-   If symptom is that the configury magic complains about gcc not being able to build
-   executables, you are probably missing the libc6-dev package. Damn Ubuntu.
-
-If you experience other kind of issue, please get in touch with us. We are
-always interested in improving our portability to new systems.
-
-\subsubsection faq_trouble_distcheck Dude! "ctest" fails on my machine!
-
-Don't assume we never run this target, because we do. Check
-http://cdash.inria.fr/CDash/index.php?project=Simgrid (click on
-previous if there is no result for today: results are produced only by
-11am, French time) and
-https://buildd.debian.org/status/logs.php?pkg=simgrid if you don't believe us. 
-
-If it's failing on your machine in a way not experienced by the
-autobuilders above, please drop us a mail on the mailing list so that
-we can check it out. Make sure to read \ref faq_bugrepport before you
-do so.
-
-\subsection faq_trouble_compil User code compilation problems
-
-\subsubsection faq_trouble_err_logcat "gcc: _simgrid_this_log_category_does_not_exist__??? undeclared (first use in this function)"
-
-This is because you are using the log mecanism, but you didn't created
-any default category in this file. You should refer to \ref XBT_log
-for all the details, but you simply forgot to call one of
-XBT_LOG_NEW_DEFAULT_CATEGORY() or XBT_LOG_NEW_DEFAULT_SUBCATEGORY().
-
-\subsubsection faq_trouble_pthreadstatic "gcc: undefined reference to pthread_key_create"
-
-This indicates that one of the library SimGrid depends on (libpthread
-here) was missing on the linking command line. Dependencies of
-libsimgrid are expressed directly in the dynamic library, so it's
-quite impossible that you see this message when doing dynamic linking. 
-
-If you compile your code statically (and if you use a pthread version
-of SimGrid -- see \ref faq_more_processes), you must absolutely
-specify <tt>-lpthread</tt> on the linker command line. As usual, this should
-come after <tt>-lsimgrid</tt> on this command line.
-
-\subsection faq_trouble_errors Runtime error messages
-
-\subsubsection faq_flexml_limit "surf_parse_lex: Assertion `next limit' failed."
-
-This is because your platform file is too big for the parser. 
-
-Actually, the message comes directly from FleXML, the technology on top of
-which the parser is built. FleXML has the bad idea of fetching the whole
-document in memory before parsing it. And moreover, the memory buffer size
-must be determined at compilation time.
-
-We use a value which seems big enough for our need without bloating the
-simulators footprints. But of course your mileage may vary. In this case,
-just edit src/surf/surfxml.l modify the definition of
-FLEXML_BUFFERSTACKSIZE. E.g.
-
-\verbatim
-#define FLEXML_BUFFERSTACKSIZE 1000000000
-\endverbatim
-
-Then recompile and everything should be fine, provided that your version of
-Flex is recent enough (>= 2.5.31). If not the compilation process should
-warn you.
-
-A while ago, we worked on FleXML to reduce a bit its memory consumption, but
-these issues remain. There is two things we should do:
-
-  - use a dynamic buffer instead of a static one so that the only limit
-    becomes your memory, not a stupid constant fixed at compilation time
-    (maybe not so difficult).
-  - change the parser so that it does not need to get the whole file in
-    memory before parsing
-    (seems quite difficult, but I'm a complete newbe wrt flex stuff).
-
-These are changes to FleXML itself, not SimGrid. But since we kinda hijacked
-the development of FleXML, I can grant you that any patches would be really
-welcome and quickly integrated.
-
-<b>Update:</b> A new version of FleXML (1.7) was released. Most of the work
-was done by William Dowling, who use it in his own work. The good point is
-that it now use a dynamic buffer, and that the memory usage was greatly
-improved. The downside is that William also changed some things internally,
-and it breaks the hack we devised to bypass the parser, as explained in 
-\ref faq_flexml_bypassing. Indeed, this is not a classical usage of the
-parser, and Will didn't imagine that we may have used (and even documented)
-such a crude usage of FleXML. So, we now have to repair the bypassing
-functionality to use the lastest FleXML version and fix the memory usage in
-SimGrid.
-
-\subsubsection faq_trouble_gras_transport GRAS spits networking error messages
-
-Gras, on real platforms, naturally use regular sockets to communicate. They
-are deeply hidden in the gras abstraction, but when things go wrong, you may
-get some weird error messages. Here are some example, with the probable
-reason:
-
- - <b>Transport endpoint is not connected</b>: several processes try to open
-   a server socket on the same port number of the same machine. This is
-   naturally bad and each process should pick its own port number for this.\n
-   Maybe, you just have some processes remaining from a previous experiment 
-   on your machine.\n
-   Killing them may help, but again if you kill -KILL them, you'll have to
-   wait for a while: they didn't close there sockets properly and the system
-   needs a while to notice that this port is free again.
-
- - <b>Socket closed by remote side</b>: if the remote process is not
-   supposed to close the socket at this point, it may be dead.
-   
- - <b>Connection reset by peer</b>: I found this on Internet about this
-   error. I think it's what's happening here, too:\n   
-   <i>This basically means that a network error occurred while the client was
-   receiving data from the server. But what is really happening is that the
-   server actually accepts the connection, processes the request, and sends
-   a reply to the client. However, when the server closes the socket, the
-   client believes that the connection has been terminated abnormally
-   because the socket implementation sends a TCP reset segment telling the
-   client to throw away the data and report an error.\n
-   Sometimes, this problem is caused by not properly closing the
-   input/output streams and the socket connection. Make sure you close the
-   input/output streams and socket connection properly. If everything is
-   closed properly, however, and the problem persists, you can work around
-   it by adding a one-second sleep before closing the streams and the
-   socket. This technique, however, is not reliable and may not work on all
-   systems.</i>\n
-   Since GRAS sockets are closed properly (repeat after me: there is no bug
-   in GRAS), it is either that you are closing your sockets on server side
-   before the client get a chance to read them (use gras_os_sleep() to delay
-   the server), or the server died awfully before the client got the data.
-
-\subsubsection faq_trouble_errors_big_fat_warning I'm told that my XML files are too old.
-
-The format of the XML platform description files is sometimes
-improved. For example, we decided to change the units used in SimGrid
-from MBytes, MFlops and seconds to Bytes, Flops and seconds to ease
-people exchanging small messages. We also reworked the route
-descriptions to allow more compact descriptions.
-
-That is why the XML files are versionned using the 'version' attribute
-of the root tag. Currently, it should read:
-\verbatim
-  <platform version="2">
-\endverbatim
-
-If your files are too old, you can use the simgrid_update_xml.pl
-script which can be found in the tools directory of the archive.
-
-\subsection faq_trouble_valgrind Valgrind-related and other debugger issues
-
-If you don't, you really should use valgrind to debug your code, it's
-almost magic.
-
-\subsubsection faq_trouble_vg_longjmp longjmp madness in valgrind
-
-This is when valgrind starts complaining about longjmp things, just like:
-
-\verbatim ==21434== Conditional jump or move depends on uninitialised value(s)
-==21434==    at 0x420DBE5: longjmp (longjmp.c:33)
-==21434==
-==21434== Use of uninitialised value of size 4
-==21434==    at 0x420DC3A: __longjmp (__longjmp.S:48)
-\endverbatim
-
-This is the sign that you didn't used the exception mecanism well. Most
-probably, you have a <tt>return;</tt> somewhere within a <tt>TRY{}</tt>
-block. This is <b>evil</b>, and you must not do this. Did you read the section
-about \ref XBT_ex??
-
-\subsubsection faq_trouble_vg_libc Valgrind spits tons of errors about backtraces!
-
-It may happen that valgrind, the memory debugger beloved by any decent C
-programmer, spits tons of warnings like the following :
-\verbatim ==8414== Conditional jump or move depends on uninitialised value(s)
-==8414==    at 0x400882D: (within /lib/ld-2.3.6.so)
-==8414==    by 0x414EDE9: (within /lib/tls/i686/cmov/libc-2.3.6.so)
-==8414==    by 0x400B105: (within /lib/ld-2.3.6.so)
-==8414==    by 0x414F937: _dl_open (in /lib/tls/i686/cmov/libc-2.3.6.so)
-==8414==    by 0x4150F4C: (within /lib/tls/i686/cmov/libc-2.3.6.so)
-==8414==    by 0x400B105: (within /lib/ld-2.3.6.so)
-==8414==    by 0x415102D: __libc_dlopen_mode (in /lib/tls/i686/cmov/libc-2.3.6.so)
-==8414==    by 0x412D6B9: backtrace (in /lib/tls/i686/cmov/libc-2.3.6.so)
-==8414==    by 0x8076446: xbt_dictelm_get_ext (dict_elm.c:714)
-==8414==    by 0x80764C1: xbt_dictelm_get (dict_elm.c:732)
-==8414==    by 0x8079010: xbt_cfg_register (config.c:208)
-==8414==    by 0x806821B: MSG_config (msg_config.c:42)
-\endverbatim
-
-This problem is somewhere in the libc when using the backtraces and there is
-very few things we can do ourselves to fix it. Instead, here is how to tell
-valgrind to ignore the error. Add the following to your ~/.valgrind.supp (or
-create this file on need). Make sure to change the obj line according to
-your personnal mileage (change 2.3.6 to the actual version you are using,
-which you can retrieve with a simple "ls /lib/ld*.so").
-
-\verbatim {
-   name: Backtrace madness
-   Memcheck:Cond
-   obj:/lib/ld-2.3.6.so
-   fun:dl_open_worker
-   fun:_dl_open
-   fun:do_dlopen
-   fun:dlerror_run
-   fun:__libc_dlopen_mode
-}\endverbatim
-
-Then, you have to specify valgrind to use this suppression file by passing
-the <tt>--suppressions=$HOME/.valgrind.supp</tt> option on the command line.
-You can also add the following to your ~/.bashrc so that it gets passed
-automatically. Actually, it passes a bit more options to valgrind, and this
-happen to be my personnal settings. Check the valgrind documentation for
-more information.
-
-\verbatim export VALGRIND_OPTS="--leak-check=yes --leak-resolution=high --num-callers=40 --tool=memcheck --suppressions=$HOME/.valgrind.supp" \endverbatim
-
-\subsubsection faq_trouble_backtraces Truncated backtraces
-
-When debugging SimGrid, it's easier to pass the
---disable-compiler-optimization flag to the configure if valgrind or
-gdb get fooled by the optimization done by the compiler. But you
-should remove these flag when everything works before going in
-production (before launching your 1252135 experiments), or everything
-will run only one half of the true SimGrid potential.
-
-\subsection faq_deadlock There is a deadlock in my code!!!
-
-Unfortunately, we cannot debug every code written in SimGrid.  We
-furthermore believe that the framework provides ways enough
-information to debug such informations yourself. If the textual output
-is not enough, Make sure to check the \ref faq_visualization FAQ entry to see
-how to get a graphical one.
-
-Now, if you come up with a really simple example that deadlocks and
-you're absolutely convinced that it should not, you can ask on the
-list. Just be aware that you'll be severely punished if the mistake is
-on your side... We have plenty of FAQ entries to redact and new
-features to implement for the impenitents! ;)
-
-\subsection faq_surf_network_latency I get weird timings when I play with the latencies.
-
-OK, first of all, remember that units should be Bytes, Flops and
-Seconds. If you don't use such units, some SimGrid constants (e.g. the
-SG_TCP_CTE_GAMMA constant used in most network models) won't have the
-right unit and you'll end up with weird results.
-
-Here is what happens with a single transfer of size L on a link
-(bw,lat) when nothing else happens.
-
-\verbatim
-0-----lat--------------------------------------------------t
-|-----|**** real_bw =min(bw,SG_TCP_CTE_GAMMA/(2*lat)) *****|
-\endverbatim
-
-In more complex situations, this min is the solution of a complex
-max-min linear system.  Have a look 
-<a href="http://lists.gforge.inria.fr/pipermail/simgrid-devel/2006-April/thread.html">here</a>
-and read the two threads "Bug in SURF?" and "Surf bug not
-fixed?". You'll have a few other examples of such computations. You
-can also read "A Network Model for Simulation of Grid Application" by
-Henri Casanova and Loris Marchal to have all the details. The fact
-that the real_bw is smaller than bw is easy to understand. The fact
-that real_bw is smaller than SG_TCP_CTE_GAMMA/(2*lat) is due to the
-window-based congestion mechanism of TCP. With TCP, you can't exploit
-your huge network capacity if you don't have a good round-trip-time
-because of the acks...
-
-Anyway, what you get is t=lat + L/min(bw,SG_TCP_CTE_GAMMA/(2*lat)).
-
-  * if I you set (bw,lat)=(100 000 000, 0.00001), you get t =  1.00001 (you fully
-use your link)
-  * if I you set (bw,lat)=(100 000 000, 0.0001),  you get t =  1.0001 (you're on the
-limit)
-  * if I you set (bw,lat)=(100 000 000, 0.001),   you get t = 10.001  (ouch!)
-
-This bound on the effective bandwidth of a flow is not the only thing
-that may make your result be unexpected. For example, two flows
-competing on a saturated link receive an amount of bandwidth inversely
-proportional to their round trip time.
-
-\subsection faq_bugrepport So I've found a bug in SimGrid. How to report it?
-
-We do our best to make sure to hammer away any bugs of SimGrid, but this is
-still an academic project so please be patient if/when you find bugs in it.
-If you do, the best solution is to drop an email either on the simgrid-user
-or the simgrid-devel mailing list and explain us about the issue.  You can
-also decide to open a formal bug report using the
-<a href="https://gforge.inria.fr/tracker/?atid=165&group_id=12&func=browse">relevant
-interface</a>. You need to login on the server to get the ability to submit
-bugs. 
-
-We will do our best to solve any problem repported, but you need to help us
-finding the issue. Just telling "it segfault" isn't enough. Telling "It
-segfaults when running the attached simulator" doesn't really help either.
-You may find the following article interesting to see how to repport
-informative bug repports:
-http://www.chiark.greenend.org.uk/~sgtatham/bugs.html (it is not SimGrid
-specific at all, but it's full of good advices).
-
-\author Arnaud Legrand (arnaud.legrand::imag.fr)
-\author Martin Quinson (martin.quinson::loria.fr)
-
-
-*/
-
-******************************************************************
-*              OLD CRUFT NOT USED ANYMORE                        *
-******************************************************************
-
-
-\subsection faq_crosscompile Cross-compiling a Windows DLL of SimGrid from linux
-
-At the moment, we do not distribute Windows pre-compiled version of SimGrid
-because the support for this platform is still experimental. We know that
-some parts of the GRAS environment do not work, and we think that the others
-environments (MSG and SD) have good chances to work, but we didn't test
-ourselves. This section explains how we generate the SimGrid DLL so that you
-can build it for yourself. First of all, you need to have a version more
-recent than 3.1 (ie, a SVN version as time of writting).
-
-In order to cross-compile the package to windows from linux, you need to
-install mingw32 (minimalist gnu win32). On Debian, you can do so by
-installing the packages mingw32 (compiler), mingw32-binutils (linker and
-so), mingw32-runtime.
-
-You can use the VPATH support of configure to compile at the same time for
-linux and windows without dupplicating the source nor cleaning the tree
-between each. Just run bootstrap (if you use the SVN) to run the autotools.
-Then, create a linux and a win directories. Then, type:
-\verbatim  cd linux; ../configure --srcdir=.. <usual configure flags>; make; cd ..
-cd win;  ../configure --srcdir=.. --host=i586-mingw32msvc <flags>; make; cd ..
-\endverbatim
-The trick to VPATH builds is to call configure from another directory,
-passing it an extra --srcdir argument to tell it where all the sources are.
-It will understand you want to use VPATH. Then, the trick to cross-compile
-is simply to add a --host argument specifying the target you want to build
-for. The i586-mingw32msvc string is what you have to pass to use the mingw32
-environment as distributed in Debian.
-
-After that, you can run all make targets from both directories, and test
-easily that what you change for one arch does not break the other one. 
-
-It is possible that this VPATH build thing breaks from time to time in the
-SVN since it's quite fragile, but it's granted to work in any released
-version. If you experience problems, drop us a mail. 
-
-Another possible source of issue is that at the moment, building the
-examples request to use the gras_stub_generator tool, which is a compiled
-program, not a script. In cross-compilation, you need to cross-execute with
-wine for example, which is not really pleasant. We are working on this, but
-in the meanwhile, simply don't build the examples in cross-compilation
-(<tt>cd src</tt> before running make).
-    
-Program (cross-)compiled with mingw32 do request an extra DLL at run-time to be
-usable. For example, if you want to test your build with wine, you should do
-the following to put this library where wine looks for DLLs.
-\verbatim 
-cp /usr/share/doc/mingw32-runtime/mingwm10.dll.gz ~/.wine/c/windows/system/
-gunzip ~/.wine/c/windows/system/mingwm10.dll.gz
-\endverbatim
-
-The DLL is built in src/.libs, and installed in the <i>prefix</i>/bin directory
-when you run make install. 
-
-If you want to use it in a native project on windows, you need to use 
-simgrid.dll and mingwm10.dll. For each DLL, you need to build .def file
-under linux (listing the defined symbols), and convert it into a .lib file
-under windows (specifying this in a way that windows compilers like). To
-generate the def files, run (under linux):
-\verbatim echo "LIBRARY libsimgrid-0.dll" > simgrid.def
-echo EXPORTS >> simgrid.def
-nm libsimgrid-0.dll | grep ' T _' | sed 's/.* T _//' >> simgrid.def
-nm libsimgrid-0.dll | grep ' D _' | sed 's/.* D _//' | sed 's/$/ DATA/' >> simgrid.def
-
-echo "LIBRARY mingwm10.dll" > mingwm10.def
-echo EXPORTS >> mingwm10.def
-nm mingwm10.dll | grep ' T _' | sed 's/.* T _//' >> mingwm10.def
-nm mingwm10.dll | grep ' D _' | sed 's/.* D _//' | sed 's/$/ DATA/' >> mingwm10.def
-\endverbatim
-
-To create the import .lib files, use the <tt>lib</tt> windows tool (from
-MSVC) the following way to produce simgrid.lib and mingwm10.lib
-\verbatim lib /def:simgrid.def
-lib /def:mingwm10.def
-\endverbatim
-
-If you happen to use Borland C Builder, the right command line is the
-following (note that you don't need any file.def to get this working).
-\verbatim implib simgrid.lib libsimgrid-0.dll
-implib mingwm10.lib mingwm10.dll
-\endverbatim
-
-Then, set the following parameters in Visual C++ 2005:
-Linker -> Input -> Additional dependencies = simgrid.lib mingwm10.lib
-
-Just in case you wonder how to generate a DLL from libtool in another
-project, we added -no-undefined to any lib*_la_LDFLAGS variables so that
-libtool accepts to generate a dynamic library under windows. Then, to make
-it true, we pass any dependencies (such as -lws2 under windows or -lpthread
-on need) on the linking line. Passing such deps is a good idea anyway so
-that they get noted in the library itself, avoiding the users to know about
-our dependencies and put them manually on their compilation line. Then we
-added the AC_LIBTOOL_WIN32_DLL macro just before AC_PROG_LIBTOOL in the
-configure.ac. It means that we exported any symbols which need to be.
-Nowadays, functions get automatically exported, so we don't need to load our
-header files with tons of __declspec(dllexport) cruft. We only need to do so
-for data, but there is no public data in SimGrid so we are good.
-
-
index cfeb963..52afb5b 100644 (file)
@@ -6,7 +6,8 @@ if(WIN32)
     SET(CMAKE_RC_COMPILER "windres")
 endif(WIN32)
 
-project(HelloWorld C)
+project(MY_SIMGRID_PROJECT C)
+
 set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE)
 set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE)
 
@@ -27,15 +28,19 @@ else("$ENV{SIMGRID_ROOT}" STREQUAL "")
     message(STATUS "Looking for lib Simgrid - found") 
 endif("$ENV{SIMGRID_ROOT}" STREQUAL "")
 
-###########
-# TARGETS #
-###########
+################
+# FIND TARGETS #
+################
+file(GLOB SOURCE_FILE
+RELATIVE ${CMAKE_HOME_DIRECTORY}/
+"*.c"
+)
+string(REPLACE ".c" "" TARGET_NAME ${SOURCE_FILE})
 
-#########################
-# add_executable        #
-#    args1 target name  #
-#    args2 sources      #
-#########################
-add_executable(HelloWorld HelloWorld.c)
-# Any targets need to be linked with simgrid and pcre
-target_link_libraries(HelloWorld simgrid pcre) 
+foreach(target "${TARGET_NAME}")
+    add_executable(${target} "${target}.c")
+    message(STATUS "source_file: ${target}.c")
+    message(STATUS "target name: ${target}.exe")
+    # Any targets need to be linked with simgrid and pcre
+    target_link_libraries(${target} simgrid pcre) 
+endforeach(target ${SOURCE_FILE})
index 9454da7..858e0e2 100644 (file)
@@ -13,6 +13,7 @@ endif(APPLE)
 find_library(PATH_PCRE_LIB 
        NAMES pcre
     HINTS
+    $ENV{SIMGRID_PCRE_LIBRARY_PATH}
     $ENV{LD_LIBRARY_PATH}
     $ENV{PCRE_LIBRARY_PATH}
     PATH_SUFFIXES lib/ GnuWin32/lib
@@ -23,8 +24,17 @@ find_library(PATH_PCRE_LIB
     /sw
     /usr)
     
+string(REGEX MATCH ".dll.a" operation "${PATH_PCRE_LIB}")
+
+if(NOT operation)
+    if(WIN32)
+           set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-DPCRE_STATIC ")
+    endif(WIN32)
+endif(NOT operation)
+
 find_path(PATH_PCRE_H "pcre.h"
     HINTS
+    $ENV{SIMGRID_PCRE_LIBRARY_PATH}
     $ENV{LD_LIBRARY_PATH}
     $ENV{PCRE_LIBRARY_PATH}
     PATH_SUFFIXES include/ GnuWin32/include
@@ -34,8 +44,6 @@ find_path(PATH_PCRE_H "pcre.h"
     /opt/csw
     /sw
     /usr)
-    
-set(HAVE_PCRE_LIB 0)
 
 message(STATUS "Looking for pcre.h")
 if(PATH_PCRE_H)
@@ -51,6 +59,27 @@ else(PATH_PCRE_LIB)
 message(STATUS "Looking for lib pcre - not found")
 endif(PATH_PCRE_LIB)
 
+if(WIN32)
+    find_path(PATH_PCRE_LICENCE "LICENCE"
+        HINTS
+        $ENV{SIMGRID_PCRE_LIBRARY_PATH}
+        $ENV{LD_LIBRARY_PATH}
+        $ENV{PCRE_LIBRARY_PATH}
+        PATH_SUFFIXES GnuWin32
+        PATHS
+        /opt
+        /opt/local
+        /opt/csw
+        /sw
+        /usr)
+    message(STATUS "Looking for pcre licence")
+    if(PATH_PCRE_LICENCE)
+    message(STATUS "Looking for pcre licence - found")
+    else(PATH_PCRE_LICENCE)
+    message(STATUS "Looking for pcre licence - not found")
+    endif(PATH_PCRE_LICENCE)
+endif(WIN32)
+
 if(PATH_PCRE_LIB AND PATH_PCRE_H)
     string(REGEX REPLACE "/libpcre.*[.]${LIB_EXE}$" "" PATHLIBPCRE "${PATH_PCRE_LIB}")
     string(REGEX REPLACE "/pcre.h" "" PATH_PCRE_H "${PATH_PCRE_H}")
@@ -62,9 +91,8 @@ if(PATH_PCRE_LIB AND PATH_PCRE_H)
        if(NOT operation)
            SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${PATH_PCRE_H} ")
        endif(NOT operation)       
-    set(HAVE_PCRE_LIB 1)
 else(PATH_PCRE_LIB)
-    message(FATAL_ERROR "Please install the libpcre3-dev package or equivalent before using it.")
+    message(FATAL_ERROR "Please install the libpcre3-dev package or equivalent before using SimGrid.")
 endif(PATH_PCRE_LIB AND PATH_PCRE_H)
     
 mark_as_advanced(PATH_PCRE_H)
diff --git a/doc/all.bib b/doc/all.bib
deleted file mode 100644 (file)
index 365eb28..0000000
+++ /dev/null
@@ -1,1151 +0,0 @@
-@InProceedings{ cb11:pdp2011,
-  author = "Bogdan Florin Cornea and Julien Bourgeois",
-  title = "Performance Prediction of Distributed Applications Using Block Benchmarking Methods",
-  booktitle = "PDP '11: 19th International Euromicro Conference on Parallel, Distributed and Network-Based Processing",
-  abstract = "An ongoing work is presented for accurately predicting the performance of distributed applications in heterogeneous systems. We are developing dPerf, a tool built using the Rose framework for performing static analysis and an automatic instrumentation on the input source code of programs written in C, C++ or Fortran. The accuracy in predicting program computation time resides in using hardware counters, as well as in applying two block benchmarking techniques that we propose in this paper. The current work makes use of a network simulator in order to calculate the communication time used in our approach. Afterwards, the computation and communication times are being summed up obtaining an estimation of the distributed application execution time. The approach is proven experimentally using NAS Integer Sort benchmark, the communications being simulated with SimGrid.",
-  year = 2011,
-  keywords = "dPerf, performance prediction, block benchmarking, static analysis, trace-based simulation, heterogeneous systems, MPI, P2PSAP",
-  publisher = "IEEE Computer Society",
-  category = {extern}
-}
-
-@article{cds10_jpdc,
-  title = {{On Cluster Resource Allocation for Multiple Parallel Task
-  Graphs}},
-  author = {Casanova, Henri and Desprez, Fr\'ed\'eric and
-                  Suter, Fr{\'e}d{\'e}ric},
-  JOURNAL={Journal of Parallel and Distributed Computing},
-  VOLUME=70,
-  NUMBER=12,
-  PAGES={1193--1203},
-  MONTH = Dec,
-  YEAR=2010,
-  category = {intra}
-}
-
-@InProceedings{c7,
-  Address = {Perth, Australia},
-  Author = {Caniou, Yves and Charrier, Ghislain and Desprez, Fr\'ed\'eric},
-  Booktitle = {Proceedings of the 9th Australasian Symposium on Parallel and Distributed 
-    Computing (AusPDC 2011)},
-  Editor = {ACM},
-  Month = {January 17-20},
-  Note = {To appear},
-  Pages = {10},
-  Title  = {{Evaluation of Reallocation Heuristics for Moldable Tasks 
-    in Computational Grids}},
-  Year = {2011},
-  category = {extern}
-}
-
-@inproceedings{c6,
-  Address = {Heraklion, Crete, Greece},
-  Author = {Caniou, Yves and Charrier, Ghislain and Desprez Fr\'ed\'eric},
-  Booktitle = {Proceedings of the IEEE International Conference on
-                  Cluster Computing (Cluster 2010)},
-  Month = Sep,
-  Pages = {284--291},
-  Title = {{Analysis of Tasks Reallocation in a Dedicated Grid Environment}},
-  Year = 2010,
-  category = {extern}
- }
-
-
-
-@InProceedings{jedule,
-  author =      {Hunold, Sascha and Hoffmann, Ralf and Suter, Fr\'ed\'eric},
-  title =       {{Jedule: A Tool for Visualizing Schedules of
-                  Parallel Applications}},
-  booktitle = {Proceedings of the 1st International Workshop on
-                  Parallel Software Tools and Tool Infrastructures
-                  (PSTI'10)},
-  year =        2010,
-  address =     {San Diego, CA},
-  pages = {169-178},
-  month =       Sep,
-  category = {core}
-}
-
-@InProceedings{MAGS,
-  author =       {Casanova, Henri and Desprez, Fr\'ed\'eric and Suter, Fr\'ed\'eric},
-  title =        {{Minimizing Stretch and Makespan of Multiple
-                  Parallel Task Graphs via Malleable Allocations}},
-  booktitle = {Proceedings of the 39th International Conference on
-                  Parallel Processing (ICPP'10)},
-  year =         2010,
-  address =      {San Diego, CA},
-  pages  = {71-80},
-  month =        Sep,
-  category = {core}
-}
-
-
-
-@INPROCEEDINGS{Boutamine06,
-AUTHOR = "Boutammine, Salah-Salim and Millot, Daniel and Parrot, Christian",
-TITLE = {"A Runtime Scheduling Method for Dynamic and Heterogeneous
-                  Platforms"},
-BOOKTITLE = "Proceedings of 5th Workshop on Compile and Runtime
-                  Techniques for Parallel Computing",
-ADDRESS = "Colombus, OH",
-YEAR = 2006,
-month = Aug,
-pages = {273-282},
-category = {extern}
-}
-
-@INPROCEEDINGS{Boutamine06*2,
-AUTHOR = "Boutammine, Salah-Salim and Millot, Daniel and Parrot,
-                  Christian",
-TITLE = {"An adaptative Scheduling Method for Grid Computing"},
-BOOKTITLE = "Proceedings of the 12th International Euro-Par 
-Conference (Euro-Par 2006)",
-ADDRESS = "Dresden, Germany",
-YEAR = 2006,
-publisher = {Springer},
-series    = {Lecture Notes in Computer Science},
-volume    = {4128},
-pages = {188-197}, 
-month = Aug,
-category = {extern}
-}
-
-@INPROCEEDINGS{Boutamine06*3,
-AUTHOR = "Boutammine, Salah-Salim and Millot, Daniel and Parrot,
-                  Christian",
-TITLE = {"Dynamically Scheduling Divisible Load for Grid 
-Computing"},
-BOOKTITLE = "Proceedings of the 2nd International Conference High 
-Performance Computing and Communications (HPCC 2006)",
-ADDRESS = "Munich, Germany",
-YEAR  = 2006,
-pages = {763-772},
-month = Sep,
-publisher = {Springer},
-series    = {Lecture Notes in Computer Science},
-volume    = 4208,
-category = {extern}
-}
-
-@INPROCEEDINGS{Millot08,
-AUTHOR = "Millot, Daniel and Parrot, Christian",
-TITLE  = {"Contention-Free Scheduling in a Dynamic Context"},
-BOOKTITLE     = "Proceedings of the 14th International Conference on 
-Parallel and Distributed Systems (ICPADS'08)",
-ADDRESS         = "IEEE Computing Society Press ",
-YEAR                 = "2008",
-month = Dec,
-pages = {19-28},
-category = {extern}
-}
-
-@InProceedings{ns-cram,
-  author =       {N'takp{\'e}, Tchimou and Suter,  Fr{\'e}d{\'}eric},
-  title =        {{Concurrent Scheduling of Parallel Task Graphs on
-                  Multi-Clusters Using Constrained Resource
-                  Allocations}},
-  booktitle = {Proceedings of the 10th IEEE International Workshop on
-                  Parallel and Distributed Scientific and Engineering
-                  Computing (PDSEC)},
-  year =         2009,
-  address = {Rome, Italy},
-  month =        May,
-  category = {intra}
-}
-
-@InProceedings{RATS,
-  author =      {Hunold, Sascha and Rauber, Thomas and Suter,
-                  Fr{\'e}d{\'}eric},
-  title =       {{Redistribution Aware Two Step Scheduling for Mixed
-                  Parallel Applications}},
-  booktitle = {Proceedings of the IEEE International Conference on
-                  Cluster Computing (Cluster'08)},
-  year =        2008,
-  pages = {50-58},
-  address =     {Tsukuba, Japan},
-  month =       Sep,
-  category = {extern}
-}
-
-@InProceedings {DCLV_LSAP_10,
-  title = {{Fast and Scalable Simulation of Volunteer Computing Systems
-                  Using SimGrid}},
-  booktitle = {Proceedings of the Workshop on Large-Scale System and Application
-                  Performance (LSAP)},
-  year = {2010},
-  month = Jun,
-  address = {Chicago, IL},
-  author = {Donassolo, Bruno and Casanova, Henri and Legrand, Arnaud
-                  and Velho, Pedro},
-  category = {core}
-} 
-
-
-@InProceedings{biCPA,
-  author =       {Desprez, Fr{\'e}d{\'e}ric and Suter, Fr{\'e}d{\'e}ric},
-  title =        {{A Bi-Criteria Algorithm for Scheduling
-   Parallel Task Graphs on Clusters}},
-  booktitle = {Proceedings of the 10th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid 2010)},
-  year =         2010,
-  address =      {Melbourne, Australia},
-  month =        {May},
-  pages =  {243-252},
-  category = {intra}
-}
-
-@InProceedings{Hunold_ccgrid10,
-  author =       {Hunold},
-  title =        {{Low-Cost Tuning of Two-Step Algorithms for
-                  Scheduling Mixed-Parallel Applications onto
-                  Homogeneous Clusters}},
-  booktitle = {Proceedings of the 10th IEEE/ACM International
-                  Symposium on Cluster, Cloud and Grid Computing
-                  (CCGrid 2010)},
-  year =         2010,
-  address =      {Melbourne, Australia},
-  month =        {May},
-  pages = {253-262},
-  category = {extern}
-}
-
-
-
-@inproceedings{c5,
-  Address = {Sliema, Malta},
-  Author = {Caniou, Yves and Caron, Eddy and Charrier, Ghislain and
-    Desprez, Fr{\'e}d{\'e}ric},
-  Booktitle = {Proceedings of the 3rd International Conference on
-    Advanced Engineering Computing and Applications in Sciences
-    (ADVCOMP'09)},
-  Month = Oct,
-  Pages = {181-186},
-  Title = {{Meta-Scheduling and Task Reallocation in a Grid Environment}},
-  Year = {2009},
-category = {extern}
-}
-
-@InProceedings{beaumont2010ipdps2010_1,
-  title={{On the Importance of Bandwidth Control Mechanisms for
-                  Scheduling on Large Scale Heterogeneous Platforms}},
-  author={Beaumont, Olivier and Rejeb, Hejer},
-  booktitle={Proceedings of the 24th IEEE International Parallel and
-                  Distributed Processing Symposium (IPDPS'10)},
-  year={2010},
-  month = Apr,
-  address = {Atlanta, GO},
-  category = {extern}
-}
-
-
-@InProceedings{beaumont2010ipdps2010_2,
-  title={{Broadcasting on Large Scale Heterogeneous Platforms under
-                  the Bounded Multi-Port Model}},
-  author={Beaumont, Olivier and Eyraud-Dubois, Lionel and Kumar
-                  Agrawal, Shailesh},
-  booktitle={Proceedings of the 24th IEEE International Parallel and
-                  Distributed Processing Symposium (IPDPS'10)},
-  year={2010},
-  month = Apr,
-  address = {Atlanta, GO},
- category = {extern}
-}
-
-
-@InProceedings{beaumont2010line,
-  title={{On-line Allocation of Clients to Multiple Servers on Large
-                  Scale Heterogeneous Systems}},
-  author={Beaumont, Olivier and Eyraud-Dubois, Lionel and Rejeb, Hejer
-                  and Thraves, Christopher},
-  booktitle={Proceedings of the 18th Euromicro International
-                  Conference on Parallel, Distributed and
-                  Network-Based Computing (PDP 2010)},
-  year={2010},
-  address = {Pisa, Italy},
-  month = Feb,
-  pages = {3-10},
- category = {extern}
-}
-
-@InProceedings{beaumont2009allocation,
-  title={{Allocation of Clients to Multiple Servers on Large Scale
-                  Heterogeneous Platforms}},
-  author={Beaumont, Olivier and Eyraud-Dubois, Lionel and Rejeb, Hejer
-                  and Thraves, Christopher},
-  booktitle={Proceedings of the 15th International Conference on Parallel and
-                  Distributed Systems (ICPADS 2009)},
-  pages={142--149},
-  address = {Shenzhen, China},
-  month = Dec,
-  year=2009,
-  category = {extern}
-}
-
-
-
-@inproceedings{Banino-RokkonesBR08,
-  author    = {Banino-Rokkones, Cyril and Beaumont, Olivier and Rejeb,
-                  Hejer},
-  title     = {{Scheduling Techniques for Effective System
-                  Reconfiguration in Distributed Storage Systems}},
-  booktitle = {Proceedings of the 14th International Conference on
-                  Parallel and Distributed Systems (ICPADS 2008)},
-  year      = 2008,
-  address = {Melbourne, Australia},
-  month = Dec,
-  pages     = {80-87},
- category = {extern}
-}
-
-
-
-@ARTICLE{TPDS09,
-  TITLE={{Scheduling Parallel Task Graphs on (Almost) Homogeneous
-                  Multi-cluster Platforms}},
-  AUTHOR={Dutot, Pierre-Fran{\c c}ois and N'takp\'e, Tchimou and
-                  Suter, Fr\'ed\'eric and Casanova, Henri},
-  JOURNAL={IEEE Transactions on Parallel and Distributed Systems},
-  VOLUME=20,
-  NUMBER=7,
-  PAGES={940--952},
-  YEAR=2009,
-  category = {intra}
-}
-
-@article{10.1109/TC.2009.117,
-author = {Benoit, Anne and Marchal, Loris and Pineau,
-                  Jean-Fran{\c c}ois and Robert, Yves and Vivien
-                  Fr\'ed\'eric},
-title = {{Scheduling Concurrent Bag-of-Tasks Applications on  
-Heterogeneous Platforms}},
-journal ={IEEE Transactions on Computers},
-volume = {59},
-issn = {0018-9340},
-year = {2010},
-pages = {202-217},
-doi = {http://doi.ieeecomputersociety.org/10.1109/TC.2009.117},
-publisher = {IEEE Computer Society},
-address = {Los Alamitos, CA, USA},
-category = {extern}
-}
-
-@inproceedings{1476013,
- author = {Righi, Rodrigo da Rosa and Pilla, La\'{e}rcio Lima and
-                  Carissimi, Alexandre and Navaux, Philippe O. A.},
- title = {{Controlling Processes Reassignment in BSP Applications}},
- booktitle = {Proceedings of the 20th International Symposium on Computer Architecture and High Performance Computing (SBAC-PAD'08)},
- year = {2008},
- pages = {37-44},
- address = {Campo Grande,Brazil},
- month = Oct,
- category = {extern}
-}
-
-@inproceedings{1582179,
- author = {Righi, Rodrigo da Rosa and Pilla, La\'{e}rcio Lima and
-                  Carissimi, Alexandre and Navaux, Philippe and Heiss,
-                  Hans-Ulrich},
- title = {{MigBSP: A Novel Migration Model for Bulk-Synchronous
-                  Parallel Processes Rescheduling}},
- booktitle = {Proceedings of the 11th IEEE International Conference on High Performance Computing and Communications (HPCC'09)},
- year = {2009},
- pages = {585-590},
- address = {Seoul, Korea},
- month = Jun,
- category = {extern}
-}
-
-@inproceedings{1560782,
- author = {Rosa Righi, Rodrigo and Pilla, La\'{e}rcio Lima and
-                  Carissimi, Alexandre Silva and Navaux, Philippe
-                  O. and Heiss, Hans-Ulrich},
- title = {{Applying Processes Rescheduling over Irregular BSP
-                  Application}},
- booktitle = {Proceedings of the 9th International Conference on
-                  Computational Science (ICCS'09)},
- year = {2009},
- pages = {213--223},
- address = {Baton Rouge, LA},
- publisher = {Springer},
- series    = {Lecture Notes in Computer Science},
- volume    = {5544},
- category = {extern}
-}
-
-@InProceedings{Guermouche_Renard_10,
-  author = {Guermouche, Abdou and Renard, H\'el\`ene},
-  booktitle = {Proceedings of the 19th International Heterogeneity in
-                  Computing Workshop (HCW'09)},
-  title = {{A First Step to the Evaluation of SimGrid in the Context of
-                  a Complex Application}},
-  year  = {2010},
-  address = {Atlanta, GO},
-  month = Apr,
-  category = {extern}
-}
-
-@InProceedings{VL_Simutools_09,
-  title = {{Accuracy Study and Improvement of Network Simulation in
-                  the SimGrid Framework}},
-  booktitle = {Proceedings of the 2nd International Conference on
-                  Simulation Tools and Techniques (SIMUTools'09)},
-  year = {2009},
-  author = {Velho, Pedro and Legrand, Arnaud},
-  address = {Rome, Italy},
-  month = Mar,
-  pdf = {http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf},
-  category = {core}
-} 
-
-@InProceedings{simgrid,
-  author =    {Casanova, Henri and Legrand, Arnaud and Quinson, Martin},
-  title =     {{SimGrid: a Generic Framework for Large-Scale Distributed Experiments}},
-  booktitle = {proceedings of the 10th IEEE International Conference on Computer Modeling and Simulation (UKSim)},
-  year =       2008,
-  month =      Apr,
-  address = {Cambridge, UK},
-  category = {core}
-}
-
-@InProceedings{nstools07,
-  title =     {{Speed and Accuracy of Network Simulation in the SimGrid Framework}},
-  author =    {Fujiwara, Kayo  and Casanova, Henri },
-  booktitle = {Proceedings of the First International Workshop on Network Simulation Tools (NSTools)},
-  year =      {2007},
-  address = {Nantes, France},
-  month = Oct,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/fujiwara_nstool2007.pdf},
-  category = {core}
-}
-
-@MastersThesis{msc_kayo,
-  author =      {Fujiwara, Kayo},
-  title =       {{Cost and Accuracy of Packet-Level vs. Analytical
-                  Network Simulations: An Empirical Study}},
-  school =      {Department of Information and Computer Sciences,
-                  University of Hawai`i at Manoa},
-  year =        {2007},
-  month =       apr,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/theses/kayo_fujiwara_MS.pdf},
-  category = {core}
-}
-
-@InProceedings{gras-iasted06,
-  title =     {{Gras: A Research & Development Framework for Grid and P2P Infrastructures}},
-  author =    {Quinson, Martin },
-  booktitle = {Proceedings of the 18th IASTED International Conference
-                  on Parallel and Distributed Computing and Systems
-                  (PDCS'06)},
-  year =      {2006},
-  address = {Dallas, TX},
-  month = Nov,
-  pdf = {http://www.loria.fr/~quinson/Research/Publications/2006-PDCS.pdf},
-  note = {Best paper},
-  category = {core}
-}
-
-@InProceedings{hpdc06,
-  title =     {{The SimGrid Project - Simulation and Deployment of
-                  Distributed Applications}},
-  author =    {Legrand, Arnaud and Quinson, Martin and Fujiwara, Kayo
-                  and Casanova, Henri},
-  booktitle = {Proceedings of the IEEE International Symposium on High
-                  Performance Distributed Computing (HPDC-15)},
-  year =      {2006},
-  month = may,
-  address = {Paris, France},
-  pages = {385-386},
-  note = {Poster},
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/simgrid_hpdc06.pdf},
-  category = {core}
-}
-
-@InProceedings{ccgrid03,
-  title =     {{Scheduling Distributed Applications: the SimGrid
-                  Simulation Framework}},
-  author =    {Legrand, Arnaud and Marchal, Loris and Casanova, Henri},
-  booktitle = {Proceedings of the third IEEE International Symposium
-                  on Cluster Computing and the Grid (CCGrid'03)},
-  year =      2003,
-  address = {Tokyo, Japan},
-  month = {May},
-  pages = {138-145},
-  pdf = {http://www-id.imag.fr/Laboratoire/Membres/Legrand_Arnaud/articles/simgrid2_CCgrid03.pdf},
-  category = {core}
-}
-
-@TechReport{RR2002-40,
-  author =      {Casanova, Henri  and Marchal, Loris },
-  title =       {{A Network Model for Simulation of Grid Application}},
-  institution =  {LIP, ENS Lyon, France},
-  year =        {2002},
-  abstract =     {In this work we investigate network models that can be
-    potentially employed in the simulation of scheduling algorithms for
-    distributed computing applications. We seek to develop a model of TCP
-    communication which is both high-level and realistic. Previous research
-    works show that accurate and global modeling of wide-area networks, such
-    as the Internet, faces a number of challenging issues. However, some
-    global models of fairness and bandwidth-sharing exist, and can be link
-    withthe behavior of TCP. Using both previous results and simulation (with
-    NS), we attempt to understand the macroscopic behavior of
-    TCP communications. We then propose a global model of the network for the
-    Grid platform. We perform partial validation of this model in
-    simulation. The model leads to an algorithm for computing
-    bandwidth-sharing. This algorithm can then be implemented as part of Grid
-    application simulations. We provide such an implementation for the
-    SimGrid simulation toolkit.},
-  type =        {Research Report},
-  ps = {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.z},
-  number =      {2002-40},
-  category = {core}
-}
-    
-
-@TechReport{RR2002-28,
-  author =      {Legrand, Arnaud and Lerouge, Julien },
-  title =       {MetaSimGrid : Towards Realistic Scheduling Simulation of Distributed Applications},
-  institution =  {LIP, ENS Lyon, France},
-  year =        {2002},
-  abstract =     {Most scheduling problems are already hard on homogeneous
-    platforms, they become quite intractable in an heterogeneous
-    framework such as a metacomputing grid. In the best cases, a
-    guaranteed heuristic can be found, but most of the time, it is
-    not possible. Real experiments or simulations are often
-    involved to test or to compare heuristics. However, on a
-    distributed heterogeneous platform, such experiments are
-    technically difficult to drive, because of the genuine
-    instability of the platform. It is almost impossible to
-    guarantee that a platform which is not dedicated to the
-    experiment, will remain exactly the same between two tests,
-    thereby forbidding any meaningful comparison. Simulations are
-    then used to replace real experiments, so as to ensure the
-    reproducibility of measured data. A key issue is the
-    possibility to run the simulations against a realistic
-    environment. The main idea of trace-based simulation is to
-    record the platform parameters today, and to simulate the
-    algorithms tomorrow, against the recorded data: even though it
-    is not the current load of the platform, it is realistic,
-    because it represents a fair summary of what happened
-    previously. A good example of a trace-based simulation tool is
-    SimGrid, a toolkit providing a set of core abstractions and
-    functionalities that can be used to easily build simulators for
-    specific application domains and/or computing environment
-    topologies. Nevertheless, SimGrid lacks a number of convenient
-    features to craft simulations of a distributed application
-    where scheduling decisions are not taken by a single
-    process. Furthermore, modeling a complex platform by hand is
-    fastidious for a few hosts and is almost impossible for a real
-    grid. This report is a survey on simulation for scheduling
-    evaluation purposes and present MetaSimGrid, a simulator built
-    on top of SimGrid.},
-  type =        {Research Report},
-  ps = {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-28.ps.gz},
-  number =      {2002-28},
-  category = {core}
-}
-
-
-       
-@InProceedings{CCGRID.2001,
-author = {Casanova, Henri},
-title = {{Simgrid: A Toolkit for the Simulation of Application Scheduling}},
-booktitle ={Proceedings of the First IEEE International Symposium on Cluster Computing and the Grid (CCGrid'01)},
-year = 2001,
-pages = {430-441},
-  abstract = {Advances in hardware and software technologies have made it
-    possible to deploy parallel applications over increasingly large
-    sets of distributed resources. Consequently, the study of
-    scheduling algorithms for such applications has been an active area
-    of research. Given the nature of most scheduling problems one must
-    resort to simulation to effectively evaluate and compare their
-    efficacy over a wide range of scenarios. It has thus become
-    necessary to simulate those algorithms for increasingly complex
-    distributed, dynamic, heterogeneous environments. In this paper we
-    present SimGrid, a simulation toolkit for the study of scheduling
-    algorithms for distributed application. This paper gives the main
-    concepts and models behind SimGrid, describes its API and
-    highlights current implementation issues. We also give some
-    experimental results and describe work that builds on SimGrid's
-    functionalities.},
-doi = {http://doi.ieeecomputersociety.org/10.1109/CCGRID.2001.923223},
-address = {Brisbane, Australia},
-month = May,
-  category = {core}
-}
-
-    
-@inproceedings{CC09,
-  Address = {Toulouse, France},
-  Author = {Charrier, Ghislain and Caniou, Yves},
-  Booktitle = {Actes des 19\`emes Rencontres francophonnes du Parall{\'e}lisme (RenPar'19)},
-  Month = Sep,
-  Title = {Ordonnancement et r{\'e}allocation de t{\^a}ches sur une grille de calcul},
-  Year = {2009},
-  category = {extern}
-}
-
-@inproceedings{RenparLN09,
-  Address = {Toulouse, France},
-  Author = {Renard, H\'el\`ene },
-  Booktitle = {Actes des 19emes Rencontres francophonnes du
-                  Parall{\'e}lisme (RenPar'19)},
-  Month = Sep,
-  Title = {Comparaisons entre le simulateur SimGrid et une application
-                  r{\'e}elle pour {\'e}valuer les algorithmes
-                  d'{\'e}quilibre de charge et de redistribution de
-                  donn{\'e}es},
-  pdf = {http://www.irit.fr/Toulouse2009/Toulouse2009/papiers/paper10.pdf},
-  Year = {2009},
-  category = {extern}
-}
-
-@inproceedings{1372508,
- author = {Bouabache, Fatiha and Herault, Thomas and Fedak, Gilles and
-                  Cappello, Franck},
- title = {{Hierarchical Replication Techniques to Ensure Checkpoint Storage Reliability in Grid Environment}},
- booktitle = {Proceedings of the Eighth IEEE International Symposium
-                  on Cluster Computing and the Grid (CCGRID'08)},
- year = {2008},
- isbn = {978-0-7695-3156-4},
- pages = {475--483},
- doi = {http://dx.doi.org/10.1109/CCGRID.2008.95},
- address = {Lyon, France},
- month = May,
- category = {extern}
-}
-
-@InProceedings{gallet09,
-  title =     {{Efficient Scheduling of Task Graph Collections on
-                  Heterogeneous Resources}},
-  author =    {Gallet, Matthieu and Marchal, Loris and Vivien,
-                  Fr{\'e}d{\'e}ric },
-  booktitle = {Proceedings of the 23rd IEEE International Parallel and Distributed Processing Symposium (IPDPS'2009)},
-  year =      {2009},
-  address = {Rome, Italy},
-  month = may,
-  category = {extern}
-}
-
-@InProceedings{Kurt09,
-  title =     {{Improving The Scalability of SimGrid Using Dynamic Routing}},
-  author =    {De Munck, Silas and Vanmechelen, Kurt and Broeckhove, Jan},
- booktitle = {Proceedings of the 9th International Conference on
-                  Computational Science (ICCS'09)},
- year = {2009},
- pages = {406-415},
- address = {Baton Rouge, LA},
- publisher = {Springer},
- series    = {Lecture Notes in Computer Science},
- volume    = {5544},
-  category = {extern}
-}
-
-@InProceedings{benoit08,
-  title =     {{Offline and online scheduling of concurrent
-                  bags-of-tasks on heterogeneous platforms}},
-  author =    {Benoit, Anne and Marchal, Loris and Pineau,
-                  Jean-Fran{\,c}ois and Robert, Yves and Vivien,
-                  Fr{\'e}d{\'e}ric},
-  booktitle = {Proceedings of the 10th Workshop on Advances in
-                  Parallel and Distributed Computational Models (APDCM
-                  2008)},
-  year =      {2008},
-  month =  May,
-  address = {Miami, FL},
-  category = {extern}
-}
-
-@InProceedings{Hernandez08,
-  title =     {{Scheduling DAGs on Grids with Copying and Migration}},
-  author =    {Hernandez, Israel and Cole, Murray},
-  booktitle = {Proceedings of the 7th International Conference on
-                  Parallel Processing and Applied Mathematics 2007
-                  (PPAM07)},
-  pages = {1019-1028},
-  year = {2008},
-  address = {Gdansk, Poland},
-  month = Sep,
-  publisher = {Springer},
- series    = {Lecture Notes in Computer Science},
- volume    = {4967},
-  category = {extern}
-}
-
-@InProceedings{Kurt08,
-  title =     {{Scalability of Grid Simulators : An Evaluation}},
-  author =    {Depoorter, wim and De Moor, Nils and Vanmechelen, Kurt
-                  and Broeckhove, Jan},
-  booktitle = {Proceedings of the 14th International Euro-Par
-                  Conference (Euro-Par 2008)},
-  pages = {544-553},
-  year ={2008},
-  publisher = {Springer},
-  address =  {Las Palmas de Gran Canaria, Spain},
-  month = {Aug},
-  series    = {Lecture Notes in Computer Science},
-  volume    = {5168},
-  category = {extern}
-}
-
-@InProceedings{Hunold08,
-  title =     {{Scheduling Dynamic Workflows onto Clusters of Clusters
-                  using Postponing}},
-  author =    {Hunold, Sascha and Rauber, Thomas and Suter,
-                  Fr{\'e}d{\'e}ric },
-  booktitle = {Proceedings of the 3rd International Workshop on Workflow Systems in e-Science (WSES 08)},
-  address= {Lyon, France},
-  month = may,
-  year = {2008},
-  pages = {669-674},
-  category = {extern}
-}
-
-@InProceedings{Heien08,
-  title =     {{Computing Low Latency Batches with Unreliable Workers in Volunteer Computing Environments}},
-  author =    {Heien, Eric  and Fujimoto, Noriyuki and Hagihara, Kenichi },
-  booktitle = {Proceedings of the Workshop on Volunteer Computing and
-                  Desktop Grids (PCGrid 2008)},
-  year = {2008},
-  month = May,
-  address = {Miami, FL},
-  category = {extern}
-}
-
-@InProceedings{Hernandez07,
-  title =     {{Reliable DAG Scheduling with Rewinding and Migration}},
-  author =    {Hernandez, Israel and Cole, Murray},
-  booktitle = {Proceedings of the First International Conference on
-                  Networks for Grid Applications (GridNets07)},
-  year = {2007},
-  address = {Lyon, France},
-  month = Oct,
-  url = {http://portal.acm.org/citation.cfm?id=1386610.1386614},
-  category = {extern}
-}
-
-@InProceedings{Hernandez07*2,
-  title =     {Reactive Grid Scheduling of DAG Applications},
-  author = {Hernandez, Israel and Cole, Murray},
-  booktitle = {Proceedings of the IASTED International Conference on Parallel and Distributed Computing and Networks (PDCN'07)},
-  year = 2007,
-  pages = {90-95},
-  address = {Innsbruck, Austria},
-  month = Feb, 
-  url = {http://www.actapress.com/PaperInfo.aspx?PaperID=29625},
-  category = {extern}
-}
-
-@InProceedings{Hunold07,
-  title =     {{Dynamic Scheduling of Multi-Processor Tasks on Clusters of Clusters}},
-  author =    {Hunold, Sascha and Rauber, Thomas and R\"unger, Gudula},
-  booktitle = {Proceedings of the Sixth International Workshop on Algorithms,
-    Models and Tools for Parallel Computing on Heterogeneous Networks
-    (Heteropar'07)},
-  address = {Austin, TX},
-  month = sep,
-  pages = {507-514},
-  year =  {2007},
-  category = {extern}
-}
-
-@InProceedings{Suter07,
-  title =     {{Scheduling Delta-Critical Tasks in Mixed-Parallel Applications on a National Grid}},
-  author =    {Suter, Fr{\'e}d{\'e}ric },
-  booktitle = {Proceedings of the 8th IEEE/ACM International
-                  Conference on Grid Computing (Grid 2007)},
-  address = {Austin, TX},
-  month = sep,
-  year = {2007},
-  pages = {2-9},
-  category = {extern}
-}
-
-@Article{Berten07,
-  title =     {Brokering strategies in computational grids using stochastic prediction models},
-  author = {Vandy Berten and Bruno Gaujal},
-  journal = {Parallel Computing},
-  volume = 33,
-  number = {4-5},
-  pages = {238-249},
-  year = {2007},
-  url = {http://dev.ulb.ac.be/sched/articles/PARCO.pdf},
-  category = {extern}
-}
-
-@InProceedings{Ferrandiz07,
-  title =     {Managing Scheduling and Replication in the LHC Grid},
-  author = {Thomas Ferrandiz and Vania Marangozova},
-  booktitle = {CoreGrid Workshop on middleware},
-  year = {2007},
-  category = {extern}
-}
-
-@TechReport{Gay06,
-  title =     {Simbatch: an API for simulating and predicting the performance of parallel resources and batch systems.},
-  author =    {Jean-S{\'e}bastien Gay and Yves Caniou},
-  type = {Research Report},
-  number = {6040},
-  institution = {INRIA},
-  month = nov,
-  year = 2006,
-  url = {https://hal.inria.fr/inria-00115880},
-  category = {extern}
-}
-
-@InProceedings{GayRenpar06,
-  title =     {Simbatch : une API pour la simulation et la pr{\'e}diction de performances de syst{\`e}mes batch},
-  author =    {Jean-S{\'e}bastien Gay and Yves Caniou},
-  booktitle = {17{\`e}me Rencontres Francophones du Parall{\'e}lisme, des Architectures et des Syst{\`e}mes, RenPar'17},
-  month = oct,
-  year = 2006,
-  category = {extern}
-}
-
-@InProceedings{Vanderster06,
-  title =     {Metascheduling Multiple Resource Types using the MMKP},
-  author =    {D. Vanderster and N. Dimopoulos and R. Sobie},
-  booktitle = {7th IEEE/ACM International Conference on Grid Computing},
-  address = {Barcelona},
-  month = sep,
-  year = 2006,
-  category = {extern}
-}
-
-@InProceedings{Banino06,
-  title =     {Master-Slave Tasking on Asymmetric Networks},
-  author =    {Cyril Banino-Rokkones and Olivier Beaumont and Lasse Natvig},
-  booktitle = {Proceedings of 12th International Euro-Par Conference, Euro-Par'06},
-  month = aug,
-  year = 2006,
-  pages = {167-176},
-  address = {Dresden, Germany},
-  category = {extern}
-}
-
-@InProceedings{Tchimou06,
-  title =     {Critical Path and Area Based Scheduling of Parallel Task Graphs on Heterogeneous Platforms},
-  author =    {Tchimou N'Takp{\'e} and Fr{\'e}d{\'e}ric Suter},
-  booktitle = {Proceedings of the Twelfth International Conference on Parallel and Distributed Systems (ICPADS)},
-  address = {Minneapolis, MN},
-  month = july,
-  year = 2006,
-  category = {extern}
-}
-
-@InProceedings{Vanderster06*2,
-  title =     {Sensitivity Analysis of Knapsack-based Task Scheduling on the Grid},
-  author =    {D.C. Vanderster and N.J. Dimopoulos},
-  booktitle = {Proceedings of The 20th ACM International Conference on Supercomputing},
-  address = {Cairns, Australia},
-  month = jun,
-  year = 2006,
-  url = {http://portal.acm.org/citation.cfm?id=1183401.1183446&coll=GUIDE&dl=%23url.coll},
-  category = {extern}
-}
-
-@InProceedings{Senger06,
-  title =     {Hierarchical Scheduling of Independent Tasks with Shared Files},
-  author = {H. Senger and F. Silva and W. Nascimento},
-  booktitle = {Proceedings of the Sixth IEEE International Symposium on Cluster Computing and the Grid Workshop (CCGRIDW'06)},
-  address = {Singapore},
-  month = may,
-  year = 2006,
-  url = {http://www.unisantos.br/mestrado/informatica/hermes/File/senger-HierarchicalScheduling-Workshop-TB120.pdf},
-  category = {extern}
-}
-
-@InProceedings{Vanderster06*3,
-  title =     {Evaluation of Knapsack-based Scheduling using the NPACI JOBLOG},
-  author =    {D. Vanderster and N. Dimopoulos and R. Parra-Hernandez and R. Sobie},
-  booktitle = {20th International Symposium on High-Performance Computing in an Advanced Collaborative Environment (HPCS'06)},
-  address = {St. John's, Newfoundland, Canada},
-  month = may,
-  year = 2006,
-  url = {http://doi.ieeecomputersociety.org/10.1109/HPCS.2006.23},
-  category = {extern}
-}
-
-@InProceedings{Ohsaki05,
-  title =     {On Dynamic Resource Management Mechanism using Control Theoretic Approach for Wide-Area Grid Computing},
-  author =    {Hiroyuki Ohsaki and Soushi Watanabe and Makoto Imase},
-  booktitle = {Proceedings of IEEE Conference on Control Applications (CCA 2005)},
-  month = aug,
-  year = 2005,
-  url = {http://www.ispl.jp/~oosaki/papers/Ohsaki05_CCA.pdf},
-  category = {extern}
-}
-
-@InProceedings{Caron05,
-  title =     {Evaluation of Meta-scheduler Architectures and Task Assignment Policies for high Throughput Computing},
-  author =    {Eddy Caron and Vincent Garonne and Andrei Tsaregorodtsev},
-  booktitle = {Proceedings of 4th Internationnal Symposium on Parallel and Distributed Computing Job Scheduling Strategies for Parallel Processing (ISPDC'05)},
-  month = jul,
-  year = 2005,
-  pdf = {http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2005/RR2005-27.pdf},
-  category = {extern}
-}
-
-@InProceedings{Renard05,
-  title =     {Algorithmes de redistribution de donn{\'e}es pour anneaux de processeurs h{\'e}t{\'e}rog{\`e}nes},
-  author =    {H{\'e}l{\'e}ne Renard and Yves Robert and Fr{\'e}d{\'e}ric Vivien},
-  booktitle = {16i{\`e}me Rencontres Francophones du Parall{\'e}lisme des Architectures et des Syst{\`e}mes},
-  address = {Le Croisic, France},
-  month = apr,
-  year = 2005,
-  ps = {http://www.polytech.unice.fr/~hrenard/recherche/Renpar16.ps},
-  category = {extern}
-}
-
-@InProceedings{Caron04,
-  title =     {Deadline Scheduling with Priority for Client-Server Systems on the Grid},
-  author =    {Eddy Caron and P. K. Chouhan and Fr{\'e}d{\'e}ric Desprez},
-  booktitle = {IEEE International Conference On Grid Computing. Super Computing 2004},
-  month = oct,
-  year = 2004,
-  category = {extern}
-}
-
-@InProceedings{Caniou04,
-  title =     {Efficient Scheduling Heuristics for GridRPC Systems},
-  author =    {Yves Caniou and Emmanuel Jeannot},
-  booktitle = {IEEE QoS and Dynamic System workshop (QDS) of International Conference on Parallel and Distributed Systems (ICPADS)},
-  address = {New-Port Beach California, USA},
-  pages = {621-630},
-  month = jul,
-  year = 2004,
-  ps = {http://graal.ens-lyon.fr/~ycaniou/QDS04.ps},
-  category = {extern}
-}
-
-@InProceedings{Santos04,
-  title =     {Exploiting Replication and Data Reuse to Efficiently Schedule Data-intensive Applications on Grids},
-  author =    {E. Santos-Neto and W. Cirne and F. Brasileiro and A. Lima},
-  booktitle = {Proceedings of 10th Job Scheduling Strategies for Parallel Processing},
-  month = jun,
-  year = 2004,
-  pdf = {http://www.lsd.ufcg.edu.br/~elizeu/articles/jsspp.v6.pdf},
-  category = {extern}
-}
-
-@InProceedings{Hernandez04,
-  title =     {Resource Management and Knapsack Formulations on the Grid},
-  author =    {R. Parra-Hernandez and D. Vanderster and N. J. Dimopoulos},
-  booktitle = {Fifth IEEE/ACM International Workshop on Grid Computing (GRID'04)},
-  year = 2004,
-  url = {http://doi.ieeecomputersociety.org/10.1109/GRID.2004.54},
-  category = {extern}
-}
-
-@InProceedings{Ferreto04,
-  title =     {Scheduling BoT Applications in Grids using a Slave Oriented Adaptive Algorithm.},
-  author =    {T. Ferreto and C. A. F. De Rose and C. Northfleet.},
-  booktitle = {Second International Symposium on Parallel and Distributed Processing and Applications (ISPA)},
-  year = {2004},
-  address = {Hong Kong},
-  category = {extern}
-}
-
-@InProceedings{Renard04,
-  title =     {Data redistribution algorithms for heterogeneous processor rings},
-  author =    {H{\'e}l{\'e}ne Renard and Yves Robert and Fr{\'e}d{\'e}ric Vivien},
-  booktitle = {International Conference on High Performance Computing HiPC'2004},
-  year = 2004,
-  pdf = {http://www.polytech.unice.fr/~hrenard/recherche/Hipc.pdf},
-  category = {extern}
-}
-
-@InProceedings{Yao03,
-  title =     {Link-Contention-Aware Genetic Scheduling Using Task Duplication in Grid Environments},
-  author =    {Wensheng Yao and Xiao Xie and Jinyuan You},
-  booktitle = {Grid and Cooperative Computing: Second International Workshop, GCC 2003}, 
-  address = {Shanghai, China}, 
-  month = dec,
-  year = 2003,
-  pdf = {http://www.chinagrid.edu.cn/chinagrid/download/GCC2003/pdf/266.pdf},
-  category = {extern}
-}
-
-@InProceedings{caniou03,
-  title =     {New Dynamic Heuristics in the Client-Agent-Server Model},
-  author =    {Yves Caniou and Emmanuel Jeannot},
-  booktitle = {IEEE 13th Heteregeneous Computing Workshop - HCW'03}, 
-  address = {Nice, France},
-  month = apr,
-  year = 2003,
-  ps = {http://graal.ens-lyon.fr/~ycaniou/HCW03.ps},
-  category = {extern}
-}
-
-@InProceedings{caron03,
-  title =     {A Hierarchical Resource Reservation Algorithm for Network Enabled Servers},
-  author =    {Eddy Caron and Fr{\'e}d{\'e}ric Desprez and Franck Petit and V. Villain},
-  booktitle = {17th International Parallel and Distributed Processing Symposium -- IPDPS'03},
-  address = {Nice - France},
-  month = apr,
-  year =2003,
-  category = {extern}
-}
-
-
-
-
-
-
-
-
-
-@InProceedings{Bertin08,
-  title =     {Toward a Fully Decentralized Algorithm for Multiple Bag-of-tasks Application Scheduling on Grids},
-  author =    {R{\'e}mi Bertin and Arnaud Legrand and Corinne Touati},
-  booktitle = {IEEE/ACM International Conference on Grid Computing (Grid)},
-  address = {Tsukuba, Japan},
-  year = 2008,
-  category = {intra}
-}
-
-@InProceedings{Dubois07,
-  title =     {Assessing the Quality of Automatically Built Network Representations},
-  author =    {Lionel Eyraud-Dubois and Martin Quinson},
-  booktitle = {Seventh IEEE International Symposium on Cluster Computing and the Grid (CCGrid 2007)},
-  month = may,
-  year = 2007,
-  address = {Rio de Janeiro, Brazil},
-  category = {intra}
-}
-
-@InProceedings{Tchimou07,
-  title =     {A Comparison of Scheduling Approaches for Mixed-Parallel Applications on Heterogeneous Platforms},
-  author =    {Tchimou N'takp{\'e} and Fr{\'e}d{\'e}ric Suter and Henri Casanova},
-  booktitle = {6th International Symposium on Parallel and Distributed Computing},
-  address = {Hagenberg, Austria},
-  month = jul,
-  year = 2007,
-  category = {intra}
-}
-
-@InProceedings{Dubois07*2,
-  title =     {A First Step Towards Automatically Building Network Representations},
-  author =    {Lionel Eyraud-Dubois and Arnaud Legrand and Martin Quinson and Fr{\'e}d{\'e}ric Vivien},
-  booktitle = {12th International Euro-Par Conference},
-  month = aug,
-  year = 2007,
-  address = {Rennes, France},
-  category = {intra}
-}
-
-@Article{Beaumont07,
-  title =     {Centralized Versus Distributed Schedulers Multiple Bag-of-Tasks Applications},
-  author =    {Olivier Beaumont and Larry Carter and Jeanne Ferrante and Arnaud Legrand and Loris Marchal and Yves Robert},
-  journal = {IEEE Trans. Parallel Distributed Systems}, 
-  year = 2007,
-  category = {intra}
-}
-
-@InProceedings{Casanova06,
-  title =     {On the Harmfulness of Redundant Batch Requests},
-  author =    {H. Casanova},
-  booktitle = {Proceedings of the IEEE International Symposium on High Performance Distributed Computing (HPDC-15)},
-  address = {Paris, France},
-  month = may,
-  year = 2006,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/hpdc_2006.pdf},
-  category = {intra}
-}
-
-@InProceedings{Cardinale06,
-  title =     {An evaluation of Job Scheduling Strategies for Divisible Loads on Grid Platforms},
-  author =    {Y. Cardinale and H. Casanova},
-  booktitle = {Proceedings of the High Performance Computing & Simulation Conference (HPC&S'06)},
-  address = {Bonn, Germany},
-  month = may,
-  year = 2006,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/cardinale_2006.pdf},
-  category = {intra}
-}
-
-@InProceedings{Beaumont06,
-  title =     {Centralized Versus Distributed Schedulers Multiple Bag-of-Tasks Applications},
-  author =    {Olivier Beaumont and Larry Carter and Jeanne Ferrante and Arnaud Legrand and Loris Marchal and Yves Robert},
-  booktitle = {International Parallel and Distributed Processing Symposium IPDPS'2006},
-  year = 2006,
-  category = {intra}
-}
-
-@Article{Kreaseck05,
-  title =     {Interference-Aware Scheduling}, 
-  author =    {B. Kreaseck and L. Carter and H. Casanova and J. Ferrante and S. Nandy},
-  journal = {International Journal of High Performance Computing Applications (IJHPCA)},
-  year = 2005,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/kreaseck_ijhpca_2005.pdf},
-  category = {intra}
-}
-
-@InProceedings{Suter04,
-  title =     {From Heterogeneous Task Scheduling to Heterogeneous Mixed Data and Task Parallel Scheduling},
-  author =    {F. Suter and V. Boudet and F. Desprez and H. Casanova},
-  booktitle = {Proceedings of Europar, 230--237, (LCNS volume 3149)},
-  year = 2004,
-  month = aug,
-  address = {Pisa, Italy},
-  category = {intra}
-}
-
-@InProceedings{Kreaseck04,
-  title =     {On the Interference of Communication on Computation}, 
-  author =    {B. Kreaseck and L. Carter and H. Casanova and J. Ferrante}, 
-  booktitle = {Proceedings of the workshop on Performance Modeling, Evaluation, and Optimization of Parallel and Distributed Systems},
-  address = {Santa Fe},
-  month = apr,
-  year = 2004,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/k_pmeo2004.pdf
-},
-  category = {intra}
-}
-
-@InProceedings{Yang03,
-  title =     {RUMR: Robust Scheduling for Divisible Workloads}, 
-  author =    {Y. Yang and H. Casanova},
-  booktitle = {Proceedings of the 12th IEEE Symposium on High Performance and Distributed Computing (HPDC-12)},
-  address = {Seattle},
-  month = jun,
-  year = 2003,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/yang_hpdc2003.pdf},
-  category = {intra}
-}
-
-@Article{Faerman03,
-  title =     {Resource Allocation Strategies for Guided Parameter Space Searches},
-  author =    {M. Faerman and A. Birnbaum and F. Berman and H. Casanova},
-  booktitle = {International Journal of High Performance Computing Applications (IJHPCA)},
-  volume = 17,
-  number = 4,
-  pages = {383-402},
-  year = {2003},
-  category = {intra}
-}
-
-@InProceedings{Faerman02,
-  title =     {Resource Allocation for Steerable Parallel Parameter Searches},
-  author =    {M. Faerman and A. Birnbaum and H. Casanova and F. Berman},
-  booktitle = {Proceedings of the Grid Computing Workshop},
-  address = {Baltimore},
-  month = nov,
-  year = 2002,
-  pdf = {http://grail.sdsc.edu/projects/vi_itr/grid02.pdf},
-  category = {intra}
-}
-
-@InProceedings{Smallen01,
-  title =     {Applying Scheduling and Tuning to On-line Parallel Tomography },
-  author =    {Shava Smallen and Henri Casanova and Francine Berman},
-  booktitle = {Proceedings of Supercomputing},
-  year = 2001,
-  category = {intra}
-}
-
-@InProceedings{Casanova00,
-  title =     {Heuristics for Scheduling Parameter Sweep applications in Grid environments},
-  author =    {Henri Casanova and Arnaud Legrand and Dmitrii Zagorodnov and Francine Berman},
-  booktitle = {Proceedings of the 9th Heterogeneous Computing workshop (HCW'2000)},
-  year = 2000,
-  pdf = {http://navet.ics.hawaii.edu/~casanova/homepage/papers/hcw00_pst.pdf}
-}
diff --git a/doc/bindings.doc b/doc/bindings.doc
new file mode 100644 (file)
index 0000000..f88237a
--- /dev/null
@@ -0,0 +1,156 @@
+/*! \page bindings Bindings
+
+\htmlinclude .bindings.doc.toc
+
+\section bindings_binding_Java Java Binding
+<a href="http://simgrid.gforge.inria.fr/simgrid-java/1.0/doc/">Simgrid-Java documentation</a>.
+
+\section bindings_binding_Ruby Ruby Binding
+<a href="http://simgrid.gforge.inria.fr/simgrid-ruby/1.0/doc/">Simgrid-Ruby documentation</a>.
+
+\section bindings_binding_lua Lua Binding
+
+Most of Simgrid modules require a  good level in C programming, since simgrid is used to be as standard C library.
+ Sometime users prefer using some kind of « easy scripts » or a language easier to code with, for their works,
+ which avoid dealing with C errors, and sometime an important  gain of time.
+Besides Java Binding, Lua  and Ruby bindings are available since version 3.4 of Simgrid
+for MSG Module, and we are currenlty working on bindings for other modules.
+
+
+\subsection bindings_binding_lua_about What is lua ?
+Lua is a lightweight, reflective, imperative and functional programming language,
+ designed as a scripting language with extensible semantics as a primary goal (see official web site <a href="http://www.lua.org">here</a>).
+\subsubsection bindings_binding_lua_why Why lua ?
+Lua is a fast, portable and powerful script language, quite simple to use for developpers.
+it combines procedural features with powerful data description facilities,
+ by using a simple, yet powerful, mechanism of tables.
+Lua has a relatively simple C API compared to other scripting languages,
+and accordingly it provides a robust, easy to use it.
+\subsubsection bindings_binding_lua_simgrid How to use lua in Simgrid ?
+Actually, the use of lua in Simgrid is quite simple, you have just to follow the same steps as coding with C in Simgird :
+  - Coding functions coresponding to each process
+  - loading the platforme/deployment XML file that describe the environment of simulation
+  - and … Running the Simulation.
+  
+\dontinclude lua/masterslave/master.lua
+\subsection bindings_binding_lua_example_master_slave Master/Slave Example
+
+ \li Master Code
+ \until end_of_master
+we mainly  use   simgrid.Task.new(task_name,computation_size,communication_size) to create our MSG Task, 
+        then simgrid.Task.send(task,alias) to send it.
+we use also simgrid.Task.name(task), to get the task's name. 
+
+\dontinclude lua/masterslave/slave.lua
+\li Slave Code
+\until end_of_slave
+Here, we see the use of simgrid.Task.recv(alias) to receive a task with a specific alias,
+this function return directly the task recevied.
+
+\dontinclude lua/masterslave/master_slave.lua
+\li Set Environmenet and run application
+\until simgrid.clean()
+
+\subsection bindings_binding_lua_example_data Exchanging Data
+You can also exchange data between Process using lua. for that, you have to deal with lua task as a table,
+since lua is based itself on a mechanism of tables,
+so you can exchange any kind of data (tables, matrix, strings,…) between process via tasks.
+
+\li Sender process
+\verbatim 
+  task = simgrid.Task.new("data_task",task_comp,task_comm);
+  task['matrix'] = my_matrix;
+  task['table'] = my_table;
+  task['message'] = "Hello from (Lua || Simgrid ) !! "
+  …
+  simgrid.Task.send(task,alias)
+\endverbatim
+       After creating task, we associate to it various kind of data with a specific key (string in this case)
+       to distinguish between data variables. The receiver will use this key to access easily to datas.
+
+
+\li Receiver processe
+\verbatim
+  task = simgrid.Task.recv(alias);
+  sender_matrix = task['matrix'];
+  sender_table = task['table'];
+  sender_message = task['message']
+  ...
+\endverbatim
+       Note that in lua, both sender and receiver share the same lua task.
+       So that the receiver could joint data directly on the received task without sending it back.
+       You can find  a complet example (matrix multiplication case) in the file example/lua/mult_matrix.lua. 
+
+
+\subsection bindings_binding_lua_example_bypass Bypass XML
+       maybe you wonder if there is a way to bypass the XML files,
+        and describe your platform directly from the code, with lua bindings it's Possible !! how ?
+       We provide some additional (tricky?) functions in lua that allows you to set up your own platform without using the XML files
+     ( this can be useful for large platforms, so a simple for loop will avoid you to deal with an annoying XML File ;) )
+     
+
+\li set Routing mode
+\verbatim
+   simgrid.AS.new{id="AS0",mode="Full"};
+\endverbatim
+
+\li set Hosts
+\verbatim
+  simgrid.Host.new{id="Tremblay",power=98095000};
+  simgrid.Host.new{id="Jupiter",power=76296000};
+  simgrid.Host.new{id="Fafard",power=76296000};
+  simgrid.Host.new{id="Ginette",power=48492000};
+  simgrid.Host.new{id="Bourassa",power=48492000};
+\endverbatim
+  we use simgrid.Host.new{id=id_host,power=power_host} to instanciate our hosts.
+
+\li set Links
+\verbatim
+  for i=0,11 do
+    simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};    --  some crazy values ;)
+  end
+\endverbatim
+  we used simgrid.Link.new{id=link_id,bandwidth=bw,latency=lat} with a simple for loop to create all links we need (much easier than XML hein ?)
+
+\li set Routes
+\verbatim
+-- simgrid.Route.new(src_id,des_id,links_nb,links_list)
+   simgrid.Route.new("Tremblay","Jupiter",1,{"1"});
+   simgrid.Route.new("Tremblay","Fafard",6,{"0","1","2","3","4","8"});
+   simgrid.Route.new("Tremblay","Ginette",3,{"3","4","5"});
+   simgrid.Route.new("Tremblay","Bourassa",7,{"0","1","3","2","4","6","7"});
+
+   simgrid.Route.new("Jupiter","Tremblay",1,{"1"});
+   simgrid.Route.new("Jupiter","Fafard",7,{"0","1","2","3","4","8","9"});
+   simgrid.Route.new("Jupiter","Ginette",4,{"3","4","5","9"});
+   simgrid.Route.new("Jupiter","Bourassa",8,{"0","1","2","3","4","6","7","9"});
+   ...
+\endverbatim
+  for each host you have to specify which route to choose to access to the rest of hosts connected in the grid.
+  
+\li Save platform
+\verbatim
+  simgrid.register_platform();
+\endverbatim
+Don't forget to register your platform, that SURF callbacks starts their work ;)
+
+\li set application
+\verbatim
+   simgrid.Host.setFunction("Tremblay","Master",4,{"20","550000000","1000000","4"});
+   simgrid.Host.setFunction("Bourassa","Slave",1,{"0"});
+   simgrid.Host.setFunction("Jupiter","Slave",1,{"1"});
+   simgrid.Host.setFunction("Fafard","Slave",1,{"2"});
+   simgrid.Host.setFunction("Ginette","Slave",1,{"3"});
+\endverbatim
+  you don't  need to use a deployment XML file, thanks to  simgrid.Host.setFunction(host_id,function,args_number,args_list) 
+  you can associate functions for each host with arguments if needed .
+
+\li
+\verbatim
+   simgrid.register_application();
+\endverbatim
+Yes, Here too you have to resgiter your application before running the simulation.
+
+the full example is distributed in the file examples/lua/master_slave_bypass.lua
+
+ */
\ No newline at end of file
diff --git a/doc/contrib.doc b/doc/contrib.doc
deleted file mode 100644 (file)
index e85ae94..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*! \page contrib Contrib section
-
-\htmlinclude .contrib.doc.toc
-
-\section contrib_intro A contrib section ? Why ?
-
-Many people have come to ask us more complex examples than the simple ones
-that are distributed with the main branch of the SimGrid project. We do not
-want to include complex examples in the main branch but we think it is a
-good idea that users share their experience. That is why we have created a
-contrib branch that can be used by people who have a nice piece of work
-using SimGrid and accept to share it. The licence of this code should be
-LGPL if possible. If you can't licence your code with LGPL, just tell us
-about it and we will try to sort out whether it makes sense to publish it
-here.
-
-\section contrib_msg  Projects relying on MSG
-
-\subsection contrib_msg_gridmatrix Grid Matrix
-
-<a href="http://research.nektra.com/Grid_Matrix">Grid Matrix</a> is an
-application that lets you create your grid network and simulate the
-execution of distributed applications from a Graphic User Interface
-(GUI).
-
-  - Features:
-    - Complete design of the network.
-    - Bindings for MSG.
-    - Simulation run within the GUI.
-    - Pause / Stop simulation.
-    - Multiple trace options.
-    - Python output and errors redirected to the GUI.
-    - Grid Nodes change their red intensity to show activity.
-    - Custom activity can be set by Python scripts.
-    - Create graphics from scripts.
-  - Requirements:
-    - Microsoft Visual Studio VS2005 SP1 runtime
-  - Future works:
-    - Support other APIs in SimGrid.
-    - Add a form to set process parameters.
-    - Linux support.
-
-This is contributed by Pablo Yabo, and can be found here:
-http://research.nektra.com/Grid_Matrix
-
-\subsection contrib_msg_simboinc SimBoinc
-
-SimBOINC is a simulator for heterogeneous and volatile desktop grids
-and volunteer computing systems. The goal of this project is to
-provide a simulator by which to test new scheduling strategies in
-BOINC, and other desktop and volunteer systems, in general.
-
-It is contributed by Derrick Kondo and can be found here:
-http://simboinc.gforge.inria.fr/
-
-\subsection contrib_msg_garsim GarSim
-
-GarSim is a simulator of a scheduling meta-system or just of a batch
-system. This code is written in C++ and has many dependencies (with
-python, sqlite, some parts of condor, ...). 
-
-It is maintained by Vincent Garonne (garonne::lal.in2p3.fr), and is
-part of the SimGrid SVN (directory contrib/garSim).
-
-\subsection contrib_msg_simbatch Simbatch
-
-This program simulates the behavior of a batch scheduler managing a
-cluster. 
-
-This program is maintained by Jean-Sebastien Gay
-(Jean-Sebastien.Gay at ens-lyon.fr), and is part of the SimGrid SVN
-(directory contrib/Simbatch).
-
-
-\section contrib_gras Projects relying on GRAS
-
-\subsection contrib_gras_alnem ALNeM: Application Level Network Mapping
-
-This program is an application-level network mapper. It performs
-application level measurements and proposes a few reconstruction
-algorithms. 
-
-This program is maintained by Arnaud Legrand, Martin Quinson and
-Lionel Eyraud, and is part of the SimGrid SVN (directory
-contrib/ALNeM).
-
-
-\section contrib_smpi Projects relying on SMPI
-
-(nothing for now)
-
-\section contrib_surf Projects relying on SURF
-
-(nothing for now)
-
-*/
-
-\author Arnaud Legrand (arnaud.legrand::imag.fr)
-\author Martin Quinson (martin.quinson::loria.fr)
-
-
-
diff --git a/doc/gtut-files/.gitignore b/doc/gtut-files/.gitignore
deleted file mode 100644 (file)
index 312ab45..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-01-bones_client
-01-bones_server
-02-simple_client
-02-simple_server
-03-args_client
-03-args_server
-04-callback_client
-04-callback_server
-05-globals_client
-05-globals_server
-06-logs_client
-06-logs_server
-07-timers_client
-07-timers_server
-08-exceptions_client
-08-exceptions_server
-09-simpledata_client
-09-simpledata_server
-10-rpc_client
-10-rpc_server
-11-explicitwait_client
-11-explicitwait_server
index d84463e..f13c7e9 100644 (file)
@@ -43,7 +43,7 @@ int server_release_cb(gras_msg_cb_ctx_t ctx, void *payload)
 {
   server_data_t *globals = (server_data_t *) gras_userdata_get();
 
-  if (xbt_dynar_length(globals->waiting_queue)) {
+  if (!xbt_dynar_is_empty(globals->waiting_queue)) {
     gras_socket_t s;
     xbt_dynar_pop(globals->waiting_queue, &s);
 
index de0bca4..258c628 100644 (file)
@@ -4,7 +4,7 @@
 
 Since GRAS is technically part of the SimGrid project, you have to install
 SimGrid to install GRAS. Doing so is explained in the relevant FAQ section
-(\ref faq_installation). 
+(\ref installSimgrid). 
 
 Newcommers should install the stable release from the tarball, since the 
 snapshots may suffer from (additionnal;) stability issues. Only go for the
diff --git a/doc/history.doc b/doc/history.doc
deleted file mode 100644 (file)
index 9278c59..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*! \page history History of SimGrid 
-
-\htmlinclude .history.doc.toc
-
-Many people have asked about the origins of the SimGrid project, about
-the history of its development up to now, and about plans for the future.
-Here it is, in (perhaps excruciating) details.
-
-\section history_sg SimGrid v1
-
-In 1999 Henri Casanova joined the AppLeS research group in the Computer
-Science and Engineering Department at the University of California at San
-Diego, as a post-doc. The AppLeS group, led by Francine Berman, focused
-mostly on the study of practical scheduling algorithms for parallel
-scientific application on heterogeneous, distributed computing platforms.
-Shortly after  Henri joined the group he faced the need to run simulation
-instead of or in addition to merely running real-world experiments.  At
-that time Arnaud Legrand, a 1st year graduate student at Ecole Normale
-Superieure de Lyon, France, spent 2 months in the  summer in the AppLeS
-group as a visiting student. He worked with Henri that summer on a research
-project as part of which he implemented an ad-hoc simulator.
-
-After Arnaud left UCSD, Henri realized that most likely every researcher
-in the AppLeS group would eventually need to run simulations, and that they
-would most likely all end up rewriting the same code at one point or
-another. He took apart the simulator that Arnaud had developed, an packaged
-it as a more generic simulation framework with a simple API, and called it
-SimGrid v1.0 (a.k.a. SG). This version was simple, and in retrospect a bit
-naive.  However, it was surprisingly useful to study "centralized"
-scheduling (e.g., off-line scheduling of a DAG on a heterogeneous set of
-distributed compute nodes).  SimGrid v1.0 was described in "SimGrid: A
-Toolkit for the Simulation of Application Scheduling, by Henri Casanova, in
-Proceedings of CCGrid 2001". Henri became the first user of SimGrid and
-used it for several research projects from then on.
-
-\section history_msg SimGrid v2
-
-By 2001 time Arnaud was engaged in his Ph.D. thesis work and started
-studying "decentralized" scheduling heuristics, that is ones in which
-scheduling decisions are made by more or less autonomous agents that typicaly have only
-partial knowledge of the applications and/or computing platform. Although
-simulating decentralized scheduling with SimGrid v1.0 was actually possible
-(and done by one Ph.D. student at UCSD in fact!), it was extremely cumbersome
-and limited in scope.  So Arnaud built a layer on top of SG, which he
-called MSG (for Meta-SimGrid).  MSG added threads and introduced the
-concept of independently running simulated processes that performed
-computations and communication tasks in possibly asynchronous fashion. MSG
-was described in "MetaSimGrid : Towards realistic scheduling simulation of
-distributed applications, by Arnaud Legrand and Julien Lerouge, LIP
-Research Report". This resulted in the following layered architecture:
-
-\verbatim
-               (user code)
-               -----------
-               | MSG |   |
-               -------   |
-               |    SG   |
-               -----------\endverbatim
-
-With Henri and some of his students using SG and Arnaud using MSG, the
-project started having a (tiny) user base. It was time to be more ambitious
-and to address one of the key limitation of SG: its inability to simulate
-multi-hop network communications realistically. In the Summer 2003 Loris
-Marchal, a 1st year graduate student at Ecole Normale Superieure, came to
-UCSD to work with Henri. During that summer, based on results in the TCP modeling
-literature,  he implemented a macroscopic network model as part of SG. This
-model dramatically increased the level of realism of SimGrid simulations and
-was initially described in: "A Network Model for Simulation of Grid
-Applications, by Loris Marchal and Henri Casanova, LIP research report".  By
-the end of 2003 the work at UCSD and at Ecole Normale was merged in what
-became SimGrid v2, as described in: "Scheduling Distributed Applications:
-the SimGrid Simulation Framework, by Henri Casanova, Arnaud Legrand, and
-Loris Marchal, in Proceedings of CCGrid 2003".
-
-\section history_gras SimGrid v3
-
-SimGrid v2, with its much improved features and capabilities, garnered a
-larger user base and many friends and collaborators of Arnaud and Henri
-started using it for their research. On these friends was Martin Quinson,
-then a Ph.D. student at Ecole Normale Superieure, who was working in the
-area of distributed resource monitoring systems.  As part of his Ph.D.
-Martin attempted to develop a network topology discovery tool and quickly
-found out that it was difficult and required prototyping in simulation.
-Faced with the perspective of first implementing a throw-away prototype in
-simulation and then reimplementing the whole thing for production, Martin
-started working on a framework that would easily compile the same code in
-"simulation mode" or in "real-world mode". He found this ability
-to be invaluable when developing distributed systems and built his framework,
-called GRAS, on top of MSG (for the simulation mode) and on top of the
-socket layer (for the real-world mode). GRAS is described in "GRAS: A
-Research & Development Framework for Grid and P2P Infrastructures, by
-Martin Quinson, in Proceedings of PDCS 2006". This led to the following
-layered software architecture:
-
-\verbatim
-       (user code for either SG, MSG or GRAS)
-       -----------------------------
-       |   |     |    GRAS API     |
-       |   |     -------------------
-       |   |     |GRAS S | |GRAS R |
-       |   |     --------- ---------
-       |   |    MSG      | |sockets|
-       |   --------------| ---------
-       |        SG       |
-       -------------------\endverbatim
-
-At this point, with more users running more complex
-simulations, it became clear that the initial SG
-foundation inherited from SimGrid v1 was too limiting in terms
-of scalability and performance. In 2005 Arnaud took the bull by the horns
-and replaced SG with a new simulation engine called SURF, thus removing the
-SG API. Users reported acceleration factors of up to 3 orders of magnitude
-when going from SG to SURF. Furthermore, SURF is much more extensible than
-SG ever was and has enabled the evolution of simulation models used by SimGrid. 
-Although it made sense at the time to re-implement GRAS on top of
-SURF, it was never accomplished due to the "too many things to do not
-enough time" syndrome. Martin added a layer on top of GRAS called AMOK, to
-implement high-level services needed by many distributed applications, thus
-leading to the new overall layered architecture:
-
-\verbatim
-   (user code for either MSG or GRAS -- using AMOK or not)
-                          -------
-                          | AMOK|
-        -------------------------
-        |     |    GRAS API     |
-        |     -------------------
-        |     |GRAS S | |GRAS R |
-        |     --------- ---------
-        |    MSG      | |sockets|
-        --------------| ---------
-        |   SURF      |
-        ---------------\endverbatim
-
-This architecture culminated in SimGrid v3! One development worth mentioning
-is that of SimDAG, written by Christophe Thiery during an Internship with
-Martin Quinson. Many users indeed had asked functionality similar to what
-the SG API provided in SimGrid v1 and v2, to study centralized scheduling
-without all the power of the MSG API. SimDAG provides an API 
-especially for this purpose and was integrated in SimGrid v3.1, leading
-to the following layered architecture:
-
-\verbatim
- (user code for either SimDag, MSG or GRAS)
-                             -------
-                             | AMOK|
-    --------------------------------
-    |      |     |    GRAS API     |
-    |      |     -------------------
-    |      |     |GRAS SG| |GRAS RL|
-    |      |     --------- ---------
-    |SimDag|    MSG      | |sockets|
-    |--------------------| ---------
-    |        SURF        |
-    ----------------------\endverbatim
-
-SimGrid 3.2, the current publicly available version as this document is
-being written, implements the above architecture and also provides a
-(partial) port to the Windows operating system.
-
-\section history_ongoing Ongoing Work
-
-As the project advances, it becomes increasingly clearer that there is a need
-for an intermediate layer between the base simulation engine, SURF, and higher
-level APIs. In the previously shown software architecture MSG plays the role
-of an intermediate layer between SURF and GRAS, but is itself a high-level API,
-which is not very good design.  Bruno Donassolo, during an internship with
-Arnaud, has developed an intermediate layer called SIMiX, and both GRAS
-and MSG are being rewritten on top of it. 
-
-Another development is that of SMPI, a framework to run unmodified MPI
-applications in either simulation mode or in real-world mode (sort of GRAS
-for MPI). The development of SMPI, by Mark Stillwell who works with Henri,
-is being greatly simplified thanks to the aforementioned SIMiX layer.
-Finally, somewhat unrelated, is the development of Java bindings for the
-MSG API by Malek Cherier who works with Martin.  The current software
-architecture thus looks as follows:
-
-\verbatim
- (user code for either SimDAG, MSG, GRAS, or MPI)
-    ----------------------------------
-    |      |   |jMSG|    |AMOK|      |
-    |      |   -----|    ------      |
-    |SimDag| MSG    | GRAS    | SMPI |     (Note that GRAS and SMPI also run on top of
-    |      ---------------------------     sockets and MPI, not shown on the figure)
-    |      |           SIMiX         |
-    ----------------------------------
-    |              SURF              |
-    ----------------------------------\endverbatim
-
-While the above developments are about adding simulation functionality, a
-large part of the research effort in the SimGrid project relates to
-simulation models. These models are implemented in SURF, and Arnaud has
-refactored SURF to make it more easily extensible so that one can
-experiment with different models, in particular different network models.
-Pedro Velho, who works with Arnaud, is currently experimenting with several
-new network models. Also, Kayo Fujiwara, who works with Henri, has
-interfaced SURF with (a patched version of) the GTNetS packet-level
-simulator.
-
-The current architecture in the CVS tree at the time this document is
-being written is as follows:
-
-\verbatim
-    ----------------------------------
-    |      |   |jMSG|    |AMOK|      |
-    |      |   ------    ------      |
-    |SimDag| MSG    | GRAS    | SMPI |  (Note that GRAS and SMPI also run on top of
-    |      |        |     -------    |   sockets and MPI, not shown on the figure)
-    |      |        |     |SMURF|    |  
-    |      ---------------------------  
-    |      |          SIMiX          |
-    ----------------------------------
-    |         SURF interface         |
-    ----------------------------------
-    |    SURF kernel   |    | GTNetS |
-    | (several models) |    |        |
-    --------------------    ----------\endverbatim
-
-\section history_future Future Directions
-
-The primary short-term future direction is to develop a distributed version of
-SIMiX to increase the scalability of simulations in terms of memory.  This can be done
-using the GRAS "real world" functionality to run SIMiX in a distributed fashion
-across multiple hosts, thus allowing to run simulations that are not
-limited by the amount of memory on a single host. The simulation itself
-would still be centralized and sequential, meaning that a single simulated
-process would run at a time. Bruno Donassolo is currently working on this
-idea, which is currently called SMURF.
-
-Longer-term  plans include:
-
-       \li More development in AMOK
-       \li Component for simulation visualization 
-       \li Model-checking in GRAS
-       \li True parallel simulation
-
-
-One of the constant challenge in this project is its duality: it is a
-useful tool for scientists (hence our efforts on APIs, portability,
-documentation, etc.), but is it also a scientific project in its own right
-(so that we can publish papers).
-
-
-
-*/
\ No newline at end of file
index b870aa0..07a91f4 100644 (file)
@@ -2,11 +2,21 @@
 
 <center>
 \htmlonly
-<a href="http://simgrid.gforge.inria.fr" border="0"><img align=center src="simgrid_logo.png" alt="SimGrid"></a><br>
+<table width="100%"> 
+       <tr> 
+               <td valign="middle" align="left">                       
+                               <img src="simgrid_logo_2011.png" alt="SimGrid - Scalable simulation of distributed systems, ranging from grids to peer-to-peer systems" />              
+               </td> 
+               <td valign="middle" align="left"> 
+\endhtmlonly
+\htmlinclude .index.doc.toc                    
+\htmlonly
+               </td> 
+       </tr> 
+</table> 
 \endhtmlonly
 </center>
 
-\htmlinclude .index.doc.toc
 SimGrid is a toolkit that provides core functionalities for the simulation
 of distributed applications in heterogeneous distributed environments.
 \htmlonly <!-- ______BODY_BEGIN______ --!> \endhtmlonly
@@ -17,10 +27,10 @@ Grids.
 \htmlonly <!-- ______BODY_END______ --!> \endhtmlonly
 
   - The official webpage is <a href="http://simgrid.gforge.inria.fr/">simgrid.gforge.inria.fr</a>. 
-  - The Frequently Asked Questions are <a href="faq.html">here</a>. 
+  - The Frequently Asked Questions are <a href="http://simgrid.gforge.inria.fr/faq.html">here</a>. 
   - The development webpage is <a href="https://gforge.inria.fr/projects/simgrid//">gforge.inria.fr/projects/simgrid</a>. 
   - The user mailing list is <simgrid-user@lists.gforge.inria.fr>
-  - The SimGrid software package can be downloaded from <a href="https://gforge.inria.fr/frs/?group_id=12">here</a>.
+  - The SimGrid software package can be downloaded from <a href="http://simgrid.gforge.inria.fr/download.php">here</a>.
 <br>
 
 <hr>
@@ -113,10 +123,10 @@ See the \ref XBT_API section for more details.
 \htmlonly <!-- ______BODY_BEGIN______ --!> \endhtmlonly
 <br>
 The SimGrid software package can be downloaded from 
-<a href="https://gforge.inria.fr/frs/?group_id=12">here</a>.<br>
+<a href="http://simgrid.gforge.inria.fr/download.php">here</a>.<br>
 
 If you are interested in the history of SimGrid and in current and planned development,
-you can find out more <a href="history.html">here</a>.
+you can find out more <a href="http://simgrid.gforge.inria.fr/history.html">here</a>.
 
 Any question, remark or suggestion are welcome on the 
 <a href="http://lists.gforge.inria.fr/mailman/listinfo/simgrid-user">SimGrid users
@@ -128,8 +138,6 @@ mailing list</a>.
 \htmlonly
 <center>
 <a href="http://creativecommons.org/licenses/LGPL/2.1/"><img alt="CC-GNU LGPL" border="0" src="http://creativecommons.org/images/public/cc-LGPL-a.png" /></a>
-
-<a href="http://simgrid.gforge.inria.fr/"><img src="http://gforge.org/images/pow-gforge.png" alt="Back to the gforge site" border="0" /></a>
 </center>
 \endhtmlonly
 
diff --git a/doc/index.php.in b/doc/index.php.in
deleted file mode 100644 (file)
index a12483c..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-<?php 
-
-$domain=ereg_replace('[^\.]*\.(.*)$','\1',$_SERVER['HTTP_HOST']);
-$group_name=ereg_replace('([^\.]*)\..*$','\1',$_SERVER['HTTP_HOST']);
-
-echo '<?xml version="1.0" encoding="UTF-8"?>';
-?>
-<!DOCTYPE html
-       PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en   ">
-<link href="doc/doxygen.css" rel="stylesheet" type="text/css">
-<link href="doc/tabs.css" rel="stylesheet" type="text/css">
-
-  <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-       <title><?php echo $project_name; ?></title>
-       <script language="JavaScript" type="text/javascript">
-       <!--
-       function help_window(helpurl) {
-               HelpWin = window.open( helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
-       }
-       // -->
-               </script>
-
-<style type="text/css">
-       <!--
-       BODY {
-               margin-top: 3;
-               margin-left: 3;
-               margin-right: 3;
-               margin-bottom: 3;
-               background: #5651a1;
-       }
-       ol,ul,p,body,td,tr,th,form { font-family: verdana,arial,helvetica,sans-serif; font-size:small;
-               color: #333333; }
-
-       h1 { font-size: x-large; font-family: verdana,arial,helvetica,sans-serif; }
-       h2 { font-size: large; font-family: verdana,arial,helvetica,sans-serif; }
-       h3 { font-size: medium; font-family: verdana,arial,helvetica,sans-serif; }
-       h4 { font-size: small; font-family: verdana,arial,helvetica,sans-serif; }
-       h5 { font-size: x-small; font-family: verdana,arial,helvetica,sans-serif; }
-       h6 { font-size: xx-small; font-family: verdana,arial,helvetica,sans-serif; }
-
-       pre,tt { font-family: courier,sans-serif }
-
-       a:link { text-decoration:none }
-       a:visited { text-decoration:none }
-       a:active { text-decoration:none }
-       a:hover { text-decoration:underline; color:red }
-
-       .titlebar { color: black; text-decoration: none; font-weight: bold; }
-       a.tablink { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
-       a.tablink:visited { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
-       a.tablink:hover { text-decoration: none; color: black; font-weight: bold; font-size: x-small; }
-       a.tabsellink { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
-       a.tabsellink:visited { color: black; text-decoration: none; font-weight: bold; font-size: x-small; }
-       a.tabsellink:hover { text-decoration: none; color: black; font-weight: bold; font-size: x-small; }
-       -->
-</style>
-
-</head>
-
-<body>
-<table border="0" width="100%" cellspacing="0" cellpadding="0">
-
-       <tr>
-        <td style="text-align: left; vertical-align: top;"><a href="http://<?php echo $domain; ?>/projects/<?php echo $group_name; ?>"><img
-          src="simgrid_logo_small.png"
-          style="text-decoration: underline;" border="0" alt="SimGrid">
-          <?php if (date('m') == '04'  && date('d') == '01')  {echo '<img style="text-decoration: underline;" border="0" alt="SimGrid" src="fish.gif">';}?>
-          </a><br>
-        </td>
-         <td style="text-align: left; vertical-align: top;">
-        </td>
-               <td style="text-align: right; vertical-align: top;"><a href="http://<?php echo $domain; ?>"><img src="http://<?php echo $domain; ?>/themes/inria/images/logo.png" border="0" alt="gforge INRIA" width="198" height="52" /></a></td>
-       </tr>
-</table>
-______ONGLETS______
-<table border="0" width="100%" cellspacing="0" cellpadding="0">
-
-       <tr>
-               <td>&nbsp;</td>
-               <td colspan="3">
-
-
-               <!-- start tabs -->
-
-       <tr>
-               <td align="left" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/topleft.png" height="9" width="9" alt="" /></td>
-               <td bgcolor="#E0E0E0" width="30"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="30" height="1" alt="" /></td>
-               <td bgcolor="#E0E0E0"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="1" height="1" alt="" /></td>
-               <td bgcolor="#E0E0E0" width="30"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="30" height="1" alt="" /></td>
-               <td align="right" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/topright.png" height="9" width="9" alt="" /></td>
-       </tr>
-
-       <tr>
-
-               <!-- Outer body row -->
-
-               <td bgcolor="#E0E0E0"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="10" height="1" alt="" /></td>
-               <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
-
-                       <!-- Inner Tabs / Shell -->
-
-                       <table border="0" width="100%" cellspacing="0" cellpadding="0">
-                       <tr>
-                               <td align="left" bgcolor="#ffffff" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/topleft-inner.png" height="9" width="9" alt="" /></td>
-                               <td bgcolor="#ffffff"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="1" height="1" alt="" /></td>
-                               <td align="right" bgcolor="#ffffff" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/topright-inner.png" height="9" width="9" alt="" /></td>
-                       </tr>
-
-                       <tr>
-                               <td bgcolor="#ffffff"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="10" height="1" alt="" /></td>
-                               <td valign="top" width="99%" bgcolor="white">
-
-       <!-- whole page table -->
-<table width="100%" cellpadding="5" cellspacing="0" border="0">
-<tr><td width="65%" valign="top">
-<?php if ($handle=fopen('http://'.$domain.'/export/projtitl.php?group_name='.$group_name,'r')){
-$contents = '';
-while (!feof($handle)) {
-       $contents .= fread($handle, 8192);
-}
-$contents=str_replace("Welcome to", "Welcome to the", $contents);
-fclose($handle);
-echo $contents; } ?>
-______BODY______
-
-</td>
-
-<td width="35%" valign="top">
-
-               <table cellspacing="0" cellpadding="1" width="100%" border="0" bgcolor="#d5d5d7">
-               <tr><td>
-                       <table cellspacing="0" cellpadding="2" width="100%" border="0" bgcolor="#eaecef">
-                               <tr style="background-color:#d5d5d7" align="center">
-                                       <td colspan="2"><span class="titlebar">Project Summary</span></td>
-                               </tr>
-                               <tr align="left">
-                                       <td colspan="2">
-
-<?php if($handle=fopen('http://'.$domain.'/export/projhtml.php?group_name='.$group_name,'r')){
-$contents = '';
-while (!feof($handle)) {
-       $contents .= fread($handle, 8192);
-}
-fclose($handle);
-$contents=str_replace('href="/','href="http://'.$domain.'/',$contents);
-$contents=str_replace('src="/','src="http://'.$domain.'/',$contents);
-echo $contents; } ?>
-<br>
-<hr>
-<br>
-<?php if ($handle=fopen('http://'.$domain.'/export/projnews.php?group_name='.$group_name,'r')){
-$contents = '';
-while (!feof($handle)) {
-       $contents .= fread($handle, 8192);
-}
-fclose($handle);
-$contents=str_replace('href="/','href="http://'.$domain.'/',$contents);
-echo $contents; } ?>
-
-
-                                       </td>
-                               </tr>
-                       </table>
-               </td></tr>
-               </table><p>&nbsp;</p>
-</td></tr>
-               <tr><td align=center>
-                       <a href="http://creativecommons.org/licenses/LGPL/2.1/"><img alt="CC-GNU LGPL" border="0" src="http://creativecommons.org/images/public/cc-LGPL-a.png" /></a>
-               </td></tr>
-</table>
-                       &nbsp;<p>
-                        <center>
-                                Help: <a href="mailto:siteadmin-help@lists.gforge.inria.fr">siteadmin-help@lists.gforge.inria.fr</a> Webmaster: <a href="mailto:webmaster@gforge.inria.fr">webmaster@gforge.inria.fr</a>
-                        </center>
-                       <!-- end main body row -->
-
-
-                               </td>
-                               <td width="10" bgcolor="#ffffff"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="2" height="1" alt="" /></td>
-                       </tr>
-                       <tr>
-                               <td align="left" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/bottomleft-inner.png" height="11" width="11" alt="" /></td>
-                               <td bgcolor="#ffffff"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="1" height="1" alt="" /></td>
-                               <td align="right" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/bottomright-inner.png" height="11" width="11" alt="" /></td>
-                       </tr>
-                       </table>
-
-               <!-- end inner body row -->
-
-               </td>
-               <td width="10" bgcolor="#E0E0E0"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="2" height="1" alt="" /></td>
-       </tr>
-       <tr>
-               <td align="left" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/bottomleft.png" height="9" width="9" alt="" /></td>
-               <td bgcolor="#E0E0E0" colspan="3"><img src="http://<?php echo $domain; ?>/themes/inria/images/clear.png" width="1" height="1" alt="" /></td>
-               <td align="right" bgcolor="#E0E0E0" width="9"><img src="http://<?php echo $domain; ?>/themes/inria/images/tabs/bottomright.png" height="9" width="9" alt="" /></td>
-       </tr>
-</table>
-
-<!-- PLEASE LEAVE "Powered By Gforge" on your site -->
-<br />
-<center>
-<a href="http://gforge.org/"><img src="http://gforge.org/images/pow-gforge.png" alt="Powered By GForge Collaborative Development Environment" border="0" /></a>
-</center>
-
-
-</body>
-</html>
diff --git a/doc/installSimgrid.doc b/doc/installSimgrid.doc
new file mode 100644 (file)
index 0000000..46cfd83
--- /dev/null
@@ -0,0 +1,451 @@
+/*! \page installSimgrid Install Simgrid
+
+\htmlinclude .installSimgrid.doc.toc
+
+\section installSimgrid_cmake Installing the SimGrid library
+
+\subsection installSimgrid_intro Some generalitty
+
+\subsubsection installSimgrid_intro1 What is Cmake?
+
+CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. For more information see official web site <a href="http://www.cmake.org/">here</a>.
+
+\subsubsection installSimgrid_intro2 Why cmake?
+
+CMake permits to developers to compil projects on different plateforms. Then many tools are embedded like ctest for making test, a link to cdash for vizualise results but also test coverage and bug reports. 
+
+\subsubsection installSimgrid_intro3 What cmake need?
+
+CMake needs some prerequists like :
+
+For Unix and MacOS:
+  \li make
+  \li perl and libpcre
+  \li c and c++ compiler
+  \li ccmake for graphical used of CMake
+  \li cmake <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
+
+For Windows :
+  \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
+  \li perl strawberry <a href="http://www.strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0.msi">(download page)</a>
+  \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
+  
+\subsubsection installSimgrid_cmakeoption1 Liste of options
+
+\verbatim
+"cmake -D[name]=[value] ... ./"
+
+[name]         enable_gtnets           [value] ON/OFF or TRUE/FALSE or 1/0
+       enable_lua                      ON/OFF or TRUE/FALSE or 1/0
+       enable_compile_optimizations    ON/OFF or TRUE/FALSE or 1/0
+       enable_compile_warnings         ON/OFF or TRUE/FALSE or 1/0
+       enable_smpi                     ON/OFF or TRUE/FALSE or 1/0
+       enable_maintainer_mode          ON/OFF or TRUE/FALSE or 1/0
+       enable_tracing                  ON/OFF or TRUE/FALSE or 1/0
+       enable_coverage                 ON/OFF or TRUE/FALSE or 1/0
+       enable_memcheck                 ON/OFF or TRUE/FALSE or 1/0
+       enable_model-checking           ON/OFF or TRUE/FALSE or 1/0
+       enable_debug                    ON/OFF or TRUE/FALSE or 1/0
+       enable_jedule                   ON/OFF or TRUE/FALSE or 1/0
+       enable_latency_bound_tracking   ON/OFF or TRUE/FALSE or 1/0
+       enable_lib_static               ON/OFF or TRUE/FALSE or 1/0
+       custom_flags                    <flags>
+       gtnets_path                     <path_to_gtnets_directory>
+       CMAKE_INSTALL_PREFIX            <path_to_install_directory>
+       CMAKE_C_COMPILER                <path_to_compiler>
+       CMAKE_CXX_COMPILER              <path_to_compiler>
+       pipol_user                      <pipol_username>
+\endverbatim
+                                                                                                                                                          
+\subsubsection installSimgrid_cmakeoption2 Options explaination
+
+  \li enable_gtnets : set to true implie that user wants to use gtnets.
+
+  \li enable_lua : set to true implie that user wants to add lua langage into simgrid compilation.
+
+  \li enable_compile_optimizations : add flags "-O3 -finline-functions -funroll-loops -fno-strict-aliasing"
+
+  \li enable_compile_warnings : add flags "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror"
+
+  \li enable_smpi : Set to true if you want to use smpi lib. Actually on simgrid v3.4.1 Mac doesn't support lib smpi.
+
+  \li enable_maintainer_mode : set to true it remakes some files. 
+
+  \li enable_tracing : To enable the generation of simulation traces for visualization.
+
+  \li enable_coverage : When set to true this option enable code coverage by setting -fprofile-arcs -ftest-coverage flags.
+
+  \li enable_memcheck : When set to true this option enable tests for memcheck.
+
+  \li enable_model-checking : Enable the model checking when set to true.
+
+  \li enable_debug : If enable_debug is set to 'off' Simgrid compil flag has '-DNDEBUG' option.
+  
+  \li enable_jedule : To enable jedule mode, which creates visualizations of task schedules with Simdag. 
+  
+  \li enable_latency_bound_tracking : Set to on if you want to be warned when communications are limited by round trip time.
+  
+  \li enable_lib_static : Enable generated Simgrid and smpi static libraries.  
+  
+  \li custom_flags : If user wants to use a specific flag during compilation, give here.
+
+  \li gtnets_path : Path to gtnets install directory (ex /usr)
+
+  \li CMAKE_INSTALL_PREFIX : Path where are installed lib/ doc/ and include/ directories (ex /usr/local)
+  
+  \li CMAKE_C_COMPILER : Change the c compiler.
+  
+  \li CMAKE_CXX_COMPILER : Change the c++ compiler. 
+  
+  \li pipol_user : specify your pipol username if you want to use the pipol-remote command.
+
+\subsubsection installSimgrid_cmakeoption3 Initialisation
+
+Those options are initialized the first time you launch "cmake ." whithout specified option.
+
+\verbatim
+enable_gtnets                  on
+enable_lua                     on
+enable_smpi                    on
+enable_tracing                 on
+enable_compile_optimizations   on
+enable_debug                   on
+enable_compile_warnings                off
+enable_maintainer_mode         off
+enable_coverage                off
+enable_memcheck                off
+enable_model-checking          off
+enable_jedule                  off
+enable_latency_bound_tracking  off 
+enable_lib_static              off
+CMAKE_INSTALL_PREFIX           /usr/local
+custom_flags                   null
+gtnets_path                    null
+pipol_user                     null
+\endverbatim
+
+\subsubsection installSimgrid_cmakeoption4 Option's cache and how to reset?
+
+When options have been set they are keep into a cache file named "CMakeCache.txt". So if you want 
+reset values you just delete this file located to the project directory.
+
+\subsection installSimgrid_cmakecompilation Cmake compilation
+
+\subsubsection installSimgrid_cmakecompilation1 With command line.
+
+On Unix or Mac platform:
+
+\verbatim
+cmake -D[name]=[value] ... ./
+make
+\endverbatim
+
+On Windows platform:
+
+\verbatim
+cmake -G"Unix Makefiles" -D[name]=[value] ... ./
+gmake
+\endverbatim
+
+\subsubsection installSimgrid_cmakecompilation2 With ccmake tool.
+
+\verbatim
+"ccmake ./"
+\endverbatim
+Then follow instructions.
+
+\subsubsection installSimgrid_cmakecompilation2bis Build out of source.
+
+As cmake generate many files used for compilation, we recommand to make a build directory.
+For examples you can make :
+
+\verbatim
+"navarrop@caraja:~/Developments$ cd simgrid/"
+"navarrop@caraja:~/Developments/simgrid$ mkdir build_directory"
+"navarrop@caraja:~/Developments/simgrid$ cd build_directory/"
+"navarrop@caraja:~/Developments/simgrid/build_directory$ cmake ../"
+"navarrop@caraja:~/Developments/simgrid/build_directory$ make"
+\endverbatim
+
+Or complety out of sources :
+
+\verbatim
+"navarrop@caraja:~/Developments$ mkdir build_dir"
+"navarrop@caraja:~/Developments$ cd build_dir/"
+"navarrop@caraja:~/Developments/build_dir$ cmake ../simgrid/"
+"navarrop@caraja:~/Developments/build_dir$ make"
+\endverbatim
+
+Those two kind of compilation permit to delete files created by compilation easier.
+
+\subsubsection installSimgrid_cmakecompilation3 Resume of command line
+
+ \li CMake
+\verbatim
+cmake <path>                   configure the project for Unix and Mac
+cmake -G"Unix Makefiles" <path>        configure the project for Windows
+make                           build all targets for Unix and Mac
+gmake                          buill all targets for windows
+(g)make VERBOSE=1              build all targets and print build command lines
+make check                     test all targets and summarize
+make dist                      make the distrib
+make distcheck                 check the dist (make + make dist + make check) 
+(g)make install                install the project (doc/ bin/ lib/ include/)
+(g)make uninstall              uninstall the project (doc/ bin/ lib/ include/)
+(g)make clean                  clean all targets
+make simgrid_documentation     Create simgrid documentation
+\endverbatim
+
+When the project have been succesfully compiling and build you can make tests.
+
+ \li CTest
+\verbatim
+ctest                  launch only tests
+ctest -D Continuous
+ctest -D Continuous(Start|Update|Configure|Build)
+ctest -D Continuous(Test|Coverage|MemCheck|Submit)
+ctest -D Experimental
+ctest -D Experimental(Start|Update|Configure|Build)
+ctest -D Experimental(Test|Coverage|MemCheck|Submit)
+ctest -D Nightly                               
+ctest -D Nightly(Start|Update|Configure|Build)
+ctest -D Nightly(Test|Coverage|MemCheck|Submit)
+ctest -D NightlyMemoryCheck
+\endverbatim
+
+If you want to test before make a commit you can simply make "ctest -D Experimental" and then you can visualize results submitted into Cdash. <a href="http://cdash.inria.fr/CDash/index.php?project=Simgrid">(Go to Cdash site)</a>.
+
+\subsection installSimgrid_cmakeinstall How to install with cmake?
+
+\subsubsection installSimgrid_cmakeinstall1 From Git. 
+
+\verbatim
+git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid
+cd simgrid
+cmake -Denable_maintainer_mode=on -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
+make 
+make install
+\endverbatim
+
+\subsubsection installSimgrid_cmakeinstall2 From a distrib
+
+\verbatim
+wget https://gforge.inria.fr/frs/download.php/28674/simgrid-3.6.1.tar.gz
+tar xf simgrid-3.6.1.tar.gz
+cd simgrid-3.6.1
+cmake -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
+make
+make install
+\endverbatim
+
+
+\subsection installSimgrid_cmakehowto How to modified sources files for developers
+
+\subsubsection installSimgrid_cmakehowto1 Add an executable or examples.
+
+If you want make an executable you have to create a CMakeList.txt to the src directory. 
+You must specified where to create the executable, source list, dependencies and the name of the binary.
+
+\verbatim
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "./")                       
+set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
+
+add_executable(get_sender get_sender.c)                                        #add_executable(<name_of_target> <src list>)
+
+### Add definitions for compile
+target_link_libraries(get_sender simgrid m pthread)    #target_link_libraries(<name_of_targe> <dependencies>)
+\endverbatim
+
+Then you have to modified <project/directory>/buildtools/Cmake/MakeExeLib.cmake and add 
+this line :
+\verbatim
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
+\endverbatim
+
+\subsubsection installSimgrid_cmakehowto2 Delete/add sources to lib.
+
+If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake
+
+\verbatim
+set(JMSG_JAVA_SRC
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/JniException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/NativeException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/HostNotFoundException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ProcessNotFoundException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Msg.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Process.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Host.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Task.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgNative.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ApplicationHandler.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Sem.java
+)
+\endverbatim
+
+\section installSimgrid_Win Installing the SimGrid library with Windows pakage
+
+\subsection installSimgrid_Win_install Installing SimGrid
+
+Before start the installation, you need to be sure to have the following dependencies:
+  \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
+  \li perl strawberry <a href="http://www.strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0.msi">(download page)</a>
+  \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
+  
+Then download the package <a href="https://gforge.inria.fr/frs/?group_id=12">SimGrid Installer</a>,
+execute it and follow instructions.
+
+\htmlonly
+<a href="win_install_01.png" border=0><img src="win_install_01.png" border=0></a>
+\endhtmlonly
+
+Step 1: Accept the license. 
+
+\htmlonly
+<a href="win_install_02.png" border=0><img src="win_install_02.png" border=0></a>
+\endhtmlonly
+
+Step 2: Select packets to install.
+
+\htmlonly
+<a href="win_install_03.png" border=0><img src="win_install_03.png" border=0></a>
+\endhtmlonly
+
+Step 3: Choice where to install packets previously selected. Please don't use spaces in path.
+\htmlonly
+<a href="win_install_04.png" border=0><img src="win_install_04.png" border=0></a>
+\endhtmlonly
+
+Step 4: Restart your computer to take in consideration environment variables.
+
+\subsection installSimgrid_Win_compile1 Compile a project "HelloWorld"
+
+In the SimGrid install directroy you should have an HelloWorld project to explain you how to start 
+compiling a source file. There are:
+\verbatim
+- HelloWorld.c         The example source file.
+- CMakeLists.txt       It allows to configure the project.
+- FindPCRE.cmake       This finds and links to the pcre library (Normally included into Simgrid directory "GnuWin32").
+- README               This explaination.
+\endverbatim
+
+Now let's compil this example:
+\li Run "Git bash" (installed with git) or windows shell "cmd".
+\li Open HelloWorld Directory ('cd' command line).
+\li Create a build directory and change directory. (optional)
+\li Type 'cmake -G"Unix Makefiles" \<path_to_HelloWorld_project\>'
+\li Run gmake
+\li You should obtain a runnable example ("HelloWorld.exe").
+
+For compiling your own code you can simply copy the HelloWorld project and rename source name. It will
+create a target with the same name of the source. 
+
+\subsection installSimgrid_Win_compile2 How to add and compile a new example
+
+\li Put your source file into the helloWord directory.
+\li Edit CMakeLists.txt by removing the Find Targets section and add those two lines into this section
+\verbatim 
+################
+# FIND TARGETS #
+################
+add_executable(TARGET_NAME SOURCES)            #It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'
+target_link_libraries(TARGET_NAME simgrid pcre) #Links TARGET_NAME with simgrid and pcre
+\endverbatim   
+\li To initialize and build your project, you'll need to run
+\verbatim
+cmake -G"Unix Makefiles" \<path_to_HelloWorld_project\>
+\endverbatim
+\li Run "gmake"
+\li You should obtain "TARGET_NAME.exe".
+
+\section installSimgrid_setting_MSG Setting up your own MSG code
+
+Do not build your simulator by modifying the SimGrid examples.  Go
+outside the SimGrid source tree and create your own working directory
+(say <tt>/home/joe/SimGrid/MyFirstScheduler/</tt>).
+
+Suppose your simulation has the following structure (remember it is
+just an example to illustrate a possible way to compile everything;
+feel free to organize it as you want).
+
+      \li <tt>sched.h</tt>: a description of the core of the
+          scheduler (i.e. which functions are can be used by the
+          agents). For example we could find the following functions
+          (master, forwarder, slave).
+
+      \li <tt>sched.c</tt>: a C file including <tt>sched.h</tt> and
+          implementing the core of the scheduler. Most of these
+          functions use the MSG functions defined in section \ref
+          msg_gos_functions.
+
+      \li <tt>masterslave.c</tt>: a C file with the main function, i.e.
+          the MSG initialization (MSG_global_init()), the platform
+          creation (e.g. with MSG_create_environment()), the
+          deployment phase (e.g. with MSG_function_register() and
+          MSG_launch_application()) and the call to
+          MSG_main()).
+
+To compile such a program, we suggest to use the following
+Makefile. It is a generic Makefile that we have used many times with
+our students when we teach the C language.
+
+\verbatim
+all: masterslave 
+masterslave: masterslave.o sched.o
+
+INSTALL_PATH = $$HOME
+CC = gcc
+PEDANTIC_PARANOID_FREAK =       -O0 -Wshadow -Wcast-align \
+                               -Waggregate-return -Wmissing-prototypes -Wmissing-declarations \
+                               -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
+                               -Wmissing-noreturn -Wredundant-decls -Wnested-externs \
+                               -Wpointer-arith -Wwrite-strings -finline-functions
+REASONABLY_CAREFUL_DUDE =      -Wall
+NO_PRAYER_FOR_THE_WICKED =     -w -O2 
+WARNINGS =                     $(REASONABLY_CAREFUL_DUDE)
+CFLAGS = -g $(WARNINGS)
+
+INCLUDES = -I$(INSTALL_PATH)/include
+DEFS = -L$(INSTALL_PATH)/lib/
+LDADD = -lm -lsimgrid 
+LIBS = 
+
+%: %.o
+       $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@ 
+
+%.o: %.c
+       $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<
+
+clean:
+       rm -f $(BIN_FILES) *.o *~
+.SUFFIXES:
+.PHONY : clean
+
+\endverbatim
+
+The first two lines indicates what should be build when typing make
+(<tt>masterslave</tt>) and of which files it is to be made of
+(<tt>masterslave.o</tt> and <tt>sched.o</tt>). This makefile assumes
+that you have set up correctly your <tt>LD_LIBRARY_PATH</tt> variable
+(look, there is a <tt>LDADD = -lm -lsimgrid</tt>). If you prefer using
+the static version, remove the <tt>-lsimgrid</tt> and add a
+<tt>$(INSTALL_PATH)/lib/libsimgrid.a</tt> on the next line, right
+after the <tt>LIBS = </tt>.
+
+More generally, if you have never written a Makefile by yourself, type
+in a terminal : <tt>info make</tt> and read the introduction. The
+previous example should be enough for a first try but you may want to
+perform some more complex compilations...
+
+\section installSimgrid_setting_GRAS Setting up your own GRAS code
+
+If you use the GRAS interface instead of the MSG one, then previous section
+is not the better source of information. Instead, you should check the GRAS
+tutorial in general, and the \ref GRAS_tut_tour_setup in particular.
+
+
+
+*/
index 7c7eec6..cdad6be 100644 (file)
@@ -1,27 +1,3 @@
-/** \defgroup MSG_JAVA      jMSG
-    \ingroup MSG_API
-    \brief Java bindings to MSG (\ref MSG_API)
-
-    \htmlonly <!-- 
-      DOXYGEN_NAVBAR_LABEL="JAVA bindings" 
-      DOXYGEN_NAVBAR_CHILD "Simulation functions"=classsimgrid_1_1msg_1_1Msg.html
-      DOXYGEN_NAVBAR_CHILD "Host"=classsimgrid_1_1msg_1_1Host.html
-      DOXYGEN_NAVBAR_CHILD "Process"=classsimgrid_1_1msg_1_1Process.html
-      DOXYGEN_NAVBAR_CHILD "Task"=classsimgrid_1_1msg_1_1Task.html      
-      DOXYGEN_NAVBAR_CHILD "MsgException"=classsimgrid_1_1msg_1_1MsgException.html
-    --> \endhtmlonly 
-         
-      MSG was the first distributed programming environment provided within
-      SimGrid. While almost realistic, it remains quite simple (simplistic?).
-      This describes the Java bindings to this interface.
-
-      \section jMSG_who Who should use this (and who shouldn't)
-      
-      You should use MSG if you want to study some heuristics for a
-      given problem you don't really want to implement. If you want to
-      use the Java programming language, your are in the right
-      section. To use the C interface, please refer to \ref MSG_C.
-*/
 
 /** \defgroup MSG_C      MSG native
     \ingroup MSG_API
@@ -38,8 +14,8 @@
       You should use MSG if you want to study some heuristics for a
       given problem you don't really want to implement. If you want to
       use the C programming language, your are in the right
-      section. To use the Java programming interface, please refer to
-      \ref MSG_JAVA.
+      section. To use the Java or Ruby programming interfaces, please refer to
+      the documentation provided in the relevant packages.
 */
 
 
@@ -88,9 +64,9 @@
 /** @addtogroup MSG_LUA
 
   \section MSG_Lua_funct  Lua offered functionnalities in MSG
-   - \ref host_management
-   - \ref tasks_management
-   - \ref environment_management
+   - \ref lua_host_management
+   - \ref lua_tasks_management
+   - \ref lua_environment_management
   \section Lua_examples Examples of lua MSG
  
    - \ref MSG_ex_master_slave_lua
index c2ab8c8..a874b52 100644 (file)
@@ -16,6 +16,7 @@
       - \ref XBT_set 
         Data are associated to both an ID (0(1) search) and a name
       - \ref XBT_fifo
+      - \ref XBT_queue
       - \ref XBT_swag
       - \ref XBT_heap
     - \ref XBT_misc
diff --git a/doc/options.doc b/doc/options.doc
new file mode 100644 (file)
index 0000000..7ded23d
--- /dev/null
@@ -0,0 +1,443 @@
+/*! \page options Simgrid options and configurations
+
+\htmlinclude .options.doc.toc
+
+A number of options can be given at runtime to change the default
+SimGrid behavior. For a complete list of all configuration options
+accepted by the SimGrid version used in your simulator, simply pass
+the --help configuration flag to your program. If some of the options
+are not documented on this page, this is a bug that you should please
+report so that we can fix it.
+
+\section options_using Passing configuration options to the simulators
+
+There is several way to pass configuration options to the simulators.
+The most common way is to use the \c --cfg command line argument. For
+example, to set the item \c Item to the value \c Value, simply
+type the following: \verbatim
+my_simulator --cfg=Item:Value (other arguments)
+\endverbatim
+
+Several \c --cfg command line arguments can naturally be used. If you
+need to include spaces in the argument, don't forget to quote the
+argument. You can even escape the included quotes (write \' for ' if
+you have your argument between ').
+
+Another solution is to use the \c \<config\> tag in the platform file. The
+only restriction is that this tag must occure before the first
+platform element (be it \c \<AS\>, \c \<cluster\>, \c \<peer\> or whatever).
+The \c \<config\> tag takes an \c id attribute, but it is currently
+ignored so you don't really need to pass it. The important par is that
+within that tag, you can pass one or several \c \<prop\> tags to specify
+the configuration to use. For example, setting \c Item to \c Value
+can be done by adding the following to the beginning of your platform
+file: \verbatim
+<config>
+  <prop id="Item" value="Value"/>
+</config>
+\endverbatim
+
+A last solution is to pass your configuration directly using the C
+interface. Unfortunately, this path is not really easy to use right
+now, and you mess directly with surf internal variables as follows. Check the
+\ref XBT_config "relevant page" for details on all the functions you
+can use in this context, \c _surf_cfg_set being the only configuration set
+currently used in SimGrid. \code
+#include <xbt/config.h>
+
+extern xbt_cfg_t _surf_cfg_set;
+
+int main(int argc, char *argv[]) {
+     MSG_global_init(&argc, argv);
+     
+     xbt_cfg_set_parse(_surf_cfg_set,"Item:Value");
+     
+     // Rest of your code
+}
+\endcode
+
+\section options_model Configuring the platform models
+
+\subsection options_model_select Selecting the platform models
+
+SimGrid comes with several network and CPU models built in, and you
+can change the used model at runtime by changing the passed
+configuration. The three main configuration items are given below.
+For each of these items, passing the special \c help value gives
+you a short description of all possible values. Also, \c --help-models
+should provide information about all models for all existing resources. 
+   - \b network/model: specify the used network model
+   - \b cpu/model: specify the used CPU model
+   - \b workstation/model: specify the used workstation model
+
+As of writting, the accepted network models are the following. Over
+the time new models can be added, and some experimental models can be
+removed; check the values on your simulators for an uptodate
+information. Note that the CM02 model is described in the research report
+<a href="ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.gz">A
+Network Model for Simulation of Grid Application</a> while LV08 is
+described in 
+<a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>.
+
+  - \b LV08 (default one): Realistic network analytic model
+    (slow-start modeled by multiplying latency by 10.4, bandwidth by
+    .92; bottleneck sharing uses a payload of S=8775 for evaluating RTT)
+  - \b Constant: Simplistic network model where all communication
+    take a constant time (one second). This model provides the lowest
+    realism, but is (marginally) faster.
+  - \b SMPI: Realistic network model specifically tailored for HPC
+    settings (accurate modeling of slow start with correction factors on
+    three intervals: < 1KiB, < 64 KiB, >= 64 KiB). See also \ref
+    options_model_network_coefs "this section" for more info.
+  - \b CM02: Legacy network analytic model (Very similar to LV08, but
+    without corrective factors. The timings of small messages are thus
+    poorly modeled)
+  - \b Reno: Model from Steven H. Low using lagrange_solve instead of
+    lmm_solve (experts only; check the code for more info).
+  - \b Reno2: Model from Steven H. Low using lagrange_solve instead of
+    lmm_solve (experts only; check the code for more info).
+  - \b Vegas: Model from Steven H. Low using lagrange_solve instead of
+    lmm_solve (experts only; check the code for more info).
+
+If you compiled SimGrid accordingly, you can use packet-level network
+simulators as network models (see \ref pls). In that case, you have
+two extra models, described below, and some \ref options_pls "specific
+additional configuration flags".
+  - \b GTNets: Network pseudo-model using the GTNets simulator instead
+    of an analytic model 
+  - \b NS3: Network pseudo-model using the NS3 tcp model instead of an
+    analytic model     
+
+Concerning the CPU, we have only one model for now:
+  - \b Cas01: Simplistic CPU model (time=size/power)
+  
+The workstation concept is the aggregation of a CPU with a network
+card. Three models exists, but actually, only 2 of them are
+interesting. The "compound" one is simply due to the way our internal
+code is organized, and can easily be ignored. So at the end, you have
+two workstation models: The default one allows to aggregate an
+existing CPU model with an existing network model, but does not allow
+parallel tasks because these beasts need some collaboration between
+the network and CPU model. That is why, ptask_07 is used by default
+when using SimDag.
+  - \b default: Default workstation model. Currently, CPU:Cas01 and 
+    network:LV08 (with cross traffic enabled)
+  - \b compound: Workstation model that is automatically chosen if
+    you change the network and CPU models
+  - \b ptask_L07: Workstation model somehow similar to Cas01+CM02 but
+    allowing parallel tasks
+  
+\subsection options_model_optim Optimization level of the platform models
+
+The network and CPU models that are based on lmm_solve (that
+is, all our analytical models) accept specific optimization
+configurations.
+  - items \b network/optim and \b CPU/optim (both default to 'Lazy'):
+    - \b Lazy: Lazy action management (partial invalidation in lmm +
+      heap in action remaining).
+    - \b TI: Trace integration. Highly optimized mode when using
+      availability traces (only available for the Cas01 CPU model for
+      now). 
+    - \b Full: Full update of remaining and variables. Slow but may be
+      useful when debugging.
+  - items \b network/maxmin_selective_update and
+    \b cpu/maxmin_selective_update: configure whether the underlying
+    should be lazily updated or not. It should have no impact on the
+    computed timings, but should speed up the computation. 
+    
+It is still possible to disable the \c maxmin_selective_update feature
+because it can reveal counter-productive in very specific scenarios
+where the interaction level is high. In particular, if all your
+communication share a given backbone link, you should disable it:
+without \c maxmin_selective_update, every communications are updated
+at each step through a simple loop over them. With that feature
+enabled, every communications will still get updated in this case
+(because of the dependency induced by the backbone), but through a
+complicated pattern aiming at following the actual dependencies.
+
+\subsection options_model_precision Numerical precision of the platform models
+
+The analytical models handle a lot of floating point values. It is
+possible to change the epsilon used to update and compare them through
+the \b maxmin/precision item (default value: 1e-9). Changing it
+may speedup the simulation by discarding very small actions, at the
+price of a reduced numerical precision.
+
+\subsection options_model_network Configuring the Network model
+
+\subsubsection options_model_network_gamma Maximal TCP window size
+
+The analytical models need to know the maximal TCP window size to take
+the TCP congestion mechanism into account. This is set to 20000 by
+default, but can be changed using the \b network/TCP_gamma item.
+
+On linux, this value can be retrieved using the following
+commands. Both give a set of values, and you should use the last one,
+which is the maximal size.\verbatim
+cat /proc/sys/net/ipv4/tcp_rmem # gives the sender window
+cat /proc/sys/net/ipv4/tcp_wmem # gives the receiver window
+\endverbatim
+
+\subsubsection options_model_network_coefs Corrective simulation factors 
+
+These factors allow to betterly take the slow start into account.
+The corresponding values were computed through data fitting one the
+timings of packet-level simulators. You should not change these values
+unless you are really certain of what you are doing. See 
+<a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>
+for more informations about these coeficients.
+
+If you are using the SMPI model, these correction coeficients are
+themselves corrected by constant values depending on the size of the
+exchange. Again, only hardcore experts should bother about this fact.
+
+\subsubsection options_model_network_crosstraffic Simulating cross-traffic
+
+As of SimGrid v3.7, cross-traffic effects can be taken into account in
+analytical simulations. It means that ongoing and incoming
+communication flows are treated independently. In addition, the LV08
+model adds 0.05 of usage on the opposite direction for each new
+created flow. This can be useful to simulate some important TCP
+phenomena such as ack compression.
+
+For that to work, your platform must have two links for each
+pair of interconnected hosts. An example of usable platform is
+available in <tt>examples/msg/gtnets/crosstraffic-p.xml</tt>.
+
+This is activated through the \b network/crosstraffic item, that
+can be set to 0 (disable this feature) or 1 (enable it).
+
+\subsubsection options_model_network_coord Coordinated-based network models
+
+When you want to use network coordinates, as it happens when you use
+an \<AS\> in your platform file with \c Vivaldi as a routing, you must
+set the \b network/coordinates to \c yes so that all mandatory
+initialization are done in the simulator.
+
+\subsubsection options_model_network_sendergap Simulating sender gap
+
+(this configuration item is experimental and may change or disapear)
+
+It is possible to specify a timing gap between consecutive emission on
+the same network card through the \b network/sender_gap item. This
+is still under investigation as of writting, and the default value is
+to wait 0 seconds between emissions (no gap applied).
+
+\subsubsection options_pls Configuring packet-level pseudo-models
+
+When using the packet-level pseudo-models, several specific
+configuration flags are provided to configure the associated tools.
+There is by far not enough such SimGrid flags to cover every aspects
+of the associated tools, since we only added the items that we
+needed ourselves. Feel free to request more items (or even better:
+provide patches adding more items).
+
+When using NS3, the only existing item is \b ns3/TcpModel,
+corresponding to the ns3::TcpL4Protocol::SocketType configuration item
+in NS3. The only valid values (enforced on the SimGrid side) are
+'NewReno' or 'Reno' or 'Tahoe'.
+
+When using GTNeTS, two items exist: 
+ - \b gtnets/jitter, that is a double value to oscillate
+   the link latency, uniformly in random interval
+   [-latency*gtnets_jitter,latency*gtnets_jitter). It defaults to 0.
+ - \b gtnets/jitter_seed, the positive seed used to reproduce jitted
+   results. Its value must be in [1,1e8] and defaults to 10.
+
+\section options_modelchecking Configuring the Model-Checking
+
+To enable the experimental SimGrid model-checking support the program should
+be executed with the command line argument 
+\verbatim
+--cfg=model-check:1 
+\endverbatim
+Properties are expressed as assertions using the function
+\verbatim
+void MC_assert(int prop);
+\endverbatim
+
+\section options_virt Configuring the User Process Virtualization
+
+\subsection options_virt_factory Selecting the virtualization factory
+
+In SimGrid, the user code is virtualized in a specific mecanism
+allowing the simulation kernel to control its execution: when a user
+process requires a blocking action (such as sending a message), it is
+interrupted, and only gets released when the simulated clock reaches
+the point where the blocking operation is done.
+
+In SimGrid, the containers in which user processes are virtualized are
+called contexts. Several context factory are provided, and you can
+select the one you want to use with the \b contexts/factory
+configuration item. Some of the following may not exist on your
+machine because of portability issues. In any case, the default one
+should be the most effcient one (please report bugs if the
+auto-detection fails for you). They are sorted here from the slowest
+to the most effient:
+ - \b thread: very slow factory using full featured threads (either
+   ptheads or windows native threads) 
+ - \b ucontext: fast factory using System V contexts (or a portability
+   layer of our own on top of Windows fibers)
+ - \b raw: amazingly fast factory using a context switching mecanism
+   of our own, directly implemented in assembly (only available for x86 
+   and amd64 platforms for now)
+
+The only reason to change this setting is when the debuging tools get
+fooled by the optimized context factories. Threads are the most
+debugging-friendly contextes.
+
+\subsection options_virt_stacksize Adapting the used stack size
+
+(this only works if you use ucontexts or raw context factories)
+
+Each virtualized used process is executed using a specific system
+stack. The size of this stack has a huge impact on the simulation
+scalability, but its default value is rather large. This is because
+the error messages that you get when the stack size is too small are
+rather disturbing: this leads to stack overflow (overwriting other
+stacks), leading to segfaults with corrupted stack traces.
+
+If you want to push the scalability limits of your code, you really
+want to reduce the \b contexts/stack_size item. Its default value
+is 128 (in Kib), while our Chord simulation works with stacks as small
+as 16 Kib, for example.
+
+\subsection options_virt_parallel Running user code in parallel
+
+Parallel execution of the user code is only considered stable in
+SimGrid v3.7 and higher. It is described in 
+<a href="http://hal.inria.fr/inria-00602216/">INRIA RR-7653</a>.
+
+If you are using the \c ucontext or \c raw context factories, you can
+request to execute the user code in parallel. Several threads are
+launched, each of them handling as much user contexts at each run. To
+actiave this, set the \b contexts/nthreads item to the amount of
+core that you have in your computer.
+
+Even if you asked several worker threads using the previous option,
+you can request to start the parallel execution (and pay the
+associated synchronization costs) only if the potential parallelism is
+large enough. For that, set the \b contexts/parallel_threshold
+item to the minimal amount of user contexts needed to start the
+parallel execution. In any given simulation round, if that amount is
+not reached, the contexts will be run sequentially directly by the
+main thread (thus saving the synchronization costs). Note that this
+option is mainly useful when the grain of the user code is very fine,
+because our synchronization is now very efficient.
+
+When parallel execution is activated, you can choose the
+synchronization schema used with the \b contexts/synchro item,
+which value is either:
+ - \b futex: ultra optimized synchronisation schema, based on futexes
+   (fast user-mode mutexes), and thus only available on Linux systems.
+   This is the default mode when available.
+ - \b posix: slow but portable synchronisation using only POSIX
+   primitives.
+ - \b busy_wait: not really a synchronisation: the worker threads
+   constantly request new contexts to execute. It should be the most
+   efficient synchronisation schema, but it loads all the cores of your 
+   machine for no good reason. You probably prefer the other less
+   eager schemas.
+
+\section options_tracing Configuring the tracing subsystem
+
+(TODO)
+
+\section options_smpi Configuring SMPI
+
+The SMPI interface provides several specific configuration items.
+These are uneasy to see since the code is usually launched through the
+\c smiprun script directly.
+
+\subsection options_smpi_bench Automatic benchmarking of SMPI code
+
+In SMPI, the sequential code is automatically benchmarked, and these
+computations are automatically reported to the simulator. That is to
+say that if you have a large computation between a \c MPI_Recv() and a
+\c MPI_Send(), SMPI will automatically benchmark the duration of this
+code, and create an execution task within the simulator to take this
+into account. For that, the actual duration is measured on the host
+machine and then scaled to the power of the corresponding simulated
+machine. The variable \b smpi/running_power allows to specify the
+computational power of the host machine (in flop/s) to use when
+scaling the execution times. It defaults to 20000, but you really want
+to update it to get accurate simulation results.
+
+When the code is constituted of numerous consecutive MPI calls, the
+previous mechanism feeds the simulation kernel with numerous tiny
+computations. The \b smpi/cpu_threshold item becomes handy when this
+impacts badly the simulation performance. It specify a threshold (in
+second) under which the execution chunks are not reported to the
+simulation kernel (default value: 1e-6). Please note that in some
+circonstances, this optimization can hinder the simulation accuracy. 
+
+\subsection options_smpi_timing Reporting simulation time
+
+Most of the time, you run MPI code through SMPI to compute the time it
+would take to run it on a platform that you don't have. But since the
+code is run through the \c smpirun script, you don't have any control
+on the launcher code, making difficult to report the simulated time
+when the simulation ends. If you set the \b smpi/display_timing item
+to 1, \c smpirun will display this information when the simulation ends. \verbatim
+Simulation time: 1e3 seconds.
+\endverbatim
+
+\section options_generic Configuring other aspects of SimGrid
+
+\subsection options_generic_path XML file inclusion path
+
+It is possible to specify a list of directories to search into for the
+\<include\> tag in XML files by using the \b path configuration
+item. To add several directory to the path, set the configuration
+item several times, as in \verbatim
+--cfg=path:toto --cfg=path:tutu
+\endverbatim
+
+\subsection options_generic_exit Behavior on Ctrl-C
+
+By default, when Ctrl-C is pressed, the status of all existing
+simulated processes is displayed. This is very useful to debug your
+code, but it can reveal troublesome in some cases (such as when the 
+amount of processes becomes really big). This behavior is disabled
+when \b verbose-exit is set to 0 (it is to 1 by default).
+
+\section options_index Index of all existing configuration items
+
+- \c contexts/factory: \ref options_virt_factory
+- \c contexts/nthreads: \ref options_virt_parallel
+- \c contexts/parallel_threshold: \ref options_virt_parallel
+- \c contexts/stack_size: \ref options_virt_stacksize
+- \c contexts/synchro: \ref options_virt_parallel
+
+- \c cpu/maxmin_selective_update: \ref options_model_optim
+- \c cpu/model: \ref options_model_select
+- \c cpu/optim: \ref options_model_optim
+
+- \c gtnets/jitter: \ref options_pls
+- \c gtnets/jitter_seed: \ref options_pls
+
+- \c maxmin/precision: \ref options_model_precision
+
+- \c network/bandwidth_factor: \ref options_model_network_coefs
+- \c network/coordinates: \ref options_model_network_coord
+- \c network/crosstraffic: \ref options_model_network_crosstraffic 
+- \c network/latency_factor: \ref options_model_network_coefs
+- \c network/maxmin_selective_update: \ref options_model_optim
+- \c network/model: \ref options_model_select
+- \c network/optim: \ref options_model_optim
+- \c network/sender_gap: \ref options_model_network_sendergap
+- \c network/TCP_gamma: \ref options_model_network_gamma
+- \c network/weight_S: \ref options_model_network_coefs
+
+- \c ns3/TcpModel: \ref options_pls
+
+- \c smpi/running_power: \ref options_smpi_bench
+- \c smpi/display_timing: \ref options_smpi_timing
+- \c smpi/cpu_threshold: \ref options_smpi_bench
+
+- \c path: \ref options_generic_path
+- \c verbose-exit: \ref options_generic_exit
+
+- \c workstation/model: \ref options_model_select
+
+*/
\ No newline at end of file
diff --git a/doc/people.doc b/doc/people.doc
deleted file mode 100644 (file)
index 3975421..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*! \page people People around SimGrid
-
-\section core_team Core team
-
-SimGrid is a joint project between University of Hawai at Manoa, LIG Laboratory
-(INRIA MEScal project, Grenoble, France) and University of Nancy (INRIA
-Algorille project, Nancy, France). The authors of SimGrid are:
-
-
- - Henri Casanova <casanova::cs.ucsd.edu> (Information and Computer Sciences Department, University of Hawai`i at Manoa)
- - Arnaud Legrand <arnaud.legrand#imag.fr> (CNRS, LIG Laboratory (Grenoble, France), INRIA MEScal project)
- - Martin Quinson <martin.quinson#loria.fr> (University of Nancy I (Nancy, France), LORIA Laboratory, INRIA Algorille project)
-
-\section contributers Contributers and alumni project members
-
- - Mark Stilwell: wrote SMPI during his PhD. Thesis in Hawai`i (2006-???)
- - Pedro Velho: wrote the Lagrange solver to improve the network
-   sharing in SURF during his PhD. Thesis in Grenoble (2006-???).
- - Bruno Donassolo: wrote SIMIX during his master internship in
-   Grenoble. Ported GRAS and MSG to SIMIX. (2007)
- - Kayo Fujiwara: wrote the gtnets interface with SURF during her
-   master at Hawai`i and studied the cost and accuracy of network
-   simulation in the simgrid framework (2006-2007).
- - Malek Cherrier: ported the environment to Windows, designed the
-   Java bindings and worked on the software quality during a two year
-   engineer position in the INRIA Grand Est (2006-2008).
- - Christophe Thiery: brought back the old SG to life with SimDag during a
-   two months internship (june-july 2006) in the INRIA Grand Est.
- - Loris Marchal: designed the algorithm for simulation TCP bandwidth-sharing
-   during a two-months internship (june-july 2002) in UCSD.
- - Julien Lerouge : wrote a XML parser for ENV descriptions and helped for
-   the general design during a 4 months internship (march-june 2002)
-   in the ENS-Lyon.
- - Clément Menier and Marc Perache : wrote a prototype of the MSG
-   interface during a project at ENS-Lyon (jan 2002). 
- - Dmitrii Zagorodnov : wrote some parts of the first version of SimGrid
-   (1999) at University of California at San Diego.
-
-\section users Users
-
-Here is a list of people who co-signed at least one paper using
-results produced with SimGrid (not counting the papers describing the
-framework itself):
-
- - Cyril Banino-Rokkones: Norwegian University of Science and Technology.
- - Olivier Beaumont: Univ. Bordeaux 1, France.
- - Francine Berman: San Diego Supercomputer Center, USA.
- - Vandy Berten: Univ. of Brussels, Belgium.
- - Adam Birnbaum: San Diego Supercomputer Center, USA.
- - Vincent Boudet: Univ. Montpellier 2, France.
- - Fransisco Brasileiro: Univ. Federal de Campina Grande, Brazil.
- - Yves Caniou: ENS-Lyon, France.
- - Yudith Cardinale: Univ. Simon Boliar, Venezuela.
- - Eddy Caron: ENS-Lyon, France.
- - Larry Carter: Univ. of California at San Diego, USA.
- - Henri Casanova: Univ. of Hawai'i, Manoa, USA.
- - Walfredo Cirne: Univ. Federal de Campina Grande, Brazil.
- - Frédéric Desprez: INRIA, Lyon, France.
- - César De Rose: Faculty of Informatics - PUCRS, Brazil.
- - N. Dimopoulos: Univ. of Victoria, Canada.
- - Lionel Eyraud-Dubois: INRIA, Bordeaux, France.
- - Marcio Faerman: San Diego Supercomputer Center, USA.
- - Thomas Ferrandiz: Univ. Joseph Fourrier, Grenoble, France.
- - Jeanne Ferrante: Univ. of California at San Diego, USA.
- - Tiago Ferreto: Faculty of Informatics - PUCRS, Brazil. 
- - Vincent Garonne: CNRS-IN2P3, Lyon, France.
- - Bruno Gaujal: INRIA, Grenoble, France.
- - Jean-Sébastien Gay: ENS-Lyon, France.
- - Makoto Imase: Osaka University, Japan.
- - Emmanuel Jeannot: INRIA, Nancy, France.
-
- - Barbara Kreaseck: La Sierra Univ., San Diego, USA.
-
- - Arnaud Legrand: CNRS, Grenoble, France.
- - Aliandro Lima: Univ. Federal de Campina Grande, Brazil.
- - Vania Marangozova: Univ. Joseph Fourrier, Grenoble, France.
- - Loris Marchal: CNRS, Lyon, France.
- - Sagnik Nandy: Univ. of California at San Diego, USA.
- - W. Nascimento: Univ. Catolica de Santos, Sao Paolo, Brazil.
- - Lasse Natvig: Norwegian University of Science and Technology.
- - Caio Northfleet: HP, Brazil.
- - Tchimou N'Takpé: Univ. Henri Poincaré, Nancy, France.
- - Hiroyuki Ohsaki: Osaka University, Japan.
- - R. Parra-Hernandez: Univ. of Victoria, Canada.
- - Franck Petit: Univ. Jules Verne, Amiens, France.
-
- - Martin Quinson: Univ. Henri Poincaré, Nancy, France.
-
- - Héléne Renard: Univ. Nice, France.
- - Yves Robert: INRIA, Lyon, France.
- - Elizeu Santos-Neto: Univ. Federal de Campina Grande, Brazil.
- - H. Senger:  Univ. Catolica de Santos, Sao Paolo, Brazil. 
- - F. Silva: Univ. Catolica de Santos, Sao Paolo, Brazil. 
- - Shava Smallen: Univ. of California at San Diego, USA.
- - R. Sobie: The Institute of Particle Physics of Canada.
- - Frédéric Suter: Univ. Henri Poincaré, Nancy, France.
- - Andrei Tsaregorodtsev: CNRS-IN2P3, Lyon, France.
- - D. Vanderster: Univ. of Victoria, Canada.
- - Vincent Villain: Univ. Jules Verne, Amiens, France.
- - Frédéric Vivien: INRIA, Lyon, France. 
- - Soushi Watanabe: Osaka University, Japan.
- - Xiao Xie: Jiao Tong University, Shanghai, China.
- - Yang Yang: Univ. of California at San Diego, USA.
- - Wensheng Yao: Jiao Tong University, Shanghai, China.
- - Jinyuan You: Jiao Tong University, Shanghai, China.
-
- - Dmitrii Zagorodnov: Univ. of California at Santa Barbara, USA.
-               
-*/             
\ No newline at end of file
diff --git a/doc/pls.doc b/doc/pls.doc
new file mode 100644 (file)
index 0000000..b411e75
--- /dev/null
@@ -0,0 +1,241 @@
+/*! \page pls Packet level simulation
+
+\htmlinclude .pls.doc.toc
+
+It is possible to use a packet-level network simulator
+instead of the default flow-based simulation. You may want to use such
+an approach if you have doubts about the validity of the default model
+or if you want to perform some validation experiments. At the moment,
+we support the GTNetS simulator and since version 3.6.2, ns-3. 
+
+
+\section pls_simgrid_configuration_gtnets Using GTNetS
+
+
+<i>
+To enable GTNetS model inside SimGrid it is needed to patch the GTNetS simulator source code 
+and build/install it from scratch
+</i>
+
+ - <b>Download and enter the recent downloaded GTNetS directory</b>
+
+\verbatim
+svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/
+cd GTNetS
+\endverbatim
+
+
+ - <b>Use the following commands to unzip and patch GTNetS package to work within SimGrid.</b>
+
+\verbatim
+unzip gtnets-current.zip
+tar zxvf gtnets-current-patch.tgz 
+cd gtnets-current
+cat ../00*.patch | patch -p1
+\endverbatim
+
+  - <b>OPTIONALLY</b> you can use a patch for itanium 64bit processor family.
+
+\verbatim
+cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1
+\endverbatim
+
+ - <b>Compile GTNetS</b>
+
+   Due to portability issues it is possible that GTNetS does not compile in your architecture. The patches furnished in SimGrid SVN repository are intended for use in Linux architecture only. Unfortunately, we do not have the time, the money, neither the manpower to guarantee GTNetS portability. We advice you to use one of GTNetS communication channel to get more help in compiling GTNetS. 
+
+
+\verbatim
+ln -sf Makefile.linux Makefile
+make depend
+make debug
+\endverbatim
+
+
+ - <b>NOTE</b> A lot of warnings are expected but the application should compile
+ just fine. If the makefile insists in compiling some QT libraries
+ please try a make clean before asking for help.
+
+
+ - <b>To compile optimized version</b>
+
+\verbatim
+make opt
+\endverbatim
+
+
+ - <b>Installing GTNetS</b>
+
+ It is important to put the full path of your libgtsim-xxxx.so file when creating the symbolic link. Replace < userhome > by some path you have write access to.
+
+\verbatim
+ln -sf /<absolute_path>/gtnets_current/libgtsim-debug.so /<userhome>/usr/lib/libgtnets.so
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<userhome>/usr/lib/libgtnets.so
+mkdir /<userhome>/usr/include/gtnets
+cp -fr SRC/*.h /<userhome>/usr/include/gtnets
+\endverbatim
+
+
+ - <b>Enable GTNetS support in SimGrid</b>
+In order to enable gtnets with simgrid you have to give where is gtnets. (path to \<gtnets_path\>/lib and \<gtnets_path\>/include)
+
+\verbatim
+cmake . -Denable_gtnets=ON -Dgtnets_path=/<userhome>/usr
+\endverbatim
+
+ - <b>Once you have followed all the instructions for compiling and
+   installing successfully you can activate this feature at 
+   runntime with the following options:</b>
+
+\verbatim
+cd simgrid
+make
+ctest -R gtnets
+\endverbatim
+
+
+ - <b>Or try the GTNetS model dogbone example with</b>
+
+\verbatim
+gtnets/gtnets gtnets/onelink-p.xml gtnets/onelink-d.xml --cfg=network_model:GTNets
+\endverbatim
+
+ A long version of this <a href="http://gforge.inria.fr/docman/view.php/12/6283/GTNetS HowTo.html">HowTo</a>  it is available 
+
+
+ More about GTNetS simulator at <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/index.html">GTNetS Website</a>
+
+
+ - <b>DISCLAIMER</b>
+ The patches provided by us worked successfully with GTNetS found 
+ <a href="http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/software/gtnets-current.zip">here</a>, 
+ dated from 12th June 2008. Due to the discontinuing development of
+ GTNetS it is impossible to precise a version number. We STRONGLY recommend you
+ to download and install the GTNetS version found in SimGrid repository as explained above.
+
+\section pls_simgrid_configuration_ns3 Using NS3
+
+It is possible to use discrete-event network simulator <a href="http://www.nsnam.org/">(ns-3)</a> for Internet systems
+instead of the default one. 
+
+A ns-3 platform is created according to the platform file you provide in SimGrid format. However from this configuration, we had to set up some extra parameters : 
+
+<ul>
+<li>
+First, whenever possible, we let default ns3 values and we don't changed it ; in case you have doubts on values for those parameters (TCP parameters for example), blame ns-3...
+</li>
+
+<li>
+Second, routing used inside ns-3 is a global and static one, relying on a shortest path algorithm. We did so by using ns3::Ipv4GlobalRoutingHelper::PopulateRoutingTables.
+</li>
+
+<li>
+Third, we also choose to restrict the way your platform is built : end hosts cannot have more than one interface card (so, only one &lt;link&gt; in your SimGrid platform should link 
+an end host to the platform ; if not, your end host will be considered as a router. 
+</li>
+
+</ul>
+<i>
+To use ns3 model inside SimGrid you have to install at least the version 3.10 of ns3 simulator.
+</i>
+
+- <b>Download and enter the lateast release (here the 3.12.1)</b>
+
+\verbatim
+http://www.nsnam.org/release/ns-allinone-3.12.1.tar.bz2
+tar -xf ns-allinone-3.12.1.tar.bz2
+cd ns-allinone-3.12.1/ns-3.12.1/
+\endverbatim
+
+- <b>Configure, make and install ns3</b>
+
+\verbatim
+./waf configure --prefix="ns-3_install_directory"
+./waf
+./waf install
+\endverbatim
+
+After install ns-3 you should have directories into your "ns-3_install_directory":
+       \li include/ns3/ 
+       \li lib/ 
+       \li bin/ (with 3.12)
+       
+You also need to add to the LD_LIBRARY_PATH : "ns-3_install_directory/lib".
+
+- <b>Enable ns-3 support on SimGrid</b>
+
+In order to enable ns-3 with simgrid you have to give where is ns-3 to the simgrid configuration command. (path to \<ns3_path\>/lib and \<ns3_path\>/include)
+
+\verbatim
+cmake . -Denable_ns3=ON -Dns3_path=<ns3_path>
+\endverbatim
+
+With the output of the configuration you can see if ns-3 is detected by included the directory to flags.
+
+\verbatim
+Configuration of package `simgrid' on arch (=4):
+            BUILDNAME :        UNIX
+            SITE      :        Linux_2.6.38-11-generic_x86_64
+            Release   :        simgrid-3.6.1
+
+        Compiler: c++ :        /usr/bin/c++
+               version:        4.6.1
+        Compiler: c   :        /usr/bin/gcc
+               version:        4.6.1
+
+              CFlags  :        -O3 -finline-functions -funroll-loops -fno-strict-aliasing -L/usr/lib/x86_64-linux-gnu -I/usr/include 
+                                       -L/home/navarrop/Install/ns3-3.10/lib -I/home/navarrop/Install/ns3-3.10/include -g3  -D_NS3_3_10
+              CPPFlags:        -I/home/navarrop/Install/ns3-3.10/include -L/home/navarrop/Install/ns3-3.10/lib 
+
+       Compile Gtnets :        0
+       Compile NS-3   :        1 ---------------------> Be sure this option is "1" otherwise ns-3 is not activated
+       Gtnets path    :        
+       NS-3 path      :        /home/navarrop/Install/ns3-3.10
+       Compile Lua    :        
+       Compile Smpi   :        OFF
+       Compile Static :        OFF
+       Compile pcre   :        AUTO
+
+       Maintainer mode:        OFF
+       Supernovae mode:        OFF
+       Model checking :        OFF
+       Tracing mode   :        OFF
+       Jedule  mode   :        OFF
+       Latency bound  :        OFF
+        Graphviz mode  :        
+
+       Simgrid dependencies:   -lm -lpcre -lpthread -lns3 -lrt
+       Gras dependencies   :   -lm -lpthread -lrt
+       Smpi dependencies   :   
+
+       INSTALL_PREFIX:         /usr/local
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /home/navarrop/workspace/simgrid/build
+\endverbatim
+
+Now you can compile SimGrid
+\verbatim
+make
+\endverbatim
+
+Then you can see if ns-3 is well activated by testing
+\verbatim
+ctest -R ns3
+\endverbatim
+
+You should see
+\verbatim
+    Start 182: msg-ns3-thread
+1/3 Test #182: msg-ns3-thread ...................   Passed    0.35 sec
+    Start 183: msg-ns3-ucontext
+2/3 Test #183: msg-ns3-ucontext .................   Passed    0.22 sec
+    Start 184: msg-ns3-raw
+3/3 Test #184: msg-ns3-raw ......................   Passed    0.23 sec
+\endverbatim
+
+More about ns-3 simulator <a href="http://www.nsnam.org/">(Official website)</a>
+
+*/
diff --git a/doc/publis.doc b/doc/publis.doc
deleted file mode 100644 (file)
index 951effb..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*! \page publis Reference publications about SimGrid
-
-
-When citing SimGrid, the prefered reference paper is <i>SimGrid: a
-Generic Framework for Large-Scale Distributed Experimentations</i>.
-
-\li <b>SimGrid: a Generic Framework for Large-Scale Distributed
-    Experimentations</b>\n 
-    by <em>Henri Casanova, Arnaud Legrand and Martin Quinson</em>\n
-    Proceedings of the 10th IEEE International Conference on Computer
-    Modelling and Simulation (UKSIM/EUROSIM'08)\n    
-    Distributed computing is a very broad and active research area
-    comprising fields such as cluster computing, computational
-    grids, desktop grids and peer-to-peer (P2P) systems.
-    Unfortunately, it is often impossible to obtain theoretical or
-    analytical results to compare the performance of algorithms
-    targeting such systems. One possibility is to conduct large
-    numbers of back-to-back experiments on real platforms. While
-    this is possible on tightly-coupled platforms, it is infeasible
-    on modern distributed platforms as experiments are labor-intensive
-    and results typically not reproducible. Consequently, one must
-    resort to simulations, which enable reproducible results and also
-    make it possible to explore wide ranges of platform and
-    application scenarios.\n
-    In this paper we describe the SimGrid framework, a
-    simulation-based framework for evaluating cluster, grid and P2P
-    algorithms and heuristics. This paper focuses on SimGrid v3, which
-    greatly improves on previous versions thanks to a novel and
-    validated modular simulation engine that achieves higher
-    simulation speed without hindering simulation accuracy. Also, two
-    new user interfaces were added to broaden the targeted research
-    community. After surveying existing tools and methodologies we
-    describe the key features and benefits of SimGrid.\n
-    http://www.loria.fr/~quinson/Research/Publications/2008-uksim.pdf
-
-\verbatim
-@InProceedings{simgrid,
-  author =    {Casanova, Henri and Legrand, Arnaud and Quinson, Martin},
-  title =     {{SimGrid: a Generic Framework for Large-Scale Distributed Experiments}},
-  booktitle = {10th IEEE International Conference on Computer Modeling and Simulation},
-  year =       2008,
-  month =      mar
-}
-\endverbatim                                     
-
-\section publis_others Other publications
-
-A lot of other papers where published about SimGrid. The list is
-splited in 3 pages (also accessible from the navbar on top of this page):
- - \ref publis_core\n
-   This section contains papers describing some sub-parts of SimGrid,
-   or references superseeded by the one given above.
- - \ref publis_extern\n
-   SimGrid is used by an ever growing scientific community. This
-   section lists all the papers resulting of works in which the core
-   SimGrid team were not involved.
- - \ref publis_intra\n
-   This section lists the paper co-signed by at least one of the core
-   team member, and using SimGrid as a tool (and not studying SimGrid
-   itself).
-
-\section publis_count Amount of published papers using SimGrid results
-
-\htmlinclude publis_count.html
-
-\page publis_core Publications about the SimGrid framework
-
-\htmlinclude publis_core_bib.html
-
-\page publis_extern Papers that use SimGrid-generated results (not counting our owns)
-
-This list is a selection of articles. We list only papers written by people
-external to the development group, but we also use our tool ourselves (see
-next section).
-
-\htmlinclude publis_extern_bib.html
-
-\page publis_intra Our own papers that use SimGrid-generated results 
-
-This list is a selection of the articles we have written that used results
-generated by SimGrid. 
-
-\htmlinclude publis_intra_bib.html
-
-
-*/
diff --git a/doc/tracing.doc b/doc/tracing.doc
new file mode 100644 (file)
index 0000000..4a7fe28
--- /dev/null
@@ -0,0 +1,1171 @@
+/*! \page tracing Tracing Simulations for Visualization
+
+\htmlinclude .tracing.doc.toc
+
+\section tracing_tracing Tracing Simulations for Visualization
+
+The trace visualization is widely used to observe and understand the behavior
+of parallel applications and distributed algorithms. Usually, this is done in a
+two-step fashion: the user instruments the application and the traces are
+analyzed after the end of the execution. The visualization itself can highlights
+unexpected behaviors, bottlenecks and sometimes can be used to correct
+distributed algorithms. The SimGrid team has instrumented the library
+in order to let users trace their simulations and analyze them. This part of the
+user manual explains how the tracing-related features can be enabled and used
+during the development of simulators using the SimGrid library.
+
+\subsection tracing_tracing_howitworks How it works
+
+For now, the SimGrid library is instrumented so users can trace the <b>platform
+utilization</b> using the MSG, SimDAG and SMPI interface. This means that the tracing will
+register how much power is used for each host and how much bandwidth is used for
+each link of the platform. The idea with this type of tracing is to observe the
+overall view of resources utilization in the first place, especially the
+identification of bottlenecks, load-balancing among hosts, and so on.
+
+The idea of the tracing facilities is to give SimGrid users to possibility to
+classify MSG and SimDAG tasks by category, tracing the platform utilization
+(hosts and links) for each of the categories. For that,
+the tracing interface enables the declaration of categories and a function to
+mark a task with a previously declared category. <em>The tasks that are not
+classified according to a category are not traced</em>. Even if the user
+does not specify any category, the simulations can still be traced in terms
+of resource utilization by using a special parameter that is detailed below.
+
+\subsection tracing_tracing_enabling Enabling using CMake
+
+With the sources of SimGrid, it is possible to enable the tracing 
+using the parameter <b>-Denable_tracing=ON</b> when the cmake is executed.
+The section \ref tracing_tracing_functions describes all the functions available
+when this Cmake options is activated. These functions will have no effect
+if SimGrid is configured without this option (they are wiped-out by the
+C-preprocessor).
+
+\verbatim
+$ cmake -Denable_tracing=ON .
+$ make
+\endverbatim
+
+\subsection tracing_tracing_functions Tracing Functions
+
+\li <b>\c TRACE_category (const char *category)</b>: This function should be used
+to define a user category. The category can be used to differentiate the tasks
+that are created during the simulation (for example, tasks from server1,
+server2, or request tasks, computation tasks, communication tasks).
+All resource utilization (host power and link bandwidth) will be
+classified according to the task category. Tasks that do not belong to a
+category are not traced. The color for the category that is being declared
+is random (use next function to specify a color).
+
+\li <b>\c TRACE_category_with_color (const char *category, const char *color)</b>: Same
+as TRACE_category, but let user specify a color encoded as a RGB-like string with
+three floats from 0 to 1. So, to specify a red color, the user can pass "1 0 0" as
+color parameter. A light-gray color can be specified using "0.7 0.7 0.7" as color.
+
+\li <b>\c TRACE_msg_set_task_category (m_task_t task, const char *category)</b>:
+This function should be called after the creation of a MSG task, to define the
+category of that task. The first parameter \c task must contain a task that was
+created with the function \c MSG_task_create. The second parameter
+\c category must contain a category that was previously defined by the function
+\c TRACE_category.
+
+\li <b>\c TRACE_sd_set_task_category (SD_task_t task, const char *category)</b>:
+This function should be called after the creation of a SimDAG task, to define the
+category of that task. The first parameter \c task must contain a task that was
+created with the function \c MSG_task_create. The second parameter
+\c category must contain a category that was previously defined by the function
+\c TRACE_category.
+
+\li <b>\c TRACE_[host|link]_variable_declare (const char *variable)</b>:
+Declare a user variable that will be associated to host/link. A variable can
+be used to trace user variables such as the number of tasks in a server,
+the number of clients in an application (for hosts), and so on.
+
+\li <b>\c TRACE_[host|link]_variable_[set|add|sub] (const char *[host|link], const char *variable, double value)</b>:
+Set the value of a given user variable for a given host/link. The value
+of this variable is always associated to the host/link. The host/link 
+parameters should be its name as the one listed in the platform file.
+
+\li <b>\c TRACE_[host|link]_variable_[set|add|sub]_with_time (double time, const char *[host|link], const char *variable, double value)</b>:
+Same as TRACE_[host|link]_variable_[set|add|sub], but let user specify
+the time used to trace it. Users can specify a time that is not the 
+simulated clock time as defined by the core simulator. This allows
+a fine-grain control of time definition, but should be used with 
+caution since the trace can be inconsistent if resource utilization
+traces are also traced.
+
+\li <b>\c TRACE_link_srcdst_variable_[set|add|sub] (const char *src, const char *dst, const char *variable, double value)</b>:
+Same as TRACE_link_variable_[set|add|sub], but now users specify a source and
+destination hosts (as the names from the platform file). The tracing library
+will get the corresponding route that connects those two hosts (src and dst) and
+[set|add|sub] the value's variable for all the links of the route.
+
+\li <b>\c TRACE_link_srcdst_variable_[set|add|sub]_with_time (double time, const char *src, const char *dst, const char *variable, double value)</b>: 
+Same as TRACE_link_srcdst_variable_[set|add|sub], but user specify a time different from the simulated time.
+
+\subsection tracing_tracing_options Tracing configuration Options
+
+To check which tracing options are available for your simulator, you
+can just run it with the option <b>--help-tracing</b>. These are the
+options accepted by the tracing system of SimGrid as of today, you
+can use them by running your simulator with the <b>--cfg=</b> switch:
+
+\li <b>\c 
+tracing
+</b>:
+  Safe switch. It activates (or deactivates) the tracing system.
+  No other tracing options take effect if this one is not activated.
+\verbatim
+--cfg=tracing:1
+\endverbatim
+
+\li <b>\c 
+tracing/categorized
+</b>:
+  It activates the categorized resource utilization tracing. It should
+  be enabled if tracing categories are used by this simulator.
+\verbatim
+--cfg=tracing/categorized:1
+\endverbatim
+
+\li <b>\c 
+tracing/uncategorized
+</b>:
+  It activates the uncategorized resource utilization tracing. Use it if
+  this simulator do not use tracing categories and resource use have to be
+  traced.
+\verbatim
+--cfg=tracing/uncategorized:1
+\endverbatim
+
+\li <b>\c 
+tracing/filename
+</b>:
+  A file with this name will be created to register the simulation. The file
+  is in the Paje format and can be analyzed using Triva or Paje visualization
+  tools. More information can be found in these webpages:
+     <a href="http://triva.gforge.inria.fr/">http://triva.gforge.inria.fr/</a>
+     <a href="http://paje.sourceforge.net/">http://paje.sourceforge.net/</a>
+\verbatim
+--cfg=tracing/filename:mytracefile.trace
+\endverbatim
+  If you do not provide this parameter, the trace file will be named simgrid.trace.
+
+\li <b>\c
+tracing/onelink_only
+</b>:
+  By default, the tracing system uses all routes in the platform file
+  to re-create a "graph" of the platform and register it in the trace file.
+  This option let the user tell the tracing system to use only the routes
+  that are composed with just one link.
+\verbatim
+--cfg=tracing/onelink_only:1
+\endverbatim
+
+\li <b>\c 
+tracing/smpi
+</b>:
+  This option only has effect if this simulator is SMPI-based. Traces the MPI
+  interface and generates a trace that can be analyzed using Gantt-like
+  visualizations. Every MPI function (implemented by SMPI) is transformed in a
+  state, and point-to-point communications can be analyzed with arrows.
+\verbatim
+--cfg=tracing/smpi:1
+\endverbatim
+
+\li <b>\c 
+tracing/smpi/group
+</b>:
+  This option only has effect if this simulator is SMPI-based. The processes
+  are grouped by the hosts where they were executed.
+\verbatim
+--cfg=tracing/smpi/group:1
+\endverbatim
+
+\li <b>\c 
+tracing/msg/task
+</b>:
+  This option only has effect if this simulator is MSG-based. It traces the
+  behavior of all categorized MSG tasks, grouping them by hosts.
+\verbatim
+--cfg=tracing/msg/task:1
+\endverbatim
+
+\li <b>\c 
+tracing/msg/process
+</b>:
+  This option only has effect if this simulator is MSG-based. It traces the
+  behavior of all categorized MSG processes, grouping them by hosts. This option
+  can be used to track process location if this simulator has process migration.
+\verbatim
+--cfg=tracing/msg/process:1
+\endverbatim
+
+\li <b>\c 
+triva/categorized
+</b>:
+  This option generates a graph configuration file for Triva considering
+  categorized resource utilization.
+\verbatim
+--cfg=triva/categorized:graph_categorized.plist
+\endverbatim
+
+\li <b>\c 
+triva/uncategorized
+</b>:
+  This option generates a graph configuration file for Triva considering
+  uncategorized resource utilization.
+\verbatim
+--cfg=triva/categorized:graph_uncategorized.plist
+\endverbatim
+
+\subsection tracing_tracing_example_parameters Case studies
+
+Some scenarios that might help you decide which tracing options
+you should use to analyze your simulator.
+
+\li I want to trace the resource utilization of all hosts
+and links of the platform, and my simulator <b>does not</b> use
+the tracing API. For that, you can run a uncategorized trace
+with the following parameters (it will work with <b>any</b> Simgrid
+simulator):
+\verbatim
+./your_simulator \
+          --cfg=tracing:1 \
+          --cfg=tracing/uncategorized:1 \
+          --cfg=tracing/filename:mytracefile.trace \
+          --cfg=triva/uncategorized:uncat.plist
+\endverbatim
+
+\li I want to trace only a subset of my MSG (or SimDAG) tasks.
+For that, you will need to create tracing categories using the
+<b>TRACE_category (...)</b> function (as explained above),
+and then classify your tasks to a previously declared category
+using the <b>TRACE_msg_set_task_category (...)</b>
+(or <b>TRACE_sd_set_task_category (...)</b> for SimDAG tasks). After
+recompiling, run your simulator with the following parameters:
+\verbatim
+./your_simulator \
+          --cfg=tracing:1 \
+          --cfg=tracing/categorized:1 \
+          --cfg=tracing/filename:mytracefile.trace \
+          --cfg=triva/categorized:cat.plist
+\endverbatim
+
+
+\subsection tracing_tracing_example Example of Instrumentation
+
+A simplified example using the tracing mandatory functions.
+
+\verbatim
+int main (int argc, char **argv)
+{
+  MSG_global_init (&argc, &argv);
+
+  //(... after deployment ...)
+
+  //note that category declaration must be called after MSG_create_environment
+  TRACE_category_with_color ("request", "1 0 0");
+  TRACE_category_with_color ("computation", "0.3 1 0.4");
+  TRACE_category ("finalize");
+
+  m_task_t req1 = MSG_task_create("1st_request_task", 10, 10, NULL);
+  m_task_t req2 = MSG_task_create("2nd_request_task", 10, 10, NULL);
+  m_task_t req3 = MSG_task_create("3rd_request_task", 10, 10, NULL);
+  m_task_t req4 = MSG_task_create("4th_request_task", 10, 10, NULL);
+  TRACE_msg_set_task_category (req1, "request");
+  TRACE_msg_set_task_category (req2, "request");
+  TRACE_msg_set_task_category (req3, "request");
+  TRACE_msg_set_task_category (req4, "request");
+
+  m_task_t comp = MSG_task_create ("comp_task", 100, 100, NULL);
+  TRACE_msg_set_task_category (comp, "computation");
+
+  m_task_t finalize = MSG_task_create ("finalize", 0, 0, NULL);
+  TRACE_msg_set_task_category (finalize, "finalize");
+
+  //(...)
+
+  MSG_clean();
+  return 0;
+}
+\endverbatim
+
+\subsection tracing_tracing_analyzing Analyzing the SimGrid Traces
+
+The SimGrid library, during an instrumented simulation, creates a trace file in
+the Paje file format that contains the platform utilization for the simulation
+that was executed. The visualization analysis of this file is performed with the
+visualization tool <a href="http://triva.gforge.inria.fr">Triva</a>, with
+special configurations tunned to SimGrid needs. This part of the documentation
+explains how to configure and use Triva to analyse a SimGrid trace file.
+
+- <b>Installing Triva</b>: the tool is available in the INRIAGforge, 
+at <a href="http://triva.gforge.inria.fr">http://triva.gforge.inria.fr</a>.
+Use the following command to get the sources, and then check the file
+<i>INSTALL</i>. This file contains instructions to install
+the tool's dependencies in a Ubuntu/Debian Linux. The tool can also
+be compiled in MacOSes natively, check <i>INSTALL.mac</i> file.
+\verbatim
+$ svn checkout svn://scm.gforge.inria.fr/svn/triva
+$ cd triva
+$ cat INSTALL
+\endverbatim
+
+- <b>Executing Triva</b>: a binary called <i>Triva</i> is available after the
+  installation (you can execute it passing <em>--help</em> to check its
+options). If the triva binary is not available after following the
+installation instructions, you may want to execute the following command to
+initialize the GNUstep environment variables. We strongly recommend that you
+use the latest GNUstep packages, and not the packages available through apt-get
+in Ubuntu/Debian packaging systems. If you install GNUstep using the latest
+available packages, you can execute this command:
+\verbatim
+$ source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
+\endverbatim
+You should be able to see this output after the installation of triva:
+\verbatim
+$ ./Triva.app/Triva --help
+Usage: Triva [OPTIONS...] TRACE0 [TRACE1]
+Trace Analysis through Visualization
+
+TimeInterval
+    --ti_frequency {double}    Animation: frequency of updates
+    --ti_hide                  Hide the TimeInterval window
+    --ti_forward {double}      Animation: value to move time-slice
+    --ti_apply                 Apply the configuration
+    --ti_update                Update on slider change
+    --ti_animate               Start animation
+    --ti_start {double}        Start of time slice
+    --ti_size {double}         Size of time slice
+Triva
+    --comparison               Compare Trace Files (Experimental)
+    --graph                    Configurable Graph
+    --list                     Print Trace Type Hierarchy
+    --hierarchy                Export Trace Type Hierarchy (dot)
+    --stat                     Trace Statistics and Memory Utilization
+    --instances                List All Trace Entities
+    --linkview                 Link View (Experimental)
+    --treemap                  Squarified Treemap
+    --merge                    Merge Trace Files (Experimental)
+    --check                    Check Trace File Integrity
+GraphConfiguration
+    --gc_conf {file}           Graph Configuration in Property List Format
+    --gc_apply                 Apply the configuration
+    --gc_hide                  Hide the GraphConfiguration window
+\endverbatim
+Triva expects that the user choose one of the available options 
+(currently <em>--graph</em> or <em>--treemap</em> for a visualization analysis)
+and the trace file from the simulation.
+
+- <b>Understanding Triva - time-slice</b>: the analysis of a trace file using
+  the tool always takes into account the concept of the <em>time-slice</em>.
+This concept means that what is being visualized in the screen is always
+calculated considering a specific time frame, with its beggining and end
+timestamp. The time-slice is configured by the user and can be changed
+dynamically through the window called <em>Time Interval</em> that is opened
+whenever a trace file is being analyzed. The next figure depicts the time-slice
+configuration window.
+In the top of the window, in the space named <i>Trace Time</i>,
+the two fields show the beggining of the trace (which usually starts in 0) and
+the end (that depends on the time simulated by SimGrid). The middle of the
+window, in the square named <i>Time Slice Configuration</i>, contains the
+aspects related to the time-slice, including its <i>start</i> and its
+<i>size</i>. The gray rectangle in the bottom of this part indicates the 
+<i>current time-slice</i> that is considered for the drawings. If the checkbox 
+<i>Update Drawings on Sliders Change</i> is not selected, the button
+<i>Apply</i> must be clicked in order to inform triva that the
+new time-slice must be considered. The bottom part of the window, in the space
+indicated by the square <i>Time Slice Animation</i> can be used to advance
+the time-frame automatically. The user configures the amount of time that the
+time-frame will forward and how frequent this update will happen. Once this is
+configured, the user clicks the <i>Play</i> button in order to see the dynamic
+changes on the drawings.
+<center>
+\htmlonly
+<a href="triva-time_interval.png" border=0><img src="triva-time_interval.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+<b>Remarks:</b> when the trace has too many hosts or links, the computation to
+take into account a new time-slice can be expensive. When this happens, the
+<i>Frequency</i> parameter, but also updates caused by change on configurations
+when the checkbox <i>Update Drawings on Sliders
+Change</i> is selected will not be followed.
+
+- <b>Understanding Triva - graph</b>: this part of the documention explains how
+  to analyze the traces using the graph view of Triva, when the user executes
+the tool passing <em>--graph</em> as parameter. Triva opens three windows when
+this parameter is used: the <i>Time Interval</i> window (previously described),
+the <i>Graph Representation</i> window, and the <em>Graph Configuration</em>
+window. The Graph Representation is the window where drawings take place.
+Initially, it is completely white waiting for a proper graph configuration input
+by the user. We start the description of this type of analysis by describing the
+<i>Graph Configuration</i> window (depicted below). By using a particular
+configuration, triva
+can be used to customize the graph drawing according to
+the SimGrid trace that was created with user-specific categories. Before delving
+into the details of this customization, let us first explain the major parts of
+the graph configuration window. The buttons located in the top-right corner can
+be used to delete, copy and create a new configuration. The checkbox in the
+top-middle part of the window indicates if the configuration typed in the
+textfield is syntactically correct (we are using the non-XML 
+<a href="http://en.wikipedia.org/wiki/Property_list">Property List Format</a> to
+describe the configuration). The pop-up button located on the top-left corner 
+indicates the selected configuration (the user can have multiple graph
+configurations). The bottom-left text field contains the name of the current
+configuration (updates on this field must be followed by typing enter on the
+keyboard to take into account the name change). The bottom-right <em>Apply</em>
+button activates the current configuration, resulting on an update on the graph
+drawings.
+<center>
+\htmlonly
+<a href="triva-graph_configuration.png" border=0><img src="triva-graph_configuration.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+<b>Basic SimGrid Configuration</b>: The figure shows in the big textfield the
+basic configuration that should be used during the analysis of a SimGrid trace
+file. The basic logic of the configuration is as follows:
+\verbatim
+{
+  node = (HOST);
+  edge = (LINK);
+\endverbatim
+The nodes of the graph will be created based on the <i>node</i> parameter, which
+in this case is the different <em>"HOST"</em>s of the platform 
+used to simulate. The <i>edge</i> parameter indicates that the edges of the
+graph will be created based on the <em>"LINK"</em>s of the platform. After the
+definition of these two parameters, the configuration must detail how
+<em>HOST</em>s and <em>LINK</em>s should be drawn. For that, the configuration
+must have an entry for each of the types used. For <em>HOST</em>, as basic
+configuration, we have:
+\verbatim
+  HOST = {
+    size = power;
+    scale = global;
+  };
+\endverbatim
+The parameter <em>size</em> indicates which variable from the trace file will be
+used to define the size of the node HOST in the visualization. If the simulation
+was executed with availability traces, the size of the nodes will be changed
+according to these traces. The parameter <em>scale</em> indicates if the value
+of the variable is <em>global</em> or <em>local</em>. If it is global, the value
+will be relative to the power of all other hosts, if it is local, the value will
+be relative locally.
+For <em>LINK</em> we have:
+\verbatim
+  LINK = {
+    src = source;
+    dst = destination;
+    
+    size = bandwidth;
+    scale = global;
+  };
+\endverbatim
+For the types specified in the <em>edge</em> parameter (such as <em>LINK</em>),
+the configuration must contain two additional parameters: <em>src</em> and
+<em>dst</em> that are used to properly identify which nodes this edge is
+connecting. The values <em>source</em> and <em>destination</em> are always present
+in the SimGrid trace file and should not be changed in the configuration. The
+parameter <em>size</em> for the LINK, in this case, is configured as the
+variable <em>bandwidth</em>, with a <em>global</em> scale. The scale meaning
+here is exactly the same used for nodes. The last parameter is the GraphViz
+algorithm used to calculate the position of the nodes in the graph
+representation.
+\verbatim
+  graphviz-algorithm = neato;
+}
+\endverbatim
+<b>Customizing the Graph Representation</b>: triva is capable to handle
+a customized graph representation based on the variables present in the trace
+file. In the case of SimGrid, every time a category is created for tasks, two
+variables in the trace file are defined: one to indicate node utilization (how
+much power was used by that task category), and another to indicate link
+utilization (how much bandwidth was used by that category). For instance, if the
+user declares a category named <i>request</i>, there will be variables named
+<b>p</b><i>request</i> and a <b>b</b><i>request</i> (<b>p</b> for power and
+<b>b</b> for bandwidth). It is important to notice that the variable
+<i>prequest</i> in this case is only available for HOST, and
+<i>brequest</i> is only available for LINK. <b>Example</b>: suppose there are
+two categories for tasks: request and compute. To create a customized graph
+representation with a proportional separation of host and link utilization, use
+as configuration for HOST and LINK this:
+\verbatim
+  HOST = {
+    size = power;
+    scale = global;
+  
+    sep_host = {
+      type = separation;
+      size = power;
+      values = (prequest, pcomputation);
+    };
+  };
+
+  LINK = {
+    src = source;
+    dst = destination;
+    size = bandwidth;
+    scale = global;
+
+    sep_link = {
+      type = separation;
+      size = bandwidth;
+      values = (brequest, bcomputation);
+    };
+  };
+\endverbatim
+Where <i>sep_host</i> contains a composition of type <i>separation</i> where
+its max size is the <i>power</i> of the host and the variables <i>prequest</i>
+and <i>pcomputation</i> are drawn proportionally to the size of the HOST. And
+<i>sep_link</i> is also a separation where max is defined as the
+<i>bandwidth</i> of the link, and the variables <i>brequest</i> and
+<i>bcomputation</i> are drawn proportionally within a LINK.
+<i>This configuration enables the analysis of resource utilization by MSG tasks,
+and the identification of load-balancing issues, network bottlenecks, for
+instance.</i> \n
+<b>Other compositions</b>: besides <i>separation</i>, it is possible to use
+other types of compositions, such as gradients, and colors, like this:
+\verbatim
+    gra_host = {
+      type = gradient;
+      scale = global;
+      values = (numberOfTasks);
+    };
+    color_host = {
+      type = color;
+      values = (is_server);
+    };
+\endverbatim
+Where <i>gra_host</i> creates a gradient within a node of the graph, using a
+global scale and using as value a variable called <i>numberOfTasks</i>, that
+could be declared by the user using the optional tracing functions of SimGrid.
+If scale is global, the max and min value for the gradient will be equal to the
+max and min numberOfTasks among all hosts, and if scale is local, the max and
+min value based on the value of numberOfTasks locally in each host.
+And <i>color_host</i> composition draws a square based on a positive value of
+the variable <i>is_server</i>, that could also be defined by the user using the
+SimGrid tracing functions. \n
+<b>The Graph Visualization</b>: The next figure shows a graph visualization of a
+given time-slice of the masterslave_forwarder example (present in the SimGrid
+sources). The red color indicates tasks from the <i>compute</i> category. This
+visualization was generated with the following configuration:
+\verbatim
+{
+  node = (HOST);
+  edge = (LINK);
+
+  HOST = {
+    size = power;
+    scale = global;
+  
+    sep_host = {
+      type = separation;
+      size = power;
+      values = (pcompute, pfinalize);
+    };
+  };
+  LINK = {
+    src = source;
+    dst = destination;
+    size = bandwidth;\section tracing_tracing Tracing Simulations for Visualization
+
+The trace visualization is widely used to observe and understand the behavior
+of parallel applications and distributed algorithms. Usually, this is done in a
+two-step fashion: the user instruments the application and the traces are
+analyzed after the end of the execution. The visualization itself can highlights
+unexpected behaviors, bottlenecks and sometimes can be used to correct
+distributed algorithms. The SimGrid team has instrumented the library
+in order to let users trace their simulations and analyze them. This part of the
+user manual explains how the tracing-related features can be enabled and used
+during the development of simulators using the SimGrid library.
+
+\subsection tracing_tracing_howitworks How it works
+
+For now, the SimGrid library is instrumented so users can trace the <b>platform
+utilization</b> using the MSG, SimDAG and SMPI interface. This means that the tracing will
+register how much power is used for each host and how much bandwidth is used for
+each link of the platform. The idea with this type of tracing is to observe the
+overall view of resources utilization in the first place, especially the
+identification of bottlenecks, load-balancing among hosts, and so on.
+
+The idea of the tracing facilities is to give SimGrid users to possibility to
+classify MSG and SimDAG tasks by category, tracing the platform utilization
+(hosts and links) for each of the categories. For that,
+the tracing interface enables the declaration of categories and a function to
+mark a task with a previously declared category. <em>The tasks that are not
+classified according to a category are not traced</em>. Even if the user
+does not specify any category, the simulations can still be traced in terms
+of resource utilization by using a special parameter that is detailed below.
+
+\subsection tracing_tracing_enabling Enabling using CMake
+
+With the sources of SimGrid, it is possible to enable the tracing 
+using the parameter <b>-Denable_tracing=ON</b> when the cmake is executed.
+The section \ref tracing_tracing_functions describes all the functions available
+when this Cmake options is activated. These functions will have no effect
+if SimGrid is configured without this option (they are wiped-out by the
+C-preprocessor).
+
+\verbatim
+$ cmake -Denable_tracing=ON .
+$ make
+\endverbatim
+
+\subsection tracing_tracing_functions Tracing Functions
+
+\li <b>\c TRACE_category (const char *category)</b>: This function should be used
+to define a user category. The category can be used to differentiate the tasks
+that are created during the simulation (for example, tasks from server1,
+server2, or request tasks, computation tasks, communication tasks).
+All resource utilization (host power and link bandwidth) will be
+classified according to the task category. Tasks that do not belong to a
+category are not traced. The color for the category that is being declared
+is random (use next function to specify a color).
+
+\li <b>\c TRACE_category_with_color (const char *category, const char *color)</b>: Same
+as TRACE_category, but let user specify a color encoded as a RGB-like string with
+three floats from 0 to 1. So, to specify a red color, the user can pass "1 0 0" as
+color parameter. A light-gray color can be specified using "0.7 0.7 0.7" as color.
+
+\li <b>\c TRACE_msg_set_task_category (m_task_t task, const char *category)</b>:
+This function should be called after the creation of a MSG task, to define the
+category of that task. The first parameter \c task must contain a task that was
+created with the function \c MSG_task_create. The second parameter
+\c category must contain a category that was previously defined by the function
+\c TRACE_category.
+
+\li <b>\c TRACE_sd_set_task_category (SD_task_t task, const char *category)</b>:
+This function should be called after the creation of a SimDAG task, to define the
+category of that task. The first parameter \c task must contain a task that was
+created with the function \c MSG_task_create. The second parameter
+\c category must contain a category that was previously defined by the function
+\c TRACE_category.
+
+\li <b>\c TRACE_[host|link]_variable_declare (const char *variable)</b>:
+Declare a user variable that will be associated to host/link. A variable can
+be used to trace user variables such as the number of tasks in a server,
+the number of clients in an application (for hosts), and so on.
+
+\li <b>\c TRACE_[host|link]_variable_[set|add|sub] (const char *[host|link], const char *variable, double value)</b>:
+Set the value of a given user variable for a given host/link. The value
+of this variable is always associated to the host/link. The host/link 
+parameters should be its name as the one listed in the platform file.
+
+\li <b>\c TRACE_[host|link]_variable_[set|add|sub]_with_time (double time, const char *[host|link], const char *variable, double value)</b>:
+Same as TRACE_[host|link]_variable_[set|add|sub], but let user specify
+the time used to trace it. Users can specify a time that is not the 
+simulated clock time as defined by the core simulator. This allows
+a fine-grain control of time definition, but should be used with 
+caution since the trace can be inconsistent if resource utilization
+traces are also traced.
+
+\li <b>\c TRACE_link_srcdst_variable_[set|add|sub] (const char *src, const char *dst, const char *variable, double value)</b>:
+Same as TRACE_link_variable_[set|add|sub], but now users specify a source and
+destination hosts (as the names from the platform file). The tracing library
+will get the corresponding route that connects those two hosts (src and dst) and
+[set|add|sub] the value's variable for all the links of the route.
+
+\li <b>\c TRACE_link_srcdst_variable_[set|add|sub]_with_time (double time, const char *src, const char *dst, const char *variable, double value)</b>: 
+Same as TRACE_link_srcdst_variable_[set|add|sub], but user specify a time different from the simulated time.
+
+\subsection tracing_tracing_options Tracing configuration Options
+
+These are the options accepted by the tracing system of SimGrid:
+
+\li <b>\c 
+tracing
+</b>:
+  Safe switch. It activates (or deactivates) the tracing system.
+  No other tracing options take effect if this one is not activated.
+
+\li <b>\c
+tracing/platform
+</b>:
+  Register the simulation platform in the trace file.
+
+\li <b>\c
+tracing/onelink_only
+</b>:
+  By default, the tracing system uses all routes in the platform file
+  to re-create a "graph" of the platform and register it in the trace file.
+  This option let the user tell the tracing system to use only the routes
+  that are composed with just one link.
+
+\li <b>\c 
+tracing/categorized
+</b>:
+  It activates the categorized resource utilization tracing. It should
+  be enabled if tracing categories are used by this simulator.
+
+\li <b>\c 
+tracing/uncategorized
+</b>:
+  It activates the uncategorized resource utilization tracing. Use it if
+  this simulator do not use tracing categories and resource use have to be
+  traced.
+
+\li <b>\c 
+tracing/filename
+</b>:
+  A file with this name will be created to register the simulation. The file
+  is in the Paje format and can be analyzed using Triva or Paje visualization
+  tools. More information can be found in these webpages:
+     <a href="http://triva.gforge.inria.fr/">http://triva.gforge.inria.fr/</a>
+     <a href="http://paje.sourceforge.net/">http://paje.sourceforge.net/</a>
+
+\li <b>\c 
+tracing/smpi
+</b>:
+  This option only has effect if this simulator is SMPI-based. Traces the MPI
+  interface and generates a trace that can be analyzed using Gantt-like
+  visualizations. Every MPI function (implemented by SMPI) is transformed in a
+  state, and point-to-point communications can be analyzed with arrows.
+
+\li <b>\c 
+tracing/smpi/group
+</b>:
+  This option only has effect if this simulator is SMPI-based. The processes
+  are grouped by the hosts where they were executed.
+
+\li <b>\c 
+tracing/msg/task
+</b>:
+  This option only has effect if this simulator is MSG-based. It traces the
+  behavior of all categorized MSG tasks, grouping them by hosts.
+
+\li <b>\c 
+tracing/msg/process
+</b>:
+  This option only has effect if this simulator is MSG-based. It traces the
+  behavior of all categorized MSG processes, grouping them by hosts. This option
+  can be used to track process location if this simulator has process migration.
+
+
+\li <b>\c 
+triva/categorized:graph_categorized.plist
+</b>:
+  This option generates a graph configuration file for Triva considering
+  categorized resource utilization.
+
+\li <b>\c 
+triva/uncategorized:graph_uncategorized.plist
+</b>:
+  This option generates a graph configuration file for Triva considering
+  uncategorized resource utilization.
+
+\subsection tracing_tracing_example Example of Instrumentation
+
+A simplified example using the tracing mandatory functions.
+
+\verbatim
+int main (int argc, char **argv)
+{
+  MSG_global_init (&argc, &argv);
+
+  //(... after deployment ...)
+
+  //note that category declaration must be called after MSG_create_environment
+  TRACE_category_with_color ("request", "1 0 0");
+  TRACE_category_with_color ("computation", "0.3 1 0.4");
+  TRACE_category ("finalize");
+
+  m_task_t req1 = MSG_task_create("1st_request_task", 10, 10, NULL);
+  m_task_t req2 = MSG_task_create("2nd_request_task", 10, 10, NULL);
+  m_task_t req3 = MSG_task_create("3rd_request_task", 10, 10, NULL);
+  m_task_t req4 = MSG_task_create("4th_request_task", 10, 10, NULL);
+  TRACE_msg_set_task_category (req1, "request");
+  TRACE_msg_set_task_category (req2, "request");
+  TRACE_msg_set_task_category (req3, "request");
+  TRACE_msg_set_task_category (req4, "request");
+
+  m_task_t comp = MSG_task_create ("comp_task", 100, 100, NULL);
+  TRACE_msg_set_task_category (comp, "computation");
+
+  m_task_t finalize = MSG_task_create ("finalize", 0, 0, NULL);
+  TRACE_msg_set_task_category (finalize, "finalize");
+
+  //(...)
+
+  MSG_clean();
+  return 0;
+}
+\endverbatim
+
+\subsection tracing_tracing_analyzing Analyzing the SimGrid Traces
+
+The SimGrid library, during an instrumented simulation, creates a trace file in
+the Paje file format that contains the platform utilization for the simulation
+that was executed. The visualization analysis of this file is performed with the
+visualization tool <a href="http://triva.gforge.inria.fr">Triva</a>, with
+special configurations tunned to SimGrid needs. This part of the documentation
+explains how to configure and use Triva to analyse a SimGrid trace file.
+
+- <b>Installing Triva</b>: the tool is available in the INRIAGforge, 
+at <a href="http://triva.gforge.inria.fr">http://triva.gforge.inria.fr</a>.
+Use the following command to get the sources, and then check the file
+<i>INSTALL</i>. This file contains instructions to install
+the tool's dependencies in a Ubuntu/Debian Linux. The tool can also
+be compiled in MacOSes natively, check <i>INSTALL.mac</i> file.
+\verbatim
+$ svn checkout svn://scm.gforge.inria.fr/svn/triva
+$ cd triva
+$ cat INSTALL
+\endverbatim
+
+- <b>Executing Triva</b>: a binary called <i>Triva</i> is available after the
+  installation (you can execute it passing <em>--help</em> to check its
+options). If the triva binary is not available after following the
+installation instructions, you may want to execute the following command to
+initialize the GNUstep environment variables. We strongly recommend that you
+use the latest GNUstep packages, and not the packages available through apt-get
+in Ubuntu/Debian packaging systems. If you install GNUstep using the latest
+available packages, you can execute this command:
+\verbatim
+$ source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
+\endverbatim
+You should be able to see this output after the installation of triva:
+\verbatim
+$ ./Triva.app/Triva --help
+Usage: Triva [OPTIONS...] TRACE0 [TRACE1]
+Trace Analysis through Visualization
+
+TimeInterval
+    --ti_frequency {double}    Animation: frequency of updates
+    --ti_hide                  Hide the TimeInterval window
+    --ti_forward {double}      Animation: value to move time-slice
+    --ti_apply                 Apply the configuration
+    --ti_update                Update on slider change
+    --ti_animate               Start animation
+    --ti_start {double}        Start of time slice
+    --ti_size {double}         Size of time slice
+Triva
+    --comparison               Compare Trace Files (Experimental)
+    --graph                    Configurable Graph
+    --list                     Print Trace Type Hierarchy
+    --hierarchy                Export Trace Type Hierarchy (dot)
+    --stat                     Trace Statistics and Memory Utilization
+    --instances                List All Trace Entities
+    --linkview                 Link View (Experimental)
+    --treemap                  Squarified Treemap
+    --merge                    Merge Trace Files (Experimental)
+    --check                    Check Trace File Integrity
+GraphConfiguration
+    --gc_conf {file}           Graph Configuration in Property List Format
+    --gc_apply                 Apply the configuration
+    --gc_hide                  Hide the GraphConfiguration window
+\endverbatim
+Triva expects that the user choose one of the available options 
+(currently <em>--graph</em> or <em>--treemap</em> for a visualization analysis)
+and the trace file from the simulation.
+
+- <b>Understanding Triva - time-slice</b>: the analysis of a trace file using
+  the tool always takes into account the concept of the <em>time-slice</em>.
+This concept means that what is being visualized in the screen is always
+calculated considering a specific time frame, with its beggining and end
+timestamp. The time-slice is configured by the user and can be changed
+dynamically through the window called <em>Time Interval</em> that is opened
+whenever a trace file is being analyzed. The next figure depicts the time-slice
+configuration window.
+In the top of the window, in the space named <i>Trace Time</i>,
+the two fields show the beggining of the trace (which usually starts in 0) and
+the end (that depends on the time simulated by SimGrid). The middle of the
+window, in the square named <i>Time Slice Configuration</i>, contains the
+aspects related to the time-slice, including its <i>start</i> and its
+<i>size</i>. The gray rectangle in the bottom of this part indicates the 
+<i>current time-slice</i> that is considered for the drawings. If the checkbox 
+<i>Update Drawings on Sliders Change</i> is not selected, the button
+<i>Apply</i> must be clicked in order to inform triva that the
+new time-slice must be considered. The bottom part of the window, in the space
+indicated by the square <i>Time Slice Animation</i> can be used to advance
+the time-frame automatically. The user configures the amount of time that the
+time-frame will forward and how frequent this update will happen. Once this is
+configured, the user clicks the <i>Play</i> button in order to see the dynamic
+changes on the drawings.
+<center>
+\htmlonly
+<a href="triva-time_interval.png" border=0><img src="triva-time_interval.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+<b>Remarks:</b> when the trace has too many hosts or links, the computation to
+take into account a new time-slice can be expensive. When this happens, the
+<i>Frequency</i> parameter, but also updates caused by change on configurations
+when the checkbox <i>Update Drawings on Sliders
+Change</i> is selected will not be followed.
+
+- <b>Understanding Triva - graph</b>: this part of the documention explains how
+  to analyze the traces using the graph view of Triva, when the user executes
+the tool passing <em>--graph</em> as parameter. Triva opens three windows when
+this parameter is used: the <i>Time Interval</i> window (previously described),
+the <i>Graph Representation</i> window, and the <em>Graph Configuration</em>
+window. The Graph Representation is the window where drawings take place.
+Initially, it is completely white waiting for a proper graph configuration input
+by the user. We start the description of this type of analysis by describing the
+<i>Graph Configuration</i> window (depicted below). By using a particular
+configuration, triva
+can be used to customize the graph drawing according to
+the SimGrid trace that was created with user-specific categories. Before delving
+into the details of this customization, let us first explain the major parts of
+the graph configuration window. The buttons located in the top-right corner can
+be used to delete, copy and create a new configuration. The checkbox in the
+top-middle part of the window indicates if the configuration typed in the
+textfield is syntactically correct (we are using the non-XML 
+<a href="http://en.wikipedia.org/wiki/Property_list">Property List Format</a> to
+describe the configuration). The pop-up button located on the top-left corner 
+indicates the selected configuration (the user can have multiple graph
+configurations). The bottom-left text field contains the name of the current
+configuration (updates on this field must be followed by typing enter on the
+keyboard to take into account the name change). The bottom-right <em>Apply</em>
+button activates the current configuration, resulting on an update on the graph
+drawings.
+<center>
+\htmlonly
+<a href="triva-graph_configuration.png" border=0><img src="triva-graph_configuration.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+<b>Basic SimGrid Configuration</b>: The figure shows in the big textfield the
+basic configuration that should be used during the analysis of a SimGrid trace
+file. The basic logic of the configuration is as follows:
+\verbatim
+{
+  node = (HOST);
+  edge = (LINK);
+\endverbatim
+The nodes of the graph will be created based on the <i>node</i> parameter, which
+in this case is the different <em>"HOST"</em>s of the platform 
+used to simulate. The <i>edge</i> parameter indicates that the edges of the
+graph will be created based on the <em>"LINK"</em>s of the platform. After the
+definition of these two parameters, the configuration must detail how
+<em>HOST</em>s and <em>LINK</em>s should be drawn. For that, the configuration
+must have an entry for each of the types used. For <em>HOST</em>, as basic
+configuration, we have:
+\verbatim
+  HOST = {
+    size = power;
+    scale = global;
+  };
+\endverbatim
+The parameter <em>size</em> indicates which variable from the trace file will be
+used to define the size of the node HOST in the visualization. If the simulation
+was executed with availability traces, the size of the nodes will be changed
+according to these traces. The parameter <em>scale</em> indicates if the value
+of the variable is <em>global</em> or <em>local</em>. If it is global, the value
+will be relative to the power of all other hosts, if it is local, the value will
+be relative locally.
+For <em>LINK</em> we have:
+\verbatim
+  LINK = {
+    src = source;
+    dst = destination;
+    
+    size = bandwidth;
+    scale = global;
+  };
+\endverbatim
+For the types specified in the <em>edge</em> parameter (such as <em>LINK</em>),
+the configuration must contain two additional parameters: <em>src</em> and
+<em>dst</em> that are used to properly identify which nodes this edge is
+connecting. The values <em>source</em> and <em>destination</em> are always present
+in the SimGrid trace file and should not be changed in the configuration. The
+parameter <em>size</em> for the LINK, in this case, is configured as the
+variable <em>bandwidth</em>, with a <em>global</em> scale. The scale meaning
+here is exactly the same used for nodes. The last parameter is the GraphViz
+algorithm used to calculate the position of the nodes in the graph
+representation.
+\verbatim
+  graphviz-algorithm = neato;
+}
+\endverbatim
+<b>Customizing the Graph Representation</b>: triva is capable to handle
+a customized graph representation based on the variables present in the trace
+file. In the case of SimGrid, every time a category is created for tasks, two
+variables in the trace file are defined: one to indicate node utilization (how
+much power was used by that task category), and another to indicate link
+utilization (how much bandwidth was used by that category). For instance, if the
+user declares a category named <i>request</i>, there will be variables named
+<b>p</b><i>request</i> and a <b>b</b><i>request</i> (<b>p</b> for power and
+<b>b</b> for bandwidth). It is important to notice that the variable
+<i>prequest</i> in this case is only available for HOST, and
+<i>brequest</i> is only available for LINK. <b>Example</b>: suppose there are
+two categories for tasks: request and compute. To create a customized graph
+representation with a proportional separation of host and link utilization, use
+as configuration for HOST and LINK this:
+\verbatim
+  HOST = {
+    size = power;
+    scale = global;
+  
+    sep_host = {
+      type = separation;
+      size = power;
+      values = (prequest, pcomputation);
+    };
+  };
+
+  LINK = {
+    src = source;
+    dst = destination;
+    size = bandwidth;
+    scale = global;
+
+    sep_link = {
+      type = separation;
+      size = bandwidth;
+      values = (brequest, bcomputation);
+    };
+  };
+\endverbatim
+Where <i>sep_host</i> contains a composition of type <i>separation</i> where
+its max size is the <i>power</i> of the host and the variables <i>prequest</i>
+and <i>pcomputation</i> are drawn proportionally to the size of the HOST. And
+<i>sep_link</i> is also a separation where max is defined as the
+<i>bandwidth</i> of the link, and the variables <i>brequest</i> and
+<i>bcomputation</i> are drawn proportionally within a LINK.
+<i>This configuration enables the analysis of resource utilization by MSG tasks,
+and the identification of load-balancing issues, network bottlenecks, for
+instance.</i> \n
+<b>Other compositions</b>: besides <i>separation</i>, it is possible to use
+other types of compositions, such as gradients, and colors, like this:
+\verbatim
+    gra_host = {
+      type = gradient;
+      scale = global;
+      values = (numberOfTasks);
+    };
+    color_host = {
+      type = color;
+      values = (is_server);
+    };
+\endverbatim
+Where <i>gra_host</i> creates a gradient within a node of the graph, using a
+global scale and using as value a variable called <i>numberOfTasks</i>, that
+could be declared by the user using the optional tracing functions of SimGrid.
+If scale is global, the max and min value for the gradient will be equal to the
+max and min numberOfTasks among all hosts, and if scale is local, the max and
+min value based on the value of numberOfTasks locally in each host.
+And <i>color_host</i> composition draws a square based on a positive value of
+the variable <i>is_server</i>, that could also be defined by the user using the
+SimGrid tracing functions. \n
+<b>The Graph Visualization</b>: The next figure shows a graph visualization of a
+given time-slice of the masterslave_forwarder example (present in the SimGrid
+sources). The red color indicates tasks from the <i>compute</i> category. This
+visualization was generated with the following configuration:
+\verbatim
+{
+  node = (HOST);
+  edge = (LINK);
+
+  HOST = {
+    size = power;
+    scale = global;
+  
+    sep_host = {
+      type = separation;
+      size = power;
+      values = (pcompute, pfinalize);
+    };
+  };
+  LINK = {
+    src = source;
+    dst = destination;
+    size = bandwidth;
+    scale = global;
+
+    sep_link = {
+      type = separation;
+      size = bandwidth;
+      values = (bcompute, bfinalize);
+    };
+  };
+  graphviz-algorithm = neato;
+}
+\endverbatim
+<center>
+\htmlonly
+<a href="triva-graph_visualization.png" border=0><img src="triva-graph_visualization.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+
+- <b>Understading Triva - colors</b>: An important issue when using Triva is how
+  to define colors. To do that, we have to know which variables are defined in
+the trace file generated by the SimGrid library. The parameter <em>--list</em> 
+lists the variables for a given trace file:
+\verbatim
+$ Triva -l masterslave_forwarder.trace
+iFile
+c  platform
+c    HOST
+v     power
+v     is_slave
+v     is_master
+v     task_creation
+v     task_computation
+v     pcompute
+v     pfinalize
+c    LINK
+v     bandwidth
+v     latency
+v     bcompute
+v     bfinalize
+c  user_type
+\endverbatim
+We can see that HOST has seven variables (from power to pfinalize) and LINK has
+four (from bandwidth to bfinalize). To define a red color for the
+<i>pcompute</i> and <i>bcompute</i> (which are defined based on user category
+<i>compute</i>), execute:
+\verbatim
+$ defaults write Triva 'pcompute Color' '1 0 0'
+$ defaults write Triva 'bcompute Color' '1 0 0'
+\endverbatim
+Where the three numbers in each line are the RGB color with values from 0 to 1.
+\verbatim
+    scale = global;
+
+    sep_link = {
+      type = separation;
+      size = bandwidth;
+      values = (bcompute, bfinalize);
+    };
+  };
+  graphviz-algorithm = neato;
+}
+\endverbatim
+<center>
+\htmlonly
+<a href="triva-graph_visualization.png" border=0><img src="triva-graph_visualization.png" width="50%" border=0></a>
+\endhtmlonly
+</center>
+
+- <b>Understading Triva - colors</b>: An important issue when using Triva is how
+  to define colors. To do that, we have to know which variables are defined in
+the trace file generated by the SimGrid library. The parameter <em>--list</em> 
+lists the variables for a given trace file:
+\verbatim
+$ Triva -l masterslave_forwarder.trace
+iFile
+c  platform
+c    HOST
+v     power
+v     is_slave
+v     is_master
+v     task_creation
+v     task_computation
+v     pcompute
+v     pfinalize
+c    LINK
+v     bandwidth
+v     latency
+v     bcompute
+v     bfinalize
+c  user_type
+\endverbatim
+We can see that HOST has seven variables (from power to pfinalize) and LINK has
+four (from bandwidth to bfinalize). To define a red color for the
+<i>pcompute</i> and <i>bcompute</i> (which are defined based on user category
+<i>compute</i>), execute:
+\verbatim
+$ defaults write Triva 'pcompute Color' '1 0 0'
+$ defaults write Triva 'bcompute Color' '1 0 0'
+\endverbatim
+Where the three numbers in each line are the RGB color with values from 0 to 1.
+
+*/
\ No newline at end of file
diff --git a/doc/use.doc b/doc/use.doc
new file mode 100644 (file)
index 0000000..2f1ff4e
--- /dev/null
@@ -0,0 +1,23 @@
+/*! \page use Using SimGrid
+
+\section use_generic First steps with SimGrid
+
+If you decide to go for the MSG interface, please read carefully the
+\ref MSG_examples. You'll find in \ref MSG_ex_master_slave a very
+simple consisting of a master (that owns a bunch of tasks and
+distributes them) , some slaves (that process tasks whenever they
+receive one) and some forwarder agents (that simply pass the tasks
+they receive to some slaves).
+
+If you decide to go for the GRAS interface, you should definitively
+read the \ref GRAS_tut. The first section constitutes an introduction
+to the tool and presents the model we use. The second section
+constitutes a complete step-by-step tutorial building a distributed
+application from the beginning and exemplifying most of the GRAS
+features in the process. The last section groups some HOWTOS
+highlighting a given feature of the framework in a more concise way.
+
+If you decide to go for another interface, I'm afraid your only sources
+of information will be the source code and the mailing lists...
+
+*/
\ No newline at end of file
diff --git a/doc/webcruft/fish.gif b/doc/webcruft/fish.gif
deleted file mode 100644 (file)
index ea2f6d8..0000000
Binary files a/doc/webcruft/fish.gif and /dev/null differ
diff --git a/doc/webcruft/robots.txt b/doc/webcruft/robots.txt
deleted file mode 100644 (file)
index 7ce4fc9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Allow: *
diff --git a/doc/webcruft/simgrid_logo_2011.png b/doc/webcruft/simgrid_logo_2011.png
new file mode 100644 (file)
index 0000000..1fdf138
Binary files /dev/null and b/doc/webcruft/simgrid_logo_2011.png differ
diff --git a/doc/webcruft/win_install_01.png b/doc/webcruft/win_install_01.png
new file mode 100644 (file)
index 0000000..f7ab980
Binary files /dev/null and b/doc/webcruft/win_install_01.png differ
diff --git a/doc/webcruft/win_install_02.png b/doc/webcruft/win_install_02.png
new file mode 100644 (file)
index 0000000..42d082d
Binary files /dev/null and b/doc/webcruft/win_install_02.png differ
diff --git a/doc/webcruft/win_install_03.png b/doc/webcruft/win_install_03.png
new file mode 100644 (file)
index 0000000..a6c51d4
Binary files /dev/null and b/doc/webcruft/win_install_03.png differ
diff --git a/doc/webcruft/win_install_04.png b/doc/webcruft/win_install_04.png
new file mode 100644 (file)
index 0000000..b3fc6bb
Binary files /dev/null and b/doc/webcruft/win_install_04.png differ
diff --git a/examples/SimGrid.tesh b/examples/SimGrid.tesh
deleted file mode 100644 (file)
index 8a74f69..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-# Command line : \r
-# Windows -> tesh --directory=%EXAMPLE_DIR% --file=SimGrid.tesh --log="log.thresh:info tesh.fmt:%m%n" --keep-going-unit\r
-# Linux   -> tesh --directory=$EXAMPLE_DIR --file=SimGrid.tesh --log="log.thresh:info tesh.fmt:%m%n" --keep-going-unit\r
-D Examples (MSG API functionnality checking (for C, C++ and Java))\r
-\r
-$ cd ${EXAMPLE_DIR:=.}\r
-\r
-$ cd msg\r
-\r
-# Masterslave OK\r
-! include masterslave/masterslave.tesh\r
-\r
-# Outputs difference : __FILE__ difference between Windows and Linux\r
-#! include masterslave/masterslave_bypass.tesh\r
-\r
-# Outputs difference\r
-#! include masterslave/masterslave_failure.tesh\r
-\r
-! include masterslave/masterslave_forwarder.tesh\r
-\r
-# Parllel task (not work)\r
-#! include parallel_task/parallel_task.tesh\r
-\r
-# Priority\r
-! include priority/priority.tesh\r
-\r
-# Properties\r
-! include properties/msg_prop.tesh\r
-\r
-# Send/Receive\r
-\r
-! include sendrecv/sendrecv_CLM03.tesh\r
-\r
-# format d'affichage de %g\r
-! include sendrecv/sendrecv_KCCFLN05.tesh\r
-\r
-\r
-! include sendrecv/sendrecv_Reno.tesh\r
-\r
-! include sendrecv/sendrecv_Vegas.tesh\r
-\r
-# Suspend\r
-! include suspend/suspend.tesh\r
-\r
-\r
-##############################################################################################\r
-# java examples\r
-\r
-$ cd ${MSG4JAVA_CLASSPATH}\simgrid\msg\r
-\r
-$ javac *.java\r
-> Note: Some input files use unchecked or unsafe operations.\r
-> Note: Recompile with -Xlint:unchecked for details.\r
-\r
-$ cd ${EXAMPLE_DIR:=.}\r
-\r
-$ cd java/basic\r
-\r
-! include basic.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd comm_time\r
-\r
-! include comm_time.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd ping_pong\r
-\r
-! include ping_pong.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd suspend\r
-\r
-! include suspend.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd autoDestination\r
-\r
-! include autoDestination.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd explicitDestination\r
-\r
-! include explicitDestination.tesh\r
-\r
-##########################################################################################\r
-# cxx examples \r
-\r
-$ cd ..\r
-\r
-$ cd ..\r
-\r
-$ cd cxx/basic\r
-\r
-! include basic.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd comm_time\r
-\r
-! include comm_time.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd ping_pong\r
-\r
-! include ping_pong.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd suspend\r
-\r
-! include suspend.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd autoDestination\r
-\r
-! include autoDestination.tesh\r
-\r
-$ cd ..\r
-\r
-$ cd explicitDestination\r
-\r
-! include explicitDestination.tesh\r
-\r
-\r
-\r
-\r
-\r
-\r
index d2e2325..354eeb7 100644 (file)
@@ -18,6 +18,19 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(Bandwidth,
  * Sensor code
  * **********************************************************************/
 
+static gras_socket_t try_gras_socket_client_from_string(const char *host)
+{
+  volatile gras_socket_t sock = NULL;
+  xbt_ex_t e;
+  TRY {
+    sock = gras_socket_client_from_string(host);
+  }
+  CATCH(e) {
+    xbt_ex_free(e);
+  }
+  return sock;
+}
+
 /* Function prototypes */
 int sensor(int argc, char *argv[]);
 
@@ -26,7 +39,6 @@ int sensor(int argc, char *argv[])
   gras_socket_t mysock;
   gras_socket_t master = NULL;
   int connection_try = 10;
-  xbt_ex_t e;
 
   gras_init(&argc, argv);
   amok_bw_init();
@@ -34,19 +46,10 @@ int sensor(int argc, char *argv[])
 
   mysock = gras_socket_server_range(3000, 9999, 0, 0);
   XBT_INFO("Sensor starting (on port %d)", gras_os_myport());
-  while (connection_try > 0 && master == NULL) {
-    int connected = 0;
-    TRY {
-      master = gras_socket_client_from_string(argv[1]);
-      connected = 1;
-    }
-    CATCH(e) {
-      xbt_ex_free(e);
-    }
-    if (!connected) {
-      connection_try--;
-      gras_os_sleep(0.5);       /* let the master get ready */
-    }
+  while (connection_try > 0 &&
+         !(master = try_gras_socket_client_from_string(argv[1]))) {
+    connection_try--;
+    gras_os_sleep(0.5);       /* let the master get ready */
   }
 
   amok_pm_group_join(master, "bandwidth");
index db1504b..8e3b0f4 100644 (file)
@@ -82,7 +82,7 @@ int sender(int argc, char *argv[])
   xbt_peer_t h;                 /* iterator */
   int connected = 0;
 
-  gras_socket_t peer = NULL;    /* socket to node */
+  volatile gras_socket_t peer = NULL;    /* socket to node */
 
 
   /* xbt_dynar for peers */
index 5b476ed..7c1a48a 100644 (file)
@@ -1,64 +1,63 @@
 #! ./tesh
 
-! output sort
 $ $SG_TEST_EXENV ./all2all_simulator$EXEEXT ${srcdir:=.}/../../msg/small_platform.xml ${srcdir:=.}/all2all.xml "--log=root.fmt:[%10.6r]%e(%.2i:%P@%h)%e%m%n"
 > [  0.000000] (01:sender@Tremblay) Launch current node
 > [  0.000000] (03:sender@Jupiter) Launch current node
 > [  0.000000] (05:sender@Fafard) Launch current node
 > [  0.000000] (07:sender@Ginette) Launch current node
 > [  0.000000] (09:sender@Bourassa) Launch current node
-> [  0.000156] (02:receiver@Tremblay) Listening on port 4000 (expecting 4 messages)
 > [  0.000156] (04:receiver@Jupiter) Listening on port 4000 (expecting 4 messages)
-> [  0.000156] (06:receiver@Fafard) Listening on port 4000 (expecting 4 messages)
-> [  0.000156] (08:receiver@Ginette) Listening on port 4000 (expecting 4 messages)
+> [  0.000156] (02:receiver@Tremblay) Listening on port 4000 (expecting 4 messages)
 > [  0.000156] (10:receiver@Bourassa) Listening on port 4000 (expecting 4 messages)
-> [  0.015510] (01:sender@Tremblay)   Sent Data from Tremblay to Jupiter
-> [  0.015510] (02:receiver@Tremblay) Got Data from Jupiter:5000 (still 3 to go)
-> [  0.015510] (03:sender@Jupiter)   Sent Data from Jupiter to Tremblay
-> [  0.015510] (04:receiver@Jupiter) Got Data from Tremblay:5000 (still 3 to go)
-> [  0.036162] (02:receiver@Tremblay) Got Data from Fafard:5000 (still 2 to go)
-> [  0.036162] (05:sender@Fafard)   Sent Data from Fafard to Tremblay
-> [  0.036318] (01:sender@Tremblay)   Sent Data from Tremblay to Fafard
-> [  0.036318] (06:receiver@Fafard) Got Data from Tremblay:5000 (still 3 to go)
-> [  0.049459] (02:receiver@Tremblay) Got Data from Ginette:5000 (still 1 to go)
-> [  0.049459] (07:sender@Ginette)   Sent Data from Ginette to Tremblay
-> [  0.049771] (01:sender@Tremblay)   Sent Data from Tremblay to Ginette
-> [  0.049771] (08:receiver@Ginette) Got Data from Tremblay:5000 (still 3 to go)
-> [  0.069896] (02:receiver@Tremblay) Got Data from Bourassa:5000 (still 0 to go)
-> [  0.069896] (02:receiver@Tremblay) Exiting GRAS
-> [  0.069896] (09:sender@Bourassa)   Sent Data from Bourassa to Tremblay
-> [  0.070364] (01:sender@Tremblay)   Sent Data from Tremblay to Bourassa
-> [  0.070364] (01:sender@Tremblay) Exiting GRAS
-> [  0.070364] (10:receiver@Bourassa) Got Data from Tremblay:5000 (still 3 to go)
-> [  0.072245] (03:sender@Jupiter)   Sent Data from Jupiter to Fafard
-> [  0.072245] (04:receiver@Jupiter) Got Data from Fafard:5000 (still 2 to go)
-> [  0.072245] (05:sender@Fafard)   Sent Data from Fafard to Jupiter
-> [  0.072245] (06:receiver@Fafard) Got Data from Jupiter:5000 (still 2 to go)
-> [  0.085572] (05:sender@Fafard)   Sent Data from Fafard to Ginette
-> [  0.085572] (08:receiver@Ginette) Got Data from Fafard:5000 (still 2 to go)
-> [  0.091209] (05:sender@Fafard)   Sent Data from Fafard to Bourassa
-> [  0.091209] (05:sender@Fafard) Exiting GRAS
-> [  0.091209] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 2 to go)
-> [  0.100817] (04:receiver@Jupiter) Got Data from Ginette:5000 (still 1 to go)
-> [  0.100817] (07:sender@Ginette)   Sent Data from Ginette to Jupiter
-> [  0.114144] (03:sender@Jupiter)   Sent Data from Jupiter to Ginette
-> [  0.114144] (06:receiver@Fafard) Got Data from Ginette:5000 (still 1 to go)
-> [  0.114144] (07:sender@Ginette)   Sent Data from Ginette to Fafard
-> [  0.114144] (08:receiver@Ginette) Got Data from Jupiter:5000 (still 1 to go)
-> [  0.136528] (04:receiver@Jupiter) Got Data from Bourassa:5000 (still 0 to go)
-> [  0.136528] (04:receiver@Jupiter) Exiting GRAS
-> [  0.136528] (09:sender@Bourassa)   Sent Data from Bourassa to Jupiter
-> [  0.142165] (06:receiver@Fafard) Got Data from Bourassa:5000 (still 0 to go)
-> [  0.142165] (06:receiver@Fafard) Exiting GRAS
-> [  0.142165] (09:sender@Bourassa)   Sent Data from Bourassa to Fafard
-> [  0.150011] (03:sender@Jupiter)   Sent Data from Jupiter to Bourassa
-> [  0.150011] (03:sender@Jupiter) Exiting GRAS
-> [  0.150011] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 1 to go)
-> [  0.155272] (08:receiver@Ginette) Got Data from Bourassa:5000 (still 0 to go)
-> [  0.155272] (08:receiver@Ginette) Exiting GRAS
-> [  0.155272] (09:sender@Bourassa)   Sent Data from Bourassa to Ginette
-> [  0.155272] (09:sender@Bourassa) Exiting GRAS
-> [  0.162962] (07:sender@Ginette)   Sent Data from Ginette to Bourassa
-> [  0.162962] (07:sender@Ginette) Exiting GRAS
-> [  0.162962] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 0 to go)
-> [  0.162962] (10:receiver@Bourassa) Exiting GRAS
+> [  0.000156] (08:receiver@Ginette) Listening on port 4000 (expecting 4 messages)
+> [  0.000156] (06:receiver@Fafard) Listening on port 4000 (expecting 4 messages)
+> [  0.015433] (01:sender@Tremblay)   Sent Data from Tremblay to Jupiter
+> [  0.015433] (04:receiver@Jupiter) Got Data from Tremblay:5000 (still 3 to go)
+> [  0.020592] (09:sender@Bourassa)   Sent Data from Bourassa to Tremblay
+> [  0.020592] (02:receiver@Tremblay) Got Data from Bourassa:5000 (still 3 to go)
+> [  0.033889] (07:sender@Ginette)   Sent Data from Ginette to Tremblay
+> [  0.033889] (02:receiver@Tremblay) Got Data from Ginette:5000 (still 2 to go)
+> [  0.036241] (01:sender@Tremblay)   Sent Data from Tremblay to Fafard
+> [  0.036241] (06:receiver@Fafard) Got Data from Tremblay:5000 (still 3 to go)
+> [  0.049694] (01:sender@Tremblay)   Sent Data from Tremblay to Ginette
+> [  0.049694] (08:receiver@Ginette) Got Data from Tremblay:5000 (still 3 to go)
+> [  0.054541] (05:sender@Fafard)   Sent Data from Fafard to Tremblay
+> [  0.054541] (02:receiver@Tremblay) Got Data from Fafard:5000 (still 1 to go)
+> [  0.056459] (09:sender@Bourassa)   Sent Data from Bourassa to Jupiter
+> [  0.056459] (04:receiver@Jupiter) Got Data from Bourassa:5000 (still 2 to go)
+> [  0.062096] (09:sender@Bourassa)   Sent Data from Bourassa to Fafard
+> [  0.062096] (06:receiver@Fafard) Got Data from Bourassa:5000 (still 2 to go)
+> [  0.069818] (03:sender@Jupiter)   Sent Data from Jupiter to Tremblay
+> [  0.069818] (02:receiver@Tremblay) Got Data from Jupiter:5000 (still 0 to go)
+> [  0.069818] (02:receiver@Tremblay) Exiting GRAS
+> [  0.070286] (01:sender@Tremblay)   Sent Data from Tremblay to Bourassa
+> [  0.070286] (01:sender@Tremblay) Exiting GRAS
+> [  0.070286] (10:receiver@Bourassa) Got Data from Tremblay:5000 (still 3 to go)
+> [  0.075203] (09:sender@Bourassa)   Sent Data from Bourassa to Ginette
+> [  0.075203] (09:sender@Bourassa) Exiting GRAS
+> [  0.075203] (08:receiver@Ginette) Got Data from Bourassa:5000 (still 2 to go)
+> [  0.085031] (07:sender@Ginette)   Sent Data from Ginette to Jupiter
+> [  0.085031] (04:receiver@Jupiter) Got Data from Ginette:5000 (still 1 to go)
+> [  0.105901] (03:sender@Jupiter)   Sent Data from Jupiter to Fafard
+> [  0.105901] (06:receiver@Fafard) Got Data from Jupiter:5000 (still 1 to go)
+> [  0.119072] (07:sender@Ginette)   Sent Data from Ginette to Fafard
+> [  0.119072] (06:receiver@Fafard) Got Data from Ginette:5000 (still 0 to go)
+> [  0.119072] (06:receiver@Fafard) Exiting GRAS
+> [  0.120957] (05:sender@Fafard)   Sent Data from Fafard to Jupiter
+> [  0.120957] (04:receiver@Jupiter) Got Data from Fafard:5000 (still 0 to go)
+> [  0.120957] (04:receiver@Jupiter) Exiting GRAS
+> [  0.132180] (07:sender@Ginette)   Sent Data from Ginette to Bourassa
+> [  0.132180] (07:sender@Ginette) Exiting GRAS
+> [  0.132180] (10:receiver@Bourassa) Got Data from Ginette:5000 (still 2 to go)
+> [  0.134629] (03:sender@Jupiter)   Sent Data from Jupiter to Ginette
+> [  0.134629] (08:receiver@Ginette) Got Data from Jupiter:5000 (still 1 to go)
+> [  0.147800] (05:sender@Fafard)   Sent Data from Fafard to Ginette
+> [  0.147800] (08:receiver@Ginette) Got Data from Fafard:5000 (still 0 to go)
+> [  0.147800] (08:receiver@Ginette) Exiting GRAS
+> [  0.170496] (03:sender@Jupiter)   Sent Data from Jupiter to Bourassa
+> [  0.170496] (03:sender@Jupiter) Exiting GRAS
+> [  0.170496] (10:receiver@Bourassa) Got Data from Jupiter:5000 (still 1 to go)
+> [  0.175976] (05:sender@Fafard)   Sent Data from Fafard to Bourassa
+> [  0.175976] (05:sender@Fafard) Exiting GRAS
+> [  0.175976] (10:receiver@Bourassa) Got Data from Fafard:5000 (still 0 to go)
+> [  0.175976] (10:receiver@Bourassa) Exiting GRAS
index 2b965e1..1884b05 100644 (file)
@@ -2,48 +2,48 @@ require "simgrid"
 
   simgrid.AS.new{id="AS0",mode="Full"};
 
-  simgrid.Host.new{id="Tremblay",power=98095000};
-  simgrid.Host.new{id="Jupiter",power=76296000};
-  simgrid.Host.new{id="Fafard",power=76296000};
-  simgrid.Host.new{id="Ginette",power=48492000};
-  simgrid.Host.new{id="Bourassa",power=48492000};
+  simgrid.host.new{id="Tremblay",power=98095000};
+  simgrid.host.new{id="Jupiter",power=76296000};
+  simgrid.host.new{id="Fafard",power=76296000};
+  simgrid.host.new{id="Ginette",power=48492000};
+  simgrid.host.new{id="Bourassa",power=48492000};
 
     -- create Links
   for i=10,0,-1 do
-    simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
+    simgrid.link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
-   simgrid.Route.new("Tremblay","Jupiter",{"1"});
-   simgrid.Route.new("Tremblay","Fafard",{"0","1","2","3","4","8"});
-   simgrid.Route.new("Tremblay","Ginette",{"3","4","5"});
-   simgrid.Route.new("Tremblay","Bourassa",{"0","1","3","2","4","6","7"});
-
-   simgrid.Route.new("Jupiter","Tremblay",{"1"});
-   simgrid.Route.new("Jupiter","Fafard",{"0","1","2","3","4","8","9"});
-   simgrid.Route.new("Jupiter","Ginette",{"3","4","5","9"});
-   simgrid.Route.new("Jupiter","Bourassa",{"0","1","2","3","4","6","7","9"});
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
+   simgrid.route.new("Tremblay","Jupiter",{"1"});
+   simgrid.route.new("Tremblay","Fafard",{"0","1","2","3","4","8"});
+   simgrid.route.new("Tremblay","Ginette",{"3","4","5"});
+   simgrid.route.new("Tremblay","Bourassa",{"0","1","3","2","4","6","7"});
+
+   simgrid.route.new("Jupiter","Tremblay",{"1"});
+   simgrid.route.new("Jupiter","Fafard",{"0","1","2","3","4","8","9"});
+   simgrid.route.new("Jupiter","Ginette",{"3","4","5","9"});
+   simgrid.route.new("Jupiter","Bourassa",{"0","1","2","3","4","6","7","9"});
  
-   simgrid.Route.new("Fafard","Tremblay",{"0","1","2","3","4","8"});
-   simgrid.Route.new("Fafard","Jupiter",{"0","1","2","3","4","8","9"});
-   simgrid.Route.new("Fafard","Ginette",{"0","1","2","5","8"});
-   simgrid.Route.new("Fafard","Bourassa",{"6","7","8"});
+   simgrid.route.new("Fafard","Tremblay",{"0","1","2","3","4","8"});
+   simgrid.route.new("Fafard","Jupiter",{"0","1","2","3","4","8","9"});
+   simgrid.route.new("Fafard","Ginette",{"0","1","2","5","8"});
+   simgrid.route.new("Fafard","Bourassa",{"6","7","8"});
   
-   simgrid.Route.new("Ginette","Tremblay",{"3","4","5"});
-   simgrid.Route.new("Ginette","Jupiter",{"3","4","5","9"});
-   simgrid.Route.new("Ginette","Fafard",{"0","1","2","5","8"});
-   simgrid.Route.new("Ginette","Bourassa",{"0","1","2","5","6","7"});
-
-   simgrid.Route.new("Bourassa","Tremblay",{"0","1","3","2","4","6","7"});
-   simgrid.Route.new("Bourassa","Jupiter",{"0","1","2","3","4","6","7","9"});
-   simgrid.Route.new("Bourassa","Fafard",{"6","7","8"});
-   simgrid.Route.new("Bourassa","Ginette",{"0","1","2","5","6","7"});
+   simgrid.route.new("Ginette","Tremblay",{"3","4","5"});
+   simgrid.route.new("Ginette","Jupiter",{"3","4","5","9"});
+   simgrid.route.new("Ginette","Fafard",{"0","1","2","5","8"});
+   simgrid.route.new("Ginette","Bourassa",{"0","1","2","5","6","7"});
+
+   simgrid.route.new("Bourassa","Tremblay",{"0","1","3","2","4","6","7"});
+   simgrid.route.new("Bourassa","Jupiter",{"0","1","2","3","4","6","7","9"});
+   simgrid.route.new("Bourassa","Fafard",{"6","7","8"});
+   simgrid.route.new("Bourassa","Ginette",{"0","1","2","5","6","7"});
   
    --Save Platform
    simgrid.gras_register_platform();
 
   --Set Application
-   simgrid.Host.setFunction{host="Tremblay",fct="server",args="4000"};
-   simgrid.Host.setFunction{host="Fafard",fct="client",args="Tremblay,4000"};
+   simgrid.host.set_function{host="Tremblay",fct="server",args="4000"};
+   simgrid.host.set_function{host="Fafard",fct="client",args="Tremblay,4000"};
 
   --Save Application 
    simgrid.gras_register_application(); 
index 043fc26..ca0507e 100644 (file)
@@ -9,11 +9,25 @@
 #include "ping.h"
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(Ping);
 
-int client(int argc, char *argv[])
+static gras_socket_t try_gras_socket_client(const char *host, int port)
 {
+  volatile gras_socket_t sock = NULL;
   xbt_ex_t e;
+  TRY {
+    sock = gras_socket_client(host, port);
+  }
+  CATCH(e) {
+    if (e.category != system_error)
+      /* dunno what happened, let the exception go through */
+      RETHROWF("Unable to connect to the server: %s");
+    xbt_ex_free(e);
+  }
+  return sock;
+}
+
+int client(int argc, char *argv[])
+{
   gras_socket_t toserver = NULL;        /* peer */
-  int connected = 0;
 
   gras_socket_t from;
   int ping, pong;
@@ -33,19 +47,8 @@ int client(int argc, char *argv[])
   XBT_INFO("Launch client (server on %s:%d)", host, port);
 
   /* 3. Create a socket to speak to the server */
-  while (!connected) {
-    TRY {
-      toserver = gras_socket_client(host, port);
-      connected = 1;
-    }
-    CATCH(e) {
-      if (e.category != system_error)
-        /* dunno what happened, let the exception go through */
-        RETHROWF("Unable to connect to the server: %s");
-      xbt_ex_free(e);
-      gras_os_sleep(0.05);
-    }
-  }
+  while (!(toserver = try_gras_socket_client(host, port)))
+    gras_os_sleep(0.05);
 
   XBT_INFO("Connected to %s:%d.", host, port);
 
index ec62e36..a4fb89f 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(MatMult);
 
-int client(int argc, char *argv[])
+static gras_socket_t try_gras_socket_client(const char *host, int port)
 {
+  volatile gras_socket_t sock = NULL;
   xbt_ex_t e;
+  TRY {
+    sock = gras_socket_client(host, port);
+  }
+  CATCH(e) {
+    if (e.category != system_error)
+      RETHROWF("Unable to connect to the server: %s");
+    xbt_ex_free(e);
+  }
+  return sock;
+}
+
+int client(int argc, char *argv[])
+{
   gras_socket_t toserver = NULL;        /* peer */
-  int connected = 0;
 
   gras_socket_t from;
   xbt_matrix_t request[2], answer;
 
-  int i, j;
+  int i;
+  _XBT_GNUC_UNUSED int j;
 
   const char *host = "127.0.0.1";
   int port = 4000;
@@ -37,25 +51,14 @@ int client(int argc, char *argv[])
 
   XBT_INFO("Launch client (server on %s:%d)", host, port);
 
-  /* 3. Create a socket to speak to the server */
-  while (!connected) {
-    TRY {
-      toserver = gras_socket_client(host, port);
-      connected = 1;
-    }
-    CATCH(e) {
-      if (e.category != system_error)
-        RETHROWF("Unable to connect to the server: %s");
-      xbt_ex_free(e);
-      gras_os_sleep(0.05);
-    }
-  }
-  XBT_INFO("Connected to %s:%d.", host, port);
-
-
-  /* 4. Register the messages (before use) */
+  /* 3. Register the messages (before use) */
   mmrpc_register_messages();
 
+  /* 4. Create a socket to speak to the server */
+  while (!(toserver = try_gras_socket_client(host, port)))
+    gras_os_sleep(0.05);
+  XBT_INFO("Connected to %s:%d.", host, port);
+
   /* 5. Keep the user informed of what's going on */
   XBT_INFO(">>>>>>>> Connected to server which is on %s:%d <<<<<<<<",
         gras_socket_peer_name(toserver), gras_socket_peer_port(toserver));
index 7784d04..afdb861 100644 (file)
@@ -38,6 +38,18 @@ static int server_cb_request_handler(gras_msg_cb_ctx_t ctx,
   return 0;
 }                               /* end_of_server_cb_request_handler */
 
+static gras_socket_t try_gras_socket_server(int port)
+{
+  volatile gras_socket_t sock = NULL;
+  TRY {
+    sock = gras_socket_server(port);
+  }
+  CATCH_ANONYMOUS {
+    RETHROWF("Unable to establish a server socket: %s");
+  }
+  return sock;
+}
+
 int server(int argc, char *argv[])
 {
   gras_socket_t sock = NULL;
@@ -51,21 +63,16 @@ int server(int argc, char *argv[])
     port = atoi(argv[1]);
   }
 
-  /* 3. Create my master socket */
-  XBT_INFO("Launch server (port=%d)", port);
-  TRY {
-    sock = gras_socket_server(port);
-  }
-  CATCH_ANONYMOUS {
-    RETHROWF("Unable to establish a server socket: %s");
-  }
-
-  /* 4. Register the known messages and payloads. */
+  /* 3. Register the known messages and payloads. */
   mmrpc_register_messages();
 
-  /* 5. Register my callback */
+  /* 4. Register my callback */
   gras_cb_register("request", &server_cb_request_handler);
 
+  /* 5. Create my master socket */
+  XBT_INFO("Launch server (port=%d)", port);
+  sock = try_gras_socket_server(port);
+
   /* 6. Wait up to 10 minutes for an incomming message to handle */
   gras_msg_handle(600.0);
 
index e362b44..d9aab2c 100644 (file)
@@ -9,11 +9,25 @@
 #include "ping.h"
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(Ping);
 
-int client(int argc, char *argv[])
+static gras_socket_t try_gras_socket_client(const char *host, int port)
 {
+  volatile gras_socket_t sock = NULL;
   xbt_ex_t e;
+  TRY {
+    sock = gras_socket_client(host, port);
+  }
+  CATCH(e) {
+    if (e.category != system_error)
+      /* dunno what happened, let the exception go through */
+      RETHROWF("Unable to connect to the server: %s");
+    xbt_ex_free(e);
+  }
+  return sock;
+}
+
+int client(int argc, char *argv[])
+{
   gras_socket_t toserver = NULL;        /* peer */
-  int connected = 0;
 
   gras_socket_t from;
   int ping, pong;
@@ -33,19 +47,8 @@ int client(int argc, char *argv[])
   XBT_INFO("Launch client (server on %s:%d)", host, port);
 
   /* 3. Create a socket to speak to the server */
-  while (!connected) {
-    TRY {
-      toserver = gras_socket_client(host, port);
-      connected = 1;
-    }
-    CATCH(e) {
-      if (e.category != system_error)
-        /* dunno what happened, let the exception go through */
-        RETHROWF("Unable to connect to the server: %s");
-      xbt_ex_free(e);
-      gras_os_sleep(0.05);
-    }
-  }
+  while (!(toserver = try_gras_socket_client(host, port)))
+    gras_os_sleep(0.05);
 
   XBT_INFO("Connected to %s:%d.", host, port);
 
index 27b03d1..e45caa2 100644 (file)
@@ -67,6 +67,34 @@ static void register_messages(void)
   gras_msgtype_declare("pmm_sync", 0);
 }
 
+static gras_socket_t try_gras_socket_client_from_string(const char *host)
+{
+  volatile gras_socket_t sock = NULL;
+  xbt_ex_t e;
+  TRY {
+    sock = gras_socket_client_from_string(host);
+  }
+  CATCH(e) {
+    if (e.category != system_error)
+      /* dunno what happened, let the exception go through */
+      RETHROWF("Unable to connect to the server: %s");
+    xbt_ex_free(e);
+  }
+  return sock;
+}
+
+static void my_gras_msg_wait(double timeout, const char* msgt_want,
+                             gras_socket_t* expeditor, void *payload,
+                             const char *error_msg)
+{
+  TRY {
+    gras_msg_wait(timeout, msgt_want, expeditor, payload);
+  }
+  CATCH_ANONYMOUS {
+    RETHROWF("%s: %s", error_msg);
+  }
+}
+
 /* Function prototypes */
 int slave(int argc, char *argv[]);
 int master(int argc, char *argv[]);
@@ -305,13 +333,9 @@ static int pmm_worker_cb(gras_msg_cb_ctx_t ctx, void *payload)
       bB = xbt_matrix_new_sub(mydataB,
                               submatrix_size, submatrix_size, 0, 0, NULL);
     } else {
-      TRY {
-        xbt_matrix_free(bB);
-        gras_msg_wait(600, "dataB", &from, &bB);
-      }
-      CATCH_ANONYMOUS {
-        RETHROWF("Can't get a data message from line : %s");
-      }
+      xbt_matrix_free(bB);
+      my_gras_msg_wait(600, "dataB", &from, &bB,
+                       "Can't get a data message from line");
       XBT_VERB("LINE: step(%d) <> Myline(%d). Receive data from %s", step,
             myline, gras_socket_peer_name(from));
     }
@@ -328,19 +352,15 @@ static int pmm_worker_cb(gras_msg_cb_ctx_t ctx, void *payload)
       bA = xbt_matrix_new_sub(mydataA,
                               submatrix_size, submatrix_size, 0, 0, NULL);
     } else {
-      TRY {
-        xbt_matrix_free(bA);
-        gras_msg_wait(1200, "dataA", &from, &bA);
-      }
-      CATCH_ANONYMOUS {
-        RETHROWF("Can't get a data message from row : %s");
-      }
+      xbt_matrix_free(bA);
+      my_gras_msg_wait(1200, "dataA", &from, &bA,
+                       "Can't get a data message from row");
       XBT_VERB("ROW: step(%d)<>myrow(%d). Receive data from %s", step, myrow,
             gras_socket_peer_name(from));
     }
     xbt_matrix_double_addmult(bA, bB, bC);
 
-  };
+  }
 
   /* send Result to master */
   result.C = bC;
@@ -380,7 +400,6 @@ int slave(int argc, char *argv[])
 {
   gras_socket_t mysock;
   gras_socket_t master = NULL;
-  int connected = 0;
   int rank;
 
   /* Init the GRAS's infrastructure */
@@ -400,19 +419,8 @@ int slave(int argc, char *argv[])
   /* Create the connexions */
   mysock = gras_socket_server_range(3000, 9999, 0, 0);
   XBT_INFO("Sensor %d starting", rank);
-  while (!connected) {
-    xbt_ex_t e;
-    TRY {
-      master = gras_socket_client_from_string(argv[1]);
-      connected = 1;
-    }
-    CATCH(e) {
-      if (e.category != system_error)
-        RETHROW;
-      xbt_ex_free(e);
-      gras_os_sleep(0.5);
-    }
-  }
+  while (!(master = try_gras_socket_client_from_string(argv[1])))
+    gras_os_sleep(0.5);
 
   /* Join and run the group */
   rank = amok_pm_group_join(master, "pmm");
index f50e199..d5a2ffe 100644 (file)
@@ -12,29 +12,29 @@ $ $SG_TEST_EXENV ./pmm_simulator$EXEEXT ${srcdir:=.}/../../msg/msg_platform.xml
 > [  0.000156] ( 8:slave@McGee) Sensor 6 starting
 > [  0.000156] ( 9:slave@Gatien) Sensor 7 starting
 > [  0.000156] (10:slave@Laroche) Sensor 8 starting
-> [  2.416827] ( 1:master@Jacquelin) Got only 2 pals (of 9). Wait 2 more seconds
-> [  4.476356] ( 1:master@Jacquelin) Got only 3 pals (of 9). Wait 2 more seconds
-> [  6.476356] ( 1:master@Jacquelin) Got only 5 pals (of 9). Wait 2 more seconds
-> [  9.355676] ( 1:master@Jacquelin) Got only 6 pals (of 9). Wait 2 more seconds
-> [ 12.524103] ( 1:master@Jacquelin) Good. Got 9 pals
-> [ 12.525507] ( 1:master@Jacquelin) XXXXXXXXXXXXXXXXXXXXXX begin Multiplication
-> [ 14.369401] ( 2:slave@Boivin) Receive my pos (0,0) and assignment
-> [ 15.113688] ( 3:slave@Jean_Yves) Receive my pos (0,1) and assignment
-> [ 16.572089] ( 4:slave@TeX) Receive my pos (0,2) and assignment
-> [ 16.576641] ( 5:slave@Geoff) Receive my pos (1,0) and assignment
-> [ 18.043825] ( 6:slave@Disney) Receive my pos (1,1) and assignment
-> [ 20.492624] ( 7:slave@iRMX) Receive my pos (1,2) and assignment
-> [ 21.207375] ( 8:slave@McGee) Receive my pos (2,0) and assignment
-> [ 22.232792] ( 9:slave@Gatien) Receive my pos (2,1) and assignment
-> [ 23.681469] (10:slave@Laroche) Receive my pos (2,2) and assignment
-> [ 73.318369] ( 1:master@Jacquelin) XXXXXXXXXXXXXXXXXXXXXX Ok, the result matches expectations
-> [ 74.156986] ( 2:slave@Boivin) Exiting GRAS
-> [ 74.896643] ( 3:slave@Jean_Yves) Exiting GRAS
-> [ 76.345754] ( 4:slave@TeX) Exiting GRAS
-> [ 76.350179] ( 5:slave@Geoff) Exiting GRAS
-> [ 77.808044] ( 6:slave@Disney) Exiting GRAS
-> [ 80.241254] ( 7:slave@iRMX) Exiting GRAS
-> [ 80.951545] ( 8:slave@McGee) Exiting GRAS
-> [ 81.970467] ( 9:slave@Gatien) Exiting GRAS
-> [ 83.410027] ( 1:master@Jacquelin) Exiting GRAS
-> [ 83.410027] (10:slave@Laroche) Exiting GRAS
+> [  2.879230] ( 1:master@Jacquelin) Got only 1 pals (of 9). Wait 2 more seconds
+> [  5.915815] ( 1:master@Jacquelin) Got only 4 pals (of 9). Wait 2 more seconds
+> [  7.915815] ( 1:master@Jacquelin) Got only 6 pals (of 9). Wait 2 more seconds
+> [ 10.795135] ( 1:master@Jacquelin) Got only 7 pals (of 9). Wait 2 more seconds
+> [ 12.795135] ( 1:master@Jacquelin) Good. Got 9 pals
+> [ 12.796539] ( 1:master@Jacquelin) XXXXXXXXXXXXXXXXXXXXXX begin Multiplication
+> [ 15.245272] (10:slave@Laroche) Receive my pos (0,0) and assignment
+> [ 16.089198] ( 2:slave@Boivin) Receive my pos (0,1) and assignment
+> [ 16.833513] ( 3:slave@Jean_Yves) Receive my pos (0,2) and assignment
+> [ 18.291859] ( 4:slave@TeX) Receive my pos (1,0) and assignment
+> [ 18.296410] ( 5:slave@Geoff) Receive my pos (1,1) and assignment
+> [ 19.763580] ( 6:slave@Disney) Receive my pos (1,2) and assignment
+> [ 22.212379] ( 7:slave@iRMX) Receive my pos (2,0) and assignment
+> [ 22.927110] ( 8:slave@McGee) Receive my pos (2,1) and assignment
+> [ 23.952497] ( 9:slave@Gatien) Receive my pos (2,2) and assignment
+> [ 73.553493] ( 1:master@Jacquelin) XXXXXXXXXXXXXXXXXXXXXX Ok, the result matches expectations
+> [ 74.993053] (10:slave@Laroche) Exiting GRAS
+> [ 75.831669] ( 2:slave@Boivin) Exiting GRAS
+> [ 76.571327] ( 3:slave@Jean_Yves) Exiting GRAS
+> [ 78.020437] ( 4:slave@TeX) Exiting GRAS
+> [ 78.024862] ( 5:slave@Geoff) Exiting GRAS
+> [ 79.482727] ( 6:slave@Disney) Exiting GRAS
+> [ 81.915937] ( 7:slave@iRMX) Exiting GRAS
+> [ 82.626229] ( 8:slave@McGee) Exiting GRAS
+> [ 83.645150] ( 1:master@Jacquelin) Exiting GRAS
+> [ 83.645150] ( 9:slave@Gatien) Exiting GRAS
index 358df12..9921498 100644 (file)
@@ -21,7 +21,7 @@ int alice(int argc, char *argv[])
 
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
-  const char *value;
+  _XBT_GNUC_UNUSED const char *value;
 
   /* Let the other process change the host props */
   gras_os_sleep(1);
@@ -43,8 +43,7 @@ int alice(int argc, char *argv[])
   XBT_INFO("== Trying to modify a process property");
   value = gras_process_property_value("new prop");
   xbt_assert(!value, "Property 'new prop' exists before I add it!");
-  xbt_dict_set(process_props, "new prop", xbt_strdup("new value"),
-               xbt_free_f);
+  xbt_dict_set(process_props, "new prop", xbt_strdup("new value"), NULL);
 
   /* Test if we have changed the value */
   value = gras_process_property_value("new prop");
@@ -64,7 +63,7 @@ int bob(int argc, char *argv[])
   xbt_dict_t host_props = gras_os_host_properties();
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
-  const char *value;
+  _XBT_GNUC_UNUSED const char *value;
 
   XBT_INFO("== Dump all the properties of host1");
   xbt_dict_foreach(host_props, cursor, key, data)
@@ -78,7 +77,7 @@ int bob(int argc, char *argv[])
 
   XBT_INFO
       ("== Set a host property that alice will try to retrieve in SG (from bob->hello)");
-  xbt_dict_set(host_props, "from bob", xbt_strdup("hello"), xbt_free_f);
+  xbt_dict_set(host_props, "from bob", xbt_strdup("hello"), NULL);
 
   XBT_INFO("== Dump all the properties of host1 again to check the addition");
   xbt_dict_foreach(host_props, cursor, key, data)
index ebf5a1a..c0790dc 100644 (file)
@@ -1,7 +1,7 @@
 p Runs the 'properties' test within the simulator (simulation times valid for 32bits architectures)
 
 ! output sort
-$ $SG_TEST_EXENV ./properties_simulator${EXEEXT:=} ${srcdir:=.}/../../platforms/prop.xml ${srcdir:=.}/properties.xml --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n
+$ $SG_TEST_EXENV ./properties_simulator${EXEEXT:=} ${srcdir:=.}/../../platforms/prop.xml ${srcdir:=.}/properties.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (2:bob@host1) == Dump all the properties of host1
 > [  0.000000] (2:bob@host1)   Host property: 'SG_TEST_Hdd' has value: '180'
 > [  0.000000] (2:bob@host1)   Host property: 'SG_TEST_mem' has value: '4'
index dbe3c90..fb1babe 100644 (file)
@@ -56,7 +56,7 @@ int master(int argc, char *argv[])
   xbt_workload_elm_t cmd;
   xbt_dict_cursor_t dict_cursor;
 
-  xbt_dict_t pals_int = xbt_dict_new();
+  xbt_dict_t pals_int = xbt_dict_new_homogeneous(NULL);
   xbt_dynar_foreach(cmds, cursor, cmd) {
     int *p = xbt_dict_get_or_null(pals_int, cmd->who);
     if (!p) {
@@ -67,8 +67,8 @@ int master(int argc, char *argv[])
 
   /* friends, we're ready. Come and play */
   XBT_INFO("Wait for peers for a while. I need %d peers",
-        xbt_dict_size(pals_int));
-  while (xbt_dynar_length(peers) < xbt_dict_size(pals_int)) {
+        xbt_dict_length(pals_int));
+  while (xbt_dynar_length(peers) < xbt_dict_length(pals_int)) {
     TRY {
       gras_msg_handle(20);
     }
@@ -88,7 +88,7 @@ int master(int argc, char *argv[])
   xbt_dict_free(&pals_int);
 
   /* Check who came */
-  xbt_dict_t pals = xbt_dict_new();
+  xbt_dict_t pals = xbt_dict_new_homogeneous(NULL);
   gras_socket_t pal;
   xbt_dynar_foreach(peers, cursor, peer) {
     //XBT_INFO("%s is here",peer->name);
@@ -199,7 +199,7 @@ int worker(int argc, char *argv[])
   int connected = 0;
 
   gras_cb_register("commands", worker_commands_cb);
-  globals->peers = xbt_dict_new();
+  globals->peers = xbt_dict_new_homogeneous(NULL);
 
   if (gras_if_RL())
     XBT_INFO("Sensor %s starting. Connecting to master on %s",
@@ -239,7 +239,7 @@ int worker(int argc, char *argv[])
         switch (cmd->action) {
         case XBT_WORKLOAD_COMPUTE:
           /* If any communication were queued, do them in parallel */
-          if (xbt_dynar_length(cmd_to_go)) {
+          if (!xbt_dynar_is_empty(cmd_to_go)) {
             TRY {
               xbt_dynar_dopar(cmd_to_go, do_command);
               xbt_dynar_reset(cmd_to_go);
@@ -268,7 +268,7 @@ int worker(int argc, char *argv[])
     /* do in parallel any communication still queued */
     XBT_INFO("Do %ld pending communications after end of TODO list",
           xbt_dynar_length(cmd_to_go));
-    if (xbt_dynar_length(cmd_to_go)) {
+    if (!xbt_dynar_is_empty(cmd_to_go)) {
       xbt_dynar_dopar(cmd_to_go, do_command);
       xbt_dynar_reset(cmd_to_go);
     }
index f3b3ddf..ea04624 100644 (file)
@@ -29,7 +29,7 @@ xbt_workload_elm_t xbt_workload_elm_parse(char *line)
 
   xbt_dynar_t w = xbt_str_split(line, " ");
 
-  if (xbt_dynar_length(w) == 0) {
+  if (xbt_dynar_is_empty(w)) {
     free(res);
     xbt_dynar_free(&w);
     return NULL;
@@ -71,12 +71,9 @@ void xbt_workload_elm_free(xbt_workload_elm_t cmd)
 {
   if (!cmd)
     return;
-  if (cmd->who)
-    free(cmd->who);
-  if (cmd->comment)
-    free(cmd->comment);
-  if (cmd->str_arg)
-    free(cmd->str_arg);
+  free(cmd->who);
+  free(cmd->comment);
+  free(cmd->str_arg);
   free(cmd);
 }
 
index fe0c62b..10e84e0 100644 (file)
@@ -60,6 +60,20 @@ static void exception_catching(void)
  * Client code
  * **********************************************************************/
 
+static void client_create_sockets(gras_socket_t *toserver,
+                                  gras_socket_t *toforwarder,
+                                  const char *srv_host, int srv_port,
+                                  const char *fwd_host, int fwd_port)
+{
+  TRY {
+    exception_catching();
+    *toserver = gras_socket_client(srv_host, srv_port);
+    *toforwarder = gras_socket_client(fwd_host, fwd_port);
+  }
+  CATCH_ANONYMOUS {
+    RETHROWF("Unable to connect to the server: %s");
+  }
+}
 
 int client(int argc, char *argv[])
 {
@@ -92,14 +106,8 @@ int client(int argc, char *argv[])
   gras_os_sleep(2);
 
   /* 4. Create a socket to speak to the server */
-  TRY {
-    exception_catching();
-    toserver = gras_socket_client(host, port);
-    toforwarder = gras_socket_client(argv[3], atoi(argv[4]));
-  }
-  CATCH_ANONYMOUS {
-    RETHROWF("Unable to connect to the server: %s");
-  }
+  client_create_sockets(&toserver, &toforwarder,
+                        host, port, argv[3], atoi(argv[4]));
   XBT_INFO("Connected to %s:%d.", host, port);
 
 
index 42a9ec2..890b886 100644 (file)
@@ -1,42 +1,50 @@
 
-Examples containing in this directory
+Examples contained in this directory
+
+To execute any SimGrid Lua example, the SimGrid dynamic library must be in
+your LUA_CPATH. For example:
+
+export LUA_CPATH="${LUA_CPATH};/path/to/simgrid/examples/lua/?.so"
 
 ===============================================================================
-* master_slave.lua           
+* masterslave
 ===============================================================================
+
     - Description:
     Simple master slave application
 
+    - Directory:
+    examples/lua/masterslave
+
     - Platform Files:
-    ../msg/small_platform.xml
+    ../../msg/small_platform.xml
        
     - Deployment Files:
-    ../ruby/deploy.xml
+    ../deploy.xml
 
     - Execute: 
-    (WARNING: the current directory must be examples/lua/)
     lua master_slave.lua
 
 ===============================================================================
-* mult_matrix.lua
+* multi_matrix
 ===============================================================================
 
-
     - Description:
-    Simple example to demonstrate how 2 process could exchage data via a shared Task
-    in this example :
-       *Process Sender : Send two matrix with a fixed size to the 'Receiver' process
-       *Process Receiver : Receive the Matrix, make multiplication and put the result
-                           into the shared task that the Sender could read it .   
+    Simple example to demonstrate how 2 processes can exchange data via a task.
+    In this example:
+       * Process Sender: sends two matrices with a fixed size to the receiver.
+       * Process Receiver: receive the matrices and makes the multiplication.
+
+    - Directory:
+    examples/lua/multi_matrix
     
     - Platform Files:
-    ../ruby/quicksort_platform.xml    
+    quicksort_platform.xml    
        
     - Deployment Files:
-    ../ruby/quicksort_deployment.xml
+    quicksort_deployment.xml
 
     - Execute: 
-    (WARNING: the current directory must be examples/lua/)
     lua mult_matrix.lua
            
 ================================================================================
diff --git a/examples/lua/SimSplay/TODO b/examples/lua/SimSplay/TODO
new file mode 100644 (file)
index 0000000..4e9ad79
--- /dev/null
@@ -0,0 +1,26 @@
+--------------------------------------------
+A few notes abouts what I would like to do
+to make Splay applications work with SimGrid
+--------------------------------------------
+
+Create an executable "simsplay" that runs a Splay Lua script
+with SimGrid.
+
+Ideally, its usage would be:
+
+simsplay platform_file.{xml|lua} deployment_file.{xml|lua} splay_script.lua [simgrid_options...]
+
+I'm not sure about the format of the platform and deployment files yet.
+We could accept both XML and Lua files, since there is a great Lua API to
+describe platforms, or only the XML ones.
+
+The simsplay executable (which is compiled C) would initialize SimGrid, create
+the environment, and for each simulated process, create a new lua_State*
+object that runs the Lua script provided by the user (splay_script.lua in the
+example above).
+
+The current Lua API of SimGrid (3.6) uses Lua coroutines (i.e. sequential,
+lightweight threads) to simulate processes in a single, shared Lua state.
+However, in Splay, the Lua global values must not be shared between simulated
+processes: this is why we need distinct Lua states.
+
index 59e37aa..c0f5589 100644 (file)
@@ -6,17 +6,17 @@ require "simgrid"
   simgrid.AS.addHost{AS="AS0",id="Jupiter",power=76296000};
   simgrid.AS.addHost{AS="AS0",id="Fafard",power=76296000};
 
-  simgrid.Host.setProperty{host="Tremblay",prop_id="ip",prop_value="199.23.98.3"};
-  simgrid.Host.setProperty{host="Tremblay",prop_id="port",prop_value="65"};
-  simgrid.Host.setProperty{host="Jupiter",prop_id="ip",prop_value="199.23.98.4"};
-  simgrid.Host.setProperty{host="Jupiter",prop_id="port",prop_value="83"};
-  simgrid.Host.setProperty{host="Fafard",prop_id="ip",prop_value="199.23.98.5"};
-  simgrid.Host.setProperty{host="Fafard",prop_id="port",prop_value="76"};
+  simgrid.host.setProperty{host="Tremblay",prop_id="ip",prop_value="199.23.98.3"};
+  simgrid.host.setProperty{host="Tremblay",prop_id="port",prop_value="65"};
+  simgrid.host.setProperty{host="Jupiter",prop_id="ip",prop_value="199.23.98.4"};
+  simgrid.host.setProperty{host="Jupiter",prop_id="port",prop_value="83"};
+  simgrid.host.setProperty{host="Fafard",prop_id="ip",prop_value="199.23.98.5"};
+  simgrid.host.setProperty{host="Fafard",prop_id="port",prop_value="76"};
     -- create Links
   for i=10,0,-1 do
     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
    simgrid.AS.addRoute("AS0","Tremblay","Jupiter",{"1"});
    simgrid.AS.addRoute("AS0","Tremblay","Fafard",{"0","1","2","3","4","8"});
 
@@ -31,9 +31,9 @@ require "simgrid"
    simgrid.msg_register_platform();
 
   --Set Application
-   simgrid.Host.setFunction{host="Tremblay",fct="SPLAYschool",args=""};
-   simgrid.Host.setFunction{host="Fafard",fct="SPLAYschool",args=""};
-   simgrid.Host.setFunction{host="Jupiter",fct="SPLAYschool",args=""};
+   simgrid.host.set_function{host="Tremblay",fct="SPLAYschool",args=""};
+   simgrid.host.set_function{host="Fafard",fct="SPLAYschool",args=""};
+   simgrid.host.set_function{host="Jupiter",fct="SPLAYschool",args=""};
    
   --Save Application 
    simgrid.msg_register_application(); 
index 79c8c9d..6202cb3 100644 (file)
@@ -1,4 +1,5 @@
 require "simgrid"
+
 -- Splay global modules
 rpc = {}
 log = {}
@@ -7,35 +8,36 @@ events = {}
 os = {}
 start = {}
 misc = {}
+
 -- Splay global variables
-job.me ={}
+job.me = {}
 job.nodes = {}
 job.list_type = "random"
---Init nodes tables
+
+-- Init nodes tables
 function init_nodes()
-       for i= 1,simgrid.Host.number() do               
-               job.nodes[i] = simgrid.Host.getPropValue(simgrid.Host.at(i),"ip")..":"..simgrid.Host.getPropValue(simgrid.Host.at(i),"port");
-       end     
+  for i = 1, simgrid.host.number() do          
+    job.nodes[i] = { ip = simgrid.host.get_prop_value(simgrid.host.at(i), "ip"),
+                     port = simgrid.host.get_prop_value(simgrid.host.at(i), "port") }
+  end  
 end
 
 function init_jobs()
-   init_nodes()
+  init_nodes()
 end
 
-
 -- Job methods
 function job.me.ip()
-     return simgrid.Host.getPropValue(simgrid.Host.self(),"ip");
+  return simgrid.host.get_prop_value(simgrid.host.self(), "ip")
 end
 
-
 function job.me.port()
- return simgrid.Host.getPropValue(simgrid.Host.self(),"port");
+  return simgrid.host.get_prop_value(simgrid.host.self(), "port")
 end
 
 
 function job.position()
-  return simgrid.Host.getPropValue(simgrid.Host.self(),"position");
+  return simgrid.host.get_prop_value(simgrid.host.self(), "position")
 end
 
 -- log Methods
@@ -44,72 +46,71 @@ function log:print(msg)
 end
 
 -- rpc Methods
-function rpc.call(node,call)
- --init_nodes();
- func = "empty"
- arg = "empty"
- mailbox = node
-
- if type(node) == "table" then
-  mailbox = node.ip..":"..node.port
- end
-
- if type(call) == "table" then
-       func = call[1]
-       arg = call[2]
- end
- task_call = simgrid.Task.new("splay_task",10000,10000);
- task_call['func_call_name'] = func;
- task_call['func_call_arg'] = arg;
- log:print("Sending Task to mailbox "..mailbox.." to call '"..func.."' with arg '"..arg.."'");
- simgrid.Task.iSend(task_call,mailbox);
-end 
+function rpc.call(node, call)
+  --init_nodes();
+  func = "empty"
+  arg = "empty"
+  mailbox = node
+
+  if type(node) == "table" then
+    mailbox = node.ip..":"..node.port
+  end
+
+  if type(call) == "table" then
+    func = call[1]
+    arg = call[2]
+  end
+  task_call = simgrid.task.new("splay_task", 10000, 10000)
+  task_call['func_call_name'] = func
+  task_call['func_call_arg'] = arg
+  log:print("Sending Task to mailbox "..mailbox.." to call '"..func.."' with arg '"..arg.."'")
+  simgrid.task.send(task_call, mailbox)
 
-function rpc.server(port)
- -- nothing really to do : no need to open Socket since it's a Simulation
 end
 
+function rpc.server(port)
+  -- nothing really to do : no need to open Socket since it's a Simulation
+end
 
 -- event Methods
 function events.sleep(time)
   my_mailbox = job.me.ip()..":"..job.me.port()
-  tk = simgrid.Task.splay_recv(my_mailbox, time)
-  
-  if type(tk) == "table" then 
-       call_function(task['func_call_name'],task['func_call_arg'])
-  else log:print("task type is :"..type(tk).." it must be table?!");
+  task = simgrid.task.recv(my_mailbox, time)
+
+  if task ~= nil then
+    -- an RPC call just woke me up
+    call_function(task['func_call_name'], task['func_call_arg'])
   end
 end
 
-
--- main func for each process, this is equivalent to the Deploiment file 
+-- main function for each process, this is equivalent to the deployment file 
 function events.thread(main_func)
-  dofile("platform_script.lua");
- init_jobs()
+  dofile("platform_script.lua")
 init_jobs()
 end
 
 -- OS methods
 function os.exit()
- simgrid.Host.destroy(simgrid.Host.self());
+  simgrid.host.destroy(simgrid.host.self())
 end
 
 -- Start Methods
 function start.loop()
- simgrid.run()
- --simgrid.clean()
 simgrid.run()
 --simgrid.clean()
 end
 
 -- Misc Methods
-function misc.between(a,b)
-       return a
+function misc.between(a, b)
+  return a
 end
 
 -- useful functions
-function call_function(fct,arg)
-    _G[fct](arg)
+function call_function(fct, arg)
+  _G[fct](arg)
 end
 
 function SPLAYschool(arg)
- simgrid.info("Calling me..."..arg)
 simgrid.info("Calling me..."..arg)
 end
+
index 6be8f72..358c36f 100644 (file)
@@ -1,19 +1,26 @@
-dofile 'sim_splay.lua'
+require("sim_splay")
 
 function SPLAYschool()
-    log:print("My ip is :" ..job.me.ip())
-    events.sleep(5)
-    rpc.call(job.nodes[3],{"call_me","Arg_test"})
-    events.sleep(5)
-    os.exit()
+  log:print("My ip is: "..job.me.ip())
+  for i = 1,200 do
+    log:print(i)
+  end
+--[[
+  events.sleep(5)
+
+  if job.me.ip() == job.nodes[1].ip then
+    rpc.call(job.nodes[2], {"call_me", job.me.ip()})
+  end
+  events.sleep(5)
+  os.exit()
+  --]]
 end
 
-function call_me(position)
-    log:print("I received an RPC from node "..position);
+function call_me(from)
+  log:print("I received an RPC from "..from)
 end
 
 events.thread("SPLAYschool")
 start.loop()
-
-
+log:print("Simulation finished")
 
diff --git a/examples/lua/chord/chord.lua b/examples/lua/chord/chord.lua
new file mode 100644 (file)
index 0000000..bb763bd
--- /dev/null
@@ -0,0 +1,414 @@
+-- A SimGrid Lua implementation of the Chord DHT
+
+require("simgrid")
+
+nb_bits = 24
+nb_keys = 2^nb_bits
+comp_size = 0
+comm_size = 10
+timeout = 50
+max_simulation_time = 1000
+stabilize_delay = 20
+fix_fingers_delay = 120
+check_predecessor_delay = 120
+lookup_delay = 10
+
+-- current node (don't worry, globals are duplicated in each process)
+my_node = {
+  id = my_id,
+  next_finger_to_fix = 1,
+  fingers = {},
+  predecessor = nil,
+  comm_recv = nil
+}
+
+-- Main function of each Chord process
+-- Arguments:
+-- - my id
+-- - the id of a guy I know in the system (except for the first node)
+function node(...)
+
+  -- TODO simplify the parameters
+  local known_id
+  local args = {...}
+  my_node.id = tonumber(args[1])
+  if #args == 4 then
+    known_id = tonumber(args[2])
+  end
+
+  -- initialize the node
+  for i = 1, nb_bits do
+    my_node.fingers[i] = my_node.id
+  end
+  my_node.comm_recv = simgrid.task.irecv(my_node.id)
+
+  -- join the ring
+  local join_success = false
+  if known_id == nil then
+    -- first node
+    create()
+    join_success = true
+  else
+    join_success = join(known_id)
+  end
+
+  -- main loop
+  if join_success then
+
+    local now = simgrid.get_clock()
+    local next_stabilize_date = now + stabilize_delay
+    local next_fix_fingers_date = now + fix_fingers_delay
+    local next_check_predecessor_date = now + check_predecessor_delay
+    local next_lookup_date = now + lookup_delay
+
+    local task, success
+
+    while now < max_simulation_time do
+
+      task, success = simgrid.comm.test(my_node.comm_recv)
+
+      if task then
+       -- I received a task: answer it
+        my_node.comm_recv = simgrid.task.irecv(my_node.id)
+       handle_task(task)
+      elseif failed then
+        -- the communication has failed: nevermind
+        my_node.comm_recv = simgrid.task.irecv(my_node.id)
+      else
+        -- no task was received: do periodic calls
+       if now >= next_stabilize_date then
+          stabilize()
+         next_stabilize_date = simgrid.get_clock() + stabilize_delay
+
+       elseif now >= next_fix_fingers_date then
+         fix_fingers()
+         next_fix_fingers_date = simgrid.get_clock() + fix_fingers_delay
+
+       elseif now >= next_check_predecessor_date then
+         check_predecessor()
+         next_check_predecessor_date = simgrid.get_clock() + check_predecessor_delay
+       elseif now >= next_lookup_date then
+         random_lookup()
+         next_lookup_date = simgrid.get_clock() + lookup_delay
+
+       else
+         -- nothing to do: sleep for a while
+         simgrid.process.sleep(5)
+       end
+      end
+      now = simgrid.get_clock()
+    end -- while
+
+    -- leave the ring
+    leave()
+  end
+end
+
+-- Makes the current node leave the ring
+function leave()
+
+  simgrid.info("Leaving the ring")
+  -- TODO: notify others
+end
+
+-- This function is called when the current node receives a task.
+-- - task: the task received
+function handle_task(task)
+
+  local type = task.type
+
+  if type == "find successor" then
+
+    simgrid.info("Received a 'find successor' request from " .. task.answer_to ..
+        " for id " .. task.request_id)
+
+    -- is my successor the successor?
+    if is_in_interval(task.request_id, my_node.id + 1, my_node.fingers[1]) then
+
+      simgrid.info("Sending back a 'find successor answer' to " ..
+          task.answer_to .. ": the successor of " .. task.request_id ..
+         " is " .. my_node.fingers[1])
+
+      local ans_task = simgrid.task.new("", comp_size, comm_size)
+      ans_task.type = "find successor answer"
+      ans_task.request_id = task.request_id
+      ans_task.answer = my_node.fingers[1]
+      ans_task:dsend(task.answer_to)
+    else
+      -- forward the request to the closest preceding finger in my table
+
+      simgrid.info("Forwarding the 'find successor' request to my closest preceding finger")
+
+      local next_task = simgrid.task.new("", comp_size, comm_size)
+      next_task.type = "find successor"
+      next_task.request_id = task.request_id
+      next_task.answer_to = task.answer_to
+      next_task:dsend(closest_preceding_node(next_task.request_id))
+    end
+
+  elseif type == "get predecessor" then
+    local ans_task = simgrid.task.new("", comp_size, comm_size)
+    ans_task.type = "get predecessor answer"
+    ans_task.answer = my_node.predecessor
+    ans_task:dsend(task.answer_to)
+
+  elseif type == "notify" then
+    -- someone is telling me that he may be my new predecessor
+    notify(task.request_id)
+
+  elseif type == "predecessor leaving" then
+    -- TODO
+
+  elseif type == "successor_leaving" then
+    -- TODO
+
+  elseif type == "find successor answer" then
+    -- ignoring
+
+  elseif type == "get predecessor answer" then
+    -- ignoring
+
+  else
+    error("Unknown type of task received: " .. task.type)
+  end
+end
+
+-- Returns whether an id belongs to the interval [a, b[.
+-- The parameters are normalized to make sure they are between 0 and nb_keys - 1.
+-- 1 belongs to [62, 3].
+-- 1 does not belong to [3, 62].
+-- 63 belongs to [62, 3].
+-- 63 does not belong to [3, 62].
+-- 24 belongs to [21, 29].
+-- 24 does not belong to [29, 21].
+function is_in_interval(id, a, b)
+
+  -- normalize the parameters
+  id = id % nb_bits
+  a = a % nb_bits
+  b = b % nb_bits
+  -- make sure a <= b and a <= id
+  if b < a then
+    b = b + nb_keys
+  end
+
+  if id < a then
+    id = id + nb_keys
+  end
+
+  return id <= b
+end
+
+-- Returns whether the current node is in the ring.
+function has_joined()
+
+  return my_node.fingers[1] ~= nil
+end
+
+-- Creates a new Chord ring.
+function create()
+  my_node.predecessor = nil
+  my_node.fingers[1] = my_node.id
+end
+
+-- Attemps to join the Chord ring.
+-- - known_id: id of a node already in the ring
+-- - return value: true if the join was successful
+function join(known_id)
+
+  simgrid.info("Joining the ring with id " .. my_node.id .. ", knowing node " .. known_id)
+
+  local successor = remote_find_successor(known_id, my_node.id)
+  if successor == nil then
+    simgrid.info("Cannot join the ring.")
+    return false
+  end
+
+  my_node.predecessor = nil
+  my_node.fingers[1] = successor
+  return true
+end
+
+-- Returns the closest preceding finger of an id with respect to the finger
+-- table of the current node.
+-- - id: the id to find
+-- - return value: the closest preceding finger of that id
+function closest_preceding_node(id)
+
+  for i = nb_bits, 1, -1 do
+    if is_in_interval(my_node.fingers[i], my_node.id + 1, id - 1) then
+      -- finger i is the first one before id
+      return my_node.fingers[i]
+    end
+  end
+end
+
+-- Finds the successor of an id
+-- id: the id to find
+-- return value: the id of the successor, or nil if the request failed
+function find_successor(id)
+
+  if is_in_interval(id, my_node.id + 1, my_node.fingers[1]) then
+    -- my successor is the successor
+    return my_node.fingers[1]
+  end
+
+  -- ask to the closest preceding finger in my table
+  local ask_to = closest_preceding_node(id)
+  return remote_find_successor(ask_to, id)
+end
+
+-- Asks a remote node the successor of an id.
+-- ask_to: id of a remote node to ask to
+-- id: the id to find
+-- return value: the id of the successor, or nil if the request failed
+function remote_find_successor(ask_to, id)
+
+  local task = simgrid.task.new("", comp_size, comm_size)
+  task.type = "find successor"
+  task.request_id = id
+  task.answer_to = my_node.id
+
+  simgrid.info("Sending a 'find successor' request to " .. ask_to .. " for id " .. id)
+  if task:send(ask_to, timeout) then
+    -- request successfully sent: wait for an answer
+
+    simgrid.info("Sent the 'find successor' request to " .. ask_to ..
+        " for id " .. id .. ", waiting for the answer")
+
+    while true do
+      task = simgrid.comm.wait(my_node.comm_recv, timeout)
+      my_node.comm_recv = simgrid.task.irecv(my_node.id)
+    
+      if not task then
+       -- failed to receive the answer
+       simgrid.info("Failed to receive the answer to my 'find successor' request")
+       return nil
+      else
+       -- a task was received: is it the expected answer?
+       if task.type ~= "find successor answer" or task.request_id ~= id then
+          -- this is not our answer
+         simgrid.info("Received another request of type " .. task.type)
+         handle_task(task)
+       else
+         -- this is our answer
+         simgrid.info("Received the answer to my 'find successor' request for id " ..
+             id .. ": the successor is " .. task.answer)
+         return task.answer
+       end
+      end
+    end
+  else
+    simgrid.info("Failed to send the 'find successor' request to " .. ask_to ..
+        " for id " .. id)
+  end
+
+  return successor
+end
+
+-- Asks a remote node its predecessor.
+-- ask_to: id of a remote node to ask to
+-- return value: the id of its predecessor, or nil if the request failed
+function remote_get_predecessor(ask_to)
+
+  local task = simgrid.task.new("", comp_size, comm_size)
+  task.type = "get predecessor"
+  task.answer_to = my_node.id
+
+  if task:send(ask_to, timeout) then
+    -- request successfully sent: wait for an answer
+    while true do
+      task = simgrid.comm.wait(my_node.comm_recv, timeout)
+      my_node.comm_recv = simgrid.task.irecv(my_node.id)
+    
+      if not task then
+       -- failed to receive the answer
+       return nil
+      else
+       -- a task was received: is it the expected answer?
+       if task.type ~= "get predecessor answer" then
+          -- this is not our answer
+         handle_task(task)
+       else
+         -- this is our answer
+         -- FIXME make sure the message answers to this particular request
+         return task.answer
+       end
+      end
+    end
+  end
+
+  return successor
+end
+
+-- Checks the immediate successor of the current node.
+function stabilize()
+
+  local candidate
+  local successor = my_node.fingers[1]
+  if successor ~= my_node.id then
+    candidate = remote_get_predecessor(successor)
+  else
+    candidate = my_node.predecessor
+  end
+
+  -- this node is a candidate to become my new successor
+  if candidate ~= nil and is_in_interval(candidate, my_node.id + 1, successor - 1) then
+    my_node.fingers[1] = candidate
+  end
+
+  if successor ~= my_node.id then
+    remote_notify(successor, my_node.id)
+  end
+end
+
+-- Notifies the current node that its predecessor my have changed
+-- - candidate_predecessor: the possible new predecessor
+function notify(candidate_predecessor)
+
+  if my_node.predecessor == nil or is_in_interval(candidate_predecessor,
+      my_node.predecessor + 1, my_node.id - 1) then
+    my_node.predecessor = candidate_predecessor
+  end
+end
+
+-- Notifies a remote node that its predecessor my have changed.
+-- - notify_to
+-- - candidate the possible new predecessor
+function remote_notify(notify_to, candidate_predecessor)
+
+  local task = simgrid.task.new("", comp_size, comm_size)
+  task.type = "notify"
+  task.request_id = candidate_predecessor
+  task:dsend(notify_to)
+end
+
+-- Refreshes the finger table of the current node.
+function fix_fingers()
+
+  local i = my_node.next_finger_to_fix
+  local id = find_successor(my_node.id + 2^i)
+  if id ~= nil then
+    if id ~= my_node.fingers[i] then
+      my_node.fingers[i] = id
+    end
+    my_node.next_finger_to_fix = (i % nb_bits) + 1
+  end
+end
+
+-- Checks whether the predecessor of the current node has failed.
+function check_predecessor()
+  -- TODO
+end
+
+-- Performs a find successor request to an arbitrary id.
+function random_lookup()
+
+  find_successor(1337)
+end
+
+simgrid.platform(arg[1] or "../../msg/msg_platform.xml")
+simgrid.application(arg[2] or "../../msg/chord/chord90.xml")
+simgrid.run()
+
index 2b734bb..26e34fc 100644 (file)
@@ -1,11 +1,11 @@
  dofile 'master.lua'
  dofile 'slave.lua' 
   --Set Application
-   simgrid.Host.setFunction{host="Tremblay",fct="Master",args="20,550000000,1000000,4"};
-   simgrid.Host.setFunction{host="Bourassa",fct="Slave",args="0"};
-   simgrid.Host.setFunction{host="Jupiter",fct="Slave",args="1"};
-   simgrid.Host.setFunction{host="Fafard",fct="Slave",args="2"};
-   simgrid.Host.setFunction{host="Ginette",fct="Slave",args="3"};
+   simgrid.host.set_function{host="Tremblay",fct="Master",args="20,550000000,1000000,4"};
+   simgrid.host.set_function{host="Bourassa",fct="Slave",args="0"};
+   simgrid.host.set_function{host="Jupiter",fct="Slave",args="1"};
+   simgrid.host.set_function{host="Fafard",fct="Slave",args="2"};
+   simgrid.host.set_function{host="Ginette",fct="Slave",args="3"};
    
   --Save Application 
    simgrid.msg_register_application();
index 63b900c..849b18b 100644 (file)
@@ -19,11 +19,12 @@ simgrid.info("Argc="..(#arg).." (should be 4)")
 -- Dispatch the tasks
 
 for i=1,nb_task do
-  tk = simgrid.Task.new("Task "..i,comp_size,comm_size);
+  tk = simgrid.task.new("Task "..i,comp_size,comm_size);
+  local task_name = simgrid.task.get_name(tk)
   alias = "slave "..(i%slave_count);
-  simgrid.info("Master sending  '" .. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-  simgrid.Task.send(tk,alias); -- C user data set to NULL
-  simgrid.info("Master done sending '".. simgrid.Task.name(tk) .."' To '" .. alias .."'");
+  simgrid.info("Master sending  '" .. task_name .."' To '" .. alias .."'");
+  simgrid.task.send(tk,alias); -- C user data set to NULL
+  simgrid.info("Master done sending '".. task_name .."' To '" .. alias .."'");
 end
 
 -- Sending Finalize Message To Others
@@ -32,8 +33,8 @@ simgrid.info("Master: All tasks have been dispatched. Let's tell everybody the c
 for i=0,slave_count-1 do
   alias = "slave "..i;
   simgrid.info("Master: sending finalize to "..alias);
-  finalize = simgrid.Task.new("finalize",comp_size,comm_size);
-  simgrid.Task.send(finalize,alias)
+  finalize = simgrid.task.new("finalize",comp_size,comm_size);
+  simgrid.task.send(finalize,alias)
 end
   simgrid.info("Master: Everything's done.");
 end
index a1c9759..37338f1 100644 (file)
@@ -4,5 +4,4 @@ dofile 'deploy.lua'
 --Rutform.lua'
    simgrid.run()
    simgrid.info("Simulation's over.See you.")
-   simgrid.clean()
 
index 19ebf50..60e66b9 100644 (file)
@@ -1,45 +1,45 @@
  
-  --create new routing model
-  --simgrid.AS.new(AS_id,AS_mode)
-  simgrid.AS.new{id="AS0",mode="Full"}; 
-  --simgrid.Host.new(host_id,power)
-  simgrid.AS.addHost{AS="AS0",id="Tremblay",power=98095000};
-  simgrid.AS.addHost{AS="AS0",id="Jupiter",power=76296000};
-  simgrid.AS.addHost{AS="AS0",id="Fafard",power=76296000};
-  simgrid.AS.addHost{AS="AS0",id="Ginette",power=48492000};
-  simgrid.AS.addHost{AS="AS0",id="Bourassa",power=48492000};
 
-    -- create Links
-  for i=10,0,-1 do
-    simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};  
-  end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
-   simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Jupiter",links="1"};
-   simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Fafard",links="0,1,2,3,4,8"};
-   simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Ginette",links="3,4,5"};
-   simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Bourassa",links="0,1,3,2,4,6,7"};
+simgrid.platf.open();
 
-   simgrid.AS.addRoute{AS="AS0",src="Jupiter",dest="Tremblay",links="1"};
-   simgrid.AS.addRoute{AS="AS0",src="Jupiter",dest="Fafard",links="0,1,2,3,4,8,9"};
-   simgrid.AS.addRoute{AS="AS0",src="Jupiter",dest="Ginette",links="3,4,5,9"};
-   simgrid.AS.addRoute{AS="AS0",src="Jupiter",dest="Bourassa",links="0,1,2,3,4,6,7,9"};
+simgrid.platf.AS_open{id="AS0",mode="Full"}; 
+
+simgrid.platf.host_new{id="Tremblay",power=98095000};
+simgrid.platf.host_new{id="Jupiter",power=76296000};
+simgrid.platf.host_new{id="Fafard",power=76296000};
+simgrid.platf.host_new{id="Ginette",power=48492000};
+simgrid.platf.host_new{id="Bourassa",power=48492000};
+
+-- create Links
+for i=10,0,-1 do
+    simgrid.platf.link_new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};  
+end
+
+simgrid.platf.route_new{src="Tremblay",dest="Jupiter",links="1",symmetrical=0};
+simgrid.platf.route_new{src="Tremblay",dest="Fafard",links="0,1,2,3,4,8",symmetrical=0};
+simgrid.platf.route_new{src="Tremblay",dest="Ginette",links="3,4,5",symmetrical=0};
+simgrid.platf.route_new{src="Tremblay",dest="Bourassa",links="0,1,3,2,4,6,7",symmetrical=0};
+
+simgrid.platf.route_new{src="Jupiter",dest="Tremblay",links="1",symmetrical=0};
+simgrid.platf.route_new{src="Jupiter",dest="Fafard",links="0,1,2,3,4,8,9",symmetrical=0};
+simgrid.platf.route_new{src="Jupiter",dest="Ginette",links="3,4,5,9",symmetrical=0};
+simgrid.platf.route_new{src="Jupiter",dest="Bourassa",links="0,1,2,3,4,6,7,9",symmetrical=0};
  
-   simgrid.AS.addRoute{AS="AS0",src="Fafard",dest="Tremblay",links="0,1,2,3,4,8"};
-   simgrid.AS.addRoute{AS="AS0",src="Fafard",dest="Jupiter",links="0,1,2,3,4,8,9"};
-   simgrid.AS.addRoute{AS="AS0",src="Fafard",dest="Ginette",links="0,1,2,5,8"};
-   simgrid.AS.addRoute{AS="AS0",src="Fafard",dest="Bourassa",links="6,7,8"};
+simgrid.platf.route_new{src="Fafard",dest="Tremblay",links="0,1,2,3,4,8",symmetrical=0};
+simgrid.platf.route_new{src="Fafard",dest="Jupiter",links="0,1,2,3,4,8,9",symmetrical=0};
+simgrid.platf.route_new{src="Fafard",dest="Ginette",links="0,1,2,5,8",symmetrical=0};
+simgrid.platf.route_new{src="Fafard",dest="Bourassa",links="6,7,8",symmetrical=0};
   
-   simgrid.AS.addRoute{AS="AS0",src="Ginette",dest="Tremblay",links="3,4,5"};
-   simgrid.AS.addRoute{AS="AS0",src="Ginette",dest="Jupiter",links="3,4,5,9"};
-   simgrid.AS.addRoute{AS="AS0",src="Ginette",dest="Fafard",links="0,1,2,5,8"};
-   simgrid.AS.addRoute{AS="AS0",src="Ginette",dest="Bourassa",links="0,1,2,5,6,7"};
+simgrid.platf.route_new{src="Ginette",dest="Tremblay",links="3,4,5",symmetrical=0};
+simgrid.platf.route_new{src="Ginette",dest="Jupiter",links="3,4,5,9",symmetrical=0};
+simgrid.platf.route_new{src="Ginette",dest="Fafard",links="0,1,2,5,8",symmetrical=0};
+simgrid.platf.route_new{src="Ginette",dest="Bourassa",links="0,1,2,5,6,7",symmetrical=0};
 
-   simgrid.AS.addRoute{AS="AS0",src="Bourassa",dest="Tremblay",links="0,1,3,2,4,6,7"};
-   simgrid.AS.addRoute{AS="AS0",src="Bourassa",dest="Jupiter",links="0,1,2,3,4,6,7,9"};
-   simgrid.AS.addRoute{AS="AS0",src="Bourassa",dest="Fafard",links="6,7,8"};
-   simgrid.AS.addRoute{AS="AS0",src="Bourassa",dest="Ginette",links="0,1,2,5,6,7"};
+simgrid.platf.route_new{src="Bourassa",dest="Tremblay",links="0,1,3,2,4,6,7",symmetrical=0};
+simgrid.platf.route_new{src="Bourassa",dest="Jupiter",links="0,1,2,3,4,6,7,9",symmetrical=0};
+simgrid.platf.route_new{src="Bourassa",dest="Fafard",links="6,7,8",symmetrical=0};
+simgrid.platf.route_new{src="Bourassa",dest="Ginette",links="0,1,2,5,6,7",symmetrical=0};
+simgrid.platf.AS_close();
+   
+simgrid.platf.close();
   
-   --Save Platform
-   --simgrid.info("start registering platform");
-   simgrid.msg_register_platform();
-   --simgrid.info("platform registered");
index 9c257c4..1c77467 100644 (file)
@@ -8,15 +8,15 @@ simgrid.info("Hello from lua, I'm a poor slave with mbox: "..my_mailbox)
 
 while true do
 
-  local tk = simgrid.Task.recv(my_mailbox);
-  if (simgrid.Task.name(tk) == "finalize") then
+  local tk = simgrid.task.recv(my_mailbox);
+  if (simgrid.task.get_name(tk) == "finalize") then
     simgrid.info("Slave '" ..my_mailbox.."' got finalize msg");
     break
   end
-  --local tk_name = simgrid.Task.name(tk) 
-  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.Task.name(tk))
-  simgrid.Task.execute(tk)
-  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.Task.name(tk) .. " done")
+  --local tk_name = simgrid.task.get_name(tk) 
+  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.task.get_name(tk))
+  simgrid.task.execute(tk)
+  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.task.get_name(tk) .. " done")
 end -- while
 
 simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
index 63b900c..f4094d0 100644 (file)
@@ -1,41 +1,34 @@
---Master Function
 function Master(...) 
 
-simgrid.info("Hello from lua, I'm the master")
-for i,v in ipairs(arg) do
-    simgrid.info("Got "..v)
-end
-
-nb_task = arg[1];
-comp_size = arg[2];
-comm_size = arg[3];
-slave_count = arg[4];
-
-if (#arg ~= 4) then
-    error("Argc should be 4");
-end
-simgrid.info("Argc="..(#arg).." (should be 4)")
-
--- Dispatch the tasks
-
-for i=1,nb_task do
-  tk = simgrid.Task.new("Task "..i,comp_size,comm_size);
-  alias = "slave "..(i%slave_count);
-  simgrid.info("Master sending  '" .. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-  simgrid.Task.send(tk,alias); -- C user data set to NULL
-  simgrid.info("Master done sending '".. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-end
-
--- Sending Finalize Message To Others
-
-simgrid.info("Master: All tasks have been dispatched. Let's tell everybody the computation is over.");
-for i=0,slave_count-1 do
-  alias = "slave "..i;
-  simgrid.info("Master: sending finalize to "..alias);
-  finalize = simgrid.Task.new("finalize",comp_size,comm_size);
-  simgrid.Task.send(finalize,alias)
-end
-  simgrid.info("Master: Everything's done.");
-end
-
---end_of_master
+  if #arg ~= 4 then
+    error("Wrong number of arguments (got " .. #arg ..
+        ", expected 4: nb_tasks comp_size comm_size slave_count)")
+  end
+
+  simgrid.info("Hello from lua, I'm the master")
+
+  local nb_task, comp_size, comm_size, slave_count = unpack(arg)
+
+  -- Dispatch the tasks
+
+  for i = 1, nb_task do
+    local task = simgrid.task.new("Task " .. i, comp_size, comm_size)
+    local task_name = task:get_name()
+    local alias = "slave " .. (i % slave_count)
+    simgrid.info("Sending  '" .. task_name .. "' to '" .. alias .."'")
+    task:send(alias) -- C user data set to NULL
+    simgrid.info("Done sending '".. task_name .. "' to '" .. alias .."'")
+  end
+
+  -- Sending Finalize Message To Others
+
+  simgrid.info("All tasks have been dispatched. Let's tell everybody the computation is over.")
+  for i = 0, slave_count - 1 do
+    local alias = "slave " .. i
+    simgrid.info("Sending finalize to '" .. alias .. "'")
+    local finalize = simgrid.task.new("finalize", comp_size, comm_size)
+    finalize:send(alias)
+  end
+  simgrid.info("Everything's done.")
+end -- Master
+
index 2d32e52..6fe6850 100644 (file)
@@ -3,14 +3,9 @@ dofile 'slave.lua'
 -- Simulation Code ----------------------------------------------------------
 
 require "simgrid"
-if (#arg == 2) then
-simgrid.platform(arg[1])
-simgrid.application(arg[2])
-else
-simgrid.platform("../../msg/small_platform.xml")
-simgrid.application("../deploy.xml")
-end
+
+simgrid.platform(arg[1] or "../../msg/small_platform.xml")
+simgrid.application(arg[2] or "../deploy.xml")
 simgrid.run()
-simgrid.info("Simulation's over.See you.")
-simgrid.clean()
+simgrid.info("Simulation's over. See you.")
 
index 75cbf91..c57aab5 100644 (file)
 
 $ lua master_slave.lua
 > [Tremblay:Master:(1) 0.000000] [lua/INFO] Hello from lua, I'm the master
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 20
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 50000000
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 1000000
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 4
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Argc=4 (should be 4)
-> [Tremblay:Master:(1) 0.000000] [lua/INFO] Master sending  'Task 1' To 'slave 1'
-> [Bourassa:Slave:(2) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 0
-> [Jupiter:Slave:(3) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 1
-> [Fafard:Slave:(4) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 2
-> [Ginette:Slave:(5) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mbox: slave 3
-> [Jupiter:Slave:(3) 0.165962] [lua/INFO] Slave 'slave 1' processing Task 1
-> [Tremblay:Master:(1) 0.165962] [lua/INFO] Master done sending 'Task 1' To 'slave 1'
-> [Tremblay:Master:(1) 0.165962] [lua/INFO] Master sending  'Task 2' To 'slave 2'
-> [Fafard:Slave:(4) 0.384115] [lua/INFO] Slave 'slave 2' processing Task 2
-> [Tremblay:Master:(1) 0.384115] [lua/INFO] Master done sending 'Task 2' To 'slave 2'
-> [Tremblay:Master:(1) 0.384115] [lua/INFO] Master sending  'Task 3' To 'slave 3'
-> [Ginette:Slave:(5) 0.524575] [lua/INFO] Slave 'slave 3' processing Task 3
-> [Tremblay:Master:(1) 0.524575] [lua/INFO] Master done sending 'Task 3' To 'slave 3'
-> [Tremblay:Master:(1) 0.524575] [lua/INFO] Master sending  'Task 4' To 'slave 0'
-> [Bourassa:Slave:(2) 0.740447] [lua/INFO] Slave 'slave 0' processing Task 4
-> [Tremblay:Master:(1) 0.740447] [lua/INFO] Master done sending 'Task 4' To 'slave 0'
-> [Tremblay:Master:(1) 0.740447] [lua/INFO] Master sending  'Task 5' To 'slave 1'
-> [Jupiter:Slave:(3) 0.821304] [lua/INFO] Slave 'slave 1': task Task 1 done
-> [Jupiter:Slave:(3) 0.987266] [lua/INFO] Slave 'slave 1' processing Task 5
-> [Tremblay:Master:(1) 0.987266] [lua/INFO] Master done sending 'Task 5' To 'slave 1'
-> [Tremblay:Master:(1) 0.987266] [lua/INFO] Master sending  'Task 6' To 'slave 2'
-> [Fafard:Slave:(4) 1.039457] [lua/INFO] Slave 'slave 2': task Task 2 done
-> [Fafard:Slave:(4) 1.257610] [lua/INFO] Slave 'slave 2' processing Task 6
-> [Tremblay:Master:(1) 1.257610] [lua/INFO] Master done sending 'Task 6' To 'slave 2'
-> [Tremblay:Master:(1) 1.257610] [lua/INFO] Master sending  'Task 7' To 'slave 3'
-> [Ginette:Slave:(5) 1.555672] [lua/INFO] Slave 'slave 3': task Task 3 done
-> [Jupiter:Slave:(3) 1.642608] [lua/INFO] Slave 'slave 1': task Task 5 done
-> [Ginette:Slave:(5) 1.696132] [lua/INFO] Slave 'slave 3' processing Task 7
-> [Tremblay:Master:(1) 1.696132] [lua/INFO] Master done sending 'Task 7' To 'slave 3'
-> [Tremblay:Master:(1) 1.696132] [lua/INFO] Master sending  'Task 8' To 'slave 0'
-> [Bourassa:Slave:(2) 1.771545] [lua/INFO] Slave 'slave 0': task Task 4 done
-> [Fafard:Slave:(4) 1.912953] [lua/INFO] Slave 'slave 2': task Task 6 done
-> [Bourassa:Slave:(2) 1.987417] [lua/INFO] Slave 'slave 0' processing Task 8
-> [Tremblay:Master:(1) 1.987417] [lua/INFO] Master done sending 'Task 8' To 'slave 0'
-> [Tremblay:Master:(1) 1.987417] [lua/INFO] Master sending  'Task 9' To 'slave 1'
-> [Jupiter:Slave:(3) 2.153379] [lua/INFO] Slave 'slave 1' processing Task 9
-> [Tremblay:Master:(1) 2.153379] [lua/INFO] Master done sending 'Task 9' To 'slave 1'
-> [Tremblay:Master:(1) 2.153379] [lua/INFO] Master sending  'Task 10' To 'slave 2'
-> [Fafard:Slave:(4) 2.371532] [lua/INFO] Slave 'slave 2' processing Task 10
-> [Tremblay:Master:(1) 2.371532] [lua/INFO] Master done sending 'Task 10' To 'slave 2'
-> [Tremblay:Master:(1) 2.371532] [lua/INFO] Master sending  'Task 11' To 'slave 3'
-> [Ginette:Slave:(5) 2.727230] [lua/INFO] Slave 'slave 3': task Task 7 done
-> [Jupiter:Slave:(3) 2.808721] [lua/INFO] Slave 'slave 1': task Task 9 done
-> [Ginette:Slave:(5) 2.867690] [lua/INFO] Slave 'slave 3' processing Task 11
-> [Tremblay:Master:(1) 2.867690] [lua/INFO] Master done sending 'Task 11' To 'slave 3'
-> [Tremblay:Master:(1) 2.867690] [lua/INFO] Master sending  'Task 12' To 'slave 0'
-> [Bourassa:Slave:(2) 3.018515] [lua/INFO] Slave 'slave 0': task Task 8 done
-> [Fafard:Slave:(4) 3.026874] [lua/INFO] Slave 'slave 2': task Task 10 done
-> [Bourassa:Slave:(2) 3.234387] [lua/INFO] Slave 'slave 0' processing Task 12
-> [Tremblay:Master:(1) 3.234387] [lua/INFO] Master done sending 'Task 12' To 'slave 0'
-> [Tremblay:Master:(1) 3.234387] [lua/INFO] Master sending  'Task 13' To 'slave 1'
-> [Jupiter:Slave:(3) 3.400349] [lua/INFO] Slave 'slave 1' processing Task 13
-> [Tremblay:Master:(1) 3.400349] [lua/INFO] Master done sending 'Task 13' To 'slave 1'
-> [Tremblay:Master:(1) 3.400349] [lua/INFO] Master sending  'Task 14' To 'slave 2'
-> [Fafard:Slave:(4) 3.618502] [lua/INFO] Slave 'slave 2' processing Task 14
-> [Tremblay:Master:(1) 3.618502] [lua/INFO] Master done sending 'Task 14' To 'slave 2'
-> [Tremblay:Master:(1) 3.618502] [lua/INFO] Master sending  'Task 15' To 'slave 3'
-> [Ginette:Slave:(5) 3.898788] [lua/INFO] Slave 'slave 3': task Task 11 done
-> [Ginette:Slave:(5) 4.039247] [lua/INFO] Slave 'slave 3' processing Task 15
-> [Tremblay:Master:(1) 4.039247] [lua/INFO] Master done sending 'Task 15' To 'slave 3'
-> [Tremblay:Master:(1) 4.039247] [lua/INFO] Master sending  'Task 16' To 'slave 0'
-> [Jupiter:Slave:(3) 4.055691] [lua/INFO] Slave 'slave 1': task Task 13 done
-> [Bourassa:Slave:(2) 4.265485] [lua/INFO] Slave 'slave 0': task Task 12 done
-> [Fafard:Slave:(4) 4.273845] [lua/INFO] Slave 'slave 2': task Task 14 done
-> [Bourassa:Slave:(2) 4.481357] [lua/INFO] Slave 'slave 0' processing Task 16
-> [Tremblay:Master:(1) 4.481357] [lua/INFO] Master done sending 'Task 16' To 'slave 0'
-> [Tremblay:Master:(1) 4.481357] [lua/INFO] Master sending  'Task 17' To 'slave 1'
-> [Jupiter:Slave:(3) 4.647319] [lua/INFO] Slave 'slave 1' processing Task 17
-> [Tremblay:Master:(1) 4.647319] [lua/INFO] Master done sending 'Task 17' To 'slave 1'
-> [Tremblay:Master:(1) 4.647319] [lua/INFO] Master sending  'Task 18' To 'slave 2'
-> [Fafard:Slave:(4) 4.865472] [lua/INFO] Slave 'slave 2' processing Task 18
-> [Tremblay:Master:(1) 4.865472] [lua/INFO] Master done sending 'Task 18' To 'slave 2'
-> [Tremblay:Master:(1) 4.865472] [lua/INFO] Master sending  'Task 19' To 'slave 3'
-> [Ginette:Slave:(5) 5.070345] [lua/INFO] Slave 'slave 3': task Task 15 done
-> [Ginette:Slave:(5) 5.210805] [lua/INFO] Slave 'slave 3' processing Task 19
-> [Tremblay:Master:(1) 5.210805] [lua/INFO] Master done sending 'Task 19' To 'slave 3'
-> [Tremblay:Master:(1) 5.210805] [lua/INFO] Master sending  'Task 20' To 'slave 0'
-> [Jupiter:Slave:(3) 5.302662] [lua/INFO] Slave 'slave 1': task Task 17 done
-> [Bourassa:Slave:(2) 5.512455] [lua/INFO] Slave 'slave 0': task Task 16 done
-> [Fafard:Slave:(4) 5.520815] [lua/INFO] Slave 'slave 2': task Task 18 done
-> [Bourassa:Slave:(2) 5.728328] [lua/INFO] Slave 'slave 0' processing Task 20
-> [Tremblay:Master:(1) 5.728328] [lua/INFO] Master done sending 'Task 20' To 'slave 0'
-> [Tremblay:Master:(1) 5.728328] [lua/INFO] Master: All tasks have been dispatched. Let's tell everybody the computation is over.
-> [Tremblay:Master:(1) 5.728328] [lua/INFO] Master: sending finalize to slave 0
-> [Ginette:Slave:(5) 6.241903] [lua/INFO] Slave 'slave 3': task Task 19 done
-> [Bourassa:Slave:(2) 6.759426] [lua/INFO] Slave 'slave 0': task Task 20 done
-> [Bourassa:Slave:(2) 6.975298] [lua/INFO] Slave 'slave 0' got finalize msg
-> [Bourassa:Slave:(2) 6.975298] [lua/INFO] Slave 'slave 0': I'm Done . See You !!
-> [Tremblay:Master:(1) 6.975298] [lua/INFO] Master: sending finalize to slave 1
-> [Jupiter:Slave:(3) 7.141260] [lua/INFO] Slave 'slave 1' got finalize msg
-> [Jupiter:Slave:(3) 7.141260] [lua/INFO] Slave 'slave 1': I'm Done . See You !!
-> [Tremblay:Master:(1) 7.141260] [lua/INFO] Master: sending finalize to slave 2
-> [Fafard:Slave:(4) 7.359413] [lua/INFO] Slave 'slave 2' got finalize msg
-> [Fafard:Slave:(4) 7.359413] [lua/INFO] Slave 'slave 2': I'm Done . See You !!
-> [Tremblay:Master:(1) 7.359413] [lua/INFO] Master: sending finalize to slave 3
-> [Ginette:Slave:(5) 7.499872] [lua/INFO] Slave 'slave 3' got finalize msg
-> [Ginette:Slave:(5) 7.499872] [lua/INFO] Slave 'slave 3': I'm Done . See You !!
-> [Tremblay:Master:(1) 7.499872] [lua/INFO] Master: Everything's done.
-> [7.499872] [lua/INFO] Simulation's over.See you.
+> [Tremblay:Master:(1) 0.000000] [lua/INFO] Sending  'Task 1' to 'slave 1'
+> [Bourassa:Slave:(2) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 0
+> [Jupiter:Slave:(3) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 1
+> [Fafard:Slave:(4) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 2
+> [Ginette:Slave:(5) 0.000000] [lua/INFO] Hello from lua, I'm a poor slave with mailbox: slave 3
+> [Tremblay:Master:(1) 0.165962] [lua/INFO] Done sending 'Task 1' to 'slave 1'
+> [Tremblay:Master:(1) 0.165962] [lua/INFO] Sending  'Task 2' to 'slave 2'
+> [Jupiter:Slave:(3) 0.165962] [lua/INFO] Received task 'Task 1' on mailbox 'slave 1'
+> [Tremblay:Master:(1) 0.384115] [lua/INFO] Done sending 'Task 2' to 'slave 2'
+> [Tremblay:Master:(1) 0.384115] [lua/INFO] Sending  'Task 3' to 'slave 3'
+> [Fafard:Slave:(4) 0.384115] [lua/INFO] Received task 'Task 2' on mailbox 'slave 2'
+> [Tremblay:Master:(1) 0.524575] [lua/INFO] Done sending 'Task 3' to 'slave 3'
+> [Tremblay:Master:(1) 0.524575] [lua/INFO] Sending  'Task 4' to 'slave 0'
+> [Ginette:Slave:(5) 0.524575] [lua/INFO] Received task 'Task 3' on mailbox 'slave 3'
+> [Tremblay:Master:(1) 0.740447] [lua/INFO] Done sending 'Task 4' to 'slave 0'
+> [Tremblay:Master:(1) 0.740447] [lua/INFO] Sending  'Task 5' to 'slave 1'
+> [Bourassa:Slave:(2) 0.740447] [lua/INFO] Received task 'Task 4' on mailbox 'slave 0'
+> [Jupiter:Slave:(3) 0.821304] [lua/INFO] Task 'Task 1' is done
+> [Tremblay:Master:(1) 0.987266] [lua/INFO] Done sending 'Task 5' to 'slave 1'
+> [Tremblay:Master:(1) 0.987266] [lua/INFO] Sending  'Task 6' to 'slave 2'
+> [Jupiter:Slave:(3) 0.987266] [lua/INFO] Received task 'Task 5' on mailbox 'slave 1'
+> [Fafard:Slave:(4) 1.039457] [lua/INFO] Task 'Task 2' is done
+> [Tremblay:Master:(1) 1.257610] [lua/INFO] Done sending 'Task 6' to 'slave 2'
+> [Tremblay:Master:(1) 1.257610] [lua/INFO] Sending  'Task 7' to 'slave 3'
+> [Fafard:Slave:(4) 1.257610] [lua/INFO] Received task 'Task 6' on mailbox 'slave 2'
+> [Ginette:Slave:(5) 1.555672] [lua/INFO] Task 'Task 3' is done
+> [Jupiter:Slave:(3) 1.642608] [lua/INFO] Task 'Task 5' is done
+> [Tremblay:Master:(1) 1.696132] [lua/INFO] Done sending 'Task 7' to 'slave 3'
+> [Tremblay:Master:(1) 1.696132] [lua/INFO] Sending  'Task 8' to 'slave 0'
+> [Ginette:Slave:(5) 1.696132] [lua/INFO] Received task 'Task 7' on mailbox 'slave 3'
+> [Bourassa:Slave:(2) 1.771545] [lua/INFO] Task 'Task 4' is done
+> [Fafard:Slave:(4) 1.912953] [lua/INFO] Task 'Task 6' is done
+> [Tremblay:Master:(1) 1.987417] [lua/INFO] Done sending 'Task 8' to 'slave 0'
+> [Tremblay:Master:(1) 1.987417] [lua/INFO] Sending  'Task 9' to 'slave 1'
+> [Bourassa:Slave:(2) 1.987417] [lua/INFO] Received task 'Task 8' on mailbox 'slave 0'
+> [Tremblay:Master:(1) 2.153379] [lua/INFO] Done sending 'Task 9' to 'slave 1'
+> [Tremblay:Master:(1) 2.153379] [lua/INFO] Sending  'Task 10' to 'slave 2'
+> [Jupiter:Slave:(3) 2.153379] [lua/INFO] Received task 'Task 9' on mailbox 'slave 1'
+> [Tremblay:Master:(1) 2.371532] [lua/INFO] Done sending 'Task 10' to 'slave 2'
+> [Tremblay:Master:(1) 2.371532] [lua/INFO] Sending  'Task 11' to 'slave 3'
+> [Fafard:Slave:(4) 2.371532] [lua/INFO] Received task 'Task 10' on mailbox 'slave 2'
+> [Ginette:Slave:(5) 2.727230] [lua/INFO] Task 'Task 7' is done
+> [Jupiter:Slave:(3) 2.808721] [lua/INFO] Task 'Task 9' is done
+> [Tremblay:Master:(1) 2.867690] [lua/INFO] Done sending 'Task 11' to 'slave 3'
+> [Tremblay:Master:(1) 2.867690] [lua/INFO] Sending  'Task 12' to 'slave 0'
+> [Ginette:Slave:(5) 2.867690] [lua/INFO] Received task 'Task 11' on mailbox 'slave 3'
+> [Bourassa:Slave:(2) 3.018515] [lua/INFO] Task 'Task 8' is done
+> [Fafard:Slave:(4) 3.026874] [lua/INFO] Task 'Task 10' is done
+> [Tremblay:Master:(1) 3.234387] [lua/INFO] Done sending 'Task 12' to 'slave 0'
+> [Tremblay:Master:(1) 3.234387] [lua/INFO] Sending  'Task 13' to 'slave 1'
+> [Bourassa:Slave:(2) 3.234387] [lua/INFO] Received task 'Task 12' on mailbox 'slave 0'
+> [Tremblay:Master:(1) 3.400349] [lua/INFO] Done sending 'Task 13' to 'slave 1'
+> [Tremblay:Master:(1) 3.400349] [lua/INFO] Sending  'Task 14' to 'slave 2'
+> [Jupiter:Slave:(3) 3.400349] [lua/INFO] Received task 'Task 13' on mailbox 'slave 1'
+> [Tremblay:Master:(1) 3.618502] [lua/INFO] Done sending 'Task 14' to 'slave 2'
+> [Tremblay:Master:(1) 3.618502] [lua/INFO] Sending  'Task 15' to 'slave 3'
+> [Fafard:Slave:(4) 3.618502] [lua/INFO] Received task 'Task 14' on mailbox 'slave 2'
+> [Ginette:Slave:(5) 3.898788] [lua/INFO] Task 'Task 11' is done
+> [Tremblay:Master:(1) 4.039247] [lua/INFO] Done sending 'Task 15' to 'slave 3'
+> [Tremblay:Master:(1) 4.039247] [lua/INFO] Sending  'Task 16' to 'slave 0'
+> [Ginette:Slave:(5) 4.039247] [lua/INFO] Received task 'Task 15' on mailbox 'slave 3'
+> [Jupiter:Slave:(3) 4.055691] [lua/INFO] Task 'Task 13' is done
+> [Bourassa:Slave:(2) 4.265485] [lua/INFO] Task 'Task 12' is done
+> [Fafard:Slave:(4) 4.273845] [lua/INFO] Task 'Task 14' is done
+> [Tremblay:Master:(1) 4.481357] [lua/INFO] Done sending 'Task 16' to 'slave 0'
+> [Tremblay:Master:(1) 4.481357] [lua/INFO] Sending  'Task 17' to 'slave 1'
+> [Bourassa:Slave:(2) 4.481357] [lua/INFO] Received task 'Task 16' on mailbox 'slave 0'
+> [Tremblay:Master:(1) 4.647319] [lua/INFO] Done sending 'Task 17' to 'slave 1'
+> [Tremblay:Master:(1) 4.647319] [lua/INFO] Sending  'Task 18' to 'slave 2'
+> [Jupiter:Slave:(3) 4.647319] [lua/INFO] Received task 'Task 17' on mailbox 'slave 1'
+> [Tremblay:Master:(1) 4.865472] [lua/INFO] Done sending 'Task 18' to 'slave 2'
+> [Tremblay:Master:(1) 4.865472] [lua/INFO] Sending  'Task 19' to 'slave 3'
+> [Fafard:Slave:(4) 4.865472] [lua/INFO] Received task 'Task 18' on mailbox 'slave 2'
+> [Ginette:Slave:(5) 5.070345] [lua/INFO] Task 'Task 15' is done
+> [Tremblay:Master:(1) 5.210805] [lua/INFO] Done sending 'Task 19' to 'slave 3'
+> [Tremblay:Master:(1) 5.210805] [lua/INFO] Sending  'Task 20' to 'slave 0'
+> [Ginette:Slave:(5) 5.210805] [lua/INFO] Received task 'Task 19' on mailbox 'slave 3'
+> [Jupiter:Slave:(3) 5.302662] [lua/INFO] Task 'Task 17' is done
+> [Bourassa:Slave:(2) 5.512455] [lua/INFO] Task 'Task 16' is done
+> [Fafard:Slave:(4) 5.520815] [lua/INFO] Task 'Task 18' is done
+> [Tremblay:Master:(1) 5.728328] [lua/INFO] Done sending 'Task 20' to 'slave 0'
+> [Tremblay:Master:(1) 5.728328] [lua/INFO] All tasks have been dispatched. Let's tell everybody the computation is over.
+> [Tremblay:Master:(1) 5.728328] [lua/INFO] Sending finalize to 'slave 0'
+> [Bourassa:Slave:(2) 5.728328] [lua/INFO] Received task 'Task 20' on mailbox 'slave 0'
+> [Ginette:Slave:(5) 6.241903] [lua/INFO] Task 'Task 19' is done
+> [Bourassa:Slave:(2) 6.759426] [lua/INFO] Task 'Task 20' is done
+> [Tremblay:Master:(1) 6.975298] [lua/INFO] Sending finalize to 'slave 1'
+> [Bourassa:Slave:(2) 6.975298] [lua/INFO] Got finalize message
+> [Bourassa:Slave:(2) 6.975298] [lua/INFO] I'm done. See you!
+> [Tremblay:Master:(1) 7.141260] [lua/INFO] Sending finalize to 'slave 2'
+> [Jupiter:Slave:(3) 7.141260] [lua/INFO] Got finalize message
+> [Jupiter:Slave:(3) 7.141260] [lua/INFO] I'm done. See you!
+> [Tremblay:Master:(1) 7.359413] [lua/INFO] Sending finalize to 'slave 3'
+> [Fafard:Slave:(4) 7.359413] [lua/INFO] Got finalize message
+> [Fafard:Slave:(4) 7.359413] [lua/INFO] I'm done. See you!
+> [Tremblay:Master:(1) 7.499872] [lua/INFO] Everything's done.
+> [Ginette:Slave:(5) 7.499872] [lua/INFO] Got finalize message
+> [Ginette:Slave:(5) 7.499872] [lua/INFO] I'm done. See you!
+> [7.499872] [lua/INFO] Simulation's over. See you.
index 19ebf50..8ef9d4b 100644 (file)
@@ -2,7 +2,7 @@
   --create new routing model
   --simgrid.AS.new(AS_id,AS_mode)
   simgrid.AS.new{id="AS0",mode="Full"}; 
-  --simgrid.Host.new(host_id,power)
+  --simgrid.host.new(host_id,power)
   simgrid.AS.addHost{AS="AS0",id="Tremblay",power=98095000};
   simgrid.AS.addHost{AS="AS0",id="Jupiter",power=76296000};
   simgrid.AS.addHost{AS="AS0",id="Fafard",power=76296000};
@@ -13,7 +13,7 @@
   for i=10,0,-1 do
     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};  
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
    simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Jupiter",links="1"};
    simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Fafard",links="0,1,2,3,4,8"};
    simgrid.AS.addRoute{AS="AS0",src="Tremblay",dest="Ginette",links="3,4,5"};
index 9c257c4..f2b8a12 100644 (file)
@@ -1,25 +1,25 @@
-
-
--- Slave Function ---------------------------------------------------------
 function Slave(...)
 
-local my_mailbox="slave "..arg[1]
-simgrid.info("Hello from lua, I'm a poor slave with mbox: "..my_mailbox)
+  if #arg ~= 1 then
+    error("Wrong number of arguments (got " .. #arg .. ", expected 1: slave_id)")
+  end
+
+  local my_mailbox = "slave " .. arg[1]
+  simgrid.info("Hello from lua, I'm a poor slave with mailbox: " .. my_mailbox)
 
-while true do
+  while true do
 
-  local tk = simgrid.Task.recv(my_mailbox);
-  if (simgrid.Task.name(tk) == "finalize") then
-    simgrid.info("Slave '" ..my_mailbox.."' got finalize msg");
-    break
+    local task = simgrid.task.recv(my_mailbox)
+    local task_name = task:get_name()
+    if (task_name == "finalize") then
+      simgrid.info("Got finalize message")
+      break
+    end
+    simgrid.info("Received task '" .. task_name .. "' on mailbox '" .. my_mailbox .. "'")
+    task:execute()
+    simgrid.info("Task '" .. task_name .. "' is done")
   end
-  --local tk_name = simgrid.Task.name(tk) 
-  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.Task.name(tk))
-  simgrid.Task.execute(tk)
-  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.Task.name(tk) .. " done")
-end -- while
 
-simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
+  simgrid.info("I'm done. See you!")
+end -- Slave
 
-end 
--- end_of_slave
diff --git a/examples/lua/mult_matrix.lua b/examples/lua/mult_matrix.lua
deleted file mode 100644 (file)
index afe53bf..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-function Sender(...) 
-
-       simgrid.info("Hello From Sender")
-       receiver = simgrid.Host.getByName(arg[1])
-       task_comp = arg[2]
-       task_comm = arg[3]
-       rec_alias = arg[4]
-       
-       size = 4
-       m1 = mkmatrix(size, size)
-        m2 = mkmatrix(size, size)      
-
-       if (#arg ~= 4) then
-           error("Argc should be 4");
-       end
-       simgrid.info("Argc="..(#arg).." (should be 4)")
-
-       -- Sending Task
-       task = simgrid.Task.new("matrix_task",task_comp,task_comm);
-       task['matrix_1'] = m1;
-       task['matrix_2'] = m2;
-       task['size'] = size;
-       simgrid.info("Sending "..simgrid.Task.name(task).." to "..simgrid.Host.name(receiver));
-       simgrid.Task.send(task,rec_alias);
-       -- Read The Result 
-       mm = task['matrix_res']
-       simgrid.info("Got the Multiplication result ...Bye");
-       --mprint(size,size,mm);
-
-end
-------------------------------------------------------
-function Receiver(...)
-       
-       simgrid.info("Hello From Receiver")
-       sender = simgrid.Host.getByName(arg[1])
-       send_alias = arg[2]
-       recv_alias = "Receiver";
-       simgrid.info("Receiving Task from "..simgrid.Host.name(sender));
-       task = simgrid.Task.recv(recv_alias);
-       mm = mmult(task['size'],task['size'],task['matrix_1'],task['matrix_2']);
-       --mprint(task['size'],task['size'],mm)
-       task['matrix_res'] = mm;
-       simgrid.info("Calcul is done ... Bye");
-
-
-end
------------------------------------------------------
-
-local n = tonumber((arg and arg[1]) or 1)
-
-
-
-function mkmatrix(rows, cols)
-    local count = 1
-    local mx = {}
-    for i=0,(rows - 1) do
-    local row = {}
-    for j=0,(cols - 1) do
-        row[j] = count
-        count = count + 1
-    end
-    mx[i] = row
-    end
-    return(mx)
-end
-
-function mmult(rows, cols, m1, m2)
-    local m3 = {}
-    for i=0,(rows-1) do
-        m3[i] = {}
-        for j=0,(cols-1) do
-            local rowj = 0
-            for k=0,(cols-1) do
-                rowj = rowj + m1[i][k] * m2[k][j]
-            end
-            m3[i][j] = rowj
-        end
-    end
-    return(m3)
-end
-
-function mprint(rows,cols,m)
- for i=0,(cols-1)do
-       for j=0,(rows-1)do
-               print (m[i][j])
-       end
- end
-end
-
-
---end
-require "simgrid"
-simgrid.platform("quicksort_platform.xml")
-simgrid.application("quicksort_deployment.xml")
-simgrid.run()
-simgrid.info("Simulation's over.See you.")
-simgrid.clean()
-
-
index ec81ed5..9700b76 100644 (file)
@@ -1,11 +1,9 @@
 dofile 'sender.lua'
 dofile 'receiver.lua'
 require "simgrid"
+
 simgrid.platform("quicksort_platform.xml")
 simgrid.application("quicksort_deployment.xml")
 simgrid.run()
 simgrid.info("Simulation's over.See you.")
-simgrid.clean()
-
-
 
index aa1978d..e771b7a 100644 (file)
@@ -1,54 +1,52 @@
-------------------------------------------------------
 function Receiver(...)
-       
-       simgrid.info("Hello From Receiver")
-       sender = simgrid.Host.getByName(arg[1])
-       send_alias = arg[2]
-       recv_alias = "Receiver";
-       simgrid.info("Receiving Task from "..simgrid.Host.name(sender));
-       task = simgrid.Task.recv(recv_alias);
-       mm = mmult(task['size'],task['size'],task['matrix_1'],task['matrix_2']);
-       --mprint(task['size'],task['size'],mm)
-       task['matrix_res'] = mm;
-       simgrid.info("Calcul is done ... Bye");
-
 
+  simgrid.info("Hello From Receiver")
+  local sender = simgrid.host.get_by_name(arg[1])
+  local send_alias = arg[2]
+  local recv_alias = "Receiver"
+  simgrid.info("Receiving Task from " .. simgrid.host.name(sender))
+  local task = simgrid.task.recv(recv_alias)
+  local mm = mmult(task['size'], task['size'], task['matrix_1'], task['matrix_2'])
+  --mprint(task['size'], task['size'], mm)
+  task['matrix_res'] = mm
+  simgrid.info("Calcul is done ... Bye")
 end
 
 local n = tonumber((arg and arg[1]) or 1)
 function mkmatrix(rows, cols)
-    local count = 1
-    local mx = {}
-    for i=0,(rows - 1) do
+  local count = 1
+  local mx = {}
+  for i = 0, (rows - 1) do
     local row = {}
-    for j=0,(cols - 1) do
-        row[j] = count
-        count = count + 1
+    for j = 0, (cols - 1) do
+      row[j] = count
+      count = count + 1
     end
     mx[i] = row
-    end
-    return(mx)
+  end
+  return mx
 end
 
 function mmult(rows, cols, m1, m2)
-    local m3 = {}
-    for i=0,(rows-1) do
-        m3[i] = {}
-        for j=0,(cols-1) do
-            local rowj = 0
-            for k=0,(cols-1) do
-                rowj = rowj + m1[i][k] * m2[k][j]
-            end
-            m3[i][j] = rowj
-        end
+  local m3 = {}
+  for i = 0, (rows - 1) do
+    m3[i] = {}
+    for j = 0, (cols - 1) do
+      local rowj = 0
+      for k = 0, (cols - 1) do
+       rowj = rowj + m1[i][k] * m2[k][j]
+      end
+      m3[i][j] = rowj
     end
-    return(m3)
+  end
+  return m3
 end
 
-function mprint(rows,cols,m)
for i=0,(cols-1)do
-       for j=0,(rows-1)do
-               print (m[i][j])
-       end
- end
+function mprint(rows, cols, m)
 for i = 0, (cols - 1) do
+    for j = 0, (rows - 1 )do
+      print(m[i][j])
+    end
 end
 end
+
index 7dfe0f3..dfd1ae8 100644 (file)
@@ -1,30 +1,27 @@
 function Sender(...) 
 
-       simgrid.info("Hello From Sender")
-       receiver = simgrid.Host.getByName(arg[1])
-       task_comp = arg[2]
-       task_comm = arg[3]
-       rec_alias = arg[4]
-       
-       size = 4
-       m1 = mkmatrix(size, size)
-        m2 = mkmatrix(size, size)      
+  simgrid.info("Hello From Sender")
+  local receiver = simgrid.host.get_by_name(arg[1])
+  local task_comp = arg[2]
+  local task_comm = arg[3]
+  local rec_alias = arg[4]
 
-       if (#arg ~= 4) then
-           error("Argc should be 4");
-       end
-       simgrid.info("Argc="..(#arg).." (should be 4)")
+  local size = 4
+  local m1 = mkmatrix(size, size)
+  local m2 = mkmatrix(size, size)
 
-       -- Sending Task
-       task = simgrid.Task.new("matrix_task",task_comp,task_comm);
-       task['matrix_1'] = m1;
-       task['matrix_2'] = m2;
-       task['size'] = size;
-       simgrid.info("Sending "..simgrid.Task.name(task).." to "..simgrid.Host.name(receiver));
-       simgrid.Task.send(task,rec_alias);
-       -- Read The Result 
-       mm = task['matrix_res']
-       simgrid.info("Got the Multiplication result ...Bye");
-       --mprint(size,size,mm);
+  if #arg ~= 4 then
+    error("Argc should be 4")
+  end
+  simgrid.info("Argc=" .. (#arg) .. " (should be 4)")
 
+  -- Sending Task
+  local task = simgrid.task.new("matrix_task", task_comp, task_comm)
+  task['matrix_1'] = m1
+  task['matrix_2'] = m2
+  task['size'] = size
+  simgrid.info("Sending " .. simgrid.task.get_name(task) .. " to " .. simgrid.host.name(receiver))
+  simgrid.task.send(task, rec_alias)
+  simgrid.info("Got the Multiplication result ...Bye")
 end
+
index 38765ca..04951c3 100644 (file)
@@ -19,11 +19,11 @@ simgrid.info("Argc="..(#arg).." (should be 4)")
 -- Dispatch the tasks
 
 for i=1,nb_task do
-  tk = simgrid.Task.new("Task "..i,comp_size,comm_size);
+  tk = simgrid.task.new("Task "..i,comp_size,comm_size);
   alias = "slave "..(i%slave_count);
-  simgrid.info("Master sending  '" .. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-  simgrid.Task.send(tk,alias); -- C user data set to NULL
-  simgrid.info("Master done sending '".. simgrid.Task.name(tk) .."' To '" .. alias .."'");
+  simgrid.info("Master sending  '" .. simgrid.task.get_name(tk) .."' To '" .. alias .."'");
+  simgrid.task.send(tk,alias); -- C user data set to NULL
+  simgrid.info("Master done sending '".. simgrid.task.get_name(tk) .."' To '" .. alias .."'");
 end
 
 -- Sending Finalize Message To Others
@@ -32,8 +32,8 @@ simgrid.info("Master: All tasks have been dispatched. Let's tell everybody the c
 for i=0,slave_count-1 do
   alias = "slave "..i;
   simgrid.info("Master: sending finalize to "..alias);
-  finalize = simgrid.Task.new("finalize",comp_size,comm_size);
-  simgrid.Task.send(finalize,alias)
+  finalize = simgrid.task.new("finalize",comp_size,comm_size);
+  simgrid.task.send(finalize,alias)
 end
   simgrid.info("Master: Everything's done.");
 end
index 555d940..e188572 100644 (file)
@@ -6,15 +6,15 @@ simgrid.info("Hello from lua, I'm a poor slave with mbox: "..my_mailbox)
 
 while true do
 
-  local tk = simgrid.Task.recv(my_mailbox);
-  if (simgrid.Task.name(tk) == "finalize") then
+  local tk = simgrid.task.recv(my_mailbox);
+  if (simgrid.task.get_name(tk) == "finalize") then
     simgrid.info("Slave '" ..my_mailbox.."' got finalize msg");
     break
   end
-  --local tk_name = simgrid.Task.name(tk) 
-  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.Task.name(tk))
-  simgrid.Task.execute(tk)
-  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.Task.name(tk) .. " done")
+  --local tk_name = simgrid.task.get_name(tk) 
+  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.task.get_name(tk))
+  simgrid.task.execute(tk)
+  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.task.get_name(tk) .. " done")
 end -- while
 
 simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
index 932109c..a40ef42 100644 (file)
@@ -2,11 +2,11 @@
    dofile "master.lua"
    dofile "slave.lua"
    --Set Application
-   simgrid.Host.setFunction{host="Splayd_1",fct="Master",args="20,550000000,1000000,4"};
-   simgrid.Host.setFunction{host="Splayd_5",fct="Slave",args="0"};
-   simgrid.Host.setFunction{host="Splayd_2",fct="Slave",args="1"};
-   simgrid.Host.setFunction{host="Splayd_3",fct="Slave",args="2"};
-   simgrid.Host.setFunction{host="Splayd_4",fct="Slave",args="3"};
+   simgrid.host.set_function{host="Splayd_1",fct="Master",args="20,550000000,1000000,4"};
+   simgrid.host.set_function{host="Splayd_5",fct="Slave",args="0"};
+   simgrid.host.set_function{host="Splayd_2",fct="Slave",args="1"};
+   simgrid.host.set_function{host="Splayd_3",fct="Slave",args="2"};
+   simgrid.host.set_function{host="Splayd_4",fct="Slave",args="3"};
 
   --Save Application 
    simgrid.msg_register_application(); 
index ad86aa4..1181a1b 100644 (file)
@@ -11,7 +11,7 @@ require "simgrid"
   for i=10,0,-1 do
     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_2",{"1"});
    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_3",{"0","1","2","3","4","8"});
    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_4",{"3","4","5"});
diff --git a/examples/lua/state_cloner/deployment_duplicated_globals.xml b/examples/lua/state_cloner/deployment_duplicated_globals.xml
new file mode 100644 (file)
index 0000000..aca6202
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+  <process host="Tremblay" function="set_global_string">
+    <argument value="Calling set_global_string() from Tremblay"/>
+  </process>
+  <process host="Bourassa" function="replace">
+    <argument value="Calling replace() from Bourassa"/>
+  </process>
+  <process host="Jupiter" function="please_dont_replace_me">
+    <argument value="Calling please_dont_replace_me() from Jupiter"/>
+  </process>
+</platform>
diff --git a/examples/lua/state_cloner/duplicated_globals.lua b/examples/lua/state_cloner/duplicated_globals.lua
new file mode 100644 (file)
index 0000000..70366bb
--- /dev/null
@@ -0,0 +1,43 @@
+-- This code creates 3 simgrid processes and verifies that the global values
+-- in each Lua world are correctly cloned from maestro and become different
+
+require("simgrid")
+
+global_string = "A global string set by maestro"
+
+-- Assigns to the global string the first argument and prints it
+function set_global_string(...)
+  
+  global_string = arg[1]
+  simgrid.info("Changing the global string")
+  print_global()
+end
+
+-- Replaces the function please_dont_change_me() by set_global_string()
+-- and calls it
+function replace(...)
+
+  simgrid.info("Overwriting function please_dont_replace_me()")
+  please_dont_replace_me = set_global_string
+  please_dont_replace_me(...)
+end
+
+-- Shows a hello message and prints the global string
+function please_dont_replace_me(...)
+
+  simgrid.info("Hello from please_dont_replace_me(). I'm lucky, I still exist in this state.")
+  print_global()
+end
+
+-- Prints the value of global_string
+function print_global()
+
+  simgrid.info("Global string is '" .. global_string .. "'")
+end
+
+print_global()
+
+simgrid.platform("../../msg/small_platform.xml")
+simgrid.application("deployment_duplicated_globals.xml")
+simgrid.run()
+
diff --git a/examples/lua/state_cloner/duplicated_globals.tesh b/examples/lua/state_cloner/duplicated_globals.tesh
new file mode 100644 (file)
index 0000000..c8029d7
--- /dev/null
@@ -0,0 +1,11 @@
+# Checks that global values are correctly duplicated in Lua processes
+
+$ lua duplicated_globals.lua
+> [0.000000] [lua/INFO] Global string is 'A global string set by maestro'
+> [Tremblay:set_global_string:(1) 0.000000] [lua/INFO] Changing the global string
+> [Tremblay:set_global_string:(1) 0.000000] [lua/INFO] Global string is 'Calling set_global_string() from Tremblay'
+> [Bourassa:replace:(2) 0.000000] [lua/INFO] Overwriting function please_dont_replace_me()
+> [Bourassa:replace:(2) 0.000000] [lua/INFO] Changing the global string
+> [Bourassa:replace:(2) 0.000000] [lua/INFO] Global string is 'Calling replace() from Bourassa'
+> [Jupiter:please_dont_replace_me:(3) 0.000000] [lua/INFO] Hello from please_dont_replace_me(). I'm lucky, I still exist in this state.
+> [Jupiter:please_dont_replace_me:(3) 0.000000] [lua/INFO] Global string is 'A global string set by maestro'
index 98f6de7..e189c05 100644 (file)
@@ -6,7 +6,7 @@ for i,v in ipairs(arg) do
     simgrid.info("Got "..v)
 end
 
-prop_value = simgrid.Host.getPropValue(simgrid.Host.self(),"peace");
+prop_value = simgrid.host.get_prop_value(simgrid.host.self(),"peace");
 simgrid.info("Prop Value >>> ".. prop_value);
 
 nb_task = arg[1];
@@ -22,13 +22,13 @@ simgrid.info("Argc="..(#arg).." (should be 4)")
 -- Dispatch the tasks
 
 for i=1,nb_task do
-  tk = simgrid.Task.new("Task "..i,comp_size,comm_size);
+  tk = simgrid.task.new("Task "..i,comp_size,comm_size);
   alias = "slave "..(i%slave_count);
   -- Set Trace Category
   simgrid.Trace.setTaskCategory(tk,"compute");
-  simgrid.info("Master sending  '" .. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-  simgrid.Task.send(tk,alias); -- C user data set to NULL
-  simgrid.info("Master done sending '".. simgrid.Task.name(tk) .."' To '" .. alias .."'");
+  simgrid.info("Master sending  '" .. simgrid.task.get_name(tk) .."' To '" .. alias .."'");
+  simgrid.task.send(tk,alias); -- C user data set to NULL
+  simgrid.info("Master done sending '".. simgrid.task.get_name(tk) .."' To '" .. alias .."'");
 end
 
 -- Sending Finalize Message To Others
@@ -37,10 +37,10 @@ simgrid.info("Master: All tasks have been dispatched. Let's tell everybody the c
 for i=0,slave_count-1 do
   alias = "slave "..i;
   simgrid.info("Master: sending finalize to "..alias);
-  finalize = simgrid.Task.new("finalize",comp_size,comm_size);
+  finalize = simgrid.task.new("finalize",comp_size,comm_size);
   --set Trace Category 
   simgrid.Trace.setTaskCategory(finalize,"finalize");
-  simgrid.Task.send(finalize,alias);
+  simgrid.task.send(finalize,alias);
 end
   simgrid.info("Master: Everything's done.");
 end
index e51b7d1..f3ca3f4 100644 (file)
@@ -19,6 +19,5 @@ end
 
 simgrid.run()
 simgrid.info("Simulation's over.See you.")
-simgrid.clean()
 simgrid.Trace.finish()
 
index 0b6541d..cdbe5f3 100644 (file)
@@ -7,15 +7,15 @@ simgrid.info("Hello from lua, I'm a poor slave with mbox: "..my_mailbox)
 
 while true do
 
-  local tk = simgrid.Task.recv(my_mailbox);
-  if (simgrid.Task.name(tk) == "finalize") then
+  local tk = simgrid.task.recv(my_mailbox);
+  if (simgrid.task.get_name(tk) == "finalize") then
     simgrid.info("Slave '" ..my_mailbox.."' got finalize msg");
     break
   end
-  --local tk_name = simgrid.Task.name(tk) 
-  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.Task.name(tk))
-  simgrid.Task.execute(tk)
-  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.Task.name(tk) .. " done")
+  --local tk_name = simgrid.task.get_name(tk) 
+  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.task.get_name(tk))
+  simgrid.task.execute(tk)
+  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.task.get_name(tk) .. " done")
 end -- while
 
 simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
index f3b9299..85a00a0 100644 (file)
@@ -7,7 +7,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
-#include "msg/mailbox.h"        /* we play funny tricks with mailboxes and rdv points */
 #include "simix/simix.h"        /* semaphores for the barrier */
 #include "xbt.h"                /* calloc, printf */
 #include "instr/instr_private.h"
@@ -88,8 +87,7 @@ static void action_send(const char *const *action)
    
    XBT_VERB("%s %f", name, MSG_get_clock() - clock);
 
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, "send");
@@ -107,8 +105,8 @@ static void action_Isend(const char *const *action)
 
 
   sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()),action[2]);
-  m_task_t task = MSG_task_create(to,0,parse_double(size),NULL);
-  msg_comm_t comm = MSG_task_isend_with_matching(task, to, /*matching madness*/NULL,task);
+  msg_comm_t comm =
+      MSG_task_isend( MSG_task_create(to,0,parse_double(size),NULL), to);
   xbt_dynar_push(globals->isends,&comm);
 
   XBT_DEBUG("Isend on %s", MSG_process_get_name(MSG_process_self()));
@@ -117,12 +115,6 @@ static void action_Isend(const char *const *action)
   asynchronous_cleanup();
 }
 
-static int task_matching(void*ignored,void*sent_task) {
-  m_task_t t = (m_task_t)sent_task;
-  if (t!=NULL && MSG_task_get_data_size(t)<65536)
-    return 1; /* that's supposed to be already arrived */
-  return 0; /* rendez-vous mode: it's not there yet */
-}
 
 static void action_recv(const char *const *action)
 {
@@ -137,22 +129,6 @@ static void action_recv(const char *const *action)
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
     name = xbt_str_join_array(action, " ");
 
-  /* The next chunk is to deal with the fact that for short messages,
-   * if the send occurs before the receive, the message is already sent and
-   * buffered on receiver side when the recv() occurs.
-   *
-   * So the next chunk detects this fact and cancel the simix communication instead.
-   */
-
-  /* make sure the rdv is created on need by asking to MSG instead of simix directly */
-  smx_rdv_t rdv = MSG_mailbox_get_by_alias(mailbox_name);
-  smx_action_t act = SIMIX_comm_get_send_match(rdv,task_matching,NULL);
-  if (act!=NULL){
-    /* FIXME account for the memcopy time if needed */
-    SIMIX_comm_finish(act);
-    return;
-  }
-
 #ifdef HAVE_TRACING
   int rank = get_rank(MSG_process_get_name(MSG_process_self()));
   int src_traced = get_rank(action[2]);
@@ -160,13 +136,15 @@ static void action_recv(const char *const *action)
 #endif
 
   XBT_DEBUG("Receiving: %s", name);
-  MSG_task_receive(&task, mailbox_name);
+  MSG_error_t res = MSG_task_receive(&task, mailbox_name);
   //  MSG_task_receive(&task, MSG_process_get_name(MSG_process_self()));
   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
-  MSG_task_destroy(task);
 
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  if (res == MSG_OK) {
+    MSG_task_destroy(task);
+  }
+
+  free(name);
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, rank, "recv");
   TRACE_smpi_recv(rank, src_traced, rank);
@@ -239,8 +217,7 @@ static void action_wait(const char *const *action)
   MSG_task_destroy(task);
 
   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, rank, "wait");
   TRACE_smpi_recv(rank, src_traced, rank);
@@ -284,8 +261,7 @@ static void action_barrier(const char *const *action)
     mutex=NULL;
   }
 
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 
 }
 
@@ -406,8 +382,7 @@ static void action_sleep(const char *const *action)
   MSG_process_sleep(parse_double(duration));
   XBT_VERB("%s %f ", name, MSG_get_clock() - clock);
 
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 }
 
 static void action_allReduce(const char *const *action) {
@@ -492,8 +467,7 @@ static void action_comm_size(const char *const *action)
     name = xbt_str_join_array(action, " ");
   communicator_size = parse_double(size);
   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 }
 
 static void action_compute(const char *const *action)
@@ -509,8 +483,7 @@ static void action_compute(const char *const *action)
   MSG_task_execute(task);
   MSG_task_destroy(task);
   XBT_VERB("%s %f", name, MSG_get_clock() - clock);
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
-    free(name);
+  free(name);
 }
 
 static void action_init(const char *const *action)
index 6edc971..d548647 100644 (file)
@@ -75,7 +75,7 @@ $ ${bindir:=.}/actions --log=actions.thres=verbose homogeneous_3_hosts.xml deplo
 > [150.005200] (2:p1@host1) p1 send p2 1e9 50.005200
 > [150.005200] (3:p2@host2) p2 wait 100.005200
 > [150.005200] (3:p2@host2) p2 Isend p0 1e9 0.000000
+> [200.005200] (0:@) Simulation time 200.005
+> [200.005200] (1:p0@host0) p0 recv p2 50.000000
 > [200.005200] (3:p2@host2) p2 compute 5e8 50.000000
-> [200.010400] (0:@) Simulation time 200.01
-> [200.010400] (1:p0@host0) p0 recv p2 50.005200
 
index 15d3423..2bfaa48 100644 (file)
@@ -82,6 +82,7 @@ static int *powers2;
 
 // utility functions
 static void chord_initialize(void);
+static void chord_exit(void);
 static int normalize(int id);
 static int is_in_interval(int id, int start, int end);
 static void get_mailbox(int host_id, char* mailbox);
@@ -127,6 +128,11 @@ static void chord_initialize(void)
   XBT_DEBUG("Sets nb_keys to %d", nb_keys);
 }
 
+static void chord_exit(void)
+{
+  xbt_free(powers2);
+}
+
 /**
  * \brief Turns an id into an equivalent id in [0, nb_keys).
  * \param id an id
@@ -139,7 +145,7 @@ static int normalize(int id)
 }
 
 /**
- * \brief Returns whether a id belongs to the interval [start, end].
+ * \brief Returns whether an id belongs to the interval [start, end].
  *
  * The parameters are noramlized to make sure they are between 0 and nb_keys - 1).
  * 1 belongs to [62, 3]
@@ -342,13 +348,16 @@ int node(int argc, char *argv[])
           MSG_process_sleep(5);
         }
       }
-      else {
+
+      if (node.comm_receive && MSG_comm_test(node.comm_receive)) {
+
         // a transfer has occured
 
         MSG_error_t status = MSG_comm_get_status(node.comm_receive);
 
         if (status != MSG_OK) {
           XBT_DEBUG("Failed to receive a task. Nevermind.");
+          MSG_comm_destroy(node.comm_receive);
           node.comm_receive = NULL;
         }
         else {
@@ -358,35 +367,12 @@ int node(int argc, char *argv[])
           handle_task(&node, task_received);
         }
       }
-
-      // see if some communications are finished
-      /*
-      while ((index = MSG_comm_testany(node.comms)) != -1) {
-        comm_send = xbt_dynar_get_as(node.comms, index, msg_comm_t);
-        MSG_error_t status = MSG_comm_get_status(comm_send);
-        xbt_dynar_remove_at(node.comms, index, &comm_send);
-        XBT_DEBUG("Communication %p is finished with status %d, dynar size is now %lu",
-            comm_send, status, xbt_dynar_length(node.comms));
-       m_task_t task = MSG_comm_get_task(comm_send);
-        MSG_comm_destroy(comm_send);
-       if (status != MSG_OK) {
-         task_data_destroy(MSG_task_get_data(task));
-         MSG_task_destroy(task);
-       }
-      }
-      */
     }
 
-    // clean unfinished comms sent
-   /* unsigned int cursor;
-    xbt_dynar_foreach(node.comms, cursor, comm_send) {
-      m_task_t task = MSG_comm_get_task(comm_send);
-      MSG_task_cancel(task);
-      task_data_destroy(MSG_task_get_data(task));
-      MSG_task_destroy(task);
-      MSG_comm_destroy(comm_send);
-      // FIXME: the task is actually not destroyed because MSG thinks that the other side (whose process is dead) is still using it
-    }*/
+    if (node.comm_receive) {
+      MSG_comm_destroy(node.comm_receive);
+      node.comm_receive = NULL;
+    }
 
     // leave the ring
     leave(&node);
@@ -936,6 +922,7 @@ int main(int argc, char *argv[])
   XBT_INFO("Simulated time: %g", MSG_get_clock());
 
   MSG_clean();
+  chord_exit();
 
   if (res == MSG_OK)
     return 0;
index d5b0dfb..776f4af 100644 (file)
@@ -425,5 +425,5 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../msg_platfo
 > [547.073600] (3:node@iRMX)   54  |  38 
 > [547.073600] (3:node@iRMX)    6  |  38 
 > [547.073600] (3:node@iRMX) Predecessor: 32
-> [655.138775] (0:@) Messages created: 838
-> [655.138775] (0:@) Simulated time: 655.139
+> [649.756626] (0:@) Messages created: 838
+> [649.756626] (0:@) Simulated time: 649.757
similarity index 53%
rename from examples/msg/gtnets/gtnets-fullduplex.tesh
rename to examples/msg/gtnets/gtnets-crosstraffic.tesh
index 133d841..74958ac 100644 (file)
@@ -1,20 +1,20 @@
 #! ./tesh
 
-p Testing fullduplex TCP option DISABLED
+p Testing crosstraffic TCP option DISABLED
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/fullduplex-p.xml ${srcdir:=.}/gtnets/fullduplex-d.xml --cfg=fullduplex:0
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'fullduplex' to '0'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/crosstraffic-p.xml ${srcdir:=.}/gtnets/crosstraffic-d.xml --cfg=network/crosstraffic:0
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/crosstraffic' to '0'
 > [S1:slave:(8) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 3063.735285 ;  message from S1 to C1  with remaining : 666666.666667
 > [S1:slave:(8) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[2] : 3063.735285 ;  message from S1 to C1  with remaining : 666666.666667
 > [S1:slave:(8) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[3] : 3063.735285 ;  message from S1 to C1  with remaining : 666666.666667
 > [S1:slave:(8) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[4] : 9191.205854 ;  message from C1 to S1  with remaining : 0.000000
 
 
-p Testing fullduplex TCP option ENABLED
+p Testing crosstraffic TCP option ENABLED
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/fullduplex-p.xml ${srcdir:=.}/gtnets/fullduplex-d.xml --cfg=fullduplex:1
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'fullduplex' to '1'
-> [C1:slave:(2) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
-> [C1:slave:(2) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[2] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
-> [C1:slave:(2) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[3] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
-> [C1:slave:(2) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[4] : 3015.447482 ;  message from C1 to S1  with remaining : 0.000000
+$ gtnets/gtnets ${srcdir:=.}/gtnets/crosstraffic-p.xml ${srcdir:=.}/gtnets/crosstraffic-d.xml --cfg=network/crosstraffic:1
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/crosstraffic' to '1'
+> [C1:slave:(4) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
+> [C1:slave:(4) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[2] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
+> [C1:slave:(4) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[3] : 3015.447482 ;  message from S1 to C1  with remaining : 0.000000
+> [C1:slave:(4) 331.625739] [msg_test/INFO] ===> Estimated Bw of FLOW[4] : 3015.447482 ;  message from C1 to S1  with remaining : 0.000000
index 93ce019..b60e800 100644 (file)
@@ -45,7 +45,6 @@ int master(int argc, char *argv[])
   char *slavename = NULL;
   double task_comm_size = 0;
   m_task_t todo;
-  m_host_t slave;
   char id_alias[10];
   //unique id to control statistics
   int id = -1;
@@ -77,10 +76,6 @@ int master(int argc, char *argv[])
     gl_data_size[id] = task_comm_size;
   }
 
-  {                             /* Process organisation */
-    slave = MSG_get_host_by_name(slavename);
-  }
-
   count_finished++;
 
   /* time measurement */
@@ -160,8 +155,8 @@ int slave(int argc, char *argv[])
     bool_printed = 1;
     
     for (id = 0; id < NTASKS; id++) {
-      if (gl_task_array[id] == NULL) {
-      } else if (gl_task_array[id] == task) {
+      if (gl_task_array[id] == NULL) continue;
+      if (gl_task_array[id] == task) {
 #ifdef HAVE_LATENCY_BOUND_TRACKING
         limited_latency = MSG_task_is_latency_bounded(gl_task_array[id]);
         if (limited_latency) {
@@ -172,6 +167,8 @@ int slave(int argc, char *argv[])
             ("===> Estimated Bw of FLOW[%d] : %f ;  message from %s to %s  with remaining : %f",
              id, gl_data_size[id] / elapsed_time, masternames[id],
              slavenames[id], 0.0);
+        MSG_task_destroy(gl_task_array[id]);
+        gl_task_array[id]=NULL;
       } else {
         remaining =
             MSG_task_get_remaining_communication(gl_task_array[id]);
@@ -186,15 +183,19 @@ int slave(int argc, char *argv[])
             ("===> Estimated Bw of FLOW[%d] : %f ;  message from %s to %s  with remaining : %f",
              id, (gl_data_size[id] - remaining) / elapsed_time,
              masternames[id], slavenames[id], remaining);
+        if(remaining==0) {
+          MSG_task_destroy(gl_task_array[id]);
+          gl_task_array[id]=NULL;
+        }
       }
-
     }
+    bool_printed = 2;
   }
   char mark[100];
   snprintf(mark, 100, "flow_%d_finished", trace_id);
   TRACE_mark("endmark", mark);
 
-  MSG_task_destroy(task);
+  if(bool_printed==2 && gl_task_array[trace_id]) MSG_task_destroy(gl_task_array[trace_id]);
 
   return 0;
 }                               /* end_of_slave */
index 17f1060..dff859e 100644 (file)
@@ -86,7 +86,7 @@ int sender(int argc, char *argv[])
 int receiver(int argc, char *argv[])
 {
   m_task_t task = NULL;
-  MSG_error_t res;
+  _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
@@ -95,7 +95,7 @@ int receiver(int argc, char *argv[])
   XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time,
         sleep_test_time);
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read,
               "Invalid argument %s\n", argv[1]);
index d068417..fde2c5a 100644 (file)
@@ -62,11 +62,11 @@ int sender(int argc, char *argv[])
 int receiver(int argc, char *argv[])
 {
   m_task_t task = NULL;
-  MSG_error_t res;
+  _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   MSG_process_sleep(10);
index c9d126b..410e0f7 100644 (file)
@@ -64,7 +64,7 @@ int sender(int argc, char *argv[])
   sprintf(mailbox, "finalize");
 
   msg_comm_t res_irecv;
-  MSG_error_t res_wait;
+  _XBT_GNUC_UNUSED MSG_error_t res_wait;
   for (i = 0; i < receivers_count; i++) {
     task = NULL;
     res_irecv = MSG_task_irecv(&(task), mailbox);
@@ -88,7 +88,7 @@ int receiver(int argc, char *argv[])
   int tasks = atof(argv[2]);
   m_task_t *task = xbt_new(m_task_t, tasks);
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
   sprintf(mailbox, "receiver-%d", id);
@@ -104,7 +104,7 @@ int receiver(int argc, char *argv[])
   /* Here we are waiting for the receiving of all communications */
   m_task_t task_com;
   while (!xbt_dynar_is_empty(comms)) {
-    MSG_error_t err;
+    _XBT_GNUC_UNUSED MSG_error_t err;
     xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv);
     task_com = MSG_comm_get_task(res_irecv);
     MSG_comm_destroy(res_irecv);
index 77786c2..b6b352f 100644 (file)
@@ -8,6 +8,8 @@ add_executable(masterslave_mailbox "masterslave_mailbox.c")
 add_executable(masterslave_bypass "masterslave_bypass.c")
 add_executable(masterslave_console "masterslave_console.c")
 add_executable(masterslave_cluster "masterslave_cluster.c")
+add_executable(masterslave_kill "masterslave_kill.c")
+add_executable(masterslave_arg "masterslave_arg.c")
 
 ### Add definitions for compile
 if(WIN32)
@@ -16,11 +18,15 @@ target_link_libraries(masterslave_failure simgrid )
 target_link_libraries(masterslave_mailbox simgrid )
 target_link_libraries(masterslave_bypass simgrid )
 target_link_libraries(masterslave_console simgrid )
+target_link_libraries(masterslave_kill simgrid )
+target_link_libraries(masterslave_arg simgrid )
 else(WIN32)
 target_link_libraries(masterslave_forwarder simgrid m )
 target_link_libraries(masterslave_failure simgrid m )
 target_link_libraries(masterslave_mailbox simgrid m )
 target_link_libraries(masterslave_bypass simgrid m )
 target_link_libraries(masterslave_console simgrid m )
+target_link_libraries(masterslave_kill simgrid m )
+target_link_libraries(masterslave_arg simgrid m )
 endif(WIN32)
 target_link_libraries(masterslave_cluster simgrid)
\ No newline at end of file
diff --git a/examples/msg/masterslave/deployment_masterslave_kill.xml b/examples/msg/masterslave/deployment_masterslave_kill.xml
new file mode 100644 (file)
index 0000000..2621d6e
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+  <process host="alice" function="master"></process>
+</platform>
diff --git a/examples/msg/masterslave/masterslave_arg.c b/examples/msg/masterslave/masterslave_arg.c
new file mode 100644 (file)
index 0000000..1fc804f
--- /dev/null
@@ -0,0 +1,146 @@
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include <stdio.h>
+#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "xbt/sysdep.h"         /* calloc, printf */
+
+/* Create a log channel to have nice outputs. */
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+                             "Messages specific for this msg example");
+
+int master(int argc, char *argv[]);
+int slave(int argc, char *argv[]);
+
+#define task_comp_size 50000000
+#define task_comm_size 1000000
+
+long number_of_jobs;
+long number_of_slaves;
+
+static long my_random(long n)
+{
+  return n * (rand() / ((double)RAND_MAX + 1));
+}
+
+/** Emitter function  */
+int master(int argc, char *argv[])
+{
+  int i;
+
+  for (i = 1; i <= number_of_jobs; i++) {
+    char mailbox[256];
+    char sprintf_buffer[256];
+    m_task_t task = NULL;
+
+    sprintf(mailbox, "slave-%ld", i % number_of_slaves);
+    sprintf(sprintf_buffer, "Task_%d", i);
+    task =
+        MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size,
+                        NULL);
+    XBT_DEBUG("Sending \"%s\" (of %ld) to mailbox \"%s\"", task->name,
+          number_of_jobs, mailbox);
+
+    MSG_task_send(task, mailbox);
+  }
+
+  XBT_DEBUG
+      ("All tasks have been dispatched. Let's tell everybody the computation is over.");
+  for (i = 0; i < number_of_slaves; i++) {
+    char mailbox[80];
+
+    sprintf(mailbox, "slave-%ld", i % number_of_slaves);
+    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    MSG_task_send(finalize, mailbox);
+  }
+
+  XBT_DEBUG("Goodbye now!");
+  return 0;
+}                               /* end_of_master */
+
+/** Receiver function  */
+int slave(int argc, char *argv[])
+{
+  m_task_t task = NULL;
+  _XBT_GNUC_UNUSED int res;
+
+  XBT_DEBUG("mailbox: %s",MSG_process_get_name(MSG_process_self()));
+  while (1) {
+    res = MSG_task_receive(&(task), MSG_process_get_name(MSG_process_self()));
+    xbt_assert(res == MSG_OK, "MSG_task_get failed");
+
+    XBT_DEBUG("Received \"%s\"", MSG_task_get_name(task));
+    if (!strcmp(MSG_task_get_name(task), "finalize")) {
+      MSG_task_destroy(task);
+      break;
+    }
+    XBT_DEBUG("Processing \"%s\"", MSG_task_get_name(task));
+    MSG_task_execute(task);
+    XBT_DEBUG("\"%s\" done", MSG_task_get_name(task));
+    MSG_task_destroy(task);
+    task = NULL;
+  }
+  XBT_DEBUG("I'm done. See you!");
+  return 0;
+}                               /* end_of_slave */                              /* end_of_test_all */
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+  MSG_error_t res = MSG_OK;
+  long i;
+
+  MSG_global_init(&argc, argv);
+  if (argc < 4) {
+    printf("Usage: %s platform_file number_of_jobs number_of_slaves\n", argv[0]);
+    printf("example: %s msg_platform.xml 10 5\n", argv[0]);
+    exit(1);
+  }
+
+  MSG_set_channel_number(0);
+  MSG_function_register("master", master);
+  MSG_function_register("slave", slave);
+
+  MSG_create_environment(argv[1]);
+
+  number_of_jobs = atol(argv[2]);
+  number_of_slaves = atol(argv[3]);
+  long number_max = MSG_get_host_number();
+  XBT_INFO("Got %ld slaves, %ld tasks to process, and %d hosts", number_of_slaves, number_of_jobs,MSG_get_host_number());
+
+  m_host_t *host_table =  MSG_get_host_table();
+
+  MSG_process_create( "master",
+                      master,
+                      NULL,
+                      host_table[my_random(number_max)]
+                      );
+
+  for(i = 0 ; i<number_of_slaves; i++)
+  {
+    char* name_host = bprintf("slave-%ld",i);
+      MSG_process_create( name_host,
+                          slave,
+                          NULL,
+                          host_table[my_random(number_max)]
+                          );
+      free(name_host);
+  }
+  xbt_free(host_table);
+
+  res = MSG_main();
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+
+  MSG_clean();
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
index 159a1bf..b35ebe6 100644 (file)
@@ -167,7 +167,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  int read;
+  _XBT_GNUC_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index f293881..396b361 100644 (file)
@@ -37,7 +37,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  int read;
+  _XBT_GNUC_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index fc1b757..eff5909 100644 (file)
@@ -68,10 +68,10 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   m_task_t task = NULL;
-  int res;
+  _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
-  int read;
+  _XBT_GNUC_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 4c7457b..2470994 100644 (file)
@@ -1,7 +1,7 @@
 #! ./tesh
 
 ! output sort
-$ $SG_TEST_EXENV masterslave_console ${srcdir:=.}/platform_script.lua --log=surf_parse.thres:critical "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/masterslave_console ${srcdir:=.}/platform_script.lua --log=surf_parse.thres:critical "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n"
 > [   0.000000] (1:master@Tremblay) Got 4 slaves and 20 tasks to process
 > [   0.000000] (1:master@Tremblay) Sending "Task_0" (of 20) to mailbox "slave-0"
 > [ 221.119476] (1:master@Tremblay) Sending "Task_1" (of 20) to mailbox "slave-1"
index 354343d..315b43b 100644 (file)
@@ -3,9 +3,8 @@
 p Testing a simple master/slave example application
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
-> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+$ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT small_platform.xml masterslave/deployment_masterslave.xml --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:master@Tremblay) Got 5 slaves and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Sending "Task_0" to "Jupiter"
 > [  0.165962] (1:master@Tremblay) Sent
@@ -128,9 +127,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT small_platform.xml ma
 p Testing a master/slave example application with a forwarder module
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
-> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+$ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT msg_platform.xml masterslave/deployment_masterslave_forwarder.xml --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:master@Jacquelin) Got 5 slaves and 20 tasks to process
 > [  0.000000] (1:master@Jacquelin) Sending "Task_0" to "iRMX"
 > [  4.772530] (1:master@Jacquelin) Sent
@@ -279,8 +277,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/masterslave_forwarder$EXEEXT msg_platform.xml mast
 p Testing a simple master/slave example application handling failures
 
 ! output sort
-$ ${bindir:=.}/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path:${srcdir} --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+$ ${bindir:=.}/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc small_platform_with_failures.xml masterslave/deployment_masterslave.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Cannot launch process 'slave' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 slave(s) :
 > [  0.000000] (1:master@Tremblay) Jupiter
@@ -374,10 +371,9 @@ $ ${bindir:=.}/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_
 p Testing the bypassing of the flexml parser
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/masterslave_bypass --log=no_loc --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+$ $SG_TEST_EXENV ${bindir:=.}/masterslave_bypass --log=no_loc --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (0:@) Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
-> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [  0.000000] (1:master@host A) Got 1 slave(s) :
 > [  0.000000] (1:master@host A)        host B
 > [  0.000000] (1:master@host A) Got 20 task to process :
index 58d0e4a..f93761e 100644 (file)
@@ -36,7 +36,7 @@ int master(int argc, char *argv[])
   double task_comp_size = 0;
   double task_comm_size = 0;
   int i;
-  int read;
+  _XBT_GNUC_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index d02543e..5978b0e 100644 (file)
@@ -39,7 +39,7 @@ int master(int argc, char *argv[])
 
   int i;
 
-  int res = sscanf(argv[1], "%d", &number_of_tasks);
+  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
   xbt_assert(res,"Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &task_comp_size);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
@@ -103,7 +103,7 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   m_task_t task = NULL;
-  int res;
+  _XBT_GNUC_UNUSED int res;
   while (1) {
     res = MSG_task_get(&(task), PORT_22);
     xbt_assert(res == MSG_OK, "MSG_task_get failed");
diff --git a/examples/msg/masterslave/masterslave_kill.c b/examples/msg/masterslave/masterslave_kill.c
new file mode 100644 (file)
index 0000000..c65c06b
--- /dev/null
@@ -0,0 +1,81 @@
+/* Copyright (c) 2007, 2009, 2010. 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 "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "xbt/sysdep.h"         /* calloc */
+
+/* Create a log channel to have nice outputs. */
+#include "xbt/log.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+                             "Messages specific for this msg example");
+
+/** Lazy guy function. This process suspends itself asap.  */
+static int slave(int argc, char *argv[])
+{
+  XBT_INFO("Hello!");
+  XBT_INFO("Suspend process");
+  MSG_process_suspend(MSG_process_self());
+  MSG_task_execute(MSG_task_create("toto", 1e9, 0, NULL));
+  XBT_INFO("Bye!");
+  return 0;
+}                               /* end_of_lazy_guy */
+
+static int master(int argc, char *argv[])
+{
+  m_process_t bob = NULL;
+
+  XBT_INFO("Hello!");
+  bob = MSG_process_create("slave", slave, NULL, MSG_get_host_by_name("bob"));
+  MSG_process_sleep(10.0);
+
+  XBT_INFO("Resume process");
+  MSG_process_resume(bob);
+
+  XBT_INFO("Kill process");
+  MSG_process_kill(bob);
+
+  XBT_INFO("OK, goodbye now.");
+  return 0;
+}                               /* end_of_dram_master */
+
+/** Test function */
+static MSG_error_t test_all(const char *platform_file,
+                            const char *application_file)
+{
+  MSG_error_t res = MSG_OK;
+
+  MSG_create_environment(platform_file);
+  MSG_function_register("master", master);
+  MSG_function_register("slave", slave);
+  MSG_launch_application(application_file);
+
+  res = MSG_main();
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+  return res;
+}                               /* end_of_test_all */
+
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+  MSG_error_t res = MSG_OK;
+
+  MSG_global_init(&argc, argv);
+  if (argc < 3) {
+    XBT_CRITICAL("Usage: %s platform_file deployment_file\n", argv[0]);
+    XBT_CRITICAL("example: %s msg_platform.xml msg_deployment_suspend.xml\n",
+              argv[0]);
+    exit(1);
+  }
+  test_all(argv[1], argv[2]);
+  res = MSG_clean();
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
diff --git a/examples/msg/masterslave/masterslave_kill.tesh b/examples/msg/masterslave/masterslave_kill.tesh
new file mode 100644 (file)
index 0000000..2db6f37
--- /dev/null
@@ -0,0 +1,12 @@
+#! ./tesh
+
+p Testing a simple master/slave example application
+
+$ $SG_TEST_EXENV masterslave/masterslave_kill$EXEEXT ${srcdir:=.}/masterslave/platform_kill.xml ${srcdir:=.}/masterslave/deployment_masterslave_kill.xml
+> [alice:master:(1) 0.000000] [msg_test/INFO] Hello!
+> [bob:slave:(2) 0.000000] [msg_test/INFO] Hello!
+> [bob:slave:(2) 0.000000] [msg_test/INFO] Suspend process
+> [alice:master:(1) 10.000000] [msg_test/INFO] Resume process
+> [alice:master:(1) 10.000000] [msg_test/INFO] Kill process
+> [alice:master:(1) 10.000000] [msg_test/INFO] OK, goodbye now.
+> [10.000000] [msg_test/INFO] Simulation time 10
\ No newline at end of file
index d37e755..f789f15 100644 (file)
@@ -68,10 +68,10 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   m_task_t task = NULL;
-  int res;
+  _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
-  int read;
+  _XBT_GNUC_UNUSED int read;
 
   read = sscanf(argv[1], "%d", &id);
   xbt_assert(read, "Invalid argument %s\n", argv[1]);
index 9461fe0..1cb2ee8 100644 (file)
@@ -2,8 +2,9 @@
 
 p Testing a simple master/slave example application
 
-$ $SG_TEST_EXENV ./masterslave/masterslave_mailbox ${srcdir:=.}/../platforms/multicore_machine.xml ${srcdir:=.}/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01_fullupdate
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01_fullupdate'
+$ $SG_TEST_EXENV ./masterslave/masterslave_mailbox ${srcdir:=.}/../platforms/multicore_machine.xml ${srcdir:=.}/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01 --cfg=cpu/optim:Full
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'Full'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 6 slaves and 20 tasks to process
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
index 314c967..c1a16d2 100644 (file)
@@ -5,7 +5,7 @@ p Testing a simple master/slave example application
 $ $SG_TEST_EXENV ./masterslave/masterslave_mailbox  ${srcdir:=.}/../platforms/vivaldi.xml ${srcdir:=.}/masterslave/deployment_masterslave_vivaldi.xml --cfg=network/latency_factor:1.0 --cfg=network/bandwidth_factor:1.0
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/latency_factor' to '1.0'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/bandwidth_factor' to '1.0'
-> [0.000000] [surf_parse/INFO] Configuration change: Set 'coordinates' to 'yes'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/coordinates' to 'yes'
 > [100030591:master:(1) 0.000000] [msg_test/INFO] Got 39 slaves and 20 tasks to process
 > [100030591:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
 > [100030591:master:(1) 0.046299] [msg_test/INFO] Sending "Task_1" (of 20) to mailbox "slave-1"
diff --git a/examples/msg/masterslave/platform_kill.xml b/examples/msg/masterslave/platform_kill.xml
new file mode 100644 (file)
index 0000000..38ce193
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+       <host id="bob" power="137333000"/>
+       <host id="alice" power="98095000"/>
+       
+       <link id="1" bandwidth="100000000" latency="0.001"/>
+       <link id="2" bandwidth="100000000" latency="0.001"/>
+       <link id="3" bandwidth="100000000" latency="0.001"/>
+       
+       <route  src="bob"
+                       dst="alice"
+                       symmetrical="YES">
+                               <link_ctn id="1"/>
+   </route>
+</AS>
+</platform>
\ No newline at end of file
index fc973a8..bb1853f 100644 (file)
@@ -12,7 +12,7 @@ require "simgrid"
   for i=10,0,-1 do
     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
    simgrid.AS.addRoute("AS0","Tremblay","Jupiter",{"1"});
    simgrid.AS.addRoute("AS0","Tremblay","Fafard",{"0","1","2","3","4","8"});
    simgrid.AS.addRoute("AS0","Tremblay","Ginette",{"3","4","5"});
@@ -42,11 +42,11 @@ require "simgrid"
    simgrid.msg_register_platform();
 
   --Set Application
-   simgrid.Host.setFunction{host="Tremblay",fct="master",args="20,550000000,1000000,4"};
-   simgrid.Host.setFunction{host="Bourassa",fct="slave",args="0"};
-   simgrid.Host.setFunction{host="Jupiter",fct="slave",args="1"};
-   simgrid.Host.setFunction{host="Fafard",fct="slave",args="2"};
-   simgrid.Host.setFunction{host="Ginette",fct="slave",args="3"};
+   simgrid.host.set_function{host="Tremblay",fct="master",args="20,550000000,1000000,4"};
+   simgrid.host.set_function{host="Bourassa",fct="slave",args="0"};
+   simgrid.host.set_function{host="Jupiter",fct="slave",args="1"};
+   simgrid.host.set_function{host="Fafard",fct="slave",args="2"};
+   simgrid.host.set_function{host="Ginette",fct="slave",args="3"};
    
   --Save Application 
    simgrid.msg_register_application(); 
index bc2e329..5cfb74f 100644 (file)
@@ -34,7 +34,7 @@ int coordinator(int argc, char *argv[])
         CS_used = 1;
       }
     } else {                    // that's a release. Check if someone was waiting for the lock
-      if (xbt_dynar_length(requests) > 0) {
+      if (!xbt_dynar_is_empty(requests)) {
         XBT_INFO("CS release. Grant to queued requests (queue size: %lu)",
               xbt_dynar_length(requests));
         char *req;
diff --git a/examples/msg/ns3/3hosts_2links_d.xml b/examples/msg/ns3/3hosts_2links_d.xml
new file mode 100644 (file)
index 0000000..3314218
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="a" function="master">
+      <argument value="100"/>
+      <argument value="c"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="c" function="slave">
+    <argument value="1"/>
+  </process>
+     
+</platform>
diff --git a/examples/msg/ns3/3hosts_2links_p.xml b/examples/msg/ns3/3hosts_2links_p.xml
new file mode 100644 (file)
index 0000000..0e6aa55
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <!--
+ a ______1______ b _____2_____ c
+
+ -->
+
+ <AS  id="AS0"  routing="Full">
+   <host id="a" power="1000000000"/>
+   <host id="b" power="1000000000"/>
+   <host id="c" power="1000000000"/>
+   <link id="1" bandwidth="1000" latency="0.01"/>
+   <link id="2" bandwidth="1000" latency="0.01"/>
+   <route src="a" dst="b">
+      <link_ctn id="1"/>
+   </route>
+   <route src="b" dst="c">
+      <link_ctn id="2"/>
+   </route>
+  
+ </AS>
+ </platform>
\ No newline at end of file
diff --git a/examples/msg/ns3/3links-d-timer.xml b/examples/msg/ns3/3links-d-timer.xml
new file mode 100644 (file)
index 0000000..9caa5cc
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="S1" function="master">
+      <argument value="100000"/>
+      <argument value="C1"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="C1" function="slave">
+    <argument value="1"/>
+  </process>
+
+  <process host="S2" function="master">
+      <argument value="1000000"/>
+      <argument value="C2"/>
+      <argument value="2"/>
+  </process>
+  
+  <process host="C2" function="slave">
+    <argument value="2"/>
+  </process>
+
+   
+  <process host="S3" function="master">
+      <argument value="2000000"/>
+      <argument value="C3"/>
+      <argument value="3"/>
+  </process>
+  
+  <process host="C3" function="slave">
+    <argument value="3"/>
+  </process>
+
+  <process host="S3" function="master" start_time="2.0">
+      <argument value="2000000"/>
+      <argument value="C3"/>
+      <argument value="4"/>
+  </process>
+  
+  <process host="C3" function="slave">
+    <argument value="4"/>
+  </process>
+
+  <process host="C3" function="timer">
+    <argument value="0"/>
+    <argument value=".1"/>
+  </process>
+
+  <process host="C3" function="timer" start_time="2.0">
+    <argument value="0"/>
+    <argument value=".1"/>
+  </process>
+</platform>
diff --git a/examples/msg/ns3/3links-d.xml b/examples/msg/ns3/3links-d.xml
new file mode 100644 (file)
index 0000000..40ddeba
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="S1" function="master">
+      <argument value="100000"/>
+      <argument value="C1"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="C1" function="slave">
+    <argument value="1"/>
+  </process>
+
+  <process host="S2" function="master">
+      <argument value="1000000"/>
+      <argument value="C2"/>
+      <argument value="2"/>
+  </process>
+  
+  <process host="C2" function="slave">
+    <argument value="2"/>
+  </process>
+
+   
+  <process host="S3" function="master">
+      <argument value="2000000"/>
+      <argument value="C3"/>
+      <argument value="3"/>
+  </process>
+  
+  <process host="C3" function="slave">
+    <argument value="3"/>
+  </process>
+
+<!--  <process host="C3" function="timer">
+    <argument value="0"/>
+    <argument value=".1"/>
+  </process>
+    --> 
+</platform>
diff --git a/examples/msg/ns3/3links-p.xml b/examples/msg/ns3/3links-p.xml
new file mode 100644 (file)
index 0000000..a7e6848
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <!--
+ S1 ______1______ C1
+ S2 _______2_____ C2
+ S3 ________3____ C3
+ -->
+       
+ <AS  id="AS0"  routing="Full">
+   <host id="S1" power="1000000000"/>
+   <host id="C1" power="1000000000"/>
+   <host id="S2" power="1000000000"/>
+   <host id="C2" power="1000000000"/>
+   <host id="S3" power="1000000000"/>
+   <host id="C3" power="1000000000"/>
+   <link id="1" bandwidth="1000000" latency="0.00001"/>
+   <link id="2" bandwidth="1000000" latency="0.00001"/>
+   <link id="3" bandwidth="1000000" latency="0.00001"/>
+   <route src="S1" dst="C1">
+      <link_ctn id="1"/>
+   </route>
+   <route src="S2" dst="C2">
+      <link_ctn id="2"/>
+   </route>
+   <route src="S3" dst="C3">
+      <link_ctn id="3"/>
+   </route>
+  
+ </AS>
+ </platform>
diff --git a/examples/msg/ns3/CMakeLists.txt b/examples/msg/ns3/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1111655
--- /dev/null
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(ns3 "ns3.c")
+
+### Add definitions for compile
+target_link_libraries(ns3 simgrid m )
+
diff --git a/examples/msg/ns3/One_cluster-d.xml b/examples/msg/ns3/One_cluster-d.xml
new file mode 100644 (file)
index 0000000..ff7e71f
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="c-2.me" function="master">
+      <argument value="100"/>
+      <argument value="c-6.me"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="c-6.me" function="slave">
+    <argument value="1"/>
+  </process>
+     
+</platform>
diff --git a/examples/msg/ns3/One_cluster.xml b/examples/msg/ns3/One_cluster.xml
new file mode 100644 (file)
index 0000000..5171642
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<!--              _________
+                               |              |
+                               |  router  |
+       ____________|__________|_____________ backbone
+         |   |   |              |     |   |    
+    l0|        l1|     l2|            l7|  l6 |   | l9
+      |          |       |   ........   |     |   |
+      |                                |
+   c-0.me                             c-9.me   
+-->
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-9"   power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+</AS>
+</platform>
diff --git a/examples/msg/ns3/Two_clusters-d.xml b/examples/msg/ns3/Two_clusters-d.xml
new file mode 100644 (file)
index 0000000..3b55cc9
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="c-3.me" function="master">
+      <argument value="100"/>
+      <argument value="c-16.me"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="c-16.me" function="slave">
+    <argument value="1"/>
+  </process>
+     
+</platform>
diff --git a/examples/msg/ns3/Two_clusters.xml b/examples/msg/ns3/Two_clusters.xml
new file mode 100644 (file)
index 0000000..0aa41ea
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<!--
+                                         __________________________________________________
+                  ____|_____                                                                                   |
+                               |              |                                                                                        |
+                               |  router1 |                                                                                    |
+       ____________|__________|_____________ csma1                                                     |
+         |   |   |              |     |   |                                                            |backbone
+    l0|        l1|     l2|            l7|   l8|   | l9                                                         |
+      |          |       |   ........   |     |   |                                                            |
+      |                                |                                                               |
+   c-0.me                             c-9.me                           |
+                     ___________________________________________________|
+                                 ___|______
+                               |              |
+                               |  router2 |
+       ____________|__________|_____________ csma2
+        |    |    |               |     |   |          
+ l10 | l11|       |            l17|  l18|   | l19
+     |   |        |   ........    |     |   |
+     |                                   |
+   c-10.me                              c-19.me        
+-->
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+               radical="0-9"   power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+               
+  <cluster id="my_cluster_2" prefix="c-" suffix=".me"
+           radical="10-19" power="1000000000"  bw="125000000"  lat="5E-5"
+           bb_bw="2250000000" bb_lat="5E-4"/>  
+       
+     <link id="backbone" bandwidth="1250000000" latency="5E-4"/>  
+       
+     <ASroute src="my_cluster_1" dst="my_cluster_2" 
+        gw_src="c-my_cluster_1_router.me" 
+        gw_dst="c-my_cluster_2_router.me">
+               <link_ctn id="backbone"/>
+     </ASroute>   
+     <ASroute src="my_cluster_2" dst="my_cluster_1" 
+        gw_src="c-my_cluster_2_router.me" 
+        gw_dst="c-my_cluster_1_router.me">
+               <link_ctn id="backbone"/>
+     </ASroute> 
+</AS>
+</platform>
diff --git a/examples/msg/ns3/dogbone-d.xml b/examples/msg/ns3/dogbone-d.xml
new file mode 100644 (file)
index 0000000..6ccc284
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+  <process host="S1" function="master">
+      <argument value="20000000"/>
+      <argument value="C1"/>
+      <argument value="0"/>
+  </process>
+
+  <process host="S2" function="master">
+      <argument value="20000000"/>
+      <argument value="C2"/>
+      <argument value="1"/>
+  </process>
+
+  <process host="C1" function="slave">
+      <argument value="0"/>
+  </process>
+  <process host="C2" function="slave">
+      <argument value="1"/>
+  </process>
+</platform>
diff --git a/examples/msg/ns3/dogbone-p.xml b/examples/msg/ns3/dogbone-p.xml
new file mode 100644 (file)
index 0000000..08eb81c
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3"> 
+ <AS  id="AS0"  routing="Full">
+ <!---  dogbone
+ -->
+   <host id="S1" power="1000000000"/>
+   <host id="C1" power="1000000000"/>
+   <host id="S2" power="1000000000"/>
+   <host id="C2" power="1000000000"/>
+   <router id="R1"/>
+   <router id="R2"/>
+   <link id="1" bandwidth="100000000" latency="0.00001"/>
+   <link id="2" bandwidth="10000000"  latency="0.00001"/>
+   <link id="3" bandwidth="100000000" latency="0.00001"/>
+   <link id="4" bandwidth="100000000" latency="0.00001"/>
+   <link id="5" bandwidth="100000000" latency="0.00001"/>
+   <route src="S1" dst="C1">
+      <link_ctn id="1"/>
+      <link_ctn id="2"/>
+      <link_ctn id="3"/>
+   </route>
+   <route src="S2" dst="C2">
+      <link_ctn id="4"/>
+      <link_ctn id="2"/>
+      <link_ctn id="5"/>
+   </route>
+   <route src="S1" dst="C2">
+      <link_ctn id="1"/>
+      <link_ctn id="2"/>
+      <link_ctn id="5"/>
+   </route>
+   <route src="S2" dst="C1">
+      <link_ctn id="4"/>
+      <link_ctn id="2"/>
+      <link_ctn id="3"/>
+   </route>
+   <route src="S1" dst="R1">
+      <link_ctn id="1"/>
+   </route>
+   <route src="R1" dst="R2">
+      <link_ctn id="2"/>
+   </route>
+   <route src="R2" dst="C1">
+      <link_ctn id="3"/>
+   </route>
+   <route src="S2" dst="R1">
+      <link_ctn id="4"/>
+   </route>
+   <route src="R2" dst="C2">
+      <link_ctn id="5"/>
+   </route>
+ </AS>
+ </platform>
diff --git a/examples/msg/ns3/ns3.c b/examples/msg/ns3/ns3.c
new file mode 100644 (file)
index 0000000..d0c7456
--- /dev/null
@@ -0,0 +1,214 @@
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "msg/msg.h"
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+                             "Messages specific for this msg example");
+
+int master(int argc, char *argv[]);
+int slave(int argc, char *argv[]);
+int timer(int argc, char *argv[]);
+MSG_error_t test_all(const char *platform_file,
+                     const char *application_file);
+
+int timer_start; //set as 1 in the master process
+
+typedef enum {
+  PORT_22 = 0,
+  MAX_CHANNEL
+} channel_t;
+
+//keep a pointer to all surf running tasks.
+#define NTASKS 1500
+int bool_printed = 0;
+double start_time, end_time, elapsed_time;
+double gl_data_size[NTASKS];
+m_task_t gl_task_array[NTASKS];
+const char *slavenames[NTASKS];
+const char *masternames[NTASKS];
+int gl_task_array_id = 0;
+int count_finished = 0;
+
+#define FINALIZE ((void*)221297)        /* a magic number to tell people to stop working */
+
+/** master */
+int master(int argc, char *argv[])
+{
+  char *slavename = NULL;
+  double task_comm_size = 0;
+  m_task_t todo;
+  char id_alias[10];
+  //unique id to control statistics
+  int id = -1;
+
+  xbt_assert(argc==4,"Strange number of arguments expected 3 got %d", argc - 1);
+
+  XBT_DEBUG ("Master started");
+
+  /* data size */
+  int read;
+  read = sscanf(argv[1], "%lg", &task_comm_size);
+  xbt_assert(read, "Invalid argument %s\n", argv[1]);
+
+  /* slave name */
+  slavename = argv[2];
+  id = atoi(argv[3]);
+  sprintf(id_alias, "flow_%d", id);
+  slavenames[id] = slavename;
+  TRACE_category(id_alias);
+
+  masternames[id] = MSG_host_get_name(MSG_host_self());
+
+  {                             /*  Task creation.  */
+    char sprintf_buffer[64] = "Task_0";
+    todo = MSG_task_create(sprintf_buffer, 100*task_comm_size, task_comm_size, NULL);
+    TRACE_msg_set_task_category(todo, id_alias);
+    //keep track of running tasks
+    gl_task_array[id] = todo;
+    gl_data_size[id] = task_comm_size;
+  }
+
+  {                             /* Process organisation */
+    MSG_get_host_by_name(slavename);
+  }
+
+  count_finished++;
+  timer_start = 1 ;
+
+  /* time measurement */
+  sprintf(id_alias, "%d", id);
+  start_time = MSG_get_clock();
+  //MSG_task_execute(todo);
+  MSG_task_send(todo, id_alias);
+  end_time = MSG_get_clock();
+
+  XBT_DEBUG ("Finished");
+  return 0;
+}                               /* end_of_master */
+
+
+/** Timer function  */
+int timer(int argc, char *argv[])
+{
+  double sleep_time;
+  double first_sleep;
+
+  xbt_assert(argc==3,"Strange number of arguments expected 2 got %d", argc - 1);
+
+  sscanf(argv[1], "%lf", &first_sleep);
+  sscanf(argv[2], "%lf", &sleep_time);
+
+  XBT_DEBUG ("Timer started");
+
+  if(first_sleep){
+      MSG_process_sleep(first_sleep);
+  }
+
+  do {
+    XBT_DEBUG ("Get sleep");
+      MSG_process_sleep(sleep_time);
+  } while(timer_start);
+
+  XBT_DEBUG ("Finished");
+  return 0;
+}
+
+/** Receiver function  */
+int slave(int argc, char *argv[])
+{
+
+  m_task_t task = NULL;
+  int a = MSG_OK;
+  int id = 0;
+  char id_alias[10];
+
+  xbt_assert(argc==2,"Strange number of arguments expected 1 got %d", argc - 1);
+
+  XBT_DEBUG ("Slave started");
+
+  id = atoi(argv[1]);
+  sprintf(id_alias, "%d", id);
+
+  a = MSG_task_receive(&(task), id_alias);
+
+  count_finished--;
+  if(count_finished == 0){
+      timer_start = 0;
+  }
+
+
+
+  if (a != MSG_OK) {
+    XBT_INFO("Hey?! What's up?");
+    xbt_die("Unexpected behavior.");
+  }
+
+  elapsed_time = MSG_get_clock() - start_time;
+  
+  XBT_INFO("FLOW[%d] : Receive %.0f bytes from %s to %s",
+                 id,
+                 MSG_task_get_data_size(task),
+       masternames[id],
+       slavenames[id]);
+//  MSG_task_execute(task);
+  MSG_task_destroy(task);
+
+  XBT_DEBUG ("Finished");
+  return 0;
+}                               /* end_of_slave */
+
+/** Test function */
+MSG_error_t test_all(const char *platform_file,
+                     const char *application_file)
+{
+  MSG_error_t res = MSG_OK;
+
+  /* MSG_config("workstation/model", "GTNETS"); */
+  /* MSG_config("workstation/model","KCCFLN05"); */
+  {                             /*  Simulation setting */
+    MSG_set_channel_number(MAX_CHANNEL);
+    MSG_create_environment(platform_file);
+  }
+
+  TRACE_declare_mark("endmark");
+
+  {                             /*   Application deployment */
+    MSG_function_register("master", master);
+    MSG_function_register("slave", slave);
+    MSG_function_register("timer", timer);
+
+    MSG_launch_application(application_file);
+  }
+  res = MSG_main();
+  return res;
+}                               /* end_of_test_all */
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+  MSG_error_t res = MSG_OK;
+  bool_printed = 0;
+
+  MSG_global_init(&argc, argv);
+  if (argc < 3) {
+    printf("Usage: %s platform_file deployment_file\n", argv[0]);
+    exit(1);
+  }
+
+  res = test_all(argv[1], argv[2]);
+
+  MSG_clean();
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
diff --git a/examples/msg/ns3/ns3.tesh b/examples/msg/ns3/ns3.tesh
new file mode 100644 (file)
index 0000000..f9770e3
--- /dev/null
@@ -0,0 +1,41 @@
+#! ./tesh
+
+p 3hosts 2links
+
+$ ns3/ns3 ${srcdir:=.}/ns3/3hosts_2links_p.xml ${srcdir:=.}/ns3/3hosts_2links_d.xml --cfg=network/model:NS3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [c:slave:(2) 0.700000] [msg_test/INFO] FLOW[1] : Receive 100 bytes from a to c
+
+p 6hosts 3links
+
+$ ns3/ns3 ${srcdir:=.}/ns3/3links-p.xml ${srcdir:=.}/ns3/3links-d.xml --cfg=network/model:NS3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [C1:slave:(2) 0.104428] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from S1 to C1
+> [C2:slave:(4) 1.041346] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from S2 to C2
+> [C3:slave:(6) 2.082380] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from S3 to C3
+
+
+$ ns3/ns3 ${srcdir:=.}/ns3/3links-p.xml ${srcdir:=.}/ns3/3links-d-timer.xml --cfg=network/model:NS3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [C1:slave:(2) 0.104428] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from S1 to C1
+> [C2:slave:(4) 1.041346] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from S2 to C2
+> [C3:slave:(6) 2.082422] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from S3 to C3
+> [C3:slave:(7) 4.164594] [msg_test/INFO] FLOW[4] : Receive 2000000 bytes from S3 to C3
+
+
+p One cluster
+
+$ ns3/ns3 ${srcdir:=.}/ns3/One_cluster.xml ${srcdir:=.}/ns3/One_cluster-d.xml --cfg=network/model:NS3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [c-6.me:slave:(2) 0.006614] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-2.me to c-6.me
+
+p Two clusters
+
+$ ns3/ns3 ${srcdir:=.}/ns3/Two_clusters.xml ${srcdir:=.}/ns3/Two_clusters-d.xml --cfg=network/model:NS3
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [c-16.me:slave:(2) 0.012453] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-3.me to c-16.me
index 80fe67b..03c5b94 100644 (file)
@@ -49,7 +49,7 @@ int execute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[argc - 2], "%lg", &computation_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 2]);
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
@@ -105,7 +105,7 @@ int redistribute(int argc, char *argv[])
                 "Unknown host %s. Stopping Now! ", argv[i]);
   }
 
-  int read;
+  _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[argc - 1], "%lg", &communication_amount);
   xbt_assert(read, "Invalid argument %s\n", argv[argc - 1]);
   computation_duration = (double *) calloc(host_list_size, sizeof(double));
index 9c5eb23..48aaeaf 100644 (file)
@@ -20,7 +20,7 @@ static int test(int argc, char *argv[])
   double priority = 1.0;
   m_task_t task = NULL;
 
-  int res = sscanf(argv[1], "%lg", &computation_amount);
+  _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &computation_amount);
   xbt_assert(res, "Invalid argument %s\n", argv[1]);
   res = sscanf(argv[2], "%lg", &priority);
   xbt_assert(res, "Invalid argument %s\n", argv[2]);
index 6c98230..54e735b 100644 (file)
@@ -7,4 +7,6 @@
   <process host="host1" function="bob">
     <prop id="SomeProp" value="SomeValue"/>
   </process>
+  
+  <process host="host2" function="carole" />
 </platform>
index cf65df3..5f33de9 100644 (file)
@@ -18,14 +18,15 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test");
 
 int alice(int argc, char *argv[]);
 int bob(int argc, char *argv[]);
+int carole(int argc, char *argv[]);
 int forwarder(int argc, char *argv[]);
 MSG_error_t test_all(const char *platform_file,
                      const char *application_file);
 
-int alice(int argc, char *argv[])
+static void test_host(const char*hostname) 
 {
-  m_host_t host1 = MSG_get_host_by_name("host1");
-  xbt_dict_t props = MSG_host_get_properties(host1);
+  m_host_t thehost = MSG_get_host_by_name(hostname);
+  xbt_dict_t props = MSG_host_get_properties(thehost);
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
   const char *noexist = "Unknown";
@@ -37,11 +38,11 @@ int alice(int argc, char *argv[])
       XBT_INFO("  Host property: '%s' -> '%s'", key, data);
 
   XBT_INFO("== Try to get a host property that does not exist");
-  value = MSG_host_get_property_value(host1, noexist);
+  value = MSG_host_get_property_value(thehost, noexist);
   xbt_assert(!value, "The key exists (it's not supposed to)");
 
   XBT_INFO("== Try to get a host property that does exist");
-  value = MSG_host_get_property_value(host1, exist);
+  value = MSG_host_get_property_value(thehost, exist);
   xbt_assert(value, "\tProperty %s is undefined (where it should)",
               exist);
   xbt_assert(!strcmp(value, "180"),
@@ -50,16 +51,27 @@ int alice(int argc, char *argv[])
   XBT_INFO("   Property: %s old value: %s", exist, value);
 
   XBT_INFO("== Trying to modify a host property");
-  xbt_dict_set(props, exist, xbt_strdup("250"), xbt_free_f);
+  xbt_dict_set(props, exist, xbt_strdup("250"), NULL);
 
   /* Test if we have changed the value */
-  value = MSG_host_get_property_value(host1, exist);
+  value = MSG_host_get_property_value(thehost, exist);
   xbt_assert(value, "Property %s is undefined (where it should)", exist);
   xbt_assert(!strcmp(value, "250"),
               "Value of property %s is defined to %s (where it should be 250)",
               exist, value);
   XBT_INFO("   Property: %s old value: %s", exist, value);
+   
+  /* Restore the value for the next test */
+  xbt_dict_set(props, exist, xbt_strdup("180"), NULL);
+}
 
+int alice(int argc, char *argv[]) { /* Dump what we have on the current host */
+  test_host("host1");
+  return 0;
+}
+int carole(int argc, char *argv[]) {/* Dump what we have on a remote host */
+  MSG_process_sleep(1); // Wait for alice to be done with its experiment
+  test_host("host1");
   return 0;
 }
 
@@ -70,7 +82,7 @@ int bob(int argc, char *argv[])
   xbt_dict_cursor_t cursor = NULL;
   char *key, *data;
   const char *noexist = "UnknownProcessProp";
-  const char *value;
+  _XBT_GNUC_UNUSED const char *value;
 
   XBT_INFO("== Print the properties of the process");
   xbt_dict_foreach(props, cursor, key, data)
@@ -90,6 +102,7 @@ MSG_error_t test_all(const char *platform_file,
 {
   MSG_function_register("alice", alice);
   MSG_function_register("bob", bob);
+  MSG_function_register("carole", carole);
 
   MSG_create_environment(platform_file);
   MSG_launch_application(application_file);
index bb65d1a..826705b 100644 (file)
@@ -15,3 +15,11 @@ $ $SG_TEST_EXENV properties/msg_prop$EXEEXT ${srcdir:=.}/../platforms/prop.xml $
 > [  0.000000] (2:bob@host1) == Print the properties of the process
 > [  0.000000] (2:bob@host1)    Process property: SomeProp -> SomeValue
 > [  0.000000] (2:bob@host1) == Try to get a process property that does not exist
+> [  1.000000] (3:carole@host2) == Print the properties of the host
+> [  1.000000] (3:carole@host2)   Host property: 'SG_TEST_Hdd' -> '180'
+> [  1.000000] (3:carole@host2)   Host property: 'SG_TEST_mem' -> '4'
+> [  1.000000] (3:carole@host2) == Try to get a host property that does not exist
+> [  1.000000] (3:carole@host2) == Try to get a host property that does exist
+> [  1.000000] (3:carole@host2)    Property: SG_TEST_Hdd old value: 180
+> [  1.000000] (3:carole@host2) == Trying to modify a host property
+> [  1.000000] (3:carole@host2)    Property: SG_TEST_Hdd old value: 250
index 22cdfcf..a5832ef 100644 (file)
@@ -1,22 +1,22 @@
 #! ./tesh
 
-p Testing the surf network maxmin fairness model
+p Testing the deprecated CM02 network model
 
 ! output sort
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/sendrecv/platform_sendrecv.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03 --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'CLM03'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/sendrecv/platform_sendrecv.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+>  [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) test_all
+> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [  0.000000] (1:sender@Inmos) sender
 > [  0.000000] (1:sender@Inmos) host = Bellevue
 > [  0.000000] (1:sender@Inmos) task_la->data = 0.000000e+00
 > [  0.000000] (2:receiver@Bellevue) receiver
-> [  1.040100] (1:sender@Inmos) task_bw->data = 1.040100e+00
-> [  1.040100] (2:receiver@Bellevue) Task received : latency task
-> [  1.040100] (2:receiver@Bellevue) Communic. time 1.040100e+00
-> [  1.040100] (2:receiver@Bellevue) --- la 1.040100 ----
-> [10002.080100] (0:@) Total simulation time: 1.000208e+04
-> [10002.080100] (2:receiver@Bellevue) Task received : bandwidth task
-> [10002.080100] (2:receiver@Bellevue) Communic. time 1.000104e+04
-> [10002.080100] (2:receiver@Bellevue) --- bw 99989.601081 ----
\ No newline at end of file
+> [  0.100100] (1:sender@Inmos) task_bw->data = 1.001000e-01
+> [  0.100100] (2:receiver@Bellevue) Task received : latency task
+> [  0.100100] (2:receiver@Bellevue) Communic. time 1.001000e-01
+> [  0.100100] (2:receiver@Bellevue) --- la 0.100100 ----
+> [10000.200100] (0:@) Total simulation time: 1.000020e+04
+> [10000.200100] (2:receiver@Bellevue) Task received : bandwidth task
+> [10000.200100] (2:receiver@Bellevue) Communic. time 1.000010e+04
+> [10000.200100] (2:receiver@Bellevue) --- bw 99999.000010 ----
\ No newline at end of file
index 4c2f861..e58029b 100644 (file)
@@ -2,8 +2,7 @@
 
 p Testing the surf network maxmin fairness model
 
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/sendrecv/platform_sendrecv.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml --cfg=workstation/model:CLM03
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'CLM03'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/sendrecv/platform_sendrecv.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml
 > [0.000000] [msg_test/INFO] test_all
 > [Inmos:sender:(1) 0.000000] [msg_test/INFO] sender
 > [Inmos:sender:(1) 0.000000] [msg_test/INFO] host = Bellevue
index 305945b..8cdf4e9 100644 (file)
 #include "msg/msg.h"
 #include "surf/surf_private.h"
 
-extern routing_global_t global_routing;
-int totalHosts= 0;
-const m_host_t *hosts;
-
-int master(int argc, char *argv[]);
-int slave(int argc, char *argv[]);
+int host(int argc, char *argv[]);
+unsigned int task_comp_size = 50000000;
+unsigned int task_comm_size = 1000000;
+int number_of_hosts;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(ring,
                              "Messages specific for this msg example");
 
-int master(int argc, char *argv[])
-{
-       m_task_t task_s = NULL;
-       m_task_t task_r = NULL;
-       unsigned int task_comp_size = 50000000;
-       unsigned int task_comm_size = 1000000;
-       char mailbox[80];
-       char buffer[20];
-       int num = atoi(argv[1]);
-
-    sprintf(mailbox, "host%d", num+1);
-    if(num == totalHosts-1)
-       sprintf(mailbox, "host%d", 0);
-    sprintf(buffer, "Token");
-
-    task_s = MSG_task_create(buffer,
-                                                       task_comp_size,
-                                                       task_comm_size,
-                                                       NULL);
-    MSG_task_send(task_s,mailbox);
-    XBT_INFO("Send Data to \"%s\"", mailbox);
-
-       sprintf(mailbox, "host%d", num);
-       MSG_task_receive(&(task_r), mailbox);
-       XBT_INFO("Received \"%s\"", MSG_task_get_name(task_r));
-       return 0;
-}
-
-int slave(int argc, char *argv[])
-{
-       m_task_t task_s = NULL;
-       m_task_t task_r = NULL;
-       unsigned int task_comp_size = 50000000;
-       unsigned int task_comm_size = 1000000;
-       char mailbox[80];
-       char buffer[20];
-       int num = atoi(argv[1]);
-
-       sprintf(mailbox, "host%d", num);
-       MSG_task_receive(&(task_r), mailbox);
-       XBT_INFO("Received \"%s\"", MSG_task_get_name(task_r));
-       sprintf(mailbox, "host%d", num+1);
-       if(num == totalHosts-1)
-               sprintf(mailbox, "host%d", 0);
-       sprintf(buffer, "Token");
-       task_s = MSG_task_create(buffer,
-                                                       task_comp_size,
-                                                       task_comm_size,
-                                                       NULL);
-       MSG_task_send(task_s, mailbox);
-       XBT_INFO("Send Data to \"%s\"", mailbox);
-
-       return 0;
-}
-
-static int surf_parse_bypass_application(void)
+int host(int argc, char *argv[])
 {
-       int i;
-       static int AX_ptr;
-       static int surfxml_bufferstack_size = 2048;
-       static int surfxml_buffer_stack_stack_ptr = 0;
-       static int surfxml_buffer_stack_stack[1024];
-       /* allocating memory to the buffer, I think 2MB should be enough */
-       surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
-
-       totalHosts = MSG_get_host_number();
-       hosts = MSG_get_host_table();
-
-       /* <platform> */
-       SURFXML_BUFFER_SET(platform_version, "3");
-
-       SURFXML_START_TAG(platform);
-
-       XBT_DEBUG("process : %s en master",MSG_host_get_name(hosts[0]));
-       /*   <process host="host A" function="master"> */
-       SURFXML_BUFFER_SET(process_host, MSG_host_get_name(hosts[0]));
-       SURFXML_BUFFER_SET(process_function, "master");
-       SURFXML_BUFFER_SET(process_start_time, "-1.0");
-       SURFXML_BUFFER_SET(process_kill_time, "-1.0");
-       SURFXML_START_TAG(process);
-
-       /*      <argument value="0"/> */
-       SURFXML_BUFFER_SET(argument_value, "0");
-       SURFXML_START_TAG(argument);
-       SURFXML_END_TAG(argument);
-       SURFXML_END_TAG(process);
-
-       for(i=1;i<totalHosts;i++)
-       {
-       XBT_DEBUG("process : %s en slave",MSG_host_get_name(hosts[i]));
-       /*   <process host="host A" function="slave"> */
-       SURFXML_BUFFER_SET(process_host,MSG_host_get_name(hosts[i]) );
-       SURFXML_BUFFER_SET(process_function, "slave");
-       SURFXML_BUFFER_SET(process_start_time, "-1.0");
-       SURFXML_BUFFER_SET(process_kill_time, "-1.0");
-       SURFXML_START_TAG(process);
-
-       /*      <argument value="num"/> */
-       SURFXML_BUFFER_SET(argument_value, bprintf("%d",i));
-       SURFXML_START_TAG(argument);
-       SURFXML_END_TAG(argument);
-       SURFXML_END_TAG(process);
-       }
-       /* </platform> */
-       SURFXML_END_TAG(platform);
-
-       free(surfxml_bufferstack);
-       return 0;
+  int host_number = atoi(MSG_process_get_name(MSG_process_self()));
+  char mailbox[256];
+  m_task_t task = NULL;
+  _XBT_GNUC_UNUSED int res;
+
+  if (host_number == 0){ //master  send then receive
+    sprintf(mailbox, "%d", host_number+1);
+    task = MSG_task_create("Token", task_comp_size, task_comm_size, NULL);
+    XBT_INFO("Host \"%d\" send '%s' to Host \"%s\"",host_number,task->name,mailbox);
+    MSG_task_send(task, mailbox);
+    task = NULL;
+    res = MSG_task_receive(&(task), MSG_process_get_name(MSG_process_self()));
+    xbt_assert(res == MSG_OK, "MSG_task_get failed");
+    XBT_INFO("Host \"%d\" received \"%s\"",host_number, MSG_task_get_name(task));
+    MSG_task_destroy(task);
+  }
+  else{ //slave receive then send
+    res = MSG_task_receive(&(task), MSG_process_get_name(MSG_process_self()));
+    xbt_assert(res == MSG_OK, "MSG_task_get failed");
+    XBT_INFO("Host \"%d\" received \"%s\"",host_number, MSG_task_get_name(task));
+
+    if(host_number+1 == number_of_hosts )
+      sprintf(mailbox, "0");
+    else
+      sprintf(mailbox, "%d", host_number+1);
+    XBT_INFO("Host \"%d\" send '%s' to Host \"%s\"",host_number,task->name,mailbox);
+    MSG_task_send(task, mailbox);
+  }
+  return 0;
 }
 
 typedef enum {
@@ -136,22 +57,26 @@ typedef enum {
 
 int main(int argc, char **argv)
 {
-       int res;
+       int i,res;
   MSG_global_init(&argc, argv);
   MSG_set_channel_number(MAX_CHANNEL);
   MSG_create_environment(argv[1]);
-
-  MSG_function_register("master", master);
-  MSG_function_register("slave", slave);
-  surf_parse = surf_parse_bypass_application;
-  MSG_launch_application(NULL);
+  m_host_t *host_table =  MSG_get_host_table();
+  number_of_hosts = MSG_get_host_number();
+  MSG_function_register("host", host);
+
+  XBT_INFO("Number of host '%d'",number_of_hosts);
+  for(i = 0 ; i<number_of_hosts; i++)
+  {
+    char* name_host = bprintf("%d",i);
+    MSG_process_create( name_host, host, NULL, host_table[i] );
+    free(name_host);
+  }
+  xbt_free(host_table);
 
   res = MSG_main();
-
   XBT_INFO("Simulation time %g", MSG_get_clock());
-
   MSG_clean();
-
   if (res == MSG_OK)
     return 0;
   else
index 8263239..e66bf68 100644 (file)
@@ -1,36 +1,34 @@
 #! ./tesh
 
-! output sort
-$ $SG_TEST_EXENV token_ring ${srcdir:=.}/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
-> [  0.066240] (1:master@bob1.hamburger.edu) Send Data to "host1"
-> [  0.066240] (2:slave@bob3.hamburger.edu) Received "Token"
-> [  0.242880] (2:slave@bob3.hamburger.edu) Send Data to "host2"
-> [  0.242880] (3:slave@alice2.crepe.fr) Received "Token"
-> [  0.309120] (3:slave@alice2.crepe.fr) Send Data to "host3"
-> [  0.309120] (4:slave@alice3.crepe.fr) Received "Token"
-> [  0.485760] (4:slave@alice3.crepe.fr) Send Data to "host4"
-> [  0.485760] (5:slave@bob0.hamburger.edu) Received "Token"
-> [  0.552000] (5:slave@bob0.hamburger.edu) Send Data to "host5"
-> [  0.552000] (6:slave@bob2.hamburger.edu) Received "Token"
-> [  0.618240] (6:slave@bob2.hamburger.edu) Send Data to "host6"
-> [  0.618240] (7:slave@bob4.hamburger.edu) Received "Token"
-> [  0.794880] (7:slave@bob4.hamburger.edu) Send Data to "host7"
-> [  0.794880] (8:slave@alice0.crepe.fr) Received "Token"
-> [  0.861120] (8:slave@alice0.crepe.fr) Send Data to "host8"
-> [  0.861120] (9:slave@alice4.crepe.fr) Received "Token"
-> [  0.927360] (10:slave@alice1.crepe.fr) Received "Token"
-> [  0.927360] (9:slave@alice4.crepe.fr) Send Data to "host9"
+$ $SG_TEST_EXENV ${bindir:=.}/token_ring ${srcdir:=.}/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Number of host '10'
+> [  0.000000] (1:0@bob1.hamburger.edu) Host "0" send 'Token' to Host "1"
+> [  0.066240] (2:1@bob3.hamburger.edu) Host "1" received "Token"
+> [  0.066240] (2:1@bob3.hamburger.edu) Host "1" send 'Token' to Host "2"
+> [  0.242880] (3:2@alice2.crepe.fr) Host "2" received "Token"
+> [  0.242880] (3:2@alice2.crepe.fr) Host "2" send 'Token' to Host "3"
+> [  0.309120] (4:3@alice3.crepe.fr) Host "3" received "Token"
+> [  0.309120] (4:3@alice3.crepe.fr) Host "3" send 'Token' to Host "4"
+> [  0.485760] (5:4@bob0.hamburger.edu) Host "4" received "Token"
+> [  0.485760] (5:4@bob0.hamburger.edu) Host "4" send 'Token' to Host "5"
+> [  0.552000] (6:5@bob2.hamburger.edu) Host "5" received "Token"
+> [  0.552000] (6:5@bob2.hamburger.edu) Host "5" send 'Token' to Host "6"
+> [  0.618240] (7:6@bob4.hamburger.edu) Host "6" received "Token"
+> [  0.618240] (7:6@bob4.hamburger.edu) Host "6" send 'Token' to Host "7"
+> [  0.794880] (8:7@alice0.crepe.fr) Host "7" received "Token"
+> [  0.794880] (8:7@alice0.crepe.fr) Host "7" send 'Token' to Host "8"
+> [  0.861120] (9:8@alice4.crepe.fr) Host "8" received "Token"
+> [  0.861120] (9:8@alice4.crepe.fr) Host "8" send 'Token' to Host "9"
+> [  0.927360] (10:9@alice1.crepe.fr) Host "9" received "Token"
+> [  0.927360] (10:9@alice1.crepe.fr) Host "9" send 'Token' to Host "0"
+> [  1.104000] (1:0@bob1.hamburger.edu) Host "0" received "Token"
 > [  1.104000] (0:@) Simulation time 1.104
-> [  1.104000] (10:slave@alice1.crepe.fr) Send Data to "host0"
-> [  1.104000] (1:master@bob1.hamburger.edu) Received "Token"
 
-! output sort
-$ $SG_TEST_EXENV token_ring ${srcdir:=.}/two_peers.xml --cfg=coordinates:yes "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n"
-> [    0.000000] (0:@) Configuration change: Set 'coordinates' to 'yes'
-> [    0.000000] (0:@) Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
-> [    5.221778] (1:master@peer_100030591) Send Data to "host1"
-> [    5.221778] (2:slave@peer_100036570) Received "Token"
-> [   10.443556] (0:@) Simulation time 10.4436
-> [   10.443556] (1:master@peer_100030591) Received "Token"
-> [   10.443556] (2:slave@peer_100036570) Send Data to "host0"
\ No newline at end of file
+$ $SG_TEST_EXENV ${bindir:=.}/token_ring ${srcdir:=.}/two_peers.xml --cfg=network/coordinates:yes "--log=root.fmt:[%12.6r]%e(%i:%P@%h)%e%m%n"
+> [    0.000000] (0:@) Configuration change: Set 'network/coordinates' to 'yes'
+> [    0.000000] (0:@) Number of host '2'
+> [    0.000000] (1:0@peer_100030591) Host "0" send 'Token' to Host "1"
+> [    5.221778] (2:1@peer_100036570) Host "1" received "Token"
+> [    5.221778] (2:1@peer_100036570) Host "1" send 'Token' to Host "0"
+> [   10.443556] (1:0@peer_100030591) Host "0" received "Token"
+> [   10.443556] (0:@) Simulation time 10.4436
\ No newline at end of file
index 3df7e62..a1ea5cc 100644 (file)
@@ -3,10 +3,11 @@
 p Testing trace integration using file.trace and test1.xml, a < max(time), b < max(time)
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 10.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 10.000000] (1:test_trace@CPU1) Task size: 400.000000
 > [ 10.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -15,10 +16,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test1.
 p Testing trace integration using file.trace and test2.xml, a < max(time), max(time) < b < 2 max(time) 
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 10.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 10.000000] (1:test_trace@CPU1) Task size: 850.000000
 > [ 10.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -28,10 +30,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test2.
 p Testing trace integration using file.trace and test3.xml, a < max(time), b > 2 max(time) 
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test3.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 10.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 10.000000] (1:test_trace@CPU1) Task size: 1980.000000
 > [ 10.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -40,10 +43,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test3.
 p Testing trace integration using file.trace and test4.xml, max(time) < a < 2max(time), max(time) < b < 2max(time)
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test4.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 80.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 80.000000] (1:test_trace@CPU1) Task size: 400.000000
 > [ 80.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -52,10 +56,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test4.
 p Testing trace integration using file.trace and test5.xml, max(time) < a < 2max(time), 2max(time) < b < 3max(time)
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 90.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 90.000000] (1:test_trace@CPU1) Task size: 850.000000
 > [ 90.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -64,10 +69,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test5.
 p Testing trace integration using file.trace and test6.xml, max(time) < a < 2max(time), b > 3max(time)
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test6.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 80.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 80.000000] (1:test_trace@CPU1) Task size: 1980.000000
 > [ 80.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -76,10 +82,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test6.
 p Testing trace integration using file.trace and test7.xml, two process with same priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test7.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 10.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 10.000000] (1:test_trace@CPU1) Task size: 400.000000
 > [ 10.000000] (1:test_trace@CPU1) Task prio: 1.500000
@@ -92,10 +99,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test7.
 p Testing trace integration using file.trace and test8.xml, two process with different priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test8.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [ 10.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [ 10.000000] (1:test_trace@CPU1) Task size: 400.000000
 > [ 10.000000] (1:test_trace@CPU1) Task prio: 2.500000
@@ -108,10 +116,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test8.
 p Testing trace integration using file.trace and test9.xml, three process with same priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test9.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [  0.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [  0.000000] (1:test_trace@CPU1) Task size: 400.000000
 > [  0.000000] (1:test_trace@CPU1) Task prio: 1.000000
@@ -128,10 +137,11 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test9.
 p Testing trace integration using file.trace and test10.xml, three process with different priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test10.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
+> [  0.000000] (0:@) Ignoring redefinition of trace trace/file.trace
 > [  0.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [  0.000000] (1:test_trace@CPU1) Task size: 420.000000
 > [  0.000000] (1:test_trace@CPU1) Task prio: 2.000000
@@ -148,10 +158,10 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test10
 p Testing trace integration using file.trace and test11.xml, three process with different priority. Changed timestep to 0.1.
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/model:CpuTI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/trace/test_trace_integration$EXEEXT ./trace/test11.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
-> [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'CpuTI'
+> [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:test_trace@CPU1) Testing the trace integration cpu model: CpuTI
 > [  0.000000] (1:test_trace@CPU1) Task size: 420.000000
 > [  0.000000] (1:test_trace@CPU1) Task prio: 2.000000
index ece8cb6..b6e08d8 100644 (file)
@@ -31,7 +31,7 @@ $ cat tracing/categories.trace
 > %EndEventDef 
 > %EventDef PajeDefineEventType 3 
 > %       Alias string 
-> %       EntityType string 
+> %       ContainerType string 
 > %       Name string 
 > %       Color color 
 > %EndEventDef 
@@ -58,46 +58,46 @@ $ cat tracing/categories.trace
 > %EventDef PajeDestroyContainer 7 
 > %       Time date 
 > %       Type string 
-> %       Container string 
+> %       Name string 
 > %EndEventDef 
 > %EventDef PajeSetVariable 8 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeAddVariable 9 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSubVariable 10 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSetState 11 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePushState 12 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePopState 13 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %EndEventDef
 > %EventDef PajeStartLink 14 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       SourceContainer string 
@@ -105,7 +105,7 @@ $ cat tracing/categories.trace
 > %EndEventDef
 > %EventDef PajeEndLink 15 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       DestContainer string 
@@ -113,32 +113,32 @@ $ cat tracing/categories.trace
 > %EndEventDef
 > %EventDef PajeNewEvent 16 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > 0 1 0 HOST
-> 6 0 1 1 0 Tremblay
+> 6 0 1 1 0 "Tremblay"
 > 1 2 1 power "1 1 1"
 > 1 3 1 power_used "0.5 0.5 0.5"
-> 6 0 2 1 0 Jupiter
-> 6 0 3 1 0 Fafard
-> 6 0 4 1 0 Ginette
-> 6 0 5 1 0 Bourassa
+> 6 0 2 1 0 "Jupiter"
+> 6 0 3 1 0 "Fafard"
+> 6 0 4 1 0 "Ginette"
+> 6 0 5 1 0 "Bourassa"
 > 0 4 0 LINK
-> 6 0 6 4 0 6
+> 6 0 6 4 0 "6"
 > 1 5 4 bandwidth "1 1 1"
 > 1 6 4 latency "1 1 1"
 > 1 7 4 bandwidth_used "0.5 0.5 0.5"
-> 6 0 7 4 0 3
-> 6 0 8 4 0 7
-> 6 0 9 4 0 9
-> 6 0 10 4 0 2
-> 6 0 11 4 0 8
-> 6 0 12 4 0 1
-> 6 0 13 4 0 4
-> 6 0 14 4 0 0
-> 6 0 15 4 0 5
+> 6 0 7 4 0 "3"
+> 6 0 8 4 0 "7"
+> 6 0 9 4 0 "9"
+> 6 0 10 4 0 "2"
+> 6 0 11 4 0 "8"
+> 6 0 12 4 0 "1"
+> 6 0 13 4 0 "4"
+> 6 0 14 4 0 "0"
+> 6 0 15 4 0 "5"
 > 4 8 0 1 4 HOST-LINK
 > 4 9 0 4 4 LINK-LINK
 > 4 10 0 4 1 LINK-HOST
index fb75e86..44eb072 100644 (file)
@@ -3223,7 +3223,7 @@ $ $SG_TEST_EXENV cat tracing/ms.trace
 > %EndEventDef 
 > %EventDef PajeDefineEventType 3 
 > %       Alias string 
-> %       EntityType string 
+> %       ContainerType string 
 > %       Name string 
 > %       Color color 
 > %EndEventDef 
@@ -3250,46 +3250,46 @@ $ $SG_TEST_EXENV cat tracing/ms.trace
 > %EventDef PajeDestroyContainer 7 
 > %       Time date 
 > %       Type string 
-> %       Container string 
+> %       Name string 
 > %EndEventDef 
 > %EventDef PajeSetVariable 8 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeAddVariable 9 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSubVariable 10 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSetState 11 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePushState 12 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePopState 13 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %EndEventDef
 > %EventDef PajeStartLink 14 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       SourceContainer string 
@@ -3297,7 +3297,7 @@ $ $SG_TEST_EXENV cat tracing/ms.trace
 > %EndEventDef
 > %EventDef PajeEndLink 15 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       DestContainer string 
@@ -3305,32 +3305,32 @@ $ $SG_TEST_EXENV cat tracing/ms.trace
 > %EndEventDef
 > %EventDef PajeNewEvent 16 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > 0 1 0 HOST
-> 6 0 1 1 0 Tremblay
+> 6 0 1 1 0 "Tremblay"
 > 1 2 1 power "1 1 1"
 > 1 3 1 power_used "0.5 0.5 0.5"
-> 6 0 2 1 0 Jupiter
-> 6 0 3 1 0 Fafard
-> 6 0 4 1 0 Ginette
-> 6 0 5 1 0 Bourassa
+> 6 0 2 1 0 "Jupiter"
+> 6 0 3 1 0 "Fafard"
+> 6 0 4 1 0 "Ginette"
+> 6 0 5 1 0 "Bourassa"
 > 0 4 0 LINK
-> 6 0 6 4 0 6
+> 6 0 6 4 0 "6"
 > 1 5 4 bandwidth "1 1 1"
 > 1 6 4 latency "1 1 1"
 > 1 7 4 bandwidth_used "0.5 0.5 0.5"
-> 6 0 7 4 0 3
-> 6 0 8 4 0 7
-> 6 0 9 4 0 9
-> 6 0 10 4 0 2
-> 6 0 11 4 0 8
-> 6 0 12 4 0 1
-> 6 0 13 4 0 4
-> 6 0 14 4 0 0
-> 6 0 15 4 0 5
+> 6 0 7 4 0 "3"
+> 6 0 8 4 0 "7"
+> 6 0 9 4 0 "9"
+> 6 0 10 4 0 "2"
+> 6 0 11 4 0 "8"
+> 6 0 12 4 0 "1"
+> 6 0 13 4 0 "4"
+> 6 0 14 4 0 "0"
+> 6 0 15 4 0 "5"
 > 4 8 0 1 4 HOST-LINK
 > 4 9 0 4 4 LINK-LINK
 > 4 10 0 4 1 LINK-HOST
index 72b16fb..846f59f 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* Copyright (c) 2009 The SimGrid team. All rights reserved.                */
 
 /* This program is free software; you can redistribute it and/or modify it
index abcd93b..f656d64 100644 (file)
@@ -36,7 +36,7 @@ $ cat tracing/procmig.trace
 > %EndEventDef 
 > %EventDef PajeDefineEventType 3 
 > %       Alias string 
-> %       EntityType string 
+> %       ContainerType string 
 > %       Name string 
 > %       Color color 
 > %EndEventDef 
@@ -63,46 +63,46 @@ $ cat tracing/procmig.trace
 > %EventDef PajeDestroyContainer 7 
 > %       Time date 
 > %       Type string 
-> %       Container string 
+> %       Name string 
 > %EndEventDef 
 > %EventDef PajeSetVariable 8 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeAddVariable 9 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSubVariable 10 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSetState 11 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePushState 12 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePopState 13 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %EndEventDef
 > %EventDef PajeStartLink 14 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       SourceContainer string 
@@ -110,7 +110,7 @@ $ cat tracing/procmig.trace
 > %EndEventDef
 > %EventDef PajeEndLink 15 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       DestContainer string 
@@ -118,12 +118,12 @@ $ cat tracing/procmig.trace
 > %EndEventDef
 > %EventDef PajeNewEvent 16 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > 0 1 0 HOST
-> 6 0 1 1 0 Tremblay
+> 6 0 1 1 0 "Tremblay"
 > 0 2 1 MSG_PROCESS
 > 2 3 2 MSG_PROCESS_STATE
 > 5 4 3 executing "0 1 0"
@@ -134,21 +134,21 @@ $ cat tracing/procmig.trace
 > 5 9 3 task_execute "0 1 1"
 > 4 10 0 2 2 MSG_PROCESS_LINK
 > 4 11 0 2 2 MSG_PROCESS_TASK_LINK
-> 6 0 2 1 0 Jupiter
-> 6 0 3 1 0 Fafard
-> 6 0 4 1 0 Ginette
-> 6 0 5 1 0 Bourassa
+> 6 0 2 1 0 "Jupiter"
+> 6 0 3 1 0 "Fafard"
+> 6 0 4 1 0 "Ginette"
+> 6 0 5 1 0 "Bourassa"
 > 0 12 0 LINK
-> 6 0 6 12 0 6
-> 6 0 7 12 0 3
-> 6 0 8 12 0 7
-> 6 0 9 12 0 9
-> 6 0 10 12 0 2
-> 6 0 11 12 0 8
-> 6 0 12 12 0 1
-> 6 0 13 12 0 4
-> 6 0 14 12 0 0
-> 6 0 15 12 0 5
+> 6 0 6 12 0 "6"
+> 6 0 7 12 0 "3"
+> 6 0 8 12 0 "7"
+> 6 0 9 12 0 "9"
+> 6 0 10 12 0 "2"
+> 6 0 11 12 0 "8"
+> 6 0 12 12 0 "1"
+> 6 0 13 12 0 "4"
+> 6 0 14 12 0 "0"
+> 6 0 15 12 0 "5"
 > 4 13 0 1 12 HOST-LINK
 > 4 14 0 12 12 LINK-LINK
 > 4 15 0 12 1 LINK-HOST
@@ -186,8 +186,8 @@ $ cat tracing/procmig.trace
 > 15 0 13 0 G 9 15
 > 14 0 14 0 G 7 16
 > 15 0 14 0 G 15 16
-> 6 0 16 2 3 emigrant-1
-> 6 0 17 2 1 master-2
+> 6 0 16 2 3 "emigrant-1"
+> 6 0 17 2 1 "master-2"
 > 11 0 3 16 4
 > 11 0 3 17 4
 > 12 0 3 16 6
@@ -202,7 +202,7 @@ $ cat tracing/procmig.trace
 > 15 2.020551 11 0 SR 16 p0
 > 14 2.020551 10 0 M 16 0
 > 7 2.020551 2 16
-> 6 2.020551 18 2 1 emigrant-1
+> 6 2.020551 18 2 1 "emigrant-1"
 > 11 2.020551 3 18 4
 > 15 2.020551 10 0 M 18 0
 > 12 2.020551 3 18 6
@@ -215,7 +215,7 @@ $ cat tracing/procmig.trace
 > 15 4.020707 11 0 SR 18 p1
 > 14 4.020707 10 0 M 18 1
 > 7 4.020707 2 18
-> 6 4.020707 19 2 2 emigrant-1
+> 6 4.020707 19 2 2 "emigrant-1"
 > 11 4.020707 3 19 4
 > 15 4.020707 10 0 M 19 1
 > 12 4.020707 3 19 6
@@ -228,7 +228,7 @@ $ cat tracing/procmig.trace
 > 15 6.035906 11 0 SR 19 p2
 > 14 6.035906 10 0 M 19 2
 > 7 6.035906 2 19
-> 6 6.035906 20 2 3 emigrant-1
+> 6 6.035906 20 2 3 "emigrant-1"
 > 11 6.035906 3 20 4
 > 15 6.035906 10 0 M 20 2
 > 12 6.035906 3 20 6
@@ -241,7 +241,7 @@ $ cat tracing/procmig.trace
 > 15 8.056457 11 0 SR 20 p3
 > 14 8.056457 10 0 M 20 3
 > 7 8.056457 2 20
-> 6 8.056457 21 2 4 emigrant-1
+> 6 8.056457 21 2 4 "emigrant-1"
 > 11 8.056457 3 21 4
 > 15 8.056457 10 0 M 21 3
 > 12 8.056457 3 21 6
@@ -254,7 +254,7 @@ $ cat tracing/procmig.trace
 > 15 10.069689 11 0 SR 21 p4
 > 14 10.069689 10 0 M 21 4
 > 7 10.069689 2 21
-> 6 10.069689 22 2 5 emigrant-1
+> 6 10.069689 22 2 5 "emigrant-1"
 > 11 10.069689 3 22 4
 > 15 10.069689 10 0 M 22 4
 > 12 10.069689 3 22 6
@@ -267,7 +267,7 @@ $ cat tracing/procmig.trace
 > 15 12.090025 11 0 SR 22 p5
 > 14 12.090025 10 0 M 22 5
 > 7 12.090025 2 22
-> 6 12.090025 23 2 3 emigrant-1
+> 6 12.090025 23 2 3 "emigrant-1"
 > 11 12.090025 3 23 4
 > 15 12.090025 10 0 M 23 5
 > 12 12.090025 3 23 6
@@ -280,7 +280,7 @@ $ cat tracing/procmig.trace
 > 15 14.110575 11 0 SR 23 p6
 > 14 14.110575 10 0 M 23 6
 > 7 14.110575 2 23
-> 6 14.110575 24 2 1 emigrant-1
+> 6 14.110575 24 2 1 "emigrant-1"
 > 11 14.110575 3 24 4
 > 15 14.110575 10 0 M 24 6
 > 12 14.110575 3 24 6
@@ -293,7 +293,7 @@ $ cat tracing/procmig.trace
 > 15 16.110731 11 0 SR 24 p7
 > 14 16.110731 10 0 M 24 7
 > 7 16.110731 2 24
-> 6 16.110731 25 2 4 emigrant-1
+> 6 16.110731 25 2 4 "emigrant-1"
 > 11 16.110731 3 25 4
 > 15 16.110731 10 0 M 25 7
 > 12 16.110731 3 25 6
index 13a3c74..2690c98 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved.        */
 
 /* This program is free software; you can redistribute it and/or modify it
index bb1633e..252c950 100644 (file)
@@ -70,7 +70,7 @@ $ cat tracing/tasks.trace
 > %EndEventDef 
 > %EventDef PajeDefineEventType 3 
 > %       Alias string 
-> %       EntityType string 
+> %       ContainerType string 
 > %       Name string 
 > %       Color color 
 > %EndEventDef 
@@ -97,46 +97,46 @@ $ cat tracing/tasks.trace
 > %EventDef PajeDestroyContainer 7 
 > %       Time date 
 > %       Type string 
-> %       Container string 
+> %       Name string 
 > %EndEventDef 
 > %EventDef PajeSetVariable 8 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeAddVariable 9 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSubVariable 10 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
-> %       Value string 
+> %       Value double 
 > %EndEventDef
 > %EventDef PajeSetState 11 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePushState 12 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > %EventDef PajePopState 13 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %EndEventDef
 > %EventDef PajeStartLink 14 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       SourceContainer string 
@@ -144,7 +144,7 @@ $ cat tracing/tasks.trace
 > %EndEventDef
 > %EventDef PajeEndLink 15 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %       DestContainer string 
@@ -152,35 +152,35 @@ $ cat tracing/tasks.trace
 > %EndEventDef
 > %EventDef PajeNewEvent 16 
 > %       Time date 
-> %       EntityType string 
+> %       Type string 
 > %       Container string 
 > %       Value string 
 > %EndEventDef
 > 0 1 0 HOST
-> 6 0 1 1 0 Tremblay
+> 6 0 1 1 0 "Tremblay"
 > 1 2 1 power "1 1 1"
 > 0 3 1 MSG_TASK
 > 2 4 3 MSG_TASK_STATE
 > 5 5 4 MSG_task_execute "0 1 0"
 > 5 6 4 created "1 1 0"
 > 4 7 0 3 3 MSG_TASK_LINK
-> 6 0 2 1 0 Jupiter
-> 6 0 3 1 0 Fafard
-> 6 0 4 1 0 Ginette
-> 6 0 5 1 0 Bourassa
+> 6 0 2 1 0 "Jupiter"
+> 6 0 3 1 0 "Fafard"
+> 6 0 4 1 0 "Ginette"
+> 6 0 5 1 0 "Bourassa"
 > 0 8 0 LINK
-> 6 0 6 8 0 6
+> 6 0 6 8 0 "6"
 > 1 9 8 bandwidth "1 1 1"
 > 1 10 8 latency "1 1 1"
-> 6 0 7 8 0 3
-> 6 0 8 8 0 7
-> 6 0 9 8 0 9
-> 6 0 10 8 0 2
-> 6 0 11 8 0 8
-> 6 0 12 8 0 1
-> 6 0 13 8 0 4
-> 6 0 14 8 0 0
-> 6 0 15 8 0 5
+> 6 0 7 8 0 "3"
+> 6 0 8 8 0 "7"
+> 6 0 9 8 0 "9"
+> 6 0 10 8 0 "2"
+> 6 0 11 8 0 "8"
+> 6 0 12 8 0 "1"
+> 6 0 13 8 0 "4"
+> 6 0 14 8 0 "0"
+> 6 0 15 8 0 "5"
 > 4 11 0 1 8 HOST-LINK
 > 4 12 0 8 8 LINK-LINK
 > 4 13 0 8 1 LINK-HOST
@@ -247,15 +247,15 @@ $ cat tracing/tasks.trace
 > 1 15 1 pcompute "1 0 0"
 > 1 16 8 bfinalize "0 1 0"
 > 1 17 1 pfinalize "0 1 0"
-> 6 0 16 3 1 task-0
+> 6 0 16 3 1 "task-0"
 > 1 18 3 compute "1 1 1"
 > 8 0 18 16 1.000000
 > 12 0 4 16 6
 > 13 0 4 16
 > 14 0 7 0 SR 16 0
 > 7 0 3 16
-> 6 0.002164 17 3 1 task-0
-> 6 0.002164 18 3 1 task-1
+> 6 0.002164 17 3 1 "task-0"
+> 6 0.002164 18 3 1 "task-1"
 > 8 0.002164 18 17 1.000000
 > 12 0.002164 4 17 6
 > 15 0.002164 7 0 SR 17 0
@@ -265,8 +265,8 @@ $ cat tracing/tasks.trace
 > 13 0.002164 4 18
 > 14 0.002164 7 0 SR 18 1
 > 7 0.002164 3 18
-> 6 0.168126 19 3 2 task-1
-> 6 0.168126 20 3 1 task-2
+> 6 0.168126 19 3 2 "task-1"
+> 6 0.168126 20 3 1 "task-2"
 > 8 0.017364 14 9 0.000000
 > 9 0.017364 14 9 6632970.000000
 > 10 0.168126 14 9 6632970.000000
@@ -282,8 +282,8 @@ $ cat tracing/tasks.trace
 > 8 0.002164 15 1 0.000000
 > 9 0.002164 15 1 98095000.000000
 > 10 0.168126 15 1 98095000.000000
-> 6 0.386279 21 3 3 task-2
-> 6 0.386279 22 3 1 task-3
+> 6 0.386279 21 3 3 "task-2"
+> 6 0.386279 22 3 1 "task-3"
 > 8 0.188676 14 13 0.000000
 > 9 0.188676 14 13 5060664.718311
 > 8 0.188676 14 7 0.000000
@@ -327,8 +327,8 @@ $ cat tracing/tasks.trace
 > 9 0.511874 14 13 7859911.230163
 > 9 0.511874 14 7 7859911.230163
 > 9 0.511874 14 15 7859911.230163
-> 6 0.526739 23 3 4 task-3
-> 6 0.526739 24 3 1 task-4
+> 6 0.526739 23 3 4 "task-3"
+> 6 0.526739 24 3 1 "task-4"
 > 10 0.526739 14 13 7859911.230163
 > 10 0.526739 14 7 7859911.230163
 > 10 0.526739 14 15 7859911.230163
@@ -341,8 +341,8 @@ $ cat tracing/tasks.trace
 > 13 0.526739 4 24
 > 14 0.526739 7 0 SR 24 4
 > 7 0.526739 3 24
-> 6 0.742611 25 3 5 task-4
-> 6 0.742611 26 3 1 task-5
+> 6 0.742611 25 3 5 "task-4"
+> 6 0.742611 26 3 1 "task-5"
 > 9 0.547074 14 13 5114134.701194
 > 9 0.547074 14 7 5114134.701194
 > 9 0.547074 14 10 5114134.701194
@@ -368,8 +368,8 @@ $ cat tracing/tasks.trace
 > 13 0.742611 4 26
 > 14 0.742611 7 0 SR 26 5
 > 7 0.742611 3 26
-> 6 0.744775 27 3 1 task-5
-> 6 0.744775 28 3 1 task-6
+> 6 0.744775 27 3 1 "task-5"
+> 6 0.744775 28 3 1 "task-6"
 > 8 0.744775 18 27 1.000000
 > 12 0.744775 4 27 6
 > 15 0.744775 7 0 SR 27 5
@@ -384,13 +384,13 @@ $ cat tracing/tasks.trace
 > 10 0.823468 15 2 76296000.000000
 > 13 0.823468 4 19
 > 7 0.823468 3 19
-> 6 0.989430 29 3 1 task-7
+> 6 0.989430 29 3 1 "task-7"
 > 8 0.989430 18 29 1.000000
 > 12 0.989430 4 29 6
 > 13 0.989430 4 29
 > 14 0.989430 7 0 SR 29 7
 > 7 0.989430 3 29
-> 6 0.989430 30 3 2 task-6
+> 6 0.989430 30 3 2 "task-6"
 > 8 0.386279 15 3 0.000000
 > 9 0.386279 15 3 76296000.000000
 > 9 0.744775 15 1 98095000.000000
@@ -406,15 +406,15 @@ $ cat tracing/tasks.trace
 > 10 1.254485 15 1 98095000.000000
 > 13 1.254485 4 27
 > 7 1.254485 3 27
-> 6 1.259775 31 3 1 task-8
+> 6 1.259775 31 3 1 "task-8"
 > 8 1.259775 18 31 1.000000
 > 12 1.259775 4 31 6
 > 13 1.259775 4 31
 > 14 1.259775 7 0 SR 31 8
 > 7 1.259775 3 31
-> 6 1.259775 32 3 3 task-7
-> 6 1.261939 33 3 1 task-8
-> 6 1.261939 34 3 1 task-9
+> 6 1.259775 32 3 3 "task-7"
+> 6 1.261939 33 3 1 "task-8"
+> 6 1.261939 34 3 1 "task-9"
 > 8 1.259775 18 32 1.000000
 > 12 1.259775 4 32 6
 > 15 1.259775 7 0 SR 32 7
@@ -437,13 +437,13 @@ $ cat tracing/tasks.trace
 > 10 1.644772 15 2 76296000.000000
 > 13 1.644772 4 30
 > 7 1.644772 3 30
-> 6 1.698296 35 3 1 task-10
+> 6 1.698296 35 3 1 "task-10"
 > 8 1.698296 18 35 1.000000
 > 12 1.698296 4 35 6
 > 13 1.698296 4 35
 > 14 1.698296 7 0 SR 35 10
 > 7 1.698296 3 35
-> 6 1.698296 36 3 4 task-9
+> 6 1.698296 36 3 4 "task-9"
 > 9 1.261939 15 1 98095000.000000
 > 8 1.698296 18 36 1.000000
 > 12 1.698296 4 36 6
@@ -463,8 +463,8 @@ $ cat tracing/tasks.trace
 > 10 1.773709 14 9 6632970.000000
 > 13 1.773709 4 25
 > 7 1.773709 3 25
-> 6 1.864258 37 3 2 task-10
-> 6 1.864258 38 3 1 task-11
+> 6 1.864258 37 3 2 "task-10"
+> 6 1.864258 38 3 1 "task-11"
 > 9 1.773709 14 9 6632970.000000
 > 10 1.864258 14 9 6632970.000000
 > 8 1.864258 18 37 1.000000
@@ -476,8 +476,8 @@ $ cat tracing/tasks.trace
 > 13 1.864258 4 38
 > 14 1.864258 7 0 SR 38 11
 > 7 1.864258 3 38
-> 6 1.866422 39 3 1 task-11
-> 6 1.866422 40 3 1 task-12
+> 6 1.866422 39 3 1 "task-11"
+> 6 1.866422 40 3 1 "task-12"
 > 8 1.866422 18 39 1.000000
 > 12 1.866422 4 39 6
 > 15 1.866422 7 0 SR 39 11
@@ -505,8 +505,8 @@ $ cat tracing/tasks.trace
 > 10 1.915117 14 8 5114134.701194
 > 13 1.915117 4 32
 > 7 1.915117 3 32
-> 6 2.082294 41 3 5 task-12
-> 6 2.082294 42 3 1 task-13
+> 6 2.082294 41 3 5 "task-12"
+> 6 2.082294 42 3 1 "task-13"
 > 9 1.915117 14 13 5114134.701194
 > 9 1.915117 14 7 5114134.701194
 > 9 1.915117 14 10 5114134.701194
@@ -530,8 +530,8 @@ $ cat tracing/tasks.trace
 > 13 2.082294 4 42
 > 14 2.082294 7 0 SR 42 13
 > 7 2.082294 3 42
-> 6 2.300447 43 3 3 task-13
-> 6 2.300447 44 3 1 task-14
+> 6 2.300447 43 3 3 "task-13"
+> 6 2.300447 44 3 1 "task-14"
 > 9 1.866422 15 1 98095000.000000
 > 10 2.082294 15 1 98095000.000000
 > 9 2.102845 14 13 5060664.718311
@@ -561,13 +561,13 @@ $ cat tracing/tasks.trace
 > 10 2.376132 15 1 98095000.000000
 > 13 2.376132 4 39
 > 7 2.376132 3 39
-> 6 2.378296 45 3 1 task-15
+> 6 2.378296 45 3 1 "task-15"
 > 8 2.378296 18 45 1.000000
 > 12 2.378296 4 45 6
 > 13 2.378296 4 45
 > 14 2.378296 7 0 SR 45 15
 > 7 2.378296 3 45
-> 6 2.378296 46 3 1 task-14
+> 6 2.378296 46 3 1 "task-14"
 > 9 1.864258 15 2 76296000.000000
 > 8 2.378296 18 46 1.000000
 > 12 2.378296 4 46 6
@@ -576,13 +576,13 @@ $ cat tracing/tasks.trace
 > 10 2.519600 15 2 76296000.000000
 > 13 2.519600 4 37
 > 7 2.519600 3 37
-> 6 2.685562 47 3 1 task-16
+> 6 2.685562 47 3 1 "task-16"
 > 8 2.685562 18 47 1.000000
 > 12 2.685562 4 47 6
 > 13 2.685562 4 47
 > 14 2.685562 7 0 SR 47 16
 > 7 2.685562 3 47
-> 6 2.685562 48 3 2 task-15
+> 6 2.685562 48 3 2 "task-15"
 > 9 1.698296 15 4 48492000.000000
 > 9 2.378296 15 1 98095000.000000
 > 8 2.685562 18 48 1.000000
@@ -593,13 +593,13 @@ $ cat tracing/tasks.trace
 > 10 2.729394 15 4 48492000.000000
 > 13 2.729394 4 36
 > 7 2.729394 3 36
-> 6 2.869854 49 3 1 task-17
+> 6 2.869854 49 3 1 "task-17"
 > 8 2.869854 18 49 1.000000
 > 12 2.869854 4 49 6
 > 13 2.869854 4 49
 > 14 2.869854 7 0 SR 49 17
 > 7 2.869854 3 49
-> 6 2.869854 50 3 4 task-16
+> 6 2.869854 50 3 4 "task-16"
 > 9 2.685562 15 1 98095000.000000
 > 8 2.869854 18 50 1.000000
 > 12 2.869854 4 50 6
@@ -610,13 +610,13 @@ $ cat tracing/tasks.trace
 > 10 2.888006 15 1 98095000.000000
 > 13 2.888006 4 46
 > 7 2.888006 3 46
-> 6 2.890170 51 3 1 task-18
+> 6 2.890170 51 3 1 "task-18"
 > 8 2.890170 18 51 1.000000
 > 12 2.890170 4 51 6
 > 13 2.890170 4 51
 > 14 2.890170 7 0 SR 51 18
 > 7 2.890170 3 51
-> 6 2.890170 52 3 1 task-17
+> 6 2.890170 52 3 1 "task-17"
 > 9 2.300447 15 3 76296000.000000
 > 8 2.890170 18 52 1.000000
 > 12 2.890170 4 52 6
@@ -629,13 +629,13 @@ $ cat tracing/tasks.trace
 > 10 3.113392 15 5 48492000.000000
 > 13 3.113392 4 41
 > 7 3.113392 3 41
-> 6 3.173943 53 3 1 task-19
+> 6 3.173943 53 3 1 "task-19"
 > 8 3.173943 18 53 1.000000
 > 12 3.173943 4 53 6
 > 13 3.173943 4 53
 > 14 3.173943 7 0 SR 53 19
 > 7 3.173943 3 53
-> 6 3.173943 54 3 3 task-18
+> 6 3.173943 54 3 3 "task-18"
 > 9 2.685562 15 2 76296000.000000
 > 9 2.890170 15 1 98095000.000000
 > 8 3.173943 18 54 1.000000
@@ -660,8 +660,8 @@ $ cat tracing/tasks.trace
 > 10 3.340904 14 8 5114134.701194
 > 13 3.340904 4 48
 > 7 3.340904 3 48
-> 6 3.389815 55 3 5 task-19
-> 6 3.389815 56 3 1 task-0
+> 6 3.389815 55 3 5 "task-19"
+> 6 3.389815 56 3 1 "task-0"
 > 1 19 3 finalize "1 1 1"
 > 9 3.340904 14 13 5114134.701194
 > 9 3.340904 14 7 5114134.701194
@@ -692,23 +692,23 @@ $ cat tracing/tasks.trace
 > 10 3.399880 15 1 98095000.000000
 > 13 3.399880 4 52
 > 7 3.399880 3 52
-> 6 3.405015 57 3 2 task-0
+> 6 3.405015 57 3 2 "task-0"
 > 8 3.405015 19 57 1.000000
 > 12 3.405015 4 57 6
 > 15 3.405015 7 0 SR 57 20
 > 7 3.405015 3 57
-> 6 3.405015 58 3 1 task-1
+> 6 3.405015 58 3 1 "task-1"
 > 8 3.405015 19 58 1.000000
 > 12 3.405015 4 58 6
 > 13 3.405015 4 58
 > 14 3.405015 7 0 SR 58 21
 > 7 3.405015 3 58
-> 6 3.405171 59 3 1 task-1
+> 6 3.405171 59 3 1 "task-1"
 > 8 3.405171 19 59 1.000000
 > 12 3.405171 4 59 6
 > 15 3.405171 7 0 SR 59 21
 > 7 3.405171 3 59
-> 6 3.405171 60 3 1 task-2
+> 6 3.405171 60 3 1 "task-2"
 > 8 3.405171 19 60 1.000000
 > 12 3.405171 4 60 6
 > 13 3.405171 4 60
@@ -718,13 +718,13 @@ $ cat tracing/tasks.trace
 > 10 3.829285 15 3 76296000.000000
 > 13 3.829285 4 54
 > 7 3.829285 3 54
-> 6 3.849836 61 3 1 task-3
+> 6 3.849836 61 3 1 "task-3"
 > 8 3.849836 19 61 1.000000
 > 12 3.849836 4 61 6
 > 13 3.849836 4 61
 > 14 3.849836 7 0 SR 61 23
 > 7 3.849836 3 61
-> 6 3.849836 62 3 3 task-2
+> 6 3.849836 62 3 3 "task-2"
 > 8 3.849836 19 62 1.000000
 > 12 3.849836 4 62 6
 > 15 3.849836 7 0 SR 62 22
@@ -733,13 +733,13 @@ $ cat tracing/tasks.trace
 > 10 3.900952 15 4 48492000.000000
 > 13 3.900952 4 50
 > 7 3.900952 3 50
-> 6 3.914183 63 3 1 task-4
+> 6 3.914183 63 3 1 "task-4"
 > 8 3.914183 19 63 1.000000
 > 12 3.914183 4 63 6
 > 13 3.914183 4 63
 > 14 3.914183 7 0 SR 63 24
 > 7 3.914183 3 63
-> 6 3.914183 64 3 4 task-3
+> 6 3.914183 64 3 4 "task-3"
 > 8 3.914183 19 64 1.000000
 > 12 3.914183 4 64 6
 > 15 3.914183 7 0 SR 64 23
@@ -748,7 +748,7 @@ $ cat tracing/tasks.trace
 > 10 4.420913 15 5 48492000.000000
 > 13 4.420913 4 55
 > 7 4.420913 3 55
-> 6 4.441249 65 3 5 task-4
+> 6 4.441249 65 3 5 "task-4"
 > 8 4.441249 19 65 1.000000
 > 12 4.441249 4 65 6
 > 15 4.441249 7 0 SR 65 24
index a638eae..18db17a 100644 (file)
@@ -1,14 +1,14 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<!--              _________
-                               |              |
-                               |  router  |
-       ____________|__________|_____________ backbone
-         |   |   |              |     |   |    
-    l0|        l1|     l2|           l97| l96 |   | l99
-      |          |       |   ........   |     |   |
+<!--             _________
+                |          |
+                |  router  |
+    ____________|__________|_____________ backbone
+      |   |   |              |     |   |       
+    l0|        l1| l2|           l97| l96 |   | l99
+      |   |   |   ........   |     |   |
       |                                |
-   c-0.me                             c-99.me  
+    c-0.me                             c-99.me 
 -->
 <platform version="3">
 <AS  id="AS0"  routing="Full">
index 3e470a9..a5ac514 100644 (file)
@@ -1,21 +1,21 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 
-<!--              _________
-                               |              |
-                               |  router  |
-                               |__________|
-                                       / | \
-                                  /  |  \
-                          l0 / l1|   \l2 
-                                /    |    \
-                               /         |     \
-                       host0   host1   host2   
+<!--             _________
+                |          |
+                |  router  |
+                |__________|
+                    / | \
+                   /  |  \
+               l0 / l1|   \l2 
+                 /    |    \
+                /     |     \
+            host0   host1   host2      
 -->
 
 <platform version="3">
 <AS  id="AS0"  routing="Full">
-  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
-               radical="0-2"   power="1000000000"    bw="125000000"     lat="5E-5"/>
+  <cluster id="my_cluster_1" prefix="" suffix=""
+               radical="0-262144"      power="1000000000"    bw="125000000"     lat="5E-5"/>
 </AS>
 </platform>
diff --git a/examples/platforms/One_cluster_one_host.xml b/examples/platforms/One_cluster_one_host.xml
new file mode 100644 (file)
index 0000000..1966d43
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+
+<platform version="3">
+<AS  id="AS0"  routing="Floyd">
+    
+  <cluster id="my_cluster_1" prefix="c-" suffix=""
+               radical="0-1"   power="1000000000"    bw="125000000"     lat="5E-5"
+        router_id="router1"/>
+
+ <AS id="AS1" routing="none">
+    <host id="host1" power="1000000000"/>
+ </AS>
+
+  <link id="link1" bandwidth="100000" latency="0.01"/>
+  
+  <ASroute src="my_cluster_1" dst="AS1"
+    gw_src="router1"
+    gw_dst="host1">
+    <link_ctn id="link1"/>
+  </ASroute>
+  
+</AS>
+</platform>
diff --git a/examples/platforms/cloud.xml b/examples/platforms/cloud.xml
new file mode 100644 (file)
index 0000000..df5a882
--- /dev/null
@@ -0,0 +1,158 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<config id="General">
+       <prop id="network/coordinates" value="yes"></prop>
+</config>
+
+<AS  id="AS0"  routing="Vivaldi">
+   
+   <AS  id="AS1_dc1"  routing="RuleBased">
+   <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->    
+           <!-- 3 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
+            <!-- clusters -->
+            <cluster id="AS1_cb1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" power="5.2297E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+           <link   id="link_dc1_cb1" bandwidth="1.25E9" latency="1.0E-4"/>
+
+           <cluster id="AS1_cb2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" power="8.8925E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+           <link   id="link_dc1_cb2" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS1_cb3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+           <link   id="link_dc1_cb3" bandwidth="1.25E9" latency="1.0E-4"/>
+            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+            <AS id="gw_AS1_dc1" routing="Floyd">
+                <!-- equipments-->
+                    <router id="gw_dc1_horizdist"/>
+                    <router id="gw_dc1_maindist"/>
+                    <router id="gw_dc1_entranceroom"/>
+                    <!-- ISP end point, entering the cloud, so it has coordinates -->
+                    <router id="router_AS1_dc1" coordinates="25.5 9.4 1.4" />
+                    <!-- links -->
+                    <link id="dc1_horizdist_maindist"        bandwidth="1.25E9" latency="1.0E-4"/>        
+                    <link id="dc1_maindist_entranceroom"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                        <link id="dc1_entranceroom_ISP"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                    <!-- links to router relationships -->
+                    <route src="gw_dc1_horizdist" dst="gw_dc1_maindist"><link_ctn id="dc1_horizdist_maindist"/></route>
+                    <route src="gw_dc1_maindist" dst="gw_dc1_entranceroom"><link_ctn id="dc1_maindist_entranceroom"/></route>
+                    <route src="gw_dc1_entranceroom" dst="router_AS1_dc1"><link_ctn id="dc1_entranceroom_ISP"/></route>
+            </AS>
+           
+            <!-- internal routes between clusters -->
+            <ASroute src="AS1_cb(.*)" dst="AS1_cb(.*)" gw_src="cb$1src-AS1_cb$1src_router.dc1.acloud.com" gw_dst="cb$1dst-AS1_cb$1dst_router.dc1.acloud.com" symmetrical="YES">
+                    <link_ctn id="link_dc1_cb$1src"/>
+                    <link_ctn id="link_dc1_cb$1dst"/>
+            </ASroute>
+            <!-- clusters to exit AS -->
+            <ASroute src="AS1_cb(.*)" dst="gw_AS1_(.*)" gw_src="cb$1src-AS1_cb$1src_router.dc1.acloud.com" gw_dst="gw_dc1_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc1_cb$1src"/>
+            </ASroute> 
+            <ASroute dst="AS1_cb(.*)" src="gw_AS1_(.*)" gw_dst="cb$1dst-AS1_cb$1dst_router.dc1.acloud.com" gw_src="gw_dc1_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc1_cb$1dst"/>
+            </ASroute>    
+   </AS>
+
+   <AS  id="AS2_dc2"  routing="RuleBased">
+   <!--bigger tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->   
+            <!-- 6 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
+            <!-- clusters -->
+            <cluster id="AS2_cb1" prefix="cb1-" suffix=".dc2.acloud.com" radical="1-40" power="5.2297E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb1" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS2_cb2" prefix="cb2-" suffix=".dc2.acloud.com" radical="1-50" power="8.8925E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb2" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS2_cb3" prefix="cb3-" suffix=".dc2.acloud.com" radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb3" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS2_cb4" prefix="cb4-" suffix=".dc2.acloud.com" radical="1-40" power="5.2297E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb4" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS2_cb5" prefix="cb5-" suffix=".dc2.acloud.com" radical="1-50" power="8.8925E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb5" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS2_cb6" prefix="cb6-" suffix=".dc2.acloud.com" radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc2_cb6" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+            <AS id="gw_AS2_dc2" routing="Floyd">
+                <!-- equipments-->
+                    <router id="gw_dc2_horizdist"/>
+                    <router id="gw_dc2_maindist"/>
+                    <router id="gw_dc2_entranceroom"/>
+                    <!-- ISP end point, entering the cloud, so it has coordinates -->
+                    <router id="router_AS2_dc2" coordinates="12.8 14.4 6.4" />
+                    <!-- links -->
+                    <link id="dc2_horizdist_maindist"        bandwidth="1.25E9" latency="1.0E-4"/>        
+                    <link id="dc2_maindist_entranceroom"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                        <link id="dc2_entranceroom_ISP"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                    <!-- links to router relationships -->
+                    <route src="gw_dc2_horizdist" dst="gw_dc2_maindist"><link_ctn id="dc2_horizdist_maindist"/></route>
+                    <route src="gw_dc2_maindist" dst="gw_dc2_entranceroom"><link_ctn id="dc2_maindist_entranceroom"/></route>
+                    <route src="gw_dc2_entranceroom" dst="router_AS2_dc2"><link_ctn id="dc2_entranceroom_ISP"/></route>
+            </AS>
+            
+            <!-- internal routes between clusters -->
+            <ASroute src="AS2_cb(.*)" dst="AS2_cb(.*)" gw_src="cb$1src-AS2_cb$1src_router.dc2.acloud.com" gw_dst="cb$1dst-AS2_cb$1dst_router.dc2.acloud.com" symmetrical="YES">
+                    <link_ctn id="link_dc2_cb$1src"/>
+                    <link_ctn id="link_dc2_cb$1dst"/>
+            </ASroute>
+            <!-- clusters to exit AS -->
+            <ASroute src="AS2_cb(.*)" dst="gw_AS2_(.*)" gw_src="cb$1src-AS2_cb$1src_router.dc2.acloud.com" gw_dst="gw_dc2_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc2_cb$1src"/>
+            </ASroute> 
+            <ASroute dst="AS2_cb(.*)" src="gw_AS2_(.*)" gw_dst="cb$1dst-AS2_cb$1dst_router.dc2.acloud.com" gw_src="gw_dc2_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc2_cb$1dst"/>
+            </ASroute> 
+   </AS>
+
+   <AS  id="AS3_dc3"  routing="RuleBased">  
+   <!--small tier-1 datacenter, according to TIA-942 annex G tiers notation, routing : rule based, because of its regularity-->    
+            <!-- 4 clusters, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
+            <!-- clusters -->
+            <cluster id="AS3_cb1" prefix="cb1-" suffix=".dc3.acloud.com" radical="1-40" power="5.2297E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc3_cb1" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS3_cb2" prefix="cb2-" suffix=".dc3.acloud.com" radical="1-50" power="8.8925E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc3_cb2" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS3_cb3" prefix="cb3-" suffix=".dc3.acloud.com"  radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc3_cb3" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <cluster id="AS3_cb4" prefix="cb4-" suffix=".dc3.acloud.com" radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+            <link   id="link_dc3_cb4" bandwidth="1.25E9" latency="1.0E-4"/>
+
+            <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+            <AS id="gw_AS3_dc3" routing="Floyd">
+                <!-- equipments-->
+                    <router id="gw_dc3_horizdist"/>
+                    <router id="gw_dc3_maindist"/>
+                    <router id="gw_dc3_entranceroom"/>
+                    <!-- ISP end point, entering the cloud, so it has coordinates -->
+                    <router id="router_AS3_dc3" coordinates="6.0 5.7 6.6" />
+                    <!-- links -->
+                    <link id="dc3_horizdist_maindist"        bandwidth="1.25E9" latency="1.0E-4"/>        
+                    <link id="dc3_maindist_entranceroom"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                        <link id="dc3_entranceroom_ISP"        bandwidth="1.25E9" latency="1.0E-4"/>  
+                    <!-- links to router relationships -->
+                    <route src="gw_dc3_horizdist" dst="gw_dc3_maindist"><link_ctn id="dc3_horizdist_maindist"/></route>
+                    <route src="gw_dc3_maindist" dst="gw_dc3_entranceroom"><link_ctn id="dc3_maindist_entranceroom"/></route>
+                    <route src="gw_dc3_entranceroom" dst="router_AS3_dc3"><link_ctn id="dc3_entranceroom_ISP"/></route>
+            </AS>
+            
+            <!-- internal routes between clusters -->
+            <ASroute src="AS3_cb(.*)" dst="AS3_cb(.*)" gw_src="cb$1src-AS3_cb$1src_router.dc3.acloud.com" gw_dst="cb$1dst-AS3_cb$1dst_router.dc3.acloud.com" symmetrical="YES">
+                    <link_ctn id="link_dc3_cb$1src"/>
+                    <link_ctn id="link_dc3_cb$1dst"/>
+            </ASroute>
+            <!-- clusters to exit AS -->
+            <ASroute src="AS3_cb(.*)" dst="gw_AS3_(.*)" gw_src="cb$1src-AS3_cb$1src_router.dc3.acloud.com" gw_dst="gw_dc3_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc3_cb$1src"/>
+            </ASroute>
+            <ASroute dst="AS3_cb(.*)" src="gw_AS3_(.*)" gw_dst="cb$1dst-AS3_cb$1dst_router.dc3.acloud.com" gw_src="gw_dc3_horizdist" symmetrical="NO">
+                    <link_ctn id="link_dc3_cb$1dst"/>
+            </ASroute>  
+   </AS>
+              
+</AS>
+</platform>
diff --git a/examples/platforms/conf/gridpp_grid_2004.conf b/examples/platforms/conf/gridpp_grid_2004.conf
new file mode 100644 (file)
index 0000000..08c47e5
--- /dev/null
@@ -0,0 +1,72 @@
+#0)WC_Gla
+#1)WC_Edi
+#2)WC_Manc
+#3)WC_Leeds
+#4)WC_Reading
+#5)WC_London
+#6)WC_Bristol
+#7)WC_Portsmouth
+#8)Gla_router
+#9)Edi_router
+#10)NorMAN
+#11)YHMAN
+#12)EastNet
+#13)LMN
+#14)SWAN_BWEMAN
+#15)TVN
+#16)MidMAN
+#17)NNW_router
+#18)Glasgow
+#19)Edi
+#20)Durham
+#21)Sheffield
+#22)Cam
+#23)UCL
+#24)IC
+#25)QMW
+#26)Brunel
+#27)RHNBC
+#28)Bristol
+#29)RAL
+#30)Oxford
+#31)B_ham
+#32)L_pool
+#33)Manc
+#34)Lanc
+#35)CERN
+0 0 0 10000 10000 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 10000 0 0 10000 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 10000 0 0 10000 10000 0 0 0 0 0 0 0 0 0 0 0 1000 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 10000 10000 0 0 10000 0 0 0 0 622 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 10000 0 0 10000 10000 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 10000 10000 0 0 10000 0 0 0 0 1000 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 10000 0 0 10000 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 10000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 
+0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 155 155 155 155 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 
+0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 622 0 0 0 0 0 
+0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 
+0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 1000 155 0 
+200 1 100000 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+40 1 640000 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+78 1 53000 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+365 1 136000 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+40 1 33000 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+150 1 150000 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+1100 1 400000 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+220 1 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+306 1 280000 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+120 1 60000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+300 1 200000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+972 1 573000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+412 1 380000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+150 1 90000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+1890 1 163000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+225 1 100000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+320 1 640000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 1 10000000 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
diff --git a/examples/platforms/conf/gridpp_grid_2004.xml b/examples/platforms/conf/gridpp_grid_2004.xml
new file mode 100644 (file)
index 0000000..d8beea2
--- /dev/null
@@ -0,0 +1,233 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Floyd">
+<!--0 WC_Gla-->
+<!--1 WC_Edi-->
+<!--2 WC_Manc-->
+<!--3 WC_Leeds-->
+<!--4 WC_Reading-->
+<!--5 WC_London-->
+<!--6 WC_Bristol-->
+<!--7 WC_Portsmouth-->
+<!--8 Gla_router-->
+<!--9 Edi_router-->
+<!--10 NorMAN-->
+<!--11 YHMAN-->
+<!--12 EastNet-->
+<!--13 LMN-->
+<!--14 SWAN_BWEMAN-->
+<!--15 TVN-->
+<!--16 MidMAN-->
+<!--17 NNW_router-->
+<!--18 Glasgow-->
+<!--19 Edi-->
+<!--20 Durham-->
+<!--21 Sheffield-->
+<!--22 Cam-->
+<!--23 UCL-->
+<!--24 IC-->
+<!--25 QMW-->
+<!--26 Brunel-->
+<!--27 RHNBC-->
+<!--28 Bristol-->
+<!--29 RAL-->
+<!--30 Oxford-->
+<!--31 B_ham-->
+<!--32 L_pool-->
+<!--33 Manc-->
+<!--34 Lanc-->
+<!--35 CERN-->
+       <host id="WC_Edi" power="1"/>
+       <host id="WC_Manc" power="1"/>
+       <host id="Gla_router" power="1"/>
+       <host id="Glasgow" power="20000000"/>
+       <host id="Edi" power="25600000"/>
+       <host id="Durham" power="4134000"/>
+       <host id="Sheffield" power="49640000"/>
+       <host id="Cam" power="1320000"/>
+       <host id="UCL" power="22500000"/>
+       <host id="IC" power="440000000"/>
+       <host id="QMW" power="44000000"/>
+       <host id="Brunel" power="85680000"/>
+       <host id="RHNBC" power="7200000"/>
+       <host id="Bristol" power="60000000"/>
+       <host id="RAL" power="556956000"/>
+       <host id="Oxford" power="156560000"/>
+       <host id="B_ham" power="13500000"/>
+       <host id="L_pool" power="308070000"/>
+       <host id="Manc" power="22500000"/>
+       <host id="Lanc" power="204800000"/>
+       <host id="CERN" power="1"/>
+
+       <router id="WC_Gla"/>
+       <router id="WC_Leeds"/>
+       <router id="WC_Reading"/>
+       <router id="WC_London"/>
+       <router id="WC_Bristol"/>
+       <router id="WC_Portsmouth"/>
+       <router id="Edi_router"/>
+       <router id="NorMAN"/>
+       <router id="YHMAN"/>
+       <router id="EastNet"/>
+       <router id="LMN"/>
+       <router id="SWAN_BWEMAN"/>
+       <router id="TVN"/>
+       <router id="MidMAN"/>
+       <router id="NNW_router"/>
+
+       <link id="link0" bandwidth="10000"/>
+       <link id="link1" bandwidth="10000"/>
+       <link id="link2" bandwidth="1000"/>
+       <link id="link3" bandwidth="10000"/>
+       <link id="link4" bandwidth="1000"/>
+       <link id="link5" bandwidth="10000"/>
+       <link id="link6" bandwidth="10000"/>
+       <link id="link7" bandwidth="1000"/>
+       <link id="link8" bandwidth="1000"/>
+       <link id="link9" bandwidth="10000"/>
+       <link id="link10" bandwidth="622"/>
+       <link id="link11" bandwidth="1000"/>
+       <link id="link12" bandwidth="10000"/>
+       <link id="link13" bandwidth="10000"/>
+       <link id="link14" bandwidth="622"/>
+       <link id="link15" bandwidth="10000"/>
+       <link id="link16" bandwidth="1000"/>
+       <link id="link17" bandwidth="1000"/>
+       <link id="link18" bandwidth="10000"/>
+       <link id="link19" bandwidth="622"/>
+       <link id="link20" bandwidth="2500"/>
+       <link id="link21" bandwidth="1000"/>
+       <link id="link22" bandwidth="1000"/>
+       <link id="link23" bandwidth="155"/>
+       <link id="link24" bandwidth="155"/>
+       <link id="link25" bandwidth="155"/>
+       <link id="link26" bandwidth="155"/>
+       <link id="link27" bandwidth="155"/>
+       <link id="link28" bandwidth="155"/>
+       <link id="link29" bandwidth="155"/>
+       <link id="link30" bandwidth="155"/>
+       <link id="link31" bandwidth="622"/>
+       <link id="link32" bandwidth="622"/>
+       <link id="link33" bandwidth="622"/>
+       <link id="link34" bandwidth="622"/>
+       <link id="link35" bandwidth="155"/>
+       <link id="link36" bandwidth="1000"/>
+       <link id="link37" bandwidth="155"/>
+
+       <route src="WC_Gla" dst="WC_Gla">
+               <link_ctn id="link0"/>
+       </route>
+       <route src="WC_Gla" dst="WC_Edi">
+               <link_ctn id="link1"/>
+       </route>
+       <route src="WC_Gla" dst="WC_Portsmouth">
+               <link_ctn id="link2"/>
+       </route>
+       <route src="WC_Edi" dst="WC_Manc">
+               <link_ctn id="link3"/>
+       </route>
+       <route src="WC_Edi" dst="Gla_router">
+               <link_ctn id="link4"/>
+       </route>
+       <route src="WC_Manc" dst="WC_Manc">
+               <link_ctn id="link5"/>
+       </route>
+       <route src="WC_Manc" dst="WC_Leeds">
+               <link_ctn id="link6"/>
+       </route>
+       <route src="WC_Manc" dst="TVN">
+               <link_ctn id="link7"/>
+       </route>
+       <route src="WC_Manc" dst="MidMAN">
+               <link_ctn id="link8"/>
+       </route>
+       <route src="WC_Leeds" dst="WC_Reading">
+               <link_ctn id="link9"/>
+       </route>
+       <route src="WC_Leeds" dst="Edi_router">
+               <link_ctn id="link10"/>
+       </route>
+       <route src="WC_Leeds" dst="NorMAN">
+               <link_ctn id="link11"/>
+       </route>
+       <route src="WC_Reading" dst="WC_Reading">
+               <link_ctn id="link12"/>
+       </route>
+       <route src="WC_Reading" dst="WC_London">
+               <link_ctn id="link13"/>
+       </route>
+       <route src="WC_Reading" dst="SWAN_BWEMAN">
+               <link_ctn id="link14"/>
+       </route>
+       <route src="WC_London" dst="WC_Bristol">
+               <link_ctn id="link15"/>
+       </route>
+       <route src="WC_London" dst="YHMAN">
+               <link_ctn id="link16"/>
+       </route>
+       <route src="WC_London" dst="EastNet">
+               <link_ctn id="link17"/>
+       </route>
+       <route src="WC_Bristol" dst="WC_Bristol">
+               <link_ctn id="link18"/>
+       </route>
+       <route src="WC_Bristol" dst="LMN">
+               <link_ctn id="link19"/>
+       </route>
+       <route src="WC_Portsmouth" dst="Lanc">
+               <link_ctn id="link20"/>
+       </route>
+       <route src="Gla_router" dst="NNW_router">
+               <link_ctn id="link21"/>
+       </route>
+       <route src="Edi_router" dst="Glasgow">
+               <link_ctn id="link22"/>
+       </route>
+       <route src="NorMAN" dst="Edi">
+               <link_ctn id="link23"/>
+       </route>
+       <route src="YHMAN" dst="Durham">
+               <link_ctn id="link24"/>
+       </route>
+       <route src="EastNet" dst="Sheffield">
+               <link_ctn id="link25"/>
+       </route>
+       <route src="LMN" dst="Cam">
+               <link_ctn id="link26"/>
+       </route>
+       <route src="LMN" dst="UCL">
+               <link_ctn id="link27"/>
+       </route>
+       <route src="LMN" dst="IC">
+               <link_ctn id="link28"/>
+       </route>
+       <route src="LMN" dst="QMW">
+               <link_ctn id="link29"/>
+       </route>
+       <route src="LMN" dst="Brunel">
+               <link_ctn id="link30"/>
+       </route>
+       <route src="SWAN_BWEMAN" dst="RHNBC">
+               <link_ctn id="link31"/>
+       </route>
+       <route src="TVN" dst="Bristol">
+               <link_ctn id="link32"/>
+       </route>
+       <route src="TVN" dst="RAL">
+               <link_ctn id="link33"/>
+       </route>
+       <route src="MidMAN" dst="Oxford">
+               <link_ctn id="link34"/>
+       </route>
+       <route src="NNW_router" dst="B_ham">
+               <link_ctn id="link35"/>
+       </route>
+       <route src="NNW_router" dst="L_pool">
+               <link_ctn id="link36"/>
+       </route>
+       <route src="NNW_router" dst="Manc">
+               <link_ctn id="link37"/>
+       </route>
+</AS>
+</platform> 
diff --git a/examples/platforms/conf/lcg_sept2004_grid.conf b/examples/platforms/conf/lcg_sept2004_grid.conf
new file mode 100644 (file)
index 0000000..e5faf54
--- /dev/null
@@ -0,0 +1,101 @@
+1400 1 1050000000 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+70 1 26000000 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 1000 155 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 10000 0 155 155 155 155 155 155 155 155 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+1890 1 314000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+112 1 5000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+112 1 5000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+112 1 5000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+48 1 2000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+240 1 32000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+130 1 7000000 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 155 0 0 0 0 0 0 0 0 155 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+64 1 7000000 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 155 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+25 1 500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+25 1 500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 10000 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+26 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+140 1 4000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 622 0 0 2500 0 0 0 0 1000 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 155 1000 155 155 155 155 155 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+978 1 158000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 10000 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 1000 1000 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+210 1 10000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+210 1 100000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 155 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+34 1 13000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+260 1 25000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 155 155 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+60 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+120 1 10000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 155 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 155 155 155 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+90 1 6000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+130 1 3000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+16 1 13000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 12000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 1000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 10000 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 1000 155 10000 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+1232 1 36000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+652 1 7000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 1000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+1138 1 69000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 1000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+230 1 40000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 10000 0 0 0 0 10000 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+766 1 186000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+64 1 7000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 1000 1000 1000 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+140 1 27000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+260 1 2500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 155 0 0 155 155 155 155 155 155 155 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 155 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+200 1 46000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+74 1 8000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+4 1 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 10000 0 0 0 0 3000 0 0 3000 0 0 0 0 0 10000 10000 0 0 0 0 622 0 0 0 622 
+400 1 134000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 1000 3000 0 0 3000 0 0 0 0 0 0 0 0 0 10000 0 0 2500 0 0 0 0 0 0 
+274 1 52000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3000 0 0 155 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+24 1 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3000 0 3000 0 0 0 10000 0 155 155 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+60 1 4000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+320 1 8000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3000 0 0 0 0 0 0 10000 0 0 0 10000 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 155 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 
+120 1 19000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 10000 0 0 10000 0 3000 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 155 3000 0 0 0 0 0 0 0 0 0 0 
+20 1 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 3000 3000 0 0 10000 622 0 0 0 155 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 10000 0 0 0 0 0 0 0 0 0 0 0 0 0 10000 0 0 0 33 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 1000 622 0 0 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 622 0 0 155 155 0 0 0 0 
+254 1 34000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 155 0 0 155 155 622 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155 0 0 0 0 
+446 1 63000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 
+50 1 5000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
diff --git a/examples/platforms/conf/lcg_sept2004_grid.xml b/examples/platforms/conf/lcg_sept2004_grid.xml
new file mode 100644 (file)
index 0000000..c97214e
--- /dev/null
@@ -0,0 +1,618 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Floyd">
+       <host id="0" power="1470000000000"/>
+       <host id="1" power="1820000000"/>
+       <host id="2" power="1"/>
+       <host id="4" power="593460000000"/>
+       <host id="5" power="560000000"/>
+       <host id="6" power="560000000"/>
+       <host id="7" power="560000000"/>
+       <host id="8" power="96000000"/>
+       <host id="9" power="7680000000"/>
+       <host id="10" power="910000000"/>
+       <host id="12" power="250000000"/>
+       <host id="13" power="448000000"/>
+       <host id="15" power="12500000"/>
+       <host id="16" power="12500000"/>
+       <host id="18" power="78000000"/>
+       <host id="20" power="560000000"/>
+       <host id="23" power="60000000"/>
+       <host id="24" power="154524000000"/>
+       <host id="25" power="60000000"/>
+       <host id="26" power="60000000"/>
+       <host id="27" power="60000000"/>
+       <host id="28" power="60000000"/>
+       <host id="29" power="60000000"/>
+       <host id="30" power="60000000"/>
+       <host id="31" power="1"/>
+       <host id="32" power="2100000000"/>
+       <host id="33" power="21000000000"/>
+       <host id="35" power="442000000"/>
+       <host id="36" power="6500000000"/>
+       <host id="38" power="300000000"/>
+       <host id="39" power="1200000000"/>
+       <host id="42" power="540000000"/>
+       <host id="43" power="390000000"/>
+       <host id="44" power="208000000"/>
+       <host id="45" power="600000000"/>
+       <host id="49" power="44352000000"/>
+       <host id="50" power="4564000000"/>
+       <host id="52" power="78522000000"/>
+       <host id="54" power="9200000000"/>
+       <host id="56" power="142476000000"/>
+       <host id="57" power="448000000"/>
+       <host id="59" power="3780000000"/>
+       <host id="60" power="250000000"/>
+       <host id="61" power="650000000"/>
+       <host id="64" power="9200000000"/>
+       <host id="65" power="250000000"/>
+       <host id="66" power="250000000"/>
+       <host id="67" power="592000000"/>
+       <host id="68" power="250000000"/>
+       <host id="69" power="250000000"/>
+       <host id="70" power="250000000"/>
+       <host id="71" power="4000000"/>
+       <host id="72" power="250000000"/>
+       <host id="73" power="250000000"/>
+       <host id="74" power="1"/>
+       <host id="75" power="53600000000"/>
+       <host id="77" power="14248000000"/>
+       <host id="79" power="24000000"/>
+       <host id="82" power="240000000"/>
+       <host id="83" power="2560000000"/>
+       <host id="86" power="2280000000"/>
+       <host id="89" power="20000000"/>
+       <host id="93" power="250000000"/>
+       <host id="95" power="8636000000"/>
+       <host id="97" power="250000000"/>
+       <host id="98" power="250000000"/>
+       <host id="99" power="28098000000"/>
+       <host id="100" power="250000000"/>
+
+       <router id="3"/>
+       <router id="11"/>
+       <router id="14"/>
+       <router id="17"/>
+       <router id="19"/>
+       <router id="21"/>
+       <router id="22"/>
+       <router id="34"/>
+       <router id="37"/>
+       <router id="40"/>
+       <router id="41"/>
+       <router id="46"/>
+       <router id="47"/>
+       <router id="48"/>
+       <router id="51"/>
+       <router id="53"/>
+       <router id="55"/>
+       <router id="58"/>
+       <router id="62"/>
+       <router id="63"/>
+       <router id="76"/>
+       <router id="78"/>
+       <router id="80"/>
+       <router id="81"/>
+       <router id="84"/>
+       <router id="85"/>
+       <router id="87"/>
+       <router id="88"/>
+       <router id="90"/>
+       <router id="91"/>
+       <router id="92"/>
+       <router id="94"/>
+       <router id="96"/>
+
+       <link id="link0" bandwidth="1000"/>
+       <link id="link1" bandwidth="10000"/>
+       <link id="link2" bandwidth="10000"/>
+       <link id="link3" bandwidth="155"/>
+       <link id="link4" bandwidth="10000"/>
+       <link id="link5" bandwidth="10000"/>
+       <link id="link6" bandwidth="10000"/>
+       <link id="link7" bandwidth="155"/>
+       <link id="link8" bandwidth="155"/>
+       <link id="link9" bandwidth="155"/>
+       <link id="link10" bandwidth="155"/>
+       <link id="link11" bandwidth="155"/>
+       <link id="link12" bandwidth="155"/>
+       <link id="link13" bandwidth="155"/>
+       <link id="link14" bandwidth="155"/>
+       <link id="link15" bandwidth="10000"/>
+       <link id="link16" bandwidth="10000"/>
+       <link id="link17" bandwidth="155"/>
+       <link id="link18" bandwidth="155"/>
+       <link id="link19" bandwidth="155"/>
+       <link id="link20" bandwidth="155"/>
+       <link id="link21" bandwidth="155"/>
+       <link id="link22" bandwidth="622"/>
+       <link id="link23" bandwidth="622"/>
+       <link id="link24" bandwidth="155"/>
+       <link id="link25" bandwidth="10000"/>
+       <link id="link26" bandwidth="2500"/>
+       <link id="link27" bandwidth="155"/>
+       <link id="link28" bandwidth="2500"/>
+       <link id="link29" bandwidth="1000"/>
+       <link id="link30" bandwidth="10000"/>
+       <link id="link31" bandwidth="10000"/>
+       <link id="link32" bandwidth="155"/>
+       <link id="link33" bandwidth="1000"/>
+       <link id="link34" bandwidth="155"/>
+       <link id="link35" bandwidth="155"/>
+       <link id="link36" bandwidth="155"/>
+       <link id="link37" bandwidth="155"/>
+       <link id="link38" bandwidth="155"/>
+       <link id="link39" bandwidth="155"/>
+       <link id="link40" bandwidth="1000"/>
+       <link id="link41" bandwidth="1000"/>
+       <link id="link42" bandwidth="10000"/>
+       <link id="link43" bandwidth="2500"/>
+       <link id="link44" bandwidth="10000"/>
+       <link id="link45" bandwidth="155"/>
+       <link id="link46" bandwidth="155"/>
+       <link id="link47" bandwidth="2500"/>
+       <link id="link48" bandwidth="155"/>
+       <link id="link49" bandwidth="155"/>
+       <link id="link50" bandwidth="10000"/>
+       <link id="link51" bandwidth="155"/>
+       <link id="link52" bandwidth="10000"/>
+       <link id="link53" bandwidth="155"/>
+       <link id="link54" bandwidth="155"/>
+       <link id="link55" bandwidth="155"/>
+       <link id="link56" bandwidth="155"/>
+       <link id="link57" bandwidth="2500"/>
+       <link id="link58" bandwidth="1000"/>
+       <link id="link59" bandwidth="10000"/>
+       <link id="link60" bandwidth="2500"/>
+       <link id="link61" bandwidth="2500"/>
+       <link id="link62" bandwidth="155"/>
+       <link id="link63" bandwidth="10000"/>
+       <link id="link64" bandwidth="10000"/>
+       <link id="link65" bandwidth="1000"/>
+       <link id="link66" bandwidth="155"/>
+       <link id="link67" bandwidth="10000"/>
+       <link id="link68" bandwidth="10000"/>
+       <link id="link69" bandwidth="1000"/>
+       <link id="link70" bandwidth="10000"/>
+       <link id="link71" bandwidth="1000"/>
+       <link id="link72" bandwidth="10000"/>
+       <link id="link73" bandwidth="622"/>
+       <link id="link74" bandwidth="1000"/>
+       <link id="link75" bandwidth="1000"/>
+       <link id="link76" bandwidth="1000"/>
+       <link id="link77" bandwidth="10000"/>
+       <link id="link78" bandwidth="155"/>
+       <link id="link79" bandwidth="155"/>
+       <link id="link80" bandwidth="155"/>
+       <link id="link81" bandwidth="155"/>
+       <link id="link82" bandwidth="155"/>
+       <link id="link83" bandwidth="155"/>
+       <link id="link84" bandwidth="155"/>
+       <link id="link85" bandwidth="155"/>
+       <link id="link86" bandwidth="155"/>
+       <link id="link87" bandwidth="155"/>
+       <link id="link88" bandwidth="155"/>
+       <link id="link89" bandwidth="2500"/>
+       <link id="link90" bandwidth="10000"/>
+       <link id="link91" bandwidth="3000"/>
+       <link id="link92" bandwidth="3000"/>
+       <link id="link93" bandwidth="10000"/>
+       <link id="link94" bandwidth="10000"/>
+       <link id="link95" bandwidth="622"/>
+       <link id="link96" bandwidth="622"/>
+       <link id="link97" bandwidth="1000"/>
+       <link id="link98" bandwidth="3000"/>
+       <link id="link99" bandwidth="3000"/>
+       <link id="link100" bandwidth="10000"/>
+       <link id="link101" bandwidth="2500"/>
+       <link id="link102" bandwidth="155"/>
+       <link id="link103" bandwidth="10000"/>
+       <link id="link104" bandwidth="10000"/>
+       <link id="link105" bandwidth="155"/>
+       <link id="link106" bandwidth="155"/>
+       <link id="link107" bandwidth="10000"/>
+       <link id="link108" bandwidth="10000"/>
+       <link id="link109" bandwidth="10000"/>
+       <link id="link110" bandwidth="155"/>
+       <link id="link111" bandwidth="10000"/>
+       <link id="link112" bandwidth="10000"/>
+       <link id="link113" bandwidth="3000"/>
+       <link id="link114" bandwidth="155"/>
+       <link id="link115" bandwidth="3000"/>
+       <link id="link116" bandwidth="10000"/>
+       <link id="link117" bandwidth="622"/>
+       <link id="link118" bandwidth="155"/>
+       <link id="link119" bandwidth="33"/>
+       <link id="link120" bandwidth="1000"/>
+       <link id="link121" bandwidth="622"/>
+       <link id="link122" bandwidth="155"/>
+       <link id="link123" bandwidth="155"/>
+       <link id="link124" bandwidth="155"/>
+       <link id="link125" bandwidth="155"/>
+       <link id="link126" bandwidth="622"/>
+
+       <route src="0" dst="2">
+               <link_ctn id="link0"/>
+       </route>
+       <route src="0" dst="31">
+               <link_ctn id="link1"/>
+       </route>
+       <route src="0" dst="74">
+               <link_ctn id="link2"/>
+       </route>
+       <route src="1" dst="2">
+               <link_ctn id="link3"/>
+       </route>
+       <route src="2" dst="2">
+               <link_ctn id="link4"/>
+       </route>
+       <route src="2" dst="16">
+               <link_ctn id="link5"/>
+       </route>
+       <route src="2" dst="57">
+               <link_ctn id="link6"/>
+       </route>
+       <route src="3" dst="3">
+               <link_ctn id="link7"/>
+       </route>
+       <route src="3" dst="4">
+               <link_ctn id="link8"/>
+       </route>
+       <route src="3" dst="5">
+               <link_ctn id="link9"/>
+       </route>
+       <route src="3" dst="6">
+               <link_ctn id="link10"/>
+       </route>
+       <route src="3" dst="7">
+               <link_ctn id="link11"/>
+       </route>
+       <route src="3" dst="8">
+               <link_ctn id="link12"/>
+       </route>
+       <route src="3" dst="9">
+               <link_ctn id="link13"/>
+       </route>
+       <route src="3" dst="10">
+               <link_ctn id="link14"/>
+       </route>
+       <route src="3" dst="20">
+               <link_ctn id="link15"/>
+       </route>
+       <route src="3" dst="61">
+               <link_ctn id="link16"/>
+       </route>
+       <route src="11" dst="11">
+               <link_ctn id="link17"/>
+       </route>
+       <route src="11" dst="12">
+               <link_ctn id="link18"/>
+       </route>
+       <route src="11" dst="30">
+               <link_ctn id="link19"/>
+       </route>
+       <route src="14" dst="14">
+               <link_ctn id="link20"/>
+       </route>
+       <route src="14" dst="15">
+               <link_ctn id="link21"/>
+       </route>
+       <route src="14" dst="20">
+               <link_ctn id="link22"/>
+       </route>
+       <route src="14" dst="45">
+               <link_ctn id="link23"/>
+       </route>
+       <route src="17" dst="17">
+               <link_ctn id="link24"/>
+       </route>
+       <route src="17" dst="18">
+               <link_ctn id="link25"/>
+       </route>
+       <route src="17" dst="20">
+               <link_ctn id="link26"/>
+       </route>
+       <route src="19" dst="19">
+               <link_ctn id="link27"/>
+       </route>
+       <route src="19" dst="33">
+               <link_ctn id="link28"/>
+       </route>
+       <route src="21" dst="21">
+               <link_ctn id="link29"/>
+       </route>
+       <route src="21" dst="30">
+               <link_ctn id="link30"/>
+       </route>
+       <route src="21" dst="57">
+               <link_ctn id="link31"/>
+       </route>
+       <route src="22" dst="22">
+               <link_ctn id="link32"/>
+       </route>
+       <route src="22" dst="23">
+               <link_ctn id="link33"/>
+       </route>
+       <route src="22" dst="24">
+               <link_ctn id="link34"/>
+       </route>
+       <route src="22" dst="25">
+               <link_ctn id="link35"/>
+       </route>
+       <route src="22" dst="26">
+               <link_ctn id="link36"/>
+       </route>
+       <route src="22" dst="27">
+               <link_ctn id="link37"/>
+       </route>
+       <route src="22" dst="28">
+               <link_ctn id="link38"/>
+       </route>
+       <route src="22" dst="29">
+               <link_ctn id="link39"/>
+       </route>
+       <route src="31" dst="31">
+               <link_ctn id="link40"/>
+       </route>
+       <route src="31" dst="32">
+               <link_ctn id="link41"/>
+       </route>
+       <route src="31" dst="45">
+               <link_ctn id="link42"/>
+       </route>
+       <route src="31" dst="57">
+               <link_ctn id="link43"/>
+       </route>
+       <route src="31" dst="73">
+               <link_ctn id="link44"/>
+       </route>
+       <route src="34" dst="34">
+               <link_ctn id="link45"/>
+       </route>
+       <route src="34" dst="35">
+               <link_ctn id="link46"/>
+       </route>
+       <route src="34" dst="36">
+               <link_ctn id="link47"/>
+       </route>
+       <route src="37" dst="37">
+               <link_ctn id="link48"/>
+       </route>
+       <route src="37" dst="38">
+               <link_ctn id="link49"/>
+       </route>
+       <route src="37" dst="39">
+               <link_ctn id="link50"/>
+       </route>
+       <route src="40" dst="40">
+               <link_ctn id="link51"/>
+       </route>
+       <route src="40" dst="45">
+               <link_ctn id="link52"/>
+       </route>
+       <route src="41" dst="41">
+               <link_ctn id="link53"/>
+       </route>
+       <route src="41" dst="42">
+               <link_ctn id="link54"/>
+       </route>
+       <route src="41" dst="43">
+               <link_ctn id="link55"/>
+       </route>
+       <route src="41" dst="44">
+               <link_ctn id="link56"/>
+       </route>
+       <route src="46" dst="46">
+               <link_ctn id="link57"/>
+       </route>
+       <route src="46" dst="56">
+               <link_ctn id="link58"/>
+       </route>
+       <route src="46" dst="57">
+               <link_ctn id="link59"/>
+       </route>
+       <route src="46" dst="75">
+               <link_ctn id="link60"/>
+       </route>
+       <route src="46" dst="79">
+               <link_ctn id="link61"/>
+       </route>
+       <route src="46" dst="95">
+               <link_ctn id="link62"/>
+       </route>
+       <route src="47" dst="47">
+               <link_ctn id="link63"/>
+       </route>
+       <route src="47" dst="54">
+               <link_ctn id="link64"/>
+       </route>
+       <route src="48" dst="48">
+               <link_ctn id="link65"/>
+       </route>
+       <route src="48" dst="49">
+               <link_ctn id="link66"/>
+       </route>
+       <route src="48" dst="50">
+               <link_ctn id="link67"/>
+       </route>
+       <route src="48" dst="54">
+               <link_ctn id="link68"/>
+       </route>
+       <route src="51" dst="51">
+               <link_ctn id="link69"/>
+       </route>
+       <route src="51" dst="52">
+               <link_ctn id="link70"/>
+       </route>
+       <route src="53" dst="53">
+               <link_ctn id="link71"/>
+       </route>
+       <route src="53" dst="54">
+               <link_ctn id="link72"/>
+       </route>
+       <route src="55" dst="55">
+               <link_ctn id="link73"/>
+       </route>
+       <route src="58" dst="58">
+               <link_ctn id="link74"/>
+       </route>
+       <route src="58" dst="59">
+               <link_ctn id="link75"/>
+       </route>
+       <route src="58" dst="60">
+               <link_ctn id="link76"/>
+       </route>
+       <route src="58" dst="61">
+               <link_ctn id="link77"/>
+       </route>
+       <route src="62" dst="62">
+               <link_ctn id="link78"/>
+       </route>
+       <route src="62" dst="65">
+               <link_ctn id="link79"/>
+       </route>
+       <route src="62" dst="66">
+               <link_ctn id="link80"/>
+       </route>
+       <route src="62" dst="67">
+               <link_ctn id="link81"/>
+       </route>
+       <route src="62" dst="68">
+               <link_ctn id="link82"/>
+       </route>
+       <route src="62" dst="69">
+               <link_ctn id="link83"/>
+       </route>
+       <route src="62" dst="70">
+               <link_ctn id="link84"/>
+       </route>
+       <route src="62" dst="71">
+               <link_ctn id="link85"/>
+       </route>
+       <route src="62" dst="72">
+               <link_ctn id="link86"/>
+       </route>
+       <route src="63" dst="63">
+               <link_ctn id="link87"/>
+       </route>
+       <route src="63" dst="64">
+               <link_ctn id="link88"/>
+       </route>
+       <route src="74" dst="74">
+               <link_ctn id="link89"/>
+       </route>
+       <route src="74" dst="75">
+               <link_ctn id="link90"/>
+       </route>
+       <route src="74" dst="80">
+               <link_ctn id="link91"/>
+       </route>
+       <route src="74" dst="83">
+               <link_ctn id="link92"/>
+       </route>
+       <route src="74" dst="89">
+               <link_ctn id="link93"/>
+       </route>
+       <route src="74" dst="90">
+               <link_ctn id="link94"/>
+       </route>
+       <route src="74" dst="95">
+               <link_ctn id="link95"/>
+       </route>
+       <route src="74" dst="99">
+               <link_ctn id="link96"/>
+       </route>
+       <route src="76" dst="76">
+               <link_ctn id="link97"/>
+       </route>
+       <route src="76" dst="77">
+               <link_ctn id="link98"/>
+       </route>
+       <route src="76" dst="80">
+               <link_ctn id="link99"/>
+       </route>
+       <route src="76" dst="90">
+               <link_ctn id="link100"/>
+       </route>
+       <route src="76" dst="93">
+               <link_ctn id="link101"/>
+       </route>
+       <route src="78" dst="78">
+               <link_ctn id="link102"/>
+       </route>
+       <route src="78" dst="79">
+               <link_ctn id="link103"/>
+       </route>
+       <route src="80" dst="80">
+               <link_ctn id="link104"/>
+       </route>
+       <route src="81" dst="81">
+               <link_ctn id="link105"/>
+       </route>
+       <route src="81" dst="82">
+               <link_ctn id="link106"/>
+       </route>
+       <route src="81" dst="83">
+               <link_ctn id="link107"/>
+       </route>
+       <route src="84" dst="84">
+               <link_ctn id="link108"/>
+       </route>
+       <route src="84" dst="86">
+               <link_ctn id="link109"/>
+       </route>
+       <route src="85" dst="85">
+               <link_ctn id="link110"/>
+       </route>
+       <route src="85" dst="86">
+               <link_ctn id="link111"/>
+       </route>
+       <route src="87" dst="87">
+               <link_ctn id="link112"/>
+       </route>
+       <route src="87" dst="89">
+               <link_ctn id="link113"/>
+       </route>
+       <route src="88" dst="88">
+               <link_ctn id="link114"/>
+       </route>
+       <route src="88" dst="89">
+               <link_ctn id="link115"/>
+       </route>
+       <route src="90" dst="90">
+               <link_ctn id="link116"/>
+       </route>
+       <route src="90" dst="91">
+               <link_ctn id="link117"/>
+       </route>
+       <route src="90" dst="95">
+               <link_ctn id="link118"/>
+       </route>
+       <route src="91" dst="93">
+               <link_ctn id="link119"/>
+       </route>
+       <route src="92" dst="92">
+               <link_ctn id="link120"/>
+       </route>
+       <route src="92" dst="93">
+               <link_ctn id="link121"/>
+       </route>
+       <route src="94" dst="94">
+               <link_ctn id="link122"/>
+       </route>
+       <route src="94" dst="95">
+               <link_ctn id="link123"/>
+       </route>
+       <route src="96" dst="96">
+               <link_ctn id="link124"/>
+       </route>
+       <route src="96" dst="97">
+               <link_ctn id="link125"/>
+       </route>
+       <route src="96" dst="98">
+               <link_ctn id="link126"/>
+       </route>
+</AS>
+</platform> 
diff --git a/examples/platforms/conf/transform_optorsim_platform.pl b/examples/platforms/conf/transform_optorsim_platform.pl
new file mode 100644 (file)
index 0000000..5b021e2
--- /dev/null
@@ -0,0 +1,175 @@
+#!/usr/bin/perl -w
+use strict;
+
+if($#ARGV!=0) {
+    die "Usage: perl transfrom_optorsim_platform.pl <file.conf>\n";
+}
+
+my($conf_file)=$ARGV[0];
+
+open FILE, $conf_file or die "Unable to open $conf_file";
+
+print "<?xml version='1.0'?>\n";
+print "<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid.dtd\">\n";
+print "<platform version=\"3\">\n";
+print "<AS  id=\"AS0\"  routing=\"Floyd\">\n";
+
+my $line;
+my @tokens;
+my $token;
+my $dst = 0;
+my $src = 0;
+my @list_of_name;
+my $num_link = 0;
+
+my @links = ();
+my @links_router = ();
+my @routers = ();
+my @hosts = ();
+my @is_router = ();
+my @routes = ();
+my @routes_router = ();
+my @routes_cluster = ();
+my $nb_host;
+while(defined($line=<FILE>))
+{
+       
+if($line =~ /^#(.*)\)(.*)$/)
+{
+       print "<!--$1 $2-->\n";
+       push @list_of_name, $2;
+}
+elsif($line =~ /^([0-9]*) ([0-9]*) ([0-9]*) (.*)$/)
+{
+       if($1 == "0"){
+               push @is_router, 1;
+               if(@list_of_name){
+                       push @routers, "\t\t<router id=\"$list_of_name[$src]\"/>\n";
+               }
+               else{
+                       push @routers, "\t\t<router id=\"router$src\"/>\n";
+               }
+       }
+       else{
+               push @is_router, 0;
+               $nb_host = $1;
+               if(@list_of_name){
+                       push @hosts, "\t<cluster id=\"$list_of_name[$src]\" prefix=\"$list_of_name[$src]-\" suffix=\"\"\n";
+                       push @hosts, "\t         radical=\"1-$nb_host\" power=\"1000000000\"    bw=\"125000000\"     lat=\"5E-5\"\n";
+                       push @hosts, "\t         router_id=\"$list_of_name[$src]-router\"/>\n";
+               }
+               else{
+                       push @hosts, "\t<cluster id=\"cluster$src\" prefix=\"$list_of_name[$src]-\" suffix=\"\"\n";
+                       push @hosts, "\t         radical=\"1-$nb_host\" power=\"1000000000\"    bw=\"125000000\"     lat=\"5E-5\"\n";
+                       push @hosts, "\t         router_id=\"cluster$src-router\"/>\n";
+               }
+       }               
+       my $table = $4;
+       @tokens = split(/ /,$table);
+       foreach $token (@tokens) {
+               if($src >= $dst){
+                       if($token != "0") #if there is a link between src and dst
+                       {       
+                               #Create a link                          
+                               if($1 == "0"){ 
+                                       push @links_router, "\t\t<link id=\"link$num_link\" bandwidth=\"$token\"/>\n";
+                               }
+                               else{
+                                       push @links, "\t<link id=\"link$num_link\" bandwidth=\"$token\"/>\n";
+                               }
+
+                               #Create the route between router and router
+                               if($is_router[$src] && $is_router[$dst]) 
+                               {
+                                       if(@list_of_name){
+                                               push @routes_router, "\t\t<route src=\"$list_of_name[$src]\" dst=\"$list_of_name[$dst]\">\n";
+                                       }
+                                       else{
+                                               push @routes_router, "\t\t<route src=\"router$src\" dst=\"router$dst\">\n";
+                                       }
+                                       push @routes_router, "\t\t\t<link_ctn id=\"link$num_link\"/>\n";
+                                       push @routes_router, "\t\t</route>\n";
+                               }
+
+                               #Create the route between cluster and cluster
+                               elsif(!$is_router[$src] && !$is_router[$dst]) 
+                               {
+                                       if(@list_of_name){
+                                       push @routes_cluster, "\t\t<ASroute src=\"$list_of_name[$src]\" dst=\"$list_of_name[$dst]\"\n";
+                                       push @routes_cluster, "\t\t     gw_src=\"$list_of_name[$src]-router\" gw_dst=\"$list_of_name[$dst]-router\">\n";
+                                       }
+                                       else{
+                                       push @routes_cluster, "\t\t<ASroute src=\"cluster$src\" dst=\"cluster$dst\"\n";
+                                       push @routes_cluster, "\t\t    gw_src=\"cluster$src-router\" dst=\"cluster$dst-router\">\n";
+                                       }
+                                       push @routes_cluster, "\t\t\t<link_ctn id=\"link$num_link\"/>\n";
+                                       push @routes_cluster, "\t\t</ASroute>\n";
+                               }                               
+                               else
+                               {
+                                       push @routes, "\t<ASroute ";
+                                       if(@list_of_name){
+                                               if($is_router[$src])    #router
+                                                       {push @routes, "src=\"AS_intern\" gw_src=\"$list_of_name[$src]\"\n";}
+                                               else                    #cluster
+                                                       {push @routes, "src=\"$list_of_name[$src]\" gw_src=\"$list_of_name[$src]-router\"\n";}
+
+
+                                               if($is_router[$dst])    #router
+                                                       {push @routes, "\t\tdst=\"AS_intern\" gw_dst=\"$list_of_name[$dst]\">\n";}
+                                               else                    #cluster
+                                                       {push @routes, "\t\tdst=\"$list_of_name[$dst]\" gw_dst=\"$list_of_name[$dst]-router\">\n";}
+                                       }
+                                       else{
+                                               if($is_router[$src])    #router
+                                                       {push @routes, "src=\"AS_intern\" gw_src=\"router$src\"\n";}
+                                               else                    #cluster
+                                                       {push @routes, "src=\"cluster$src\" gw_src=\"cluster$src-router\"\n";}
+
+
+                                               if($is_router[$dst])    #router
+                                                       {push @routes, "\t\tdst=\"AS_intern\" gw_dst=\"router$dst\">\n";}
+                                               else                    #cluster
+                                                       {push @routes, "\t\tdst=\"cluster$dst\" gw_dst=\"cluster$dst-router\">\n";}
+                                       }
+                                       push @routes, "\t\t<link_ctn id=\"link$num_link\"/>\n";
+                                       push @routes, "\t</ASroute>\n";
+
+                               }
+
+                               $num_link++;    
+                       }
+               }
+               $dst++;
+       }
+       $src++;
+       $dst = 0;
+}
+else
+{
+die;
+}
+       
+       
+}
+close(FILE);
+
+print "\t<AS  id=\"AS_intern\"  routing=\"Floyd\">\n";
+print @routers;
+print @links_router;
+print @routes_router;
+print "\t</AS>\n";
+print "\n";    
+print @hosts;
+print @routes_cluster;
+print "\n";
+
+print @links;
+print "\n";
+print @routes;
+print "\n";
+
+print "</AS>\n";
+print "</platform>";
+
+print " \n";
diff --git a/examples/platforms/data_center.xml b/examples/platforms/data_center.xml
new file mode 100644 (file)
index 0000000..015e934
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<config id="General">
+    <prop id="network/coordinates" value="yes"></prop>
+</config>
+
+<AS  id="AS0"  routing="Vivaldi">
+    <AS  id="dataCenter1"  routing="RuleBased">
+      
+    <!-- 3 cabinets, no zone dist area, 1 horiz dist area, no multi-homing, telecom and operation rooms omitted because not a part of the production platform  -->
+    <!-- cabinets -->
+    <cluster id="cabinet1" prefix="cb1-" suffix=".dc1.acloud.com" radical="1-40" power="5.2297E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+    <link   id="link_dc1_cb1" bandwidth="1.25E9" latency="1.0E-4"/>
+    <cluster id="cabinet2" prefix="cb2-" suffix=".dc1.acloud.com" radical="1-50" power="8.8925E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+    <link   id="link_dc1_cb2" bandwidth="1.25E9" latency="1.0E-4"/>
+    <cluster id="cabinet3" prefix="cb3-" suffix=".dc1.acloud.com" radical="1-30" power="13.357E9" bw="1.25E8" lat="1.0E-4" bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
+    <link   id="link_dc1_cb3" bandwidth="1.25E9" latency="1.0E-4"/>
+    <!-- horiz dist area switch, main dist area switch, entrance room switch, end point for ISP  -->
+    <AS id="gw_dataCenter1" routing="Floyd">
+        <!-- equipments-->
+        <router id="gw_dc1_horizdist"/>
+        <router id="gw_dc1_maindist"/>
+        <router id="gw_dc1_entranceroom"/>
+                    
+        <!-- ISP end point, entering the cloud, so it has coordinates -->
+        <router id="router_dataCenter1" coordinates="25.5 9.4 1.4" />
+                    
+        <!-- links -->
+        <link id="dc1_horizdist_maindist"        bandwidth="1.25E9" latency="1.0E-4"/>        
+        <link id="dc1_maindist_entranceroom"        bandwidth="1.25E9" latency="1.0E-4"/>  
+        <link id="dc1_entranceroom_ISP"        bandwidth="1.25E9" latency="1.0E-4"/> 
+                     
+        <!-- links to router relationships -->
+        <route src="gw_dc1_horizdist" dst="gw_dc1_maindist"><link_ctn id="dc1_horizdist_maindist"/></route>
+        <route src="gw_dc1_maindist" dst="gw_dc1_entranceroom"><link_ctn id="dc1_maindist_entranceroom"/></route>
+        <route src="gw_dc1_entranceroom" dst="router_dataCenter1"><link_ctn id="dc1_entranceroom_ISP"/></route>
+    </AS>
+           
+    <!-- internal routes between cabinets -->
+    <ASroute src="cabinet(.*)" dst="cabinet(.*)" gw_src="cb$1src-cabinet$1src_router.dc1.acloud.com" gw_dst="cb$1dst-cabinet$1dst_router.dc1.acloud.com" symmetrical="YES">
+        <link_ctn id="link_dc1_cb$1src"/>
+        <link_ctn id="link_dc1_cb$1dst"/>
+    </ASroute>
+    <!-- cabinets to exit AS -->
+    <ASroute src="cabinet(.*)" dst="gw_AS1_(.*)" gw_src="cb$1src-cabinet$1src_router.dc1.acloud.com" gw_dst="gw_dc1_horizdist" symmetrical="NO">
+        <link_ctn id="link_dc1_cb$1src"/>
+    </ASroute> 
+    <ASroute src="gw_AS1_(.*)" dst="cabinet(.*)" gw_src="gw_dc1_horizdist" gw_dst="cb$1dst-cabinet$1dst_router.dc1.acloud.com" symmetrical="NO">
+        <link_ctn id="link_dc1_cb$1dst"/>
+    </ASroute>    
+   </AS>
+
+</AS>
+</platform>
index dfb9502..9d20e6c 100644 (file)
 
                        <AS id="AS_griffon" routing="RuleBased" >
                                <cluster id="AS_sgriffon1" prefix="griffon-" suffix=".nancy.grid5000.fr"
-                                       radical="1-29;58-60" power="20.678E9" bw="1.25E8" lat="1.0E-4"
+                                       radical="1-29,58-60" power="20.678E9" bw="1.25E8" lat="1.0E-4"
                                        bb_bw="1.25E9" bb_lat="1.0E-4"></cluster>
                                <cluster id="AS_sgriffon2" prefix="griffon-" suffix=".nancy.grid5000.fr"
                                        radical="30-57" power="20.678E9" bw="1.25E8" lat="1.0E-4"
diff --git a/examples/platforms/generation_scripts/create_hierarchical_clusters.pl b/examples/platforms/generation_scripts/create_hierarchical_clusters.pl
new file mode 100755 (executable)
index 0000000..5ddfe9c
--- /dev/null
@@ -0,0 +1,220 @@
+#! /usr/bin/perl
+
+# L.Bobelin (Perl newbie) 25th of November
+# Quick script to generate hierarchical clusters. Usage : <the script> p s d  where :
+# - p : 2^p gives the total number of hosts.
+# - s : cluster size
+# - d : degree of inner nodes.
+#
+# output is the standard one. 
+# 
+#
+#Each node is numbered by a DFS in the tree. Each cluster is numbered by the DFS number of the leaf it is attached to and the number of cluster for each leaf. 
+# Other infos : 
+# - Same bb_lat used for any routers inside (not that complicated to modify too).
+# - constants defined in the first part of the script corresponding to classic cluster parameters. links_bw and links_lat added for the inner tree links
+# - bb_lat and bb_bw used in any backbone of the tree.
+# - fails if you set an obviously too small total number of hosts compared to the cluster size (generates a lot of stuff for nothing actually).
+# 
+
+use Math::BigInt;
+
+$prefix= ""; 
+$suffix= "";
+$bw= "125000000";
+$power= "1000000000";
+$lat= "5E-5";
+$bb_bw= "2250000000";
+$bb_lat= "5E-4"; 
+$links_bw= "2250000000";
+$links_lat= "5E-5";
+$id= "";
+
+$p = $ARGV[0];
+$s = $ARGV[1];
+$d = $ARGV[2];
+
+$p = Math::BigInt->new($p);
+$d = Math::BigInt->new($d);
+$s = Math::BigInt->new($s);
+
+$cabinetnodes= $d;
+$nbsons= $d;
+$radical= "1-" . $s;
+$last=$s;
+
+# Number of clusters to generate ? Update: I hate this bigInt package, the way it behaves is SO stupid 
+$totalnumberofhosts = Math::BigInt->new("2");
+$totalnumberofhosts->bpow($p);
+
+$totalnumberofCluster= $totalnumberofhosts->copy();
+
+$totalnumberofCluster->bdiv($s);
+
+# checking if we have to have something non homogeneous
+if ($totalnumberofhosts->copy()->bmod($s) != 0 ) 
+       {
+               $totalnumberofCluster++;
+               $last= $totalnumberofhosts->copy()->bmod($s);
+       }
+
+# Calculating height
+
+$height= $totalnumberofCluster->copy();
+$height->broot($d);
+
+# Checking if an exact root exists
+if ( $height->bcmp(Math::BigInt->new("1")) != 0 && ($height->copy()->bpow($d))->bcmp($totalnumberofCluster)) { 
+       
+       $height++; #will have to deal with empty set of clusters.       
+       }
+# debug stuff  
+#print "Computed : \n";
+#print STDERR "height: " . $height . "\n";
+#print STDERR "totalnumberofhosts: " . $totalnumberofhosts . "\n";
+#print STDERR "totalnumberofcluster: " .  $totalnumberofCluster . "\n";
+#print STDERR "last cluster size (if equals to cluster size, then all clusters will be homogeneous) : " . $last . "\n";
+
+# Counter for giving unique IDs to ASes.
+$ASnumber;
+$ASnumber = 0;
+
+# Printing preamble
+print "<?xml version='1.0'?>\n";
+print "<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid.dtd\">\n";
+print "<platform version=\"3\">\n";
+
+       
+# Initiate recursion ...
+&DF_creation(0);
+
+# Closing tag, and then back home
+print "</platform>\n"; 
+
+# Recursive stuff for depth first Se... Creation
+sub DF_creation {
+       my($currDepth) = @_;
+       
+       # Curr AS creation
+       print "<AS id=\"". $prefix . "AS_" . $ASnumber . $suffix . "\"  routing=\"Full\">\n";   
+       
+       # Curr router AS creation stuff
+       print "<AS id=\"". $prefix . "exitAS_" . $ASnumber . $suffix . "\"  routing=\"Full\">\n";                        
+       print " <router id=\"" . $prefix . "router_" . $ASnumber . $suffix . "\"/>\n";
+       print "</AS>\n";
+       # Saving my current number to return it to my father
+       my $toReturn = $ASnumber;
+       $ASnumber++;
+       if ($currDepth<$height && $totalnumberofCluster > 0)
+               {               
+               # Creating current AS inner stuff
+               # I should have a table of sons numbers.
+               my @tsons = ();
+               my $createdSons = 0;
+               for (my $i =1; $i<=$nbsons && $totalnumberofCluster > 0 ; $i++)
+               {
+               #saving this son in my tab ...  recursive call to create ASes and cluster underneath
+               push(@tsons, &DF_creation($currDepth + 1)); 
+               $createdSons++;
+               #               
+               # Creating link to this son
+               print "<link id=\"". $prefix . $tsons[$i-1] . $suffix . "\" bandwidth=\"" . $links_bw . "\" latency=\"" . $links_lat . "\"/>\n";        
+               }
+               # curr backbone creation 
+               print "<link id=\"". $prefix . "bb_" . $toReturn . $suffix . "\" bandwidth=\"" . $bb_bw . "\" latency=\"" . $bb_lat . "\"/>\n";
+               # Full routing AS to AS declaration
+               for (my $i =1; $i<=$createdSons ; $i++)
+               {
+                                       for (my $j =$i+1; $j<=$createdSons ; $j++)
+                                       {
+                                               print  "<ASroute src=\"" . $prefix . "AS_" . $tsons[$i-1] . $suffix . "\"\n";
+                                               print " dst=\"" . $prefix . "AS_" . $tsons[$j-1] . $suffix . "\"\n";
+                                               print " gw_src=\"" . $prefix . "router_" . $tsons[$i-1] . $suffix . "\"\n";
+                                               print " gw_dst=\"" . $prefix . "router_" . $tsons[$j-1] . $suffix . "\"\n";
+                                               print " symmetrical=\"YES\">\n";
+                                               
+                                               print "         <link_ctn id=\"" . $prefix . $tsons[$i-1] . $suffix . "\"/>\n";
+                                               print "         <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                                               print "         <link_ctn id=\"" . $prefix . $tsons[$j-1] . $suffix . "\"/>\n";
+                                               print "</ASroute>\n";
+                                       }
+               }
+               # Now routes to the exit AS
+               for (my $i =1; $i<=$createdSons ; $i++)
+               {
+                       print  "<ASroute src=\"" . $prefix . "AS_" . $tsons[$i-1] . $suffix . "\"\n";
+                       print " dst=\"" . $prefix . "exitAS_" . $toReturn . $suffix . "\"\n";
+                       print " gw_src=\"" . $prefix . "router_" . $tsons[$i-1] . $suffix . "\"\n";
+                       print " gw_dst=\"" . $prefix . "router_" . $toReturn . $suffix . "\"\n";
+                       print " symmetrical=\"YES\">\n";                                                
+                       print "         <link_ctn id=\"" . $prefix . $tsons[$i-1] . $suffix . "\"/>\n";
+                       print "         <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                       print "</ASroute>\n";                   
+               }
+               print "</AS>\n";
+               # DO I have extra stuff to add ? I don't think so.              
+               return $toReturn;
+               }
+       else { # On leaves, 
+               my $lastNumberOfClusterCreated = 0;     
+               #I must create clusters now
+               for(my $i = 1; $i <= $cabinetnodes && $totalnumberofCluster>0 ; $i++) {
+                       $lastNumberOfClusterCreated++;
+                       if ($totalnumberofCluster==1)
+                       {
+                       print "<cluster id=\"". $prefix . "cl_" . $toReturn . "_" . $i . $suffix . "\" prefix=\"" . $prefix . "c_" . $toReturn . "_" . $i . "-\" suffix=\"" . $suffix . "\" radical=\"1-"
+                               . $last . "\" power=\"" . $power . "\" bw=\"" . $bw . "\" lat=\"" . $lat . "\" bb_bw=\"" . $bb_bw . "\" bb_lat=\"" . $bb_lat . "\"/>\n";        
+                       }
+                       else 
+                       {       
+                       print "<cluster id=\"". $prefix . "cl_" . $toReturn . "_" . $i . $suffix . "\" prefix=\"" . $prefix . "c_" . $toReturn . "_" . $i . "-\" suffix=\"" . $suffix . "\" radical=\""
+                               . $radical . "\" power=\"" . $power . "\" bw=\"" . $bw . "\" lat=\"" . $lat . "\" bb_bw=\"" . $bb_bw . "\" bb_lat=\"" . $bb_lat . "\"/>\n";     
+                       }
+                       $totalnumberofCluster--;
+                       }       
+               # Creating links to clusters 
+               for(my $i = 1; $i <= $lastNumberOfClusterCreated ; $i++) {
+                       print "<link id=\"". $prefix . $toReturn . "_" . $i . $suffix . "\" bandwidth=\"" . $links_bw . "\" latency=\"" . $links_lat . "\"/>\n";
+               }
+
+               # 
+               # curr backbone creation 
+               print "<link id=\"". $prefix . "bb_" . $toReturn . $suffix . "\" bandwidth=\"" . $bb_bw . "\" latency=\"" . $bb_lat . "\"/>\n";
+       
+               # I must create routes between clusters now 
+               for (my $i =1; $i<=$lastNumberOfClusterCreated ; $i++)
+                       {
+                                       for (my $j =$i+1; $j<=$lastNumberOfClusterCreated ; $j++)
+                                       {
+                                               print  "<ASroute src=\"" . $prefix . "cl_" . $toReturn . "_" . $i . $suffix .  "\"\n";
+                                               print " dst=\"" .  $prefix . "cl_" . $toReturn . "_" . $j . $suffix .  "\"\n";
+
+                                               print " gw_src=\"" . $prefix . "c_" . $toReturn . "_" . $i . "-" . $prefix . "cl_" . $toReturn . "_" . $i . $suffix . "_router" . $suffix  ."\"\n";
+                                               print " gw_dst=\"" . $prefix . "c_" . $toReturn . "_" . $j . "-" . $prefix . "cl_" . $toReturn . "_" . $j . $suffix  . "_router" . $suffix . "\"\n";
+                                               print " symmetrical=\"YES\">\n";
+                                               
+                                               print "         <link_ctn id=\"" . $prefix . $toReturn. "_" . $i . $suffix . "\"/>\n";
+                                               print "         <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                                               print "         <link_ctn id=\"" . $prefix . $toReturn . "_" . $j . $suffix . "\"/>\n";
+                                               print "</ASroute>\n";
+                                       }
+                       }
+               # Now routes to the exit AS
+               for (my $i =1; $i<=$lastNumberOfClusterCreated ; $i++)
+               {
+                       print  "<ASroute src=\""  . $prefix . "cl_" . $toReturn . "_" . $i . $suffix  . "\"\n";
+                       print " dst=\"" . $prefix . "exitAS_" . $toReturn . $suffix . "\"\n";
+                       # SAME HERE !!
+                       print " gw_src=\"" . $prefix . "c_" . $toReturn . "_" . $i . "-" . $prefix . "cl_" . $toReturn . "_" . $i . $suffix . "_router" . $suffix  ."\"\n";
+                       print " gw_dst=\"" . $prefix . "router_" . $toReturn . $suffix . "\"\n";
+                       print " symmetrical=\"YES\">\n";                                                
+                       print "         <link_ctn id=\"" . $prefix . $toReturn . "_" . $i . $suffix . "\"/>\n";
+                       print "         <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                       print "</ASroute>\n";                   
+               }
+               print "</AS>\n";
+       # Should be done with it...
+       return $toReturn;
+       }
+
+}
diff --git a/examples/platforms/generation_scripts/enhancedDTDwithHierarchicalCluster.pl b/examples/platforms/generation_scripts/enhancedDTDwithHierarchicalCluster.pl
new file mode 100755 (executable)
index 0000000..e5c1124
--- /dev/null
@@ -0,0 +1,215 @@
+#! /usr/bin/perl
+
+# L.Bobelin (Perl newbie) 24th of November
+# Quick script to generate hierarchical clusters. Usage : add the special cluster tag (description below) in your "normal" platform file. Then run the script :
+# - First arg : the input file where you midified your cluster tag
+# - Second one : the output file where all the stuff will be generated.
+# Builds a complete tree to access clusters ; each node of the tree is inclosed in an AS, where full routing applies.
+#
+# Number of cluster per leaf is given by cabinetnodes attr.
+#
+#
+# Choosed to modify a cluster tag to allow to give additional informations : 
+# - nbsons : degree of inner  
+# - height : tree heigth
+# - cabinetnodes : cluster per leaf
+# 
+# Each node is numbered by a DFS in the tree. Each cluster is numbered by the DFS number of the leaf it is attached to and the number of cluster for each leaf. 
+# 
+#       
+# Example syntax for hierarchical cluster creation : 
+# <cluster id="AS_cb1" prefix="cb1-" suffix=".dc1.acloud.com" power="5.2297E9" bw="1.25E8" lat="1.0E-4 bb_bw="1.25E9" bb_lat="1.0E-4" radical="0-99" cabinetnodes="4" height="3" nbsons="2" links_lat="1.0E-4" links_bw="1.25E9"/>
+# Other infos : 
+# - special tag has to be on one line because I don't want to bother with parsing issues
+# - Same bb_lat used for any routers inside (not that complicated to modify too)
+# - lame perl ? I'm a script kiddie in perl, it may well be my first perl stuff. 
+# - Don't try to check or validate the modified file with the DTD, of course, as this is not a part of it.
+
+# Counter for giving unique IDs to ASes.
+$ASnumber;
+$ASnumber = 0;
+
+$infile;
+$outfile; 
+
+$infile = $ARGV[0];
+$outfile = $ARGV[1];
+open IN, "$infile" || die "Cannot parse " . $infile . " ...\n";
+open OUT,">$outfile" || die "Cannot use the output file " . $outfile . " ...\n";
+my $line;
+while ($line = <IN>) {
+# looking for good lines. 
+if ($line =~ / cabinetnodes=/) 
+{ #Retrieving informations
+       ($line=~ /cabinetnodes=\"([^\"]*)/);
+       $cabinetnodes= $1;
+       ($line=~ /height=\"([^\"]*)/);
+       $height= $1;
+       ($line=~ /nbsons=\"([^\"]*)/);
+       $nbsons= $1;
+        ($line=~ /id=\"([^\"]*)/);
+       $id= $1;
+       ($line=~ /prefix=\"([^\"]*)/);
+       $prefix= $1; 
+       ($line=~ /suffix=\"([^\"]*)/);
+       $suffix= $1;
+       ($line=~ /bw=\"([^\"]*)/);
+       $bw= $1;
+       ($line=~ /power=\"([^\"]*)/);
+       $power= $1;
+       ($line=~ /lat=\"([^\"]*)/);
+       $lat= $1;
+       ($line=~ /bb_bw=\"([^\"]*)/);
+       $bb_bw= $1;
+       ($line=~ /bb_lat=\"([^\"]*)/);
+       $bb_lat= $1; 
+       ($line=~ /links_bw=\"([^\"]*)/);
+       $links_bw= $1;
+       ($line=~ /links_lat=\"([^\"]*)/);
+       $links_lat= $1;
+       ($line=~ /radical=\"([^\"]*)/);
+       $radical= $1;
+
+       print "Variables read : \n";
+       print "number of clusters in each cabinet: " . $cabinetnodes . "\n";
+       print "Tree heigth: " . $height . "\n";
+       print "Degree of each node: " . $nbsons . "\n";
+       print "General id: ". $id . "\n";
+       print "General prefix: " . $prefix . "\n";
+       print "General suffix: ". $suffix . "\n";
+       print "Bandwidth for cluster inner links: " . $bw . "\n";
+       print "Power for cluster nodes: " . $power . "\n";
+       print "Latency for clusters inner links :" . $lat . "\n";
+       print "Backbone bandwwidth (used in all backbones, including the tree ones):" . $bb_bw . "\n";
+       print "Backbone latency (used in all backbones, including the tree ones):" . $bb_lat . "\n";
+       print "Tree links bandwidth: " . $links_bw . "\n";
+       print "Tree links latency: " . $links_lat . "\n";
+       print "Radical: " . $radical . "\n";
+
+       
+       
+       &DF_creation(0);
+       }
+else {
+print OUT $line;
+}
+} #End while
+close IN;
+close OUT;
+print $infile . " -> " . $outfile . " ... Done.\n";
+
+# Recursive stuff for depth first Se... Creation
+sub DF_creation {
+       my($currDepth) = @_;
+       
+       # Curr AS creation
+       print OUT "<AS id=\"". $prefix . "AS_" . $ASnumber . $suffix . "\"  routing=\"Full\">\n";       
+       
+       # Curr router AS creation stuff
+       print OUT "<AS id=\"". $prefix . "exitAS_" . $ASnumber . $suffix . "\"  routing=\"Full\">\n";                    
+       print OUT "     <router id=\"" . $prefix . "router_" . $ASnumber . $suffix . "\"/>\n";
+       print OUT "</AS>\n";
+       # Saving my current number to return it to my father
+       my $toReturn = $ASnumber;
+       $ASnumber++;
+       if ($currDepth<$height)
+               {                               
+               # Creating current AS inner stuff
+               # I should have a table of sons numbers.
+               my @tsons = ();
+               for (my $i =1; $i<=$nbsons ; $i++)
+               {
+               #saving this son in my tab ...  recursive call to create ASes and cluster underneath
+               push(@tsons, &DF_creation($currDepth + 1)); 
+               #               
+               # Creating link to this son
+               print OUT "<link id=\"". $prefix . $tsons[$i-1] . $suffix . "\" bandwidth=\"" . $links_bw . "\" latency=\"" . $links_lat . "\"/>\n";    
+               }
+               # curr backbone creation 
+               print OUT "<link id=\"". $prefix . "bb_" . $toReturn . $suffix . "\" bandwidth=\"" . $bb_bw . "\" latency=\"" . $bb_lat . "\"/>\n";
+               # Full routing AS to AS declaration
+               for (my $i =1; $i<=$nbsons ; $i++)
+               {
+                                       for (my $j =$i+1; $j<=$nbsons ; $j++)
+                                       {
+                                               print OUT  "<ASroute src=\"" . $prefix . "AS_" . $tsons[$i-1] . $suffix . "\"\n";
+                                               print OUT "     dst=\"" . $prefix . "AS_" . $tsons[$j-1] . $suffix . "\"\n";
+                                               print OUT "     gw_src=\"" . $prefix . "router_" . $tsons[$i-1] . $suffix . "\"\n";
+                                               print OUT "     gw_dst=\"" . $prefix . "router_" . $tsons[$j-1] . $suffix . "\"\n";
+                                               print OUT "     symmetrical=\"YES\">\n";
+                                               
+                                               print OUT "             <link_ctn id=\"" . $prefix . $tsons[$i-1] . $suffix . "\"/>\n";
+                                               print OUT "             <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                                               print OUT "             <link_ctn id=\"" . $prefix . $tsons[$j-1] . $suffix . "\"/>\n";
+                                               print OUT "</ASroute>\n";
+                                       }
+               }
+               # Now routes to the exit AS
+               for (my $i =1; $i<=$nbsons ; $i++)
+               {
+                       print OUT  "<ASroute src=\"" . $prefix . "AS_" . $tsons[$i-1] . $suffix . "\"\n";
+                       print OUT "     dst=\"" . $prefix . "exitAS_" . $toReturn . $suffix . "\"\n";
+                       print OUT "     gw_src=\"" . $prefix . "router_" . $tsons[$i-1] . $suffix . "\"\n";
+                       print OUT "     gw_dst=\"" . $prefix . "router_" . $toReturn . $suffix . "\"\n";
+                       print OUT "     symmetrical=\"YES\">\n";                                                
+                       print OUT "             <link_ctn id=\"" . $prefix . $tsons[$i-1] . $suffix . "\"/>\n";
+                       print OUT "             <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                       print OUT "</ASroute>\n";                       
+               }
+               print OUT "</AS>\n";
+               # DO I have extra stuff to add ? I don't think so.              
+               return $toReturn;
+               }
+       else { # On leaves, 
+                       
+               #I must create clusters now
+               for(my $i = 1; $i <= $cabinetnodes; $i++) {
+                       print OUT "<cluster id=\"". $prefix . "cluster_" . $toReturn . $i . $suffix . "\" prefix=\"" . $prefix . "c_" . $toReturn. $i . "-\" suffix=\"" . $suffix . "\" radical=\""
+                               . $radical . "\" power=\"" . $power . "\" bw=\"" . $bw . "\" lat=\"" . $lat . "\" bb_bw=\"" . $bb_bw . "\" bb_lat=\"" . $bb_lat . "\"/>\n";     
+                       }       
+               # Creating links to clusters 
+               for(my $i = 1; $i <= $cabinetnodes; $i++) {
+                       print OUT "<link id=\"". $prefix . $toReturn . "_" . $i . $suffix . "\" bandwidth=\"" . $links_bw . "\" latency=\"" . $links_lat . "\"/>\n";
+               }
+
+               # 
+               # curr backbone creation 
+               print OUT "<link id=\"". $prefix . "bb_" . $toReturn . $suffix . "\" bandwidth=\"" . $bb_bw . "\" latency=\"" . $bb_lat . "\"/>\n";
+       
+               # I must create routes between clusters now 
+               for (my $i =1; $i<=$cabinetnodes ; $i++)
+                       {
+                                       for (my $j =$i+1; $j<=$cabinetnodes ; $j++)
+                                       {
+                                               print OUT  "<ASroute src=\"" . $prefix . "cluster_" . $toReturn . $i . $suffix .  "\"\n";
+                                               print OUT "     dst=\"" .  $prefix . "cluster_" . $toReturn . $j . $suffix .  "\"\n";
+
+                                               print OUT "     gw_src=\"" . $prefix . "c_" . $toReturn. $i . "-" . $prefix . "cluster_" . $toReturn . $i . $suffix . "_router" . $suffix  ."\"\n";
+                                               print OUT "     gw_dst=\"" . $prefix . "c_" . $toReturn. $j . "-" . $prefix . "cluster_" . $toReturn . $j . $suffix  . "_router" . $suffix . "\"\n";
+                                               print OUT "     symmetrical=\"YES\">\n";
+                                               
+                                               print OUT "             <link_ctn id=\"" . $prefix . $toReturn. "_" . $i . $suffix . "\"/>\n";
+                                               print OUT "             <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                                               print OUT "             <link_ctn id=\"" . $prefix . $toReturn . "_" . $j . $suffix . "\"/>\n";
+                                               print OUT "</ASroute>\n";
+                                       }
+                       }
+               # Now routes to the exit AS
+               for (my $i =1; $i<=$cabinetnodes ; $i++)
+               {
+                       print OUT  "<ASroute src=\""  . $prefix . "cluster_" . $toReturn . $i . $suffix  . "\"\n";
+                       print OUT "     dst=\"" . $prefix . "exitAS_" . $toReturn . $suffix . "\"\n";
+                       # SAME HERE !!
+                       print OUT "     gw_src=\"" . $prefix . "c_" . $toReturn. $i . "-" . $prefix . "cluster_" . $toReturn . $i . $suffix . "_router" . $suffix  ."\"\n";
+                       print OUT "     gw_dst=\"" . $prefix . "router_" . $toReturn . $suffix . "\"\n";
+                       print OUT "     symmetrical=\"YES\">\n";                                                
+                       print OUT "             <link_ctn id=\"" . $prefix . $toReturn . "_" . $i . $suffix . "\"/>\n";
+                       print OUT "             <link_ctn id=\"" . $prefix . "bb_" . $toReturn . $suffix . "\"/>\n"; 
+                       print OUT "</ASroute>\n";                       
+               }
+               print OUT "</AS>\n";
+       # Should be done with it...
+       return $toReturn;
+       }
+
+}
@@ -164,41 +164,45 @@ close SITES_LIGNE;
 
 sub get_gflops {
        switch ($_[0]) {
+               #Bordeaux
                case "bordeplage" { print "5.2297E9" }
                case "bordereau"  { print "8.8925E9" }
                case "borderline" { print "13.357E9" }
-               
+               #Lille
                case "chicon"     { print "8.9618E9" }
                case "chimint"    { print "23.531E9" }
                case "chinqchint" { print "22.270E9" }
                case "chirloute"  { print "24.473E9" }
-               
+               #Grenoble
                case "adonis"     { print "23.681E9" }
                case "edel"       { print "23.492E9" }
                case "genepi"     { print "21.175E9" }
-               
+               #Lyon
                case "capricorne" { print "4.7233E9" }
                case "sagittaire" { print "5.6693E9" }
-               
+               #Nancy
                case "graphene"   { print "16.673E9" }
                case "griffon"    { print "20.678E9" }
-               
+               #Orsay
                case "gdx"        { print "4.7153E9" }
                case "netgdx"     { print "4.7144E9" }
-               
+               #Rennes
                case "paradent"   { print "21.496E9" }
                case "paramount"  { print "12.910E9" }
                case "parapide"   { print "30.130E9" }
                case "parapluie"  { print "27.391E9" }
-               
+               #Sophia
                case "helios"     { print "7.7318E9" }
                case "sol"        { print "8.9388E9" }
                case "suno"       { print "23.530E9" }
-               
+               #Toulouse
                case "pastel"     { print "9.5674E9" }
                case "violette"   { print "5.1143E9" }
-               
-               case "default"    {     print "3.542E9" }
-               else                      {     print "xxxxxxx" }
+               #Reims
+               case "stremi"     { print "TODO" }
+               #Luxembourg
+               case "granduc"    { print "TODO" }
+
+               default:          { print "TODO" }
        }
-}
\ No newline at end of file
+}
old mode 100644 (file)
new mode 100755 (executable)
similarity index 97%
rename from buildtools/Cmake/generate_g5k_platform_cabinets.pl
rename to examples/platforms/generation_scripts/generate_g5k_platform_cabinets.pl
index f5009f3..ac90840
@@ -235,7 +235,7 @@ sub get_switch {
                                                {
                                                        if(!($radical =~ /^$/))
                                                        {
-                                                               $radical = $radical.";";
+                                                               $radical = $radical.",";
                                                        }
                                                        $radical = $radical.$deb."-".$fin;
                                                        $deb = $num[$i];
@@ -243,7 +243,7 @@ sub get_switch {
                                                }
                                                else
                                                {
-                                                       $radical=$radical.";".$num[$i];
+                                                       $radical=$radical.",".$num[$i];
                                                }
                        
                                        }
@@ -299,41 +299,45 @@ sub get_switch {
 
 sub get_gflops {
        switch ($_[0]) {
+               #Bordeaux
                case "bordeplage" { print "5.2297E9" }
                case "bordereau"  { print "8.8925E9" }
                case "borderline" { print "13.357E9" }
-               
+               #Lille
                case "chicon"     { print "8.9618E9" }
                case "chimint"    { print "23.531E9" }
                case "chinqchint" { print "22.270E9" }
                case "chirloute"  { print "24.473E9" }
-               
+               #Grenoble
                case "adonis"     { print "23.681E9" }
                case "edel"       { print "23.492E9" }
                case "genepi"     { print "21.175E9" }
-               
+               #Lyon
                case "capricorne" { print "4.7233E9" }
                case "sagittaire" { print "5.6693E9" }
-               
+               #Nancy
                case "graphene"   { print "16.673E9" }
                case "griffon"    { print "20.678E9" }
-               
+               #Orsay
                case "gdx"        { print "4.7153E9" }
                case "netgdx"     { print "4.7144E9" }
-               
+               #Rennes
                case "paradent"   { print "21.496E9" }
                case "paramount"  { print "12.910E9" }
                case "parapide"   { print "30.130E9" }
                case "parapluie"  { print "27.391E9" }
-               
+               #Sophia
                case "helios"     { print "7.7318E9" }
                case "sol"        { print "8.9388E9" }
                case "suno"       { print "23.530E9" }
-               
+               #Toulouse
                case "pastel"     { print "9.5674E9" }
                case "violette"   { print "5.1143E9" }
-               
-               case "default"    {     print "3.542E9" }
-               else                      {     print "xxxxxxx" }
+               #Reims
+               case "stremi"     { print "TODO" }
+               #Luxembourg
+               case "granduc"    { print "TODO" }
+
+               default:          { print "TODO" }
        }
 }
similarity index 84%
rename from buildtools/Cmake/generate_peer_platform.pl
rename to examples/platforms/syscoord/generate_peer_platform.pl
index 91f8ca5..659ae83 100755 (executable)
@@ -27,9 +27,8 @@ while(defined($line=<SITES_LIGNE>))
                print "\t\tbw_in=\"13380000\" bw_out=\"1024000\" lat=\"5E-4\" />\n\n";
                }
 }
-print "\t\t<ASroute src=\"(.*)\"\n\t\t\tdst=\"(.*)\"\n\t\t\tgw_src=\"router_\$1src\"\n\t\t\tgw_dst=\"router_\$1dst\">\n\t\t</ASroute>\n";              
                        
 print "\t</AS>\n";
 print "</platform>";
 
-print " \n";
\ No newline at end of file
+print " \n";
similarity index 99%
rename from examples/platforms/median_harvard.xml
rename to examples/platforms/syscoord/median_harvard.xml
index 2620fd8..80fab10 100644 (file)
@@ -3,12 +3,12 @@
 <platform version="3">
 
 <config id="General">
-       <prop id="coordinates" value="yes"></prop>
+       <prop id="network/coordinates" value="yes"></prop>
 </config>
 
        <AS  id="AS0"  routing="Vivaldi">
-               <peer id="peer-0" coordinates="173.0 96.8 0.1 " power="730000000.0"
-               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+               <peer id="peer-0" coordinates="173.0 96.8 0.1" power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4"/>
 
                <peer id="peer-1" coordinates="247.0 57.3 0.6 " power="730000000.0"
                bw_in="13380000" bw_out="1024000" lat="5E-4" />
 
                <peer id="peer-225" coordinates="268.1 60.1 0.2 " power="730000000.0"
                bw_in="13380000" bw_out="1024000" lat="5E-4" />
-
-               <ASroute src="(.*)"
-                       dst="(.*)"
-                       gw_src="router_$1src"
-                       gw_dst="router_$1dst">
-               </ASroute>
        </AS>
 </platform> 
diff --git a/examples/platforms/syscoord/median_meridian.xml b/examples/platforms/syscoord/median_meridian.xml
new file mode 100644 (file)
index 0000000..5158ac2
--- /dev/null
@@ -0,0 +1,7510 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<config id="General">
+       <prop id="network/coordinates" value="yes"></prop>
+</config>
+
+       <AS  id="AS0"  routing="Vivaldi">
+               <peer id="peer-0" coordinates="25.5 9.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1" coordinates="-12.7 -9.9 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2" coordinates="-15.7 9.9 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-3" coordinates="27.1 7.2 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-4" coordinates="11.4 10.7 24.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-5" coordinates="27.1 14.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-6" coordinates="110.1 31.2 43.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-7" coordinates="-21.2 -25.2 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-8" coordinates="-2.3 1.1 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-9" coordinates="16.8 -11.1 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-10" coordinates="-6.8 1.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-11" coordinates="23.0 -4.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-12" coordinates="29.9 -9.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-13" coordinates="-2.2 7.2 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-14" coordinates="26.1 -61.9 144.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-15" coordinates="-39.4 1.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-16" coordinates="26.5 -15.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-17" coordinates="15.0 -0.5 34.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-18" coordinates="16.5 11.5 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-19" coordinates="-37.9 85.0 69.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-20" coordinates="-2.6 19.4 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-21" coordinates="-104.4 -162.5 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-22" coordinates="-41.8 -30.9 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-23" coordinates="-9.9 10.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-24" coordinates="8.5 15.3 31.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-25" coordinates="6.0 -12.6 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-26" coordinates="89.6 26.1 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-27" coordinates="13.9 -31.4 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-28" coordinates="13.6 10.0 25.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-29" coordinates="32.2 34.0 104.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-30" coordinates="23.5 21.2 24.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-31" coordinates="-27.0 -12.1 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-32" coordinates="18.4 -4.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-33" coordinates="109.3 253.6 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-34" coordinates="16.5 9.4 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-35" coordinates="-35.9 -42.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-36" coordinates="30.4 18.9 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-37" coordinates="-23.1 -7.6 39.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-38" coordinates="135.5 -21.0 83.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-39" coordinates="17.5 6.7 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-40" coordinates="22.3 13.6 21.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-41" coordinates="-2.5 8.3 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-42" coordinates="-10.3 -8.8 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-43" coordinates="142.5 63.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-44" coordinates="5.1 -2.9 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-45" coordinates="-18.4 23.5 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-46" coordinates="-26.3 -3.2 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-47" coordinates="-21.6 11.6 89.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-48" coordinates="-44.3 17.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-49" coordinates="-59.8 -16.8 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-50" coordinates="23.9 35.4 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-51" coordinates="22.9 10.1 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-52" coordinates="27.6 25.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-53" coordinates="9.5 13.3 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-54" coordinates="-34.2 20.0 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-55" coordinates="-58.7 -11.7 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-56" coordinates="-40.3 -27.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-57" coordinates="19.7 -15.1 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-58" coordinates="8.4 17.5 32.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-59" coordinates="25.1 8.8 16.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-60" coordinates="25.3 13.9 21.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-61" coordinates="29.5 -58.9 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-62" coordinates="-48.1 -6.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-63" coordinates="-17.2 -1.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-64" coordinates="10.6 18.7 33.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-65" coordinates="1.9 -3.5 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-66" coordinates="-3.6 1.6 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-67" coordinates="-20.1 8.7 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-68" coordinates="-22.0 5.6 31.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-69" coordinates="-32.4 -9.4 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-70" coordinates="13.3 7.2 20.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-71" coordinates="23.2 10.9 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-72" coordinates="7.0 17.8 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-73" coordinates="34.1 37.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-74" coordinates="-55.4 -5.1 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-75" coordinates="-3.4 -4.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-76" coordinates="22.6 0.8 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-77" coordinates="23.2 15.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-78" coordinates="21.6 16.4 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-79" coordinates="12.0 14.2 20.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-80" coordinates="90.3 79.5 66.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-81" coordinates="-3.0 2.5 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-82" coordinates="-7.2 19.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-83" coordinates="5.9 15.2 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-84" coordinates="-208.1 -127.0 325.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-85" coordinates="0.6 8.0 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-86" coordinates="16.3 17.6 29.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-87" coordinates="-0.6 8.6 32.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-88" coordinates="-1.8 6.5 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-89" coordinates="-6.8 22.6 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-90" coordinates="17.0 20.6 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-91" coordinates="-39.1 -30.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-92" coordinates="110.1 57.3 30.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-93" coordinates="21.1 -4.7 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-94" coordinates="-36.4 -12.8 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-95" coordinates="33.2 -20.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-96" coordinates="25.9 15.4 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-97" coordinates="-1.0 3.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-98" coordinates="-19.4 1.4 23.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-99" coordinates="17.1 9.8 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-100" coordinates="5.5 -16.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-101" coordinates="3.3 1.8 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-102" coordinates="1.4 23.0 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-103" coordinates="-48.5 -29.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-104" coordinates="7.6 -4.5 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-105" coordinates="0.2 15.1 30.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-106" coordinates="6.3 10.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-107" coordinates="24.4 9.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-108" coordinates="19.1 11.4 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-109" coordinates="29.7 12.3 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-110" coordinates="-0.9 13.4 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-111" coordinates="19.3 -9.3 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-112" coordinates="15.8 14.7 18.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-113" coordinates="2.8 13.2 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-114" coordinates="18.8 11.5 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-115" coordinates="-10.4 -2.2 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-116" coordinates="-45.7 -10.4 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-117" coordinates="25.7 16.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-118" coordinates="-0.7 17.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-119" coordinates="30.2 1.9 22.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-120" coordinates="0.1 2.7 38.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-121" coordinates="3.0 19.1 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-122" coordinates="-6.6 15.4 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-123" coordinates="10.9 14.3 21.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-124" coordinates="3.3 21.0 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-125" coordinates="29.9 8.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-126" coordinates="-43.0 -18.3 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-127" coordinates="29.8 8.1 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-128" coordinates="36.7 17.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-129" coordinates="106.8 34.2 23.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-130" coordinates="-29.1 -20.5 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-131" coordinates="13.1 22.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-132" coordinates="78.7 137.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-133" coordinates="100.2 -6.3 185.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-134" coordinates="0.4 20.3 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-135" coordinates="24.0 -2.4 38.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-136" coordinates="-4.1 1.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-137" coordinates="7.7 19.2 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-138" coordinates="-19.6 -5.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-139" coordinates="9.7 3.1 24.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-140" coordinates="112.9 69.0 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-141" coordinates="-8.8 -9.0 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-142" coordinates="26.2 12.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-143" coordinates="32.9 0.6 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-144" coordinates="-33.5 -9.2 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-145" coordinates="21.8 13.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-146" coordinates="29.9 14.0 99.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-147" coordinates="-33.3 -41.3 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-148" coordinates="12.1 14.0 21.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-149" coordinates="12.6 4.8 28.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-150" coordinates="-21.0 -24.0 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-151" coordinates="13.1 13.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-152" coordinates="20.1 23.0 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-153" coordinates="6.4 15.0 30.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-154" coordinates="25.1 4.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-155" coordinates="28.8 29.7 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-156" coordinates="10.5 -8.2 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-157" coordinates="13.7 3.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-158" coordinates="24.0 23.1 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-159" coordinates="53.0 55.5 18.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-160" coordinates="10.8 5.4 38.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-161" coordinates="-74.9 -31.9 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-162" coordinates="2.5 8.3 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-163" coordinates="85.6 28.1 90.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-164" coordinates="8.1 9.4 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-165" coordinates="18.0 8.9 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-166" coordinates="-6.4 0.1 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-167" coordinates="23.9 29.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-168" coordinates="19.2 19.4 40.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-169" coordinates="4.1 9.2 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-170" coordinates="2.5 32.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-171" coordinates="2.5 0.2 30.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-172" coordinates="-5.1 7.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-173" coordinates="35.8 27.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-174" coordinates="-35.4 2.7 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-175" coordinates="27.0 9.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-176" coordinates="9.5 5.3 17.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-177" coordinates="-36.1 -15.7 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-178" coordinates="-22.5 74.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-179" coordinates="6.3 14.3 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-180" coordinates="-23.3 -18.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-181" coordinates="19.4 10.3 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-182" coordinates="-16.7 37.0 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-183" coordinates="12.5 13.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-184" coordinates="14.5 14.1 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-185" coordinates="28.9 15.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-186" coordinates="-5.9 -4.6 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-187" coordinates="-11.1 7.8 18.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-188" coordinates="1.1 -2.9 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-189" coordinates="-13.8 -5.3 47.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-190" coordinates="28.1 38.3 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-191" coordinates="35.0 16.3 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-192" coordinates="-7.5 -5.1 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-193" coordinates="52.3 60.9 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-194" coordinates="0.6 2.3 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-195" coordinates="22.9 3.2 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-196" coordinates="17.8 6.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-197" coordinates="9.0 13.0 71.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-198" coordinates="-51.7 44.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-199" coordinates="-40.8 -10.6 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-200" coordinates="15.8 10.6 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-201" coordinates="-25.4 8.9 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-202" coordinates="-60.4 100.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-203" coordinates="25.5 23.0 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-204" coordinates="38.4 26.8 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-205" coordinates="9.0 20.5 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-206" coordinates="39.1 16.7 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-207" coordinates="19.1 18.2 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-208" coordinates="7.7 8.5 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-209" coordinates="20.0 11.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-210" coordinates="19.5 12.6 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-211" coordinates="-22.5 14.0 17.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-212" coordinates="-2.4 2.2 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-213" coordinates="12.8 6.7 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-214" coordinates="0.1 -2.0 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-215" coordinates="7.7 -8.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-216" coordinates="-11.1 -8.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-217" coordinates="6.2 -7.1 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-218" coordinates="-49.1 -25.9 23.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-219" coordinates="15.0 19.0 34.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-220" coordinates="-38.7 -6.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-221" coordinates="6.0 -2.0 26.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-222" coordinates="-47.5 -29.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-223" coordinates="-27.4 2.5 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-224" coordinates="29.8 3.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-225" coordinates="-40.9 -3.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-226" coordinates="35.1 35.6 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-227" coordinates="-37.0 -6.4 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-228" coordinates="15.9 5.1 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-229" coordinates="-38.5 -8.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-230" coordinates="32.0 4.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-231" coordinates="-29.6 -2.4 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-232" coordinates="3.7 8.6 31.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-233" coordinates="9.9 2.0 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-234" coordinates="-8.2 -2.6 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-235" coordinates="18.9 -2.8 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-236" coordinates="-18.0 -5.7 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-237" coordinates="19.3 -1.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-238" coordinates="14.8 23.7 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-239" coordinates="-0.0 8.2 52.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-240" coordinates="-22.4 -40.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-241" coordinates="-13.3 -0.5 21.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-242" coordinates="9.8 7.8 18.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-243" coordinates="-25.7 -20.9 19.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-244" coordinates="25.0 10.0 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-245" coordinates="19.1 22.1 145.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-246" coordinates="7.4 16.1 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-247" coordinates="7.4 -2.7 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-248" coordinates="4.9 19.9 11.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-249" coordinates="12.3 -12.4 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-250" coordinates="-19.9 11.6 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-251" coordinates="2.1 2.3 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-252" coordinates="0.1 3.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-253" coordinates="24.5 26.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-254" coordinates="-10.5 4.5 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-255" coordinates="-17.4 33.1 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-256" coordinates="17.6 1.7 27.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-257" coordinates="-48.0 1.9 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-258" coordinates="25.9 2.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-259" coordinates="0.9 3.8 26.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-260" coordinates="-70.8 21.0 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-261" coordinates="17.1 1.8 18.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-262" coordinates="3.3 -13.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-263" coordinates="-49.1 -4.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-264" coordinates="-28.0 8.0 48.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-265" coordinates="2.9 2.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-266" coordinates="113.8 15.0 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-267" coordinates="32.1 13.9 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-268" coordinates="-13.1 -33.9 30.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-269" coordinates="-17.5 18.3 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-270" coordinates="29.7 22.7 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-271" coordinates="6.6 15.5 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-272" coordinates="1.9 3.1 32.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-273" coordinates="21.6 2.6 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-274" coordinates="12.7 14.0 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-275" coordinates="17.3 14.3 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-276" coordinates="32.0 12.8 68.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-277" coordinates="-30.2 -0.1 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-278" coordinates="-12.5 1.7 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-279" coordinates="31.1 22.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-280" coordinates="24.0 11.6 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-281" coordinates="52.9 2.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-282" coordinates="23.1 18.8 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-283" coordinates="-17.6 -36.1 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-284" coordinates="14.1 -21.4 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-285" coordinates="9.0 1.3 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-286" coordinates="28.4 -14.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-287" coordinates="27.1 8.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-288" coordinates="3.7 7.1 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-289" coordinates="-31.8 -34.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-290" coordinates="19.9 20.1 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-291" coordinates="25.5 18.9 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-292" coordinates="-5.2 8.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-293" coordinates="11.0 3.2 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-294" coordinates="-6.4 12.2 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-295" coordinates="29.9 13.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-296" coordinates="9.7 6.8 31.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-297" coordinates="-30.7 -29.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-298" coordinates="3.7 31.4 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-299" coordinates="6.5 19.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-300" coordinates="25.0 3.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-301" coordinates="-32.8 -7.0 20.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-302" coordinates="7.2 13.4 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-303" coordinates="15.1 16.1 39.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-304" coordinates="-28.8 14.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-305" coordinates="8.3 22.8 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-306" coordinates="-1.1 8.6 27.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-307" coordinates="-23.1 -9.6 33.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-308" coordinates="13.7 -15.2 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-309" coordinates="13.8 -5.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-310" coordinates="10.9 -23.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-311" coordinates="-14.2 24.1 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-312" coordinates="17.9 14.3 37.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-313" coordinates="-29.2 -21.6 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-314" coordinates="-41.8 -11.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-315" coordinates="-18.9 -1.0 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-316" coordinates="-21.8 52.0 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-317" coordinates="23.3 10.4 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-318" coordinates="4.0 0.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-319" coordinates="8.0 26.9 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-320" coordinates="-24.9 -4.2 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-321" coordinates="95.4 56.7 51.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-322" coordinates="-17.5 44.3 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-323" coordinates="22.4 19.4 22.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-324" coordinates="18.3 9.6 21.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-325" coordinates="12.9 5.8 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-326" coordinates="45.6 -7.2 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-327" coordinates="35.6 18.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-328" coordinates="-13.4 8.4 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-329" coordinates="-12.1 -1.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-330" coordinates="14.6 4.6 16.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-331" coordinates="17.3 14.7 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-332" coordinates="27.3 36.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-333" coordinates="-4.6 9.6 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-334" coordinates="-38.9 15.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-335" coordinates="13.9 9.9 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-336" coordinates="85.9 60.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-337" coordinates="-31.1 12.5 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-338" coordinates="17.3 -5.5 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-339" coordinates="-30.4 0.5 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-340" coordinates="14.5 5.6 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-341" coordinates="47.7 -30.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-342" coordinates="31.0 11.5 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-343" coordinates="-1.2 5.1 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-344" coordinates="-30.2 40.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-345" coordinates="-35.9 -17.4 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-346" coordinates="-0.1 25.1 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-347" coordinates="31.9 18.7 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-348" coordinates="27.6 17.0 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-349" coordinates="32.1 23.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-350" coordinates="21.6 -21.4 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-351" coordinates="52.6 9.8 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-352" coordinates="-30.9 -16.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-353" coordinates="23.8 20.9 46.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-354" coordinates="19.7 16.9 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-355" coordinates="-21.1 -19.7 31.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-356" coordinates="-19.6 -26.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-357" coordinates="-40.4 -18.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-358" coordinates="33.4 17.2 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-359" coordinates="-11.4 -20.0 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-360" coordinates="-5.1 19.5 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-361" coordinates="11.2 -2.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-362" coordinates="-3.9 4.2 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-363" coordinates="3.9 -3.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-364" coordinates="-34.3 -18.6 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-365" coordinates="29.3 18.3 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-366" coordinates="25.7 26.8 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-367" coordinates="19.3 16.2 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-368" coordinates="30.9 -3.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-369" coordinates="5.7 2.1 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-370" coordinates="15.9 9.3 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-371" coordinates="7.2 27.5 31.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-372" coordinates="-28.1 -20.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-373" coordinates="13.5 -3.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-374" coordinates="20.6 31.6 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-375" coordinates="-37.4 4.1 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-376" coordinates="-47.4 -34.1 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-377" coordinates="-22.7 -1.4 15.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-378" coordinates="22.5 4.2 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-379" coordinates="3.0 22.3 21.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-380" coordinates="21.9 22.7 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-381" coordinates="-38.8 -11.8 23.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-382" coordinates="11.8 5.7 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-383" coordinates="-4.2 14.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-384" coordinates="34.4 9.0 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-385" coordinates="24.2 9.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-386" coordinates="38.1 -29.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-387" coordinates="28.6 5.5 20.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-388" coordinates="36.8 44.0 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-389" coordinates="-5.1 1.1 42.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-390" coordinates="-24.2 -33.5 200.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-391" coordinates="9.5 8.6 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-392" coordinates="0.4 8.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-393" coordinates="17.5 5.9 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-394" coordinates="11.8 5.2 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-395" coordinates="-13.9 -38.6 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-396" coordinates="14.5 -72.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-397" coordinates="-15.0 -3.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-398" coordinates="62.4 -2.0 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-399" coordinates="-38.3 14.4 51.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-400" coordinates="64.4 38.3 33.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-401" coordinates="-1.3 22.5 21.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-402" coordinates="18.3 28.9 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-403" coordinates="-32.6 18.5 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-404" coordinates="16.9 11.5 18.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-405" coordinates="18.8 4.0 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-406" coordinates="9.4 17.0 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-407" coordinates="10.6 25.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-408" coordinates="25.0 6.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-409" coordinates="18.0 15.7 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-410" coordinates="28.3 10.8 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-411" coordinates="6.4 0.3 21.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-412" coordinates="31.5 20.3 47.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-413" coordinates="21.0 -3.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-414" coordinates="-25.7 -15.3 120.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-415" coordinates="-30.4 23.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-416" coordinates="37.9 -4.0 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-417" coordinates="24.1 5.5 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-418" coordinates="-3.2 11.3 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-419" coordinates="32.2 21.0 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-420" coordinates="21.1 17.3 15.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-421" coordinates="2.2 17.2 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-422" coordinates="-23.1 -2.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-423" coordinates="31.3 18.9 29.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-424" coordinates="29.9 11.3 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-425" coordinates="20.0 21.4 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-426" coordinates="-41.9 -4.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-427" coordinates="-5.8 0.7 14.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-428" coordinates="2.6 4.9 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-429" coordinates="23.0 11.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-430" coordinates="139.7 149.8 80.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-431" coordinates="-20.4 -15.7 33.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-432" coordinates="-8.9 26.1 38.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-433" coordinates="26.8 -15.0 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-434" coordinates="-16.9 -6.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-435" coordinates="28.1 14.7 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-436" coordinates="23.0 22.9 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-437" coordinates="23.6 16.6 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-438" coordinates="16.7 8.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-439" coordinates="3.4 -10.3 32.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-440" coordinates="7.1 39.0 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-441" coordinates="-61.7 7.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-442" coordinates="-24.4 -4.0 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-443" coordinates="45.2 48.7 115.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-444" coordinates="13.1 -10.4 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-445" coordinates="-26.9 -22.4 49.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-446" coordinates="5.6 6.1 19.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-447" coordinates="-10.6 4.3 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-448" coordinates="-32.8 -21.5 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-449" coordinates="16.0 10.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-450" coordinates="-45.4 -21.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-451" coordinates="11.9 11.7 23.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-452" coordinates="13.0 -6.5 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-453" coordinates="13.5 6.4 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-454" coordinates="-5.1 8.4 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-455" coordinates="11.4 12.6 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-456" coordinates="9.5 9.6 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-457" coordinates="-59.7 -32.3 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-458" coordinates="37.7 17.6 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-459" coordinates="7.6 11.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-460" coordinates="-1.5 5.3 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-461" coordinates="33.8 11.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-462" coordinates="-14.5 36.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-463" coordinates="94.6 120.0 105.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-464" coordinates="-3.4 -5.6 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-465" coordinates="-165.4 -67.3 80.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-466" coordinates="23.1 -2.1 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-467" coordinates="10.0 3.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-468" coordinates="7.2 14.0 11.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-469" coordinates="-68.2 10.8 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-470" coordinates="132.0 25.5 32.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-471" coordinates="31.7 1.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-472" coordinates="26.9 33.4 10.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-473" coordinates="29.9 21.2 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-474" coordinates="27.4 26.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-475" coordinates="99.9 77.7 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-476" coordinates="39.3 20.8 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-477" coordinates="35.2 4.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-478" coordinates="29.0 10.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-479" coordinates="-6.0 23.4 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-480" coordinates="-1.6 7.7 28.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-481" coordinates="29.3 19.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-482" coordinates="-1.4 4.4 29.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-483" coordinates="4.6 1.9 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-484" coordinates="11.6 -1.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-485" coordinates="18.9 15.7 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-486" coordinates="-30.4 -31.6 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-487" coordinates="15.0 1.8 25.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-488" coordinates="9.6 3.9 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-489" coordinates="30.9 20.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-490" coordinates="245.2 137.8 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-491" coordinates="-19.7 -2.9 256.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-492" coordinates="-23.8 -2.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-493" coordinates="29.5 26.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-494" coordinates="34.3 10.2 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-495" coordinates="33.5 12.0 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-496" coordinates="-16.4 -77.3 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-497" coordinates="5.4 8.7 25.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-498" coordinates="2.9 46.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-499" coordinates="13.0 58.7 53.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-500" coordinates="26.9 -0.9 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-501" coordinates="22.8 9.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-502" coordinates="-11.4 4.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-503" coordinates="-45.9 8.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-504" coordinates="26.1 10.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-505" coordinates="9.1 12.3 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-506" coordinates="124.5 16.5 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-507" coordinates="14.5 -1.3 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-508" coordinates="10.3 -1.0 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-509" coordinates="10.7 9.1 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-510" coordinates="17.3 8.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-511" coordinates="16.6 -1.2 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-512" coordinates="22.2 21.5 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-513" coordinates="-0.0 6.7 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-514" coordinates="22.5 9.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-515" coordinates="9.9 -53.5 364.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-516" coordinates="3.6 7.5 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-517" coordinates="15.0 2.0 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-518" coordinates="-51.3 -2.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-519" coordinates="105.9 15.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-520" coordinates="2.0 19.8 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-521" coordinates="10.9 10.0 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-522" coordinates="7.5 14.9 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-523" coordinates="-14.3 18.9 11.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-524" coordinates="-25.1 -21.0 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-525" coordinates="-4.9 21.2 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-526" coordinates="19.4 15.8 23.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-527" coordinates="26.3 14.2 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-528" coordinates="12.5 16.2 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-529" coordinates="-29.4 -4.1 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-530" coordinates="-31.8 5.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-531" coordinates="0.5 -1.6 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-532" coordinates="-21.1 50.6 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-533" coordinates="-5.1 9.9 18.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-534" coordinates="26.2 16.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-535" coordinates="79.7 103.3 126.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-536" coordinates="-25.8 -3.9 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-537" coordinates="-20.6 -20.5 48.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-538" coordinates="37.8 5.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-539" coordinates="-17.0 -7.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-540" coordinates="-6.3 29.6 39.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-541" coordinates="-43.3 -1.4 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-542" coordinates="25.3 -13.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-543" coordinates="-24.1 -27.4 22.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-544" coordinates="11.3 17.1 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-545" coordinates="-6.4 -38.5 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-546" coordinates="11.9 17.7 23.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-547" coordinates="18.3 -12.3 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-548" coordinates="-33.2 -13.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-549" coordinates="-6.5 -2.3 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-550" coordinates="-0.3 -5.0 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-551" coordinates="16.7 -1.0 30.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-552" coordinates="21.8 5.9 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-553" coordinates="-21.2 -21.6 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-554" coordinates="34.7 15.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-555" coordinates="18.4 23.7 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-556" coordinates="29.1 8.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-557" coordinates="28.5 19.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-558" coordinates="24.5 8.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-559" coordinates="48.5 16.1 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-560" coordinates="31.8 2.8 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-561" coordinates="-0.5 6.3 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-562" coordinates="-9.4 -39.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-563" coordinates="22.6 18.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-564" coordinates="33.0 14.7 34.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-565" coordinates="9.5 -47.8 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-566" coordinates="-18.1 -6.4 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-567" coordinates="4.6 0.0 30.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-568" coordinates="44.7 14.2 81.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-569" coordinates="12.4 34.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-570" coordinates="4.3 4.1 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-571" coordinates="222.6 -77.4 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-572" coordinates="-19.2 -5.2 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-573" coordinates="18.5 -1.9 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-574" coordinates="11.1 -1.7 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-575" coordinates="28.9 11.2 73.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-576" coordinates="7.9 -3.5 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-577" coordinates="2.4 32.5 33.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-578" coordinates="-14.1 -2.8 34.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-579" coordinates="15.5 12.5 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-580" coordinates="-8.6 2.8 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-581" coordinates="-27.7 -16.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-582" coordinates="-36.1 -0.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-583" coordinates="20.6 10.1 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-584" coordinates="13.5 -19.9 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-585" coordinates="-40.2 2.0 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-586" coordinates="-33.5 14.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-587" coordinates="0.6 27.4 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-588" coordinates="24.4 41.5 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-589" coordinates="20.3 9.8 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-590" coordinates="-8.4 -0.8 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-591" coordinates="36.4 4.4 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-592" coordinates="6.6 12.4 14.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-593" coordinates="20.0 7.9 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-594" coordinates="-15.7 -9.5 206.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-595" coordinates="70.4 84.5 31.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-596" coordinates="-6.3 9.5 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-597" coordinates="25.4 1.8 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-598" coordinates="-5.6 9.0 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-599" coordinates="-27.3 -13.6 38.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-600" coordinates="11.1 15.3 19.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-601" coordinates="24.3 4.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-602" coordinates="11.9 -6.7 32.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-603" coordinates="10.1 15.0 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-604" coordinates="42.4 33.2 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-605" coordinates="32.3 18.7 74.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-606" coordinates="-8.7 0.3 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-607" coordinates="-32.5 6.7 228.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-608" coordinates="-101.6 -63.6 101.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-609" coordinates="-11.8 3.1 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-610" coordinates="15.4 -1.7 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-611" coordinates="5.5 -5.2 20.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-612" coordinates="-6.3 -16.2 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-613" coordinates="-17.5 -0.9 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-614" coordinates="39.1 10.7 55.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-615" coordinates="24.6 8.9 92.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-616" coordinates="23.2 -34.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-617" coordinates="28.1 16.7 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-618" coordinates="90.3 59.6 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-619" coordinates="7.3 17.2 27.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-620" coordinates="-163.6 -102.5 34.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-621" coordinates="16.9 14.6 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-622" coordinates="2.9 9.5 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-623" coordinates="-6.6 0.8 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-624" coordinates="7.0 -0.8 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-625" coordinates="-41.9 -6.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-626" coordinates="-1.9 36.6 25.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-627" coordinates="18.4 14.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-628" coordinates="-43.3 -68.2 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-629" coordinates="121.1 78.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-630" coordinates="-10.1 8.3 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-631" coordinates="25.5 24.5 77.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-632" coordinates="-35.8 -10.0 215.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-633" coordinates="-33.7 5.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-634" coordinates="32.8 14.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-635" coordinates="-51.5 3.0 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-636" coordinates="21.4 39.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-637" coordinates="16.4 6.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-638" coordinates="25.9 20.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-639" coordinates="19.4 37.6 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-640" coordinates="-34.6 -30.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-641" coordinates="62.5 4.1 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-642" coordinates="31.5 -9.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-643" coordinates="21.3 10.3 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-644" coordinates="36.1 3.9 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-645" coordinates="-6.2 2.5 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-646" coordinates="20.4 9.4 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-647" coordinates="-28.5 -16.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-648" coordinates="-8.0 8.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-649" coordinates="-19.5 -4.3 47.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-650" coordinates="-15.5 -33.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-651" coordinates="12.1 4.6 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-652" coordinates="11.8 7.5 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-653" coordinates="6.2 2.6 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-654" coordinates="6.1 22.5 14.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-655" coordinates="-7.0 5.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-656" coordinates="115.5 41.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-657" coordinates="29.7 7.2 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-658" coordinates="21.2 16.0 67.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-659" coordinates="-43.2 -5.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-660" coordinates="23.3 10.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-661" coordinates="-29.5 -13.3 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-662" coordinates="-13.4 5.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-663" coordinates="-11.3 -6.6 31.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-664" coordinates="-26.5 -5.1 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-665" coordinates="-8.2 -3.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-666" coordinates="2.3 13.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-667" coordinates="17.6 15.3 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-668" coordinates="87.4 59.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-669" coordinates="20.1 -4.0 26.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-670" coordinates="-38.5 -21.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-671" coordinates="11.8 7.3 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-672" coordinates="2.1 -2.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-673" coordinates="-10.6 10.4 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-674" coordinates="-8.4 -32.4 159.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-675" coordinates="-27.9 -20.3 21.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-676" coordinates="253.9 -129.4 295.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-677" coordinates="-8.9 17.8 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-678" coordinates="-187.7 -99.1 21.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-679" coordinates="27.9 11.3 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-680" coordinates="13.8 -10.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-681" coordinates="-25.5 -7.1 20.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-682" coordinates="21.9 28.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-683" coordinates="-47.2 -7.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-684" coordinates="22.4 26.7 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-685" coordinates="95.4 -9.9 71.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-686" coordinates="-0.2 6.4 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-687" coordinates="-5.3 14.6 38.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-688" coordinates="-25.7 6.6 177.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-689" coordinates="-40.3 -2.1 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-690" coordinates="0.4 -1.4 17.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-691" coordinates="24.8 1.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-692" coordinates="10.7 -7.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-693" coordinates="24.3 7.5 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-694" coordinates="33.3 18.7 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-695" coordinates="-30.8 8.4 41.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-696" coordinates="-39.4 -12.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-697" coordinates="-26.3 -13.2 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-698" coordinates="-1.1 1.2 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-699" coordinates="-49.4 -9.4 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-700" coordinates="-5.3 -0.1 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-701" coordinates="17.8 6.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-702" coordinates="20.2 22.8 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-703" coordinates="107.7 7.4 65.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-704" coordinates="-1.5 6.2 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-705" coordinates="-28.9 -1.8 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-706" coordinates="-15.8 8.4 61.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-707" coordinates="-32.7 -49.6 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-708" coordinates="59.1 20.5 70.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-709" coordinates="23.9 22.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-710" coordinates="-34.0 2.2 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-711" coordinates="9.1 4.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-712" coordinates="37.2 -3.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-713" coordinates="-21.7 -11.4 20.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-714" coordinates="18.1 7.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-715" coordinates="28.4 18.9 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-716" coordinates="-16.9 -2.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-717" coordinates="-4.6 -5.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-718" coordinates="24.8 15.5 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-719" coordinates="-42.9 -16.5 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-720" coordinates="29.0 12.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-721" coordinates="-99.5 -134.2 42.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-722" coordinates="26.6 35.8 11.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-723" coordinates="19.1 9.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-724" coordinates="-3.0 -1.4 36.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-725" coordinates="-24.9 13.3 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-726" coordinates="-49.3 -25.6 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-727" coordinates="35.8 20.7 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-728" coordinates="-46.9 -35.8 146.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-729" coordinates="13.5 42.2 20.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-730" coordinates="-12.7 -18.2 16.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-731" coordinates="-4.4 -1.1 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-732" coordinates="-20.1 29.7 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-733" coordinates="-3.9 10.2 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-734" coordinates="13.5 -9.3 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-735" coordinates="2.4 1.7 46.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-736" coordinates="30.9 19.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-737" coordinates="-6.7 17.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-738" coordinates="-3.7 4.6 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-739" coordinates="8.7 -19.0 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-740" coordinates="13.9 25.7 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-741" coordinates="-24.6 -20.7 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-742" coordinates="27.0 14.8 51.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-743" coordinates="0.1 4.0 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-744" coordinates="1.4 2.2 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-745" coordinates="3.0 -22.1 25.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-746" coordinates="-27.2 21.5 36.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-747" coordinates="26.6 19.6 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-748" coordinates="-30.9 -30.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-749" coordinates="-82.8 -30.3 136.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-750" coordinates="-6.5 3.5 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-751" coordinates="4.5 7.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-752" coordinates="12.7 -17.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-753" coordinates="-1.2 9.6 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-754" coordinates="90.2 51.5 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-755" coordinates="14.4 -1.1 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-756" coordinates="32.2 22.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-757" coordinates="15.4 11.1 18.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-758" coordinates="122.1 82.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-759" coordinates="-27.9 -3.4 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-760" coordinates="-40.2 -3.5 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-761" coordinates="33.6 12.7 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-762" coordinates="19.0 -0.4 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-763" coordinates="-0.0 30.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-764" coordinates="8.2 4.6 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-765" coordinates="15.6 4.3 23.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-766" coordinates="-4.6 8.1 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-767" coordinates="23.2 14.8 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-768" coordinates="34.1 10.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-769" coordinates="11.4 9.2 26.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-770" coordinates="13.4 30.3 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-771" coordinates="-13.9 2.3 30.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-772" coordinates="-39.5 -3.3 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-773" coordinates="-129.4 103.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-774" coordinates="9.3 12.0 20.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-775" coordinates="29.4 21.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-776" coordinates="23.9 12.9 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-777" coordinates="-1.3 3.1 30.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-778" coordinates="15.2 11.2 19.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-779" coordinates="-15.8 -4.1 60.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-780" coordinates="14.2 25.9 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-781" coordinates="25.8 9.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-782" coordinates="117.3 31.7 39.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-783" coordinates="4.5 4.6 43.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-784" coordinates="9.1 -5.4 21.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-785" coordinates="-34.0 -26.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-786" coordinates="-24.4 -2.7 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-787" coordinates="23.6 14.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-788" coordinates="15.7 3.1 23.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-789" coordinates="-4.5 11.1 34.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-790" coordinates="9.0 12.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-791" coordinates="-1.2 -3.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-792" coordinates="-175.6 52.3 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-793" coordinates="-37.5 -15.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-794" coordinates="2.9 10.6 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-795" coordinates="29.3 7.4 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-796" coordinates="12.0 1.7 70.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-797" coordinates="23.8 18.7 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-798" coordinates="-116.2 111.3 41.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-799" coordinates="9.8 2.4 28.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-800" coordinates="6.7 18.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-801" coordinates="30.9 37.4 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-802" coordinates="25.0 9.7 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-803" coordinates="-26.0 -11.2 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-804" coordinates="19.3 7.6 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-805" coordinates="-18.4 -15.6 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-806" coordinates="16.3 10.8 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-807" coordinates="15.7 20.2 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-808" coordinates="-1.9 0.6 20.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-809" coordinates="-67.8 -7.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-810" coordinates="10.9 7.9 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-811" coordinates="-29.0 -40.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-812" coordinates="24.7 22.3 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-813" coordinates="-12.9 -13.1 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-814" coordinates="41.8 4.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-815" coordinates="2.5 12.5 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-816" coordinates="-14.2 -10.5 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-817" coordinates="-56.0 2.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-818" coordinates="-3.5 11.9 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-819" coordinates="8.8 30.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-820" coordinates="26.5 18.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-821" coordinates="-30.4 -11.8 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-822" coordinates="-34.2 -7.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-823" coordinates="22.8 19.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-824" coordinates="-38.3 74.0 31.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-825" coordinates="23.3 9.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-826" coordinates="-8.4 11.1 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-827" coordinates="-40.7 -11.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-828" coordinates="-50.1 -18.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-829" coordinates="35.2 46.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-830" coordinates="23.5 -0.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-831" coordinates="-8.4 4.2 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-832" coordinates="20.4 18.6 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-833" coordinates="15.4 3.1 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-834" coordinates="-46.3 -5.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-835" coordinates="-36.8 -26.1 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-836" coordinates="13.3 12.1 34.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-837" coordinates="-18.8 -23.9 19.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-838" coordinates="14.2 4.6 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-839" coordinates="27.9 11.8 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-840" coordinates="23.7 7.1 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-841" coordinates="1.9 -6.7 59.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-842" coordinates="32.0 14.1 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-843" coordinates="-52.1 -7.7 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-844" coordinates="-9.3 -14.9 23.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-845" coordinates="13.8 16.8 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-846" coordinates="-22.4 0.2 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-847" coordinates="-4.5 -18.9 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-848" coordinates="32.6 26.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-849" coordinates="-35.2 -16.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-850" coordinates="18.7 11.9 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-851" coordinates="-2.7 21.1 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-852" coordinates="0.2 0.2 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-853" coordinates="27.6 11.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-854" coordinates="-32.1 -11.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-855" coordinates="-5.8 1.1 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-856" coordinates="-39.7 5.4 15.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-857" coordinates="-15.9 -21.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-858" coordinates="26.6 20.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-859" coordinates="-7.6 6.2 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-860" coordinates="-14.5 8.5 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-861" coordinates="12.0 13.7 19.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-862" coordinates="101.0 83.3 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-863" coordinates="12.5 3.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-864" coordinates="-41.0 -2.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-865" coordinates="28.0 14.0 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-866" coordinates="-11.3 -19.8 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-867" coordinates="0.8 12.8 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-868" coordinates="-18.8 -26.6 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-869" coordinates="17.4 4.4 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-870" coordinates="0.5 3.6 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-871" coordinates="-26.2 -17.0 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-872" coordinates="7.8 7.8 25.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-873" coordinates="-40.8 -4.5 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-874" coordinates="8.1 1.5 47.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-875" coordinates="10.9 3.3 21.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-876" coordinates="13.9 20.5 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-877" coordinates="1.7 3.7 19.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-878" coordinates="-40.7 4.3 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-879" coordinates="-36.0 -13.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-880" coordinates="-0.0 4.5 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-881" coordinates="-5.5 14.2 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-882" coordinates="-34.4 -24.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-883" coordinates="5.9 -11.2 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-884" coordinates="28.2 11.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-885" coordinates="26.1 25.7 26.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-886" coordinates="-16.8 2.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-887" coordinates="-35.5 -23.1 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-888" coordinates="25.9 18.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-889" coordinates="2.2 27.2 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-890" coordinates="24.7 5.6 11.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-891" coordinates="38.9 18.2 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-892" coordinates="-124.4 -126.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-893" coordinates="26.4 2.8 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-894" coordinates="33.5 6.6 105.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-895" coordinates="25.0 21.5 24.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-896" coordinates="-19.1 -6.8 36.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-897" coordinates="43.5 18.8 67.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-898" coordinates="-47.6 -2.4 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-899" coordinates="61.1 -38.0 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-900" coordinates="31.6 9.8 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-901" coordinates="116.2 7.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-902" coordinates="111.3 -29.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-903" coordinates="-0.3 19.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-904" coordinates="116.8 19.3 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-905" coordinates="-6.4 5.1 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-906" coordinates="10.4 8.3 29.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-907" coordinates="26.0 9.4 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-908" coordinates="29.2 22.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-909" coordinates="-8.4 -40.4 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-910" coordinates="-78.7 -27.2 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-911" coordinates="19.8 10.7 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-912" coordinates="10.3 7.4 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-913" coordinates="-69.3 -31.8 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-914" coordinates="10.9 48.7 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-915" coordinates="6.0 7.3 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-916" coordinates="-27.8 -5.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-917" coordinates="-5.1 -4.5 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-918" coordinates="16.8 -67.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-919" coordinates="-29.2 -22.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-920" coordinates="24.6 19.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-921" coordinates="-36.8 -1.4 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-922" coordinates="-48.9 -34.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-923" coordinates="22.1 21.4 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-924" coordinates="22.6 3.2 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-925" coordinates="9.3 20.0 87.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-926" coordinates="3.4 4.6 16.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-927" coordinates="9.2 17.4 37.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-928" coordinates="34.6 8.0 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-929" coordinates="-26.0 -32.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-930" coordinates="-3.3 5.3 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-931" coordinates="20.0 15.4 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-932" coordinates="26.2 6.8 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-933" coordinates="-30.3 -27.6 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-934" coordinates="107.3 101.2 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-935" coordinates="13.2 21.1 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-936" coordinates="32.8 5.7 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-937" coordinates="13.3 41.7 63.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-938" coordinates="24.0 11.2 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-939" coordinates="2.1 -3.3 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-940" coordinates="-143.7 -120.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-941" coordinates="66.9 -180.8 100.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-942" coordinates="28.0 9.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-943" coordinates="-40.6 -16.4 48.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-944" coordinates="102.0 37.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-945" coordinates="20.2 23.2 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-946" coordinates="-72.4 9.6 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-947" coordinates="1.5 12.0 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-948" coordinates="29.1 16.0 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-949" coordinates="20.1 21.0 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-950" coordinates="6.8 6.1 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-951" coordinates="10.7 5.0 31.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-952" coordinates="17.3 13.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-953" coordinates="99.1 75.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-954" coordinates="5.2 31.0 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-955" coordinates="27.9 17.9 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-956" coordinates="23.9 13.4 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-957" coordinates="13.8 13.8 22.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-958" coordinates="25.4 20.8 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-959" coordinates="-38.1 -17.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-960" coordinates="23.2 5.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-961" coordinates="1.7 24.6 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-962" coordinates="37.4 15.0 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-963" coordinates="9.8 -3.4 22.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-964" coordinates="13.0 5.2 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-965" coordinates="-5.2 6.2 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-966" coordinates="19.7 16.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-967" coordinates="15.3 12.0 29.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-968" coordinates="20.3 13.6 27.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-969" coordinates="-31.0 -8.5 19.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-970" coordinates="6.0 4.6 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-971" coordinates="-1.0 2.1 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-972" coordinates="-15.0 -1.9 18.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-973" coordinates="-5.4 0.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-974" coordinates="1.1 -5.6 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-975" coordinates="9.7 -14.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-976" coordinates="-27.5 6.2 68.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-977" coordinates="29.6 25.4 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-978" coordinates="-45.4 36.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-979" coordinates="6.3 24.3 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-980" coordinates="32.2 9.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-981" coordinates="-42.5 -15.2 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-982" coordinates="14.5 12.9 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-983" coordinates="19.4 -24.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-984" coordinates="-43.4 -17.5 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-985" coordinates="31.3 5.0 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-986" coordinates="17.9 20.3 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-987" coordinates="6.9 6.3 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-988" coordinates="129.1 -23.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-989" coordinates="11.1 -9.0 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-990" coordinates="-53.0 1.3 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-991" coordinates="42.1 36.1 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-992" coordinates="305.6 294.6 229.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-993" coordinates="18.2 6.4 36.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-994" coordinates="15.3 -3.6 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-995" coordinates="-14.4 3.2 19.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-996" coordinates="12.3 -3.9 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-997" coordinates="40.3 -41.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-998" coordinates="8.6 21.5 21.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-999" coordinates="20.3 11.1 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1000" coordinates="17.7 25.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1001" coordinates="-35.3 -8.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1002" coordinates="-25.3 -20.8 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1003" coordinates="11.7 -3.5 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1004" coordinates="-29.6 -13.1 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1005" coordinates="22.3 7.7 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1006" coordinates="-14.3 33.6 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1007" coordinates="23.1 20.4 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1008" coordinates="31.1 -11.0 17.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1009" coordinates="15.2 8.5 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1010" coordinates="-13.4 4.3 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1011" coordinates="38.3 31.4 23.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1012" coordinates="128.8 -216.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1013" coordinates="9.6 5.4 23.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1014" coordinates="-9.6 -12.8 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1015" coordinates="18.1 16.7 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1016" coordinates="-8.5 16.2 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1017" coordinates="15.5 -12.3 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1018" coordinates="5.4 20.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1019" coordinates="7.8 18.6 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1020" coordinates="20.0 5.5 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1021" coordinates="16.6 21.6 14.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1022" coordinates="52.8 75.3 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1023" coordinates="-3.0 4.2 33.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1024" coordinates="16.0 16.6 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1025" coordinates="-0.6 16.4 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1026" coordinates="-3.7 -1.5 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1027" coordinates="66.1 112.9 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1028" coordinates="20.8 8.0 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1029" coordinates="-1.7 4.0 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1030" coordinates="-21.4 61.3 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1031" coordinates="24.5 18.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1032" coordinates="9.8 17.4 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1033" coordinates="-32.2 -18.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1034" coordinates="-4.9 4.5 23.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1035" coordinates="10.7 -4.8 15.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1036" coordinates="-61.4 -57.4 99.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1037" coordinates="17.5 12.8 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1038" coordinates="-36.0 2.7 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1039" coordinates="11.6 23.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1040" coordinates="2.6 11.8 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1041" coordinates="11.1 1.6 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1042" coordinates="4.5 12.1 32.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1043" coordinates="19.4 11.2 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1044" coordinates="1.2 17.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1045" coordinates="-5.0 14.6 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1046" coordinates="35.0 -2.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1047" coordinates="86.5 60.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1048" coordinates="20.5 37.4 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1049" coordinates="34.0 38.2 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1050" coordinates="-49.7 -8.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1051" coordinates="9.0 4.8 22.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1052" coordinates="34.4 10.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1053" coordinates="-32.8 -12.6 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1054" coordinates="-8.9 3.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1055" coordinates="21.4 12.3 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1056" coordinates="-17.0 -3.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1057" coordinates="-35.0 -15.8 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1058" coordinates="35.6 22.6 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1059" coordinates="-7.8 6.5 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1060" coordinates="6.5 10.4 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1061" coordinates="1.9 -10.8 18.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1062" coordinates="25.7 54.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1063" coordinates="14.2 6.6 15.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1064" coordinates="1.4 5.5 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1065" coordinates="-3.6 -57.0 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1066" coordinates="153.2 68.2 69.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1067" coordinates="0.7 -8.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1068" coordinates="-12.7 -6.1 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1069" coordinates="1.6 7.6 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1070" coordinates="-36.5 -22.2 31.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1071" coordinates="15.9 15.3 17.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1072" coordinates="-44.5 -12.7 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1073" coordinates="30.2 -8.7 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1074" coordinates="32.1 -13.0 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1075" coordinates="85.8 1.6 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1076" coordinates="-20.7 -19.2 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1077" coordinates="27.8 -8.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1078" coordinates="-26.1 -23.1 25.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1079" coordinates="-7.4 14.6 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1080" coordinates="22.6 5.9 27.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1081" coordinates="-20.2 -23.5 174.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1082" coordinates="5.5 3.0 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1083" coordinates="-25.7 -19.2 30.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1084" coordinates="-19.9 -24.8 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1085" coordinates="36.6 25.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1086" coordinates="28.5 13.3 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1087" coordinates="-27.2 -16.1 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1088" coordinates="35.8 3.4 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1089" coordinates="12.6 10.2 150.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1090" coordinates="16.1 15.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1091" coordinates="-10.5 4.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1092" coordinates="-28.1 -11.9 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1093" coordinates="-105.6 -89.8 98.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1094" coordinates="-0.2 10.1 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1095" coordinates="-2.1 6.4 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1096" coordinates="11.0 14.9 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1097" coordinates="46.6 125.1 69.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1098" coordinates="124.8 74.7 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1099" coordinates="11.3 -1.8 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1100" coordinates="17.6 6.6 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1101" coordinates="19.5 19.6 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1102" coordinates="12.2 37.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1103" coordinates="28.5 12.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1104" coordinates="35.7 9.2 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1105" coordinates="18.7 1.9 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1106" coordinates="23.0 5.5 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1107" coordinates="33.4 13.5 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1108" coordinates="-61.3 -55.6 103.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1109" coordinates="-57.4 16.3 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1110" coordinates="18.0 -2.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1111" coordinates="23.5 16.0 50.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1112" coordinates="6.0 4.0 19.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1113" coordinates="-21.0 -3.4 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1114" coordinates="-88.8 -60.6 29.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1115" coordinates="72.7 47.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1116" coordinates="1.9 19.7 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1117" coordinates="4.6 4.7 53.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1118" coordinates="36.3 17.9 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1119" coordinates="-19.3 -27.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1120" coordinates="20.7 14.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1121" coordinates="5.1 -1.2 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1122" coordinates="95.3 43.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1123" coordinates="22.6 13.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1124" coordinates="6.7 17.3 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1125" coordinates="37.2 12.5 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1126" coordinates="-31.0 -39.1 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1127" coordinates="120.5 12.6 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1128" coordinates="-35.5 8.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1129" coordinates="21.7 2.6 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1130" coordinates="9.9 5.1 34.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1131" coordinates="5.7 24.7 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1132" coordinates="24.6 26.8 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1133" coordinates="3.3 4.9 24.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1134" coordinates="43.2 15.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1135" coordinates="-17.1 -2.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1136" coordinates="33.2 14.8 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1137" coordinates="-0.2 9.9 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1138" coordinates="2.8 -19.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1139" coordinates="-37.2 -7.4 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1140" coordinates="8.7 63.2 27.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1141" coordinates="22.1 15.4 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1142" coordinates="4.9 3.1 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1143" coordinates="19.7 -13.4 38.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1144" coordinates="-19.7 -10.8 52.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1145" coordinates="-49.1 -13.3 63.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1146" coordinates="-6.5 -51.7 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1147" coordinates="128.6 60.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1148" coordinates="13.6 23.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1149" coordinates="-4.7 -2.9 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1150" coordinates="17.1 13.6 28.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1151" coordinates="33.6 3.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1152" coordinates="3.9 19.3 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1153" coordinates="-3.1 4.7 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1154" coordinates="-30.1 -25.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1155" coordinates="-22.6 14.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1156" coordinates="17.3 38.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1157" coordinates="4.8 -15.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1158" coordinates="-39.3 -26.2 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1159" coordinates="35.6 18.7 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1160" coordinates="-1.1 9.7 22.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1161" coordinates="-46.2 -15.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1162" coordinates="-1.5 6.3 11.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1163" coordinates="24.8 0.4 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1164" coordinates="7.8 12.7 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1165" coordinates="-4.0 9.6 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1166" coordinates="25.8 -4.4 22.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1167" coordinates="23.1 21.1 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1168" coordinates="-53.4 -16.2 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1169" coordinates="-40.5 -9.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1170" coordinates="24.3 10.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1171" coordinates="-40.8 -10.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1172" coordinates="14.3 21.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1173" coordinates="15.6 11.8 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1174" coordinates="20.1 35.0 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1175" coordinates="7.4 -12.5 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1176" coordinates="21.5 2.6 130.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1177" coordinates="-50.8 -104.8 94.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1178" coordinates="10.6 2.3 20.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1179" coordinates="-84.3 -31.2 97.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1180" coordinates="23.4 7.7 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1181" coordinates="-126.8 -134.0 26.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1182" coordinates="22.2 12.2 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1183" coordinates="27.0 21.5 17.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1184" coordinates="13.4 11.2 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1185" coordinates="2.7 -0.5 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1186" coordinates="12.2 2.3 19.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1187" coordinates="29.0 -1.4 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1188" coordinates="32.2 3.7 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1189" coordinates="25.8 11.6 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1190" coordinates="-43.2 -9.9 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1191" coordinates="14.8 6.5 24.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1192" coordinates="-18.5 -12.7 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1193" coordinates="23.2 18.2 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1194" coordinates="31.4 8.1 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1195" coordinates="3.4 9.5 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1196" coordinates="16.0 2.0 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1197" coordinates="5.1 4.9 27.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1198" coordinates="15.2 10.8 21.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1199" coordinates="26.6 16.3 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1200" coordinates="-5.3 2.0 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1201" coordinates="30.8 -11.0 130.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1202" coordinates="-13.4 17.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1203" coordinates="-9.4 0.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1204" coordinates="114.5 -2.2 40.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1205" coordinates="25.7 31.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1206" coordinates="12.7 8.3 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1207" coordinates="26.6 11.0 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1208" coordinates="-39.7 83.7 85.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1209" coordinates="23.9 12.9 25.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1210" coordinates="-9.1 17.3 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1211" coordinates="25.9 22.0 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1212" coordinates="17.7 12.2 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1213" coordinates="52.4 -53.2 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1214" coordinates="5.0 8.2 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1215" coordinates="8.7 -4.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1216" coordinates="-6.1 7.7 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1217" coordinates="-7.8 53.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1218" coordinates="109.1 -10.9 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1219" coordinates="-11.8 0.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1220" coordinates="22.1 14.8 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1221" coordinates="-25.5 -37.4 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1222" coordinates="20.0 19.0 93.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1223" coordinates="7.1 4.4 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1224" coordinates="-7.6 -3.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1225" coordinates="-10.0 14.3 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1226" coordinates="31.2 10.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1227" coordinates="-151.3 -75.0 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1228" coordinates="-26.6 -2.0 19.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1229" coordinates="-131.4 -72.1 70.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1230" coordinates="-24.1 -13.2 61.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1231" coordinates="27.6 5.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1232" coordinates="-16.2 11.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1233" coordinates="-28.5 -8.1 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1234" coordinates="-39.2 -1.4 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1235" coordinates="-20.9 -15.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1236" coordinates="-27.5 13.9 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1237" coordinates="8.7 21.3 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1238" coordinates="3.6 3.6 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1239" coordinates="-158.9 -37.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1240" coordinates="-47.4 -20.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1241" coordinates="4.0 19.2 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1242" coordinates="7.1 5.1 20.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1243" coordinates="3.1 -19.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1244" coordinates="-3.2 1.7 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1245" coordinates="17.9 33.7 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1246" coordinates="18.8 11.4 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1247" coordinates="22.2 12.3 11.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1248" coordinates="-74.4 -8.6 138.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1249" coordinates="10.0 38.8 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1250" coordinates="21.7 12.5 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1251" coordinates="-4.2 22.3 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1252" coordinates="-16.8 7.7 21.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1253" coordinates="-43.8 -9.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1254" coordinates="-68.9 -49.2 83.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1255" coordinates="-1.8 7.9 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1256" coordinates="31.0 -7.0 21.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1257" coordinates="29.9 12.8 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1258" coordinates="-8.0 14.3 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1259" coordinates="14.4 -2.9 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1260" coordinates="-39.1 2.4 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1261" coordinates="13.0 20.5 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1262" coordinates="94.4 24.5 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1263" coordinates="10.3 13.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1264" coordinates="7.9 6.1 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1265" coordinates="17.2 13.3 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1266" coordinates="18.6 -9.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1267" coordinates="22.8 -3.3 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1268" coordinates="11.4 0.2 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1269" coordinates="-15.1 10.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1270" coordinates="-107.5 164.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1271" coordinates="14.6 -9.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1272" coordinates="-4.0 -1.9 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1273" coordinates="12.9 7.1 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1274" coordinates="-0.8 -16.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1275" coordinates="-14.0 -0.6 23.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1276" coordinates="91.5 45.7 35.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1277" coordinates="24.9 -4.9 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1278" coordinates="-7.5 7.9 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1279" coordinates="23.3 22.3 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1280" coordinates="20.3 27.2 32.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1281" coordinates="22.8 7.1 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1282" coordinates="30.7 13.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1283" coordinates="-7.4 -11.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1284" coordinates="16.2 6.4 14.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1285" coordinates="-36.6 13.0 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1286" coordinates="24.2 15.5 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1287" coordinates="-6.1 -15.6 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1288" coordinates="-42.5 -51.2 216.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1289" coordinates="10.9 34.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1290" coordinates="21.5 17.9 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1291" coordinates="18.7 -0.4 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1292" coordinates="21.7 12.9 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1293" coordinates="-10.3 15.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1294" coordinates="13.9 8.5 18.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1295" coordinates="28.3 5.6 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1296" coordinates="-18.4 -18.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1297" coordinates="-28.5 8.2 99.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1298" coordinates="16.0 8.4 21.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1299" coordinates="14.6 13.0 25.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1300" coordinates="22.6 4.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1301" coordinates="13.8 2.5 22.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1302" coordinates="7.1 11.0 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1303" coordinates="72.3 -14.2 26.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1304" coordinates="14.7 7.5 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1305" coordinates="35.2 16.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1306" coordinates="-21.8 -6.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1307" coordinates="35.2 25.1 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1308" coordinates="-55.3 -27.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1309" coordinates="-16.1 11.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1310" coordinates="-33.5 -31.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1311" coordinates="-30.2 -11.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1312" coordinates="39.4 2.7 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1313" coordinates="21.3 -2.0 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1314" coordinates="9.7 -41.3 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1315" coordinates="24.0 6.8 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1316" coordinates="-34.8 -5.7 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1317" coordinates="-47.4 1.3 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1318" coordinates="36.5 12.0 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1319" coordinates="25.4 17.2 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1320" coordinates="27.8 20.3 36.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1321" coordinates="27.4 1.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1322" coordinates="45.3 17.2 198.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1323" coordinates="51.8 19.7 99.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1324" coordinates="-6.5 10.5 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1325" coordinates="18.0 -34.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1326" coordinates="-10.1 20.6 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1327" coordinates="-6.2 28.8 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1328" coordinates="11.5 5.2 48.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1329" coordinates="28.1 -6.0 26.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1330" coordinates="4.4 -9.2 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1331" coordinates="-35.1 -2.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1332" coordinates="-183.5 -17.6 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1333" coordinates="27.9 23.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1334" coordinates="-42.6 -2.0 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1335" coordinates="25.2 5.4 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1336" coordinates="27.1 10.2 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1337" coordinates="-19.7 -9.0 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1338" coordinates="20.3 14.7 48.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1339" coordinates="-20.6 -7.4 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1340" coordinates="23.2 21.9 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1341" coordinates="-4.8 7.0 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1342" coordinates="24.4 9.1 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1343" coordinates="30.5 19.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1344" coordinates="-14.1 12.3 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1345" coordinates="-36.3 -14.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1346" coordinates="71.0 42.7 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1347" coordinates="48.1 33.1 85.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1348" coordinates="-50.9 -0.9 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1349" coordinates="4.5 33.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1350" coordinates="-13.6 10.3 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1351" coordinates="18.0 8.0 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1352" coordinates="-5.5 5.0 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1353" coordinates="-6.2 -4.5 27.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1354" coordinates="15.1 9.7 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1355" coordinates="-29.9 -8.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1356" coordinates="-6.6 18.0 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1357" coordinates="7.0 58.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1358" coordinates="3.0 -6.0 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1359" coordinates="21.0 22.5 111.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1360" coordinates="5.4 17.6 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1361" coordinates="-41.9 -11.7 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1362" coordinates="5.4 15.0 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1363" coordinates="16.6 15.2 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1364" coordinates="-4.3 -10.9 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1365" coordinates="-15.8 10.2 27.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1366" coordinates="-29.5 -25.8 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1367" coordinates="-9.7 1.2 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1368" coordinates="11.6 10.9 26.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1369" coordinates="-1.5 24.2 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1370" coordinates="16.9 9.5 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1371" coordinates="1.8 3.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1372" coordinates="-33.4 -17.0 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1373" coordinates="11.4 5.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1374" coordinates="22.4 -25.2 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1375" coordinates="29.7 22.5 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1376" coordinates="21.2 54.8 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1377" coordinates="-39.6 -18.0 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1378" coordinates="92.2 -20.1 63.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1379" coordinates="29.0 -3.4 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1380" coordinates="-32.3 6.4 14.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1381" coordinates="18.3 47.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1382" coordinates="-42.5 -21.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1383" coordinates="-178.1 -77.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1384" coordinates="21.8 13.8 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1385" coordinates="20.7 17.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1386" coordinates="-39.5 -5.6 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1387" coordinates="22.7 19.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1388" coordinates="-35.5 4.5 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1389" coordinates="24.6 -4.0 19.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1390" coordinates="28.1 16.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1391" coordinates="3.2 -2.7 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1392" coordinates="9.1 6.1 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1393" coordinates="27.5 17.8 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1394" coordinates="23.1 15.7 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1395" coordinates="13.8 22.2 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1396" coordinates="9.4 22.3 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1397" coordinates="69.6 29.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1398" coordinates="37.6 -42.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1399" coordinates="24.2 15.8 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1400" coordinates="31.4 -6.5 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1401" coordinates="-58.6 -18.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1402" coordinates="15.8 44.9 22.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1403" coordinates="28.6 -80.0 85.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1404" coordinates="12.8 -1.8 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1405" coordinates="-51.6 10.1 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1406" coordinates="4.0 12.3 17.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1407" coordinates="-7.2 20.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1408" coordinates="12.4 13.5 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1409" coordinates="28.7 11.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1410" coordinates="25.3 21.5 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1411" coordinates="22.7 16.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1412" coordinates="-14.1 -7.9 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1413" coordinates="7.6 21.5 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1414" coordinates="-40.7 3.9 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1415" coordinates="22.7 5.3 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1416" coordinates="17.7 -0.9 25.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1417" coordinates="34.6 21.8 37.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1418" coordinates="4.8 -15.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1419" coordinates="24.7 9.0 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1420" coordinates="37.1 28.9 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1421" coordinates="-14.8 -36.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1422" coordinates="1.7 -16.3 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1423" coordinates="17.0 9.2 17.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1424" coordinates="-38.7 14.2 11.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1425" coordinates="-36.4 12.2 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1426" coordinates="-14.9 1.8 27.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1427" coordinates="-25.8 5.1 188.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1428" coordinates="13.4 8.9 20.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1429" coordinates="25.2 15.0 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1430" coordinates="-1.5 0.5 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1431" coordinates="-13.3 7.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1432" coordinates="15.8 16.1 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1433" coordinates="25.7 6.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1434" coordinates="-38.9 -2.8 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1435" coordinates="26.9 -1.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1436" coordinates="-19.7 -28.5 23.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1437" coordinates="2.1 5.6 23.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1438" coordinates="29.3 6.2 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1439" coordinates="23.9 19.4 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1440" coordinates="-12.3 8.1 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1441" coordinates="8.6 -2.8 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1442" coordinates="-46.4 -2.3 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1443" coordinates="13.6 -8.1 14.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1444" coordinates="3.6 8.6 26.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1445" coordinates="15.4 15.6 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1446" coordinates="13.8 45.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1447" coordinates="-34.1 -26.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1448" coordinates="-33.1 -16.1 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1449" coordinates="26.8 10.2 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1450" coordinates="56.9 40.4 25.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1451" coordinates="1.0 6.1 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1452" coordinates="-3.9 42.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1453" coordinates="9.1 3.1 25.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1454" coordinates="38.0 17.0 64.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1455" coordinates="13.9 -19.8 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1456" coordinates="-31.8 33.5 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1457" coordinates="68.0 31.2 40.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1458" coordinates="19.3 6.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1459" coordinates="25.3 5.7 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1460" coordinates="27.5 7.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1461" coordinates="21.5 20.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1462" coordinates="46.9 28.2 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1463" coordinates="35.2 11.3 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1464" coordinates="20.2 8.3 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1465" coordinates="-34.6 -23.3 156.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1466" coordinates="-28.7 -22.5 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1467" coordinates="-27.0 -5.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1468" coordinates="43.0 -11.2 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1469" coordinates="-39.0 -18.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1470" coordinates="19.0 -23.4 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1471" coordinates="-34.5 -25.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1472" coordinates="-23.8 2.9 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1473" coordinates="-50.5 -16.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1474" coordinates="-51.4 -25.0 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1475" coordinates="28.4 -14.9 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1476" coordinates="-21.9 -1.6 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1477" coordinates="28.3 35.6 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1478" coordinates="20.3 18.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1479" coordinates="18.4 20.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1480" coordinates="-3.8 -38.8 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1481" coordinates="-41.9 -13.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1482" coordinates="1.0 -9.2 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1483" coordinates="3.9 9.2 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1484" coordinates="-40.3 3.6 198.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1485" coordinates="-7.9 24.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1486" coordinates="99.5 65.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1487" coordinates="-171.9 -49.3 43.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1488" coordinates="-33.9 -37.9 21.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1489" coordinates="-40.2 -34.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1490" coordinates="25.0 7.3 36.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1491" coordinates="26.7 -5.3 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1492" coordinates="16.9 14.1 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1493" coordinates="14.5 21.6 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1494" coordinates="-40.6 -9.1 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1495" coordinates="31.0 4.9 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1496" coordinates="13.1 121.2 137.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1497" coordinates="-42.6 -23.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1498" coordinates="13.0 15.8 24.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1499" coordinates="-8.1 29.1 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1500" coordinates="-14.0 -29.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1501" coordinates="-22.8 -6.9 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1502" coordinates="19.2 11.5 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1503" coordinates="32.8 12.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1504" coordinates="-46.9 10.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1505" coordinates="-6.3 -4.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1506" coordinates="21.0 18.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1507" coordinates="20.2 26.4 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1508" coordinates="-149.5 -48.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1509" coordinates="-25.4 -3.7 15.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1510" coordinates="25.0 16.1 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1511" coordinates="-10.3 5.6 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1512" coordinates="-36.5 -16.2 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1513" coordinates="9.3 12.0 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1514" coordinates="8.4 -2.7 26.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1515" coordinates="26.7 47.7 80.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1516" coordinates="8.6 22.6 34.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1517" coordinates="9.6 -13.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1518" coordinates="29.7 26.5 27.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1519" coordinates="-10.3 -31.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1520" coordinates="-17.9 10.4 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1521" coordinates="11.5 13.2 67.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1522" coordinates="1.2 5.4 18.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1523" coordinates="4.8 2.4 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1524" coordinates="10.8 -10.9 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1525" coordinates="-53.1 6.2 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1526" coordinates="-8.2 15.0 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1527" coordinates="13.6 29.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1528" coordinates="2.9 -5.0 39.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1529" coordinates="43.9 16.2 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1530" coordinates="-36.3 -20.1 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1531" coordinates="19.1 5.1 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1532" coordinates="120.9 -143.0 106.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1533" coordinates="-22.4 12.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1534" coordinates="-57.4 -142.0 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1535" coordinates="-19.9 -24.6 20.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1536" coordinates="11.0 19.1 216.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1537" coordinates="-38.5 -20.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1538" coordinates="-28.6 -2.8 29.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1539" coordinates="153.8 14.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1540" coordinates="8.2 32.9 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1541" coordinates="55.9 -38.2 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1542" coordinates="27.9 11.7 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1543" coordinates="7.2 14.5 32.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1544" coordinates="9.4 23.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1545" coordinates="25.9 8.0 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1546" coordinates="27.5 21.9 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1547" coordinates="9.3 7.4 37.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1548" coordinates="512.9 90.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1549" coordinates="9.5 8.4 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1550" coordinates="4.0 0.1 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1551" coordinates="-45.2 -11.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1552" coordinates="40.0 -8.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1553" coordinates="93.0 67.6 72.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1554" coordinates="4.9 17.0 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1555" coordinates="-1.2 9.6 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1556" coordinates="-17.6 -18.2 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1557" coordinates="-24.3 -25.8 42.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1558" coordinates="-38.2 -7.0 18.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1559" coordinates="-2.1 5.7 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1560" coordinates="101.4 103.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1561" coordinates="27.8 12.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1562" coordinates="4.8 8.0 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1563" coordinates="-6.0 81.6 63.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1564" coordinates="33.1 -6.2 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1565" coordinates="-38.9 -7.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1566" coordinates="-29.0 -7.9 10.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1567" coordinates="13.1 20.3 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1568" coordinates="-17.9 -27.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1569" coordinates="19.1 26.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1570" coordinates="45.5 46.9 45.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1571" coordinates="-5.2 17.8 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1572" coordinates="0.8 13.4 67.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1573" coordinates="20.4 10.0 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1574" coordinates="26.8 15.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1575" coordinates="29.2 25.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1576" coordinates="-11.5 -10.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1577" coordinates="-23.2 -35.5 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1578" coordinates="-40.5 -15.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1579" coordinates="22.8 -12.7 21.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1580" coordinates="38.3 -5.3 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1581" coordinates="23.8 16.7 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1582" coordinates="-31.3 0.5 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1583" coordinates="32.3 10.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1584" coordinates="-22.2 3.8 67.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1585" coordinates="50.5 8.6 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1586" coordinates="-112.7 -32.1 103.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1587" coordinates="34.6 -4.0 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1588" coordinates="-79.2 -11.4 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1589" coordinates="6.6 -8.6 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1590" coordinates="21.6 1.8 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1591" coordinates="-36.1 -9.9 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1592" coordinates="11.2 2.6 24.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1593" coordinates="-51.7 -5.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1594" coordinates="15.5 21.4 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1595" coordinates="4.5 1.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1596" coordinates="18.9 34.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1597" coordinates="-14.2 -5.9 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1598" coordinates="16.0 10.8 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1599" coordinates="24.8 22.6 26.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1600" coordinates="6.7 -11.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1601" coordinates="5.5 3.5 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1602" coordinates="-16.0 9.8 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1603" coordinates="-4.3 12.8 54.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1604" coordinates="21.7 -7.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1605" coordinates="0.3 3.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1606" coordinates="30.4 9.9 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1607" coordinates="-1.7 15.9 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1608" coordinates="-51.7 17.7 14.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1609" coordinates="65.4 26.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1610" coordinates="20.1 10.8 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1611" coordinates="102.9 -7.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1612" coordinates="43.1 3.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1613" coordinates="-44.3 13.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1614" coordinates="-35.5 -22.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1615" coordinates="25.4 53.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1616" coordinates="32.5 -23.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1617" coordinates="22.7 24.8 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1618" coordinates="-41.9 -2.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1619" coordinates="-0.1 19.7 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1620" coordinates="-25.1 34.7 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1621" coordinates="16.8 10.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1622" coordinates="14.8 6.7 31.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1623" coordinates="-26.7 -1.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1624" coordinates="13.0 6.8 26.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1625" coordinates="18.9 3.8 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1626" coordinates="2.8 -19.5 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1627" coordinates="32.6 12.8 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1628" coordinates="-40.4 -4.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1629" coordinates="-15.0 0.5 25.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1630" coordinates="116.3 14.7 37.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1631" coordinates="50.1 -7.6 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1632" coordinates="-28.0 -29.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1633" coordinates="102.9 7.2 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1634" coordinates="-20.8 -15.3 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1635" coordinates="21.2 14.6 18.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1636" coordinates="33.1 4.5 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1637" coordinates="-110.2 -72.1 85.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1638" coordinates="94.0 33.6 41.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1639" coordinates="11.2 1.1 25.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1640" coordinates="-35.0 31.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1641" coordinates="4.2 -17.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1642" coordinates="-4.1 22.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1643" coordinates="17.5 36.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1644" coordinates="-45.6 -7.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1645" coordinates="25.7 8.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1646" coordinates="-8.0 -11.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1647" coordinates="14.3 14.8 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1648" coordinates="6.9 8.6 16.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1649" coordinates="-64.0 -53.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1650" coordinates="9.5 6.1 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1651" coordinates="-44.9 11.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1652" coordinates="-12.2 -15.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1653" coordinates="22.6 1.6 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1654" coordinates="-37.3 -21.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1655" coordinates="30.7 7.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1656" coordinates="-21.2 -8.2 22.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1657" coordinates="24.6 21.2 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1658" coordinates="-2.9 -37.3 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1659" coordinates="19.8 12.8 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1660" coordinates="18.7 -9.6 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1661" coordinates="15.9 8.5 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1662" coordinates="5.3 -4.3 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1663" coordinates="-45.6 19.7 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1664" coordinates="0.4 9.7 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1665" coordinates="50.2 38.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1666" coordinates="-3.0 0.7 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1667" coordinates="57.1 57.1 47.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1668" coordinates="-27.9 -64.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1669" coordinates="9.3 6.3 52.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1670" coordinates="22.2 -25.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1671" coordinates="4.2 10.1 47.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1672" coordinates="21.4 7.2 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1673" coordinates="14.8 15.8 37.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1674" coordinates="10.0 -0.2 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1675" coordinates="15.1 2.0 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1676" coordinates="-13.7 -34.2 159.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1677" coordinates="-13.2 -8.4 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1678" coordinates="-149.3 56.1 85.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1679" coordinates="12.9 30.6 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1680" coordinates="24.3 12.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1681" coordinates="-14.5 3.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1682" coordinates="-2.4 -30.4 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1683" coordinates="18.0 25.5 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1684" coordinates="-25.4 -21.1 14.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1685" coordinates="26.6 10.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1686" coordinates="-6.6 -15.7 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1687" coordinates="2.3 -18.5 51.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1688" coordinates="6.7 22.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1689" coordinates="-32.8 -12.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1690" coordinates="14.1 11.1 29.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1691" coordinates="21.9 16.1 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1692" coordinates="22.6 12.1 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1693" coordinates="28.2 -11.1 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1694" coordinates="-0.4 3.0 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1695" coordinates="-44.6 -7.1 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1696" coordinates="24.4 29.0 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1697" coordinates="28.4 -14.9 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1698" coordinates="22.5 22.2 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1699" coordinates="23.3 15.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1700" coordinates="4.8 10.6 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1701" coordinates="-10.8 -1.7 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1702" coordinates="35.7 5.6 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1703" coordinates="-25.0 -5.2 46.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1704" coordinates="-28.3 -28.5 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1705" coordinates="18.2 4.2 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1706" coordinates="-29.1 -14.4 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1707" coordinates="-24.2 1.5 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1708" coordinates="12.6 11.1 27.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1709" coordinates="24.2 -105.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1710" coordinates="31.1 29.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1711" coordinates="22.5 3.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1712" coordinates="15.2 10.2 25.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1713" coordinates="-187.8 -159.6 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1714" coordinates="31.1 10.2 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1715" coordinates="26.6 10.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1716" coordinates="89.5 27.4 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1717" coordinates="-3.6 25.6 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1718" coordinates="28.9 -5.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1719" coordinates="34.3 10.2 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1720" coordinates="13.2 -4.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1721" coordinates="-12.8 7.1 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1722" coordinates="52.6 68.6 103.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1723" coordinates="-39.8 -32.8 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1724" coordinates="26.3 11.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1725" coordinates="-62.2 -39.3 206.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1726" coordinates="5.0 12.4 25.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1727" coordinates="24.7 -73.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1728" coordinates="-5.6 -29.1 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1729" coordinates="-21.1 -20.3 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1730" coordinates="-6.5 -10.3 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1731" coordinates="-4.5 7.0 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1732" coordinates="-14.0 -21.3 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1733" coordinates="-12.4 23.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1734" coordinates="9.8 0.2 22.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1735" coordinates="16.0 13.0 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1736" coordinates="33.4 -5.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1737" coordinates="13.9 13.7 24.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1738" coordinates="-40.2 -9.2 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1739" coordinates="-39.8 8.0 33.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1740" coordinates="14.3 7.5 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1741" coordinates="19.0 5.3 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1742" coordinates="-4.6 0.2 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1743" coordinates="16.1 18.7 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1744" coordinates="25.5 11.0 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1745" coordinates="2.1 -3.9 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1746" coordinates="26.8 17.4 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1747" coordinates="18.6 28.7 25.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1748" coordinates="26.0 23.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1749" coordinates="2.1 37.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1750" coordinates="0.4 -3.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1751" coordinates="18.9 -1.8 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1752" coordinates="33.3 13.9 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1753" coordinates="12.9 7.1 49.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1754" coordinates="114.2 28.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1755" coordinates="65.0 52.7 89.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1756" coordinates="-28.7 -10.4 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1757" coordinates="31.7 18.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1758" coordinates="30.2 9.2 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1759" coordinates="17.7 21.0 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1760" coordinates="4.0 -7.3 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1761" coordinates="5.0 20.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1762" coordinates="-4.7 -71.8 92.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1763" coordinates="-34.9 -18.3 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1764" coordinates="9.9 14.5 20.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1765" coordinates="4.2 -1.7 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1766" coordinates="22.2 -1.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1767" coordinates="17.1 9.6 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1768" coordinates="35.8 -13.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1769" coordinates="24.0 2.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1770" coordinates="15.8 13.8 26.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1771" coordinates="20.0 8.0 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1772" coordinates="45.0 -0.3 113.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1773" coordinates="7.7 1.0 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1774" coordinates="21.9 13.4 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1775" coordinates="-36.0 -19.5 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1776" coordinates="26.6 12.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1777" coordinates="15.0 33.3 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1778" coordinates="15.5 -7.7 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1779" coordinates="2.9 7.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1780" coordinates="-10.9 3.0 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1781" coordinates="41.2 27.4 27.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1782" coordinates="-58.5 -2.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1783" coordinates="101.2 -12.8 113.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1784" coordinates="14.9 7.8 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1785" coordinates="11.6 12.2 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1786" coordinates="-12.7 -5.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1787" coordinates="15.0 9.7 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1788" coordinates="-2.2 19.5 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1789" coordinates="15.2 -3.8 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1790" coordinates="1.6 -3.1 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1791" coordinates="30.6 7.5 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1792" coordinates="16.1 18.4 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1793" coordinates="-22.7 4.1 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1794" coordinates="21.3 14.8 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1795" coordinates="13.4 8.4 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1796" coordinates="21.6 63.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1797" coordinates="-13.2 12.4 26.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1798" coordinates="-32.4 2.2 34.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1799" coordinates="2.5 1.6 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1800" coordinates="-9.5 19.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1801" coordinates="-3.0 30.9 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1802" coordinates="-20.7 -10.7 25.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1803" coordinates="9.6 4.9 20.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1804" coordinates="0.8 4.7 20.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1805" coordinates="-0.8 10.9 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1806" coordinates="24.9 32.6 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1807" coordinates="7.0 20.0 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1808" coordinates="1.5 18.4 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1809" coordinates="-40.6 -11.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1810" coordinates="-16.2 -20.2 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1811" coordinates="-48.5 12.9 16.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1812" coordinates="25.3 12.1 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1813" coordinates="-38.1 -16.7 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1814" coordinates="-12.7 -5.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1815" coordinates="16.2 12.6 21.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1816" coordinates="1.5 -2.1 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1817" coordinates="9.5 19.3 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1818" coordinates="-150.5 -287.8 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1819" coordinates="-21.3 -1.6 21.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1820" coordinates="4.9 -8.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1821" coordinates="-48.9 -19.6 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1822" coordinates="21.5 14.1 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1823" coordinates="16.6 9.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1824" coordinates="-9.5 16.5 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1825" coordinates="-16.6 -39.2 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1826" coordinates="-9.7 6.9 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1827" coordinates="19.4 12.5 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1828" coordinates="-45.0 4.0 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1829" coordinates="33.2 -22.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1830" coordinates="-0.4 1.3 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1831" coordinates="15.9 41.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1832" coordinates="12.1 7.8 26.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1833" coordinates="-3.3 11.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1834" coordinates="10.7 20.8 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1835" coordinates="45.6 17.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1836" coordinates="54.1 -4.6 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1837" coordinates="24.4 8.2 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1838" coordinates="-32.6 -12.7 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1839" coordinates="31.7 8.9 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1840" coordinates="-43.0 0.8 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1841" coordinates="38.0 -1.8 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1842" coordinates="-3.6 12.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1843" coordinates="140.1 154.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1844" coordinates="33.0 9.5 15.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1845" coordinates="14.5 11.8 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1846" coordinates="-0.7 2.1 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1847" coordinates="17.6 9.2 17.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1848" coordinates="-6.4 15.8 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1849" coordinates="8.3 13.0 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1850" coordinates="31.9 26.1 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1851" coordinates="8.8 15.4 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1852" coordinates="24.0 20.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1853" coordinates="-0.1 -0.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1854" coordinates="-8.5 -3.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1855" coordinates="14.9 9.2 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1856" coordinates="27.4 11.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1857" coordinates="27.0 3.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1858" coordinates="5.9 9.4 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1859" coordinates="4.5 5.4 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1860" coordinates="-1.9 4.4 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1861" coordinates="21.6 5.2 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1862" coordinates="6.6 21.3 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1863" coordinates="5.1 -7.8 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1864" coordinates="-5.5 9.9 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1865" coordinates="23.9 15.5 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1866" coordinates="-6.7 21.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1867" coordinates="18.2 7.5 19.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1868" coordinates="-35.6 -26.6 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1869" coordinates="16.6 -0.5 23.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1870" coordinates="27.9 1.4 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1871" coordinates="32.0 16.9 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1872" coordinates="-20.4 15.2 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1873" coordinates="-6.7 -16.6 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1874" coordinates="-34.5 -9.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1875" coordinates="-33.5 -17.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1876" coordinates="22.9 12.1 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1877" coordinates="9.7 12.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1878" coordinates="35.4 7.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1879" coordinates="22.6 9.5 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1880" coordinates="32.8 12.2 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1881" coordinates="43.5 11.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1882" coordinates="26.0 17.3 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1883" coordinates="34.5 8.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1884" coordinates="22.7 24.2 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1885" coordinates="24.5 17.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1886" coordinates="70.1 57.7 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1887" coordinates="6.9 10.9 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1888" coordinates="-13.3 -12.9 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1889" coordinates="0.1 12.2 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1890" coordinates="26.2 11.0 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1891" coordinates="16.2 -12.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1892" coordinates="26.1 13.3 21.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1893" coordinates="26.0 13.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1894" coordinates="30.3 11.1 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1895" coordinates="-16.9 1.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1896" coordinates="20.8 14.4 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1897" coordinates="24.4 17.5 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1898" coordinates="23.0 25.9 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1899" coordinates="-44.2 -16.2 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1900" coordinates="-47.2 -0.9 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1901" coordinates="-37.9 12.0 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1902" coordinates="-3.6 19.3 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1903" coordinates="23.3 4.9 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1904" coordinates="5.1 17.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1905" coordinates="4.3 5.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1906" coordinates="2.6 -13.3 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1907" coordinates="-5.3 13.0 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1908" coordinates="-41.4 -8.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1909" coordinates="2.8 42.0 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1910" coordinates="55.0 22.0 52.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1911" coordinates="-17.9 -5.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1912" coordinates="3.4 -16.3 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1913" coordinates="16.7 11.8 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1914" coordinates="10.6 25.9 37.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1915" coordinates="24.9 23.4 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1916" coordinates="10.5 14.0 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1917" coordinates="-36.7 -0.9 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1918" coordinates="11.4 -3.6 15.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1919" coordinates="-0.5 -3.7 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1920" coordinates="11.6 7.5 29.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1921" coordinates="-28.0 32.8 28.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1922" coordinates="-187.1 -61.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1923" coordinates="30.3 4.5 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1924" coordinates="-13.7 10.3 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1925" coordinates="-4.5 -7.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1926" coordinates="5.7 4.4 33.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1927" coordinates="27.3 11.3 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1928" coordinates="-1.8 6.3 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1929" coordinates="-43.8 19.1 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1930" coordinates="23.8 17.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1931" coordinates="10.6 1.5 28.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1932" coordinates="-8.2 1.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1933" coordinates="-42.2 8.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1934" coordinates="-14.5 -2.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1935" coordinates="-35.7 -22.5 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1936" coordinates="-8.9 50.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1937" coordinates="0.5 10.3 11.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1938" coordinates="7.2 12.2 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1939" coordinates="-38.2 -3.8 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1940" coordinates="-34.1 -21.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1941" coordinates="31.0 -9.5 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1942" coordinates="-46.3 120.8 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1943" coordinates="17.1 11.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1944" coordinates="22.1 26.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1945" coordinates="-22.4 -21.5 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1946" coordinates="129.3 -38.0 53.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1947" coordinates="-19.5 -12.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1948" coordinates="115.9 88.9 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1949" coordinates="22.9 12.4 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1950" coordinates="5.9 -41.7 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1951" coordinates="12.1 -5.0 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1952" coordinates="19.7 11.3 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1953" coordinates="-15.4 16.0 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1954" coordinates="14.3 2.9 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1955" coordinates="13.7 20.3 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1956" coordinates="-13.2 -7.8 27.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1957" coordinates="-24.3 -24.0 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1958" coordinates="26.9 -2.8 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1959" coordinates="6.7 21.3 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1960" coordinates="26.8 4.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1961" coordinates="-11.8 -6.7 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1962" coordinates="-37.0 6.3 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1963" coordinates="25.7 14.2 105.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1964" coordinates="33.6 10.2 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1965" coordinates="9.8 21.7 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1966" coordinates="27.9 6.0 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1967" coordinates="11.9 19.8 23.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1968" coordinates="17.1 -4.2 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1969" coordinates="26.2 22.9 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1970" coordinates="25.0 6.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1971" coordinates="9.4 -6.7 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1972" coordinates="-0.2 -3.5 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1973" coordinates="26.0 19.7 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1974" coordinates="5.9 -17.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1975" coordinates="39.9 8.2 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1976" coordinates="-35.4 24.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1977" coordinates="-32.6 -16.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1978" coordinates="9.3 63.8 44.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1979" coordinates="-41.1 -6.0 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1980" coordinates="-26.8 -10.7 17.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1981" coordinates="11.3 -13.2 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1982" coordinates="9.9 -1.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1983" coordinates="-35.3 -1.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1984" coordinates="-27.2 -22.5 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1985" coordinates="42.9 46.0 76.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1986" coordinates="27.8 12.4 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1987" coordinates="6.5 24.9 22.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1988" coordinates="-28.3 -26.1 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1989" coordinates="12.1 20.5 17.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1990" coordinates="-19.9 2.5 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1991" coordinates="-40.7 -8.8 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1992" coordinates="-28.6 -12.2 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1993" coordinates="3.2 -1.2 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1994" coordinates="-27.5 -13.6 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1995" coordinates="3.3 4.8 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1996" coordinates="20.7 13.4 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1997" coordinates="-68.1 65.5 109.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1998" coordinates="38.1 13.9 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1999" coordinates="-36.0 -15.3 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2000" coordinates="-33.5 -10.8 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2001" coordinates="9.9 3.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2002" coordinates="-2.0 10.3 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2003" coordinates="25.3 10.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2004" coordinates="2.2 24.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2005" coordinates="48.9 40.2 55.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2006" coordinates="-39.4 -14.7 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2007" coordinates="14.1 4.1 15.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2008" coordinates="36.4 15.9 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2009" coordinates="-20.6 24.2 22.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2010" coordinates="86.6 61.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2011" coordinates="21.4 14.1 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2012" coordinates="-42.0 -11.2 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2013" coordinates="24.5 14.8 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2014" coordinates="-39.2 -22.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2015" coordinates="63.2 30.9 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2016" coordinates="4.3 -4.5 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2017" coordinates="-9.5 -14.0 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2018" coordinates="-49.6 -26.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2019" coordinates="26.2 3.8 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2020" coordinates="-9.6 -14.8 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2021" coordinates="14.1 64.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2022" coordinates="-10.4 15.0 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2023" coordinates="5.4 6.2 17.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2024" coordinates="12.0 15.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2025" coordinates="10.8 -1.3 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2026" coordinates="-32.1 -5.7 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2027" coordinates="30.2 12.0 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2028" coordinates="-24.9 80.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2029" coordinates="84.6 12.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2030" coordinates="11.4 32.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2031" coordinates="-0.1 -1.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2032" coordinates="-11.5 6.0 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2033" coordinates="12.4 10.6 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2034" coordinates="-39.9 7.0 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2035" coordinates="-12.7 -4.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2036" coordinates="-52.9 -25.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2037" coordinates="-41.4 -4.2 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2038" coordinates="34.2 7.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2039" coordinates="9.4 13.4 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2040" coordinates="26.4 9.7 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2041" coordinates="23.8 31.1 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2042" coordinates="26.2 6.9 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2043" coordinates="36.2 -18.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2044" coordinates="15.5 14.5 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2045" coordinates="13.4 -57.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2046" coordinates="23.1 -6.1 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2047" coordinates="-30.5 -0.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2048" coordinates="26.6 13.1 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2049" coordinates="30.2 9.6 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2050" coordinates="8.8 23.0 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2051" coordinates="13.4 23.5 31.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2052" coordinates="8.5 -16.8 19.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2053" coordinates="26.9 14.7 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2054" coordinates="9.3 -15.8 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2055" coordinates="9.8 4.4 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2056" coordinates="1.0 12.4 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2057" coordinates="4.6 13.6 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2058" coordinates="22.3 17.9 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2059" coordinates="15.1 16.7 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2060" coordinates="73.7 130.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2061" coordinates="-18.8 -0.6 37.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2062" coordinates="-211.8 -33.1 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2063" coordinates="15.0 22.1 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2064" coordinates="8.3 4.5 22.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2065" coordinates="-16.2 -19.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2066" coordinates="21.9 5.6 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2067" coordinates="-25.1 -53.8 23.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2068" coordinates="33.3 37.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2069" coordinates="22.2 8.9 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2070" coordinates="-4.7 11.3 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2071" coordinates="-3.3 2.9 15.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2072" coordinates="11.7 9.7 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2073" coordinates="34.0 13.1 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2074" coordinates="-28.8 -13.6 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2075" coordinates="24.0 18.3 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2076" coordinates="-16.1 -335.1 78.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2077" coordinates="-38.3 -18.6 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2078" coordinates="2.8 -14.8 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2079" coordinates="78.0 50.1 40.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2080" coordinates="-54.8 -45.1 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2081" coordinates="20.7 18.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2082" coordinates="11.9 41.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2083" coordinates="-46.6 -4.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2084" coordinates="-15.6 7.2 37.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2085" coordinates="21.2 -7.1 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2086" coordinates="18.7 -9.2 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2087" coordinates="25.5 11.4 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2088" coordinates="-2.5 12.8 38.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2089" coordinates="-42.0 -1.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2090" coordinates="25.3 45.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2091" coordinates="-42.7 1.8 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2092" coordinates="-70.9 -1.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2093" coordinates="36.0 7.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2094" coordinates="-4.7 2.0 28.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2095" coordinates="4.0 4.4 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2096" coordinates="24.7 30.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2097" coordinates="5.0 -3.8 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2098" coordinates="-34.8 -6.2 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2099" coordinates="-12.1 -2.9 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2100" coordinates="36.6 19.9 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2101" coordinates="-44.0 -17.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2102" coordinates="-18.0 1.0 14.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2103" coordinates="26.2 12.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2104" coordinates="-35.7 1.6 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2105" coordinates="-20.0 -3.2 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2106" coordinates="5.2 17.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2107" coordinates="-2.4 7.3 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2108" coordinates="-11.1 7.3 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2109" coordinates="-4.4 7.4 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2110" coordinates="28.8 -13.5 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2111" coordinates="25.4 -0.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2112" coordinates="29.1 37.1 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2113" coordinates="23.0 3.5 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2114" coordinates="-36.4 -29.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2115" coordinates="28.7 11.4 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2116" coordinates="17.0 18.0 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2117" coordinates="99.4 24.2 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2118" coordinates="12.5 25.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2119" coordinates="-28.3 -16.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2120" coordinates="5.5 6.7 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2121" coordinates="-1.4 2.0 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2122" coordinates="23.3 38.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2123" coordinates="21.9 -1.6 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2124" coordinates="83.3 63.4 43.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2125" coordinates="24.3 -31.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2126" coordinates="-2.6 -7.5 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2127" coordinates="23.5 11.0 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2128" coordinates="22.8 7.8 14.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2129" coordinates="-43.0 -6.0 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2130" coordinates="4.1 13.1 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2131" coordinates="18.1 12.8 24.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2132" coordinates="-13.4 -4.1 27.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2133" coordinates="12.8 7.4 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2134" coordinates="16.3 11.3 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2135" coordinates="24.2 15.3 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2136" coordinates="23.6 1.4 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2137" coordinates="17.6 49.7 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2138" coordinates="12.4 18.7 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2139" coordinates="13.4 7.9 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2140" coordinates="31.5 14.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2141" coordinates="17.5 -5.1 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2142" coordinates="3.6 -45.7 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2143" coordinates="22.0 23.4 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2144" coordinates="-91.6 -31.9 134.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2145" coordinates="2.6 2.9 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2146" coordinates="27.0 15.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2147" coordinates="14.5 20.3 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2148" coordinates="-30.0 17.8 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2149" coordinates="-4.7 -2.3 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2150" coordinates="-41.4 -10.4 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2151" coordinates="-43.2 -35.3 173.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2152" coordinates="22.9 9.8 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2153" coordinates="29.7 14.7 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2154" coordinates="-114.2 114.5 66.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2155" coordinates="50.6 -8.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2156" coordinates="-59.9 -26.2 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2157" coordinates="32.8 25.0 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2158" coordinates="16.0 23.4 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2159" coordinates="-39.1 -2.3 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2160" coordinates="-4.3 -13.1 36.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2161" coordinates="-48.7 -2.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2162" coordinates="31.1 5.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2163" coordinates="36.0 13.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2164" coordinates="-18.5 11.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2165" coordinates="-25.2 -19.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2166" coordinates="0.9 82.7 173.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2167" coordinates="14.4 18.2 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2168" coordinates="-5.5 13.0 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2169" coordinates="7.2 12.7 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2170" coordinates="-21.2 -18.0 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2171" coordinates="26.7 9.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2172" coordinates="14.4 -4.7 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2173" coordinates="-6.6 3.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2174" coordinates="15.0 11.3 17.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2175" coordinates="11.8 5.0 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2176" coordinates="-33.0 -5.2 40.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2177" coordinates="80.3 81.0 11.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2178" coordinates="2.9 -37.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2179" coordinates="-3.2 20.8 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2180" coordinates="-8.2 -4.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2181" coordinates="-29.7 -7.5 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2182" coordinates="-40.9 6.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2183" coordinates="136.0 -22.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2184" coordinates="83.1 48.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2185" coordinates="17.0 13.9 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2186" coordinates="-38.9 -32.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2187" coordinates="-4.7 4.9 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2188" coordinates="-21.9 22.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2189" coordinates="-12.9 -9.2 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2190" coordinates="16.6 1.9 23.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2191" coordinates="6.3 0.9 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2192" coordinates="-20.6 -7.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2193" coordinates="23.4 17.8 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2194" coordinates="-49.8 23.9 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2195" coordinates="15.6 10.4 19.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2196" coordinates="-42.3 6.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2197" coordinates="40.4 7.0 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2198" coordinates="-28.0 -22.8 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2199" coordinates="33.6 25.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2200" coordinates="32.1 14.6 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2201" coordinates="27.8 13.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2202" coordinates="18.0 15.2 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2203" coordinates="53.8 114.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2204" coordinates="21.1 11.7 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2205" coordinates="-13.2 13.5 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2206" coordinates="-11.2 12.9 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2207" coordinates="9.3 23.2 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2208" coordinates="10.7 -39.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2209" coordinates="-43.5 -1.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2210" coordinates="22.0 10.1 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2211" coordinates="19.4 18.0 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2212" coordinates="13.6 4.3 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2213" coordinates="13.1 16.1 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2214" coordinates="23.7 17.5 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2215" coordinates="2.8 -2.2 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2216" coordinates="9.9 7.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2217" coordinates="102.1 4.1 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2218" coordinates="-16.2 19.4 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2219" coordinates="2.5 15.6 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2220" coordinates="28.3 1.3 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2221" coordinates="-54.2 -5.7 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2222" coordinates="-2.3 2.5 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2223" coordinates="20.9 8.3 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2224" coordinates="4.9 2.0 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2225" coordinates="13.8 7.9 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2226" coordinates="-47.3 -13.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2227" coordinates="70.8 81.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2228" coordinates="17.2 12.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2229" coordinates="22.8 18.1 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2230" coordinates="-30.6 -13.4 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2231" coordinates="17.6 21.4 57.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2232" coordinates="-0.4 3.3 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2233" coordinates="35.1 -27.4 158.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2234" coordinates="8.5 10.1 24.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2235" coordinates="-7.1 9.2 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2236" coordinates="20.8 9.2 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2237" coordinates="11.6 3.8 31.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2238" coordinates="38.5 3.6 261.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2239" coordinates="20.0 15.3 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2240" coordinates="27.4 18.9 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2241" coordinates="11.1 13.3 16.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2242" coordinates="-33.8 -15.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2243" coordinates="-41.3 -14.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2244" coordinates="-38.4 -13.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2245" coordinates="14.6 -4.7 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2246" coordinates="17.5 33.6 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2247" coordinates="5.7 1.5 19.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2248" coordinates="-52.9 -2.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2249" coordinates="-8.9 38.2 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2250" coordinates="-36.2 2.4 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2251" coordinates="33.3 18.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2252" coordinates="25.2 20.1 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2253" coordinates="-31.7 -26.4 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2254" coordinates="11.5 10.0 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2255" coordinates="25.6 0.4 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2256" coordinates="-24.4 -13.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2257" coordinates="25.3 15.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2258" coordinates="23.6 6.7 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2259" coordinates="-6.2 19.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2260" coordinates="-11.0 6.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2261" coordinates="10.9 19.1 22.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2262" coordinates="-5.1 6.0 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2263" coordinates="13.9 22.3 23.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2264" coordinates="9.2 -7.8 18.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2265" coordinates="-37.5 -49.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2266" coordinates="15.6 3.5 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2267" coordinates="40.0 22.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2268" coordinates="-25.4 0.2 30.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2269" coordinates="29.8 22.9 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2270" coordinates="-44.8 -16.7 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2271" coordinates="31.9 16.1 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2272" coordinates="6.8 3.5 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2273" coordinates="29.6 17.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2274" coordinates="-2.8 20.0 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2275" coordinates="4.2 7.2 23.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2276" coordinates="-17.2 -6.4 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2277" coordinates="50.9 37.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2278" coordinates="32.4 -10.7 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2279" coordinates="47.8 16.3 73.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2280" coordinates="-50.3 -18.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2281" coordinates="-51.1 -8.7 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2282" coordinates="-2.0 -1.5 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2283" coordinates="4.6 -6.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2284" coordinates="5.0 22.9 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2285" coordinates="-17.3 -14.6 66.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2286" coordinates="23.7 9.8 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2287" coordinates="19.6 25.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2288" coordinates="26.6 -6.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2289" coordinates="5.8 -3.5 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2290" coordinates="36.9 5.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2291" coordinates="32.4 9.2 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2292" coordinates="27.3 4.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2293" coordinates="-36.1 -14.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2294" coordinates="6.9 -1.7 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2295" coordinates="16.3 6.2 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2296" coordinates="29.6 7.4 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2297" coordinates="19.7 17.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2298" coordinates="-49.7 -30.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2299" coordinates="34.8 20.4 20.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2300" coordinates="-50.4 20.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2301" coordinates="-51.2 -9.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2302" coordinates="7.0 4.7 17.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2303" coordinates="10.8 2.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2304" coordinates="25.1 13.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2305" coordinates="9.5 21.3 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2306" coordinates="7.9 11.0 24.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2307" coordinates="35.6 75.8 36.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2308" coordinates="25.9 0.5 28.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2309" coordinates="-29.5 -9.2 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2310" coordinates="205.7 90.4 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2311" coordinates="-39.3 -4.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2312" coordinates="23.4 13.6 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2313" coordinates="-48.6 -1.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2314" coordinates="-31.6 -8.2 86.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2315" coordinates="-49.0 5.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2316" coordinates="-14.2 -13.4 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2317" coordinates="26.3 8.7 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2318" coordinates="-25.1 -28.1 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2319" coordinates="-5.2 14.8 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2320" coordinates="41.8 73.2 107.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2321" coordinates="-9.9 -2.3 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2322" coordinates="24.3 13.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2323" coordinates="31.7 19.2 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2324" coordinates="-12.6 -1.6 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2325" coordinates="-31.7 -18.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2326" coordinates="-67.8 -35.9 149.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2327" coordinates="33.7 -19.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2328" coordinates="17.3 22.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2329" coordinates="6.3 10.2 18.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2330" coordinates="-37.7 -41.6 156.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2331" coordinates="-41.4 26.3 33.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2332" coordinates="-40.9 1.0 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2333" coordinates="32.0 -21.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2334" coordinates="44.8 30.7 103.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2335" coordinates="11.5 0.6 20.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2336" coordinates="23.5 -2.9 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2337" coordinates="18.3 17.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2338" coordinates="25.1 12.2 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2339" coordinates="-24.5 -13.4 39.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2340" coordinates="-34.7 -4.4 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2341" coordinates="-34.8 -36.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2342" coordinates="45.2 12.6 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2343" coordinates="-40.9 -13.2 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2344" coordinates="37.2 29.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2345" coordinates="-39.8 -5.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2346" coordinates="-79.7 196.5 105.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2347" coordinates="-2.2 10.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2348" coordinates="32.9 4.9 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2349" coordinates="34.1 14.3 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2350" coordinates="4.3 7.2 24.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2351" coordinates="-6.8 9.7 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2352" coordinates="-52.6 -15.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2353" coordinates="38.5 44.1 54.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2354" coordinates="-35.7 -11.6 55.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2355" coordinates="6.0 4.4 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2356" coordinates="24.4 19.0 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2357" coordinates="22.2 13.7 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2358" coordinates="-1.7 8.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2359" coordinates="-31.9 -10.9 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2360" coordinates="-22.7 10.3 23.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2361" coordinates="-28.2 -9.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2362" coordinates="21.5 21.9 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2363" coordinates="6.8 -8.6 18.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2364" coordinates="22.5 25.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2365" coordinates="16.3 2.2 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2366" coordinates="10.8 6.2 17.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2367" coordinates="0.0 -52.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2368" coordinates="-46.1 -19.3 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2369" coordinates="42.2 11.2 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2370" coordinates="17.3 -2.7 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2371" coordinates="-49.7 -9.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2372" coordinates="26.9 18.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2373" coordinates="11.6 13.7 65.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2374" coordinates="33.5 9.5 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2375" coordinates="0.3 12.9 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2376" coordinates="20.3 -3.1 36.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2377" coordinates="14.2 16.7 24.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2378" coordinates="-7.5 -18.4 38.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2379" coordinates="7.8 17.4 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2380" coordinates="76.6 -63.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2381" coordinates="-42.9 0.0 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2382" coordinates="17.0 -10.8 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2383" coordinates="-2.1 0.3 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2384" coordinates="-2.9 -7.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2385" coordinates="-26.8 -23.7 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2386" coordinates="19.1 0.6 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2387" coordinates="-13.3 3.3 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2388" coordinates="21.4 1.7 20.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2389" coordinates="-38.1 -21.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2390" coordinates="35.4 -30.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2391" coordinates="28.8 6.0 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2392" coordinates="-31.1 11.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2393" coordinates="-8.5 3.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2394" coordinates="10.7 -10.6 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2395" coordinates="-2.3 -106.9 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2396" coordinates="-33.8 -6.1 22.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2397" coordinates="9.2 -14.8 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2398" coordinates="17.7 18.2 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2399" coordinates="-12.7 -18.5 25.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2400" coordinates="39.1 11.5 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2401" coordinates="17.3 36.2 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2402" coordinates="15.4 18.1 20.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2403" coordinates="64.3 47.4 118.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2404" coordinates="-8.4 -8.5 20.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2405" coordinates="6.0 10.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2406" coordinates="14.5 2.6 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2407" coordinates="-16.1 3.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2408" coordinates="31.5 14.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2409" coordinates="-0.4 51.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2410" coordinates="13.8 -6.0 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2411" coordinates="-6.4 -1.2 48.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2412" coordinates="34.4 14.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2413" coordinates="17.9 2.2 34.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2414" coordinates="8.0 8.4 21.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2415" coordinates="-34.1 -31.1 23.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2416" coordinates="20.9 20.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2417" coordinates="-21.5 6.2 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2418" coordinates="-4.6 -9.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2419" coordinates="-24.9 2.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2420" coordinates="36.6 21.8 71.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2421" coordinates="-43.6 -10.6 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2422" coordinates="9.1 2.7 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2423" coordinates="-39.4 -1.8 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2424" coordinates="1.6 18.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2425" coordinates="-33.8 -37.9 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2426" coordinates="-42.1 21.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2427" coordinates="15.8 -0.1 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2428" coordinates="10.5 4.5 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2429" coordinates="28.1 12.2 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2430" coordinates="25.7 15.0 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2431" coordinates="-45.4 -34.0 11.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2432" coordinates="8.7 11.3 28.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2433" coordinates="2.6 5.0 31.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2434" coordinates="-41.0 -21.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2435" coordinates="11.7 8.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2436" coordinates="-9.3 16.7 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2437" coordinates="4.9 3.0 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2438" coordinates="-0.7 -13.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2439" coordinates="21.7 9.1 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2440" coordinates="14.0 20.8 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2441" coordinates="28.6 16.1 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2442" coordinates="27.5 21.9 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2443" coordinates="28.7 9.5 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2444" coordinates="-5.8 9.9 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2445" coordinates="-5.0 -1.7 47.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2446" coordinates="24.4 -1.0 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2447" coordinates="4.7 -22.8 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2448" coordinates="-13.9 -10.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2449" coordinates="10.6 17.0 20.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2450" coordinates="-3.3 -1.7 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2451" coordinates="5.1 18.7 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2452" coordinates="11.3 12.2 17.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2453" coordinates="-12.7 -13.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2454" coordinates="-21.9 3.0 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2455" coordinates="-43.4 -3.0 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2456" coordinates="18.0 22.4 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2457" coordinates="-2.3 23.9 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2458" coordinates="-52.3 12.5 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2459" coordinates="6.5 27.3 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2460" coordinates="2.0 19.6 26.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2461" coordinates="12.5 85.7 62.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2462" coordinates="-22.0 39.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2463" coordinates="-11.3 -6.2 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2464" coordinates="-11.5 2.5 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2465" coordinates="21.6 -3.1 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2466" coordinates="3.5 14.2 15.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2467" coordinates="188.4 210.2 442.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2468" coordinates="-41.9 0.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2469" coordinates="26.7 23.4 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2470" coordinates="21.4 18.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2471" coordinates="30.0 -3.9 23.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2472" coordinates="-5.5 -22.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2473" coordinates="22.7 -2.9 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2474" coordinates="28.2 19.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2475" coordinates="17.8 12.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2476" coordinates="-33.1 -22.9 47.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2477" coordinates="10.5 13.6 77.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2478" coordinates="27.8 -28.0 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2479" coordinates="11.7 -6.4 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2480" coordinates="9.5 18.6 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2481" coordinates="-26.5 1.2 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2482" coordinates="3.4 12.4 19.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2483" coordinates="-40.8 0.9 132.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2484" coordinates="-38.5 20.7 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2485" coordinates="71.7 86.2 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2486" coordinates="5.2 16.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2487" coordinates="35.7 9.6 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2488" coordinates="15.9 15.7 23.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2489" coordinates="28.8 29.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2490" coordinates="25.4 23.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2491" coordinates="7.7 3.1 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2492" coordinates="15.3 -7.2 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2493" coordinates="-3.1 6.7 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2494" coordinates="23.5 13.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2495" coordinates="24.0 13.3 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2496" coordinates="23.1 15.1 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2497" coordinates="22.6 13.7 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2498" coordinates="12.1 4.1 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2499" coordinates="-32.7 -13.3 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+       </AS>
+</platform> 
diff --git a/examples/platforms/syscoord/median_p2psim.xml b/examples/platforms/syscoord/median_p2psim.xml
new file mode 100644 (file)
index 0000000..70c37f9
--- /dev/null
@@ -0,0 +1,5230 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<config id="General">
+       <prop id="network/coordinates" value="yes"></prop>
+</config>
+
+       <AS  id="AS0"  routing="Vivaldi">
+               <peer id="peer-0" coordinates="-30.8 -183.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1" coordinates="-1.3 3.4 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-2" coordinates="6.6 6.7 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-3" coordinates="-16.7 19.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-4" coordinates="7.8 5.6 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-5" coordinates="-5.9 -4.4 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-6" coordinates="0.0 -5.0 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-7" coordinates="0.3 -4.1 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-8" coordinates="-1.3 -10.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-9" coordinates="2.3 -5.9 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-10" coordinates="2.9 -3.0 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-11" coordinates="4.3 4.7 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-12" coordinates="3.0 -1.0 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-13" coordinates="8.2 -4.9 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-14" coordinates="6.5 -0.9 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-15" coordinates="9.1 -3.9 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-16" coordinates="-6.0 18.8 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-17" coordinates="4.6 1.3 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-18" coordinates="6.0 -12.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-19" coordinates="3.3 10.1 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-20" coordinates="10.6 0.8 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-21" coordinates="-6.3 15.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-22" coordinates="-1.6 2.5 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-23" coordinates="-3.4 1.9 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-24" coordinates="-10.0 -1.7 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-25" coordinates="-8.7 -2.3 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-26" coordinates="-10.6 -9.4 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-27" coordinates="-0.6 -0.2 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-28" coordinates="8.4 -11.4 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-29" coordinates="0.3 8.6 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-30" coordinates="5.5 -10.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-31" coordinates="-0.2 -4.9 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-32" coordinates="5.2 5.2 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-33" coordinates="9.4 -9.5 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-34" coordinates="5.8 -4.9 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-35" coordinates="1.9 -7.6 22.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-36" coordinates="-1.1 0.7 15.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-37" coordinates="7.6 -0.2 44.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-38" coordinates="8.9 19.6 23.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-39" coordinates="0.3 0.3 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-40" coordinates="7.0 12.5 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-41" coordinates="4.2 6.9 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-42" coordinates="1.4 -9.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-43" coordinates="0.6 1.4 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-44" coordinates="0.4 -5.5 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-45" coordinates="6.9 2.6 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-46" coordinates="6.9 3.0 10.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-47" coordinates="1.4 -6.6 30.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-48" coordinates="3.4 17.4 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-49" coordinates="10.5 -6.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-50" coordinates="-17.2 19.6 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-51" coordinates="8.5 24.4 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-52" coordinates="-4.0 -1.1 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-53" coordinates="-4.3 -17.1 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-54" coordinates="-5.7 -1.2 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-55" coordinates="-6.4 35.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-56" coordinates="-0.3 1.1 31.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-57" coordinates="1.8 -8.2 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-58" coordinates="2.3 2.6 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-59" coordinates="3.6 0.3 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-60" coordinates="13.8 -10.9 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-61" coordinates="-1.0 -9.6 18.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-62" coordinates="14.1 20.7 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-63" coordinates="18.3 -11.0 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-64" coordinates="7.0 -1.6 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-65" coordinates="-6.8 -13.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-66" coordinates="10.6 -9.6 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-67" coordinates="-0.5 -3.8 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-68" coordinates="8.5 -8.8 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-69" coordinates="1.4 -6.1 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-70" coordinates="0.6 -2.5 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-71" coordinates="-11.5 -6.8 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-72" coordinates="1.0 20.4 14.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-73" coordinates="-2.2 19.5 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-74" coordinates="-9.6 -5.1 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-75" coordinates="-0.6 0.6 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-76" coordinates="8.6 24.5 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-77" coordinates="-0.4 8.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-78" coordinates="-11.7 34.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-79" coordinates="-10.6 22.8 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-80" coordinates="9.1 -15.4 45.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-81" coordinates="20.3 -5.0 35.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-82" coordinates="-3.0 -6.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-83" coordinates="0.4 30.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-84" coordinates="24.2 -9.9 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-85" coordinates="2.6 -8.5 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-86" coordinates="4.7 -8.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-87" coordinates="-2.9 23.9 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-88" coordinates="1.7 -5.0 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-89" coordinates="77.3 8.0 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-90" coordinates="11.6 -8.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-91" coordinates="10.1 -9.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-92" coordinates="2.0 -62.0 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-93" coordinates="12.5 6.8 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-94" coordinates="-8.1 -10.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-95" coordinates="16.4 -6.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-96" coordinates="-11.8 25.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-97" coordinates="-12.3 24.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-98" coordinates="-0.2 25.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-99" coordinates="7.2 -16.5 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-100" coordinates="11.7 -7.9 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-101" coordinates="0.1 -14.6 29.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-102" coordinates="7.1 -2.5 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-103" coordinates="0.4 -54.7 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-104" coordinates="-0.8 0.8 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-105" coordinates="-5.6 -4.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-106" coordinates="13.8 2.3 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-107" coordinates="-0.4 -12.9 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-108" coordinates="-3.0 17.7 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-109" coordinates="-13.3 8.2 14.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-110" coordinates="28.3 51.7 50.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-111" coordinates="-3.6 3.8 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-112" coordinates="8.6 20.3 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-113" coordinates="6.2 -8.3 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-114" coordinates="-3.6 12.6 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-115" coordinates="-1.6 21.5 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-116" coordinates="-4.7 -1.4 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-117" coordinates="21.7 -12.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-118" coordinates="9.4 -1.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-119" coordinates="24.1 -66.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-120" coordinates="0.9 -41.4 28.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-121" coordinates="3.6 -70.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-122" coordinates="26.4 -63.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-123" coordinates="-13.6 -63.4 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-124" coordinates="19.6 -55.9 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-125" coordinates="12.3 -62.6 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-126" coordinates="-7.7 -64.3 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-127" coordinates="10.6 -76.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-128" coordinates="-55.2 82.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-129" coordinates="-46.5 83.3 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-130" coordinates="-54.6 125.3 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-131" coordinates="3.0 -5.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-132" coordinates="7.6 0.9 17.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-133" coordinates="26.6 -4.8 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-134" coordinates="-5.6 -47.0 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-135" coordinates="13.4 -56.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-136" coordinates="7.3 -3.1 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-137" coordinates="5.7 -54.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-138" coordinates="18.6 1.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-139" coordinates="17.2 -6.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-140" coordinates="6.8 -6.8 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-141" coordinates="4.1 -2.7 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-142" coordinates="7.1 -8.1 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-143" coordinates="-0.4 2.7 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-144" coordinates="24.2 -4.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-145" coordinates="-0.4 -2.7 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-146" coordinates="32.9 -24.9 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-147" coordinates="22.5 -42.6 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-148" coordinates="10.6 -54.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-149" coordinates="-12.7 75.5 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-150" coordinates="-10.6 73.4 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-151" coordinates="70.5 94.3 11.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-152" coordinates="122.9 -24.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-153" coordinates="-47.3 61.8 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-154" coordinates="-31.3 81.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-155" coordinates="-15.0 23.7 57.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-156" coordinates="48.3 105.0 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-157" coordinates="10.0 -14.1 117.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-158" coordinates="2.8 -57.8 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-159" coordinates="-10.2 0.1 14.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-160" coordinates="4.8 -51.0 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-161" coordinates="1.9 -47.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-162" coordinates="3.6 -12.0 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-163" coordinates="31.3 -11.8 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-164" coordinates="2.2 18.2 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-165" coordinates="-9.7 25.4 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-166" coordinates="-11.1 -48.9 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-167" coordinates="8.7 -1.3 22.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-168" coordinates="59.8 101.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-169" coordinates="-0.3 -9.0 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-170" coordinates="18.2 -60.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-171" coordinates="6.4 -54.9 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-172" coordinates="12.8 -52.7 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-173" coordinates="-4.5 -47.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-174" coordinates="6.7 -7.9 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-175" coordinates="11.8 -52.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-176" coordinates="9.9 94.6 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-177" coordinates="9.7 126.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-178" coordinates="-17.5 52.9 53.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-179" coordinates="-30.1 63.8 51.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-180" coordinates="-24.4 52.4 48.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-181" coordinates="-8.8 27.4 73.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-182" coordinates="14.4 59.2 42.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-183" coordinates="-20.0 101.7 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-184" coordinates="6.4 -16.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-185" coordinates="1.7 -7.5 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-186" coordinates="-27.4 27.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-187" coordinates="-0.3 4.5 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-188" coordinates="1.6 29.0 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-189" coordinates="-4.4 -6.9 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-190" coordinates="8.2 -60.4 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-191" coordinates="-1.6 3.1 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-192" coordinates="0.5 1.5 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-193" coordinates="1.0 -58.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-194" coordinates="-17.8 -59.9 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-195" coordinates="8.7 -58.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-196" coordinates="22.8 -10.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-197" coordinates="2.7 -5.8 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-198" coordinates="7.2 -9.6 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-199" coordinates="5.8 26.9 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-200" coordinates="30.6 12.8 64.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-201" coordinates="-0.1 -3.3 85.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-202" coordinates="4.0 5.3 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-203" coordinates="-4.0 -49.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-204" coordinates="7.9 -51.6 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-205" coordinates="2.4 -53.0 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-206" coordinates="4.8 -1.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-207" coordinates="1.4 16.1 81.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-208" coordinates="52.3 79.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-209" coordinates="11.5 -18.0 65.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-210" coordinates="-6.0 -64.0 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-211" coordinates="-0.7 7.9 25.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-212" coordinates="25.3 -61.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-213" coordinates="5.6 -58.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-214" coordinates="-39.5 100.5 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-215" coordinates="5.8 21.1 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-216" coordinates="-12.0 -4.3 79.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-217" coordinates="5.2 -6.8 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-218" coordinates="2.6 6.5 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-219" coordinates="-0.0 4.6 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-220" coordinates="-6.8 -47.6 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-221" coordinates="23.7 -34.1 30.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-222" coordinates="-55.1 64.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-223" coordinates="-0.6 76.7 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-224" coordinates="-36.0 97.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-225" coordinates="-16.1 -58.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-226" coordinates="-0.2 -9.1 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-227" coordinates="7.3 -6.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-228" coordinates="37.7 46.5 54.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-229" coordinates="32.3 -63.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-230" coordinates="2.6 27.1 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-231" coordinates="-7.5 20.0 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-232" coordinates="3.0 -12.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-233" coordinates="16.4 -6.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-234" coordinates="-3.6 28.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-235" coordinates="1.5 -5.4 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-236" coordinates="5.7 -5.4 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-237" coordinates="6.1 0.0 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-238" coordinates="-4.2 23.4 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-239" coordinates="-0.1 -9.3 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-240" coordinates="-0.3 -1.5 18.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-241" coordinates="-5.6 21.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-242" coordinates="8.2 -18.2 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-243" coordinates="-4.6 20.7 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-244" coordinates="9.5 -57.3 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-245" coordinates="-30.4 -38.8 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-246" coordinates="-16.7 23.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-247" coordinates="-13.2 -82.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-248" coordinates="-7.4 -62.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-249" coordinates="11.0 -51.3 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-250" coordinates="14.5 -50.5 35.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-251" coordinates="35.2 7.8 89.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-252" coordinates="1.6 6.3 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-253" coordinates="-7.0 38.9 93.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-254" coordinates="12.8 -0.1 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-255" coordinates="3.3 -10.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-256" coordinates="2.0 -14.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-257" coordinates="9.6 18.7 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-258" coordinates="-9.5 3.3 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-259" coordinates="-2.9 -4.9 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-260" coordinates="-24.1 79.3 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-261" coordinates="3.9 -57.9 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-262" coordinates="3.1 -9.1 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-263" coordinates="-3.8 9.3 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-264" coordinates="-1.4 25.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-265" coordinates="-6.9 24.2 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-266" coordinates="10.1 2.0 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-267" coordinates="-9.6 3.1 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-268" coordinates="23.8 -0.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-269" coordinates="9.6 8.7 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-270" coordinates="-6.1 -10.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-271" coordinates="5.0 -9.6 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-272" coordinates="3.8 21.8 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-273" coordinates="10.7 -5.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-274" coordinates="-1.8 -8.2 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-275" coordinates="-2.2 4.6 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-276" coordinates="-0.3 -12.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-277" coordinates="11.7 -10.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-278" coordinates="7.2 -9.4 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-279" coordinates="3.9 -8.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-280" coordinates="7.4 26.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-281" coordinates="0.7 29.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-282" coordinates="-5.1 1.2 48.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-283" coordinates="2.8 -9.5 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-284" coordinates="-20.6 62.4 40.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-285" coordinates="-7.3 -5.4 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-286" coordinates="12.2 -2.3 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-287" coordinates="8.1 -2.9 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-288" coordinates="-10.9 -7.6 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-289" coordinates="8.2 2.2 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-290" coordinates="9.8 2.9 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-291" coordinates="13.3 -6.0 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-292" coordinates="10.1 -15.3 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-293" coordinates="7.2 -14.2 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-294" coordinates="8.3 28.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-295" coordinates="-2.9 24.7 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-296" coordinates="13.7 12.8 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-297" coordinates="-6.2 25.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-298" coordinates="5.9 -22.1 20.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-299" coordinates="10.7 15.5 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-300" coordinates="5.8 19.5 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-301" coordinates="4.9 13.8 19.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-302" coordinates="-15.9 -68.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-303" coordinates="6.8 -10.3 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-304" coordinates="1.6 -49.5 49.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-305" coordinates="18.7 -48.7 40.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-306" coordinates="28.2 -85.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-307" coordinates="-49.7 67.4 35.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-308" coordinates="-2.1 -52.3 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-309" coordinates="2.7 32.6 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-310" coordinates="3.8 5.7 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-311" coordinates="1.9 -10.0 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-312" coordinates="17.5 27.3 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-313" coordinates="5.7 -12.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-314" coordinates="1.3 21.8 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-315" coordinates="-34.6 6.1 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-316" coordinates="15.9 22.4 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-317" coordinates="9.5 -8.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-318" coordinates="12.6 -16.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-319" coordinates="12.6 10.5 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-320" coordinates="3.5 2.5 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-321" coordinates="-4.5 -37.7 54.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-322" coordinates="16.9 -6.7 11.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-323" coordinates="1.9 2.6 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-324" coordinates="1.2 12.4 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-325" coordinates="-85.9 72.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-326" coordinates="-0.9 -2.8 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-327" coordinates="2.1 -2.9 16.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-328" coordinates="1.1 -5.1 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-329" coordinates="6.1 -0.4 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-330" coordinates="3.2 28.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-331" coordinates="5.6 21.6 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-332" coordinates="6.8 -9.5 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-333" coordinates="-3.8 -4.7 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-334" coordinates="-3.2 9.3 27.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-335" coordinates="-3.0 -12.5 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-336" coordinates="6.5 -2.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-337" coordinates="5.2 -0.9 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-338" coordinates="6.0 -1.2 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-339" coordinates="-7.7 19.9 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-340" coordinates="41.5 8.0 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-341" coordinates="-8.7 2.6 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-342" coordinates="0.8 -60.0 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-343" coordinates="50.5 -23.4 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-344" coordinates="-1.1 -5.8 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-345" coordinates="-0.5 3.0 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-346" coordinates="3.0 9.9 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-347" coordinates="11.6 -57.6 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-348" coordinates="18.6 -49.2 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-349" coordinates="38.7 -59.5 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-350" coordinates="-3.7 -58.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-351" coordinates="5.6 -58.2 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-352" coordinates="233.1 75.6 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-353" coordinates="-0.9 -49.5 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-354" coordinates="5.2 -49.9 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-355" coordinates="7.7 -45.9 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-356" coordinates="22.1 -61.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-357" coordinates="10.4 -73.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-358" coordinates="-0.2 -56.2 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-359" coordinates="-5.0 -54.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-360" coordinates="-12.8 -81.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-361" coordinates="11.0 -57.1 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-362" coordinates="23.8 -65.7 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-363" coordinates="24.0 -81.9 73.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-364" coordinates="10.8 -46.7 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-365" coordinates="11.6 -47.7 14.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-366" coordinates="-6.1 -55.9 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-367" coordinates="-105.0 -55.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-368" coordinates="-18.0 -86.0 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-369" coordinates="0.8 -54.4 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-370" coordinates="-10.7 -48.7 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-371" coordinates="8.1 -31.8 73.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-372" coordinates="-15.7 -65.2 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-373" coordinates="7.6 -58.8 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-374" coordinates="5.2 -44.5 33.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-375" coordinates="7.9 -71.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-376" coordinates="-2.1 -54.5 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-377" coordinates="-2.5 -26.0 46.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-378" coordinates="39.2 -53.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-379" coordinates="-26.6 -66.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-380" coordinates="-22.1 -65.8 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-381" coordinates="21.1 -46.4 22.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-382" coordinates="-1.1 -60.0 25.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-383" coordinates="-49.1 -51.7 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-384" coordinates="21.2 -51.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-385" coordinates="-0.9 -50.1 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-386" coordinates="0.3 -65.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-387" coordinates="-3.4 -65.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-388" coordinates="0.4 -53.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-389" coordinates="20.8 -60.3 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-390" coordinates="5.7 -25.3 44.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-391" coordinates="18.9 -47.0 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-392" coordinates="-0.6 -56.7 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-393" coordinates="6.5 -42.5 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-394" coordinates="0.1 -51.0 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-395" coordinates="0.1 -47.6 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-396" coordinates="13.5 -65.6 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-397" coordinates="-7.7 -48.3 19.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-398" coordinates="-16.7 -70.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-399" coordinates="36.8 -65.7 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-400" coordinates="-15.3 -74.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-401" coordinates="-4.9 -61.8 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-402" coordinates="0.0 -59.5 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-403" coordinates="8.9 -60.4 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-404" coordinates="10.9 -29.9 46.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-405" coordinates="4.1 -70.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-406" coordinates="-9.1 -54.6 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-407" coordinates="27.4 -55.8 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-408" coordinates="2.4 -78.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-409" coordinates="8.8 -48.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-410" coordinates="11.1 -49.8 21.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-411" coordinates="0.2 -51.2 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-412" coordinates="-278.9 -96.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-413" coordinates="25.3 -51.5 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-414" coordinates="13.2 -62.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-415" coordinates="2.4 -59.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-416" coordinates="-14.3 -57.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-417" coordinates="-0.4 -66.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-418" coordinates="3.1 -9.3 57.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-419" coordinates="-2.9 -49.7 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-420" coordinates="10.8 -48.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-421" coordinates="34.2 -55.4 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-422" coordinates="6.1 -45.9 20.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-423" coordinates="22.5 -59.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-424" coordinates="-0.2 -50.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-425" coordinates="-15.7 -47.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-426" coordinates="3.6 -75.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-427" coordinates="9.2 -50.6 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-428" coordinates="6.6 -58.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-429" coordinates="-0.8 -50.1 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-430" coordinates="16.3 -64.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-431" coordinates="-102.2 -106.7 151.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-432" coordinates="-3.7 -53.5 18.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-433" coordinates="14.5 -55.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-434" coordinates="3.9 -46.0 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-435" coordinates="9.4 -51.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-436" coordinates="6.7 -49.2 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-437" coordinates="28.5 -49.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-438" coordinates="-5.7 -55.3 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-439" coordinates="-13.0 -52.3 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-440" coordinates="8.2 -50.5 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-441" coordinates="-3.0 -47.9 23.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-442" coordinates="9.0 -57.1 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-443" coordinates="3.6 -41.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-444" coordinates="-77.6 19.1 103.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-445" coordinates="7.8 -44.3 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-446" coordinates="-18.2 -42.2 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-447" coordinates="1.5 -46.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-448" coordinates="22.6 -48.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-449" coordinates="6.6 -49.8 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-450" coordinates="7.4 -41.3 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-451" coordinates="10.4 -54.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-452" coordinates="6.8 -53.2 14.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-453" coordinates="-10.2 -57.6 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-454" coordinates="6.1 -70.3 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-455" coordinates="-5.1 -53.7 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-456" coordinates="-9.7 -70.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-457" coordinates="30.6 -65.0 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-458" coordinates="-4.9 -63.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-459" coordinates="8.5 -71.1 16.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-460" coordinates="54.3 -0.6 87.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-461" coordinates="-19.4 -65.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-462" coordinates="15.2 -71.3 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-463" coordinates="8.9 -65.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-464" coordinates="-5.6 -61.5 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-465" coordinates="1.2 -55.4 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-466" coordinates="-7.4 -57.0 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-467" coordinates="2.0 -63.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-468" coordinates="21.0 -55.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-469" coordinates="12.5 -60.5 132.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-470" coordinates="-20.7 -59.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-471" coordinates="10.7 -43.7 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-472" coordinates="-1.3 -47.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-473" coordinates="-9.1 -59.9 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-474" coordinates="7.1 -48.3 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-475" coordinates="30.0 -67.8 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-476" coordinates="5.7 -54.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-477" coordinates="1.7 -50.2 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-478" coordinates="6.4 -62.3 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-479" coordinates="2.7 -52.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-480" coordinates="-0.4 -50.6 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-481" coordinates="-4.9 -61.6 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-482" coordinates="94.1 -11.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-483" coordinates="119.0 -138.5 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-484" coordinates="-32.9 -62.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-485" coordinates="-3.6 -60.2 20.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-486" coordinates="73.6 -65.8 103.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-487" coordinates="-2.2 -59.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-488" coordinates="7.5 -53.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-489" coordinates="0.1 -51.0 26.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-490" coordinates="1.4 -11.9 68.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-491" coordinates="-1.0 -71.2 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-492" coordinates="25.0 -66.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-493" coordinates="31.6 -43.4 30.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-494" coordinates="-104.4 13.8 30.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-495" coordinates="-1.4 -54.3 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-496" coordinates="-40.1 -68.3 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-497" coordinates="18.9 -57.4 10.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-498" coordinates="15.6 -49.6 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-499" coordinates="8.0 -38.8 54.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-500" coordinates="6.0 -54.4 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-501" coordinates="21.7 -59.7 25.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-502" coordinates="27.0 -40.4 32.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-503" coordinates="7.6 -63.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-504" coordinates="-29.1 -97.7 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-505" coordinates="10.9 -47.6 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-506" coordinates="19.8 -45.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-507" coordinates="21.6 -67.5 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-508" coordinates="-8.3 -63.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-509" coordinates="-2.9 -64.8 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-510" coordinates="-2.1 -47.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-511" coordinates="15.3 -53.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-512" coordinates="-9.1 -48.2 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-513" coordinates="7.8 -56.1 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-514" coordinates="-12.2 -52.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-515" coordinates="14.9 -41.7 34.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-516" coordinates="-1.0 -48.1 32.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-517" coordinates="22.1 -57.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-518" coordinates="-5.9 -53.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-519" coordinates="-0.8 -56.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-520" coordinates="35.6 0.1 266.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-521" coordinates="-13.2 28.5 127.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-522" coordinates="-2.0 -31.7 116.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-523" coordinates="10.6 -2.4 84.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-524" coordinates="42.9 -10.6 171.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-525" coordinates="39.2 1.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-526" coordinates="33.0 14.0 257.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-527" coordinates="-56.3 -64.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-528" coordinates="48.0 -43.3 93.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-529" coordinates="34.3 -25.0 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-530" coordinates="-17.3 -10.6 23.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-531" coordinates="-2.8 -2.4 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-532" coordinates="-3.1 -1.1 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-533" coordinates="3.4 -1.6 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-534" coordinates="1.9 4.2 32.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-535" coordinates="-15.0 -3.7 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-536" coordinates="6.2 21.4 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-537" coordinates="2.2 -3.6 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-538" coordinates="-4.2 34.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-539" coordinates="7.3 -7.1 11.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-540" coordinates="-6.1 15.5 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-541" coordinates="3.3 17.7 16.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-542" coordinates="-7.4 -4.0 21.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-543" coordinates="8.1 3.3 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-544" coordinates="2.2 25.0 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-545" coordinates="-3.2 29.6 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-546" coordinates="-13.9 26.1 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-547" coordinates="2.9 5.9 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-548" coordinates="-9.1 2.4 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-549" coordinates="4.6 -7.4 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-550" coordinates="2.9 5.0 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-551" coordinates="-12.0 2.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-552" coordinates="-0.3 3.7 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-553" coordinates="-2.1 3.5 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-554" coordinates="-6.5 25.4 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-555" coordinates="5.9 -9.4 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-556" coordinates="8.0 -20.6 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-557" coordinates="6.9 -10.4 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-558" coordinates="9.5 -3.5 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-559" coordinates="31.0 39.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-560" coordinates="15.9 21.0 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-561" coordinates="3.3 -0.1 18.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-562" coordinates="-1.1 -2.5 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-563" coordinates="-0.3 -11.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-564" coordinates="7.8 11.0 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-565" coordinates="2.2 2.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-566" coordinates="17.4 -6.7 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-567" coordinates="4.1 -2.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-568" coordinates="1.4 -9.0 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-569" coordinates="11.1 -13.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-570" coordinates="-2.4 -4.0 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-571" coordinates="16.3 32.7 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-572" coordinates="1.5 5.6 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-573" coordinates="-4.7 5.8 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-574" coordinates="1.4 -1.0 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-575" coordinates="4.2 -1.5 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-576" coordinates="4.9 9.8 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-577" coordinates="-1.0 -0.5 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-578" coordinates="8.1 2.2 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-579" coordinates="2.8 2.6 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-580" coordinates="-1.7 9.6 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-581" coordinates="6.8 22.5 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-582" coordinates="4.8 -10.1 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-583" coordinates="3.0 -17.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-584" coordinates="-6.0 5.2 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-585" coordinates="1.7 -0.3 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-586" coordinates="6.6 30.1 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-587" coordinates="-0.9 -7.7 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-588" coordinates="7.9 -2.5 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-589" coordinates="4.6 -0.7 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-590" coordinates="4.3 1.6 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-591" coordinates="-0.4 -10.4 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-592" coordinates="12.8 -13.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-593" coordinates="7.6 2.6 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-594" coordinates="10.7 -14.2 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-595" coordinates="8.1 0.9 25.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-596" coordinates="7.9 27.9 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-597" coordinates="-7.6 20.0 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-598" coordinates="9.2 -9.0 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-599" coordinates="-12.0 0.8 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-600" coordinates="14.3 30.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-601" coordinates="-10.1 22.1 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-602" coordinates="2.5 29.4 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-603" coordinates="-6.7 26.2 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-604" coordinates="-2.2 -4.7 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-605" coordinates="-8.3 19.7 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-606" coordinates="9.1 26.7 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-607" coordinates="5.0 -10.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-608" coordinates="5.4 -8.8 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-609" coordinates="6.8 -11.2 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-610" coordinates="4.9 1.6 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-611" coordinates="18.9 2.7 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-612" coordinates="-2.7 22.4 19.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-613" coordinates="17.3 -6.5 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-614" coordinates="3.0 -8.1 75.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-615" coordinates="0.5 -8.7 74.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-616" coordinates="0.9 -1.9 58.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-617" coordinates="-8.6 -2.3 22.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-618" coordinates="1.1 -15.4 33.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-619" coordinates="-2.2 -0.3 40.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-620" coordinates="16.7 -3.9 76.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-621" coordinates="3.1 -6.0 78.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-622" coordinates="74.8 14.8 28.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-623" coordinates="-26.4 -6.0 44.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-624" coordinates="-54.0 -6.8 24.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-625" coordinates="-0.3 0.1 82.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-626" coordinates="-58.7 12.6 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-627" coordinates="75.8 -3.9 20.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-628" coordinates="70.1 -30.1 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-629" coordinates="62.9 -28.5 21.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-630" coordinates="-0.3 -4.4 69.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-631" coordinates="-67.8 -16.0 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-632" coordinates="33.3 -19.0 45.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-633" coordinates="82.9 2.4 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-634" coordinates="81.9 -39.7 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-635" coordinates="60.9 -71.4 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-636" coordinates="4.8 -1.4 79.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-637" coordinates="0.3 -0.8 78.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-638" coordinates="0.7 -0.3 76.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-639" coordinates="12.5 -6.4 98.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-640" coordinates="13.8 3.1 75.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-641" coordinates="74.4 -37.1 24.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-642" coordinates="1.7 -2.3 64.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-643" coordinates="-69.6 -22.0 25.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-644" coordinates="-64.9 23.2 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-645" coordinates="4.8 -7.6 61.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-646" coordinates="31.6 2.4 45.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-647" coordinates="24.5 -1.5 57.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-648" coordinates="62.8 -12.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-649" coordinates="1.9 -3.0 68.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-650" coordinates="51.9 -37.5 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-651" coordinates="-8.1 -4.2 72.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-652" coordinates="2.4 -12.0 54.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-653" coordinates="-33.8 -10.8 29.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-654" coordinates="83.7 -26.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-655" coordinates="-46.7 -50.4 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-656" coordinates="7.0 3.5 69.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-657" coordinates="4.9 -7.8 58.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-658" coordinates="-18.2 -2.0 61.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-659" coordinates="-0.7 1.2 45.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-660" coordinates="2.9 -1.2 43.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-661" coordinates="-2.9 10.0 34.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-662" coordinates="14.2 20.5 25.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-663" coordinates="-21.9 -10.2 35.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-664" coordinates="5.6 -3.8 75.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-665" coordinates="9.7 -4.0 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-666" coordinates="15.6 -4.1 89.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-667" coordinates="11.9 -6.5 71.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-668" coordinates="-13.9 -4.7 79.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-669" coordinates="-0.6 -12.7 25.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-670" coordinates="21.2 3.9 65.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-671" coordinates="1.2 -7.4 42.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-672" coordinates="73.2 -68.7 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-673" coordinates="-66.2 -11.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-674" coordinates="-29.0 -7.9 30.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-675" coordinates="3.7 -1.6 76.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-676" coordinates="6.9 -2.1 74.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-677" coordinates="3.7 -1.7 104.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-678" coordinates="26.5 -12.0 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-679" coordinates="2.7 0.5 59.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-680" coordinates="9.5 -9.0 56.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-681" coordinates="15.9 2.4 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-682" coordinates="-1.7 2.0 85.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-683" coordinates="5.4 5.2 68.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-684" coordinates="-4.9 -8.6 72.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-685" coordinates="78.5 13.4 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-686" coordinates="-0.4 -6.0 75.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-687" coordinates="23.7 -9.2 43.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-688" coordinates="20.6 -2.0 74.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-689" coordinates="11.1 -2.6 69.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-690" coordinates="8.0 -5.4 70.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-691" coordinates="19.6 6.2 74.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-692" coordinates="5.9 -5.3 70.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-693" coordinates="-11.7 -7.8 34.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-694" coordinates="10.3 -9.6 57.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-695" coordinates="15.0 10.3 60.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-696" coordinates="-3.4 -1.0 67.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-697" coordinates="-39.6 -13.5 232.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-698" coordinates="-10.8 -7.1 23.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-699" coordinates="64.5 129.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-700" coordinates="57.6 59.7 48.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-701" coordinates="-53.7 86.6 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-702" coordinates="-26.9 128.6 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-703" coordinates="147.4 37.9 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-704" coordinates="-24.4 -91.9 63.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-705" coordinates="-268.9 -66.0 57.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-706" coordinates="-21.4 10.5 73.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-707" coordinates="204.7 266.5 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-708" coordinates="-22.7 101.1 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-709" coordinates="40.2 92.1 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-710" coordinates="42.8 0.7 130.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-711" coordinates="-51.3 82.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-712" coordinates="-123.4 5.2 198.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-713" coordinates="-8.5 114.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-714" coordinates="-11.6 95.5 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-715" coordinates="18.9 87.2 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-716" coordinates="49.8 102.7 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-717" coordinates="-21.6 34.0 116.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-718" coordinates="-132.9 80.5 191.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-719" coordinates="-20.4 84.8 30.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-720" coordinates="88.2 54.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-721" coordinates="-34.0 41.9 46.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-722" coordinates="5.6 88.5 34.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-723" coordinates="-20.7 67.8 53.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-724" coordinates="-33.9 100.5 29.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-725" coordinates="22.1 28.6 73.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-726" coordinates="4.7 27.4 88.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-727" coordinates="-5.2 57.5 39.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-728" coordinates="-109.2 59.1 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-729" coordinates="28.4 32.1 86.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-730" coordinates="-10.2 85.1 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-731" coordinates="9.1 91.0 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-732" coordinates="11.8 80.8 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-733" coordinates="-38.5 80.0 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-734" coordinates="77.3 94.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-735" coordinates="37.4 80.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-736" coordinates="-22.7 81.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-737" coordinates="-72.9 60.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-738" coordinates="32.4 79.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-739" coordinates="25.0 97.2 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-740" coordinates="-15.8 90.9 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-741" coordinates="-25.9 86.1 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-742" coordinates="-39.7 70.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-743" coordinates="14.4 80.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-744" coordinates="9.1 30.2 74.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-745" coordinates="11.1 -11.5 92.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-746" coordinates="-45.0 78.6 26.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-747" coordinates="-8.2 79.3 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-748" coordinates="42.8 -37.8 82.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-749" coordinates="-5.4 21.2 271.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-750" coordinates="-9.5 66.1 27.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-751" coordinates="49.0 82.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-752" coordinates="32.0 56.3 20.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-753" coordinates="9.3 103.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-754" coordinates="-133.9 -21.1 190.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-755" coordinates="11.1 28.0 116.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-756" coordinates="155.5 161.6 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-757" coordinates="20.9 70.9 53.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-758" coordinates="57.3 77.3 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-759" coordinates="53.5 90.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-760" coordinates="77.4 73.6 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-761" coordinates="89.7 125.6 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-762" coordinates="-20.4 104.4 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-763" coordinates="-24.7 90.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-764" coordinates="-27.9 92.8 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-765" coordinates="-24.7 100.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-766" coordinates="-92.9 47.3 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-767" coordinates="61.1 69.6 60.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-768" coordinates="-19.9 55.8 59.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-769" coordinates="90.0 87.4 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-770" coordinates="-31.3 93.7 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-771" coordinates="32.3 24.1 58.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-772" coordinates="7.3 42.3 86.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-773" coordinates="-15.3 3.2 113.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-774" coordinates="40.5 51.8 48.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-775" coordinates="14.7 105.3 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-776" coordinates="93.7 42.6 229.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-777" coordinates="89.1 76.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-778" coordinates="-184.0 66.0 140.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-779" coordinates="-11.1 91.2 12.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-780" coordinates="-6.1 120.6 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-781" coordinates="58.3 71.3 73.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-782" coordinates="55.9 79.2 37.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-783" coordinates="16.2 104.4 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-784" coordinates="-17.1 20.1 291.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-785" coordinates="-3.4 70.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-786" coordinates="2.4 117.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-787" coordinates="72.2 137.7 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-788" coordinates="-2.5 102.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-789" coordinates="-6.8 58.8 64.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-790" coordinates="43.1 97.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-791" coordinates="53.6 93.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-792" coordinates="-38.2 70.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-793" coordinates="-91.0 97.2 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-794" coordinates="-80.6 91.1 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-795" coordinates="8.0 117.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-796" coordinates="25.0 56.0 52.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-797" coordinates="71.3 78.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-798" coordinates="-10.7 65.1 86.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-799" coordinates="138.7 96.0 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-800" coordinates="-95.0 130.5 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-801" coordinates="-14.4 -10.9 107.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-802" coordinates="17.8 -23.0 110.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-803" coordinates="-31.8 40.3 86.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-804" coordinates="1.4 27.5 75.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-805" coordinates="-3.0 53.3 104.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-806" coordinates="62.5 47.6 74.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-807" coordinates="36.8 79.1 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-808" coordinates="-3.9 74.8 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-809" coordinates="-120.0 82.0 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-810" coordinates="33.0 24.6 93.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-811" coordinates="-4.8 61.6 50.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-812" coordinates="16.8 69.0 38.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-813" coordinates="16.4 76.8 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-814" coordinates="-88.7 38.2 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-815" coordinates="42.1 103.5 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-816" coordinates="85.3 81.3 17.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-817" coordinates="-10.2 29.6 71.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-818" coordinates="0.9 55.6 81.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-819" coordinates="-15.6 54.6 44.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-820" coordinates="0.1 30.0 98.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-821" coordinates="119.6 79.5 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-822" coordinates="23.3 116.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-823" coordinates="37.7 69.1 53.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-824" coordinates="72.8 117.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-825" coordinates="-10.5 87.7 44.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-826" coordinates="3.8 26.6 74.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-827" coordinates="-8.2 40.7 63.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-828" coordinates="108.4 99.7 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-829" coordinates="64.8 113.6 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-830" coordinates="-14.3 88.2 41.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-831" coordinates="9.6 111.0 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-832" coordinates="-11.3 102.8 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-833" coordinates="-25.1 88.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-834" coordinates="72.9 96.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-835" coordinates="-34.2 42.4 68.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-836" coordinates="13.4 78.1 24.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-837" coordinates="12.7 75.1 71.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-838" coordinates="34.0 39.2 81.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-839" coordinates="57.1 119.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-840" coordinates="34.6 54.7 61.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-841" coordinates="39.0 134.3 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-842" coordinates="67.4 116.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-843" coordinates="-3.1 54.5 54.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-844" coordinates="-26.3 60.3 66.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-845" coordinates="27.8 119.5 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-846" coordinates="52.4 134.8 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-847" coordinates="44.6 47.4 76.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-848" coordinates="46.2 76.0 79.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-849" coordinates="66.9 72.5 40.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-850" coordinates="46.8 118.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-851" coordinates="53.8 161.0 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-852" coordinates="95.8 116.1 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-853" coordinates="7.4 129.2 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-854" coordinates="31.9 133.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-855" coordinates="76.0 87.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-856" coordinates="-37.8 98.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-857" coordinates="-18.4 20.7 85.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-858" coordinates="58.0 101.4 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-859" coordinates="17.3 68.5 37.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-860" coordinates="55.6 79.0 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-861" coordinates="-20.0 44.5 54.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-862" coordinates="-51.0 105.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-863" coordinates="38.6 22.2 69.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-864" coordinates="-13.9 106.9 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-865" coordinates="-8.3 21.4 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-866" coordinates="1.7 -8.4 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-867" coordinates="2.3 -3.4 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-868" coordinates="-4.8 3.9 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-869" coordinates="8.9 -13.9 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-870" coordinates="-2.5 24.0 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-871" coordinates="1.8 0.0 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-872" coordinates="17.0 22.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-873" coordinates="11.7 7.6 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-874" coordinates="-0.2 1.9 24.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-875" coordinates="6.4 2.6 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-876" coordinates="6.9 17.6 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-877" coordinates="-0.5 26.0 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-878" coordinates="2.8 -2.8 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-879" coordinates="3.1 -3.1 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-880" coordinates="-1.0 -16.8 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-881" coordinates="-0.8 -4.7 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-882" coordinates="12.0 -10.2 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-883" coordinates="-47.7 24.5 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-884" coordinates="6.9 -9.4 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-885" coordinates="-4.3 -6.9 15.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-886" coordinates="-19.7 29.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-887" coordinates="21.3 4.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-888" coordinates="11.5 1.5 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-889" coordinates="4.9 22.3 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-890" coordinates="-0.7 3.2 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-891" coordinates="0.5 22.0 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-892" coordinates="24.0 18.5 12.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-893" coordinates="7.2 -8.9 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-894" coordinates="1.5 -12.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-895" coordinates="2.8 6.0 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-896" coordinates="17.2 4.2 32.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-897" coordinates="6.8 -6.1 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-898" coordinates="1.6 -3.8 21.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-899" coordinates="8.3 8.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-900" coordinates="3.2 -15.2 18.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-901" coordinates="-5.1 24.5 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-902" coordinates="5.3 6.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-903" coordinates="3.9 -0.6 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-904" coordinates="2.6 -13.4 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-905" coordinates="8.6 6.3 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-906" coordinates="2.6 -21.6 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-907" coordinates="10.2 -11.7 24.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-908" coordinates="2.6 -3.1 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-909" coordinates="5.7 3.8 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-910" coordinates="8.1 -4.0 17.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-911" coordinates="-0.8 -2.4 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-912" coordinates="7.1 -10.3 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-913" coordinates="1.8 -14.1 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-914" coordinates="-0.9 2.9 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-915" coordinates="6.9 -12.6 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-916" coordinates="-11.2 20.9 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-917" coordinates="12.7 -5.9 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-918" coordinates="-1.1 -13.7 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-919" coordinates="-25.6 4.5 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-920" coordinates="17.1 1.6 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-921" coordinates="6.6 8.1 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-922" coordinates="-6.1 26.0 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-923" coordinates="-4.7 20.9 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-924" coordinates="-0.5 -11.4 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-925" coordinates="-15.6 -5.9 39.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-926" coordinates="8.9 13.4 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-927" coordinates="11.1 12.9 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-928" coordinates="13.6 -7.1 15.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-929" coordinates="4.7 -10.6 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-930" coordinates="1.2 7.0 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-931" coordinates="6.0 5.9 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-932" coordinates="0.1 3.6 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-933" coordinates="-2.7 2.9 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-934" coordinates="0.6 -5.5 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-935" coordinates="-10.6 -9.9 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-936" coordinates="7.8 -7.8 30.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-937" coordinates="-7.4 -9.7 31.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-938" coordinates="11.2 -7.3 22.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-939" coordinates="-0.7 -8.0 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-940" coordinates="2.7 -2.1 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-941" coordinates="-15.1 4.3 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-942" coordinates="-0.4 1.0 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-943" coordinates="-6.9 0.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-944" coordinates="3.9 -12.0 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-945" coordinates="-17.2 3.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-946" coordinates="4.2 -1.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-947" coordinates="18.1 -4.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-948" coordinates="4.5 3.6 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-949" coordinates="2.8 -12.7 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-950" coordinates="14.6 6.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-951" coordinates="16.1 0.2 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-952" coordinates="-9.3 30.6 7.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-953" coordinates="4.3 32.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-954" coordinates="0.3 -9.3 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-955" coordinates="2.4 14.8 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-956" coordinates="-9.6 21.0 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-957" coordinates="10.3 -2.1 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-958" coordinates="-1.3 19.5 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-959" coordinates="-9.1 19.7 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-960" coordinates="20.2 -8.1 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-961" coordinates="1.9 29.6 24.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-962" coordinates="0.1 -1.1 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-963" coordinates="12.8 -0.1 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-964" coordinates="-7.0 65.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-965" coordinates="1.4 16.8 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-966" coordinates="-7.4 10.5 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-967" coordinates="7.4 -11.1 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-968" coordinates="8.4 22.6 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-969" coordinates="2.5 1.8 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-970" coordinates="-0.7 -1.0 12.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-971" coordinates="7.7 -9.6 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-972" coordinates="-18.2 10.8 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-973" coordinates="4.0 -4.8 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-974" coordinates="9.8 -4.2 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-975" coordinates="4.8 -13.1 12.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-976" coordinates="-3.0 13.8 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-977" coordinates="9.4 24.2 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-978" coordinates="1.6 25.6 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-979" coordinates="2.2 25.3 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-980" coordinates="-3.5 0.1 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-981" coordinates="-0.3 -5.1 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-982" coordinates="4.7 -10.1 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-983" coordinates="10.6 -1.4 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-984" coordinates="-4.3 27.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-985" coordinates="-1.4 -3.5 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-986" coordinates="-10.0 -11.8 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-987" coordinates="-1.7 -0.3 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-988" coordinates="10.9 26.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-989" coordinates="5.8 1.6 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-990" coordinates="-0.6 2.9 28.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-991" coordinates="8.3 22.7 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-992" coordinates="-8.1 -9.6 6.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-993" coordinates="5.4 -9.8 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-994" coordinates="-3.0 13.4 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-995" coordinates="-8.6 5.2 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-996" coordinates="3.1 -12.4 34.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-997" coordinates="0.1 -7.8 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-998" coordinates="-0.8 2.6 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-999" coordinates="-241.9 -50.8 74.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1000" coordinates="5.2 10.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1001" coordinates="36.0 -11.1 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1002" coordinates="7.6 32.0 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1003" coordinates="3.9 4.2 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1004" coordinates="1.5 5.5 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1005" coordinates="-18.2 27.8 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1006" coordinates="3.6 -10.8 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1007" coordinates="-6.4 -11.6 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1008" coordinates="5.8 8.4 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1009" coordinates="18.0 13.5 14.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1010" coordinates="10.3 -7.4 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1011" coordinates="-8.7 -9.2 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1012" coordinates="5.3 0.4 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1013" coordinates="-3.1 26.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1014" coordinates="7.8 6.2 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1015" coordinates="14.0 14.6 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1016" coordinates="12.5 -8.5 32.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1017" coordinates="-4.3 12.4 15.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1018" coordinates="-3.5 16.8 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1019" coordinates="17.8 23.8 12.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1020" coordinates="10.9 -5.3 18.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1021" coordinates="5.0 1.7 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1022" coordinates="-13.4 4.4 29.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1023" coordinates="27.2 27.9 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1024" coordinates="-0.1 -4.4 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1025" coordinates="2.3 27.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1026" coordinates="5.1 7.3 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1027" coordinates="7.3 3.2 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1028" coordinates="6.1 9.5 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1029" coordinates="-26.7 1.6 16.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1030" coordinates="2.4 -3.9 16.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1031" coordinates="-2.1 -1.0 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1032" coordinates="5.8 -9.6 7.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1033" coordinates="-1.5 -3.3 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1034" coordinates="9.3 26.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1035" coordinates="-1.1 0.4 15.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1036" coordinates="11.4 18.1 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1037" coordinates="18.4 5.0 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1038" coordinates="2.7 1.3 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1039" coordinates="-1.6 3.1 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1040" coordinates="-1.6 -3.0 14.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1041" coordinates="19.0 -6.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1042" coordinates="3.1 25.6 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1043" coordinates="-2.0 3.2 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1044" coordinates="6.0 -4.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1045" coordinates="1.8 24.6 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1046" coordinates="-2.3 26.2 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1047" coordinates="7.8 -0.2 17.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1048" coordinates="4.0 -0.2 8.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1049" coordinates="4.8 4.7 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1050" coordinates="9.2 -0.4 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1051" coordinates="-8.1 23.3 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1052" coordinates="-1.4 -1.7 16.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1053" coordinates="-10.3 -10.2 11.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1054" coordinates="6.7 -1.3 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1055" coordinates="-2.1 5.6 17.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1056" coordinates="-1.3 25.0 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1057" coordinates="4.0 -6.7 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1058" coordinates="4.8 -10.9 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1059" coordinates="5.7 12.9 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1060" coordinates="-9.2 -6.4 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1061" coordinates="5.5 3.5 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1062" coordinates="-7.9 -0.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1063" coordinates="8.2 -12.5 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1064" coordinates="9.9 -12.3 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1065" coordinates="-0.9 28.6 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1066" coordinates="-12.8 -3.2 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1067" coordinates="-0.6 -12.5 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1068" coordinates="37.0 -15.6 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1069" coordinates="-3.8 -10.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1070" coordinates="11.9 -10.1 29.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1071" coordinates="-12.1 -1.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1072" coordinates="4.7 -3.0 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1073" coordinates="6.8 -1.8 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1074" coordinates="-1.2 25.0 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1075" coordinates="-14.2 -2.6 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1076" coordinates="14.3 -5.6 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1077" coordinates="12.7 -12.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1078" coordinates="-6.0 4.8 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1079" coordinates="10.4 -2.4 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1080" coordinates="-5.5 21.8 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1081" coordinates="7.0 3.5 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1082" coordinates="5.5 -0.9 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1083" coordinates="6.6 -4.2 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1084" coordinates="13.7 7.6 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1085" coordinates="0.5 -5.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1086" coordinates="-34.9 -19.1 64.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1087" coordinates="6.6 10.8 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1088" coordinates="4.3 -14.2 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1089" coordinates="12.3 -1.1 16.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1090" coordinates="6.6 -18.7 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1091" coordinates="-1.8 33.5 222.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1092" coordinates="-2.0 -8.8 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1093" coordinates="-12.2 0.7 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1094" coordinates="-6.4 -4.8 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1095" coordinates="18.0 40.1 48.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1096" coordinates="19.8 0.3 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1097" coordinates="8.8 -6.8 7.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1098" coordinates="10.5 5.9 17.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1099" coordinates="4.8 20.2 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1100" coordinates="24.6 7.2 82.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1101" coordinates="-7.6 5.7 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1102" coordinates="2.1 -6.0 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1103" coordinates="-22.9 -9.1 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1104" coordinates="-6.8 -0.9 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1105" coordinates="-3.9 -6.9 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1106" coordinates="14.6 19.4 18.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1107" coordinates="11.6 22.8 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1108" coordinates="8.2 25.2 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1109" coordinates="3.1 16.9 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1110" coordinates="-27.0 -8.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1111" coordinates="-18.9 23.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1112" coordinates="4.5 2.3 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1113" coordinates="30.9 -19.9 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1114" coordinates="8.6 3.2 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1115" coordinates="11.2 -20.4 25.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1116" coordinates="-0.1 20.7 11.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1117" coordinates="16.6 4.6 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1118" coordinates="1.2 -0.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1119" coordinates="3.4 -8.0 5.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1120" coordinates="5.2 -10.9 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1121" coordinates="7.7 -15.0 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1122" coordinates="3.6 5.8 13.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1123" coordinates="2.3 -7.1 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1124" coordinates="0.2 -0.3 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1125" coordinates="3.3 3.1 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1126" coordinates="-11.2 10.3 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1127" coordinates="-9.4 0.5 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1128" coordinates="0.5 -11.9 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1129" coordinates="2.9 -9.1 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1130" coordinates="13.8 2.1 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1131" coordinates="0.4 4.2 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1132" coordinates="-4.0 -5.7 12.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1133" coordinates="-0.5 -14.4 32.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1134" coordinates="8.9 -2.6 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1135" coordinates="-7.8 -13.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1136" coordinates="-0.4 2.1 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1137" coordinates="-6.5 21.6 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1138" coordinates="3.0 27.6 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1139" coordinates="8.2 -9.1 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1140" coordinates="6.1 -14.4 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1141" coordinates="-1.1 -13.1 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1142" coordinates="8.4 -9.2 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1143" coordinates="15.8 5.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1144" coordinates="7.2 9.1 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1145" coordinates="13.1 2.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1146" coordinates="-3.7 7.7 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1147" coordinates="8.2 1.5 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1148" coordinates="4.7 -11.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1149" coordinates="1.1 0.1 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1150" coordinates="4.0 -11.8 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1151" coordinates="5.3 1.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1152" coordinates="18.4 -4.2 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1153" coordinates="1.2 32.2 20.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1154" coordinates="-2.1 6.8 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1155" coordinates="7.6 -1.3 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1156" coordinates="6.7 2.6 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1157" coordinates="1.7 21.2 35.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1158" coordinates="2.2 9.6 35.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1159" coordinates="7.2 -8.7 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1160" coordinates="5.0 3.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1161" coordinates="1.6 1.4 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1162" coordinates="9.2 -5.7 16.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1163" coordinates="16.0 14.8 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1164" coordinates="-16.4 40.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1165" coordinates="-2.3 1.6 36.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1166" coordinates="5.4 26.7 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1167" coordinates="-17.2 -10.6 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1168" coordinates="2.4 -1.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1169" coordinates="0.4 4.9 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1170" coordinates="-14.5 5.8 26.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1171" coordinates="13.6 12.8 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1172" coordinates="11.2 -9.0 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1173" coordinates="8.5 -10.4 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1174" coordinates="5.9 -11.5 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1175" coordinates="7.1 -4.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1176" coordinates="-3.4 1.0 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1177" coordinates="20.7 -13.6 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1178" coordinates="-4.0 17.8 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1179" coordinates="16.0 8.3 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1180" coordinates="7.3 36.0 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1181" coordinates="7.8 -10.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1182" coordinates="10.0 -8.4 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1183" coordinates="76.4 59.5 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1184" coordinates="17.1 26.9 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1185" coordinates="-4.8 0.2 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1186" coordinates="-2.3 -0.7 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1187" coordinates="-6.0 1.1 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1188" coordinates="-2.0 7.8 12.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1189" coordinates="4.3 1.3 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1190" coordinates="-1.9 5.3 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1191" coordinates="4.1 -13.7 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1192" coordinates="2.6 5.0 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1193" coordinates="2.6 17.6 17.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1194" coordinates="7.3 14.6 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1195" coordinates="5.9 4.1 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1196" coordinates="7.3 -1.7 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1197" coordinates="3.6 0.8 8.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1198" coordinates="-5.5 21.7 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1199" coordinates="-4.3 14.7 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1200" coordinates="0.1 -0.6 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1201" coordinates="-5.2 -6.4 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1202" coordinates="7.7 4.4 15.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1203" coordinates="-19.7 6.3 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1204" coordinates="3.3 -3.0 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1205" coordinates="6.7 18.7 8.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1206" coordinates="6.3 31.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1207" coordinates="-17.0 17.1 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1208" coordinates="-5.5 16.7 18.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1209" coordinates="-13.5 -5.3 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1210" coordinates="-3.0 -13.5 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1211" coordinates="0.3 -9.5 7.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1212" coordinates="5.7 -1.1 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1213" coordinates="-0.1 -12.5 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1214" coordinates="60.7 -9.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1215" coordinates="2.1 7.5 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1216" coordinates="4.9 22.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1217" coordinates="-0.4 26.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1218" coordinates="-10.0 0.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1219" coordinates="-7.0 28.1 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1220" coordinates="1.7 2.0 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1221" coordinates="19.5 -3.4 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1222" coordinates="6.5 -8.3 15.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1223" coordinates="-5.0 4.5 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1224" coordinates="1.1 1.0 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1225" coordinates="0.5 3.5 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1226" coordinates="4.5 -1.4 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1227" coordinates="16.0 -3.9 18.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1228" coordinates="11.7 8.2 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1229" coordinates="13.8 28.5 44.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1230" coordinates="10.0 -5.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1231" coordinates="1.2 27.3 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1232" coordinates="-4.0 -14.0 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1233" coordinates="13.6 -4.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1234" coordinates="4.8 -10.1 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1235" coordinates="19.4 -8.7 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1236" coordinates="13.3 10.9 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1237" coordinates="-8.0 23.8 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1238" coordinates="11.4 -5.4 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1239" coordinates="-273.2 -20.4 42.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1240" coordinates="5.1 20.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1241" coordinates="15.8 -2.5 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1242" coordinates="11.8 6.8 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1243" coordinates="5.7 32.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1244" coordinates="1.6 -0.2 14.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1245" coordinates="5.5 -12.7 20.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1246" coordinates="-6.1 21.1 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1247" coordinates="7.0 7.8 5.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1248" coordinates="13.2 -5.6 21.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1249" coordinates="-0.5 -11.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1250" coordinates="7.0 1.6 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1251" coordinates="6.1 -6.6 78.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1252" coordinates="0.8 3.1 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1253" coordinates="-15.2 99.7 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1254" coordinates="10.8 94.9 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1255" coordinates="-32.4 72.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1256" coordinates="39.2 59.4 18.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1257" coordinates="2.4 47.6 65.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1258" coordinates="-25.5 75.9 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1259" coordinates="-1.0 77.5 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1260" coordinates="19.1 91.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1261" coordinates="3.1 91.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1262" coordinates="-9.3 78.1 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1263" coordinates="-3.3 22.2 64.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1264" coordinates="-42.8 74.2 28.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1265" coordinates="-13.3 61.0 30.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1266" coordinates="-1.6 83.8 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1267" coordinates="-19.5 67.6 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1268" coordinates="-57.2 70.2 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1269" coordinates="-5.7 81.6 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1270" coordinates="12.3 74.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1271" coordinates="-10.1 87.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1272" coordinates="14.0 80.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1273" coordinates="-15.6 53.2 40.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1274" coordinates="44.2 109.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1275" coordinates="-8.2 89.6 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1276" coordinates="-78.7 68.7 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1277" coordinates="1.6 79.4 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1278" coordinates="11.1 85.7 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1279" coordinates="-8.1 99.7 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1280" coordinates="78.4 53.8 35.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1281" coordinates="-39.7 66.5 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1282" coordinates="-44.5 79.6 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1283" coordinates="-18.4 70.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1284" coordinates="9.9 21.8 76.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1285" coordinates="-51.0 70.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1286" coordinates="-44.0 84.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1287" coordinates="10.5 69.3 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1288" coordinates="-6.1 77.6 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1289" coordinates="22.8 94.4 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1290" coordinates="96.1 121.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1291" coordinates="-76.8 80.9 5.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1292" coordinates="18.2 82.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1293" coordinates="12.7 80.6 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1294" coordinates="-19.9 92.0 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1295" coordinates="-48.0 57.2 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1296" coordinates="68.7 85.0 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1297" coordinates="100.5 29.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1298" coordinates="1.6 84.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1299" coordinates="0.9 60.3 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1300" coordinates="-42.3 88.1 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1301" coordinates="6.0 19.4 67.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1302" coordinates="16.3 90.8 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1303" coordinates="-36.3 77.0 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1304" coordinates="-25.6 69.6 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1305" coordinates="-5.5 83.9 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1306" coordinates="-28.8 66.7 13.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1307" coordinates="-50.8 64.8 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1308" coordinates="-22.9 77.3 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1309" coordinates="-5.7 79.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1310" coordinates="-53.7 58.3 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1311" coordinates="-12.1 93.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1312" coordinates="18.0 98.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1313" coordinates="-20.4 92.9 10.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1314" coordinates="3.8 20.8 81.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1315" coordinates="-8.9 54.9 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1316" coordinates="-33.6 81.9 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1317" coordinates="-19.4 86.8 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1318" coordinates="14.8 76.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1319" coordinates="11.8 -50.8 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1320" coordinates="-0.8 -56.2 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1321" coordinates="39.6 -40.5 14.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1322" coordinates="-20.2 -69.5 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1323" coordinates="9.1 -48.8 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1324" coordinates="-0.9 -63.7 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1325" coordinates="195.2 -155.7 56.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1326" coordinates="18.6 -59.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1327" coordinates="34.9 -78.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1328" coordinates="11.2 -53.2 43.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1329" coordinates="8.8 -59.0 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1330" coordinates="0.9 -53.6 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1331" coordinates="1.7 -69.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1332" coordinates="29.1 -29.5 74.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1333" coordinates="4.3 -52.3 16.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1334" coordinates="-12.0 -62.7 157.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1335" coordinates="5.8 -50.9 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1336" coordinates="-1.8 -62.4 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1337" coordinates="7.7 -61.8 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1338" coordinates="-11.0 -66.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1339" coordinates="15.6 -62.9 30.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1340" coordinates="6.1 -45.5 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1341" coordinates="-11.1 -73.8 83.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1342" coordinates="48.0 -39.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1343" coordinates="-5.3 -74.9 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1344" coordinates="23.7 -47.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1345" coordinates="4.7 -57.4 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1346" coordinates="6.1 -62.1 48.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1347" coordinates="-6.1 -71.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1348" coordinates="-2.8 -56.4 25.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1349" coordinates="4.6 -57.1 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1350" coordinates="-19.7 -62.3 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1351" coordinates="12.4 -48.0 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1352" coordinates="-3.3 -46.9 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1353" coordinates="12.1 -61.0 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1354" coordinates="16.9 -66.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1355" coordinates="40.4 -56.5 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1356" coordinates="1.9 -57.7 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1357" coordinates="-59.0 -109.1 76.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1358" coordinates="0.4 -61.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1359" coordinates="30.1 -48.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1360" coordinates="-4.3 -59.5 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1361" coordinates="1.5 -48.0 25.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1362" coordinates="207.1 -30.8 109.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1363" coordinates="9.7 -61.2 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1364" coordinates="2.5 -51.2 7.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1365" coordinates="-25.2 -77.4 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1366" coordinates="17.3 -72.7 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1367" coordinates="-2.4 -52.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1368" coordinates="31.4 -57.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1369" coordinates="13.8 -62.8 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1370" coordinates="31.2 -59.4 26.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1371" coordinates="-20.5 -60.9 151.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1372" coordinates="-13.7 -54.9 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1373" coordinates="0.7 -47.7 78.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1374" coordinates="5.3 -52.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1375" coordinates="14.7 -87.3 11.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1376" coordinates="31.5 -85.4 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1377" coordinates="-4.3 -61.9 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1378" coordinates="10.0 -71.9 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1379" coordinates="54.7 -66.8 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1380" coordinates="-9.1 -48.8 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1381" coordinates="6.1 -48.7 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1382" coordinates="-4.8 -50.3 39.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1383" coordinates="-8.5 -67.4 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1384" coordinates="5.7 -55.1 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1385" coordinates="39.1 -89.2 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1386" coordinates="34.2 -60.2 29.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1387" coordinates="16.6 -64.3 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1388" coordinates="-2.1 -62.0 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1389" coordinates="-1.3 -52.6 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1390" coordinates="9.2 -61.1 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1391" coordinates="20.6 -60.5 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1392" coordinates="10.1 -66.8 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1393" coordinates="-9.9 -58.5 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1394" coordinates="9.2 -52.1 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1395" coordinates="38.0 -27.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1396" coordinates="-1.8 -63.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1397" coordinates="11.6 -55.9 19.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1398" coordinates="2.6 -36.5 64.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1399" coordinates="-12.9 -46.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1400" coordinates="7.2 -75.4 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1401" coordinates="0.5 -50.1 17.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1402" coordinates="15.4 -47.8 16.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1403" coordinates="8.5 -51.7 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1404" coordinates="-5.2 -51.6 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1405" coordinates="-77.0 -17.5 141.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1406" coordinates="33.7 -87.4 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1407" coordinates="54.3 -41.4 82.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1408" coordinates="2.0 -27.2 78.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1409" coordinates="0.8 -18.4 56.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1410" coordinates="-92.0 -40.5 2.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1411" coordinates="17.5 -60.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1412" coordinates="2.2 -41.8 27.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1413" coordinates="-5.0 -61.2 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1414" coordinates="33.8 -58.3 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1415" coordinates="33.7 -54.6 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1416" coordinates="-7.0 -52.7 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1417" coordinates="-2.6 -53.1 27.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1418" coordinates="19.6 -62.1 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1419" coordinates="7.9 -67.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1420" coordinates="5.3 -49.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1421" coordinates="10.8 -70.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1422" coordinates="-0.4 -60.3 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1423" coordinates="3.0 -62.5 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1424" coordinates="-11.5 -54.1 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1425" coordinates="22.4 -52.5 19.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1426" coordinates="10.4 -45.3 63.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1427" coordinates="8.1 -82.7 10.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1428" coordinates="-3.3 -55.2 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1429" coordinates="15.6 -69.8 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1430" coordinates="-4.8 -49.9 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1431" coordinates="-12.5 -29.8 61.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1432" coordinates="29.7 -36.9 40.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1433" coordinates="18.6 -43.6 26.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1434" coordinates="31.7 -58.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1435" coordinates="16.6 -61.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1436" coordinates="19.3 -61.9 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1437" coordinates="1.7 -60.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1438" coordinates="15.5 -51.8 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1439" coordinates="13.3 -70.5 15.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1440" coordinates="7.9 -64.6 10.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1441" coordinates="4.1 -51.9 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1442" coordinates="-11.4 -65.5 3.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1443" coordinates="2.9 -45.8 24.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1444" coordinates="-2.3 -57.8 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1445" coordinates="-9.2 -25.2 17.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1446" coordinates="5.8 -49.7 13.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1447" coordinates="4.2 -57.1 21.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1448" coordinates="-1.2 -37.4 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1449" coordinates="12.1 -52.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1450" coordinates="2.9 -49.4 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1451" coordinates="49.3 -56.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1452" coordinates="6.3 -58.3 20.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1453" coordinates="-1.9 -47.3 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1454" coordinates="12.8 -55.3 20.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1455" coordinates="-1.5 3.7 229.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1456" coordinates="-13.3 -13.6 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1457" coordinates="-2.7 -1.9 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1458" coordinates="-14.2 20.6 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1459" coordinates="10.3 -24.7 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1460" coordinates="4.3 -10.1 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1461" coordinates="22.8 18.2 20.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1462" coordinates="1.7 28.0 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1463" coordinates="15.9 -0.9 6.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1464" coordinates="-2.8 22.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1465" coordinates="2.6 -0.9 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1466" coordinates="-4.9 -8.2 18.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1467" coordinates="-3.6 22.9 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1468" coordinates="-5.1 15.9 4.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1469" coordinates="0.0 -0.2 13.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1470" coordinates="1.7 -5.7 4.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1471" coordinates="-1.5 2.1 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1472" coordinates="-0.3 -1.9 18.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1473" coordinates="2.9 1.4 9.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1474" coordinates="2.7 -6.6 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1475" coordinates="-5.5 19.1 6.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1476" coordinates="-0.0 -3.7 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1477" coordinates="2.9 -4.3 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1478" coordinates="10.0 -9.0 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1479" coordinates="10.9 -5.1 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1480" coordinates="-0.1 2.7 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1481" coordinates="-4.1 1.9 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1482" coordinates="9.1 1.9 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1483" coordinates="9.0 10.6 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1484" coordinates="-11.6 5.6 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1485" coordinates="-11.9 26.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1486" coordinates="1.5 2.1 12.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1487" coordinates="1.8 -5.6 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1488" coordinates="19.5 1.0 3.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1489" coordinates="5.5 -1.8 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1490" coordinates="0.5 -7.8 5.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1491" coordinates="9.7 -4.1 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1492" coordinates="2.5 8.9 14.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1493" coordinates="12.5 -2.2 61.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1494" coordinates="-3.2 -12.6 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1495" coordinates="2.6 -0.8 30.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1496" coordinates="7.2 1.3 12.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1497" coordinates="2.9 1.1 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1498" coordinates="24.0 -11.8 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1499" coordinates="-26.3 -10.6 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1500" coordinates="25.9 18.0 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1501" coordinates="-13.6 30.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1502" coordinates="3.4 -16.6 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1503" coordinates="0.3 -6.6 7.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1504" coordinates="2.4 -4.4 3.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1505" coordinates="3.6 -1.0 11.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1506" coordinates="0.8 8.2 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1507" coordinates="-1.8 5.1 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1508" coordinates="7.9 2.0 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1509" coordinates="-11.6 -40.5 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1510" coordinates="3.9 13.3 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1511" coordinates="2.0 3.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1512" coordinates="24.1 -4.3 21.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1513" coordinates="-14.9 14.3 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1514" coordinates="3.4 2.7 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1515" coordinates="7.4 8.0 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1516" coordinates="2.9 0.3 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1517" coordinates="8.6 -8.3 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1518" coordinates="0.8 7.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1519" coordinates="5.3 -9.7 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1520" coordinates="-13.2 27.1 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1521" coordinates="4.0 -0.6 9.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1522" coordinates="4.5 7.7 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1523" coordinates="11.5 7.2 8.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1524" coordinates="6.4 -6.4 12.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1525" coordinates="-3.3 21.9 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1526" coordinates="6.1 23.9 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1527" coordinates="-3.1 26.9 19.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1528" coordinates="-6.5 29.4 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1529" coordinates="-0.6 4.9 8.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1530" coordinates="-3.2 -2.6 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1531" coordinates="-35.4 19.3 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1532" coordinates="4.9 5.7 5.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1533" coordinates="-1.8 -5.1 9.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1534" coordinates="8.4 -2.2 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1535" coordinates="2.6 -11.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1536" coordinates="-1.8 -9.4 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1537" coordinates="2.0 0.2 16.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1538" coordinates="0.1 16.7 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1539" coordinates="-7.6 8.1 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1540" coordinates="-8.8 0.9 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1541" coordinates="13.4 -6.0 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1542" coordinates="0.4 3.5 2.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1543" coordinates="5.6 23.0 11.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1544" coordinates="3.7 -7.2 13.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1545" coordinates="-23.6 17.7 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1546" coordinates="-3.9 13.4 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1547" coordinates="-3.1 -10.1 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1548" coordinates="5.0 -0.2 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1549" coordinates="6.5 17.6 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1550" coordinates="10.3 3.2 4.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1551" coordinates="14.1 -11.2 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1552" coordinates="3.7 -1.5 6.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1553" coordinates="4.5 27.0 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1554" coordinates="-3.3 -4.3 64.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1555" coordinates="0.6 -4.9 7.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1556" coordinates="8.0 -6.0 74.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1557" coordinates="4.1 -1.0 4.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1558" coordinates="58.6 -3.1 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1559" coordinates="-12.0 -13.9 5.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1560" coordinates="-295.5 15.4 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1561" coordinates="-36.4 -12.1 246.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1562" coordinates="-18.7 11.6 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1563" coordinates="17.8 28.5 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1564" coordinates="8.0 5.4 8.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1565" coordinates="-13.7 28.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1566" coordinates="0.3 -3.9 6.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1567" coordinates="5.2 21.5 1.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1568" coordinates="7.3 -0.4 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1569" coordinates="22.5 24.4 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1570" coordinates="0.6 -8.0 13.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1571" coordinates="2.7 5.4 21.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1572" coordinates="-5.0 23.3 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1573" coordinates="5.7 -10.0 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1574" coordinates="-0.6 -4.0 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1575" coordinates="6.7 21.1 13.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1576" coordinates="12.8 4.9 2.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1577" coordinates="-2.5 -12.9 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1578" coordinates="-7.5 -0.9 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1579" coordinates="4.8 29.0 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1580" coordinates="19.2 -6.0 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1581" coordinates="-0.6 5.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1582" coordinates="-3.8 4.8 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1583" coordinates="-0.9 21.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1584" coordinates="-0.1 29.1 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1585" coordinates="-3.6 -5.7 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1586" coordinates="-2.2 -11.4 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1587" coordinates="8.1 17.4 4.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1588" coordinates="9.3 -4.6 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1589" coordinates="5.8 25.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1590" coordinates="18.9 0.2 8.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1591" coordinates="11.7 3.0 11.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1592" coordinates="3.6 -9.6 13.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1593" coordinates="-5.9 -9.4 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1594" coordinates="-3.3 -0.4 12.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1595" coordinates="10.8 -7.8 6.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1596" coordinates="9.4 -8.9 3.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1597" coordinates="11.6 -0.6 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1598" coordinates="-19.2 4.1 10.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1599" coordinates="18.3 13.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1600" coordinates="-9.2 -0.6 8.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1601" coordinates="6.0 -9.5 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1602" coordinates="5.9 -9.5 20.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1603" coordinates="9.0 -8.5 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1604" coordinates="4.1 27.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1605" coordinates="13.6 -5.0 6.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1606" coordinates="5.9 -7.1 9.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1607" coordinates="0.3 -5.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1608" coordinates="1.5 4.6 7.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1609" coordinates="20.0 12.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1610" coordinates="4.8 3.5 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1611" coordinates="10.8 20.6 6.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1612" coordinates="8.4 8.4 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1613" coordinates="4.5 -65.8 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1614" coordinates="12.9 -53.6 9.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1615" coordinates="4.2 -64.1 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1616" coordinates="2.4 -54.9 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1617" coordinates="-7.1 -68.5 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1618" coordinates="-6.3 -56.8 20.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1619" coordinates="3.3 -45.7 20.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1620" coordinates="8.3 -47.0 24.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1621" coordinates="-12.5 -37.6 10.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1622" coordinates="2.5 -59.5 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1623" coordinates="-44.4 -87.8 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1624" coordinates="-4.0 -54.8 18.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1625" coordinates="36.5 -76.2 3.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1626" coordinates="5.6 -40.8 11.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1627" coordinates="2.0 -43.2 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1628" coordinates="-3.0 -57.3 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1629" coordinates="6.7 -69.7 4.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1630" coordinates="7.2 -76.4 3.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1631" coordinates="-18.4 -90.2 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1632" coordinates="-16.0 -82.9 16.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1633" coordinates="-3.6 -61.0 0.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1634" coordinates="19.1 -82.9 2.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1635" coordinates="13.8 -48.5 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1636" coordinates="8.2 -101.8 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1637" coordinates="14.2 -56.8 10.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1638" coordinates="14.4 -48.4 24.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1639" coordinates="-1.0 -48.8 29.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1640" coordinates="-17.4 -59.4 8.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1641" coordinates="0.7 -48.6 41.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1642" coordinates="14.5 -47.9 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1643" coordinates="-21.6 -56.3 6.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1644" coordinates="-5.8 -63.2 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1645" coordinates="-8.2 -47.1 18.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1646" coordinates="10.5 -55.2 22.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1647" coordinates="-3.8 -55.9 35.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1648" coordinates="7.6 -82.2 1.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1649" coordinates="-8.7 85.0 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1650" coordinates="-1.5 91.4 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1651" coordinates="-25.1 81.8 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1652" coordinates="-24.3 84.1 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1653" coordinates="-11.9 70.3 21.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1654" coordinates="-65.6 49.8 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1655" coordinates="-27.0 88.4 0.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1656" coordinates="-9.6 75.5 8.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1657" coordinates="-12.8 94.8 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1658" coordinates="6.1 90.3 0.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1659" coordinates="-8.9 78.9 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1660" coordinates="-10.9 83.9 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1661" coordinates="-13.3 87.4 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1662" coordinates="-31.4 68.0 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1663" coordinates="16.4 -5.4 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1664" coordinates="0.4 -11.0 12.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1665" coordinates="12.4 -3.8 9.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1666" coordinates="5.5 -1.7 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1667" coordinates="-5.6 7.5 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1668" coordinates="7.4 -13.4 1.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1669" coordinates="-7.2 4.1 1.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1670" coordinates="5.1 0.1 9.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1671" coordinates="-15.9 -1.7 0.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1672" coordinates="4.6 -7.6 9.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1673" coordinates="10.9 -2.9 2.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1674" coordinates="10.0 -6.8 22.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1675" coordinates="-0.3 -6.5 15.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1676" coordinates="-1.4 5.3 0.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1677" coordinates="18.4 -4.3 3.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1678" coordinates="4.8 26.2 9.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1679" coordinates="2.5 -9.8 3.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1680" coordinates="4.8 16.8 9.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1681" coordinates="-1.7 -9.9 10.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1682" coordinates="1.9 -11.4 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1683" coordinates="2.4 -7.2 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1684" coordinates="3.8 0.9 5.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1685" coordinates="-10.0 -73.5 2.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1686" coordinates="-5.0 -51.0 19.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1687" coordinates="5.4 26.4 55.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1688" coordinates="2.3 78.2 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1689" coordinates="-15.2 92.2 1.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1690" coordinates="-19.2 81.0 5.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1691" coordinates="1.6 53.9 28.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1692" coordinates="-46.7 62.9 2.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1693" coordinates="12.1 88.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1694" coordinates="29.5 42.4 46.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1695" coordinates="-2.8 31.1 50.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1696" coordinates="-15.0 90.0 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1697" coordinates="-5.1 46.7 36.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1698" coordinates="-4.9 71.0 61.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1699" coordinates="-14.6 96.7 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1700" coordinates="-32.7 96.9 10.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1701" coordinates="10.0 -40.2 10.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1702" coordinates="6.0 -51.8 0.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1703" coordinates="9.1 -59.3 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1704" coordinates="4.5 -11.7 3.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1705" coordinates="-7.0 22.9 17.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1706" coordinates="4.7 -3.8 7.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1707" coordinates="9.5 -9.1 3.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1708" coordinates="35.8 25.5 1.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1709" coordinates="29.1 11.1 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1710" coordinates="-0.2 -2.0 40.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1711" coordinates="-1.2 -9.3 2.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1712" coordinates="-5.4 -7.7 13.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1713" coordinates="9.9 -10.7 7.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1714" coordinates="8.3 -9.9 13.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1715" coordinates="-1.2 -3.4 6.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1716" coordinates="3.1 0.9 5.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1717" coordinates="5.0 -10.2 4.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1718" coordinates="5.0 4.2 4.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1719" coordinates="-10.5 4.8 24.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1720" coordinates="1.6 -1.6 1.0 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1721" coordinates="13.4 -1.6 21.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1722" coordinates="3.7 -2.2 1.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1723" coordinates="1.5 -6.5 2.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1724" coordinates="-5.6 24.5 5.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1725" coordinates="-2.8 -12.8 4.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1726" coordinates="8.8 -0.8 14.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1727" coordinates="0.1 4.1 11.3 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1728" coordinates="6.8 -1.5 10.4 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1729" coordinates="11.5 17.8 1.9 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1730" coordinates="-26.3 -10.6 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1731" coordinates="-0.1 6.9 4.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1732" coordinates="5.7 23.3 0.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1733" coordinates="29.0 12.7 0.2 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1734" coordinates="37.4 -11.5 57.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1735" coordinates="-9.0 63.3 53.8 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1736" coordinates="1.6 11.6 1.6 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1737" coordinates="-14.8 -64.6 2.1 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1738" coordinates="21.3 -77.5 0.5 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+
+               <peer id="peer-1739" coordinates="36.2 -52.2 0.7 " power="730000000.0"
+               bw_in="13380000" bw_out="1024000" lat="5E-4" />
+       </AS>
+</platform> 
index ef563ff..adc9b9a 100644 (file)
@@ -3,7 +3,7 @@
 <platform version="3">
        
 <config id="General">
-       <prop id="coordinates" value="yes"></prop>
+       <prop id="network/coordinates" value="yes"></prop>
 </config>      
  <AS  id="AS0"  routing="Vivaldi">
        <host id="100030591" coordinates="25.5 9.4 1.4" power="1500000000.0" />
@@ -46,6 +46,5 @@
        <host id="100422926" coordinates="-23.1 -7.6 39.9" power="1600000000.0" />
        <host id="100427449" coordinates="135.5 -21.0 83.4" power="1400000000.0" />
        <host id="100429957" coordinates="17.5 6.7 18.8" power="830000000.0" />
-       <route src=".*" dst=".*"></route>
        </AS>
 </platform>
index ac12b00..c441405 100644 (file)
@@ -22,7 +22,7 @@ int main(int argc, char **argv)
   unsigned int cursor;
   SD_task_t task;
 
-  /* initialisation of SD */
+  /* initialization of SD */
   SD_init(&argc, argv);
 
   /* Check our arguments */
diff --git a/examples/simdag/goal/CMakeLists.txt b/examples/simdag/goal/CMakeLists.txt
new file mode 100644 (file)
index 0000000..941fc7d
--- /dev/null
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(goal_test goal_test.c)
+
+### Add definitions for compile
+if(NOT WIN32)
+target_link_libraries(goal_test simgrid pthread m )
+else(NOT WIN32)
+target_link_libraries(goal_test simgrid)
+endif(NOT WIN32)
diff --git a/examples/simdag/goal/goal_test.c b/examples/simdag/goal/goal_test.c
new file mode 100644 (file)
index 0000000..2f8b28f
--- /dev/null
@@ -0,0 +1,98 @@
+/* GOAL loader prototype. Not ready for public usage yet */
+
+/* Copyright (c) 2011. 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 <stdlib.h>
+#include <stdio.h>
+#include "simdag/simdag.h"
+#include "xbt/log.h"
+#include "xbt/ex.h"
+#include <string.h>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(goal, "The GOAL loader into SimDag");
+
+typedef struct {
+  int i, j, k;
+} s_bcast_task_t,*bcast_task_t;
+
+
+const SD_workstation_t* ws_list;
+int count = 0;
+
+xbt_dynar_t reclaimed;
+
+static void send_one(int from, int to) {
+  //XBT_DEBUG("send_one(%d, %d)",from,to);
+
+  if (count %100000 == 0)
+    XBT_INFO("Sending task #%d",count);
+  count++;
+
+  bcast_task_t bt;
+  if (!xbt_dynar_is_empty(reclaimed)) {
+     bt = xbt_dynar_pop_as(reclaimed,bcast_task_t);
+  } else {
+    bt = xbt_new(s_bcast_task_t,1);
+  }
+  bt->i=from;
+  bt->j=(from+to)/2;
+  bt->k=to;
+
+  SD_task_t task = SD_task_create_comm_e2e(NULL,bt,424242);
+
+  XBT_DEBUG("Schedule task between %d and %d",bt->i,bt->j);
+  SD_task_schedulel(task,2,ws_list[bt->i],ws_list[bt->j]);
+  SD_task_watch(task,SD_DONE);
+}
+
+
+int main(int argc, char **argv) {
+
+  /* initialization of SD */
+  SD_init(&argc, argv);
+
+  if (argc > 1) {
+    SD_create_environment(argv[1]);
+  } else {
+    SD_create_environment("../../platforms/One_cluster_no_backbone.xml");
+  }
+
+  ws_list = SD_workstation_get_list();
+  reclaimed = xbt_dynar_new(sizeof(bcast_task_t),xbt_free_ref);
+  xbt_dynar_t done = NULL;
+  send_one(0,SD_workstation_get_number());
+  do {
+    if (done != NULL && !xbt_dynar_is_empty(done)) {
+      unsigned int cursor;
+      SD_task_t task;
+
+      xbt_dynar_foreach(done, cursor, task) {
+        bcast_task_t bt = SD_task_get_data(task);
+
+        if (bt->i != bt->j -1)
+          send_one(bt->i,bt->j);
+        if (bt->j != bt->k -1)
+          send_one(bt->j,bt->k);
+
+        if (xbt_dynar_length(reclaimed)<100) {
+          xbt_dynar_push_as(reclaimed,bcast_task_t,bt);
+        } else {
+          free(bt);
+        }
+        SD_task_destroy(task);
+      }
+      xbt_dynar_free(&done);
+    }
+    done=SD_simulate(-1);
+  } while(!xbt_dynar_is_empty(done));
+  xbt_dynar_free(&done);
+  xbt_dynar_free(&reclaimed);
+
+  SD_exit();
+  XBT_INFO("Done. Bailing out");
+  return 0;
+}
index 38e9fc7..b60cfba 100644 (file)
@@ -2,41 +2,41 @@ require "simgrid"
 
   simgrid.AS.new{id="AS0",mode="Full"};
 
-  simgrid.Host.new{id="Tremblay",power=98095000};
-  simgrid.Host.new{id="Jupiter",power=76296000};
-  simgrid.Host.new{id="Fafard",power=76296000};
-  simgrid.Host.new{id="Ginette",power=48492000};
-  simgrid.Host.new{id="Bourassa",power=48492000};
+  simgrid.host.new{id="Tremblay",power=98095000};
+  simgrid.host.new{id="Jupiter",power=76296000};
+  simgrid.host.new{id="Fafard",power=76296000};
+  simgrid.host.new{id="Ginette",power=48492000};
+  simgrid.host.new{id="Bourassa",power=48492000};
 
     -- create Links
   for i=0,11 do
-    simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
+    simgrid.link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
   end
-  -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
-   simgrid.Route.new("Tremblay","Jupiter",{"1"});
-   simgrid.Route.new("Tremblay","Fafard",{"0","1","2","3","4","8"});
-   simgrid.Route.new("Tremblay","Ginette",{"3","4","5"});
-   simgrid.Route.new("Tremblay","Bourassa",{"0","1","3","2","4","6","7"});
+  -- simgrid.route.new(src_id,des_id,links_nb,links_list)
+   simgrid.route.new("Tremblay","Jupiter",{"1"});
+   simgrid.route.new("Tremblay","Fafard",{"0","1","2","3","4","8"});
+   simgrid.route.new("Tremblay","Ginette",{"3","4","5"});
+   simgrid.route.new("Tremblay","Bourassa",{"0","1","3","2","4","6","7"});
 
-   simgrid.Route.new("Jupiter","Tremblay",{"1"});
-   simgrid.Route.new("Jupiter","Fafard",{"0","1","2","3","4","8","9"});
-   simgrid.Route.new("Jupiter","Ginette",{"3","4","5","9"});
-   simgrid.Route.new("Jupiter","Bourassa",{"0","1","2","3","4","6","7","9"});
+   simgrid.route.new("Jupiter","Tremblay",{"1"});
+   simgrid.route.new("Jupiter","Fafard",{"0","1","2","3","4","8","9"});
+   simgrid.route.new("Jupiter","Ginette",{"3","4","5","9"});
+   simgrid.route.new("Jupiter","Bourassa",{"0","1","2","3","4","6","7","9"});
  
-   simgrid.Route.new("Fafard","Tremblay",{"0","1","2","3","4","8"});
-   simgrid.Route.new("Fafard","Jupiter",{"0","1","2","3","4","8","9"});
-   simgrid.Route.new("Fafard","Ginette",{"0","1","2","5","8"});
-   simgrid.Route.new("Fafard","Bourassa",{"6","7","8"});
+   simgrid.route.new("Fafard","Tremblay",{"0","1","2","3","4","8"});
+   simgrid.route.new("Fafard","Jupiter",{"0","1","2","3","4","8","9"});
+   simgrid.route.new("Fafard","Ginette",{"0","1","2","5","8"});
+   simgrid.route.new("Fafard","Bourassa",{"6","7","8"});
   
-   simgrid.Route.new("Ginette","Tremblay",{"3","4","5"});
-   simgrid.Route.new("Ginette","Jupiter",{"3","4","5","9"});
-   simgrid.Route.new("Ginette","Fafard",{"0","1","2","5","8"});
-   simgrid.Route.new("Ginette","Bourassa",{"0","1","2","5","6","7"});
+   simgrid.route.new("Ginette","Tremblay",{"3","4","5"});
+   simgrid.route.new("Ginette","Jupiter",{"3","4","5","9"});
+   simgrid.route.new("Ginette","Fafard",{"0","1","2","5","8"});
+   simgrid.route.new("Ginette","Bourassa",{"0","1","2","5","6","7"});
 
-   simgrid.Route.new("Bourassa","Tremblay",{"0","1","3","2","4","6","7"});
-   simgrid.Route.new("Bourassa","Jupiter",{"0","1","2","3","4","6","7","9"});
-   simgrid.Route.new("Bourassa","Fafard",{"6","7","8"});
-   simgrid.Route.new("Bourassa","Ginette",{"0","1","2","5","6","7"});
+   simgrid.route.new("Bourassa","Tremblay",{"0","1","3","2","4","6","7"});
+   simgrid.route.new("Bourassa","Jupiter",{"0","1","2","3","4","6","7","9"});
+   simgrid.route.new("Bourassa","Fafard",{"6","7","8"});
+   simgrid.route.new("Bourassa","Ginette",{"0","1","2","5","6","7"});
   
    --Save Platform
    simgrid.sd_register_platform();
index a23a66f..3aa9f41 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char **argv)
 
 
   /* Trying to set a new property */
-  xbt_dict_set(props, "NewProp", strdup("newValue"), free);
+  xbt_dict_set(props, "NewProp", strdup("newValue"), NULL);
 
   /* Print the properties of the workstation 1 */
   xbt_dict_foreach(props, cursor, key, data) {
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
     XBT_INFO("\tProperty: %s is undefined", exist);
   else {
     XBT_INFO("\tProperty: %s old value: %s", exist, value);
-    xbt_dict_set(props, exist, strdup("250"), free);
+    xbt_dict_set(props, exist, strdup("250"), NULL);
   }
 
   /* Test if we have changed the value */
index 0890665..3a0788d 100644 (file)
@@ -84,7 +84,7 @@ static double finish_on_at(SD_task_t task, SD_workstation_t workstation)
 
   parents = SD_task_get_parents(task);
 
-  if (xbt_dynar_length(parents)) {
+  if (!xbt_dynar_is_empty(parents)) {
     /* compute last_data_available */
     last_data_available = -1.0;
     xbt_dynar_foreach(parents, i, parent) {
@@ -292,7 +292,7 @@ int main(int argc, char **argv)
   while (!xbt_dynar_is_empty((changed = SD_simulate(-1.0)))) {
     /* Get the set of ready tasks */
     ready_tasks = get_ready_tasks(dax);
-    if (!xbt_dynar_length(ready_tasks)) {
+    if (xbt_dynar_is_empty(ready_tasks)) {
       xbt_dynar_free_container(&ready_tasks);
       xbt_dynar_free_container(&changed);
       /* there is no ready task, let advance the simulation */
index c1157cb..01b0433 100644 (file)
@@ -86,7 +86,7 @@ int main(int argc, char **argv)
                    &(computation_amount[1]), SD_SCHED_NO_COST, rate);
 
   /* let's launch the simulation! */
-  while (xbt_dynar_length(changed_tasks = SD_simulate(-1.0)) > 0) {
+  while (!xbt_dynar_is_empty(changed_tasks = SD_simulate(-1.0))) {
     for (i = 0; i < 2; i++) {
       task = SD_workstation_get_current_task(workstations[i]);
       if (task)
index b05e5fb..7452e70 100644 (file)
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
                    &(computation_amount[1]), SD_SCHED_NO_COST, rate);
 
   /* let's launch the simulation! */
-  while (xbt_dynar_length(changed_tasks = SD_simulate(-1.0)) > 0) {
+  while (!xbt_dynar_is_empty(changed_tasks = SD_simulate(-1.0))) {
     for (i = 0; i < 2; i++) {
       task = SD_workstation_get_current_task(workstations[i]);
       if (task)
index d1dc7cc..68aaa81 100644 (file)
@@ -8,7 +8,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 2] -> Fafard
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 
@@ -25,7 +25,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 5] -> Tremblay
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 
@@ -47,5 +47,5 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 11] -> Jupiter
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
index 9a97abc..12c68f7 100644 (file)
@@ -8,7 +8,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 2] -> Fafard
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=6 ... validation ok.
@@ -31,7 +31,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 5] -> Tremblay
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=21 ... validation ok.
@@ -64,7 +64,7 @@ $ ../../bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/
 > [rank 11] -> Jupiter
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=78 ... validation ok.
index eb018c7..64a6bf1 100644 (file)
@@ -394,7 +394,7 @@ int job_execute(job_t job)
   if (!job)
     return EINVAL;
 
-  return (*(job->func)) (job->argc, job->argv);
+  return job->func(job->argc, job->argv);
 }
 
 int job_free(job_t * ref)
index 1954c7d..1d02d0a 100644 (file)
@@ -131,9 +131,10 @@ typedef enum {
   MSG_HOST_FAILURE = 4,       /**< @brief System shutdown. The host on which you are
       running has just been rebooted. Free your datastructures and
       return now !*/
-  MSG_TASK_CANCELLED = 8,     /**< @brief Canceled task. This task has been canceled by somebody!*/
+  MSG_TASK_CANCELED = 8,     /**< @brief Canceled task. This task has been canceled by somebody!*/
 } MSG_error_t;
 /** @} */
 
+
 SG_END_DECL()
 #endif
index 70a3732..fb3aebd 100644 (file)
@@ -31,7 +31,7 @@ XBT_PUBLIC(void) MSG_set_function(const char *host_id,
                                   const char *function_name,
                                   xbt_dynar_t arguments);
 
-XBT_INLINE XBT_PUBLIC(double) MSG_get_clock(void);
+XBT_PUBLIC(double) MSG_get_clock(void);
 XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(void);
 
 
@@ -156,7 +156,6 @@ XBT_PUBLIC(int) MSG_task_Iprobe(m_channel_t channel);
 XBT_PUBLIC(int) MSG_task_probe_from(m_channel_t channel);
 XBT_PUBLIC(int) MSG_task_probe_from_host(int channel, m_host_t host);
 XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec);
-XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
 
 XBT_PUBLIC(double) MSG_task_get_compute_duration(m_task_t task);
 XBT_PUBLIC(void) MSG_task_set_compute_duration(m_task_t task,
@@ -177,6 +176,7 @@ XBT_PUBLIC(MSG_error_t)
 
 XBT_PUBLIC(MSG_error_t)
     MSG_task_receive(m_task_t * task, const char *alias);
+#define MSG_task_recv(t,a) MSG_task_receive(t,a)
 
 XBT_PUBLIC(msg_comm_t) MSG_task_isend(m_task_t task, const char *alias);
 XBT_INLINE XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(m_task_t task, const char *alias,
@@ -231,10 +231,12 @@ MSG_error_t MSG_action_trace_run(char *path);
 #ifdef MSG_USE_DEPRECATED
 /* these are the functions which are deprecated. Do not use them, they may get removed in future releases */
 #define MSG_TIMEOUT_FAILURE MSG_TIMEOUT
+#define MSG_TASK_CANCELLED MSG_TASK_CANCELED
 #define MSG_mailbox_put_with_time_out(mailbox, task, timeout) \
         MSG_mailbox_put_with_timeout(mailbox, task, timeout)
 
 #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
+XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
 #endif
 
 #include "instr/instr.h"
diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h
new file mode 100644 (file)
index 0000000..68c26f3
--- /dev/null
@@ -0,0 +1,123 @@
+/* platf.h - Public interface to the SimGrid platforms                      */
+
+/* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010, 2011. 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 SG_PLATF_H
+#define SG_PLATF_H
+
+#include <xbt.h>
+
+typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
+XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new(const char *filename);
+XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(const char *id,
+                                                    const char *input,
+                                                    double periodicity);
+
+/** Defines whether a given resource is working or not */
+typedef enum {
+  SURF_RESOURCE_ON = 1,                   /**< Up & ready        */
+  SURF_RESOURCE_OFF = 0                   /**< Down & broken     */
+} e_surf_resource_state_t;
+
+typedef enum {
+  SURF_LINK_FULLDUPLEX = 2,
+  SURF_LINK_SHARED = 1,
+  SURF_LINK_FATPIPE = 0
+} e_surf_link_sharing_policy_t;
+
+/*
+ * Platform creation functions. Instead of passing 123 arguments to the creation functions
+ * (one for each possible XML attribute), we pass structures containing them all. It removes the
+ * chances of switching arguments by error, and reduce the burden when we add a new attribute:
+ * old models can just continue to ignore it without having to update their headers.
+ *
+ * It shouldn't be too costly at runtime, provided that structures living on the stack are
+ * used, instead of malloced structures.
+ */
+
+typedef struct {
+  const char* id;
+  double power_peak;
+  int core_amount;
+  double power_scale;
+  tmgr_trace_t power_trace;
+  e_surf_resource_state_t initial_state;
+  tmgr_trace_t state_trace;
+  const char* coord;
+  xbt_dict_t properties;
+} s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t;
+
+typedef struct {
+  const char* id;
+  const char* coord;
+} s_sg_platf_router_cbarg_t, *sg_platf_router_cbarg_t;
+
+typedef struct {
+  const char* id;
+  double bandwidth;
+  tmgr_trace_t bandwidth_trace;
+  double latency;
+  tmgr_trace_t latency_trace;
+  e_surf_resource_state_t state;
+  tmgr_trace_t state_trace;
+  e_surf_link_sharing_policy_t policy;
+  xbt_dict_t properties;
+} s_sg_platf_link_cbarg_t, *sg_platf_link_cbarg_t;
+
+typedef struct s_sg_platf_peer_cbarg *sg_platf_peer_cbarg_t;
+typedef struct s_sg_platf_peer_cbarg {
+  const char* id;
+  double power;
+  double bw_in;
+  double bw_out;
+  double lat;
+  const char* coord;
+  tmgr_trace_t availability_trace;
+  tmgr_trace_t state_trace;
+} s_sg_platf_peer_cbarg_t;
+
+typedef struct s_sg_platf_linkctn_cbarg *sg_platf_linkctn_cbarg_t;
+typedef struct s_sg_platf_linkctn_cbarg {
+  const char *id;
+  const char *direction;
+} s_sg_platf_linkctn_cbarg_t;
+
+typedef struct s_sg_platf_cluster_cbarg *sg_platf_cluster_cbarg_t;
+typedef struct s_sg_platf_cluster_cbarg {
+  const char* id;
+  const char* prefix;
+  const char* suffix;
+  const char* radical;
+  double power;
+  int core_amount;
+  double bw;
+  double lat;
+  double bb_bw;
+  double bb_lat;
+  const char* router_id;
+  e_surf_link_sharing_policy_t sharing_policy;
+  e_surf_link_sharing_policy_t bb_sharing_policy;
+  const char* availability_trace; //don't convert to tmgr_trace_t since there is a trace per host and some rewriting is needed
+  const char* state_trace;
+} s_sg_platf_cluster_cbarg_t;
+
+
+
+XBT_PUBLIC(void) sg_platf_begin(void);  // Start a new platform
+XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform
+
+XBT_PUBLIC(void) sg_platf_new_AS_begin(const char *id, const char *mode); // Begin description of new AS
+XBT_PUBLIC(void) sg_platf_new_AS_end(void);                            // That AS is fully described
+
+XBT_PUBLIC(void) sg_platf_new_host   (sg_platf_host_cbarg_t   host);   // Add an host   to the currently described AS
+XBT_PUBLIC(void) sg_platf_new_router (sg_platf_router_cbarg_t router); // Add a router  to the currently described AS
+XBT_PUBLIC(void) sg_platf_new_link   (sg_platf_link_cbarg_t link);     // Add a link    to the currently described AS
+XBT_PUBLIC(void) sg_platf_new_peer   (sg_platf_peer_cbarg_t peer);     // Add a peer    to the currently described AS
+XBT_PUBLIC(void) sg_platf_new_cluster(sg_platf_cluster_cbarg_t clust); // Add a cluster to the currently described AS
+
+
+#endif                          /* SG_PLATF_H */
index 4c1feb7..0581c3e 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* simgrid_config.h - Results of the configure made visible to user code    */
 
 /* Copyright (c) 2009, 2010, 2011. Da SimGrid team. All rights reserved.    */
@@ -20,9 +18,9 @@ SG_BEGIN_DECL()
 #define MAKE_SIMGRID_VERSION(major, minor, patch)       \
   (100UL * (100UL * (major) + (minor)) + (patch))
 
-#cmakedefine SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
-#cmakedefine SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
-#cmakedefine SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
+#define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
+#define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
+#define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
 
 #define SIMGRID_VERSION MAKE_SIMGRID_VERSION(SIMGRID_VERSION_MAJOR, \
                                              SIMGRID_VERSION_MINOR, \
index 98512e2..074bf27 100644 (file)
@@ -10,6 +10,7 @@
 #define _SIMIX_CONTEXT_H
 
 #include "xbt/swag.h"
+#include "xbt/parmap.h"
 #include "simix/datatypes.h"
 #include "simgrid_config.h"
 
@@ -33,7 +34,7 @@ typedef void (*smx_pfn_context_free_t) (smx_context_t);
 typedef void (*smx_pfn_context_start_t) (smx_context_t);
 typedef void (*smx_pfn_context_stop_t) (smx_context_t);
 typedef void (*smx_pfn_context_suspend_t) (smx_context_t context);
-typedef void (*smx_pfn_context_runall_t) (xbt_dynar_t processes);
+typedef void (*smx_pfn_context_runall_t) (void);
 typedef smx_context_t (*smx_pfn_context_self_t) (void);
 typedef void* (*smx_pfn_context_get_data_t) (smx_context_t context);
 
@@ -50,8 +51,6 @@ typedef struct s_smx_context_factory {
   smx_pfn_context_get_data_t get_data;
 } s_smx_context_factory_t;
 
-
-
 /* Hack: let msg load directly the right factory */
 typedef void (*smx_ctx_factory_initializer_t)(smx_context_factory_t*);
 extern smx_ctx_factory_initializer_t smx_factory_initializer_to_use;
@@ -74,11 +73,11 @@ extern smx_context_t smx_current_context;
 typedef struct s_smx_context {
   s_xbt_swag_hookup_t hookup;
   xbt_main_func_t code;
-  int argc;
-  char **argv;
   void_pfn_smxprocess_t cleanup_func;
-  int iwannadie:1;
   void *data;   /* Here SIMIX stores the smx_process_t containing the context */
+  char **argv;
+  int argc;
+  int iwannadie:1;
 } s_smx_ctx_base_t;
 
 /* methods of this class */
@@ -96,12 +95,16 @@ void smx_ctx_base_stop(smx_context_t context);
 smx_context_t smx_ctx_base_self(void);
 void *smx_ctx_base_get_data(smx_context_t context);
 
+XBT_INLINE xbt_dynar_t SIMIX_process_get_runnable(void);
+
 /* parallelism */
-XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads);
-XBT_INLINE int SIMIX_context_get_nthreads(void);
 XBT_INLINE int SIMIX_context_is_parallel(void);
-XBT_INLINE void SIMIX_context_set_parallel_threshold(int threshold);
+XBT_INLINE int SIMIX_context_get_nthreads(void);
+XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads);
 XBT_INLINE int SIMIX_context_get_parallel_threshold(void);
+XBT_INLINE void SIMIX_context_set_parallel_threshold(int threshold);
+XBT_INLINE e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode(void);
+XBT_INLINE void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode);
 
 SG_END_DECL()
 
index b64385e..cb702df 100644 (file)
@@ -63,8 +63,8 @@ XBT_PUBLIC(void*) SIMIX_host_self_get_data(void);
 XBT_PUBLIC(int) SIMIX_process_count(void);
 XBT_INLINE XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
 XBT_PUBLIC(const char*) SIMIX_process_self_get_name(void);
-XBT_PUBLIC(void) SIMIX_process_self_set_data(void *data);
-XBT_PUBLIC(void*) SIMIX_process_self_get_data(void);
+XBT_PUBLIC(void) SIMIX_process_self_set_data(smx_process_t self, void *data);
+XBT_PUBLIC(void*) SIMIX_process_self_get_data(smx_process_t self);
 XBT_PUBLIC(smx_context_t) SIMIX_process_get_context(smx_process_t);
 XBT_PUBLIC(void) SIMIX_process_set_context(smx_process_t p,smx_context_t c);
 
index 4ebfde4..1a960fd 100644 (file)
@@ -2,8 +2,8 @@
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -12,7 +12,7 @@
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -199,6 +199,8 @@ typedef int AT_surfxml_process_function;
 #define AU_surfxml_process_function NULL
 typedef int AT_surfxml_peer_id;
 #define AU_surfxml_peer_id 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_FULLDUPLEX,A_surfxml_cluster_sharing_policy_FATPIPE } AT_surfxml_cluster_sharing_policy;
 typedef int AT_surfxml_bypassRoute_dst;
 #define AU_surfxml_bypassRoute_dst NULL
@@ -245,164 +247,247 @@ XBT_PUBLIC_DATA(char *) surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
 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_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_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_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_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_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_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_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_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_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_host_state ) AX_surfxml_host_state;
 #define A_surfxml_host_state AX_surfxml_host_state
+XBT_PUBLIC_DATA(short ) int surfxml_host_state_isset;
 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_host_power ) AX_surfxml_host_power;
 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
+XBT_PUBLIC_DATA(short ) int surfxml_host_power_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_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_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_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_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_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_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_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_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_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_cluster_availability_file ) AX_surfxml_cluster_availability_file;
 #define A_surfxml_cluster_availability_file (surfxml_bufferstack + AX_surfxml_cluster_availability_file)
+XBT_PUBLIC_DATA(short ) int surfxml_cluster_availability_file_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_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_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_link_state ) AX_surfxml_link_state;
 #define A_surfxml_link_state AX_surfxml_link_state
+XBT_PUBLIC_DATA(short ) int surfxml_link_state_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_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_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_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_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_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_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_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_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_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_cluster_state_file ) AX_surfxml_cluster_state_file;
 #define A_surfxml_cluster_state_file (surfxml_bufferstack + AX_surfxml_cluster_state_file)
+XBT_PUBLIC_DATA(short ) int surfxml_cluster_state_file_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_cluster_power ) AX_surfxml_cluster_power;
 #define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
+XBT_PUBLIC_DATA(short ) int surfxml_cluster_power_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_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_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_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_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_availability ) AX_surfxml_host_availability;
 #define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
+XBT_PUBLIC_DATA(short ) int surfxml_host_availability_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_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_bypassRoute_gw_dst ) AX_surfxml_bypassRoute_gw_dst;
 #define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassRoute_gw_dst_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_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_peer_power ) AX_surfxml_peer_power;
 #define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
+XBT_PUBLIC_DATA(short ) int surfxml_peer_power_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_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_bypassRoute_gw_src ) AX_surfxml_bypassRoute_gw_src;
 #define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
+XBT_PUBLIC_DATA(short ) int surfxml_bypassRoute_gw_src_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_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_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_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_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_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_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;
 
 /* XML application utilities. */
 XBT_PUBLIC(int ) surfxml_element_context(int);
index a0a891d..3c945cc 100644 (file)
@@ -29,4 +29,9 @@ extern int ROUTING_ASR_LEVEL; //Routing level
 extern int COORD_ASR_LEVEL;    //Coordinates level
 extern int NS3_ASR_LEVEL;              //host node for ns3
 
+
+/* The callbacks to register for the routing to work */
+void routing_AS_begin(const char *AS_id, const char *wanted_routing_type);
+void routing_AS_end(void);
+
 #endif                          /* _SURF_SURF_H */
index 079db3b..721db6e 100644 (file)
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC_DATA(char *) platform_filename;
-
 /* Hook for the different tags. All the functions which pointer to are push into here are run when the tag is encountered */
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_platform_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_platform_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_host_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_host_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_router_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_router_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_link_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_link_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_route_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_route_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_link_ctn_cb_list;
@@ -41,31 +31,23 @@ XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_trace_connect_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_trace_connect_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_random_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_random_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_AS_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_AS_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_ASroute_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_ASroute_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_bypassRoute_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_bypassRoute_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_cluster_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_cluster_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_peer_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_peer_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_config_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_config_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_include_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_include_cb_list;
 
 XBT_PUBLIC(void) surf_parse_open(const char *file);
 XBT_PUBLIC(void) surf_parse_close(void);
-XBT_PUBLIC(int)  surf_parse_no_callbacks(void);
 XBT_PUBLIC(void) surf_parse_init_callbacks(void);
 XBT_PUBLIC(void) surf_parse_reset_callbacks(void);
 XBT_PUBLIC(void) surf_parse_free_callbacks(void);
-XBT_PUBLIC(void) surf_parse_get_double(double *value, const char *string);
-XBT_PUBLIC(void) surf_parse_get_int(int *value, const char *string);
-XBT_PUBLIC(void) surf_parse_add_callback_config(void);
-XBT_PUBLIC(void) surf_parse_models_setup(void);
+XBT_PUBLIC(void) surf_parse_error(const char *msg) _XBT_GNUC_NORETURN;
+XBT_PUBLIC(double) surf_parse_get_double(const char *string);
+XBT_PUBLIC(int) surf_parse_get_int(const char *string);
 /* Prototypes of the functions offered by flex */
 XBT_PUBLIC(int) surf_parse_lex(void);
 XBT_PUBLIC(int) surf_parse_get_lineno(void);
index a352595..0ddcff7 100644 (file)
@@ -88,8 +88,8 @@ SG_BEGIN_DECL()
  *
  * @{
  */
-  /** @brief Configuration set are only special dynars. But don't rely on it, it may change. */
-typedef xbt_dynar_t xbt_cfg_t;
+/** @brief Configuration set's data type is opaque. */
+typedef void* xbt_cfg_t;
 
 XBT_PUBLIC(void) xbt_cfg_set(xbt_cfg_t cfg, const char *name, ...);
 XBT_PUBLIC(void) xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name,
index 8a26fc5..5c6f6df 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/dict.h -- api to a generic dictionary                                */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -43,8 +43,9 @@ SG_BEGIN_DECL()
  */
 
   /** \brief Dictionary data type (opaque structure) */
-typedef struct xbt_dict_ *xbt_dict_t;
+typedef struct s_xbt_dict *xbt_dict_t;
 XBT_PUBLIC(xbt_dict_t) xbt_dict_new(void);
+XBT_PUBLIC(xbt_dict_t) xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn);
 XBT_PUBLIC(void) xbt_dict_free(xbt_dict_t * dict);
 XBT_PUBLIC(unsigned int) xbt_dict_size(xbt_dict_t dict);
 
@@ -120,12 +121,11 @@ XBT_PUBLIC(void) xbt_dicti_remove(xbt_dict_t dict, uintptr_t key);
  *  @{ */
 
   /** @brief Cursor on dictionaries (opaque type) */
-typedef struct xbt_dict_cursor_ *xbt_dict_cursor_t;
+typedef struct s_xbt_dict_cursor *xbt_dict_cursor_t;
 XBT_PUBLIC(xbt_dict_cursor_t) xbt_dict_cursor_new(const xbt_dict_t dict);
 XBT_PUBLIC(void) xbt_dict_cursor_free(xbt_dict_cursor_t * cursor);
 
-XBT_INLINE XBT_PUBLIC(void) xbt_dict_cursor_rewind(xbt_dict_cursor_t
-                                                   cursor);
+XBT_PUBLIC(void) xbt_dict_cursor_rewind(xbt_dict_cursor_t cursor);
 
 
 XBT_PUBLIC(char *) xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
@@ -136,7 +136,7 @@ XBT_PUBLIC(void) xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor,
 
 XBT_PUBLIC(void) xbt_dict_cursor_first(const xbt_dict_t dict,
                                        xbt_dict_cursor_t * cursor);
-XBT_INLINE XBT_PUBLIC(void) xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
+XBT_PUBLIC(void) xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
 XBT_PUBLIC(int) xbt_dict_cursor_get_or_free(xbt_dict_cursor_t * cursor,
                                             char **key, void **data);
   /** @def xbt_dict_foreach
index 67418d1..9e2a65d 100644 (file)
@@ -66,7 +66,7 @@ XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new(const unsigned long elm_size,
                                       void_f_pvoid_t const free_f);
 XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new_sync(const unsigned long elm_size,
                                            void_f_pvoid_t const free_f);
-XBT_INLINE XBT_PUBLIC(void) xbt_dynar_free(xbt_dynar_t * dynar);
+XBT_PUBLIC(void) xbt_dynar_free(xbt_dynar_t * dynar);
 XBT_PUBLIC(void) xbt_dynar_free_voidp(void *dynar);
 XBT_PUBLIC(void) xbt_dynar_free_container(xbt_dynar_t * dynar);
 XBT_PUBLIC(void) xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
@@ -93,14 +93,13 @@ XBT_PUBLIC(void) xbt_dynar_insert_at(xbt_dynar_t const dynar,
 XBT_PUBLIC(void) xbt_dynar_remove_at(xbt_dynar_t const dynar,
                                      const int idx, void *const dst);
 
-XBT_PUBLIC(unsigned int) xbt_dynar_search(xbt_dynar_t const dynar,
-                                          void *elem);
+XBT_PUBLIC(unsigned int) xbt_dynar_search(xbt_dynar_t const dynar, void *elem);
 XBT_PUBLIC(int) xbt_dynar_member(xbt_dynar_t const dynar, void *elem);
 XBT_PUBLIC(void) xbt_dynar_sort(xbt_dynar_t const dynar,
                                 int_f_cpvoid_cpvoid_t compar_fn);
-XBT_INLINE XBT_PUBLIC(int) xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2,
-                                       int(*compar)(const void *, const void *));
-XBT_INLINE XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
+XBT_PUBLIC(int) xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2,
+                                  int(*compar)(const void *, const void *));
+XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
 
 /** @} */
 /** @defgroup XBT_dynar_misc Dynar miscellaneous functions
@@ -109,9 +108,8 @@ XBT_INLINE XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
  *  @{
  */
 
-XBT_INLINE XBT_PUBLIC(unsigned long) xbt_dynar_length(const xbt_dynar_t
-                                                      dynar);
-XBT_INLINE XBT_PUBLIC(int) xbt_dynar_is_empty(const xbt_dynar_t dynar);
+XBT_PUBLIC(unsigned long) xbt_dynar_length(const xbt_dynar_t dynar);
+XBT_PUBLIC(int) xbt_dynar_is_empty(const xbt_dynar_t dynar);
 XBT_PUBLIC(void) xbt_dynar_reset(xbt_dynar_t const dynar);
 
 
@@ -122,10 +120,8 @@ XBT_PUBLIC(void) xbt_dynar_reset(xbt_dynar_t const dynar);
  *  @{
  */
 
-XBT_INLINE XBT_PUBLIC(void) xbt_dynar_push(xbt_dynar_t const dynar,
-                                           const void *src);
-XBT_INLINE XBT_PUBLIC(void) xbt_dynar_pop(xbt_dynar_t const dynar,
-                                          void *const dst);
+XBT_PUBLIC(void) xbt_dynar_push(xbt_dynar_t const dynar, const void *src);
+XBT_PUBLIC(void) xbt_dynar_pop(xbt_dynar_t const dynar, void *const dst);
 XBT_PUBLIC(void) xbt_dynar_unshift(xbt_dynar_t const dynar,
                                    const void *src);
 XBT_PUBLIC(void) xbt_dynar_shift(xbt_dynar_t const dynar, void *const dst);
@@ -141,10 +137,10 @@ XBT_PUBLIC(void) xbt_dynar_map(const xbt_dynar_t dynar,
  *  @{
  */
 
-XBT_INLINE XBT_PUBLIC(void *) xbt_dynar_set_at_ptr(const xbt_dynar_t dynar,
-                                                   const unsigned long idx);
-XBT_INLINE XBT_PUBLIC(void *) xbt_dynar_get_ptr(const xbt_dynar_t dynar,
-                                                const unsigned long idx);
+XBT_PUBLIC(void *) xbt_dynar_set_at_ptr(const xbt_dynar_t dynar,
+                                        const unsigned long idx);
+XBT_PUBLIC(void *) xbt_dynar_get_ptr(const xbt_dynar_t dynar,
+                                     const unsigned long idx);
 XBT_PUBLIC(void *) xbt_dynar_insert_at_ptr(xbt_dynar_t const dynar,
                                            const int idx);
 XBT_PUBLIC(void *) xbt_dynar_push_ptr(xbt_dynar_t const dynar);
@@ -208,9 +204,8 @@ XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
  *  @{
  */
 
-XBT_INLINE XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar,
-                                                unsigned int *const
-                                                cursor);
+XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar,
+                                     unsigned int *const cursor);
 XBT_PUBLIC(void) xbt_dynar_cursor_unlock(xbt_dynar_t dynar);
 
 /* do not use this structure internals directly, but use the public interface
index 50ef63e..f1f3cc9 100644 (file)
@@ -55,15 +55,15 @@ SG_BEGIN_DECL()
 # include <stdio.h>
 #include <errno.h>
 #  define MAYDAY_SAVE(m)    printf("%d %s:%d save %p\n",                \
-                                   (*xbt_getpid)(),__FILE__,__LINE__,  \
+                                   xbt_getpid(), __FILE__, __LINE__,    \
                                    (m)->jb                              \
                                   ),
 #  define MAYDAY_RESTORE(m) printf("%d %s:%d restore %p\n",             \
-                                   (*xbt_getpid)(),__FILE__,__LINE__,  \
+                                   xbt_getpid(), __FILE__, __LINE__,    \
                                    (m)->jb                              \
                                   ),
 #  define MAYDAY_CATCH(e)   printf("%d %s:%d Catched '%s'\n",           \
-                                   (*xbt_getpid)(),__FILE__,__LINE__,  \
+                                   xbt_getpid(), __FILE__, __LINE__,    \
                                    (e).msg                              \
                                  ),
 #else
@@ -450,7 +450,7 @@ extern void __xbt_ex_terminate_default(xbt_ex_t * e);
      _throw_ctx->exception.remote   = 0;                                     \
      _throw_ctx->exception.host     = (char*)NULL;                           \
      _throw_ctx->exception.procname = (char*)xbt_procname();                 \
-     _throw_ctx->exception.pid      = (*xbt_getpid)();                       \
+     _throw_ctx->exception.pid      = xbt_getpid();                          \
      _throw_ctx->exception.file     = (char*)__FILE__;                       \
      _throw_ctx->exception.line     = __LINE__;                              \
      _throw_ctx->exception.func     = (char*)_XBT_FUNCTION;                  \
index 5455d69..ee3832c 100644 (file)
@@ -53,10 +53,10 @@ XBT_PUBLIC(int) xbt_fifo_is_in(xbt_fifo_t, void *);
  *  @{
  */
 
-XBT_INLINE XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void);
+XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void);
 XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t, void *);
 XBT_PUBLIC(void *) xbt_fifo_get_item_content(xbt_fifo_item_t);
-XBT_INLINE XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t);
+XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t);
 
 XBT_PUBLIC(void) xbt_fifo_push_item(xbt_fifo_t, xbt_fifo_item_t);
 XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_pop_item(xbt_fifo_t);
@@ -67,10 +67,8 @@ XBT_PUBLIC(int) xbt_fifo_remove(xbt_fifo_t, void *);
 XBT_PUBLIC(int) xbt_fifo_remove_all(xbt_fifo_t, void *);
 XBT_PUBLIC(void) xbt_fifo_remove_item(xbt_fifo_t, xbt_fifo_item_t);
 
-XBT_INLINE XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_first_item(xbt_fifo_t
-                                                               l);
-XBT_INLINE XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_last_item(xbt_fifo_t
-                                                              l);
+XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_first_item(xbt_fifo_t l);
+XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_last_item(xbt_fifo_t l);
 XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_next_item(xbt_fifo_item_t i);
 XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_get_prev_item(xbt_fifo_item_t i);
 
index 556b0c0..9c5fdbf 100644 (file)
@@ -2,8 +2,8 @@
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -12,7 +12,7 @@
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -86,28 +86,40 @@ XBT_PUBLIC_DATA(char *) graphxml_bufferstack;
 #define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
 XBT_PUBLIC_DATA(AT_graphxml_node_name ) AX_graphxml_node_name;
 #define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
+XBT_PUBLIC_DATA(short ) int graphxml_node_name_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_source ) AX_graphxml_edge_source;
 #define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_source_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_position_y ) AX_graphxml_node_position_y;
 #define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
+XBT_PUBLIC_DATA(short ) int graphxml_node_position_y_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_position_x ) AX_graphxml_node_position_x;
 #define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
+XBT_PUBLIC_DATA(short ) int graphxml_node_position_x_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_data ) AX_graphxml_edge_data;
 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_data_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_target ) AX_graphxml_edge_target;
 #define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_target_isset;
 XBT_PUBLIC_DATA(AT_graphxml_graph_isDirected ) AX_graphxml_graph_isDirected;
 #define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
+XBT_PUBLIC_DATA(short ) int graphxml_graph_isDirected_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_label ) AX_graphxml_node_label;
 #define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
+XBT_PUBLIC_DATA(short ) int graphxml_node_label_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_data ) AX_graphxml_node_data;
 #define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
+XBT_PUBLIC_DATA(short ) int graphxml_node_data_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_label ) AX_graphxml_edge_label;
 #define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_label_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_length ) AX_graphxml_edge_length;
 #define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_length_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_name ) AX_graphxml_edge_name;
 #define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
+XBT_PUBLIC_DATA(short ) int graphxml_edge_name_isset;
 
 /* XML application utilities. */
 XBT_PUBLIC(int ) graphxml_element_context(int);
index 9e3ff4f..8b39e7b 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id $    */
-
 /* Copyright (c) 2006, 2007, 2009, 2010. The SimGrid Team.
  * All rights reserved.                                                     */
 
@@ -29,8 +27,7 @@ extern void_f_void_t ETag_graphxml_edge_fun;
 XBT_PUBLIC(void) xbt_graph_parse_open(const char *file);
 XBT_PUBLIC(void) xbt_graph_parse_close(void);
 XBT_PUBLIC(void) xbt_graph_parse_reset_parser(void);
-XBT_PUBLIC(void) xbt_graph_parse_get_double(double *value,
-                                            const char *string);
+XBT_PUBLIC(double) xbt_graph_parse_get_double(const char *string);
 
 /* Prototypes of the functions offered by flex */
 XBT_PUBLIC(int) xbt_graph_parse_lex(void);
index b4bd66d..6cbc514 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: str.h,v 1.5 2007/05/02 10:08:55 mquinson Exp $ */
-
 /* hash.h - Various hashing functions.                                      */
 
 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
index ab20dfe..b6e9689 100644 (file)
@@ -18,7 +18,7 @@
 /* @brief heap datatype */
 typedef struct xbt_heap *xbt_heap_t;
 
-XBT_PUBLIC(xbt_heap_t) xbt_heap_new(int num,
+XBT_PUBLIC(xbt_heap_t) xbt_heap_new(int init_size,
                                     void_f_pvoid_t const free_func);
 XBT_PUBLIC(void) xbt_heap_free(xbt_heap_t H);
 XBT_PUBLIC(int) xbt_heap_size(xbt_heap_t H);
index a0c04ef..ec5db54 100644 (file)
@@ -1,60 +1,40 @@
+/* xbt/lib.h - api to a generic library                                     */
+
+/* Copyright (c) 2011. 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 _XBT_LIB_H
 #define _XBT_LIB_H
 
-#define MAX_FILL_PERCENT 80
+#include <xbt/dict.h>
 
 SG_BEGIN_DECL()
 
-typedef struct xbt_lib_ *xbt_lib_t;
-typedef struct xbt_libelm_ *xbt_libelm_t;
-typedef struct xbt_lib_cursor_ *xbt_lib_cursor_t;
-typedef struct xbt_lib_cursor_ s_xbt_lib_cursor_t;
-
-struct xbt_lib_cursor_ {
-  xbt_libelm_t current;
-  int line;
-  xbt_lib_t lib;
-};
-
-typedef struct xbt_libelm_ {
-  char *key;
-  int key_len;
-  unsigned int hash_code;
-  xbt_libelm_t next;
-  void *content;
-} s_xbt_libelm_t;
-
-typedef struct xbt_lib_ {
-  int table_size;
-  int count;
-  int fill;
+typedef struct s_xbt_lib {
+  xbt_dict_t dict;
   int levels;
-  void_f_pvoid_t *free_f; // This is actually a table
-  xbt_libelm_t *table;    // This is actually a table
-} s_xbt_lib_t;
+  void_f_pvoid_t *free_f;       /* This is actually a table */
+} s_xbt_lib_t, *xbt_lib_t;
 
+#define xbt_lib_cursor_t xbt_dict_cursor_t
 
-/*####[ Prototypes ]#################################################*/
-XBT_PUBLIC(void) xbt_lib_preinit(void);
-XBT_PUBLIC(void) xbt_lib_postexit(void);
 XBT_PUBLIC(xbt_lib_t) xbt_lib_new(void);
 XBT_PUBLIC(void) xbt_lib_free(xbt_lib_t * lib);
-XBT_PUBLIC(int) xbt_lib_add_level(xbt_lib_t lib, void_f_pvoid_t free_f); // Une fois qu'on a inséré un objet, on ne peut plus ajouter de niveau
-XBT_PUBLIC(void) xbt_lib_set(xbt_lib_t lib, const char *name, int level, void *obj);
-XBT_PUBLIC(void *) xbt_lib_get_or_null(xbt_lib_t lib, const char *name, int level);
-XBT_PUBLIC(int) xbt_lib_length(xbt_lib_t lib);
-XBT_PUBLIC(void) xbt_lib_reset(xbt_lib_t *lib);
-XBT_PUBLIC(void) xbt_lib_cursor_step(xbt_lib_cursor_t cursor);
-XBT_PUBLIC(int) xbt_lib_cursor_get_or_free(xbt_lib_cursor_t * cursor, char **key, void **data);
-XBT_PUBLIC(void) xbt_lib_cursor_first(const xbt_lib_t lib, xbt_lib_cursor_t * cursor);
-XBT_PUBLIC(unsigned int) xbt_lib_size(xbt_lib_t lib);
+XBT_PUBLIC(int) xbt_lib_add_level(xbt_lib_t lib, void_f_pvoid_t free_f);
+XBT_PUBLIC(void) xbt_lib_set(xbt_lib_t lib, const char *name, int level,
+                             void *obj);
+XBT_PUBLIC(void *) xbt_lib_get_or_null(xbt_lib_t lib, const char *name,
+                                       int level);
+
+#define xbt_lib_length(lib) xbt_dict_length((lib)->dict)
 
 /** @def xbt_lib_foreach
     @hideinitializer */
-#define xbt_lib_foreach(lib,cursor,key,data)                       \
-  for (cursor=NULL, xbt_lib_cursor_first((lib),&(cursor)) ;        \
-       xbt_lib_cursor_get_or_free(&(cursor),(char**)&(key),(void**)(&data));\
-       xbt_lib_cursor_step(cursor) )
+#define xbt_lib_foreach(lib, cursor, key, data)         \
+  xbt_dict_foreach((lib)->dict, cursor, key, data)
 
 SG_END_DECL()
 #endif                          /* _XBT_LIB_H */
index 790295e..5df2d07 100644 (file)
@@ -1,6 +1,6 @@
 /* log - a generic logging facility in the spirit of log4j                  */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -241,11 +241,7 @@ typedef struct xbt_log_category_s s_xbt_log_category_t,
 /*
  * Do NOT access any members of this structure directly. FIXME: move to private?
  */
-#ifdef _XBT_WIN32
-#define XBT_LOG_BUFF_SIZE  16384        /* Size of the static string in which we build the log string */
-#else
-#define XBT_LOG_BUFF_SIZE 2048  /* Size of the static string in which we build the log string */
-#endif
+
 struct xbt_log_category_s {
   xbt_log_category_t parent;
   xbt_log_category_t firstChild;
@@ -265,12 +261,8 @@ struct xbt_log_event_s {
   const char *functionName;
   int lineNum;
   va_list ap;
-  va_list ap_copy;              /* need a copy to launch dynamic layouts when the static ones overflowed */
-#ifdef _XBT_WIN32
   char *buffer;
-#else
-  char buffer[XBT_LOG_BUFF_SIZE];
-#endif
+  int buffer_size;
 };
 
 /**
@@ -389,15 +381,6 @@ extern xbt_log_layout_t xbt_log_default_layout;
  * code. 
  * Setting the LogEvent's valist member is done inside _log_logEvent.
  */
-#ifdef _XBT_WIN32
-#include <stdlib.h>             /* calloc */
-#define _XBT_LOG_EV_BUFFER_ZERO() \
-  _log_ev.buffer = (char*) calloc(XBT_LOG_BUFF_SIZE + 1, sizeof(char))
-#else
-#include <string.h>             /* memset */
-#define _XBT_LOG_EV_BUFFER_ZERO() \
-  memset(_log_ev.buffer, 0, XBT_LOG_BUFF_SIZE)
-#endif
 
 /* Logging Macros */
 
@@ -405,9 +388,9 @@ extern xbt_log_layout_t xbt_log_default_layout;
 # define XBT_CLOG(cat, prio, ...) \
   _XBT_IF_ONE_ARG(_XBT_CLOG_ARG1, _XBT_CLOG_ARGN, __VA_ARGS__)(__VA_ARGS__)
 # define _XBT_CLOG_ARG1(f) \
-  fprintf(stderr,"%s:%d:" f, __FILE__, __LINE__)
+  fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__)
 # define _XBT_CLOG_ARGN(f, ...) \
-  fprintf(stderr,"%s:%d:" f, __FILE__, __LINE__, __VA_ARGS__)
+  fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__, __VA_ARGS__)
 # define XBT_LOG(...) XBT_CLOG(0, __VA_ARGS__)
 #else
 # define XBT_CLOG_(catv, prio, ...)                                     \
@@ -419,7 +402,6 @@ extern xbt_log_layout_t xbt_log_default_layout;
       _log_ev.fileName = __FILE__;                                      \
       _log_ev.functionName = _XBT_FUNCTION;                             \
       _log_ev.lineNum = __LINE__;                                       \
-      _XBT_LOG_EV_BUFFER_ZERO();                                        \
       _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
     }                                                                   \
   }  while (0)
index f661994..b2e66dc 100644 (file)
 
 SG_BEGIN_DECL()
 
-/** @addtogroup XBT_parmap
-  * @brief Parallel map.
+/** \addtogroup XBT_parmap
+  * \brief Parallel map.
   *
-  * A function is applied to all the elements of a dynar in parallel
-  * using threads. The threads are persistent until the destruction
-  * of the parmap object.
-  * @{
+  * A function is applied to all elements of a dynar in parallel with n worker
+  * threads.
+  * The worker threads are persistent until the destruction of the parmap.
+  *
+  * If there are more than n elements in the dynar, the worker threads are
+  * allowed to fetch themselves remaining work with xbt_parmap_next() and
+  * execute it.
+  *
+  * \{
   */
-  /** \brief Queue data type (opaque type) */
 
+/** \brief Parallel map data type (opaque type) */
 typedef struct s_xbt_parmap *xbt_parmap_t;
 
-XBT_PUBLIC(xbt_parmap_t) xbt_parmap_new(unsigned int num_workers);
+/**
+ * \brief Synchronization mode of the worker threads of a parmap.
+ */
+typedef enum {
+  XBT_PARMAP_POSIX,          /**< use POSIX synchronization primitives */
+  XBT_PARMAP_FUTEX,          /**< use Linux futex system call */
+  XBT_PARMAP_BUSY_WAIT       /**< busy waits (no system calls, maximum CPU usage) */
+} e_xbt_parmap_mode_t;
+
+XBT_PUBLIC(xbt_parmap_t) xbt_parmap_new(unsigned int num_workers,
+    e_xbt_parmap_mode_t mode);
+XBT_PUBLIC(void) xbt_parmap_destroy(xbt_parmap_t parmap);
 
 XBT_PUBLIC(void) xbt_parmap_apply(xbt_parmap_t parmap,
                                   void_f_pvoid_t fun,
                                   xbt_dynar_t data);
+XBT_PUBLIC(void*) xbt_parmap_next(xbt_parmap_t parmap);
 
-XBT_PUBLIC(void) xbt_parmap_destroy(xbt_parmap_t parmap);
-
-/** @} */
+/** \} */
 
 SG_END_DECL()
 
index 9084a5c..3b83e7f 100644 (file)
 SG_BEGIN_DECL()
 
 /** @addtogroup XBT_queue
-  * @brief Synchronized message exchanging queue.
+  * \brief Synchronized message exchanging queue.
   *
-  * These is the classical producer/consumer synchronization scheme, which all concurrent programmer recode one day or another.
+  * These is the classical producer/consumer synchronization scheme, 
+  * which all concurrent programmer recode one day or another.
+  *
+  * The good thing of this implementation is that it works seamlessly
+  * in your universe. When using one of the classical simulation
+  * interface (such as MSG), it achieves the synchronization on top
+  * of the simulator. If you use instead the real life implementation
+  * comming with GRAS, it uses the synchronization of your OS
+  * (whatever could it be). The choice is done at link time.
   *  
   * For performance concerns, the content of queue must be homogeneous, 
-  * just like dynars (see the \ref XBT_dynar section). Indeed, queues use a 
+  * just like dynars (see the \ref XBT_dynar section). Actually, queues use a 
   * dynar to store the data, and add the synchronization on top of it. 
   * 
   * @{
index 225ef42..aa15a11 100644 (file)
@@ -41,7 +41,7 @@ XBT_PUBLIC(char *) xbt_str_join_array(const char *const *strs, const char *sep);
 
 /* */
 XBT_PUBLIC(void) xbt_str_subst(char *str, char from, char to, int amount);
-XBT_PUBLIC(char *) xbt_str_varsubst(char *str, xbt_dict_t patterns);
+XBT_PUBLIC(char *) xbt_str_varsubst(const char *str, xbt_dict_t patterns);
 
 /* */
 XBT_PUBLIC(void) xbt_str_strip_spaces(char *);
index 021de28..d3f9636 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: buff.h 3483 2007-05-07 11:18:56Z mquinson $ */
-
 /* strbuff -- string buffers                                                */
 
 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
@@ -28,9 +26,9 @@ typedef struct {
 
 XBT_PUBLIC(void) xbt_strbuff_empty(xbt_strbuff_t b);
 XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(void);
-XBT_INLINE XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(char *s);
+XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(const char *s);
 XBT_PUBLIC(void) xbt_strbuff_free(xbt_strbuff_t b);
-XBT_INLINE XBT_PUBLIC(void) xbt_strbuff_free_container(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_free_container(xbt_strbuff_t b);
 XBT_PUBLIC(void) xbt_strbuff_append(xbt_strbuff_t b, const char *toadd);
 XBT_PUBLIC(void) xbt_strbuff_chomp(xbt_strbuff_t b);
 XBT_PUBLIC(void) xbt_strbuff_trim(xbt_strbuff_t b);
index 1407b52..fa29a5a 100644 (file)
@@ -88,7 +88,14 @@ typedef struct xbt_swag {
 
 XBT_PUBLIC(xbt_swag_t) xbt_swag_new(size_t offset);
 XBT_PUBLIC(void) xbt_swag_free(xbt_swag_t swag);
-XBT_INLINE XBT_PUBLIC(void) xbt_swag_init(xbt_swag_t swag, size_t offset);
+XBT_PUBLIC(void) xbt_swag_init(xbt_swag_t swag, size_t offset);
+
+/**
+ * \brief Makes a swag empty.
+ * \param swag a swag
+ * @hideinitializer
+ */
+#define xbt_swag_reset(swag) do {} while(xbt_swag_extract(swag))
 
 /**
  * \param obj the objet to insert in the swag
@@ -105,15 +112,9 @@ XBT_PUBLIC(void *) xbt_swag_remove(void *obj, xbt_swag_t swag);
 XBT_PUBLIC(void *) xbt_swag_extract(xbt_swag_t swag);
 XBT_PUBLIC(int) xbt_swag_size(xbt_swag_t swag);
 
-#define xbt_swag_getPrev(obj,offset) (((xbt_swag_hookup_t)(((char *) (obj)) + (offset)))->prev)
-#define xbt_swag_getNext(obj,offset) (((xbt_swag_hookup_t)(((char *) (obj)) + (offset)))->next)
-
-static XBT_INLINE int xbt_swag_belongs(void *obj, xbt_swag_t swag)
-{
-  return ((xbt_swag_getNext(obj, swag->offset))
-          || (xbt_swag_getPrev(obj, swag->offset))
-          || (swag->head == obj));
-}
+#define xbt_swag_getPrev(obj, offset) (((xbt_swag_hookup_t)(((char *) (obj)) + (offset)))->prev)
+#define xbt_swag_getNext(obj, offset) (((xbt_swag_hookup_t)(((char *) (obj)) + (offset)))->next)
+#define xbt_swag_belongs(obj, swag) (xbt_swag_getNext((obj), (swag)->offset) || (swag)->tail == (obj))
 
 static XBT_INLINE void *xbt_swag_getFirst(xbt_swag_t swag)
 {
index 5a270d3..51fee8e 100644 (file)
@@ -29,44 +29,84 @@ SG_BEGIN_DECL()
  * 
  *  @{
  */
-  /** \brief Thread data type (opaque structure) */
+  /** @brief Thread data type (opaque object)
+   *  @hideinitializer
+   */
 typedef struct s_xbt_thread_ *xbt_thread_t;
 
+/** @brief Creates a new thread.
+ * 
+ * @param name          the name used in the logs for the newly created thread
+ * @param start_routine function to run
+ * @param param         parameter to pass to the function to run
+ * @param joinable      whether the new thread should be started joinable or detached
+ */
 XBT_PUBLIC(xbt_thread_t) xbt_thread_create(const char *name,
                                            void_f_pvoid_t start_routine,
                                            void *param, int joinable);
+
+/** @brief Get a reference to the currently running thread */
 XBT_PUBLIC(xbt_thread_t) xbt_thread_self(void);
+
+/** @brief Get the name of a given thread */
 XBT_PUBLIC(const char *) xbt_thread_name(xbt_thread_t t);
+
+/** @brief Get a reference to the name of the currently running thread */
 XBT_PUBLIC(const char *) xbt_thread_self_name(void);
-  /* xbt_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */
+
+/** @brief Wait for the termination of the given thread, and free it (ie the XBT wrapper around it, the OS frees the rest) */
 XBT_PUBLIC(void) xbt_thread_join(xbt_thread_t thread);
-  /* Ends the life of the poor victim (not always working if it's computing, but working if it's blocked in the OS) */
+
+/** @brief Ends the life of the poor victim (not always working if it's computing, but working if it's blocked in the OS) */
 XBT_PUBLIC(void) xbt_thread_cancel(xbt_thread_t thread);
-  /* suicide */
+
+/** @brief commit suicide */
 XBT_PUBLIC(void) xbt_thread_exit(void);
-  /* current thread pass control to any possible thread wanting it */
+
+/** @brief the current thread passes control to any possible thread wanting it */
 XBT_PUBLIC(void) xbt_thread_yield(void);
 
 
-  /** \brief Thread mutex data type (opaque structure) */
+
+/** @brief Thread mutex data type (opaque object)
+ *  @hideinitializer
+ */
 typedef struct s_xbt_mutex_ *xbt_mutex_t;
 
+/** @brief Creates a new mutex variable */
 XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init(void);
+
+/** @brief Blocks onto the given mutex variable */
 XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex);
+
+/** @brief Releases the given mutex variable */
 XBT_PUBLIC(void) xbt_mutex_release(xbt_mutex_t mutex);
+
+/** @brief Blocks onto the given mutex variable, but only for the given amount of time. a timeout exception is raised if it was impossible to acquire it in the given time frame */
 XBT_PUBLIC(void) xbt_mutex_timedacquire(xbt_mutex_t mutex, double delay);
+
+/** @brief Destroyes the given mutex variable */
 XBT_PUBLIC(void) xbt_mutex_destroy(xbt_mutex_t mutex);
 
 
-  /** \brief Thread condition data type (opaque structure) */
+/** @brief Thread condition data type (opaque object)
+ *  @hideinitializer
+ */
 typedef struct s_xbt_cond_ *xbt_cond_t;
 
+/** @brief Creates a condition variable */
 XBT_PUBLIC(xbt_cond_t) xbt_cond_init(void);
+
+/** @brief Blocks onto the given condition variable */
 XBT_PUBLIC(void) xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex);
+/** @brief Blocks onto the given condition variable, but only for the given amount of time. a timeout exception is raised if it was impossible to acquire it in the given time frame */
 XBT_PUBLIC(void) xbt_cond_timedwait(xbt_cond_t cond,
                                     xbt_mutex_t mutex, double delay);
+/** @brief Signals the given mutex variable */
 XBT_PUBLIC(void) xbt_cond_signal(xbt_cond_t cond);
+/** @brief Broadcasts the given mutex variable */
 XBT_PUBLIC(void) xbt_cond_broadcast(xbt_cond_t cond);
+/** @brief Destroys the given mutex variable */
 XBT_PUBLIC(void) xbt_cond_destroy(xbt_cond_t cond);
 
 /** @} */
index adc9022..696dd69 100644 (file)
@@ -128,9 +128,7 @@ void *xbt_realloc(void *p, size_t s)
       res = xbt_malloc(s);
     }
   } else {
-    if (p) {
-      free(p);
-    }
+    free(p);
   }
   return res;
 }
@@ -144,7 +142,6 @@ void *xbt_realloc(void *p, size_t s)
 /** @brief like free
     @hideinitializer */
 #define xbt_free free           /*nothing specific to do here. A poor valgrind replacement? */
-/*#define xbt_free_fct free * replacement with the guareenty of being a function  FIXME:KILLME*/
 
 /** @brief like free, but you can be sure that it is a function  */
 XBT_PUBLIC(void) xbt_free_f(void *p);
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644 (file)
index 68063f7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.classes
-context_sysv_config.h
-gras_config.h
-libgras.la
-libsimgrid.la
-libsmpi.la
-smpi/smpicc
-smpi/smpirun
-stamp-h1
-testall
index 9364c2e..6372a56 100644 (file)
@@ -141,8 +141,8 @@ void amok_bw_test(gras_socket_t peer,
 {
 
   /* Measurement sockets for the experiments */
-  gras_socket_t measMasterIn = NULL, measIn, measOut = NULL;
-  int port;
+  volatile gras_socket_t measMasterIn = NULL, measIn, measOut = NULL;
+  volatile int port;
   bw_request_t request, request_ack;
   xbt_ex_t e;
   int first_pass;
@@ -289,8 +289,8 @@ void amok_bw_test(gras_socket_t peer,
 int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t ctx, void *payload)
 {
   gras_socket_t expeditor = gras_msg_cb_ctx_from(ctx);
-  gras_socket_t measMasterIn = NULL, measIn = NULL, measOut = NULL;
-  bw_request_t request = *(bw_request_t *) payload;
+  volatile gras_socket_t measMasterIn = NULL,  measIn = NULL, measOut = NULL;
+  volatile bw_request_t request = *(bw_request_t *) payload;
   bw_request_t answer;
   xbt_ex_t e;
   int port;
index 78e022e..0f61258 100644 (file)
@@ -129,7 +129,7 @@ static int amok_bw_cb_sat_start(gras_msg_cb_ctx_t ctx, void *payload)
  * each of the messages occupy the connexion one second
  */
 void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
-                            unsigned int msg_size, double duration,
+                            volatile unsigned int msg_size, double duration,
                             /*out */ double *elapsed_res, double *bw_res)
 {
 
@@ -142,7 +142,7 @@ void amok_bw_saturate_begin(const char *to_name, unsigned int to_port,
 
   s_gras_msg_t msg_got;
 
-  unsigned int packet_sent = 0;
+  volatile unsigned int packet_sent = 0;
   double start, elapsed = -1;   /* timer */
   double bw;
 
@@ -263,10 +263,10 @@ static int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload)
   sat_request_t answer = xbt_new0(s_sat_request_t, 1);
   volatile int saturate_further = 1;
   xbt_ex_t e;
-  gras_socket_t measMaster = NULL, meas = NULL;
-  gras_socket_t from = gras_msg_cb_ctx_from(ctx);
+  volatile gras_socket_t measMaster = NULL, meas = NULL;
+  volatile gras_socket_t from = gras_msg_cb_ctx_from(ctx);
 
-  int port = 6000;
+  volatile int port = 6000;
   while (port <= 10000 && measMaster == NULL) {
     TRY {
       measMaster = gras_socket_server_ext(port, 0 /*bufsize: auto */ ,
index 704b72e..1f02fe0 100644 (file)
@@ -261,7 +261,7 @@ static void _amok_pm_join(void *p)
   mod->groups = NULL;
 
   mod->done = 0;
-  mod->groups = xbt_dict_new();
+  mod->groups = xbt_dict_new_homogeneous(NULL);
 
   /* callbacks */
   gras_cb_register("amok_pm_kill", &amok_pm_cb_kill);
@@ -283,8 +283,7 @@ static void _amok_pm_leave(void *p)
   /* moddata */
   amok_pm_moddata_t mod = (amok_pm_moddata_t) p;
 
-  if (mod->groups)
-    xbt_dict_free(&mod->groups);
+  xbt_dict_free(&mod->groups);
 
   /* callbacks */
   gras_cb_unregister("amok_pm_kill", &amok_pm_cb_kill);
index eeda51d..50f48e4 100644 (file)
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid_lua.h"
+#include "simgrid/platf.h"
 #include <string.h>
 #include <ctype.h>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua_console, bindings, "Lua Bindings");
 
-
-//AS List
-static xbt_dynar_t as_list_d;
-
-/*
- * Initialize platform model routing
- */
-
-static void create_AS(const char *id, const char *mode)
-{
-  surf_AS_new(id, mode);
+int console_open(lua_State *L) {
+  sg_platf_init();
+  sg_platf_begin();
+  surf_parse_init_callbacks();
+  return 0;
 }
 
-/**
- * create host resource via CPU model [for MSG]
- */
-
-static void create_host(const char *id, double power_peak, double power_sc,
-                        const char *power_tr,int core,int state_init,
-                        const char *state_tr,xbt_dict_t properties)
-{
-  double power_scale = 1.0;
-  int core_nb = 1; //default value
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial;
-  tmgr_trace_t state_trace;
-  if (power_sc)                 // !=0
-    power_scale = power_sc;
-  if (core)
-         core_nb = core; //default value
-  if (state_init == -1)
-    state_initial = SURF_RESOURCE_OFF;
-  else
-    state_initial = SURF_RESOURCE_ON;
-  if (power_tr)
-    power_trace = tmgr_trace_new(power_tr);
-  else
-    power_trace = tmgr_trace_new("");
-  if (state_tr)
-    state_trace = tmgr_trace_new(state_tr);
-  else
-    state_trace = tmgr_trace_new("");
-
-  surf_host_create_resource(xbt_strdup(id), power_peak, power_scale,
-                            power_trace, core_nb, state_initial, state_trace,
-                            properties);
+int console_close(lua_State *L) {
+  sg_platf_end();
+  sg_platf_exit();
+  return 0;
 }
 
-/**
- * create link resource via network model
- */
-static void create_link(const char *name,
-                        double bw_initial, const char *trace,
-                        double lat_initial, const char *latency_trace,
-                        int state_init, const char *state_trace,
-                        int policy)
-{
-  tmgr_trace_t bw_trace;
-  tmgr_trace_t lat_trace;
-  e_surf_resource_state_t state_initial_link = SURF_RESOURCE_ON;
-  e_surf_link_sharing_policy_t policy_initial_link = SURF_LINK_SHARED;
-  tmgr_trace_t st_trace;
-  if (trace)
-    bw_trace = tmgr_trace_new(trace);
-  else
-    bw_trace = tmgr_trace_new("");
+int console_add_host(lua_State *L) {
+  s_sg_platf_host_cbarg_t host;
+  memset(&host,0,sizeof(host));
+  int state;
 
-  if (latency_trace)
-    lat_trace = tmgr_trace_new(latency_trace);
-  else
-    lat_trace = tmgr_trace_new("");
+  // we get values from the table passed as argument
+  if (!lua_istable(L, -1)) {
+    XBT_ERROR
+        ("Bad Arguments to create host, Should be a table with named arguments");
+    return -1;
+  }
 
-  if (state_trace)
-    st_trace = tmgr_trace_new(state_trace);
+  // get Id Value
+  lua_pushstring(L, "id");
+  lua_gettable(L, -2);
+  host.id = lua_tostring(L, -1);
+  lua_pop(L, 1);
+
+  // get power value
+  lua_pushstring(L, "power");
+  lua_gettable(L, -2);
+  host.power_peak = lua_tonumber(L, -1);
+  lua_pop(L, 1);
+
+  //get power_scale
+  lua_pushstring(L, "power_scale");
+  lua_gettable(L, -2);
+  host.power_scale = lua_tonumber(L, -1);
+  lua_pop(L, 1);
+
+  //get power_trace
+  lua_pushstring(L, "power_trace");
+  lua_gettable(L, -2);
+  host.power_trace = tmgr_trace_new(lua_tostring(L, -1));
+  lua_pop(L, 1);
+
+  lua_pushstring(L, "core");
+  lua_gettable(L, -2);
+  host.core_amount = lua_tonumber(L, -1);
+  if (host.core_amount == 0)
+    host.core_amount = 1;
+  lua_pop(L, 1);
+
+  //get state initial
+  lua_pushstring(L, "state_initial");
+  lua_gettable(L, -2);
+  state = lua_tonumber(L, -1);
+  lua_pop(L, 1);
+  if (state)
+    host.initial_state = SURF_RESOURCE_ON;
   else
-    st_trace = tmgr_trace_new("");
+    host.initial_state = SURF_RESOURCE_OFF;
 
-  if (state_init == -1)
-    state_initial_link = SURF_RESOURCE_OFF;
-  if (policy == -1)
-    policy_initial_link = SURF_LINK_FATPIPE;
+  //get trace state
+  lua_pushstring(L, "state_trace");
+  lua_gettable(L, -2);
+  host.state_trace = tmgr_trace_new(lua_tostring(L, -1));
+  lua_pop(L, 1);
 
-  surf_link_create_resource(xbt_strdup(name), bw_initial, bw_trace,
-                            lat_initial, lat_trace, state_initial_link,
-                            st_trace, policy_initial_link, xbt_dict_new());
-}
+  sg_platf_new_host(&host);
 
-/*
- *create host resource via workstation_ptask_L07 model [for SimDag]
- */
-static void create_host_wsL07(const char *id, double power_peak,
-                              double power_sc, const char *power_tr,
-                              int state_init, const char *state_tr)
-{
-  double power_scale = 1.0;
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial;
-  tmgr_trace_t state_trace;
-  if (power_sc)                 // !=0
-    power_scale = power_sc;
-  if (state_init == -1)
-    state_initial = SURF_RESOURCE_OFF;
-  else
-    state_initial = SURF_RESOURCE_ON;
-  if (power_tr)
-    power_trace = tmgr_trace_new(power_tr);
-  else
-    power_trace = tmgr_trace_new("");
-  if (state_tr)
-    state_trace = tmgr_trace_new(state_tr);
-  else
-    state_trace = tmgr_trace_new("");
-
-  surf_wsL07_host_create_resource(xbt_strdup(id), power_peak, power_scale,
-                                  power_trace, state_initial, state_trace,
-                                  current_property_set);
-  current_property_set = NULL;
+  return 0;
 }
 
-/**
- * create link resource via workstation_ptask_L07 model [for SimDag]
- */
+int  console_add_link(lua_State *L) {
+  s_sg_platf_link_cbarg_t link;
+  memset(&link,0,sizeof(link));
 
-static void create_link_wsL07(const char *name,
-                              double bw_initial, const char *trace,
-                              double lat_initial,
-                              const char *latency_trace, int state_init,
-                              const char *state_trace, int policy)
-{
-  tmgr_trace_t bw_trace;
-  tmgr_trace_t lat_trace;
-  e_surf_resource_state_t state_initial_link = SURF_RESOURCE_ON;
-  e_surf_link_sharing_policy_t policy_initial_link = SURF_LINK_SHARED;
-  tmgr_trace_t st_trace;
-  if (trace)
-    bw_trace = tmgr_trace_new(trace);
-  else
-    bw_trace = tmgr_trace_new("");
+  const char* policy;
 
-  if (latency_trace)
-    lat_trace = tmgr_trace_new(latency_trace);
-  else
-    lat_trace = tmgr_trace_new("");
+  if (! lua_istable(L, -1)) {
+    XBT_ERROR("Bad Arguments to create link, Should be a table with named arguments");
+    return -1;
+  }
 
-  if (state_trace)
-    st_trace = tmgr_trace_new(state_trace);
+  // get Id Value
+  lua_pushstring(L, "id");
+  lua_gettable(L, -2);
+  link.id = lua_tostring(L, -1);
+  lua_pop(L, 1);
+
+  // get bandwidth value
+  lua_pushstring(L, "bandwidth");
+  lua_gettable(L, -2);
+  link.bandwidth = lua_tonumber(L, -1);
+  lua_pop(L, 1);
+
+  //get latency value
+  lua_pushstring(L, "latency");
+  lua_gettable(L, -2);
+  link.latency = lua_tonumber(L, -1);
+  lua_pop(L, 1);
+
+  /*Optional Arguments  */
+
+  //get bandwidth_trace value
+  lua_pushstring(L, "bandwidth_trace");
+  lua_gettable(L, -2);
+  link.bandwidth_trace = tmgr_trace_new(lua_tostring(L, -1));
+  lua_pop(L, 1);
+
+  //get latency_trace value
+  lua_pushstring(L, "latency_trace");
+  lua_gettable(L, -2);
+  link.latency_trace = tmgr_trace_new(lua_tostring(L, -1));
+  lua_pop(L, 1);
+
+  //get state_trace value
+  lua_pushstring(L, "state_trace");
+  lua_gettable(L, -2);
+  link.state_trace = tmgr_trace_new(lua_tostring(L, -1));
+  lua_pop(L, 1);
+
+  //get state_initial value
+  lua_pushstring(L, "state_initial");
+  lua_gettable(L, -2);
+  if (lua_tonumber(L, -1))
+    link.state = SURF_RESOURCE_ON;
   else
-    st_trace = tmgr_trace_new("");
-
-  if (state_init == -1)
-    state_initial_link = SURF_RESOURCE_OFF;
-  if (policy == -1)
-    policy_initial_link = SURF_LINK_FATPIPE;
-
-  surf_wsL07_link_create_resource(xbt_strdup(name), bw_initial, bw_trace,
-                                  lat_initial, lat_trace,
-                                  state_initial_link, st_trace,
-                                  policy_initial_link, xbt_dict_new());
-}
-
-
-/*
- * Append new AS to the Platform
- */
-
-static int AS_new(lua_State * L)
-{
-
-   if (xbt_dynar_is_empty(as_list_d))
-           as_list_d = xbt_dynar_new(sizeof(p_AS_attr), &xbt_free_ref);
-
-  p_AS_attr AS;
-  const char *id;
-  const char *mode;
-  if (lua_istable(L, 1)) {
-    lua_pushstring(L, "id");
-    lua_gettable(L, -2);
-    id = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    lua_pushstring(L, "mode");
-    lua_gettable(L, -2);
-    mode = lua_tostring(L, -1);
-    lua_pop(L, 1);
+    link.state = SURF_RESOURCE_OFF;
+  lua_pop(L, 1);
+
+  //get policy value
+  lua_pushstring(L, "policy");
+  lua_gettable(L, -2);
+  policy = lua_tostring(L, -1);
+  lua_pop(L, 1);
+  if (policy && !strcmp(policy,"FULLDUPLEX")) {
+    link.policy = SURF_LINK_FULLDUPLEX;
+  } else if (policy && !strcmp(policy,"FATPIPE")) {
+    link.policy = SURF_LINK_FATPIPE;
   } else {
-    XBT_ERROR
-        ("Bad Arguments to AS.new, Should be a table with named arguments");
-    return -1;
+    link.policy = SURF_LINK_SHARED;
   }
-  AS = malloc(sizeof(AS_attr));
-  AS->id = id;
-  AS->mode = mode;
-  AS->host_list_d = xbt_dynar_new(sizeof(p_host_attr),&xbt_free_ref);
-  AS->link_list_d = xbt_dynar_new(sizeof(p_link_attr),&xbt_free_ref);
-  AS->route_list_d = xbt_dynar_new(sizeof(p_route_attr),&xbt_free_ref);
-  AS->router_list_d = xbt_dynar_new(sizeof(p_router_attr),&xbt_free_ref);
-  AS->sub_as_list_id = xbt_dynar_new(sizeof(p_AS_attr),&xbt_free_ref);
-  xbt_dynar_push(as_list_d, &AS);
+
+  sg_platf_new_link(&link);
 
   return 0;
 }
-
 /**
- * add sub AS to the Parent AS
- */
-static int AS_add(lua_State *L)
-{
-       unsigned int i;
-       p_AS_attr AS;
-       p_AS_attr super_as,p_as;
-       const char *super_AS_id;
-       const char *sub_AS_id = NULL;
-       const char *sub_AS_routing= NULL;
-       if(lua_istable(L, -1))
-       {
-               lua_pushstring(L, "AS");
-               lua_gettable(L, -2);
-               super_AS_id = lua_tostring(L, -1);
-               lua_pop(L,1);
-
-               lua_pushstring(L, "id");
-               lua_gettable(L, -2);
-               sub_AS_id = lua_tostring(L, -1);
-               lua_pop(L,1);
-
-       }
-
-       xbt_dynar_foreach(as_list_d, i, p_as){
-                 if (p_as->id == super_AS_id){
-                         super_as = p_as;
-                         break;
-                 }
-       }
-       AS = malloc(sizeof(AS_attr));
-       AS->id = sub_AS_id;
-       AS->mode = sub_AS_routing;
-       AS->host_list_d = xbt_dynar_new(sizeof(p_host_attr),&xbt_free_ref);
-       AS->link_list_d = xbt_dynar_new(sizeof(p_link_attr),&xbt_free_ref);
-       AS->route_list_d = xbt_dynar_new(sizeof(p_route_attr),&xbt_free_ref);
-       AS->sub_as_list_id = xbt_dynar_new(sizeof(p_AS_attr),&xbt_free_ref);
-       xbt_dynar_push(super_as->sub_as_list_id, &AS);
-
-       return 0;
-}
-
-
-/*
- * add new host to platform hosts list
+ * add Router to AS components
  */
-static int Host_new(lua_State * L)
-{
-  p_host_attr host;
-  unsigned int i;
-  p_AS_attr p_as,current_as = NULL;
-  const char *AS_id;
-  const char *id;
-  const char *power_trace;
-  const char *state_trace;
-  double power, power_scale;
-  int state_initial,core;
-  //get values from the table passed as argument
-  if (lua_istable(L, -1)) {
-       // get AS id
-       lua_pushstring(L, "AS");
-       lua_gettable(L, -2);
-       AS_id = lua_tostring(L, -1);
-       lua_pop(L,1);
-
-    // get Id Value
-    lua_pushstring(L, "id");
-    lua_gettable(L, -2);
-    id = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    // get power value
-    lua_pushstring(L, "power");
-    lua_gettable(L, -2);
-    power = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get power_scale
-    lua_pushstring(L, "power_scale");
-    lua_gettable(L, -2);
-    power_scale = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get power_trace
-    lua_pushstring(L, "power_trace");
-    lua_gettable(L, -2);
-    power_trace = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    lua_pushstring(L, "core");
-    lua_gettable(L, -2);
-    core = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get state initial
-    lua_pushstring(L, "state_initial");
-    lua_gettable(L, -2);
-    state_initial = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get trace state
-    lua_pushstring(L, "state_trace");
-    lua_gettable(L, -2);
-    state_trace = lua_tostring(L, -1);
-    lua_pop(L, 1);
+int console_add_router(lua_State* L) {
+  s_sg_platf_router_cbarg_t router;
+  memset(&router,0,sizeof(router));
 
-  } else {
-    XBT_ERROR
-        ("Bad Arguments to create host, Should be a table with named arguments");
+  if (! lua_istable(L, -1)) {
+    XBT_ERROR("Bad Arguments to create router, Should be a table with named arguments");
     return -1;
   }
-  xbt_dynar_foreach(as_list_d, i, p_as){
-         if (p_as->id == AS_id){
-                 current_as = p_as;
-                 break;
-         }
-  }
 
-  if (!current_as)
-  {
-         XBT_ERROR("No AS_id :%s found",AS_id);
-         return -2;
-  }
+  lua_pushstring(L, "id");
+  lua_gettable(L, -2);
+  router.id = lua_tostring(L, -1);
+  lua_pop(L,1);
 
-  host = malloc(sizeof(host_attr));
-  host->id = id;
-  host->power_peak = power;
-  host->power_scale = power_scale;
-  host->power_trace = power_trace;
-  host->core = core;
-  host->state_initial = state_initial;
-  host->state_trace = state_trace;
-  host->function = NULL;
-  host->properties = xbt_dict_new();
-  xbt_dynar_push(current_as->host_list_d, &host);
+  lua_pushstring(L,"coord");
+  lua_gettable(L,-2);
+  router.coord = lua_tostring(L, -1);
+  lua_pop(L,1);
+
+  sg_platf_new_router(&router);
 
   return 0;
 }
 
-/**
- * add link to AS links list
- */
-static int Link_new(lua_State * L)      // (id,bandwidth,latency)
-{
-  const char *AS_id;
-  unsigned int i;
-  p_AS_attr p_as,current_as = NULL;
-  const char* id;
-  double bandwidth, latency;
-  const char *bandwidth_trace;
-  const char *latency_trace;
-  const char *state_trace;
-  int state_initial, policy;
-
-  //get values from the table passed as argument
-  if (lua_istable(L, -1)) {
-
-       //get AS id
-       lua_pushstring(L, "AS");
-       lua_gettable(L, -2);
-       AS_id = lua_tostring(L, -1);
-       lua_pop(L, 1);
-
-    // get Id Value
-    lua_pushstring(L, "id");
-    lua_gettable(L, -2);
-    id = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    // get bandwidth value
-    lua_pushstring(L, "bandwidth");
-    lua_gettable(L, -2);
-    bandwidth = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get latency value
-    lua_pushstring(L, "latency");
-    lua_gettable(L, -2);
-    latency = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    /*Optional Arguments  */
-
-    //get bandwidth_trace value
-    lua_pushstring(L, "bandwidth_trace");
-    lua_gettable(L, -2);
-    bandwidth_trace = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    //get latency_trace value
-    lua_pushstring(L, "latency_trace");
-    lua_gettable(L, -2);
-    latency_trace = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    //get state_trace value
-    lua_pushstring(L, "state_trace");
-    lua_gettable(L, -2);
-    state_trace = lua_tostring(L, -1);
-    lua_pop(L, 1);
-
-    //get state_initial value
-    lua_pushstring(L, "state_initial");
-    lua_gettable(L, -2);
-    state_initial = lua_tonumber(L, -1);
-    lua_pop(L, 1);
-
-    //get policy value
-    lua_pushstring(L, "policy");
-    lua_gettable(L, -2);
-    policy = lua_tonumber(L, -1);
-    lua_pop(L, 1);
+#include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
 
-  } else {
-    XBT_ERROR
-        ("Bad Arguments to create link, Should be a table with named arguments");
+int console_add_route(lua_State *L) {
+  static int AX_ptr = 0;
+  static int surfxml_bufferstack_size = 2048;
+
+  /* allocating memory for the buffer, I think 2kB should be enough */
+  surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
+
+  const char*src;
+  const char*dst;
+  int is_symmetrical;
+  xbt_dynar_t links;
+  unsigned int cursor;
+  char *link_id;
+
+  if (! lua_istable(L, -1)) {
+    XBT_ERROR("Bad Arguments to create a route, Should be a table with named arguments");
     return -1;
   }
-  xbt_dynar_foreach(as_list_d, i, p_as){
-         if (p_as->id == AS_id){
-                 current_as = p_as;
-                 break;
-         }
-  }
 
-  if (!current_as)
-  {
-         XBT_ERROR("No AS_id :%s found",AS_id);
-         return -2;
+  lua_pushstring(L,"src");
+  lua_gettable(L,-2);
+  src = lua_tostring(L, -1);
+  lua_pop(L,1);
+
+  lua_pushstring(L,"dest");
+  lua_gettable(L,-2);
+  dst = lua_tostring(L, -1);
+  lua_pop(L,1);
+
+  lua_pushstring(L,"links");
+  lua_gettable(L,-2);
+  links = xbt_str_split(lua_tostring(L, -1), ", \t\r\n");
+  if (xbt_dynar_is_empty(links))
+    xbt_dynar_push_as(links,char*,xbt_strdup(lua_tostring(L, -1)));
+  lua_pop(L,1);
+
+  lua_pushstring(L,"symmetrical");
+  lua_gettable(L,-2);
+  is_symmetrical = lua_tointeger(L, -1);
+  lua_pop(L,1);
+
+  /* We are relying on the XML bypassing mechanism since the corresponding sg_platf does not exist yet.
+   * Et ouais mon pote. That's the way it goes. F34R.
+   */
+  SURFXML_BUFFER_SET(route_src, src);
+  SURFXML_BUFFER_SET(route_dst, dst);
+  if (is_symmetrical)
+    A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
+  else
+    A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
+  SURFXML_START_TAG(route);
+
+  xbt_dynar_foreach(links,cursor,link_id) {
+    SURFXML_BUFFER_SET(link_ctn_id, link_id);
+    A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
+    SURFXML_START_TAG(link_ctn);
+    SURFXML_END_TAG(link_ctn);
   }
-  p_link_attr link = malloc(sizeof(link_attr));
-  link->id = id;
-  link->bandwidth = bandwidth;
-  link->latency = latency;
-  link->bandwidth_trace = bandwidth_trace;
-  link->latency_trace = latency_trace;
-  link->state_trace = state_trace;
-  link->state_initial = state_initial;
-  link->policy = policy;
-  xbt_dynar_push(current_as->link_list_d, &link);
+  SURFXML_END_TAG(route);
+
+  xbt_dynar_free(&links);
+  free(surfxml_bufferstack);
 
   return 0;
 }
 
-/**
- * add route to AS routes list
- */
-static int Route_new(lua_State * L)     // (src_id,dest_id,links_number,link_table)
-{
-  const char* AS_id;
-  unsigned int i;
-  p_AS_attr p_as,current_as = NULL;
-  const char *links;
-  const char* link_id;
-  p_route_attr route = malloc(sizeof(route_attr));
-
-
-  if (!lua_istable(L, 4)) { // if Route.new is declared as an indexed table (FIXME : we check the third arg if it's not a table)
-
-        //get AS_id
-        lua_pushstring(L, "AS");
-        lua_gettable(L, -2);
-        AS_id = lua_tostring(L, -1);
-        lua_pop(L, 1);
-
-        xbt_dynar_foreach(as_list_d, i, p_as){
-         if (p_as->id == AS_id){
-                 current_as = p_as;
-                 break;
-         }
-        }
-
-        if (!current_as)
-        {
-         XBT_ERROR("addRoute: No AS_id :%s found",AS_id);
-         return -2;
-        }
-        // get Source Value
-     lua_pushstring(L, "src");
-     lua_gettable(L, -2);
-     route->src_id = lua_tostring(L, -1);
-     lua_pop(L, 1);
-
-     // get Destination Value
-     lua_pushstring(L, "dest");
-     lua_gettable(L, -2);
-     route->dest_id = lua_tostring(L, -1);
-     lua_pop(L, 1);
-
-     // get Links Table (char* to be splited later)
-     lua_pushstring(L, "links");
-     lua_gettable(L, -2);
-     links = lua_tostring(L, -1);
-     lua_pop(L,1);
-
-     route->links_id = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-
-     char *tmp_links = xbt_strdup(links);
-     link_id = strtok(tmp_links,",");   //tmp_link = strtok((char*)links,",");
-     while(link_id != NULL)
-       {
-          xbt_dynar_push(route->links_id, &link_id);
-          link_id = strtok(NULL,","); //Alternatively, a null pointer may be specified, in which case the function continues scanning where a previous successful call to the function ended.
-        }
-     xbt_dynar_push(current_as->route_list_d, &route);
-     return 0;
-      }
-  else { // Route.new is declared as a function
-        AS_id = luaL_checkstring(L, 1);
-        xbt_dynar_foreach(as_list_d, i, p_as){
-                 if (p_as->id == AS_id){
-                         current_as = p_as;
-                         break;
-                 }
-                }
-
-        if (!current_as)
-        {
-               XBT_ERROR("addRoute: No AS_id :%s found",AS_id);
-               return -2;
-        }
-     route->src_id = luaL_checkstring(L, 2);
-     route->dest_id = luaL_checkstring(L, 3);
-     route->links_id = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-     lua_pushnil(L);
-     while (lua_next(L, 4) != 0)
-               {
-        link_id = lua_tostring(L, -1);
-        xbt_dynar_push(route->links_id, &link_id);
-         XBT_DEBUG("index = %f , Link_id = %s \n", lua_tonumber(L, -2),
-        lua_tostring(L, -1));
-        lua_pop(L, 1);
-       }
-    lua_pop(L, 1);
-    //add route to platform's route list
-    xbt_dynar_push(current_as->route_list_d, &route);
-    return 0;
-    }
-
-  return -1;
-}
-/**
- * add Router to AS components
- */
-static int Router_new(lua_State* L)
-{
-       p_router_attr router;
-       const char* AS_id;
-       unsigned int i;
-       p_AS_attr p_as,current_as = NULL;
-       const char* id;
-       if (lua_istable(L, -1)) {
-               // get AS id
-               lua_pushstring(L, "AS");
-               lua_gettable(L, -2);
-               AS_id = lua_tostring(L, -1);
-               lua_pop(L,1);
-
-               lua_pushstring(L, "id");
-               lua_gettable(L, -2);
-               id = lua_tostring(L, -1);
-               lua_pop(L,1);
-       }
-       xbt_dynar_foreach(as_list_d, i, p_as){
-                 if (p_as->id == AS_id){
-                         current_as = p_as;
-                         break;
-                 }
-         }
-
-         if (!current_as)
-         {
-                 XBT_ERROR("No AS_id :%s found",AS_id);
-                 return -2;
-         }
-       router = malloc(sizeof(router_attr));
-       router->id = id;
-       xbt_dynar_push(current_as->router_list_d, &router);
-       return 0;
+int console_AS_open(lua_State *L) {
+ const char *id;
+ const char *mode;
 
-}
+ if (! lua_istable(L, 1)) {
+   XBT_ERROR("Bad Arguments to AS_open, Should be a table with named arguments");
+   return -1;
+ }
 
-/**
- * set function to process
- */
-static int Host_set_function(lua_State * L)     //(host,function,nb_args,list_args)
-{
-       p_AS_attr p_as;
-       p_host_attr p_host;
-       unsigned int i,j;
-       const char *host_id ;
-       const char *function_id;
-       const char *args;
-       char * tmp_arg;
-
-   if (lua_istable(L, -1)) {
-        // get Host id
-        lua_pushstring(L, "host");
-        lua_gettable(L, -2);
-        host_id = lua_tostring(L, -1);
-        lua_pop(L, 1);
-        // get Function Name
-        lua_pushstring(L, "fct");
-        lua_gettable(L, -2);
-     function_id = lua_tostring(L, -1);
-     lua_pop(L, 1);
-     //get args
-     lua_pushstring(L,"args");
-     lua_gettable(L, -2);
-     args = lua_tostring(L,-1);
-     lua_pop(L, 1);
-   }
-   else {
-          XBT_ERROR("Bad Arguments to create link, Should be a table with named arguments");
-          return -1;
-   }
-
-  // look for the index of host in host_list for each AS
-   xbt_dynar_foreach(as_list_d, i, p_as)
-   {
-          xbt_dynar_foreach(p_as->host_list_d, j, p_host) {
-                  if (p_host->id == host_id) {
-                          p_host->function = function_id;
-                          p_host->args_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-                          // split & fill the args list
-                          tmp_arg = strtok((char*)args,",");
-                          while (tmp_arg != NULL) {
-                                  xbt_dynar_push(p_host->args_list, &tmp_arg);
-                                  tmp_arg = strtok(NULL,",");
-                          }
-                          return 0;
-                  }
-       }
-   }
-         XBT_ERROR("Host : %s Not Found !!", host_id);
-         return 1;
+ lua_pushstring(L, "id");
+ lua_gettable(L, -2);
+ id = lua_tostring(L, -1);
+ lua_pop(L, 1);
 
-}
+ lua_pushstring(L, "mode");
+ lua_gettable(L, -2);
+ mode = lua_tostring(L, -1);
+ lua_pop(L, 1);
 
-static int Host_set_property(lua_State* L)
-{
-       p_AS_attr p_as;
-       p_host_attr p_host;
-       unsigned int i,j;
-       const char* host_id ="";
-       const char* prop_id = "";
-       const char* prop_value = "";
-       if (lua_istable(L, -1)) {
-                // get Host id
-                lua_pushstring(L, "host");
-                lua_gettable(L, -2);
-                host_id = lua_tostring(L, -1);
-                lua_pop(L, 1);
-                // get Function Name
-                lua_pushstring(L, "prop_id");
-                lua_gettable(L, -2);
-            prop_id = lua_tostring(L, -1);
-            lua_pop(L, 1);
-            //get args
-            lua_pushstring(L,"prop_value");
-            lua_gettable(L, -2);
-            prop_value = lua_tostring(L,-1);
-            lua_pop(L, 1);
-        }
-       xbt_dynar_foreach(as_list_d, i, p_as)
-          {
-                  xbt_dynar_foreach(p_as->host_list_d, j, p_host) {
-                          if (p_host->id == host_id) {
-                                  xbt_dict_set(p_host->properties, prop_id, xbt_strdup(prop_value), free);
-                          }
-                  }
-      }
-       return 1;
+ sg_platf_new_AS_begin(id,mode);
 
+ return 0;
 }
-/*
- * surf parse bypass platform
- * through CPU/network Models
- */
-
-static int surf_parse_bypass_platform()
-{
-  unsigned int i,j;
-  p_AS_attr p_as;
-  p_host_attr p_host;
-  p_link_attr p_link;
-  p_route_attr p_route;
-
-
-  // Add AS
-  xbt_dynar_foreach(as_list_d, i,p_as)
-  {
-         create_AS(p_as->id, p_as->mode);
-         // add associated Hosts
-         xbt_dynar_foreach(p_as->host_list_d, j, p_host){
-                 create_host(p_host->id, p_host->power_peak, p_host->power_scale,
-                                 p_host->power_trace, p_host->core, p_host->state_initial,
-                                 p_host->state_trace, p_host->properties);
-
-
-                  //add to routing model host list
-                  surf_route_add_host((char *) p_host->id);
-         }
-         // add associated Links
-         xbt_dynar_foreach(p_as->link_list_d, j, p_link){
-                 create_link(p_link->id, p_link->bandwidth, p_link->bandwidth_trace,
-                                 p_link->latency, p_link->latency_trace,
-                                 p_link->state_initial, p_link->state_trace,
-                                 p_link->policy);
-         }
-         // add associated Routes
-         xbt_dynar_foreach(p_as->route_list_d, j, p_route){
-                 surf_routing_add_route((char *) p_route->src_id,
-                                            (char *) p_route->dest_id, p_route->links_id);
-         }
-
-         // Finalize AS
-         surf_AS_finalize(p_as->id);
-  }
-
-  // add traces
-  surf_add_host_traces();
-  surf_add_link_traces();
-
-  return 0;                     // must return 0 ?!!
-
+int console_AS_close(lua_State *L) {
+  sg_platf_new_AS_end();
+  return 0;
 }
 
-/**
- *
- * surf parse bypass platform
- * through workstation_ptask_L07 Model
- */
+int console_set_function(lua_State *L) {
 
-static int surf_wsL07_parse_bypass_platform()
-{
-  unsigned int i,j;
-  p_AS_attr p_as, p_sub_as;
-  p_host_attr p_host;
-  p_link_attr p_link;
-  p_route_attr p_route;
-
-  xbt_dynar_foreach(as_list_d, i, p_as)
-  {
-         // Init AS
-         create_AS(p_as->id, p_as->mode);
-
-         // add Sub AS
-
-         // Add Hosts
-         xbt_dynar_foreach(p_as->sub_as_list_id, j, p_sub_as) {
-                         //...
-         }
-         xbt_dynar_foreach(p_as->host_list_d, j, p_host) {
-           create_host_wsL07(p_host->id, p_host->power_peak, p_host->power_scale,
-                             p_host->power_trace, p_host->state_initial,
-                             p_host->state_trace);
-           //add to routing model host list
-           surf_route_add_host((char *) p_host->id);
-         }
-         //add Links
-         xbt_dynar_foreach(p_as->link_list_d, j, p_link) {
-             create_link_wsL07(p_link->id, p_link->bandwidth,
-                               p_link->bandwidth_trace, p_link->latency,
-                               p_link->latency_trace, p_link->state_initial,
-                               p_link->state_trace, p_link->policy);
-           }
-           // add route
-         xbt_dynar_foreach(p_as->route_list_d, j, p_route) {
-               surf_routing_add_route((char *) p_route->src_id,
-                                      (char *) p_route->dest_id, p_route->links_id);
-             }
-         /* </AS> */
-         // Finalize AS
-         surf_AS_finalize(p_as->id);
-  }
-  // add traces
-  surf_wsL07_add_traces();
-  return 0;
-}
+  const char *host_id ;
+  const char *function_id;
+  xbt_dynar_t args;
 
-/*
- * surf parse bypass application for MSG Module
- */
-static int surf_parse_bypass_application()
-{
-  unsigned int i,j;
-  p_AS_attr p_as;
-  p_host_attr p_host;
-  xbt_dynar_foreach(as_list_d, i, p_as)
-  {
-         xbt_dynar_foreach(p_as->host_list_d, j, p_host) {
-                 if (p_host->function)
-                         MSG_set_function(p_host->id, p_host->function, p_host->args_list);
-         }
+  if (! lua_istable(L, 1)) {
+    XBT_ERROR("Bad Arguments to AS.new, Should be a table with named arguments");
+    return -1;
   }
-  return 0;
-}
 
-/*
- * Public Methods
- */
-int console_add_host(lua_State *L)
-{
-       return Host_new(L);
-}
-
-int  console_add_link(lua_State *L)
-{
-       return Link_new(L);
-}
+  // get Host id
+  lua_pushstring(L, "host");
+  lua_gettable(L, -2);
+  host_id = lua_tostring(L, -1);
+  lua_pop(L, 1);
+
+  // get Function Name
+  lua_pushstring(L, "fct");
+  lua_gettable(L, -2);
+  function_id = lua_tostring(L, -1);
+  lua_pop(L, 1);
+
+  //get args
+  lua_pushstring(L,"args");
+  lua_gettable(L, -2);
+  args = xbt_str_split_quoted( lua_tostring(L,-1) );
+  lua_pop(L, 1);
+
+  // FIXME: hackish to go under MSG that way
+  m_host_t host = xbt_lib_get_or_null(host_lib,host_id,MSG_HOST_LEVEL);
+  if (!host) {
+    XBT_ERROR("no host '%s' found",host_id);
+    return -1;
+  }
 
-int console_add_route(lua_State *L)
-{
-       return Route_new(L);
-}
+  MSG_set_function(host_id, function_id, args);
 
-int console_add_AS(lua_State *L)
-{
-       return AS_new(L);
+  return 0;
 }
 
-int console_set_function(lua_State *L)
-{
-       return Host_set_function(L);
-}
+int console_host_set_property(lua_State *L) {
+  const char* name ="";
+  const char* prop_id = "";
+  const char* prop_value = "";
+  if (!lua_istable(L, -1)) {
+    XBT_ERROR("Bad Arguments to create link, Should be a table with named arguments");
+    return -1;
+  }
 
-int console_host_set_property(lua_State *L)
-{
-       return Host_set_property(L);
-}
 
-int console_parse_platform()
-{
-       return surf_parse_bypass_platform();
-}
+  // get Host id
+  lua_pushstring(L, "host");
+  lua_gettable(L, -2);
+  name = lua_tostring(L, -1);
+  lua_pop(L, 1);
+
+  // get prop Name
+  lua_pushstring(L, "prop");
+  lua_gettable(L, -2);
+  prop_id = lua_tostring(L, -1);
+  lua_pop(L, 1);
+  //get args
+  lua_pushstring(L,"value");
+  lua_gettable(L, -2);
+  prop_value = lua_tostring(L,-1);
+  lua_pop(L, 1);
+
+  // FIXME: hackish to go under MSG that way
+  m_host_t host = xbt_lib_get_or_null(host_lib,name,MSG_HOST_LEVEL);
+  if (!host) {
+    XBT_ERROR("no host '%s' found",name);
+    return -1;
+  }
+  xbt_dict_t props = MSG_host_get_properties(host);
+  xbt_dict_set(props,prop_id,xbt_strdup(prop_value),NULL);
 
-int  console_parse_application()
-{
-       return surf_parse_bypass_application();
+  return 0;
 }
 
-int console_parse_platform_wsL07()
-{
-       return surf_wsL07_parse_bypass_platform();
-}
diff --git a/src/bindings/lua/lua_state_cloner.c b/src/bindings/lua/lua_state_cloner.c
new file mode 100644 (file)
index 0000000..27a79d6
--- /dev/null
@@ -0,0 +1,636 @@
+/* Copyright (c) 2010. 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. */
+
+/* SimGrid Lua state management                                             */
+
+#include "lua_state_cloner.h"
+#include "lua_utils.h"
+#include "xbt.h"
+#include "xbt/log.h"
+#include <lauxlib.h>
+#include <lualib.h>
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua_state_cloner, bindings, "Lua state management");
+
+static void sglua_add_maestro_table(lua_State* L, int index, void* maestro_table_ptr);
+static void* sglua_get_maestro_table_ptr(lua_State* L, int index);
+static void sglua_get_table_by_ptr(lua_State* L, void* table_ptr);
+static int l_get_from_maestro(lua_State* L);
+
+static void sglua_copy_nil(lua_State* src, lua_State* dst);
+static void sglua_copy_number(lua_State* src, lua_State* dst);
+static void sglua_copy_boolean(lua_State* src, lua_State* dst);
+static void sglua_copy_string(lua_State* src, lua_State* dst);
+static void sglua_copy_table(lua_State* src, lua_State* dst);
+static void sglua_copy_function(lua_State* src, lua_State* dst);
+static void sglua_copy_lightuserdata(lua_State* src, lua_State* dst);
+static void sglua_copy_userdata(lua_State* src, lua_State* dst);
+static void sglua_copy_thread(lua_State* src, lua_State* dst);
+
+/**
+ * @brief Adds a reference to a maestro table to the list of known maestro
+ * tables of a state.
+ *
+ * TODO identify maestro's tables with my own IDs instead of pointers
+ * to Lua internals
+ *
+ * @param L a state (can be maestro itself)
+ * @param index index of the copy of the maestro table in the stack of L
+ * @param maestro_table_ptr pointer to the original table in maestro's world
+ */
+void sglua_add_maestro_table(lua_State* L, int index, void* maestro_table_ptr) {
+
+  /* we will set both [ptr] -> table and [table] -> ptr */
+
+                                  /* ... */
+  lua_pushvalue(L, index);
+                                  /* ... table */
+  lua_pushstring(L, "simgrid.maestro_tables");
+                                  /* ... table "simgrid.maestro_tables" */
+  lua_rawget(L, LUA_REGISTRYINDEX);
+                                  /* ... table maestrotbs */
+  lua_pushvalue(L, -2);
+                                  /* ... table maestrotbs table */
+  lua_pushlightuserdata(L, maestro_table_ptr);
+                                  /* ... table maestrotbs table tableptr */
+  lua_pushvalue(L, -1);
+                                  /* ... table maestrotbs table tableptr tableptr */
+  lua_pushvalue(L, -3);
+                                  /* ... table maestrotbs table tableptr tableptr table */
+  lua_settable(L, -5);
+                                  /* ... table maestrotbs table tableptr */
+  lua_settable(L, -3);
+                                  /* ... table maestrotbs */
+  lua_pop(L, 2);
+                                  /* ... */
+}
+
+/**
+ * @brief For a table in the stack of L, returns a pointer that identifies the
+ * same table in in maestro's world.
+ * @param L a Lua state
+ * @param index index of a table in the stack of L
+ * @return a pointer to maestro's copy of this table, or NULL if this table
+ * did not come from maestro
+ */
+static void* sglua_get_maestro_table_ptr(lua_State* L, int index) {
+
+  void* maestro_table_ptr = NULL;
+                                  /* ... */
+  lua_pushvalue(L, index);
+                                  /* ... table */
+  lua_pushstring(L, "simgrid.maestro_tables");
+                                  /* ... table "simgrid.maestro_tables" */
+  lua_rawget(L, LUA_REGISTRYINDEX);
+                                  /* ... table maestrotbs */
+  lua_pushvalue(L, -2);
+                                  /* ... table maestrotbs table */
+  lua_gettable(L, -2);
+                                  /* ... table maestrotbs tableptr/nil */
+  if (!lua_isnil(L, -1)) {
+                                  /* ... table maestrotbs tableptr */
+    maestro_table_ptr = (void*) lua_topointer(L, -1);
+  }
+
+  lua_pop(L, 3);
+                                  /* ... */
+  return maestro_table_ptr;
+}
+
+/**
+ * @brief Pushes a table knowing a pointer to maestro's copy of this table.
+ *
+ * Pushes nil if L does not know this table in maestro.
+ *
+ * @param L a Lua state
+ * @param maestro_table_ptr pointer that identifies a table in maestro's world
+ */
+static void sglua_get_table_by_ptr(lua_State* L, void* maestro_table_ptr) {
+
+                                  /* ... */
+  lua_pushstring(L, "simgrid.maestro_tables");
+                                  /* ... "simgrid.maestro_tables" */
+  lua_rawget(L, LUA_REGISTRYINDEX);
+                                  /* ... maestrotbs */
+  lua_pushlightuserdata(L, maestro_table_ptr);
+                                  /* ... maestrotbs tableptr */
+  lua_gettable(L, -2);
+                                  /* ... maestrotbs table/nil */
+  lua_remove(L, -2);
+                                  /* ... table/nil */
+}
+
+/**
+ * @brief Pops a value from the stack of a source state and pushes it on the
+ * stack of another state.
+ * If the value is a table, its content is copied recursively.
+ *
+ * This function is similar to lua_xmove() but it allows to move a value
+ * between two different global states.
+ *
+ * @param src the source state (not necessarily maestro)
+ * @param dst the destination state
+ */
+void sglua_move_value(lua_State* src, lua_State* dst) {
+
+  sglua_copy_value(src, dst);
+  lua_pop(src, 1);
+}
+
+/**
+ * @brief Pushes onto the stack a copy of the value on top another stack.
+ * If the value is a table, its content is copied recursively.
+ *
+ * This function allows to move a value between two different global states.
+ *
+ * @param src the source state (not necessarily maestro)
+ * @param dst the destination state
+ */
+void sglua_copy_value(lua_State* src, lua_State* dst) {
+
+  luaL_checkany(src, -1);                  /* check the value to copy */
+
+  int indent = (lua_gettop(dst) - 1) * 6;
+  XBT_DEBUG("%sCopying data %s", sglua_get_spaces(indent), sglua_tostring(src, -1));
+
+  sglua_stack_dump("src before copying a value (should be ... value): ", src);
+  sglua_stack_dump("dst before copying a value (should be ...): ", dst);
+
+  switch (lua_type(src, -1)) {
+
+    case LUA_TNIL:
+      sglua_copy_nil(src, dst);
+      break;
+
+    case LUA_TNUMBER:
+      sglua_copy_number(src, dst);
+      break;
+
+    case LUA_TBOOLEAN:
+      sglua_copy_boolean(src, dst);
+      break;
+
+    case LUA_TSTRING:
+      sglua_copy_string(src, dst);
+      break;
+
+    case LUA_TFUNCTION:
+      sglua_copy_function(src, dst);
+      break;
+
+    case LUA_TTABLE:
+      sglua_copy_table(src, dst);
+      break;
+
+    case LUA_TLIGHTUSERDATA:
+      sglua_copy_lightuserdata(src, dst);
+      break;
+
+    case LUA_TUSERDATA:
+      sglua_copy_userdata(src, dst);
+      break;
+
+    case LUA_TTHREAD:
+      sglua_copy_thread(src, dst);
+      break;
+  }
+
+  indent -= 2;
+  XBT_DEBUG("%sData copied", sglua_get_spaces(indent));
+
+  sglua_stack_dump("src after copying a value (should be ... value): ", src);
+  sglua_stack_dump("dst after copying a value (should be ... value): ", dst);
+}
+
+/**
+ * @brief Copies the nil value on the top of src to the top of dst.
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_nil(lua_State* src, lua_State* dst) {
+  lua_pushnil(dst);
+}
+
+/**
+ * @brief Copies the number value on the top of src to the top of dst.
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_number(lua_State* src, lua_State* dst) {
+  lua_pushnumber(dst, lua_tonumber(src, -1));
+}
+
+/**
+ * @brief Copies the boolean value on the top of src to the top of dst.
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_boolean(lua_State* src, lua_State* dst) {
+  lua_pushboolean(dst, lua_toboolean(src, -1));
+}
+
+/**
+ * @brief Copies the string value on the top of src to the top of dst.
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_string(lua_State* src, lua_State* dst) {
+
+  /* no worries about memory: lua_pushstring makes a copy */
+  lua_pushstring(dst, lua_tostring(src, -1));
+}
+
+/**
+ * @brief Copies the table value on the top of src to the top of dst.
+ *
+ * A deep copy of the table is made. If the table has a metatable, the
+ * metatable is also copied.
+ * If the table is already known by the destination state, it is not copied
+ * again.
+ *
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_table(lua_State* src, lua_State* dst) {
+
+                                  /* src: ... table
+                                     dst: ... */
+  int indent = lua_gettop(dst) * 6  + 2;
+
+  /* get from maestro the pointer that identifies this table */
+  void* table_ptr = sglua_get_maestro_table_ptr(src, -1);
+  if (table_ptr == NULL) {
+    /* the table didn't come from maestro: nevermind, use the pointer of src */
+    table_ptr = (void*) lua_topointer(src, -1);
+
+    if (!sglua_is_maestro(src)) {
+      XBT_DEBUG("%sMaestro does not know this table",
+          sglua_get_spaces(indent));
+    }
+  }
+
+  if (sglua_is_maestro(src)) {
+    /* register the table in maestro itself */
+    XBT_DEBUG("%sKeeping track of this table in maestro itself",
+        sglua_get_spaces(indent));
+    sglua_add_maestro_table(src, -1, table_ptr);
+    xbt_assert(sglua_get_maestro_table_ptr(src, -1) == table_ptr);
+  }
+
+  /* to avoid infinite recursion, see if this table is already known by dst */
+  sglua_get_table_by_ptr(dst, table_ptr);
+                                  /* dst: ... table/nil */
+  if (!lua_isnil(dst, -1)) {
+    XBT_DEBUG("%sNothing to do: table already known (%p)",
+        sglua_get_spaces(indent), table_ptr);
+                                  /* dst: ... table */
+  }
+  else {
+    XBT_DEBUG("%sFirst visit of this table (%p)", sglua_get_spaces(indent),
+        table_ptr);
+                                  /* dst: ... nil */
+    lua_pop(dst, 1);
+                                  /* dst: ... */
+
+    /* first visit: create the new table in dst */
+    lua_newtable(dst);
+                                  /* dst: ... table */
+
+    /* mark the table as known right now to avoid infinite recursion */
+    sglua_add_maestro_table(dst, -1, table_ptr);
+    /* FIXME: we may have added a table with a non-maestro pointer, is this a
+       problem? */
+    XBT_DEBUG("%sTable marked as known", sglua_get_spaces(indent));
+    xbt_assert(sglua_get_maestro_table_ptr(dst, -1) == table_ptr);
+
+    sglua_stack_dump("dst after marking the table as known (should be ... table): ", dst);
+
+    /* copy the metatable if any */
+    int has_meta_table = lua_getmetatable(src, -1);
+                                  /* src: ... table mt? */
+    if (has_meta_table) {
+      XBT_DEBUG("%sCopying the metatable", sglua_get_spaces(indent));
+                                  /* src: ... table mt */
+      sglua_copy_table(src, dst);
+                                  /* dst: ... table mt */
+      lua_pop(src, 1);
+                                  /* src: ... table */
+      lua_setmetatable(dst, -2);
+                                  /* dst: ... table */
+    }
+    else {
+                                  /* src: ... table */
+      XBT_DEBUG("%sNo metatable", sglua_get_spaces(indent));
+    }
+
+    sglua_stack_dump("src before traversing the table (should be ... table): ", src);
+    sglua_stack_dump("dst before traversing the table (should be ... table): ", dst);
+
+    /* traverse the table of src and copy each element */
+    lua_pushnil(src);
+                                  /* src: ... table nil */
+    while (lua_next(src, -2) != 0) {
+                                  /* src: ... table key value */
+
+      XBT_DEBUG("%sCopying table element %s", sglua_get_spaces(indent),
+          sglua_keyvalue_tostring(src, -2, -1));
+
+      sglua_stack_dump("src before copying table element (should be ... table key value): ", src);
+      sglua_stack_dump("dst before copying table element (should be ... table): ", dst);
+
+      /* copy the key */
+      lua_pushvalue(src, -2);
+                                  /* src: ... table key value key */
+      indent += 2;
+      XBT_DEBUG("%sCopying the key part of the table element",
+          sglua_get_spaces(indent));
+      sglua_move_value(src, dst);
+                                  /* src: ... table key value
+                                     dst: ... table key */
+      XBT_DEBUG("%sCopied the key part of the table element",
+          sglua_get_spaces(indent));
+
+      /* copy the value */
+      XBT_DEBUG("%sCopying the value part of the table element",
+          sglua_get_spaces(indent));
+      sglua_move_value(src, dst);
+                                  /* src: ... table key
+                                     dst: ... table key value */
+      XBT_DEBUG("%sCopied the value part of the table element",
+          sglua_get_spaces(indent));
+      indent -= 2;
+
+      /* set the table element */
+      lua_settable(dst, -3);
+                                  /* dst: ... table */
+
+      /* the key stays on top of src for next iteration */
+      sglua_stack_dump("src before next iteration (should be ... table key): ", src);
+      sglua_stack_dump("dst before next iteration (should be ... table): ", dst);
+
+      XBT_DEBUG("%sTable element copied", sglua_get_spaces(indent));
+    }
+    XBT_DEBUG("%sFinished traversing the table", sglua_get_spaces(indent));
+  }
+}
+
+/**
+ * @brief Copies the function on the top of src to the top of dst.
+ *
+ * It can be a Lua function or a C function.
+ * Copying upvalues is not implemented yet.
+ *
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_function(lua_State* src, lua_State* dst) {
+
+  if (lua_iscfunction(src, -1)) {
+    /* it's a C function */
+
+    XBT_DEBUG("It's a C function");
+    sglua_stack_dump("src before copying upvalues: ", src);
+
+    /* get the function pointer */
+    int function_index = lua_gettop(src);
+    lua_CFunction f = lua_tocfunction(src, function_index);
+
+    /* copy the upvalues */
+    int i = 0;
+    const char* upvalue_name = NULL;
+    do {
+      i++;
+      upvalue_name = lua_getupvalue(src, function_index, i);
+
+      if (upvalue_name != NULL) {
+        XBT_DEBUG("Upvalue %s", upvalue_name);
+        sglua_move_value(src, dst);
+      }
+    } while (upvalue_name != NULL);
+
+    sglua_stack_dump("src before copying pointer: ", src);
+
+    /* set the function */
+    lua_pushcclosure(dst, f, i - 1);
+    XBT_DEBUG("Function pointer copied");
+  }
+  else {
+    /* it's a Lua function: dump it from src */
+
+    s_sglua_buffer_t buffer;
+    buffer.capacity = 128; /* an empty function uses 77 bytes */
+    buffer.size = 0;
+    buffer.data = xbt_new(char, buffer.capacity);
+
+    /* copy the binary chunk from src into a buffer */
+    _XBT_GNUC_UNUSED int error = lua_dump(src, sglua_memory_writer, &buffer);
+    xbt_assert(!error, "Failed to dump the function from the source state: error %d",
+        error);
+    XBT_DEBUG("Fonction dumped: %zu bytes", buffer.size);
+
+    /*
+    fwrite(buffer.data, buffer.size, buffer.size, stderr);
+    fprintf(stderr, "\n");
+    */
+
+    /* load the chunk into dst */
+    error = luaL_loadbuffer(dst, buffer.data, buffer.size, "(dumped function)");
+    xbt_assert(!error, "Failed to load the function into the destination state: %s",
+        lua_tostring(dst, -1));
+  }
+}
+
+/**
+ * @brief Copies the light userdata on the top of src to the top of dst.
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_lightuserdata(lua_State* src, lua_State* dst) {
+  lua_pushlightuserdata(dst, lua_touserdata(src, -1));
+}
+
+/**
+ * @brief Copies the full userdata on the top of src to the top of dst.
+ *
+ * If the userdata has a metatable, the metatable is also copied.
+ *
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_userdata(lua_State* src, lua_State* dst) {
+
+  int indent = lua_gettop(dst) * 6  + 2;
+
+  /* copy the data */
+                                  /* src: ... udata
+                                     dst: ... */
+  size_t size = lua_objlen(src, -1);
+  void* src_block = lua_touserdata(src, -1);
+  void* dst_block = lua_newuserdata(dst, size);
+                                  /* dst: ... udata */
+  memcpy(dst_block, src_block, size);
+
+  /* copy the metatable if any */
+  int has_meta_table = lua_getmetatable(src, -1);
+                                  /* src: ... udata mt? */
+  if (has_meta_table) {
+    XBT_DEBUG("%sCopying metatable of userdata (%p)",
+        sglua_get_spaces(indent), lua_topointer(src, -1));
+                                  /* src: ... udata mt */
+    sglua_copy_table(src, dst);
+                                  /* src: ... udata mt
+                                     dst: ... udata mt */
+    lua_pop(src, 1);
+                                  /* src: ... udata */
+    lua_setmetatable(dst, -2);
+                                  /* dst: ... udata */
+
+    XBT_DEBUG("%sMetatable of userdata copied", sglua_get_spaces(indent));
+  }
+  else {
+    XBT_DEBUG("%sNo metatable for this userdata",
+        sglua_get_spaces(indent));
+                                  /* src: ... udata */
+  }
+}
+
+/**
+ * @brief This operation is not supported (yet?) so it just pushes nil.
+ *
+ * @param src source state
+ * @param dst destination state
+ */
+static void sglua_copy_thread(lua_State* src, lua_State* dst) {
+
+  XBT_WARN("Copying a thread from another state is not implemented (yet?).");
+  lua_pushnil(dst);
+}
+
+/**
+ * @brief Copies a global value or a registry value from the maestro state.
+ *
+ * The state L must have been created by sglua_clone_maestro_state().
+ * This function is meant to be an __index metamethod.
+ * Consequently, it assumes that the stack has two elements:
+ * a table (either the environment or the registry of L) and the string key of
+ * a value that does not exist yet in this table. It copies the corresponding
+ * value from maestro and pushes it on the stack of L.
+ * If the value does not exist in maestro state either, nil is pushed.
+ *
+ * TODO: make this function thread safe. If the simulation runs in parallel,
+ * several simulated processes may trigger this __index metamethod at the same
+ * time and get globals from maestro.
+ *
+ * @param L the current state
+ * @return number of return values pushed (always 1)
+ */
+static int l_get_from_maestro(lua_State *L) {
+
+  /* check the arguments */
+  luaL_checktype(L, 1, LUA_TTABLE);
+  const char* key = luaL_checkstring(L, 2);
+                                  /* L:      table key */
+  XBT_DEBUG("__index of '%s' begins", key);
+
+  /* want a global or a registry value? */
+  int pseudo_index;
+  if (lua_equal(L, 1, LUA_REGISTRYINDEX)) {
+    /* registry */
+    pseudo_index = LUA_REGISTRYINDEX;
+    XBT_DEBUG("Will get the value from the registry of maestro");
+  }
+  else {
+    /* global */
+    pseudo_index = LUA_GLOBALSINDEX;
+    XBT_DEBUG("Will get the value from the globals of maestro");
+  }
+
+  /* get the father */
+  lua_State* maestro = sglua_get_maestro();
+
+                                  /* L:      table key */
+
+  /* get the value from maestro */
+  lua_getfield(maestro, pseudo_index, key);
+                                  /* maestro: ... value */
+
+  /* push the value onto the stack of L */
+  sglua_move_value(maestro, L);
+                                  /* maestro: ...
+                                     L:      table key value */
+
+  /* prepare the return value of __index */
+  lua_pushvalue(L, -1);
+                                  /* L:      table key value value */
+  lua_insert(L, 1);
+                                  /* L:      value table key value */
+
+  /* save the copied value in the table for subsequent accesses */
+  lua_settable(L, -3);
+                                  /* L:      value table */
+  lua_settop(L, 1);
+                                  /* L:      value */
+
+  XBT_DEBUG("__index of '%s' returns %s", key, sglua_tostring(L, -1));
+
+  return 1;
+}
+
+/**
+ * @brief Creates a new Lua state and get its environment from the maestro
+ * state.
+ *
+ * The state created is independent from maestro and has its own copies of
+ * global and registry values.
+ * However, the global and registry values are not copied right now from
+ * the original state; they are copied only the first time they are accessed.
+ * This behavior saves time and memory, and is okay for Simgrid's needs.
+ *
+ * TODO: if the simulation runs in parallel, copy everything right now?
+ *
+ * @return the state created
+ */
+lua_State* sglua_clone_maestro(void) {
+
+  /* create the new state */
+  lua_State *L = luaL_newstate();
+
+  /* set its environment and its registry:
+   * - create a table newenv
+   * - create a metatable mt
+   * - set mt.__index = a function that copies the global from the father state
+   * - set mt as the metatable of the registry
+   * - set mt as the metatable of newenv
+   * - set newenv as the environment of the new state
+   */
+  lua_pushthread(L);                        /* thread */
+  lua_newtable(L);                          /* thread newenv */
+  lua_newtable(L);                          /* thread newenv mt */
+  lua_pushvalue(L, LUA_REGISTRYINDEX);      /* thread newenv mt reg */
+  lua_pushcfunction(L, l_get_from_maestro); /* thread newenv mt reg f */
+  lua_setfield(L, -3, "__index");           /* thread newenv mt reg */
+  lua_pushvalue(L, -2);                     /* thread newenv mt reg mt */
+  lua_setmetatable(L, -2);                  /* thread newenv mt reg */
+  lua_pop(L, 1);                            /* thread newenv mt */
+  lua_setmetatable(L, -2);                  /* thread newenv */
+  lua_setfenv(L, -2);                       /* thread */
+  lua_pop(L, 1);                            /* -- */
+
+  /* create the table of known tables from maestro */
+  lua_pushstring(L, "simgrid.maestro_tables");
+                                            /* "simgrid.maestro_tables" */
+  lua_newtable(L);                          /* "simgrid.maestro_tables" maestrotbs */
+  lua_rawset(L, LUA_REGISTRYINDEX);
+                                            /* -- */
+
+  /* opening the standard libs is not necessary as they are
+   * inherited like any global values */
+  /* luaL_openlibs(L); */
+
+  XBT_DEBUG("New state created");
+
+  return L;
+}
diff --git a/src/bindings/lua/lua_state_cloner.h b/src/bindings/lua/lua_state_cloner.h
new file mode 100644 (file)
index 0000000..875fb31
--- /dev/null
@@ -0,0 +1,19 @@
+/* Copyright (c) 2010. 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 LUA_STATE_CLONER_H
+#define LUA_STATE_CLONER_H
+
+/* SimGrid Lua state management                                             */
+#include <lua.h>
+
+int sglua_is_maestro(lua_State* L);
+lua_State* sglua_get_maestro(void);
+lua_State* sglua_clone_maestro(void);
+void sglua_move_value(lua_State* src, lua_State* dst);
+void sglua_copy_value(lua_State* src, lua_State* dst);
+
+#endif  /* LUA_STATE_CLONER_H */
index 87e2c8c..07911e8 100644 (file)
@@ -67,7 +67,9 @@ const char *SIM_MAIN_POSTEMBULE = "\n"
     "\n"
     "  /* cleanup the place */\n"
     "  gras_clean();\n"
-    "  if (gras_log)\n" "    free(gras_log);\n" "  return 0;\n" "}\n";
+    "  free(gras_log);\n"
+    "  return 0;\n"
+    "}\n";
 
 
 /***************************************
diff --git a/src/bindings/lua/lua_utils.c b/src/bindings/lua/lua_utils.c
new file mode 100644 (file)
index 0000000..24bd4ab
--- /dev/null
@@ -0,0 +1,197 @@
+/* Copyright (c) 2010. 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. */
+
+/* SimGrid Lua helper functions                                             */
+
+#include <lauxlib.h>
+#include "lua_utils.h"
+#include "xbt.h"
+#include "xbt/log.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua_utils, bindings, "Lua helper functions");
+
+/**
+ * @brief Returns a string representation of a value in the Lua stack.
+ *
+ * This function is for debugging purposes.
+ * It always returns the same pointer.
+ *
+ * @param L the Lua state
+ * @param index index in the stack
+ * @return a string representation of the value at this index
+ */
+const char* sglua_tostring(lua_State* L, int index) {
+
+  static char buff[64];
+
+  switch (lua_type(L, index)) {
+
+    case LUA_TNIL:
+      sprintf(buff, "nil");
+      break;
+
+    case LUA_TNUMBER:
+      sprintf(buff, "%.3f", lua_tonumber(L, index));
+      break;
+
+    case LUA_TBOOLEAN:
+      sprintf(buff, "%s", lua_toboolean(L, index) ? "true" : "false");
+      break;
+
+    case LUA_TSTRING:
+      snprintf(buff, 63, "'%s'", lua_tostring(L, index));
+      break;
+
+    case LUA_TFUNCTION:
+      if (lua_iscfunction(L, index)) {
+        sprintf(buff, "C-function");
+      }
+      else {
+        sprintf(buff, "function");
+      }
+      break;
+
+    case LUA_TTABLE:
+      sprintf(buff, "table(%p)", lua_topointer(L, index));
+      break;
+
+    case LUA_TLIGHTUSERDATA:
+    case LUA_TUSERDATA:
+      sprintf(buff, "userdata(%p)", lua_touserdata(L, index));
+      break;
+
+    case LUA_TTHREAD:
+      sprintf(buff, "thread");
+      break;
+  }
+  return buff;
+}
+
+/**
+ * @brief Returns a string representation of a key-value pair.
+ *
+ * This function is for debugging purposes.
+ * It always returns the same pointer.
+ *
+ * @param L the Lua state
+ * @param key_index index of the key
+ * @param value_index index of the value
+ * @return a string representation of the key-value pair
+ */
+const char* sglua_keyvalue_tostring(lua_State* L, int key_index, int value_index) {
+
+  static char buff[64];
+  /* value_tostring also always returns the same pointer */
+  int len = snprintf(buff, 63, "[%s] -> ", sglua_tostring(L, key_index));
+  snprintf(buff + len, 63 - len, "%s", sglua_tostring(L, value_index));
+  return buff;
+}
+
+/**
+ * @brief Returns a string composed of the specified number of spaces.
+ *
+ * This function can be used to indent strings for debugging purposes.
+ * It always returns the same pointer.
+ *
+ * @param length length of the string
+ * @return a string of this length with only spaces
+ */
+const char* sglua_get_spaces(int length) {
+
+  static char spaces[128];
+
+  xbt_assert(length < 128);
+  if (length != 0) {
+    memset(spaces, ' ', length);
+  }
+  spaces[length] = '\0';
+  return spaces;
+}
+
+/**
+ * @brief Dumps the Lua stack if debug logs are enabled.
+ * @param msg a message to print
+ * @param L a Lua state
+ */
+void sglua_stack_dump(const char* msg, lua_State* L)
+{
+  if (XBT_LOG_ISENABLED(lua_utils, xbt_log_priority_debug)) {
+    char buff[2048];
+    char* p = buff;
+    int i;
+    int top = lua_gettop(L);
+
+    //if (1) return;
+
+    fflush(stdout);
+
+    p[0] = '\0';
+    for (i = 1; i <= top; i++) {  /* repeat for each level */
+
+      p += sprintf(p, "%s", sglua_tostring(L, i));
+      p += sprintf(p, " ");       /* put a separator */
+    }
+    XBT_DEBUG("%s%s", msg, buff);
+  }
+}
+
+/**
+ * \brief Like luaL_checkudata, with additional debug logs.
+ *
+ * This function is for debugging purposes only.
+ *
+ * \param L a lua state
+ * \param ud index of the userdata to check in the stack
+ * \param tname key of the metatable of this userdata in the registry
+ */
+void* sglua_checkudata_debug(lua_State* L, int ud, const char* tname)
+{
+  XBT_DEBUG("Checking the userdata: ud = %d", ud);
+  sglua_stack_dump("my_checkudata: ", L);
+  void* p = lua_touserdata(L, ud);
+  lua_getfield(L, LUA_REGISTRYINDEX, tname);
+  const void* correct_mt = lua_topointer(L, -1);
+
+  int has_mt = lua_getmetatable(L, ud);
+  XBT_DEBUG("Checking the userdata: has metatable ? %d", has_mt);
+  const void* actual_mt = NULL;
+  if (has_mt) {
+    actual_mt = lua_topointer(L, -1);
+    lua_pop(L, 1);
+  }
+  XBT_DEBUG("Checking the task's metatable: expected %p, found %p", correct_mt, actual_mt);
+  sglua_stack_dump("my_checkudata: ", L);
+
+  if (p == NULL || !lua_getmetatable(L, ud) || !lua_rawequal(L, -1, -2))
+    luaL_typerror(L, ud, tname);
+  lua_pop(L, 2);
+  return p;
+}
+
+/**
+ * @brief Writes the specified data into a memory buffer.
+ *
+ * This function is a valid lua_Writer that writes into a memory buffer passed
+ * as userdata.
+ *
+ * @param L a lua state
+ * @param source some data
+ * @param sz number of bytes of data
+ * @param user_data the memory buffer to write
+ */
+int sglua_memory_writer(lua_State* L, const void* source, size_t size,
+    void* userdata) {
+
+  sglua_buffer_t buffer = (sglua_buffer_t) userdata;
+  while (buffer->capacity < buffer->size + size) {
+    buffer->capacity *= 2;
+    buffer->data = xbt_realloc(buffer->data, buffer->capacity);
+  }
+  memcpy(buffer->data + buffer->size, source, size);
+  buffer->size += size;
+
+  return 0;
+}
diff --git a/src/bindings/lua/lua_utils.h b/src/bindings/lua/lua_utils.h
new file mode 100644 (file)
index 0000000..1633201
--- /dev/null
@@ -0,0 +1,32 @@
+/* Copyright (c) 2010. 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. */
+
+/* SimGrid Lua helper functions                                             */
+
+#ifndef LUA_UTILS_H
+#define LUA_UTILS_H
+
+#include <lua.h>
+
+/**
+ * @brief A chunk of memory.
+ *
+ * This structure is used as the userdata parameter of lua_Writer.
+ */
+typedef struct s_sglua_buffer {
+  char* data;
+  size_t size;
+  size_t capacity;
+} s_sglua_buffer_t, *sglua_buffer_t;
+
+const char* sglua_tostring(lua_State* L, int index);
+const char* sglua_keyvalue_tostring(lua_State* L, int key_index, int value_index);
+void sglua_stack_dump(const char *msg, lua_State* L);
+void* sglua_checkudata_debug(lua_State* L, int ud, const char* tname);
+const char* sglua_get_spaces(int length);
+int sglua_memory_writer(lua_State* L, const void* source, size_t size, void* userdata);
+
+#endif  /* LUA_UTILS_H */
diff --git a/src/bindings/lua/master_slave.lua b/src/bindings/lua/master_slave.lua
deleted file mode 100644 (file)
index 248d8c8..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-
---Master Function
-function Master(...) 
-
-simgrid.info("Hello from lua, I'm the master")
-for i,v in ipairs(arg) do
-    simgrid.info("Got "..v)
-end
-
-nb_task = arg[1];
-comp_size = arg[2];
-comm_size = arg[3];
-slave_count = arg[4]
-
-if (#arg ~= 4) then
-    error("Argc should be 4");
-end
-simgrid.info("Argc="..(#arg).." (should be 4)")
-
--- Dispatch the tasks
-
-for i=1,nb_task do
-  tk = simgrid.Task.new("Task "..i,comp_size,comm_size);
-  alias = "slave "..(i%slave_count);
-  simgrid.info("Master sending  '" .. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-  simgrid.Task.send(tk,alias); -- C user data set to NULL
-  simgrid.info("Master done sending '".. simgrid.Task.name(tk) .."' To '" .. alias .."'");
-end
-
--- Sending Finalize Message To Others
-
-simgrid.info("Master: All tasks have been dispatched. Let's tell everybody the computation is over.");
-for i=0,slave_count-1 do
-  alias = "slave "..i;
-  simgrid.info("Master: sending finalize to "..alias);
-  simgrid.Task.send(simgrid.Task.new("finalize",0,0),alias);
-end
-simgrid.info("Master: Everything's done.");
-
-
-end
-
--- Slave Function ---------------------------------------------------------
-function Slave(...)
-
-local my_mailbox="slave "..arg[1]
-simgrid.info("Hello from lua, I'm a poor slave with mbox: "..my_mailbox)
-
-
-while true do
---  tk = simgrid.Task.new("",0,0); --??
---  simgrid.Task.recv2(tk,my_mailbox);
-  local tk = simgrid.Task.recv(my_mailbox);
-  
-  local tk_name = simgrid.Task.name(tk)
-
-  if (tk_name == "finalize") then
-    simgrid.info("Slave '" ..my_mailbox.."' got finalize msg");
-    break
-  end
-
-  simgrid.info("Slave '" ..my_mailbox.."' processing "..simgrid.Task.name(tk))
-  simgrid.Task.execute(tk);
-
-  simgrid.info("Slave '" ..my_mailbox.."': task "..simgrid.Task.name(tk) .. " done")
-end -- while
-
-simgrid.info("Slave '" ..my_mailbox.."': I'm Done . See You !!");
-
-end -- function ----------------------------------------------------------
---]]
-
-function doyield() 
-    coroutine.yield()
-end
-
-require "simgrid"
-
-simgrid.platform("../../../examples/msg/small_platform.xml")
-simgrid.application("../ruby/deploy.xml")
-simgrid.run()
-simgrid.info("Simulation's over. See you.")
-simgrid.clean()
\ No newline at end of file
diff --git a/src/bindings/lua/mult_matrix.lua b/src/bindings/lua/mult_matrix.lua
deleted file mode 100644 (file)
index 755e665..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-function Sender(...) 
-
-       simgrid.info("Hello From Sender")
-       receiver = simgrid.Host.getByName(arg[1])
-       task_comp = arg[2]
-       task_comm = arg[3]
-       rec_alias = arg[4]
-       
-       size = 4
-       m1 = mkmatrix(size, size)
-        m2 = mkmatrix(size, size)      
-
-       if (#arg ~= 4) then
-           error("Argc should be 4");
-       end
-       simgrid.info("Argc="..(#arg).." (should be 4)")
-
-       -- Sending Task
-       task = simgrid.Task.new("matrix_task",task_comp,task_comm);
-       task['matrix_1'] = m1;
-       task['matrix_2'] = m2;
-       task['size'] = size;
-       simgrid.info("Sending "..simgrid.Task.name(task).." to "..simgrid.Host.name(receiver));
-       simgrid.Task.send(task,rec_alias);
-       simgrid.info("Done Sending "..simgrid.Task.name(task));
-       mm = task['matrix_res']
-       simgrid.info("Receiving the Multiplication result of my two matrix :");
-       mprint(size,size,mm);
-
-end
-------------------------------------------------------
-function Receiver(...)
-       
-       simgrid.info("Hello From Receiver")
-       sender = simgrid.Host.getByName(arg[1])
-       send_alias = arg[2]
-       simgrid.info("Sending to alias "..send_alias)
-       recv_alias = "Receiver";
-       simgrid.info("Receiving The Matrix...");
-       task = simgrid.Task.recv(recv_alias);
-       mm = mmult(task['size'],task['size'],task['matrix_1'],task['matrix_2']);
-       --mprint(task['size'],task['size'],mm)
-       task['matrix_res'] = mm;
-       simgrid.info("Calcul is done ... Bye");
-
-
-end
------------------------------------------------------
-
-local n = tonumber((arg and arg[1]) or 1)
-
-
-
-function mkmatrix(rows, cols)
-    local count = 1
-    local mx = {}
-    for i=0,(rows - 1) do
-    local row = {}
-    for j=0,(cols - 1) do
-        row[j] = count
-        count = count + 1
-    end
-    mx[i] = row
-    end
-    return(mx)
-end
-
-function mmult(rows, cols, m1, m2)
-    local m3 = {}
-    for i=0,(rows-1) do
-        m3[i] = {}
-        for j=0,(cols-1) do
-            local rowj = 0
-            for k=0,(cols-1) do
-                rowj = rowj + m1[i][k] * m2[k][j]
-            end
-            m3[i][j] = rowj
-        end
-    end
-    return(m3)
-end
-
-function mprint(rows,cols,m)
- for i=0,(cols-1)do
-       for j=0,(rows-1)do
-               print (m[i][j])
-       end
- end
-end
-
-
---end
-require "simgrid"
-simgrid.platform("../ruby/quicksort_platform.xml")
-simgrid.application("../ruby/quicksort_deployment.xml")
-simgrid.run()
-simgrid.info("Simulation's over.See you.")
-simgrid.clean()
-
-
index 9c3a70e..e3dddcc 100644 (file)
-/* SimGrid Lua bindings                                                     */
-
 /* Copyright (c) 2010. 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. */
+
+/* SimGrid Lua bindings                                                     */
+
 #include "simgrid_lua.h"
+#include "lua_state_cloner.h"
+#include "lua_utils.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua, bindings, "Lua Bindings");
 
-lua_State *simgrid_lua_state;
+#define TASK_MODULE_NAME "simgrid.task"
+#define COMM_MODULE_NAME "simgrid.comm"
+#define HOST_MODULE_NAME "simgrid.host"
+#define PROCESS_MODULE_NAME "simgrid.process"
+// Surf (bypass XML)
+#define LINK_MODULE_NAME "simgrid.link"
+#define ROUTE_MODULE_NAME "simgrid.route"
+#define PLATF_MODULE_NAME "simgrid.platf"
+
+static lua_State* sglua_maestro_state;
+
+static const char* msg_errors[] = {
+    NULL,
+    "timeout",
+    "transfer failure",
+    "host failure",
+    "task canceled"
+};
 
-#define TASK_MODULE_NAME "simgrid.Task"
-#define HOST_MODULE_NAME "simgrid.Host"
-// Surf ( bypass XML )
-#define LINK_MODULE_NAME "simgrid.Link"
-#define ROUTE_MODULE_NAME "simgrid.Route"
-#define AS_MODULE_NAME "simgrid.AS"
-#define TRACE_MODULE_NAME "simgrid.Trace"
+int luaopen_simgrid(lua_State *L);
+static void register_c_functions(lua_State *L);
+static int run_lua_code(int argc, char **argv);
 
 /* ********************************************************************************* */
-/*                            helper functions                                       */
+/*                                simgrid.task API                                   */
 /* ********************************************************************************* */
-static void stackDump(const char *msg, lua_State * L)
-{
-  char buff[2048];
-  char *p = buff;
-  int i;
-  int top = lua_gettop(L);
-
-  fflush(stdout);
-  p += sprintf(p, "STACK(top=%d): ", top);
-
-  for (i = 1; i <= top; i++) {  /* repeat for each level */
-    int t = lua_type(L, i);
-    switch (t) {
-
-    case LUA_TSTRING:          /* strings */
-      p += sprintf(p, "`%s'", lua_tostring(L, i));
-      break;
-
-    case LUA_TBOOLEAN:         /* booleans */
-      p += sprintf(p, lua_toboolean(L, i) ? "true" : "false");
-      break;
-
-    case LUA_TNUMBER:          /* numbers */
-      p += sprintf(p, "%g", lua_tonumber(L, i));
-      break;
-
-    case LUA_TTABLE:
-      p += sprintf(p, "Table");
-      break;
 
-    default:                   /* other values */
-      p += sprintf(p, "???");
-/*      if ((ptr = luaL_checkudata(L,i,TASK_MODULE_NAME))) {
-        p+=sprintf(p,"task");
-      } else {
-        p+=printf(p,"%s", lua_typename(L, t));
-      }*/
-      break;
-
-    }
-    p += sprintf(p, "  ");      /* put a separator */
-  }
-  XBT_INFO("%s%s", msg, buff);
-}
-
-/** @brief ensures that a userdata on the stack is a task and returns the pointer inside the userdata */
-static m_task_t checkTask(lua_State * L, int index)
+/**
+ * \brief Ensures that a value in the stack is a valid task and returns it.
+ * \param L a Lua state
+ * \param index an index in the Lua stack
+ * \return the C task corresponding to this Lua task
+ */
+static m_task_t sglua_checktask(lua_State* L, int index)
 {
-  m_task_t *pi, tk;
+  sglua_stack_dump("check task: ", L);
   luaL_checktype(L, index, LUA_TTABLE);
+                                  /* ... task ... */
   lua_getfield(L, index, "__simgrid_task");
-  pi = (m_task_t *) luaL_checkudata(L, -1, TASK_MODULE_NAME);
-  if (pi == NULL)
-    luaL_typerror(L, index, TASK_MODULE_NAME);
-  tk = *pi;
-  if (!tk)
-    luaL_error(L, "null Task");
+                                  /* ... task ... ctask */
+  m_task_t task = *((m_task_t*) luaL_checkudata(L, -1, TASK_MODULE_NAME));
   lua_pop(L, 1);
-  return tk;
-}
+                                  /* ... task ... */
 
-/* ********************************************************************************* */
-/*                           wrapper functions                                       */
-/* ********************************************************************************* */
+  if (task == NULL) {
+    luaL_error(L, "This task was sent to someone else, you cannot access it anymore");
+  }
 
-/**
- * A task is either something to compute somewhere, or something to exchange between two hosts (or both).
- * It is defined by a computing amount and a message size.
- *
- */
+  return task;
+}
 
-/* *              * *
- * * Constructors * *
- * *              * */
 /**
- * Construct an new task with the specified processing amount and amount
- * of data needed.
+ * \brief Creates a new task and leaves it onto the stack.
+ * \param L a Lua state
+ * \return number of values returned to Lua
  *
- * @param name Task's name
+ * - Argument 1 (string): name of the task
+ * - Argument 2 (number): computation size
+ * - Argument 3 (number): communication size
+ * - Return value (task): the task created
  *
- * @param computeDuration      A value of the processing amount (in flop) needed to process the task.
- *                             If 0, then it cannot be executed with the execute() method.
- *                             This value has to be >= 0.
- *
- * @param messageSize          A value of amount of data (in bytes) needed to transfert this task.
- *                             If 0, then it cannot be transfered with the get() and put() methods.
- *                             This value has to be >= 0.
+ * A Lua task is a regular table with a full userdata inside, and both share
+ * the same metatable. For the regular table, the metatable allows OO-style
+ * writing such as your_task:send(someone).
+ * For the userdata, the metatable is used to check its type.
+ * TODO: make the task name an optional last parameter
  */
-static int Task_new(lua_State * L)
+static int l_task_new(lua_State* L)
 {
-  XBT_DEBUG("Task new...");
-  const char *name = luaL_checkstring(L, 1);
+  XBT_DEBUG("Task new");
+  const charname = luaL_checkstring(L, 1);
   int comp_size = luaL_checkint(L, 2);
   int msg_size = luaL_checkint(L, 3);
+                                  /* name comp comm */
+  lua_settop(L, 0);
+                                  /* -- */
   m_task_t msg_task = MSG_task_create(name, comp_size, msg_size, NULL);
-  lua_newtable(L);              /* create a table, put the userdata on top of it */
-  m_task_t *lua_task = (m_task_t *) lua_newuserdata(L, sizeof(m_task_t));
+
+  lua_newtable(L);
+                                  /* task */
+  luaL_getmetatable(L, TASK_MODULE_NAME);
+                                  /* task mt */
+  lua_setmetatable(L, -2);
+                                  /* task */
+  m_task_t* lua_task = (m_task_t*) lua_newuserdata(L, sizeof(m_task_t));
+                                  /* task ctask */
   *lua_task = msg_task;
   luaL_getmetatable(L, TASK_MODULE_NAME);
+                                  /* task ctask mt */
   lua_setmetatable(L, -2);
-  lua_setfield(L, -2, "__simgrid_task");        /* put the userdata as field of the table */
-  /* remove the args from the stack */
-  lua_remove(L, 1);
-  lua_remove(L, 1);
-  lua_remove(L, 1);
+                                  /* task ctask */
+  lua_setfield(L, -2, "__simgrid_task");
+                                  /* task */
   return 1;
 }
 
-static int Task_get_name(lua_State * L)
+/**
+ * \brief Returns the name of a task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (task): a task
+ * - Return value (string): name of the task
+ */
+static int l_task_get_name(lua_State* L)
 {
-  m_task_t tk = checkTask(L, -1);
-  lua_pushstring(L, MSG_task_get_name(tk));
+  m_task_t task = sglua_checktask(L, 1);
+  lua_pushstring(L, MSG_task_get_name(task));
   return 1;
 }
 
-static int Task_computation_duration(lua_State * L)
+/**
+ * \brief Returns the computation duration of a task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (task): a task
+ * - Return value (number): computation duration of this task
+ */
+static int l_task_get_computation_duration(lua_State* L)
 {
-  m_task_t tk = checkTask(L, -1);
-  lua_pushnumber(L, MSG_task_get_compute_duration(tk));
+  m_task_t task = sglua_checktask(L, 1);
+  lua_pushnumber(L, MSG_task_get_compute_duration(task));
   return 1;
 }
 
-static int Task_execute(lua_State * L)
+/**
+ * \brief Executes a task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (task): the task to execute
+ * - Return value (nil or string): nil if the task was successfully executed,
+ * or an error string in case of failure, which may be "task canceled" or
+ * "host failure"
+ */
+static int l_task_execute(lua_State* L)
 {
-  m_task_t tk = checkTask(L, -1);
-  int res = MSG_task_execute(tk);
-  lua_pushnumber(L, res);
-  return 1;
+  m_task_t task = sglua_checktask(L, 1);
+  MSG_error_t res = MSG_task_execute(task);
+
+  if (res == MSG_OK) {
+    return 0;
+  }
+  else {
+    lua_pushstring(L, msg_errors[res]);
+    return 1;
+  }
 }
 
-static int Task_destroy(lua_State * L)
-{
-  m_task_t tk = checkTask(L, -1);
-  int res = MSG_task_destroy(tk);
-  lua_pushnumber(L, res);
-  return 1;
+/**
+ * \brief Pops the Lua task on top of the stack and registers it so that a
+ * receiver can retrieve it later knowing the C task.
+ *
+ * After calling this function, you can send the C task to someone and he
+ * will be able to also get the corresponding Lua task.
+ *
+ * \param L a lua state
+ */
+static void task_register(lua_State* L) {
+
+  m_task_t task = sglua_checktask(L, -1);
+                                  /* ... task */
+  /* put in the C task a ref to the lua task so that the receiver finds it */
+  unsigned long ref = luaL_ref(L, LUA_REGISTRYINDEX);
+                                  /* ... */
+  MSG_task_set_data(task, (void*) ref);
 }
 
-static int Task_send(lua_State * L)
-{
-  //stackDump("send ",L);
-  m_task_t tk = checkTask(L, 1);
-  const char *mailbox = luaL_checkstring(L, 2);
-  lua_pop(L, 1);                // remove the string so that the task is on top of it
-  MSG_task_set_data(tk, L);     // Copy my stack into the task, so that the receiver can copy the lua task directly
-  MSG_error_t res = MSG_task_send(tk, mailbox);
-  while (MSG_task_get_data(tk) != NULL) // Don't mess up with my stack: the receiver didn't copy the data yet
-    MSG_process_sleep(0);       // yield
-
-  if (res != MSG_OK)
-    switch (res) {
-    case MSG_TIMEOUT:
-      XBT_ERROR("MSG_task_send failed : Timeout");
-      break;
-    case MSG_TRANSFER_FAILURE:
-      XBT_ERROR("MSG_task_send failed : Transfer Failure");
-      break;
-    case MSG_HOST_FAILURE:
-      XBT_ERROR("MSG_task_send failed : Host Failure ");
-      break;
-    default:
-      XBT_ERROR
-          ("MSG_task_send failed : Unexpected error , please report this bug");
-      break;
-    }
-  return 0;
+/**
+ * \brief Pushes onto the stack the Lua task corresponding to a C task.
+ *
+ * The Lua task must have been previously registered with task_register so
+ * that it can be retrieved knowing the C task.
+ *
+ * \param L a lua state
+ * \param task a C task
+ */
+static void task_unregister(lua_State* L, m_task_t task) {
+
+                                  /* ... */
+  /* the task is in my registry, put it onto my stack */
+  unsigned long ref = (unsigned long) MSG_task_get_data(task);
+  lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
+                                  /* ... task */
+  luaL_unref(L, LUA_REGISTRYINDEX, ref);
+  MSG_task_set_data(task, NULL);
 }
 
-static int Task_recv(lua_State * L)
-{
-  m_task_t tk = NULL;
-  const char *mailbox = luaL_checkstring(L, -1);
-  MSG_error_t res = MSG_task_receive(&tk, mailbox);
-
-  lua_State *sender_stack = MSG_task_get_data(tk);
-  lua_xmove(sender_stack, L, 1);        // copy the data directly from sender's stack
-  MSG_task_set_data(tk, NULL);
-
-  if (res != MSG_OK)
-    switch (res) {
-    case MSG_TIMEOUT:
-      XBT_ERROR("MSG_task_receive failed : Timeout");
-      break;
-    case MSG_TRANSFER_FAILURE:
-      XBT_ERROR("MSG_task_receive failed : Transfer Failure");
-      break;
-    case MSG_HOST_FAILURE:
-      XBT_ERROR("MSG_task_receive failed : Host Failure ");
-      break;
-    default:
-      XBT_ERROR
-          ("MSG_task_receive failed : Unexpected error , please report this bug");
-      break;
-    }
+/**
+ * \brief When a C task has been received, retrieves the corresponding Lua
+ * task from the sender and pushes it onto the receiver's stack.
+ *
+ * This function should be called from the receiver process.
+ *
+ * \param dst the receiver
+ * \param task the task just received
+ */
+static void task_copy(lua_State* dst, m_task_t task) {
+
+  m_process_t src_proc = MSG_task_get_sender(task);
+  lua_State* src = MSG_process_get_data(src_proc);
+
+                                  /* src: ...
+                                     dst: ... */
+  task_unregister(src, task);
+                                  /* src: ... task */
+  sglua_copy_value(src, dst);
+                                  /* src: ... task
+                                     dst: ... task */
+
+  /* the receiver is the owner of the task and may destroy it:
+   * make the C task NULL on the sender side so that it doesn't garbage
+   * collect it */
+  lua_getfield(src, -1, "__simgrid_task");
+                                  /* src: ... task ctask */
+  m_task_t* udata = (m_task_t*) luaL_checkudata(src, -1, TASK_MODULE_NAME);
+  *udata = NULL;
+  lua_pop(src, 2);
+                                  /* src: ... */
+}
 
-  return 1;
+/**
+ * \brief Sends a task to a mailbox and waits for its completion.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (task): the task to send
+ * - Argument 2 (string or compatible): mailbox name, as a real string or any
+ * type convertible to string (numbers always are)
+ * - Return values (boolean + string): true if the communication was successful,
+ * or false plus an error string in case of failure, which may be "timeout",
+ * "host failure" or "transfer failure"
+ */
+static int l_task_send(lua_State* L)
+{
+  m_task_t task = sglua_checktask(L, 1);
+  const char* mailbox = luaL_checkstring(L, 2);
+                                  /* task mailbox ... */
+  lua_settop(L, 1);
+                                  /* task */
+  task_register(L);
+                                  /* -- */
+  MSG_error_t res = MSG_task_send(task, mailbox);
+
+  if (res == MSG_OK) {
+    lua_pushboolean(L, 1);
+                                  /* true */
+    return 1;
+  }
+  else {
+    /* the communication has failed, I'm still the owner of the task */
+    task_unregister(L, task);
+                                  /* task */
+    lua_pushboolean(L, 0);
+                                  /* task false */
+    lua_pushstring(L, msg_errors[res]);
+                                  /* task false error */
+    return 2;
+  }
 }
 
-static int Task_recv_with_timeout(lua_State * L)
-{
-  m_task_t tk = NULL;
-  const char *mailbox = luaL_checkstring(L, -2);
-  int timeout = luaL_checknumber(L, -1);
-  MSG_error_t res = MSG_task_receive_with_timeout(&tk, mailbox, timeout);
-
-  lua_State *sender_stack = MSG_task_get_data(tk);
-  lua_xmove(sender_stack, L, 1);        // copy the data directly from sender's stack
-  MSG_task_set_data(tk, NULL);
-
-  if (res != MSG_OK)
-    switch (res) {
-    case MSG_TIMEOUT:
-      XBT_ERROR("MSG_task_receive failed : Timeout");
-      break;
-    case MSG_TRANSFER_FAILURE:
-      XBT_ERROR("MSG_task_receive failed : Transfer Failure");
-      break;
-    case MSG_HOST_FAILURE:
-      XBT_ERROR("MSG_task_receive failed : Host Failure ");
-      break;
-    default:
-      XBT_ERROR
-          ("MSG_task_receive failed : Unexpected error , please report this bug");
-      break;
-    }
+/**
+ * \brief Sends a task on a mailbox.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * This is a non-blocking function: use simgrid.comm.wait() or
+ * simgrid.comm.test() to end the communication.
+ *
+ * - Argument 1 (task): the task to send
+ * - Argument 2 (string or compatible): mailbox name, as a real string or any
+ * type convertible to string (numbers always are)
+ * - Return value (comm): a communication object to be used later with wait or test
+ */
+static int l_task_isend(lua_State* L)
+{
+  m_task_t task = sglua_checktask(L, 1);
+  const char* mailbox = luaL_checkstring(L, 2);
+                                  /* task mailbox ... */
+  lua_settop(L, 1);
+                                  /* task */
+  task_register(L);
+                                  /* -- */
+  msg_comm_t comm = MSG_task_isend(task, mailbox);
+
+  msg_comm_t* userdata = (msg_comm_t*) lua_newuserdata(L, sizeof(msg_comm_t));
+                                  /* comm */
+  *userdata = comm;
+  luaL_getmetatable(L, COMM_MODULE_NAME);
+                                  /* comm mt */
+  lua_setmetatable(L, -2);
+                                  /* comm */
   return 1;
 }
 
 /**
- * Static Binding for the Splay methods : event.sleep :
- * it use MSG_task_irecv with MSG_comm_wait
+ * \brief Sends a task on a mailbox on a best effort way (detached send).
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * Like simgrid.task.isend, this is a non-blocking function.
+ * You can use this function if you don't care about when the communication
+ * ends and whether it succeeds.
+ * FIXME: isn't this equivalent to calling simgrid.task.isend() and ignoring
+ * the result?
+ *
+ * - Argument 1 (task): the task to send
+ * - Argument 2 (string or compatible): mailbox name, as a real string or any
+ * type convertible to string (numbers always are)
  */
-static int Task_splay_irecv(lua_State *L)
+static int l_task_dsend(lua_State* L)
 {
-       m_task_t task = NULL;
-       msg_comm_t comm = NULL;         //current communication to receive
-       const char *mailbox = luaL_checkstring(L, -2);
-       double timeout = luaL_checknumber(L, -1);
-       comm = MSG_task_irecv(&task, mailbox);
-       MSG_comm_wait(comm, timeout);
-       if (MSG_comm_get_status(comm) == MSG_OK)
-       {
-               XBT_DEBUG("Receiving task : %s",MSG_task_get_name(task));
-               lua_State *sender_stack = MSG_task_get_data(task);
-               lua_xmove(sender_stack, L, 1);        // copy the data directly from sender's stack
-               MSG_task_set_data(task, NULL);
-       }
-       MSG_comm_destroy(comm);
-       return 1;
+  m_task_t task = sglua_checktask(L, 1);
+  const char* mailbox = luaL_checkstring(L, 2);
+                                  /* task mailbox ... */
+  lua_settop(L, 1);
+                                  /* task */
+  task_register(L);
+                                  /* -- */
+  MSG_task_dsend(task, mailbox, NULL);
+  return 0;
 }
 
-static int Task_splay_isend(lua_State *L)
+/**
+ * \brief Receives a task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string or compatible): mailbox name, as a real string or any
+ * type convertible to string (numbers always are)
+ * - Argument 2 (number, optional): timeout (default is no timeout)
+ * - Return values (task or nil + string): the task received, or nil plus an
+ * error message if the communication has failed
+ */
+static int l_task_recv(lua_State* L)
 {
-       m_task_t tk = checkTask(L, 1);
-       const char *mailbox = luaL_checkstring(L, 2);
-       lua_pop(L, 1);                // remove the string so that the task is on top of it
-       MSG_task_set_data(tk, L);     // Copy my stack into the task, so that the receiver can copy the lua task directly
-       MSG_task_isend(tk, mailbox);
+  m_task_t task = NULL;
+  const char* mailbox = luaL_checkstring(L, 1);
+  int timeout;
+  if (lua_gettop(L) >= 2) {
+                                  /* mailbox timeout ... */
+    timeout = luaL_checknumber(L, 2);
+  }
+  else {
+                                  /* mailbox */
+    timeout = -1;
+    /* no timeout by default */
+  }
+                                  /* mailbox ... */
+  MSG_error_t res = MSG_task_receive_with_timeout(&task, mailbox, timeout);
 
-       return 1;
+  if (res == MSG_OK) {
+    task_copy(L, task);
+                                  /* mailbox ... task */
+    return 1;
+  }
+  else {
+    lua_pushnil(L);
+                                  /* mailbox ... nil */
+    lua_pushstring(L, msg_errors[res]);
+                                  /* mailbox ... nil error */
+    return 2;
+  }
 }
 
-static const luaL_reg Task_methods[] = {
-  {"new", Task_new},
-  {"name", Task_get_name},
-  {"computation_duration", Task_computation_duration},
-  {"execute", Task_execute},
-  {"destroy", Task_destroy},
-  {"send", Task_send},
-  {"recv", Task_recv},
-  {"recv_timeout",Task_recv_with_timeout},
-  {"splay_recv",Task_splay_irecv},
-  {"iSend",Task_splay_isend},
-  {0, 0}
+/**
+ * \brief Asynchronously receives a task on a mailbox.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * This is a non-blocking function: use simgrid.comm.wait() or
+ * simgrid.comm.test() to end the communication and get the task in case of
+ * success.
+ *
+ * - Argument 1 (string or compatible): mailbox name, as a real string or any
+ * type convertible to string (numbers always are)
+ * - Return value (comm): a communication object to be used later with wait or test
+ */
+
+static int l_task_irecv(lua_State* L)
+{
+  const char* mailbox = luaL_checkstring(L, 1);
+                                  /* mailbox ... */
+  m_task_t* task = xbt_new0(m_task_t, 1); // FIXME fix this leak
+  msg_comm_t comm = MSG_task_irecv(task, mailbox);
+
+  msg_comm_t* userdata = (msg_comm_t*) lua_newuserdata(L, sizeof(msg_comm_t));
+                                  /* mailbox ... comm */
+  *userdata = comm;
+  luaL_getmetatable(L, COMM_MODULE_NAME);
+                                  /* mailbox ... comm mt */
+  lua_setmetatable(L, -2);
+                                  /* mailbox ... comm */
+  return 1;
+}
+
+static const luaL_reg task_functions[] = {
+  {"new", l_task_new},
+  {"get_name", l_task_get_name},
+  {"get_computation_duration", l_task_get_computation_duration},
+  {"execute", l_task_execute},
+  {"send", l_task_send},
+  {"isend", l_task_isend},
+  {"dsend", l_task_dsend},
+  {"recv", l_task_recv},
+  {"irecv", l_task_irecv},
+  {NULL, NULL}
 };
 
-static int Task_gc(lua_State * L)
+/**
+ * \brief Finalizes the userdata of a task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (userdata): a C task, possibly NULL if it was sent to another
+ * Lua state
+ */
+static int l_task_gc(lua_State* L)
 {
-  m_task_t tk = checkTask(L, -1);
-  if (tk)
-    MSG_task_destroy(tk);
+                                  /* ctask */
+  m_task_t task = *((m_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
+  /* the task is NULL if I sent it to someone else */
+  if (task != NULL) {
+    MSG_task_destroy(task);
+  }
   return 0;
 }
 
-static int Task_tostring(lua_State * L)
+/**
+ * \brief Returns a string representation of a C task.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (userdata): a task
+ * - Return value (string): a string describing this task
+ */
+static int l_task_tostring(lua_State* L)
 {
-  lua_pushfstring(L, "Task :%p", lua_touserdata(L, 1));
+  m_task_t task = *((m_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
+  lua_pushfstring(L, "Task: %p", task);
   return 1;
 }
 
-static const luaL_reg Task_meta[] = {
-  {"__gc", Task_gc},
-  {"__tostring", Task_tostring},
-  {0, 0}
+/**
+ * \brief Metamethods of both a task table and the userdata inside it.
+ */
+static const luaL_reg task_meta[] = {
+  {"__gc", l_task_gc}, /* will be called only for userdata */
+  {"__tostring", l_task_tostring},
+  {NULL, NULL}
+};
+
+/* ********************************************************************************* */
+/*                                simgrid.comm API                                   */
+/* ********************************************************************************* */
+
+/**
+ * \brief Ensures that a value in the stack is a comm and returns it.
+ * \param L a Lua state
+ * \param index an index in the Lua stack
+ * \return the C comm
+ */
+static msg_comm_t sglua_checkcomm(lua_State* L, int index)
+{
+  msg_comm_t comm = *((msg_comm_t*) luaL_checkudata(L, index, COMM_MODULE_NAME));
+  return comm;
+}
+
+/**
+ * \brief Blocks the current process until a communication is finished.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (comm): a comm (previously created by isend or irecv)
+ * - Argument 2 (number, optional): timeout (default is no timeout)
+ * - Return values (task or nil + string): in case of success, returns the task
+ * received if you are the receiver and nil if you are the sender. In case of
+ * failure, returns nil plus an error string.
+ */
+static int l_comm_wait(lua_State* L) {
+
+  msg_comm_t comm = sglua_checkcomm(L, 1);
+  double timeout = -1;
+  if (lua_gettop(L) >= 2) {
+    timeout = luaL_checknumber(L, 2);
+  }
+                                  /* comm ... */
+  MSG_error_t res = MSG_comm_wait(comm, timeout);
+
+  if (res == MSG_OK) {
+    m_task_t task = MSG_comm_get_task(comm);
+    if (MSG_task_get_sender(task) == MSG_process_self()) {
+      /* I'm the sender */
+      return 0;
+    }
+    else {
+      /* I'm the receiver: copy the Lua task from the sender */
+      task_copy(L, task);
+                                  /* comm ... task */
+      return 1;
+    }
+  }
+  else {
+    /* the communication has failed */
+    lua_pushnil(L);
+                                  /* comm ... nil */
+    lua_pushstring(L, msg_errors[res]);
+                                  /* comm ... nil error */
+    return 2;
+  }
+}
+
+/**
+ * @brief Returns whether a communication is finished.
+ *
+ * Unlike wait(), This function always returns immediately.
+ *
+ * - Argument 1 (comm): a comm (previously created by isend or irecv)
+ * - Return values (task/boolean or nil + string): if the communication is not
+ * finished, return false. If the communication is finished and was successful,
+ * returns the task received if you are the receiver or true if you are the
+ * sender. If the communication is finished and has failed, returns nil
+ * plus an error string.
+ */
+static int l_comm_test(lua_State* L) {
+
+  msg_comm_t comm = sglua_checkcomm(L, 1);
+                                  /* comm ... */
+  if (!MSG_comm_test(comm)) {
+    /* not finished yet */
+    lua_pushboolean(L, 0);
+                                  /* comm ... false */
+    return 1;
+  }
+  else {
+    /* finished but may have failed */
+    MSG_error_t res = MSG_comm_get_status(comm);
+
+    if (res == MSG_OK) {
+      m_task_t task = MSG_comm_get_task(comm);
+      if (MSG_task_get_sender(task) == MSG_process_self()) {
+        /* I'm the sender */
+        lua_pushboolean(L, 1);
+                                  /* comm ... true */
+        return 1;
+      }
+      else {
+        /* I'm the receiver: copy the Lua task from the sender */
+        task_copy(L, task);
+                                  /* comm ... task */
+        return 1;
+      }
+    }
+    else {
+      /* the communication has failed */
+      lua_pushnil(L);
+                                  /* comm ... nil */
+      lua_pushstring(L, msg_errors[res]);
+                                  /* comm ... nil error */
+      return 2;
+    }
+  }
+}
+
+static const luaL_reg comm_functions[] = {
+  {"wait", l_comm_wait},
+  {"test", l_comm_test},
+  /* TODO waitany, testany */
+  {NULL, NULL}
 };
 
 /**
- * Host
+ * \brief Finalizes a comm userdata.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (userdata): a comm
  */
-static m_host_t checkHost(lua_State * L, int index)
+static int l_comm_gc(lua_State* L)
+{
+                                  /* ctask */
+  msg_comm_t comm = *((msg_comm_t*) luaL_checkudata(L, 1, COMM_MODULE_NAME));
+  MSG_comm_destroy(comm);
+  return 0;
+}
+
+/**
+ * \brief Metamethods of the comm userdata.
+ */
+static const luaL_reg comm_meta[] = {
+  {"__gc", l_comm_gc},
+  {NULL, NULL}
+};
+
+/* ********************************************************************************* */
+/*                                simgrid.host API                                   */
+/* ********************************************************************************* */
+
+/**
+ * \brief Ensures that a value in the stack is a host and returns it.
+ * \param L a Lua state
+ * \param index an index in the Lua stack
+ * \return the C host corresponding to this Lua host
+ */
+static m_host_t sglua_checkhost(lua_State * L, int index)
 {
   m_host_t *pi, ht;
   luaL_checktype(L, index, LUA_TTABLE);
   lua_getfield(L, index, "__simgrid_host");
-  pi = (m_host_t *) luaL_checkudata(L, -1, HOST_MODULE_NAME);
+  pi = (m_host_t *) luaL_checkudata(L, lua_gettop(L), HOST_MODULE_NAME);
   if (pi == NULL)
     luaL_typerror(L, index, HOST_MODULE_NAME);
   ht = *pi;
@@ -336,7 +632,15 @@ static m_host_t checkHost(lua_State * L, int index)
   return ht;
 }
 
-static int Host_get_by_name(lua_State * L)
+/**
+ * \brief Returns a host given its name.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string): name of a host
+ * - Return value (host): the corresponding host
+ */
+static int l_host_get_by_name(lua_State * L)
 {
   const char *name = luaL_checkstring(L, 1);
   XBT_DEBUG("Getting Host from name...");
@@ -355,21 +659,43 @@ static int Host_get_by_name(lua_State * L)
   return 1;
 }
 
-
-static int Host_get_name(lua_State * L)
+/**
+ * \brief Returns the name of a host.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (host): a host
+ * - Return value (string): name of this host
+ */
+static int l_host_get_name(lua_State * L)
 {
-  m_host_t ht = checkHost(L, -1);
+  m_host_t ht = sglua_checkhost(L, 1);
   lua_pushstring(L, MSG_host_get_name(ht));
   return 1;
 }
 
-static int Host_number(lua_State * L)
+/**
+ * \brief Returns the number of existing hosts.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Return value (number): number of hosts
+ */
+static int l_host_number(lua_State * L)
 {
   lua_pushnumber(L, MSG_get_host_number());
   return 1;
 }
 
-static int Host_at(lua_State * L)
+/**
+ * \brief Returns the host given its index.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (number): an index (1 is the first)
+ * - Return value (host): the host at this index
+ */
+static int l_host_at(lua_State * L)
 {
   int index = luaL_checkinteger(L, 1);
   m_host_t host = MSG_get_host_table()[index - 1];      // lua indexing start by 1 (lua[1] <=> C[0])
@@ -380,44 +706,152 @@ static int Host_at(lua_State * L)
   lua_setmetatable(L, -2);
   lua_setfield(L, -2, "__simgrid_host");        /* put the userdata as field of the table */
   return 1;
+}
 
+/**
+ * \brief Returns the host where the current process is located.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Return value (host): the current host
+ */
+static int l_host_self(lua_State * L)
+{
+                                  /* -- */
+  m_host_t host = MSG_host_self();
+  lua_newtable(L);
+                                  /* table */
+  m_host_t* lua_host = (m_host_t*) lua_newuserdata(L, sizeof(m_host_t));
+                                  /* table ud */
+  *lua_host = host;
+  luaL_getmetatable(L, HOST_MODULE_NAME);
+                                  /* table ud mt */
+  lua_setmetatable(L, -2);
+                                  /* table ud */
+  lua_setfield(L, -2, "__simgrid_host");
+                                  /* table */
+  return 1;
 }
 
-static int Host_self(lua_State * L)
+/**
+ * \brief Returns the value of a host property.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (host): a host
+ * - Argument 2 (string): name of the property to get
+ * - Return value (string): the value of this property
+ */
+static int l_host_get_property_value(lua_State * L)
 {
-   m_host_t host = MSG_host_self();
-   lua_newtable(L);
-   m_host_t *lua_host =(m_host_t *)lua_newuserdata(L,sizeof(m_host_t));
-   *lua_host = host;
-   luaL_getmetatable(L, HOST_MODULE_NAME);
-   lua_setmetatable(L, -2);
-   lua_setfield(L, -2, "__simgrid_host");
-   return 1;
+  m_host_t ht = sglua_checkhost(L, 1);
+  const char *prop = luaL_checkstring(L, 2);
+  lua_pushstring(L,MSG_host_get_property_value(ht,prop));
+  return 1;
+}
 
+/**
+ * \brief Makes the current process sleep for a while.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (number): duration of the sleep
+ */
+static int l_host_sleep(lua_State *L)
+{
+  int time = luaL_checknumber(L, 1);
+  MSG_process_sleep(time);
+  return 0;
 }
 
-static int Host_get_property_value(lua_State * L)
+/**
+ * \brief Destroys a host.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (host): the host to destroy
+ */
+static int l_host_destroy(lua_State *L)
 {
-       m_host_t ht = checkHost(L, -2);
-       const char *prop = luaL_checkstring(L, -1);
-       lua_pushstring(L,MSG_host_get_property_value(ht,prop));
-       return 1;
+  m_host_t ht = sglua_checkhost(L, 1);
+  __MSG_host_destroy(ht);
+  return 0;
 }
 
-static int Host_sleep(lua_State *L)
+static const luaL_reg host_functions[] = {
+  {"get_by_name", l_host_get_by_name},
+  {"name", l_host_get_name},
+  {"number", l_host_number},
+  {"at", l_host_at},
+  {"self", l_host_self},
+  {"get_prop_value", l_host_get_property_value},
+  {"sleep", l_host_sleep},
+  {"destroy", l_host_destroy},
+  // Bypass XML Methods
+  {"set_function", console_set_function},
+  {"set_property", console_host_set_property},
+  {NULL, NULL}
+};
+
+/**
+ * \brief Returns a string representation of a host.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (userdata): a host
+ * - Return value (string): a string describing this host
+ */
+static int l_host_tostring(lua_State * L)
 {
-       int time = luaL_checknumber(L, -1);
-       MSG_process_sleep(time);
-       return 1;
+  lua_pushfstring(L, "Host :%p", lua_touserdata(L, 1));
+  return 1;
 }
 
-static int Host_destroy(lua_State *L)
+static const luaL_reg host_meta[] = {
+  {"__tostring", l_host_tostring},
+  {0, 0}
+};
+
+/* ********************************************************************************* */
+/*                              simgrid.process API                                  */
+/* ********************************************************************************* */
+
+/**
+ * \brief Makes the current process sleep for a while.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (number): duration of the sleep
+ * - Return value (nil or string): nil in everything went ok, or a string error
+ * if case of failure ("host failure")
+ */
+static int l_process_sleep(lua_State* L)
 {
-       m_host_t ht = checkHost(L, -1);
-       __MSG_host_destroy(ht);
-       return 1;
+  double duration = luaL_checknumber(L, 1);
+  MSG_error_t res = MSG_process_sleep(duration);
+
+  switch (res) {
+
+  case MSG_OK:
+    return 0;
+
+  case MSG_HOST_FAILURE:
+    lua_pushliteral(L, "host failure");
+    return 1;
+
+  default:
+    xbt_die("Unexpected result of MSG_process_sleep: %d, please report this bug", res);
+  }
 }
 
+static const luaL_reg process_functions[] = {
+    {"sleep", l_process_sleep},
+    /* TODO: self, create, kill, suspend, is_suspended, resume, get_name,
+     * get_pid, get_ppid, migrate
+     */
+    {NULL, NULL}
+};
+
 /* ********************************************************************************* */
 /*                           lua_stub_generator functions                            */
 /* ********************************************************************************* */
@@ -446,9 +880,9 @@ static int gras_add_process_function(lua_State * L)
   if (xbt_dict_is_empty(machine_set)
       || xbt_dict_is_empty(process_function_set)
       || xbt_dynar_is_empty(process_list)) {
-    process_function_set = xbt_dict_new();
+    process_function_set = xbt_dict_new_homogeneous(NULL);
     process_list = xbt_dynar_new(sizeof(s_process_t), s_process_free);
-    machine_set = xbt_dict_new();
+    machine_set = xbt_dict_new_homogeneous(NULL);
   }
 
   xbt_dict_set(machine_set, process_host, NULL, NULL);
@@ -477,7 +911,6 @@ static int gras_add_process_function(lua_State * L)
   return 0;
 }
 
-
 static int gras_generate(lua_State * L)
 {
   const char *project_name = luaL_checkstring(L, 1);
@@ -487,208 +920,127 @@ static int gras_generate(lua_State * L)
   return 0;
 }
 
-/***********************************
- *     Tracing
- **********************************/
-static int trace_start(lua_State *L)
-{
-#ifdef HAVE_TRACING
-  TRACE_start();
-#endif
-  return 1;
-}
-
-static int trace_category(lua_State * L)
-{
-#ifdef HAVE_TRACING
-  TRACE_category(luaL_checkstring(L, 1));
-#endif
-  return 1;
-}
-
-static int trace_set_task_category(lua_State *L)
-{
-#ifdef HAVE_TRACING
-  TRACE_msg_set_task_category(checkTask(L, -2), luaL_checkstring(L, -1));
-#endif
-  return 1;
-}
-
-static int trace_end(lua_State *L)
-{
-#ifdef HAVE_TRACING
-  TRACE_end();
-#endif
-  return 1;
-}
-//***********Register Methods *******************************************//
-/*
- * Host Methods
- */
-static const luaL_reg Host_methods[] = {
-  {"getByName", Host_get_by_name},
-  {"name", Host_get_name},
-  {"number", Host_number},
-  {"at", Host_at},
-  {"self",Host_self},
-  {"getPropValue", Host_get_property_value},
-  {"sleep", Host_sleep},
-  {"destroy",Host_destroy},
-  // Bypass XML Methods
-  {"setFunction", console_set_function},
-  {"setProperty", console_host_set_property},
-  {0, 0}
-};
-
-static int Host_gc(lua_State * L)
-{
-  m_host_t ht = checkHost(L, -1);
-  if (ht)
-    ht = NULL;
-  return 0;
-}
-
-static int Host_tostring(lua_State * L)
-{
-  lua_pushfstring(L, "Host :%p", lua_touserdata(L, 1));
-  return 1;
-}
+/* ********************************************************************************* */
+/*                               simgrid.platf API                                   */
+/* ********************************************************************************* */
 
-static const luaL_reg Host_meta[] = {
-  {"__gc", Host_gc},
-  {"__tostring", Host_tostring},
-  {0, 0}
+static const luaL_reg platf_functions[] = {
+    {"open", console_open},
+    {"close", console_close},
+    {"AS_open", console_AS_open},
+    {"AS_close", console_AS_close},
+    {"host_new", console_add_host},
+    {"link_new", console_add_link},
+    {"router_new", console_add_router},
+    {"route_new", console_add_route},
+    {NULL, NULL}
 };
 
-/*
- * AS Methods
- */
-static const luaL_reg AS_methods[] = {
-  {"new", console_add_AS},
-  {"addHost",console_add_host},
-  {"addLink",console_add_link},
-  {"addRoute",console_add_route},
-  {0, 0}
-};
+/* ********************************************************************************* */
+/*                                  simgrid API                                      */
+/* ********************************************************************************* */
 
 /**
- * Tracing Functions
- */
-static const luaL_reg Trace_methods[] = {
-               {"start",trace_start},
-               {"category",trace_category},
-               {"setTaskCategory",trace_set_task_category},
-               {"finish",trace_end},
-               {0,0}
-};
-/*
- * Environment related
+ * \brief Deploys your application.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string): name of the deployment file to load
  */
+static int launch_application(lua_State* L) {
 
-//extern lua_State *simgrid_lua_state;
-
-static int run_lua_code(int argc, char **argv)
-{
-  XBT_DEBUG("Run lua code %s", argv[0]);
-  lua_State *L = lua_newthread(simgrid_lua_state);
-  int ref = luaL_ref(simgrid_lua_state, LUA_REGISTRYINDEX);     // protect the thread from being garbage collected
-  int res = 1;
-
-  /* Start the co-routine */
-  lua_getglobal(L, argv[0]);
-  xbt_assert(lua_isfunction(L, -1),
-              "The lua function %s does not seem to exist", argv[0]);
-
-  // push arguments onto the stack
-  int i;
-  for (i = 1; i < argc; i++)
-    lua_pushstring(L, argv[i]);
-
-  // Call the function (in resume)
-  int err;
-  err = lua_pcall(L, argc - 1, 1, 0);
-  xbt_assert(err == 0, "error running function `%s': %s", argv[0],
-              lua_tostring(L, -1));
-
-  /* retrieve result */
-  if (lua_isnumber(L, -1)) {
-    res = lua_tonumber(L, -1);
-    lua_pop(L, 1);              /* pop returned value */
-  }
-  // cleanups
-  luaL_unref(simgrid_lua_state, LUA_REGISTRYINDEX, ref);
-  XBT_DEBUG("Execution of lua code %s is over", (argv ? argv[0] : "(null)"));
-  return res;
-}
-
-static int launch_application(lua_State * L)
-{
-  const char *file = luaL_checkstring(L, 1);
+  const char* file = luaL_checkstring(L, 1);
   MSG_function_register_default(run_lua_code);
   MSG_launch_application(file);
   return 0;
 }
 
-#include "simix/simix.h"        //FIXME: KILLME when debugging on simix internals become useless
-static int create_environment(lua_State * L)
-{
-  const char *file = luaL_checkstring(L, 1);
+/**
+ * \brief Creates the platform.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string): name of the platform file to load
+ */
+static int create_environment(lua_State* L) {
+
+  const char* file = luaL_checkstring(L, 1);
   XBT_DEBUG("Loading environment file %s", file);
   MSG_create_environment(file);
-
-/*
-  xbt_dict_t hosts = SIMIX_host_get_dict();
-  smx_host_t host;
-  xbt_dict_cursor_t c;
-  const char *name;
-
-  xbt_dict_foreach(hosts, c, name, host) {
-    XBT_DEBUG("We have an host %s", SIMIX_host_get_name(host));
-  }
-*/
-
   return 0;
 }
 
-static int debug(lua_State * L)
-{
-  const char *str = luaL_checkstring(L, 1);
+/**
+ * \brief Prints a log string with debug level.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string): the text to print
+ */
+static int debug(lua_State* L) {
+
+  const char* str = luaL_checkstring(L, 1);
   XBT_DEBUG("%s", str);
   return 0;
 }
 
-static int info(lua_State * L)
-{
-  const char *str = luaL_checkstring(L, 1);
+/**
+ * \brief Prints a log string with info level.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Argument 1 (string): the text to print
+ */
+static int info(lua_State* L) {
+
+  const char* str = luaL_checkstring(L, 1);
   XBT_INFO("%s", str);
   return 0;
 }
 
-static int run(lua_State * L)
-{
+/**
+ * \brief Runs your application.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ */
+static int run(lua_State*  L) {
+
   MSG_main();
   return 0;
 }
 
-static int clean(lua_State * L)
+/**
+ * \brief Returns the current simulated time.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ *
+ * - Return value (number): the simulated time
+ */
+static int get_clock(lua_State* L) {
+
+  lua_pushnumber(L, MSG_get_clock());
+  return 1;
+}
+
+/**
+ * \brief Cleans the simulation.
+ * \param L a Lua state
+ * \return number of values returned to Lua
+ */
+static int simgrid_gc(lua_State * L)
 {
   MSG_clean();
   return 0;
 }
 
-/*
- * Bypass XML Parser (lua console)
- */
-
 /*
  * Register platform for MSG
  */
 static int msg_register_platform(lua_State * L)
 {
   /* Tell Simgrid we dont wanna use its parser */
-  surf_parse = console_parse_platform;
+  //surf_parse = console_parse_platform;
   surf_parse_reset_callbacks();
-  surf_config_models_setup(NULL);
   MSG_create_environment(NULL);
   return 0;
 }
@@ -699,9 +1051,8 @@ static int msg_register_platform(lua_State * L)
 
 static int sd_register_platform(lua_State * L)
 {
-  surf_parse = console_parse_platform_wsL07;
+  //surf_parse = console_parse_platform_wsL07;
   surf_parse_reset_callbacks();
-  surf_config_models_setup(NULL);
   SD_create_environment(NULL);
   return 0;
 }
@@ -711,10 +1062,8 @@ static int sd_register_platform(lua_State * L)
  */
 static int gras_register_platform(lua_State * L)
 {
-  /* Tell Simgrid we dont wanna use surf parser */
-  surf_parse = console_parse_platform;
+  //surf_parse = console_parse_platform;
   surf_parse_reset_callbacks();
-  surf_config_models_setup(NULL);
   gras_create_environment(NULL);
   return 0;
 }
@@ -725,7 +1074,7 @@ static int gras_register_platform(lua_State * L)
 static int msg_register_application(lua_State * L)
 {
   MSG_function_register_default(run_lua_code);
-  surf_parse = console_parse_application;
+  //surf_parse = console_parse_application;
   MSG_launch_application(NULL);
   return 0;
 }
@@ -736,18 +1085,18 @@ static int msg_register_application(lua_State * L)
 static int gras_register_application(lua_State * L)
 {
   gras_function_register_default(run_lua_code);
-  surf_parse = console_parse_application;
+  //surf_parse = console_parse_application;
   gras_launch_application(NULL);
   return 0;
 }
 
-static const luaL_Reg simgrid_funcs[] = {
+static const luaL_Reg simgrid_functions[] = {
   {"create_environment", create_environment},
   {"launch_application", launch_application},
   {"debug", debug},
   {"info", info},
   {"run", run},
-  {"clean", clean},
+  {"get_clock", get_clock},
   /* short names */
   {"platform", create_environment},
   {"application", launch_application},
@@ -764,19 +1113,28 @@ static const luaL_Reg simgrid_funcs[] = {
 };
 
 /* ********************************************************************************* */
-/*                       module management functions                                 */
+/*                           module management functions                             */
 /* ********************************************************************************* */
 
 #define LUA_MAX_ARGS_COUNT 10   /* maximum amount of arguments we can get from lua on command line */
-#define TEST
-int luaopen_simgrid(lua_State * L);     // Fuck gcc: we don't need that prototype
-int luaopen_simgrid(lua_State * L)
+
+/**
+ * \brief Opens the simgrid Lua module.
+ *
+ * This function is called automatically by the Lua interpreter when some
+ * Lua code requires the "simgrid" module.
+ *
+ * \param L the Lua state
+ */
+int luaopen_simgrid(lua_State *L)
 {
-  XBT_DEBUG("Luaopen_Simgrid *****");
+  XBT_DEBUG("luaopen_simgrid *****");
+
+  /* Get the command line arguments from the lua interpreter */
   char **argv = malloc(sizeof(char *) * LUA_MAX_ARGS_COUNT);
   int argc = 1;
   argv[0] = (char *) "/usr/bin/lua";    /* Lie on the argv[0] so that the stack dumping facilities find the right binary. FIXME: what if lua is not in that location? */
-  /* Get the command line arguments from the lua interpreter */
+
   lua_getglobal(L, "arg");
   /* if arg is a null value, it means we use lua only as a script to init platform
    * else it should be a table and then take arg in consideration
@@ -806,45 +1164,231 @@ int luaopen_simgrid(lua_State * L)
     MSG_global_init(&argc, argv);
     XBT_DEBUG("Still %d arguments on command line", argc); // FIXME: update the lua's arg table to reflect the changes from SimGrid
   }
-  /* register the core C functions to lua */
-  luaL_register(L, "simgrid", simgrid_funcs);
-  /* register the task methods to lua */
-  luaL_openlib(L, TASK_MODULE_NAME, Task_methods, 0);   //create methods table,add it to the globals
-  luaL_newmetatable(L, TASK_MODULE_NAME);       //create metatable for Task,add it to the Lua registry
-  luaL_openlib(L, 0, Task_meta, 0);     // fill metatable
-  lua_pushliteral(L, "__index");
-  lua_pushvalue(L, -3);         //dup methods table
-  lua_rawset(L, -3);            //matatable.__index = methods
-  lua_pushliteral(L, "__metatable");
-  lua_pushvalue(L, -3);         //dup methods table
-  lua_rawset(L, -3);            //hide metatable:metatable.__metatable = methods
-  lua_pop(L, 1);                //drop metatable
-
-  /* register the hosts methods to lua */
-  luaL_openlib(L, HOST_MODULE_NAME, Host_methods, 0);
+
+  /* Keep the context mechanism informed of our lua world today */
+  sglua_maestro_state = L;
+
+  /* initialize access to my tables by children Lua states */
+  lua_newtable(L);
+  lua_setfield(L, LUA_REGISTRYINDEX, "simgrid.maestro_tables");
+
+  register_c_functions(L);
+
+  return 1;
+}
+
+/**
+ * \brief Returns whether a Lua state is the maestro state.
+ * \param L a Lua state
+ * \return true if this is maestro
+ */
+int sglua_is_maestro(lua_State* L) {
+  return L == sglua_maestro_state;
+}
+
+/**
+ * \brief Returns the maestro state.
+ * \return the maestro Lua state
+ */
+lua_State* sglua_get_maestro(void) {
+  return sglua_maestro_state;
+}
+
+/**
+ * \brief Registers the task functions into the table simgrid.task.
+ *
+ * Also initialize the metatable of the task userdata type.
+ *
+ * \param L a lua state
+ */
+static void register_task_functions(lua_State* L)
+{
+  /* create a table simgrid.task and fill it with task functions */
+  luaL_openlib(L, TASK_MODULE_NAME, task_functions, 0);
+                                  /* simgrid.task */
+
+  /* create the metatable for tasks, add it to the Lua registry */
+  luaL_newmetatable(L, TASK_MODULE_NAME);
+                                  /* simgrid.task mt */
+  /* fill the metatable */
+  luaL_openlib(L, NULL, task_meta, 0);
+                                  /* simgrid.task mt */
+  lua_pushvalue(L, -2);
+                                  /* simgrid.task mt simgrid.task */
+  /* metatable.__index = simgrid.task
+   * we put the task functions inside the task itself:
+   * this allows to write my_task:method(args) for
+   * simgrid.task.method(my_task, args) */
+  lua_setfield(L, -2, "__index");
+                                  /* simgrid.task mt */
+  lua_pop(L, 2);
+                                  /* -- */
+}
+
+/**
+ * \brief Registers the comm functions into the table simgrid.comm.
+ *
+ * Also initialize the metatable of the comm userdata type.
+ *
+ * \param L a lua state
+ */
+static void register_comm_functions(lua_State* L)
+{
+  /* create a table simgrid.com and fill it with com functions */
+  luaL_openlib(L, COMM_MODULE_NAME, comm_functions, 0);
+                                  /* simgrid.comm */
+
+  /* create the metatable for comms, add it to the Lua registry */
+  luaL_newmetatable(L, COMM_MODULE_NAME);
+                                  /* simgrid.comm mt */
+  /* fill the metatable */
+  luaL_openlib(L, NULL, comm_meta, 0);
+                                  /* simgrid.comm mt */
+  lua_pushvalue(L, -2);
+                                  /* simgrid.comm mt simgrid.comm */
+  /* metatable.__index = simgrid.comm
+   * we put the comm functions inside the comm itself:
+   * this allows to write my_comm:method(args) for
+   * simgrid.comm.method(my_comm, args) */
+  lua_setfield(L, -2, "__index");
+                                  /* simgrid.comm mt */
+  lua_pop(L, 2);
+                                  /* -- */
+}
+
+/**
+ * \brief Registers the host functions into the table simgrid.host.
+ *
+ * Also initialize the metatable of the host userdata type.
+ *
+ * \param L a lua state
+ */
+static void register_host_functions(lua_State* L)
+{
+  /* create a table simgrid.host and fill it with host functions */
+  luaL_openlib(L, HOST_MODULE_NAME, host_functions, 0);
+                                  /* simgrid.host */
+
+  /* create the metatable for host, add it to the Lua registry */
   luaL_newmetatable(L, HOST_MODULE_NAME);
-  luaL_openlib(L, 0, Host_meta, 0);
-  lua_pushliteral(L, "__index");
-  lua_pushvalue(L, -3);
-  lua_rawset(L, -3);
-  lua_pushliteral(L, "__metatable");
-  lua_pushvalue(L, -3);
-  lua_rawset(L, -3);
+                                  /* simgrid.host mt */
+  /* fill the metatable */
+  luaL_openlib(L, NULL, host_meta, 0);
+                                  /* simgrid.host mt */
+  lua_pushvalue(L, -2);
+                                  /* simgrid.host mt simgrid.host */
+  /* metatable.__index = simgrid.host
+   * we put the host functions inside the host userdata itself:
+   * this allows to write my_host:method(args) for
+   * simgrid.host.method(my_host, args) */
+  lua_setfield(L, -2, "__index");
+                                  /* simgrid.host mt */
+  lua_pop(L, 2);
+                                  /* -- */
+}
+
+/**
+ * \brief Registers the process functions into the table simgrid.process.
+ * \param L a lua state
+ */
+static void register_process_functions(lua_State* L)
+{
+  luaL_openlib(L, PROCESS_MODULE_NAME, process_functions, 0);
+                                  /* simgrid.process */
   lua_pop(L, 1);
+}
 
-  /* register the links methods to lua */
-  luaL_openlib(L, AS_MODULE_NAME, AS_methods, 0);
-  luaL_newmetatable(L, AS_MODULE_NAME);
+/**
+ * \brief Registers the platform functions into the table simgrid.platf.
+ * \param L a lua state
+ */
+static void register_platf_functions(lua_State* L)
+{
+  luaL_openlib(L, PLATF_MODULE_NAME, platf_functions, 0);
+                                  /* simgrid.platf */
   lua_pop(L, 1);
+}
 
+/**
+ * \brief Makes the core functions available to the Lua world.
+ * \param L a Lua world
+ */
+static void register_core_functions(lua_State *L)
+{
+  /* register the core C functions to lua */
+  luaL_register(L, "simgrid", simgrid_functions);
+                                  /* simgrid */
+
+  /* set a finalizer that cleans simgrid, by adding to the simgrid module a
+   * dummy userdata whose __gc metamethod calls MSG_clean() */
+  lua_newuserdata(L, sizeof(void*));
+                                  /* simgrid udata */
+  lua_newtable(L);
+                                  /* simgrid udata mt */
+  lua_pushcfunction(L, simgrid_gc);
+                                  /* simgrid udata mt simgrid_gc */
+  lua_setfield(L, -2, "__gc");
+                                  /* simgrid udata mt */
+  lua_setmetatable(L, -2);
+                                  /* simgrid udata */
+  lua_setfield(L, -2, "__simgrid_loaded");
+                                  /* simgrid */
+  lua_pop(L, 1);
+                                  /* -- */
+}
 
+/**
+ * \brief Creates the simgrid module and make it available to Lua.
+ * \param L a Lua world
+ */
+static void register_c_functions(lua_State *L)
+{
+  register_core_functions(L);
+  register_task_functions(L);
+  register_comm_functions(L);
+  register_host_functions(L);
+  register_process_functions(L);
+  register_platf_functions(L);
+}
 
-  /*register the Tracing functions to lua */
-  luaL_openlib(L, TRACE_MODULE_NAME, Trace_methods, 0);
-  luaL_newmetatable(L, TRACE_MODULE_NAME);
-  lua_pop(L, 1);
+/**
+ * \brief Runs a Lua function as a new simulated process.
+ * \param argc number of arguments of the function
+ * \param argv name of the Lua function and array of its arguments
+ * \return result of the function
+ */
+static int run_lua_code(int argc, char **argv)
+{
+  XBT_DEBUG("Run lua code %s", argv[0]);
 
-  /* Keep the context mechanism informed of our lua world today */
-  simgrid_lua_state = L;
-  return 1;
+  /* create a new state, getting globals from maestro */
+  lua_State *L = sglua_clone_maestro();
+  MSG_process_set_data(MSG_process_self(), L);
+
+  /* start the function */
+  lua_getglobal(L, argv[0]);
+  xbt_assert(lua_isfunction(L, -1),
+              "There is no Lua function with name `%s'", argv[0]);
+
+  /* push arguments onto the stack */
+  int i;
+  for (i = 1; i < argc; i++)
+    lua_pushstring(L, argv[i]);
+
+  /* call the function */
+  _XBT_GNUC_UNUSED int err;
+  err = lua_pcall(L, argc - 1, 1, 0);
+  xbt_assert(err == 0, "Error running function `%s': %s", argv[0],
+              lua_tostring(L, -1));
+
+  /* retrieve result */
+  int res = 1;
+  if (lua_isnumber(L, -1)) {
+    res = lua_tonumber(L, -1);
+    lua_pop(L, 1);              /* pop returned value */
+  }
+
+  XBT_DEBUG("Execution of Lua code %s is over", (argv ? argv[0] : "(null)"));
+
+  return res;
 }
index 9177495..06a9aef 100644 (file)
@@ -1,8 +1,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 GRAS_STUB_GENERATOR_H
-#define GRAS_STUB_GENERATOR_H
+#ifndef SIMGRID_LUA_H
+#define SIMGRID_LUA_H
 
 #include <stdio.h>
 #include <lauxlib.h>
 #include "xbt/function_types.h"
 #include "xbt/log.h"
 #include "surf/surfxml_parse.h"
-#include "surf/surf_private.h"
 #include "surf/surf.h"
-#include "portable.h"           /* Needed for the time of the SIMIX convertion */
 #include <stdarg.h>
 
-
 extern xbt_dict_t process_function_set;
 extern xbt_dynar_t process_list;
 extern xbt_dict_t machine_set;
@@ -44,71 +41,17 @@ void generate_makefile_local(const char *project);
 /* ********************************************************************************* */
 /*                           Console functions                                       */
 /* ********************************************************************************* */
-
-typedef struct t_AS_attr {
-  const char *id;
-  const char *mode;
-  xbt_dynar_t host_list_d;
-  xbt_dynar_t link_list_d;
-  xbt_dynar_t route_list_d;
-  xbt_dynar_t router_list_d;
-  xbt_dynar_t sub_as_list_id;
-} AS_attr, *p_AS_attr;
-
-typedef struct t_host_attr {
-  //platform attribute
-  // Mandatory attributes
-  const char *id;
-  double power_peak;
-  // Optional attributes
-  double power_scale;
-  const char *power_trace;
-  int state_initial;
-  const char *state_trace;
-  int core;
-  //deployment attribute
-  const char *function;
-  xbt_dynar_t args_list;
-  xbt_dict_t properties;
-} host_attr, *p_host_attr;
-
-
-typedef struct t_link_attr {
-  //mandatory attributes
-  const char *id;
-  double bandwidth;
-  double latency;
-  // Optional attributes
-  const char *bandwidth_trace;
-  const char *latency_trace;
-  const char *state_trace;
-  int state_initial;
-  int policy;
-} link_attr, *p_link_attr;
-
-
-typedef struct t_route_attr {
-  const char *src_id;
-  const char *dest_id;
-  xbt_dynar_t links_id;
-
-} route_attr, *p_route_attr;
-
-typedef struct t_router_attr {
-       const char *id;
-} router_attr, *p_router_attr;
-
 // Public Functions
+int console_open(lua_State *L);
+int console_close(lua_State *L);
 
 int console_add_host(lua_State*);
 int console_add_link(lua_State*);
+int console_add_router(lua_State* L);
 int console_add_route(lua_State*);
-int console_add_AS(lua_State*);
+int console_AS_open(lua_State*);
+int console_AS_close(lua_State *L);
 int console_set_function(lua_State*);
 int console_host_set_property(lua_State*);
 
-int console_parse_platform(void);
-int console_parse_application(void);
-int console_parse_platform_wsL07(void);
-
-#endif
+#endif  /* SIMGRID_LUA_H */
diff --git a/src/bindings/rubyDag/Makefile b/src/bindings/rubyDag/Makefile
deleted file mode 100644 (file)
index b7d9c73..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-
-SHELL = /bin/sh
-
-#### Start of system configuration section. ####
-
-srcdir = .
-topdir = /usr/lib/ruby/1.8/i486-linux
-hdrdir = $(topdir)
-VPATH = $(srcdir):$(topdir):$(hdrdir)
-exec_prefix = $(prefix)
-prefix = $(DESTDIR)/usr
-sharedstatedir = $(prefix)/com
-mandir = $(prefix)/share/man
-psdir = $(docdir)
-oldincludedir = $(DESTDIR)/usr/include
-localedir = $(datarootdir)/locale
-bindir = $(exec_prefix)/bin
-libexecdir = $(prefix)/lib/ruby1.8
-sitedir = $(DESTDIR)/usr/local/lib/site_ruby
-htmldir = $(docdir)
-vendorarchdir = $(vendorlibdir)/$(sitearch)
-includedir = $(prefix)/include
-infodir = $(prefix)/share/info
-vendorlibdir = $(vendordir)/$(ruby_version)
-sysconfdir = $(DESTDIR)/etc
-libdir = $(exec_prefix)/lib
-sbindir = $(exec_prefix)/sbin
-rubylibdir = $(libdir)/ruby/$(ruby_version)
-docdir = $(datarootdir)/doc/$(PACKAGE)
-dvidir = $(docdir)
-vendordir = $(libdir)/ruby/vendor_ruby
-datarootdir = $(prefix)/share
-pdfdir = $(docdir)
-archdir = $(rubylibdir)/$(arch)
-sitearchdir = $(sitelibdir)/$(sitearch)
-datadir = $(datarootdir)
-localstatedir = $(DESTDIR)/var
-sitelibdir = $(sitedir)/$(ruby_version)
-
-CC = gcc
-LIBRUBY = $(LIBRUBY_SO)
-LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
-LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) -I . ../../../lib/libsimgrid_static.a
-LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
-
-RUBY_EXTCONF_H = 
-CFLAGS   =  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC $(cflags) 
-INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
-DEFS     = -D_FILE_OFFSET_BITS=64
-CPPFLAGS =   $(DEFS) $(cppflags)
-CXXFLAGS = $(CFLAGS) 
-ldflags  = -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic
-dldflags = 
-archflag = 
-DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
-LDSHARED = $(CC) -shared
-AR = ar
-EXEEXT = 
-
-RUBY_INSTALL_NAME = ruby1.8
-RUBY_SO_NAME = ruby1.8
-arch = i486-linux
-sitearch = i486-linux
-ruby_version = 1.8
-ruby = /usr/bin/ruby1.8
-RUBY = $(ruby)
-RM = rm -f
-MAKEDIRS = mkdir -p
-INSTALL = /usr/bin/install -c
-INSTALL_PROG = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 644
-COPY = cp
-
-#### End of system configuration section. ####
-
-preload = 
-
-libpath = . $(libdir)
-LIBPATH =  -L. -L$(libdir)
-DEFFILE = 
-
-CLEANFILES = mkmf.log
-DISTCLEANFILES = 
-
-extout = 
-extout_prefix = 
-target_prefix = 
-LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lpthread -lrt -ldl -lcrypt -lm   -lc
-SRCS = rb_SD_task.c rb_SD_workstation.c rb_simdag.c
-OBJS = rb_SD_task.o rb_SD_workstation.o rb_simdag.o
-TARGET = dag
-DLLIB = $(TARGET).so
-EXTSTATIC = 
-STATIC_LIB = 
-
-BINDIR        = $(bindir)
-RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
-RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
-
-TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
-CLEANOBJS     = *.o *.a *.s[ol] *.pdb *.exp *.bak
-
-all:           $(DLLIB)
-static:                $(STATIC_LIB)
-
-clean:
-               @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
-
-distclean:     clean
-               @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-               @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-
-realclean:     distclean
-install: install-so install-rb
-
-install-so: $(RUBYARCHDIR)
-install-so: $(RUBYARCHDIR)/$(DLLIB)
-$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
-       $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
-install-rb: pre-install-rb install-rb-default
-install-rb-default: pre-install-rb-default
-pre-install-rb: Makefile
-pre-install-rb-default: Makefile
-$(RUBYARCHDIR):
-       $(MAKEDIRS) $@
-
-site-install: site-install-so site-install-rb
-site-install-so: install-so
-site-install-rb: install-rb
-
-.SUFFIXES: .c .m .cc .cxx .cpp .C .o
-
-.cc.o:
-       $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
-
-.cxx.o:
-       $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
-
-.cpp.o:
-       $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
-
-.C.o:
-       $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
-
-.c.o:
-       $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(DLLIB): $(OBJS) Makefile
-       @-$(RM) $@
-       $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
-
-
-
-$(OBJS): ruby.h defines.h
diff --git a/src/bindings/rubyDag/example.rb b/src/bindings/rubyDag/example.rb
deleted file mode 100644 (file)
index e828d53..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-require 'simdag'
-include DAG
-
-# Still using the old method to run :
-#>> make     ( to generate dag.so)
-#>> ruby example.rb   ( to run )
-# FIXME if using valgrind , you will get Some 'Invalid Read of Size" When Calling rb_task_schedule  '
-
-
-class Example
-
-  def initialize()
-    DAG.init(ARGV)
-    
-    if (ARGV.length == 1)
-      DAG.init(ARGV[0])
-    else 
-      DAG.createEnvironment("platform.xml")
-    end
-   
-    taskA = DAG::Task.new("Tache A",10)
-    taskB = DAG::Task.new("Tache B",40)
-    taskC = DAG::Task.new("Tache C",30)
-    taskD = DAG::Task.new("Tache D",60)
-    
-#     Adding dependency
-    DAG::Task::addDependency(taskB,taskA)
-    DAG::Task::addDependency(taskC,taskA)
-    DAG::Task::addDependency(taskD,taskB)
-    DAG::Task::addDependency(taskD,taskC)
-
-#      Execution Params
-    
-    workstation_number = 2
-    workstation_list = DAG::Workstation.getList()
-    w1 = workstation_list[0]
-    w2 = workstation_list[1]
-    
-     p "workstation 1 : "+ w1.name
-     p "workstation 2 : "+ w2.name
-    
-    computation_amount = Array.new()
-    communication_amount = Array.new()
-    
-    computation_amount << 2000000 << 1000000
-    communication_amount << 200000 << 300000
-    
-    rate = -1
-    
-    
-#     Scheduling
-    
-    DAG::Task.schedule(taskA,workstation_number,workstation_list,computation_amount,communication_amount,rate) 
-    DAG::Task.schedule(taskB,workstation_number,workstation_list,computation_amount,communication_amount,rate)
-    DAG::Task.schedule(taskC,workstation_number,workstation_list,computation_amount,communication_amount,rate)
-    DAG::Task.schedule(taskD,workstation_number,workstation_list,computation_amount,communication_amount,rate)
-  
-       
-    changed_tasks = Array.new()
-    changed_tasks = DAG::Task.simulate(-1.0)
-
-
-    for i in 0..changed_tasks.size-1
-      puts "Task "+ changed_tasks[i].name + " Started at " + changed_tasks[i].startTime.to_s + " has been done at "+ changed_tasks[i].finishTime.to_s
-      
-    end
-        
-    puts "Everything's Done ... Bye!!"
-
-    end
-end
-
-expl = Example.new 
\ No newline at end of file
diff --git a/src/bindings/rubyDag/extconfig.rb b/src/bindings/rubyDag/extconfig.rb
deleted file mode 100644 (file)
index f557573..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'mkmf'
-extension_name ='dag'
-dir_config(extension_name)
-create_makefile(extension_name)
diff --git a/src/bindings/rubyDag/platform.xml b/src/bindings/rubyDag/platform.xml
deleted file mode 100644 (file)
index badfb92..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version='1.0'?>
- <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
- <platform version="3">
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
-   <host id="Tremblay" power="98095000"/>
-   <host id="Jupiter" power="76296000"/>
-   <host id="Fafard" power="76296000"/>
-   <host id="Ginette" power="48492000"/>
-   <host id="Bourassa" power="48492000"/>
-   <link id="6" bandwidth="41279125" latency="5.9904e-05"/>
-   <link id="11" bandwidth="252750" latency="0.00570455"/>
-   <link id="3" bandwidth="34285625" latency="0.000514433"/>
-   <link id="7" bandwidth="11618875" latency="0.00018998"/>
-   <link id="9" bandwidth="7209750" latency="0.001461517"/>
-   <link id="12" bandwidth="1792625" latency="0.007877863"/>
-   <link id="2" bandwidth="118682500" latency="0.000136931"/>
-   <link id="8" bandwidth="8158000" latency="0.000270544"/>
-   <link id="1" bandwidth="34285625" latency="0.000514433"/>
-   <link id="4" bandwidth="10099625" latency="0.00047978"/>
-   <link id="0" bandwidth="41279125" latency="5.9904e-05"/>
-   <link id="10" bandwidth="4679750" latency="0.000848712"/>
-   <link id="5" bandwidth="27946250" latency="0.000278066"/>
-   <link id="loopback" bandwidth="498000000" latency="0.000015" sharing_policy="FATPIPE"/>
-   <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
-   <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
-   <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
-   <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
-   <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Tremblay">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Tremblay">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Fafard" dst="Jupiter">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Ginette" dst="Tremblay">
-     <link_ctn id="5"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Ginette" dst="Jupiter">
-     <link_ctn id="5"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Ginette" dst="Fafard">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Bourassa" dst="Tremblay">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Bourassa" dst="Jupiter">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Bourassa" dst="Fafard">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="8"/>
-   </route>
-   <route src="Bourassa" dst="Ginette">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
- </AS>
- </platform>
diff --git a/src/bindings/rubyDag/platform_.xml b/src/bindings/rubyDag/platform_.xml
deleted file mode 100644 (file)
index badfb92..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version='1.0'?>
- <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
- <platform version="3">
- <AS  id="AS0"  routing="Full">
-   <!-- ljlkj -->
-   <host id="Tremblay" power="98095000"/>
-   <host id="Jupiter" power="76296000"/>
-   <host id="Fafard" power="76296000"/>
-   <host id="Ginette" power="48492000"/>
-   <host id="Bourassa" power="48492000"/>
-   <link id="6" bandwidth="41279125" latency="5.9904e-05"/>
-   <link id="11" bandwidth="252750" latency="0.00570455"/>
-   <link id="3" bandwidth="34285625" latency="0.000514433"/>
-   <link id="7" bandwidth="11618875" latency="0.00018998"/>
-   <link id="9" bandwidth="7209750" latency="0.001461517"/>
-   <link id="12" bandwidth="1792625" latency="0.007877863"/>
-   <link id="2" bandwidth="118682500" latency="0.000136931"/>
-   <link id="8" bandwidth="8158000" latency="0.000270544"/>
-   <link id="1" bandwidth="34285625" latency="0.000514433"/>
-   <link id="4" bandwidth="10099625" latency="0.00047978"/>
-   <link id="0" bandwidth="41279125" latency="5.9904e-05"/>
-   <link id="10" bandwidth="4679750" latency="0.000848712"/>
-   <link id="5" bandwidth="27946250" latency="0.000278066"/>
-   <link id="loopback" bandwidth="498000000" latency="0.000015" sharing_policy="FATPIPE"/>
-   <route src="Tremblay" dst="Tremblay"><link_ctn id="loopback"/></route>
-   <route src="Jupiter" dst="Jupiter"><link_ctn id="loopback"/></route>
-   <route src="Fafard" dst="Fafard"><link_ctn id="loopback"/></route>
-   <route src="Ginette" dst="Ginette"><link_ctn id="loopback"/></route>
-   <route src="Bourassa" dst="Bourassa"><link_ctn id="loopback"/></route>
-   <route src="Tremblay" dst="Jupiter">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Tremblay" dst="Fafard">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Tremblay" dst="Ginette">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Tremblay" dst="Bourassa">
-     <link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Jupiter" dst="Tremblay">
-     <link_ctn id="9"/>
-   </route>
-   <route src="Jupiter" dst="Fafard">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Jupiter" dst="Ginette">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="5"/>
-   </route>
-   <route src="Jupiter" dst="Bourassa">
-     <link_ctn id="9"/><link_ctn id="4"/><link_ctn id="3"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Fafard" dst="Tremblay">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Fafard" dst="Jupiter">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Fafard" dst="Ginette">
-     <link_ctn id="8"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
-   <route src="Fafard" dst="Bourassa">
-     <link_ctn id="8"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Ginette" dst="Tremblay">
-     <link_ctn id="5"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Ginette" dst="Jupiter">
-     <link_ctn id="5"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Ginette" dst="Fafard">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="8"/>
-   </route>
-   <route src="Ginette" dst="Bourassa">
-     <link_ctn id="5"/><link_ctn id="2"/><link_ctn id="0"/><link_ctn id="1"/><link_ctn id="6"/><link_ctn id="7"/>
-   </route>
-   <route src="Bourassa" dst="Tremblay">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/>
-   </route>
-   <route src="Bourassa" dst="Jupiter">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="3"/><link_ctn id="4"/><link_ctn id="9"/>
-   </route>
-   <route src="Bourassa" dst="Fafard">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="8"/>
-   </route>
-   <route src="Bourassa" dst="Ginette">
-     <link_ctn id="7"/><link_ctn id="6"/><link_ctn id="1"/><link_ctn id="0"/><link_ctn id="2"/><link_ctn id="5"/>
-   </route>
- </AS>
- </platform>
diff --git a/src/bindings/rubyDag/rb_SD_task.c b/src/bindings/rubyDag/rb_SD_task.c
deleted file mode 100644 (file)
index 2114e36..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Copyright (c) 2010. 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 "ruby_simdag.h"
-#include "rb_SD_task.h"
-
-// Free Method
-static void SD_task_free(SD_task_t tk)
-{
-//   SD_task_destroy(tk);
-}
-
-static void rb_SD_task_destroy(VALUE class, VALUE task)
-{
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  SD_task_destroy(tk);
-}
-
-// New Method
-static VALUE rb_SD_task_new(VALUE class, VALUE name, VALUE amount)
-{
-  //data Set to NULL
-  SD_task_t task =
-      SD_task_create(RSTRING(name)->ptr, NULL, NUM2DBL(amount));
-  // Wrap m_task_t to a Ruby Value
-  return Data_Wrap_Struct(class, 0, SD_task_free, task);
-
-}
-
-//Get Name
-static VALUE rb_SD_task_name(VALUE class, VALUE task)
-{
-  // Wrap Ruby Value to m_task_t struct
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  return rb_str_new2(SD_task_get_name(tk));
-
-}
-
-// Schedule Task
-static void rb_SD_task_schedule(VALUE class, VALUE task,
-                                VALUE workstation_nb,
-                                VALUE workstation_list,
-                                VALUE computation_amount,
-                                VALUE communication_amount, VALUE rate)
-{
-  // Wrap Ruby Value to m_task_t struct
-  int i, wrk_nb, comp_nb, comm_nb;
-  double *comp_amount, *comm_amount;
-  double rt;
-  VALUE *ptr_wrk, *ptr_comp, *ptr_comm;
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  wrk_nb = NUM2INT(workstation_nb);
-  comp_nb = RARRAY(computation_amount)->len;
-  comm_nb = RARRAY(communication_amount)->len;
-  rt = NUM2DBL(rate);
-  SD_workstation_t *wrk_list;
-
-  ptr_wrk = RARRAY(workstation_list)->ptr;
-  ptr_comp = RARRAY(computation_amount)->ptr;
-  ptr_comm = RARRAY(communication_amount)->ptr;
-
-  wrk_list = xbt_new0(SD_workstation_t, wrk_nb);
-  comp_amount = xbt_new0(double, wrk_nb);
-  comm_amount = xbt_new0(double, wrk_nb);
-
-  // wrk_nb == comp_nb == comm_nb ???
-  for (i = 0; i < wrk_nb; i++) {
-    Data_Get_Struct(ptr_wrk[i], SD_workstation_t, wrk_list[i]);
-    comp_amount[i] = NUM2DBL(ptr_comp[i]);
-    comm_amount[i] = NUM2DBL(ptr_comm[i]);
-  }
-  /*for (i=0;i<comp_nb;i++)
-     comp_amount[i] = NUM2DBL(ptr_comp[i]);
-
-     for (i=0;i<comm_nb;i++)
-     comm_amount[i] = NUM2DBL(ptr_comm[i]); */
-
-  SD_task_schedule(tk, wrk_nb, wrk_list, comp_amount, comm_amount, rt);
-
-  xbt_free(wrk_list);
-  xbt_free(comp_amount);
-  xbt_free(comm_amount);
-
-
-}
-
-//unschedule
-static void rb_SD_task_unschedule(VALUE class, VALUE task)
-{
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  SD_task_unschedule(tk);
-
-}
-
-// task dependency add
-static void rb_SD_task_add_dependency(VALUE Class, VALUE task_src,
-                                      VALUE task_dst)
-{
-  SD_task_t tk_src, tk_dst;
-  Data_Get_Struct(task_src, SD_task_t, tk_src);
-  Data_Get_Struct(task_dst, SD_task_t, tk_dst);
-  SD_task_dependency_add(NULL, NULL, tk_src, tk_dst);
-
-}
-
-//task execution time
-static VALUE rb_SD_task_execution_time(VALUE class, VALUE task,
-                                       VALUE workstation_nb,
-                                       VALUE workstation_list,
-                                       VALUE computation_amount,
-                                       VALUE communication_amount,
-                                       VALUE rate)
-{
-
-  int i, wrk_nb;
-  double *comp_amount, *comm_amount;
-  double rt;
-  VALUE *ptr_wrk, *ptr_comp, *ptr_comm;
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  wrk_nb = NUM2INT(workstation_nb);
-  rt = NUM2DBL(rate);
-  SD_workstation_t *wrk_list;
-
-  ptr_wrk = RARRAY(workstation_list)->ptr;
-  ptr_comp = RARRAY(computation_amount)->ptr;
-  ptr_comm = RARRAY(communication_amount)->ptr;
-
-  wrk_list = xbt_new0(SD_workstation_t, wrk_nb);
-  comp_amount = xbt_new0(double, wrk_nb);
-  comm_amount = xbt_new0(double, wrk_nb);
-
-  for (i = 0; i < wrk_nb; i++) {
-    Data_Get_Struct(ptr_wrk[i], SD_workstation_t, wrk_list[i]);
-    comp_amount[i] = NUM2DBL(ptr_comp[i]);
-    comm_amount[i] = NUM2DBL(ptr_comm[i]);
-  }
-
-  return
-      rb_float_new(SD_task_get_execution_time
-                   (tk, wrk_nb, wrk_list, comp_amount, comm_amount, rt));
-
-}
-
-//task start time
-static VALUE rb_SD_task_start_time(VALUE class, VALUE task)
-{
-
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  double time = SD_task_get_start_time(tk);
-  return rb_float_new(time);
-
-}
-
-//task fininsh time
-static VALUE rb_SD_task_finish_time(VALUE class, VALUE task)
-{
-  SD_task_t tk;
-  Data_Get_Struct(task, SD_task_t, tk);
-  double time = SD_task_get_finish_time(tk);
-  return rb_float_new(time);
-
-}
-
-// Simulate : return a SD_task
-static VALUE rb_SD_simulate(VALUE class, VALUE how_long)
-{
-  int i;
-  SD_task_t task;
-  double hl = NUM2DBL(how_long);
-  xbt_dynar_t simulated_tasks = SD_simulate(hl);
-
-  VALUE rb_tasks = rb_ary_new();
-  xbt_dynar_foreach(simulated_tasks, i, task) {
-    VALUE tk = Qnil;
-    tk = Data_Wrap_Struct(class, 0, SD_task_free, task);
-    rb_ary_push(rb_tasks, tk);
-  }
-
-  return rb_tasks;
-
-}
diff --git a/src/bindings/rubyDag/rb_SD_task.h b/src/bindings/rubyDag/rb_SD_task.h
deleted file mode 100644 (file)
index 8121cb8..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (c) 2010. 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 RB_SD_TASK_H
-#define RB_SD_TASK_H
-
-#include <ruby.h>
-#include <simdag/simdag.h>
-#include "xbt/sysdep.h"
-
-
-// Free Method
-static void SD_task_free(SD_task_t tk); // needed by ruby while wrapping
-
-//destroy
-static void rb_SD_task_destory(VALUE Class, VALUE task);
-
-// New Method  
-static VALUE rb_SD_task_new(VALUE Class, VALUE name, VALUE amount);     //data set to NULL
-
-//Get Name
-static VALUE rb_SD_task_name(VALUE Class, VALUE task);
-
-// Schedule Task
-static void rb_SD_task_schedule(VALUE Class, VALUE task,
-                                VALUE workstation_nb,
-                                VALUE workstation_list, VALUE comp_amount,
-                                VALUE comm_amount, VALUE rate);
-
-// unschedule Task
-static void rb_SD_task_unschedule(VALUE Class, VALUE task);
-
-// task dependency Add ( name & data set to NULL)
-static void rb_SD_task_add_dependency(VALUE Class, VALUE task_src,
-                                      VALUE task_dst);
-
-// task execution time
-static VALUE rb_SD_task_execution_time(VALUE Class, VALUE task,
-                                       VALUE workstation_nb,
-                                       VALUE workstation_list,
-                                       VALUE comp_amount,
-                                       VALUE comm_amount, VALUE rate);
-
-// task start time
-static VALUE rb_SD_task_start_time(VALUE Class, VALUE task);
-
-// task finish time
-static VALUE rb_SD_task_finish_time(VALUE Class, VALUE task);
-
-// simulation
-static VALUE rb_SD_simulate(VALUE Class, VALUE how_long);
-
-#endif
diff --git a/src/bindings/rubyDag/rb_SD_workstation.c b/src/bindings/rubyDag/rb_SD_workstation.c
deleted file mode 100644 (file)
index cdea23b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) 2010. 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 "ruby_simdag.h"
-#include "rb_SD_workstation.h"
-
-
-static void SD_workstation_free(SD_workstation_t wrk)
-{
-  //NOTHING TO DO
-}
-
-// Workstation list
-static VALUE rb_SD_workstation_list(VALUE class)
-{
-
-  int i, nb;
-  nb = SD_workstation_get_number();
-  VALUE workstation_list = rb_ary_new2(nb);
-  for (i = 0; i < nb; i++) {
-    VALUE wrk = Qnil;
-    wrk =
-        Data_Wrap_Struct(class, 0, SD_workstation_free,
-                         SD_workstation_get_list()[i]);
-    rb_ary_push(workstation_list, wrk);
-
-  }
-  return workstation_list;
-}
-
-// Workstation number
-static VALUE rb_SD_workstation_number(VALUE class)
-{
-  int nb = SD_workstation_get_number();
-  return INT2NUM(nb);
-}
-
-// Workstation name
-static VALUE rb_SD_workstation_name(VALUE class, VALUE workstation)
-{
-  SD_workstation_t wk;
-  Data_Get_Struct(workstation, SD_workstation_t, wk);
-  return rb_str_new2(SD_workstation_get_name(wk));
-
-}
diff --git a/src/bindings/rubyDag/rb_SD_workstation.h b/src/bindings/rubyDag/rb_SD_workstation.h
deleted file mode 100644 (file)
index daf9819..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (c) 2010. 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 RB_SD_WORKSTATION_H
-#define RB_SD_WORKSTATION_H
-
-#include <ruby.h>
-#include <simdag/simdag.h>
-
-// free
-static void SD_workstation_free(SD_workstation_t);
-
-// Workstation List
-static VALUE rb_SD_workstation_list(VALUE Class);
-
-// Workstation number
-static VALUE rb_SD_workstation_number(VALUE Class);
-
-// Workstation name
-static VALUE rb_SD_workstation_name(VALUE Class, VALUE workstation);
-
-#endif
diff --git a/src/bindings/rubyDag/rb_simdag.c b/src/bindings/rubyDag/rb_simdag.c
deleted file mode 100644 (file)
index 2429eb1..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright (c) 2010. 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. */
-
-/* 
- * $Id$
- *
- * Copyright 2010 Simgrid Team         
- * All right 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. 
- */
-
-//FIXME #include "ruby_simdag.h"
-#include "rb_SD_task.c"
-#include "rb_SD_workstation.c"
-#include <simdag/simdag.h>
-#define MY_DEBUG
-
-// XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ruby);
-
-// MSG Module
-VALUE rb_dag;
-// MSG Classes
-VALUE rb_task;
-VALUE rb_workstation;
-
-//Init Msg_Init From Ruby
-static void sd_init(VALUE Class, VALUE args)
-{
-  char **argv = NULL;
-  const char *tmp;
-  int argc, type, i;
-  VALUE *ptr;
-  type = TYPE(args);
-  if (type != T_ARRAY) {
-    rb_raise(rb_eRuntimeError, "Bad Argument to SD_init");
-    return;
-  }
-  ptr = RARRAY(args)->ptr;
-  argc = RARRAY(args)->len;
-  argc++;
-  argv = xbt_new0(char *, argc);
-  argv[0] = strdup("ruby");
-  for (i = 0; i < argc - 1; i++) {
-    VALUE value = ptr[i];
-    type = TYPE(value);
-    tmp = RSTRING(value)->ptr;
-    argv[i + 1] = strdup(tmp);
-  }
-  SD_init(&argc, argv);
-  free(argv);
-//   XBT_INFO("SD Init...Done");
-  printf("SD Init...Done\n");
-  return;
-
-}
-
-//Init Msg_Run From Ruby
-static void sd_reinit(VALUE class)
-{
-  SD_application_reinit();
-}
-
-//deploy Application
-static void sd_createEnvironment(VALUE class, VALUE plateformFile)
-{
-  int type = TYPE(plateformFile);
-  if (type != T_STRING)
-    rb_raise(rb_eRuntimeError, "Bad Argument's Type");
-  const char *platform = RSTRING(plateformFile)->ptr;
-  SD_create_environment(platform);
-  printf("Create Environment...Done\n");
-
-  return;
-}
-
-
-// INFO
-static void sd_info(VALUE class, VALUE msg)
-{
-  const char *s = RSTRING(msg)->ptr;
-//  XBT_INFO("%s",s);
-  printf("%s\n", s);
-}
-
-// Get Clock
-static VALUE sd_get_clock(VALUE class)
-{
-  return rb_float_new(SD_get_clock());
-}
-
-void Init_dag()
-{
-  // Modules
-  rb_dag = rb_define_module("DAG");
-
-  // Classes
-  //Associated Environment Methods!
-  rb_define_method(rb_dag, "init", sd_init, 1);
-  rb_define_method(rb_dag, "reinit", sd_reinit, 0);
-  rb_define_method(rb_dag, "createEnvironment", sd_createEnvironment, 1);
-  rb_define_method(rb_dag, "info", sd_info, 1);
-  rb_define_method(rb_dag, "getClock", sd_get_clock, 0);
-
-  //Classes       
-  rb_task = rb_define_class_under(rb_dag, "SdTask", rb_cObject);
-  rb_workstation =
-      rb_define_class_under(rb_dag, "SdWorkstation", rb_cObject);
-//    TODO Link Class
-
-  //Task Methods    
-  rb_define_module_function(rb_task, "new", rb_SD_task_new, 2);
-//    rb_define_module_function(rb_task,"free",rb_SD_task_destroy,1);
-  rb_define_module_function(rb_task, "name", rb_SD_task_name, 1);
-  rb_define_module_function(rb_task, "schedule", rb_SD_task_schedule, 6);
-  rb_define_module_function(rb_task, "unschedule", rb_SD_task_unschedule,
-                            1);
-  rb_define_module_function(rb_task, "addDependency",
-                            rb_SD_task_add_dependency, 2);
-  rb_define_module_function(rb_task, "executionTime",
-                            rb_SD_task_execution_time, 6);
-  rb_define_module_function(rb_task, "startTime", rb_SD_task_start_time,
-                            1);
-  rb_define_module_function(rb_task, "finishTime", rb_SD_task_finish_time,
-                            1);
-  rb_define_module_function(rb_task, "simulate", rb_SD_simulate, 1);
-
-  //Worstation Methods  
-  rb_define_module_function(rb_workstation, "getList",
-                            rb_SD_workstation_list, 0);
-  rb_define_module_function(rb_workstation, "getNumber",
-                            rb_SD_workstation_number, 0);
-  rb_define_module_function(rb_workstation, "name", rb_SD_workstation_name,
-                            1);
-}
diff --git a/src/bindings/rubyDag/simdag.rb b/src/bindings/rubyDag/simdag.rb
deleted file mode 100644 (file)
index a4bccca..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-require 'dag'
-
-#===========================
-# Task Class
-# ==========================
-class DAG::Task < DAG::SdTask
-  
-  def initialize(*args)
-    super(args)
-  end
-  
-  def name()
-    super(self)
-  end
-  
-  def startTime()
-    super(self)
-  end
-  
-  def finishTime()
-    super(self)
-  end
-  
-end
-
-#=============================
-# WorkStation Class
-#=============================
-class DAG::Workstation < DAG::SdWorkstation
-  
-  def initialize()
-    super()
-  end
-  
-  def name()
-    super(self)
-  end
-  
-end
\ No newline at end of file
index f144e94..3217ead 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* 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. */
 
index 4584b19..cfb2b2a 100644 (file)
@@ -32,7 +32,7 @@ gras_cbps_t gras_cbps_new(void)
   res = xbt_new(s_gras_cbps_t, 1);
 
   res->lints = xbt_dynar_new(sizeof(int), NULL);
-  res->space = xbt_dict_new();
+  res->space = xbt_dict_new_homogeneous(NULL);
   /* no leak, the content is freed manually on block_end */
   res->frames = xbt_dynar_new(sizeof(xbt_dynar_t), NULL);
   res->globals = xbt_dynar_new(sizeof(char *), NULL);
@@ -94,7 +94,7 @@ gras_cbps_v_push(gras_cbps_t ps,
 
     XBT_DEBUG("Create a new variable stack for '%s' into the space", name);
     varstack = xbt_dynar_new(sizeof(gras_cbps_elm_t *), NULL);
-    xbt_dict_set(ps->space, varname, (void **) varstack, NULL);
+    xbt_dict_set(ps->space, name, (void **) varstack, NULL);
     xbt_ex_free(e);
     /* leaking, you think? only if you do not close all the openned blocks ;) */
   }
@@ -139,7 +139,7 @@ gras_cbps_v_pop(gras_cbps_t ps,
   }
   xbt_dynar_pop(varstack, &var);
 
-  if (!xbt_dynar_length(varstack)) {
+  if (xbt_dynar_is_empty(varstack)) {
     XBT_DEBUG("Last incarnation of %s poped. Kill it", name);
     xbt_dict_remove(ps->space, name);
     xbt_dynar_free(&varstack);
@@ -277,13 +277,12 @@ void gras_cbps_block_end(gras_cbps_t ps)
     varstack = xbt_dict_get(ps->space, name);
     xbt_dynar_pop(varstack, &var);
 
-    if (!xbt_dynar_length(varstack)) {
+    if (xbt_dynar_is_empty(varstack)) {
       xbt_dict_remove(ps->space, name);
       xbt_dynar_free_container(&varstack);      /*already empty, save a test ;) */
     }
 
-    if (var->data)
-      free(var->data);
+    free(var->data);
     free(var);
     free(name);
   }
@@ -304,7 +303,7 @@ int gras_cbps_i_pop(gras_cbps_t ps)
 {
   int ret;
 
-  xbt_assert(xbt_dynar_length(ps->lints) > 0,
+  xbt_assert(!xbt_dynar_is_empty(ps->lints),
               "gras_cbps_i_pop: no value to pop");
   ret = xbt_dynar_pop_as(ps->lints, int);
   XBT_DEBUG("pop %d as a size", ret);
index dcccee2..220607f 100644 (file)
@@ -158,7 +158,7 @@ void gras_datadesc_init(void)
   ddt = gras_datadesc_ref("xbt_peer_t", ddt);
 
   /* Dict containing the constant value (for the parsing macro) */
-  gras_dd_constants = xbt_dict_new();
+  gras_dd_constants = xbt_dict_new_homogeneous(xbt_free_f);
 
 }
 
index e329d76..1d9c1cd 100644 (file)
@@ -197,7 +197,9 @@ gras_dd_convert_elm(gras_datadesc_type_t type, int count,
           padding = (*r_sign > 127) ? 0xff : 0;
         }
 
-        memset(l_data, padding, l_size);
+        if (l_size != 0) {
+          memset(l_data, padding, l_size);
+        }
         memcpy(!gras_arches[r_arch].endian ? l_data
                : ((char *) l_data + sizeChange), r_data, r_size);
 
index 05eb79e..ece97c0 100644 (file)
@@ -158,8 +158,7 @@ void gras_dd_cat_field_free(void *f)
   gras_dd_cat_field_t field = *(gras_dd_cat_field_t *) f;
   XBT_IN("");
   if (field) {
-    if (field->name)
-      free(field->name);
+    free(field->name);
     free(field);
   }
   XBT_OUT();
index 60b1943..91da76f 100644 (file)
@@ -98,7 +98,7 @@ static XBT_INLINE void gras_dd_alloc_ref(xbt_dict_t refs, long int size, char **
            *(void **) r_ref);
 
     if (detect_cycle)
-      xbt_dict_set_ext(refs, (const char *) r_ref, r_len, ptr, xbt_free_f);
+      xbt_dict_set_ext(refs, (const char *) r_ref, r_len, ptr, NULL);
   }
 }
 
@@ -235,7 +235,7 @@ gras_datadesc_memcpy_rec(gras_cbps_t state,
       /* Detect the referenced type */
       sub_type = ref_data.type;
       if (sub_type == NULL) {
-        sub_type = (*ref_data.selector) (type, state, src);
+        sub_type = ref_data.selector(type, state, src);
       }
 
       /* Send the pointed data only if not already sent */
@@ -395,7 +395,7 @@ int gras_datadesc_memcpy(gras_datadesc_type_t type, void *src, void *dst)
          dst);
   if (!state) {
     state = gras_cbps_new();
-    refs = xbt_dict_new();
+    refs = xbt_dict_new_homogeneous(xbt_free_f);
   }
 
   TRY {
@@ -525,7 +525,7 @@ gras_datadesc_send_rec(gras_socket_t sock,
       /* Detect the referenced type and send it to peer if needed */
       sub_type = ref_data.type;
       if (sub_type == NULL) {
-        sub_type = (*ref_data.selector) (type, state, data);
+        sub_type = ref_data.selector(type, state, data);
         gras_dd_send_int(sock, &(sub_type->code), 1 /*stable */ );
       }
 
@@ -638,7 +638,7 @@ void gras_datadesc_send(gras_socket_t sock,
 
   if (!state) {
     state = gras_cbps_new();
-    refs = xbt_dict_new();
+    refs = xbt_dict_new_homogeneous(NULL);
   }
 
   TRY {
@@ -976,7 +976,7 @@ gras_datadesc_recv(gras_socket_t sock,
 
   if (!state) {
     state = gras_cbps_new();
-    refs = xbt_dict_new();
+    refs = xbt_dict_new_homogeneous(xbt_free_f);
   }
 
   xbt_assert(type, "called with NULL type descriptor");
index fc02a6f..77f5d66 100644 (file)
@@ -614,7 +614,7 @@ static gras_datadesc_type_t parse_struct(char *definition)
   xbt_dynar_t fields_to_push;
   char *name;
 
-  gras_datadesc_type_t struct_type;
+  volatile gras_datadesc_type_t struct_type;
 
   XBT_IN("");
   identifiers = xbt_dynar_new(sizeof(s_identifier_t), NULL);
@@ -704,7 +704,6 @@ static gras_datadesc_type_t parse_typedef(char *definition)
 
   s_type_modifier_t tm;
 
-  gras_datadesc_type_t struct_desc = NULL;
   gras_datadesc_type_t typedef_desc = NULL;
 
   XBT_IN("");
@@ -714,7 +713,7 @@ static gras_datadesc_type_t parse_typedef(char *definition)
   parse_type_modifier(&tm);
 
   if (tm.is_struct) {
-    struct_desc = parse_struct(definition);
+     parse_struct(definition);
   }
 
   parse_type_modifier(&tm);
@@ -812,5 +811,5 @@ void gras_datadesc_set_const(const char *name, int value)
   int *stored = xbt_new(int, 1);
   *stored = value;
 
-  xbt_dict_set(gras_dd_constants, name, stored, xbt_free_f);
+  xbt_dict_set(gras_dd_constants, name, stored, NULL);
 }
index e157732..66f6e64 100644 (file)
@@ -290,13 +290,13 @@ void gras_msg_handleall(double period)
  *
  * @sa gras_msg_handleall().
  */
-void gras_msg_handle(double timeOut)
+void gras_msg_handle(volatile double timeOut)
 {
 
   double untiltimer;
 
   unsigned int cpt;
-  int volatile ran_ok;
+  volatile int ran_ok;
 
   s_gras_msg_t msg;
 
@@ -306,7 +306,7 @@ void gras_msg_handle(double timeOut)
   gras_msg_cb_t cb;
   s_gras_msg_cb_ctx_t ctx;
 
-  int timerexpected, timeouted;
+  volatile int timerexpected, timeouted;
   xbt_ex_t e;
 
   XBT_VERB("Handling message within the next %.2fs", timeOut);
@@ -326,7 +326,7 @@ void gras_msg_handle(double timeOut)
 
   /* get a message (from the queue or from the net) */
   timeouted = 0;
-  if (xbt_dynar_length(pd->msg_queue)) {
+  if (!xbt_dynar_is_empty(pd->msg_queue)) {
     XBT_DEBUG("Get a message from the queue");
     xbt_dynar_shift(pd->msg_queue, &msg);
   } else {
@@ -398,16 +398,18 @@ void gras_msg_handle(double timeOut)
     ran_ok = 0;
     TRY {
       xbt_dynar_foreach(list->cbs, cpt, cb) {
+        volatile unsigned int cpt2 = cpt;
         if (!ran_ok) {
           XBT_DEBUG
               ("Use the callback #%d (@%p) for incomming msg '%s' (payload_size=%d)",
                cpt + 1, cb, msg.type->name, msg.payl_size);
-          if (!(*cb) (&ctx, msg.payl)) {
+          if (!cb(&ctx, msg.payl)) {
             /* cb handled the message */
             free(msg.payl);
             ran_ok = 1;
           }
         }
+        cpt = cpt2;
       }
     }
     CATCH(e) {
index fbf04a7..0054640 100644 (file)
@@ -78,23 +78,11 @@ gras_msgtype_declare_ext(const char *name,
 
   gras_msgtype_t msgtype = NULL;
   char *namev = make_namev(name, version);
-  volatile int found = 0;
-  xbt_ex_t e;
 
-  TRY {
-    msgtype =
-        (gras_msgtype_t) xbt_set_get_by_name(_gras_msgtype_set, namev);
-    found = 1;
-  }
-  CATCH(e) {
-    if (e.category != not_found_error) {
-      xbt_free(namev);
-      RETHROW;
-    }
-    xbt_ex_free(e);
-  }
+  msgtype = (gras_msgtype_t) xbt_set_get_by_name_or_null(
+      _gras_msgtype_set, (const char*) namev);
 
-  if (found) {
+  if (msgtype != NULL) {
     XBT_DEBUG
         ("Re-register version %d of message '%s' (same kind & payload, ignored).",
          version, name);
@@ -104,13 +92,13 @@ gras_msgtype_declare_ext(const char *name,
                 e_gras_msg_kind_names[msgtype->kind]);
     xbt_assert(!gras_datadesc_type_cmp
                 (msgtype->ctn_type, payload_request),
-                "Message %s re-registred with another payload (%s was %s)",
+                "Message %s re-registered with another payload (%s was %s)",
                 namev, gras_datadesc_get_name(payload_request),
                 gras_datadesc_get_name(msgtype->ctn_type));
 
     xbt_assert(!gras_datadesc_type_cmp
                 (msgtype->answer_type, payload_answer),
-                "Message %s re-registred with another answer payload (%s was %s)",
+                "Message %s re-registered with another answer payload (%s was %s)",
                 namev, gras_datadesc_get_name(payload_answer),
                 gras_datadesc_get_name(msgtype->answer_type));
 
@@ -196,22 +184,14 @@ gras_msgtype_t gras_msgtype_by_namev(const char *name, short int version)
 {
   gras_msgtype_t res = NULL;
   char *namev = make_namev(name, version);
-  volatile int found = 0;
-  xbt_ex_t e;
-
-  TRY {
-    res = (gras_msgtype_t) xbt_set_get_by_name(_gras_msgtype_set, namev);
-    found = 1;
-  }
-  CATCH(e) {
-    xbt_ex_free(e);
-  }
-  if (!found)
-    THROWF(not_found_error, 0, "No registred message of that name: %s",
-           name);
 
+  res = (gras_msgtype_t) xbt_set_get_by_name_or_null(_gras_msgtype_set, namev);
   free(namev);
 
+  if (res == NULL)
+    THROWF(not_found_error, 0, "No registered message of that name: %s",
+           name);
+
   return res;
 }
 
index b760e08..a124213 100644 (file)
@@ -130,7 +130,7 @@ gras_msg_cb_ctx_t gras_msg_cb_ctx_new(gras_socket_t expe,
 #include "xbt/mallocator.h"
 extern xbt_mallocator_t gras_msg_ctx_mallocator;
 void *gras_msg_ctx_mallocator_new_f(void);
-void gras_msg_ctx_mallocator_free_f(void *dict);
+#define gras_msg_ctx_mallocator_free_f xbt_free_f
 void gras_msg_ctx_mallocator_reset_f(void *dict);
 
 
index 8c7e72c..c84c605 100644 (file)
@@ -104,11 +104,6 @@ void *gras_msg_ctx_mallocator_new_f(void)
   return xbt_new0(s_gras_msg_cb_ctx_t, 1);
 }
 
-void gras_msg_ctx_mallocator_free_f(void *ctx)
-{
-  xbt_free(ctx);
-}
-
 void gras_msg_ctx_mallocator_reset_f(void *ctx)
 {
   memset(ctx, 0, sizeof(s_gras_msg_cb_ctx_t));
index 3c97260..1fff6ea 100644 (file)
@@ -185,7 +185,7 @@ double gras_msg_timer_handle(void)
                timer->action);
         xbt_dynar_cursor_rm(pd->timers, &cursor);
       }
-      (*action) ();
+      action();
       return 0.0;
     } else if (untilthis < untilnext || untilnext == -1) {
       untilnext = untilthis;
index ef7e7cc..b090bfd 100644 (file)
@@ -52,14 +52,14 @@ static void gras_trp_plugin_new(const char *name, gras_trp_setup_t setup)
   }
 
   if (plug)
-    xbt_dict_set(_gras_trp_plugins, name, plug, gras_trp_plugin_free);
+    xbt_dict_set(_gras_trp_plugins, name, plug, NULL);
 }
 
 void gras_trp_init(void)
 {
   if (!_gras_trp_started) {
     /* make room for all plugins */
-    _gras_trp_plugins = xbt_dict_new();
+    _gras_trp_plugins = xbt_dict_new_homogeneous(gras_trp_plugin_free);
 
 #ifdef HAVE_WINSOCK2_H
     /* initialize the windows mechanism */
@@ -395,7 +395,7 @@ void gras_socket_close(gras_socket_t sock)
 void gras_trp_send(gras_socket_t sd, char *data, long int size, int stable)
 {
   xbt_assert(sd->outgoing, "Socket not suited for data send");
-  (*sd->plugin->send) (sd, data, size, stable);
+  sd->plugin->send(sd, data, size, stable);
 }
 
 /**
@@ -429,7 +429,7 @@ int gras_socket_my_port(gras_socket_t sock)
 {
   if (!sock->plugin->my_port)
     THROWF(unknown_error,0,"Function my_port unimplemented in plugin %s",sock->plugin->name);
-  return (*sock->plugin->my_port)(sock);
+  return sock->plugin->my_port(sock);
 
 }
 
@@ -437,23 +437,23 @@ int gras_socket_peer_port(gras_socket_t sock)
 {
   if (!sock->plugin->peer_port)
     THROWF(unknown_error,0,"Function peer_port unimplemented in plugin %s",sock->plugin->name);
-  return (*sock->plugin->peer_port)(sock);
+  return sock->plugin->peer_port(sock);
 }
 
 const char *gras_socket_peer_name(gras_socket_t sock)
 {
   xbt_assert(sock->plugin);
-  return (*sock->plugin->peer_name)(sock);
+  return sock->plugin->peer_name(sock);
 }
 
 const char *gras_socket_peer_proc(gras_socket_t sock)
 {
-  return (*sock->plugin->peer_proc)(sock);
+  return sock->plugin->peer_proc(sock);
 }
 
 void gras_socket_peer_proc_set(gras_socket_t sock, char *peer_proc)
 {
-  return (*sock->plugin->peer_proc_set)(sock,peer_proc);
+  return sock->plugin->peer_proc_set(sock,peer_proc);
 }
 
 /** \brief Check if the provided socket is a measurement one (or a regular one) */
@@ -505,7 +505,7 @@ void gras_socket_meas_send(gras_socket_t peer,
             "Sent %lu msgs of %lu (size of each: %ld) to %s:%d",
             sent_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
             gras_socket_peer_port(peer));
-    (*peer->plugin->raw_send) (peer, chunk, msg_size);
+    peer->plugin->raw_send(peer, chunk, msg_size);
   }
   XBT_CDEBUG(gras_trp_meas,
           "Sent %lu msgs of %lu (size of each: %ld) to %s:%d", sent_sofar,
index 3f90e48..0ec86e3 100644 (file)
@@ -274,10 +274,8 @@ void gras_trp_sg_socket_close(gras_socket_t sock)
         ("socket_close called on the unknown incoming socket %p (port=%d)",
          sock, sockdata->server_port);
   }
-  if (sock->data) {
-    /* FIXME: kill the rdv point if receiver side */
-    free(sock->data);
-  }
+  /* FIXME: kill the rdv point if receiver side */
+  free(sock->data);
   XBT_OUT();
 }
 
@@ -373,8 +371,7 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock,
   if (data)
     memcpy(data, msg_got->payl, size);
 
-  if (msg_got->payl)
-    xbt_free(msg_got->payl);
+  xbt_free(msg_got->payl);
 
   xbt_free(msg_got);
   SIMIX_req_mutex_unlock(remote_sock_data->mutex);
index ad90f80..b74bf90 100644 (file)
@@ -303,8 +303,7 @@ static void gras_trp_sock_socket_close(gras_socket_t sock)
   if (!sock)
     return;                     /* close only once */
 
-  if (((gras_trp_tcp_sock_data_t)sock->data)->peer_name)
-    free(((gras_trp_tcp_sock_data_t)sock->data)->peer_name);
+  free(((gras_trp_tcp_sock_data_t)sock->data)->peer_name);
   free(sock->data);
 
   XBT_VERB("close tcp connection %d", sock->sd);
@@ -757,25 +756,23 @@ void gras_trp_buf_socket_close(gras_socket_t sock)
           data->in_buf.size - data->in_buf.pos,
           data->in_buf.size, data->in_buf.pos);
   }
-  if (data->in_buf.data)
-    free(data->in_buf.data);
+  free(data->in_buf.data);
 
   if (data->out_buf.size != data->out_buf.pos) {
     XBT_DEBUG("Flush the socket before closing (in=%d,out=%d)",
            data->in_buf.size, data->out_buf.size);
     gras_trp_bufiov_flush(sock);
   }
-  if (data->out_buf.data)
-    free(data->out_buf.data);
+  free(data->out_buf.data);
 
 #ifdef HAVE_READV
   if (data->in_buf_v) {
-    if (xbt_dynar_length(data->in_buf_v))
+    if (!xbt_dynar_is_empty(data->in_buf_v))
       XBT_WARN("Socket closed, but some bytes were unread");
     xbt_dynar_free(&data->in_buf_v);
   }
   if (data->out_buf_v) {
-    if (xbt_dynar_length(data->out_buf_v)) {
+    if (!xbt_dynar_is_empty(data->out_buf_v)) {
       XBT_DEBUG("Flush the socket before closing");
       gras_trp_bufiov_flush(sock);
     }
index 2a2feb5..cd48084 100644 (file)
@@ -187,7 +187,7 @@ static void moddata_freep(void *p)
   int id = xbt_dynar_search(pd->moddata, p);
   gras_module_t mod = (gras_module_t) xbt_set_get_by_id(_gras_modules, id);
 
-  (*mod->leave_f) (gras_moddata_by_id(id));
+  mod->leave_f(gras_moddata_by_id(id));
 }
 
 void gras_module_join(const char *name)
@@ -204,7 +204,7 @@ void gras_module_join(const char *name)
     XBT_VERB("Init module %s", name);
     mod->name = xbt_strdup(name);
 
-    (*mod->init_f) ();
+    mod->init_f();
   } else {
     XBT_DEBUG("Module %s already inited. Refcount=%d ID=%d",
            mod->name, mod->refcount, *(mod->p_id));
@@ -221,7 +221,7 @@ void gras_module_join(const char *name)
 
   xbt_dynar_set(pd->moddata, *(mod->p_id), &moddata);
 
-  (*mod->join_f) (moddata);
+  mod->join_f(moddata);
 
   XBT_DEBUG("Module %s joined successfully (ID=%d)", name, *(mod->p_id));
 }
@@ -236,14 +236,14 @@ void gras_module_leave(const char *name)
 
   /* LEAVE */
   moddata = gras_moddata_by_id(*(mod->p_id));
-  (*mod->leave_f) (moddata);
+  mod->leave_f(moddata);
 
   /* EXIT */
   mod->refcount--;
   if (!mod->refcount) {
     XBT_VERB("Exit module %s", name);
 
-    (*mod->exit_f) ();
+    mod->exit_f();
 
     /* Don't remove the module for real, sets don't allow to
 
index de2085b..fef78be 100644 (file)
@@ -124,7 +124,6 @@ void gras_procdata_init()
 
   unsigned int cursor;
 
-  xbt_ex_t e;
   xbt_set_elm_t elem;
 
   if (!pd->libdata) {
@@ -133,7 +132,6 @@ void gras_procdata_init()
   }
 
   xbt_dynar_foreach(_gras_procdata_fabrics, cursor, fab) {
-    volatile int found = 0;
 
     if (cursor + 1 <= xbt_set_length(pd->libdata)) {
       XBT_DEBUG("Skip fabric %d: there is already %ld libdata",
@@ -146,20 +144,13 @@ void gras_procdata_init()
     xbt_assert(fab.name, "Name of fabric #%d is NULL!", cursor);
     XBT_DEBUG("Create the procdata for %s", fab.name);
     /* Check for our own errors */
-    TRY {
-      xbt_set_get_by_name(pd->libdata, fab.name);
-      found = 1;
-    }
-    CATCH(e) {
-      xbt_ex_free(e);
-      found = 0;
-    }
-    if (found)
+
+    if (xbt_set_get_by_name_or_null(pd->libdata, fab.name) != NULL)
       THROWF(unknown_error, 0,
              "MayDay: two modules use '%s' as libdata name", fab.name);
 
     /* Add the data in place, after some more sanity checking */
-    elem = (*(fab.constructor)) ();
+    elem = fab.constructor();
     if (elem->name_len && elem->name_len != strlen(elem->name)) {
       elem->name_len = strlen(elem->name);
       XBT_WARN
@@ -188,8 +179,7 @@ void gras_procdata_exit()
 const char *gras_os_hostport()
 {
   static char *res = NULL;
-  if (res)
-    free(res);                  /* my port may have changed */
+  free(res);                  /* my port may have changed */
   res = bprintf("%s:%d", gras_os_myname(), gras_os_myport());
   return (const char *) res;
 }
index db5148e..cc364ce 100644 (file)
@@ -39,8 +39,8 @@ void gras_process_init()
   gras_procdata_init();
 
   /* initialize the host & process properties */
-  _host_properties = xbt_dict_new();
-  _process_properties = xbt_dict_new();
+  _host_properties = xbt_dict_new_homogeneous(xbt_free_f);
+  _process_properties = xbt_dict_new_homogeneous(xbt_free_f);
   env_iter = environ;
   while (*env_iter) {
     char *equal, *buf = xbt_strdup(*env_iter);
@@ -52,8 +52,7 @@ void gras_process_init()
       continue;
     }
     *equal = '\0';
-    xbt_dict_set(_process_properties, buf, xbt_strdup(equal + 1),
-                 xbt_free_f);
+    xbt_dict_set(_process_properties, buf, xbt_strdup(equal + 1), NULL);
     free(buf);
     env_iter++;
   }
@@ -103,7 +102,7 @@ typedef struct {
 
 static void *spawner_wrapper(void *data) {
   spawner_wrapper_args *a = data;
-  (*(a->code))(a->argc,a->argv);
+  a->code(a->argc, a->argv);
   free(a);
   return NULL;
 }
index 63d8b77..7d55dee 100644 (file)
@@ -41,15 +41,14 @@ static unsigned int locbufsize;
 void gras_emul_init(void)
 {
   if (!benchmark_set) {
-    benchmark_set = xbt_dict_new();
+    benchmark_set = xbt_dict_new_homogeneous(xbt_free_f);
     timer = xbt_os_timer_new();
   }
 }
 
 void gras_emul_exit(void)
 {
-  if (locbuf)
-    free(locbuf);
+  free(locbuf);
   xbt_dict_free(&benchmark_set);
   xbt_os_timer_free(timer);
 }
@@ -62,7 +61,7 @@ static void store_in_dict(xbt_dict_t dict, const char *key, double value)
   ir = xbt_dict_get_or_null(dict, key);
   if (!ir) {
     ir = xbt_new0(double, 1);
-    xbt_dict_set(dict, key, ir, xbt_free_f);
+    xbt_dict_set(dict, key, ir, NULL);
   }
   *ir = value;
 }
index 1ea5b26..3d70daa 100644 (file)
@@ -38,6 +38,7 @@ void gras_agent_spawn(const char *name,
 
 void gras_process_init()
 {
+  smx_process_t self = SIMIX_process_self();
   gras_hostdata_t *hd =
       (gras_hostdata_t *) SIMIX_host_self_get_data();
   gras_procdata_t *pd = xbt_new0(gras_procdata_t, 1);
@@ -54,13 +55,13 @@ void gras_process_init()
     hd->refcount++;
   }
 
-  SIMIX_process_self_set_data((void *) pd);
+  SIMIX_process_self_set_data(self, (void *) pd);
   gras_procdata_init();
 
   trp_pd = (gras_trp_procdata_t) gras_libdata_by_name("gras_trp");
   pd->pid = pid;
 
-  if (SIMIX_process_self() != NULL) {
+  if (self != NULL) {
     pd->ppid = gras_os_getpid();
   } else
     pd->ppid = -1;
@@ -100,7 +101,7 @@ void gras_process_exit()
   XBT_VERB("GRAS: Finalizing process '%s' (%d)",
         SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid());
 
-  if (xbt_dynar_length(msg_pd->msg_queue)) {
+  if (!xbt_dynar_is_empty(msg_pd->msg_queue)) {
     unsigned int cpt;
     s_gras_msg_t msg;
     XBT_WARN
@@ -179,7 +180,7 @@ xbt_dict_t gras_process_properties(void)
 int gras_os_getpid(void)
 {
   gras_procdata_t *data;
-  data = (gras_procdata_t *) SIMIX_process_self_get_data();
+  data = (gras_procdata_t *) SIMIX_process_self_get_data(SIMIX_process_self());
   if (data != NULL)
     return data->pid;
 
index 503651b..c810ef1 100644 (file)
@@ -68,6 +68,10 @@ XBT_LOG_EXTERNAL_CATEGORY(gras_virtu);
 XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_emul);
 XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_process);
 
+/**
+ * @ingroup GRAS_API
+ * \brief Initialize the gras mechanisms.
+ */
 void gras_init(int *argc, char **argv)
 {
   int first = 0;
@@ -143,6 +147,10 @@ void gras_init(int *argc, char **argv)
   pd->listener = gras_msg_listener_launch(msg_pd->msg_received);
 }
 
+/**
+ * @ingroup GRAS_API
+ * @brief Finalize the gras mechanisms.
+ * */
 void gras_exit(void)
 {
   XBT_INFO("Exiting GRAS");
@@ -167,8 +175,7 @@ const char *hexa_str(unsigned char *data, int size, int downside)
   int begin, increment;
 
   if (buffsize < 5 * (size + 1)) {
-    if (buff)
-      free(buff);
+    free(buff);
     buffsize = 5 * (size + 1);
     buff = xbt_malloc(buffsize);
   }
index d9b8c01..073cbd5 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id: datatypes.h 5497 2008-05-26 12:19:15Z cristianrosa $        */
-
 /* Copyright (c) 2008 Martin Quinson, Cristian Rosa.
    All rights reserved.                                          */
 
index d4c01ff..76d7f40 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id: simix.h 5497 2008-05-26 12:19:15Z cristianrosa $    */
-
 /* Copyright (c) 2008 Martin Quinson, Cristian Rosa.
    All rights reserved.                                          */
 
diff --git a/src/include/simgrid/platf_interface.h b/src/include/simgrid/platf_interface.h
new file mode 100644 (file)
index 0000000..a2ae6f2
--- /dev/null
@@ -0,0 +1,45 @@
+/* platf_interface.h - Internal interface to the SimGrid platforms          */
+
+/* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010, 2011. 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 SG_PLATF_INTERFACE_H
+#define SG_PLATF_INTERFACE_H
+
+#include "simgrid/platf.h" /* public interface */
+
+/* Module management functions */
+void sg_platf_init(void);
+void sg_platf_exit(void);
+
+/* Managing the parsing callbacks */
+
+typedef void (*sg_platf_host_cb_t)(sg_platf_host_cbarg_t);
+typedef void (*sg_platf_router_cb_t)(sg_platf_router_cbarg_t);
+typedef void (*sg_platf_link_cb_t)(sg_platf_link_cbarg_t);
+typedef void (*sg_platf_peer_cb_t)(sg_platf_peer_cbarg_t);
+typedef void (*sg_platf_cluster_cb_t)(sg_platf_cluster_cbarg_t);
+typedef void (*sg_platf_AS_begin_cb_t)(const char*id, const char*routing);
+
+void sg_platf_host_add_cb(sg_platf_host_cb_t);
+void sg_platf_router_add_cb(sg_platf_router_cb_t);
+void sg_platf_link_add_cb(sg_platf_link_cb_t);
+void sg_platf_peer_add_cb(sg_platf_peer_cb_t fct);
+void sg_platf_cluster_add_cb(sg_platf_cluster_cb_t fct);
+void sg_platf_postparse_add_cb(void_f_void_t fct);
+void sg_platf_AS_begin_add_cb(sg_platf_AS_begin_cb_t fct);
+void sg_platf_AS_end_add_cb(void_f_void_t fct);
+
+/** \brief Pick the right models for CPU, net and workstation, and call their model_init_preparse
+ *
+ * Must be called within parsing/creating the environment (after the <config>s, if any, and before <AS> or friends such as <cluster>)
+ */
+void surf_config_models_setup(void);
+
+
+
+
+#endif                          /* SG_PLATF_INTERFACE_H */
index ff6bd66..bac2778 100644 (file)
@@ -29,7 +29,6 @@ typedef struct lmm_constraint *lmm_constraint_t;
 typedef struct lmm_system *lmm_system_t;
 
 typedef struct tmgr_history *tmgr_history_t;
-typedef struct tmgr_trace *tmgr_trace_t;
 typedef struct tmgr_trace_event *tmgr_trace_event_t;
 
 
index 2a7e6dd..5ebf9da 100644 (file)
@@ -31,7 +31,7 @@ static XBT_INLINE int double_equals(double value1, double value2)
   return (fabs(value1 - value2) < MAXMIN_PRECISION);
 }
 
-XBT_PUBLIC(lmm_system_t) lmm_system_new(void);
+XBT_PUBLIC(lmm_system_t) lmm_system_new(int selective_update);
 XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
 void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var);
 
index 10e9b3a..5f5ee04 100644 (file)
 #include "surf/datatypes.h"
 #include "xbt/lib.h"
 #include "surf/surf_routing.h"
+#include "simgrid/platf_interface.h"
 
 SG_BEGIN_DECL()
 /* Actions and models are highly connected structures... */
-typedef enum {
-  SURF_RESOURCE_ON = 1,                   /**< Up & ready        */
-  SURF_RESOURCE_OFF = 0                   /**< Down & broken     */
-} e_surf_resource_state_t;
-
-typedef enum {
-  SURF_LINK_FULLDUPLEX = 2,
-  SURF_LINK_SHARED = 1,
-  SURF_LINK_FATPIPE = 0
-} e_surf_link_sharing_policy_t;
 
 typedef enum {
   SURF_NETWORK_ELEMENT_NULL = 0,        /* NULL */
@@ -37,8 +28,8 @@ typedef enum {
   SURF_NETWORK_ELEMENT_AS,      /* AS type */
 } e_surf_network_element_type_t;
 
-XBT_PUBLIC(e_surf_network_element_type_t) get_network_element_type(const char
-                                                              *name);
+XBT_PUBLIC(e_surf_network_element_type_t)
+  routing_get_network_element_type(const char *name);
 
 /** @Brief Specify that we use that action */
 XBT_PUBLIC(void) surf_action_ref(surf_action_t action);
@@ -57,14 +48,9 @@ XBT_PUBLIC(void *) surf_action_new(size_t size, double cost,
 typedef struct surf_model_description {
   const char *name;
   const char *description;
-  surf_model_t model;
-  void (*model_init_preparse) (const char *filename);
-  void (*model_init_postparse) (void);
+  void_f_void_t model_init_preparse;
 } s_surf_model_description_t, *surf_model_description_t;
 
-XBT_PUBLIC(void) update_model_description(s_surf_model_description_t *
-                                          table, const char *name,
-                                          surf_model_t model);
 XBT_PUBLIC(int) find_model_description(s_surf_model_description_t * table,
                                        const char *name);
 XBT_PUBLIC(void) model_help(const char *category,
@@ -169,7 +155,7 @@ typedef struct surf_cpu_model_extension_public {
   e_surf_resource_state_t(*get_state) (void *cpu);
   double (*get_speed) (void *cpu, double load);
   double (*get_available_speed) (void *cpu);
-  void (*create_resource) (char *name, double power_peak,
+  void* (*create_resource) (const char *name, double power_peak,
                            double power_scale,
                            tmgr_trace_t power_trace,
                            int core,
@@ -190,12 +176,12 @@ typedef struct surf_network_model_extension_public {
   surf_action_t(*communicate) (const char *src_name,
                                const char *dst_name,
                                double size, double rate);
-  xbt_dynar_t(*get_route) (const char *src_name, const char *dst_name);
+  xbt_dynar_t(*get_route) (const char *src_name, const char *dst_name); //FIXME: kill field? That is done by the routing nowadays
   double (*get_link_bandwidth) (const void *link);
   double (*get_link_latency) (const void *link);
   int (*link_shared) (const void *link);
   void (*add_traces) (void);
-  void (*create_resource) (char *name,
+  void* (*create_resource) (const char *name,
                            double bw_initial,
                            tmgr_trace_t bw_trace,
                            double lat_initial,
@@ -222,6 +208,7 @@ typedef struct surf_workstation_model_extension_public {
    surf_action_t(*communicate) (void *workstation_src,                                     /**< Execute a communication amount between two workstations */
                                 void *workstation_dst, double size,
                                 double max_rate);
+   // FIXME: kill next field, which duplicates the routing
    xbt_dynar_t(*get_route) (void *workstation_src, void *workstation_dst);                 /**< Get the list of links between two ws */
 
    surf_action_t(*execute_parallel_task) (int workstation_nb,                              /**< Execute a parallel task on several workstations */
@@ -233,7 +220,7 @@ typedef struct surf_workstation_model_extension_public {
   double (*get_link_latency) (const void *link);                                           /**< Return the current latency of a network link */
   int (*link_shared) (const void *link);
    xbt_dict_t(*get_properties) (const void *resource);
-  void (*link_create_resource) (char *name,
+  void* (*link_create_resource) (const char *name,
                                 double bw_initial,
                                 tmgr_trace_t bw_trace,
                                 double lat_initial,
@@ -243,7 +230,7 @@ typedef struct surf_workstation_model_extension_public {
                                 tmgr_trace_t state_trace,
                                 e_surf_link_sharing_policy_t
                                 policy, xbt_dict_t properties);
-  void (*cpu_create_resource) (char *name, double power_peak,
+  void* (*cpu_create_resource) (const char *name, double power_peak,
                                double power_scale,
                                tmgr_trace_t power_trace,
                                e_surf_resource_state_t state_initial,
@@ -351,28 +338,41 @@ XBT_PUBLIC_DATA(surf_model_t) surf_cpu_model;
 /** \brief Initializes the CPU model with the model Cas01
  *  \ingroup SURF_models
  *
+ *  By default, this model uses the lazy optimization mechanism that
+ *  relies on partial invalidation in LMM and a heap for lazy action update.
+ *  You can change this behavior by setting the cpu/optim configuration
+ *  variable to a different value.
+ *
  *  This function is called by surf_workstation_model_init_CLM03
  *  so you shouldn't have to call it by yourself.
  *
  *  \see surf_workstation_model_init_CLM03()
  */
-XBT_PUBLIC(void) surf_cpu_model_init_Cas01(const char *filename);
+XBT_PUBLIC(void) surf_cpu_model_init_Cas01(void);
 
-/** \brief Initializes the CPU model with trace integration
+/** \brief Initializes the CPU model with trace integration [Deprecated]
  *  \ingroup SURF_models
  *
+ *  You shouldn't have to call it by yourself.
+ *  \see surf_workstation_model_init_CLM03()
  */
-XBT_PUBLIC(void) surf_cpu_model_init_ti(const char *filename);
+XBT_PUBLIC(void) surf_cpu_model_init_ti(void);
 
-/** \brief Initializes the CPU model with the model Cas01 Improved. This model uses a heap to order the events, decreasing the time complexity to get the minimum next event.
- *  \ingroup SURF_models
+/** \brief This function call the share resources function needed
  *
- *  This function is called by surf_workstation_model_init_CLM03
- *  so you shouldn't have to call it by yourself.
+ */
+XBT_PUBLIC(double) generic_share_resources(double now);
+
+/** \brief This function call the update action state function needed
  *
- *  \see surf_workstation_model_init_CLM03()
  */
-XBT_PUBLIC(void) surf_cpu_model_init_Cas01_im(const char *filename);
+XBT_PUBLIC(void)   generic_update_actions_state(double now, double delta);
+
+/** \brief The list of all available optimization modes (both for cpu and networks).
+ *  \ingroup SURF_models
+ *  These optimization modes can be set using --cfg=cpu/optim:... and --cfg=network/optim:...
+ */
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_optimization_mode_description[];
 
 /** \brief The list of all available cpu model models
  *  \ingroup SURF_models
@@ -398,47 +398,29 @@ XBT_PUBLIC_DATA(surf_model_t) surf_network_model;
 
 /** \brief Same as network model 'LagrangeVelho', only with different correction factors.
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  * This model is proposed by Pierre-Nicolas Clauss and Martin Quinson and Stéphane Génaud
  * based on the model 'LV08' and different correction factors depending on the communication
  * size (< 1KiB, < 64KiB, >= 64KiB).
+ * See comments in the code for more information.
  *
  *  \see surf_workstation_model_init_SMPI()
  */
-XBT_PUBLIC(void) surf_network_model_init_SMPI(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_SMPI(void);
 
-/** \brief Initializes the platform with the network model 'LagrangeVelho'
+/** \brief Initializes the platform with the network model 'LegrandVelho'
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  * This model is proposed by Arnaud Legrand and Pedro Velho based on
  * the results obtained with the GTNets simulator for onelink and
- * dogbone sharing scenarios.
- *
- *  \see surf_workstation_model_init_LegrandVelho()
- */
-XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(const char
-                                                      *filename);
-
-
-/** \brief Initializes the platform with the network model 'LV08_im'
- *  \ingroup SURF_models
- *  \param filename XML platform file name
- *
- * This model is adds the lazy management improvement to Legrand and
- * Velho model. This improvement essentially replaces the list of actions
- * inside the simulation kernel by a heap in order to reduce the complexity
- * at each iteration of the simulation kernel.
+ * dogbone sharing scenarios. See comments in the code for more information.
  *
  *  \see surf_workstation_model_init_LegrandVelho()
  */
-XBT_PUBLIC(void) im_surf_network_model_init_LegrandVelho(const char
-                                                      *filename);
+XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void);
 
 /** \brief Initializes the platform with the network model 'Constant'
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  *  In this model, the communication time between two network cards is
  *  constant, hence no need for a routing table. This is particularly
@@ -448,18 +430,18 @@ XBT_PUBLIC(void) im_surf_network_model_init_LegrandVelho(const char
  *
  *  \see surf_workstation_model_init_compound()
  */
-XBT_PUBLIC(void) surf_network_model_init_Constant(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_Constant(void);
 
 /** \brief Initializes the platform with the network model CM02
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  *  This function is called by surf_workstation_model_init_CLM03
  *  or by yourself only if you plan using surf_workstation_model_init_compound
+ *  See comments in the code for more information.
  *
  *  \see surf_workstation_model_init_CLM03()
  */
-XBT_PUBLIC(void) surf_network_model_init_CM02(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_CM02(void);
 
 /**
  * brief initialize the the network model bypassing the XML parser
@@ -478,7 +460,7 @@ XBT_PUBLIC(void) surf_network_model_init_bypass(const char *id,
  *
  *  \see surf_workstation_model_init_GTNETS()
  */
-XBT_PUBLIC(void) surf_network_model_init_GTNETS(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_GbTNETS(void);
 #endif
 
 #ifdef HAVE_NS3
@@ -491,7 +473,7 @@ XBT_PUBLIC(void) surf_network_model_init_GTNETS(const char *filename);
  *
  *  \see surf_workstation_model_init_NS3()
  */
-XBT_PUBLIC(void) surf_network_model_init_NS3(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_NS3(void);
 
 XBT_PUBLIC(void) parse_ns3_add_host(void);
 XBT_PUBLIC(void) parse_ns3_add_router(void);
@@ -520,7 +502,7 @@ XBT_PUBLIC(double) ns3_get_link_bandwidth(const void *link);
  *  Call this function only if you plan using surf_workstation_model_init_compound.
  *
  */
-XBT_PUBLIC(void) surf_network_model_init_Reno(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_Reno(void);
 
 /** \brief Initializes the platform with the network model Reno2
  *  \ingroup SURF_models
@@ -535,7 +517,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno(const char *filename);
  *  Call this function only if you plan using surf_workstation_model_init_compound.
  *
  */
-XBT_PUBLIC(void) surf_network_model_init_Reno2(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_Reno2(void);
 
 /** \brief Initializes the platform with the network model Vegas
  *  \ingroup SURF_models
@@ -551,7 +533,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno2(const char *filename);
  *  Call this function only if you plan using surf_workstation_model_init_compound.
  *
  */
-XBT_PUBLIC(void) surf_network_model_init_Vegas(const char *filename);
+XBT_PUBLIC(void) surf_network_model_init_Vegas(void);
 
 /** \brief The list of all available network model models
  *  \ingroup SURF_models
@@ -572,54 +554,46 @@ XBT_PUBLIC_DATA(surf_model_t) surf_workstation_model;
 
 /** \brief Initializes the platform with a compound workstation model
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  *  This function should be called after a cpu_model and a
  *  network_model have been set up.
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_compound(const char
-                                                      *filename);
+XBT_PUBLIC(void) surf_workstation_model_init_compound(void);
 
-/** \brief Initializes the platform with the workstation model CLM03
+/** \brief Initializes the platform with the current best network and cpu models at hand
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  *  This platform model seperates the workstation model and the network model.
- *  The workstation model will be initialized with the model CLM03, the network
- *  model with the model CM02 and the CPU model with the model Cas01.
- *  In future releases, some other network models will be implemented and will be
- *  combined with the workstation model CLM03.
+ *  The workstation model will be initialized with the model compound, the network
+ *  model with the model LV08 (with cross traffic support) and the CPU model with
+ *  the model Cas01.
+ *  Such model is subject to modification with warning in the ChangeLog so monitor it!
  *
- *  \see surf_workstation_model_init_KCCFLN05()
  */
-XBT_PUBLIC(void) surf_workstation_model_init_CLM03(const char *filename);
+XBT_PUBLIC(void) surf_workstation_model_init_current_default(void);
 
-/** \brief Initializes the platform with the model KCCFLN05
+/** \brief Initializes the platform with the workstation model CLM03
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
- *  With this model, the workstations and the network are handled
- *  together. The network model is roughly the same as in CM02 but
- *  interference between computations and communications can be taken
- *  into account. This platform model is the default one for MSG and
- *  SimDag.
+ *  This platform model seperates the workstation model and the network model.
+ *  The workstation model will be initialized with the model CLM03, the network
+ *  model with the model CM02 and the CPU model with the model Cas01.
+ *  In future releases, some other network models will be implemented and will be
+ *  combined with the workstation model CLM03.
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_KCCFLN05(const char
-                                                      *filename);
+XBT_PUBLIC(void) surf_workstation_model_init_CLM03(void);
 
 /** \brief Initializes the platform with the model KCCFLN05
  *  \ingroup SURF_models
- *  \param filename XML platform file name
  *
  *  With this model, only parallel tasks can be used. Resource sharing
  *  is done by identifying bottlenecks and giving an equal share of
  *  the model to each action.
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(const char
-                                                       *filename);
+XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(void);
 
 /** \brief The list of all available workstation model models
  *  \ingroup SURF_models
@@ -645,29 +619,12 @@ XBT_PUBLIC_DATA(xbt_cfg_t) _surf_cfg_set;
  *  This function has to be called to initialize the common
  *  structures.  Then you will have to create the environment by
  *  calling 
- *  e.g. surf_workstation_model_init_CLM03() or
- *  surf_workstation_model_init_KCCFLN05().
+ *  e.g. surf_workstation_model_init_CLM03()
  *
- *  \see surf_workstation_model_init_CLM03(),
- *  surf_workstation_model_init_KCCFLN05(), surf_workstation_model_init_compound(), surf_exit()
+ *  \see surf_workstation_model_init_CLM03(), surf_workstation_model_init_compound(), surf_exit()
  */
 XBT_PUBLIC(void) surf_init(int *argc, char **argv);     /* initialize common structures */
 
-/** \brief Initialize the used models.
- *
- * Must be called after the surf_init so that configuration infrastructure is created
- * Must be called before parsing/creating the environment
- * Must not be called within the initialization process so that the use get a chance to change the settings from
- * its code between, say, MSG_init and MSG_create_environment using MSG_config
- */
-XBT_PUBLIC(void) surf_config_models_setup(const char *platform_file);
-
-/** \brief create the elements of the models
- *
- * Must be called after parsing the platform file and before using any elements
- */
-XBT_PUBLIC(void) surf_config_models_create_elms(void);
-
 /** \brief Finish simulation initialization
  *  \ingroup SURF_simulation
  *
@@ -706,9 +663,7 @@ XBT_PUBLIC(void) surf_exit(void);
 
 /* Prototypes of the functions that handle the properties */
 XBT_PUBLIC_DATA(xbt_dict_t) current_property_set;       /* the prop set for the currently parsed element (also used in SIMIX) */
-XBT_PUBLIC_DATA(void) parse_properties(const char* prop_id, const char* prop_value);
-XBT_PUBLIC_DATA(void) parse_properties_XML(void);
-XBT_PUBLIC_DATA(void) parse_properties_lua(const char* prop_id, const char* prop_value);
+XBT_PUBLIC(void) parse_properties(void);
 
 /* surf parse file related (public because called from a test suite) */
 XBT_PUBLIC(void) parse_platform_file(const char *file);
@@ -727,112 +682,5 @@ XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_latency;
 
 XBT_PUBLIC(double) get_cpu_power(const char *power);
 
-/*public interface to create resource bypassing the parser via cpu/network model
- *
- * see surfxml_parse.c
- * */
-XBT_PUBLIC(void) surf_host_create_resource(char *name, double power_peak,
-                                           double power_scale,
-                                           tmgr_trace_t power_trace,
-                                           int core,
-                                           e_surf_resource_state_t
-                                           state_initial,
-                                           tmgr_trace_t state_trace,
-                                           xbt_dict_t cpu_properties);
-
-/*public interface to create resource bypassing the parser via workstation_ptask_L07 model
- *
- * see surfxml_parse.c
- * */
-XBT_PUBLIC(void) surf_wsL07_host_create_resource(char *name,
-                                                 double power_peak,
-                                                 double power_scale,
-                                                 tmgr_trace_t power_trace,
-                                                 e_surf_resource_state_t
-                                                 state_initial,
-                                                 tmgr_trace_t state_trace,
-                                                 xbt_dict_t
-                                                 cpu_properties);
-/**
- * create link resource
- * see surfxml_parse.c
- */
-XBT_PUBLIC(void) surf_link_create_resource(char *name,
-                                           double bw_initial,
-                                           tmgr_trace_t bw_trace,
-                                           double lat_initial,
-                                           tmgr_trace_t lat_trace,
-                                           e_surf_resource_state_t
-                                           state_initial,
-                                           tmgr_trace_t state_trace,
-                                           e_surf_link_sharing_policy_t
-                                           policy, xbt_dict_t properties);
-
-
-XBT_PUBLIC(void) surf_wsL07_link_create_resource(char *name,
-                                                 double bw_initial,
-                                                 tmgr_trace_t bw_trace,
-                                                 double lat_initial,
-                                                 tmgr_trace_t lat_trace,
-                                                 e_surf_resource_state_t
-                                                 state_initial,
-                                                 tmgr_trace_t state_trace,
-                                                 e_surf_link_sharing_policy_t
-                                                 policy,
-                                                 xbt_dict_t properties);
-/**
- * add route element (link_ctn) bypassing the parser
- *
- * see surfxml_parse.c
- *
- */
-XBT_PUBLIC(void) surf_add_route_element(char *link_ctn_id);
-
-/**
- * set route src_id,dest_id, and create a route resource
- *
- * see surf_routing.c && surfxml_parse.c
- */
-
-XBT_PUBLIC(void) surf_set_routes(void);
-
-
-/**
- * add traces
- * see surfxml_parse.c
- */
-XBT_PUBLIC(void) surf_add_host_traces(void);
-XBT_PUBLIC(void) surf_add_link_traces(void);
-XBT_PUBLIC(void) surf_wsL07_add_traces(void);
-
-/*
- * init AS from lua console
- * see surf_routing.c
- */
-XBT_PUBLIC(void) routing_AS_init(const char *id, const char *mode);
-XBT_PUBLIC(void) routing_AS_end(const char *id);
-// add host to network element list
-XBT_PUBLIC(void) routing_add_host(const char *host_id);
-//Set a new link on the actual list of link for a route or ASroute
-XBT_PUBLIC(void) routing_add_link(const char *link_id);
-//Set the endpoints for a route
-XBT_PUBLIC(void) routing_set_route(const char *src_id, const char *dst_id);
-//Store the route
-XBT_PUBLIC(void) routing_store_route(void);
-
-/*
- * interface between surf and lua bindings
- * see surfxml_parse.c
- */
-XBT_PUBLIC(void) surf_AS_new(const char *id, const char *mode);
-XBT_PUBLIC(void) surf_AS_finalize(const char *id);
-XBT_PUBLIC(void) surf_route_add_host(const char *id);
-XBT_PUBLIC(void) surf_routing_add_route(const char *src_id,
-                                        const char *dest_id,
-                                        xbt_dynar_t links_id);
-
-#include "surf/surf_resource.h"
-#include "surf/surf_resource_lmm.h"
-
 SG_END_DECL()
 #endif                          /* _SURF_SURF_H */
index 625fd9f..dc66869 100644 (file)
 
 static XBT_INLINE
     surf_resource_t surf_resource_new(size_t childsize,
-                                      surf_model_t model, char *name,
+                                      surf_model_t model, const char *name,
                                       xbt_dict_t props)
 {
   surf_resource_t res = xbt_malloc0(childsize);
   res->model = model;
-  res->name = name;
+  res->name = xbt_strdup(name);
   res->properties = props;
   return res;
 }
@@ -24,10 +24,8 @@ static XBT_INLINE
 static XBT_INLINE void surf_resource_free(void *r)
 {
   surf_resource_t resource = r;
-  if (resource->name)
-    free(resource->name);
-  if (resource->properties)
-    xbt_dict_free(&resource->properties);
+  free(resource->name);
+  xbt_dict_free(&resource->properties);
   free(resource);
 }
 
index 237c7b1..4f7eb94 100644 (file)
@@ -9,12 +9,14 @@
 #define SURF_RESOURCE_LMM_H
 #include "surf/surf.h"
 #include "surf/trace_mgr.h"
+#include "surf/surf_resource.h"
+
 
 static XBT_INLINE
     surf_resource_lmm_t surf_resource_lmm_new(size_t childsize,
                                               /* for superclass */
                                               surf_model_t model,
-                                              char *name, xbt_dict_t props,
+                                              const char *name, xbt_dict_t props,
                                               lmm_system_t system,
                                               double constraint_value,
                                               tmgr_history_t history,
diff --git a/src/include/surf/surfxml_parse_private.h b/src/include/surf/surfxml_parse_private.h
deleted file mode 100644 (file)
index 019c175..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Copyright (c) 2006, 2007, 2009, 2010. 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_PRIVATE_H
-#define _SURF_SURFXML_PARSE_PRIVATE_H
-
-#include "xbt/misc.h"
-#include "xbt/function_types.h"
-#include "surf/surfxml_parse.h"
-#include "surf/trace_mgr.h"
-
-
-#endif
diff --git a/src/include/surf/surfxml_parse_values.h b/src/include/surf/surfxml_parse_values.h
new file mode 100644 (file)
index 0000000..d030d07
--- /dev/null
@@ -0,0 +1,17 @@
+/* Copyright (c) 2011. 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 SURFXML_PARSE_VALUES_H_
+#define SURFXML_PARSE_VALUES_H_
+
+
+typedef struct s_surf_parsing_link_up_down *surf_parsing_link_up_down_t;
+typedef struct s_surf_parsing_link_up_down {
+       void* link_up;
+       void* link_down;
+} s_surf_parsing_link_up_down_t;
+
+#endif /* SURFXML_PARSE_VALUES_H_ */
index d8de2e7..0ea8271 100644 (file)
 #include "xbt/dynar.h"
 #include "surf/maxmin.h"
 #include "surf/datatypes.h"
+#include "simgrid/platf_interface.h"
 
 /* Creation functions */
 XBT_PUBLIC(tmgr_history_t) tmgr_history_new(void);
 XBT_PUBLIC(void) tmgr_history_free(tmgr_history_t history);
 
-XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new(const char *filename);
-XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(const char *id,
-                                                    const char *input,
-                                                    double periodicity);
 XBT_PUBLIC(tmgr_trace_t) tmgr_empty_trace_new(void);
 XBT_INLINE XBT_PUBLIC(void) tmgr_trace_free(tmgr_trace_t trace);
 /**
index fa2569b..3103180 100644 (file)
@@ -81,7 +81,7 @@ int TRACE_start()
   XBT_DEBUG ("Tracing is on");
 
   /* other trace initialization */
-  created_categories = xbt_dict_new();
+  created_categories = xbt_dict_new_homogeneous(xbt_free);
   TRACE_surf_alloc();
   TRACE_smpi_alloc();
   return 0;
@@ -381,8 +381,8 @@ void TRACE_help (int detailed)
       "  Routes among AS continue to be traced as usual.",
       detailed);
   print_line (OPT_TRACING_DISABLE_DESTROY, "Disable platform containers destruction",
-      "  Disable the destruction of containers at the end of simulation. This can be"
-      "  used with simulators that have a different notion of time (different from"
+      "  Disable the destruction of containers at the end of simulation. This can be\n"
+      "  used with simulators that have a different notion of time (different from\n"
       "  the simulated time).",
       detailed);
   print_line (OPT_TRIVA_UNCAT_CONF, "Generate graph configuration for Triva",
@@ -459,7 +459,7 @@ void TRACE_generate_triva_cat_conf (void)
     char *name, *name2, *value, *value2;
 
     //check if we do have categories declared
-    if (xbt_dict_length(created_categories) == 0){
+    if (xbt_dict_is_empty(created_categories)){
       XBT_INFO("No categories declared, ignoring generation of triva graph configuration");
       return;
     }
index fabcf00..df21be5 100644 (file)
@@ -38,7 +38,7 @@ void TRACE_category_with_color (const char *category, const char *color)
   //check if category is already created
   char *created = xbt_dict_get_or_null(created_categories, category);
   if (created) return;
-  xbt_dict_set (created_categories, category, xbt_strdup("1"), xbt_free);
+  xbt_dict_set (created_categories, category, xbt_strdup("1"), NULL);
 
   //define final_color
   char final_color[INSTR_DEFAULT_STR_SIZE];
@@ -138,7 +138,8 @@ static void instr_user_srcdst_variable(double time,
                               double value,
                               InstrUserVariable what)
 {
-  xbt_dynar_t route = global_routing->get_route (src, dst);
+  xbt_dynar_t route=NULL;
+  routing_get_route_and_latency (src, dst, &route,NULL);
   unsigned int i;
   void *link;
   xbt_dynar_foreach (route, i, link) {
index 3c1591c..b523297 100644 (file)
@@ -18,9 +18,9 @@ xbt_dict_t trivaEdgeTypes = NULL;     /* all host types defined */
 
 void instr_paje_init (container_t root)
 {
-  allContainers = xbt_dict_new ();
-  trivaNodeTypes = xbt_dict_new ();
-  trivaEdgeTypes = xbt_dict_new ();
+  allContainers = xbt_dict_new_homogeneous(NULL);
+  trivaNodeTypes = xbt_dict_new_homogeneous(xbt_free);
+  trivaEdgeTypes = xbt_dict_new_homogeneous(xbt_free);
   rootContainer = root;
 }
 
@@ -70,8 +70,8 @@ static type_t newType (const char *typename, const char *key, const char *color,
   ret->name = xbt_strdup (typename);
   ret->father = father;
   ret->kind = kind;
-  ret->children = xbt_dict_new ();
-  ret->values = xbt_dict_new ();
+  ret->children = xbt_dict_new_homogeneous(NULL);
+  ret->values = xbt_dict_new_homogeneous(NULL);
   ret->color = xbt_strdup (color);
 
   char str_id[INSTR_DEFAULT_STR_SIZE];
@@ -215,7 +215,7 @@ container_t newContainer (const char *name, e_container_types kind, container_t
       default: xbt_die ("Congratulations, you have found a bug on newContainer function of instr_routing.c"); break;
     }
   }
-  new->children = xbt_dict_new();
+  new->children = xbt_dict_new_homogeneous(NULL);
   if (new->father){
     xbt_dict_set(new->father->children, new->name, new, NULL);
     new_pajeCreateContainer (new);
@@ -226,7 +226,7 @@ container_t newContainer (const char *name, e_container_types kind, container_t
     xbt_dict_set (allContainers, new->name, new, NULL);
 
     //register NODE types for triva configuration
-    xbt_dict_set (trivaNodeTypes, new->type->name, xbt_strdup("1"), xbt_free);
+    xbt_dict_set (trivaNodeTypes, new->type->name, xbt_strdup("1"), NULL);
   }
   return new;
 }
index a8060aa..4a60ed3 100644 (file)
@@ -189,7 +189,7 @@ void TRACE_paje_dump_buffer (int force)
     buffer = xbt_dynar_new (sizeof(paje_event_t), NULL);
   }else{
     paje_event_t event;
-    while (xbt_dynar_length (buffer) > 0){
+    while (!xbt_dynar_is_empty(buffer)){
       double head_timestamp = (*(paje_event_t*)xbt_dynar_get_ptr(buffer, 0))->timestamp;
       if (head_timestamp > TRACE_last_timestamp_to_dump){
         break;
@@ -224,7 +224,7 @@ void TRACE_paje_create_header(void)
 %%EndEventDef \n\
 %%EventDef PajeDefineEventType %d \n\
 %%       Alias string \n\
-%%       EntityType string \n\
+%%       ContainerType string \n\
 %%       Name string \n\
 %%       Color color \n\
 %%EndEventDef \n\
@@ -251,46 +251,46 @@ void TRACE_paje_create_header(void)
 %%EventDef PajeDestroyContainer %d \n\
 %%       Time date \n\
 %%       Type string \n\
-%%       Container string \n\
+%%       Name string \n\
 %%EndEventDef \n\
 %%EventDef PajeSetVariable %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
-%%       Value string \n\
+%%       Value double \n\
 %%EndEventDef\n\
 %%EventDef PajeAddVariable %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
-%%       Value string \n\
+%%       Value double \n\
 %%EndEventDef\n\
 %%EventDef PajeSubVariable %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
-%%       Value string \n\
+%%       Value double \n\
 %%EndEventDef\n\
 %%EventDef PajeSetState %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%       Value string \n\
 %%EndEventDef\n\
 %%EventDef PajePushState %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%       Value string \n\
 %%EndEventDef\n\
 %%EventDef PajePopState %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%EndEventDef\n\
 %%EventDef PajeStartLink %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%       Value string \n\
 %%       SourceContainer string \n\
@@ -298,7 +298,7 @@ void TRACE_paje_create_header(void)
 %%EndEventDef\n\
 %%EventDef PajeEndLink %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%       Value string \n\
 %%       DestContainer string \n\
@@ -306,7 +306,7 @@ void TRACE_paje_create_header(void)
 %%EndEventDef\n\
 %%EventDef PajeNewEvent %d \n\
 %%       Time date \n\
-%%       EntityType string \n\
+%%       Type string \n\
 %%       Container string \n\
 %%       Value string \n\
 %%EndEventDef\n",
@@ -422,14 +422,14 @@ static void print_pajeCreateContainer(paje_event_t event)
 {
   XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, event->event_type, event->timestamp);
   if (event->timestamp == 0){
-    fprintf(tracing_file, "%d 0 %s %s %s %s\n",
+    fprintf(tracing_file, "%d 0 %s %s %s \"%s\"\n",
         event->event_type,
         ((createContainer_t)event->data)->container->id,
         ((createContainer_t)event->data)->container->type->id,
         ((createContainer_t)event->data)->container->father->id,
         ((createContainer_t)event->data)->container->name);
   }else{
-    fprintf(tracing_file, "%d %lf %s %s %s %s\n",
+    fprintf(tracing_file, "%d %lf %s %s %s \"%s\"\n",
         event->event_type,
         event->timestamp,
         ((createContainer_t)event->data)->container->id,
index ba5c51b..4c4b2e3 100644 (file)
@@ -26,8 +26,7 @@ static void __TRACE_surf_check_variable_set_to_zero(double now,
     container_t container = getContainerByName (resource);
     type_t type = getVariableType (variable, NULL, container->type);
     new_pajeSetVariable (now, container, type, 0);
-    xbt_dict_set(platform_variables, resource, array,
-                 xbt_dynar_free_voidp);
+    xbt_dict_set(platform_variables, resource, array, NULL);
   } else {
     xbt_dynar_t array = xbt_dict_get(platform_variables, resource);
     unsigned int i;
@@ -153,7 +152,7 @@ void TRACE_surf_host_set_utilization(const char *resource,
 
 void TRACE_surf_resource_utilization_alloc()
 {
-  platform_variables = xbt_dict_new();
+  platform_variables = xbt_dict_new_homogeneous(xbt_dynar_free_voidp);
 }
 
 void TRACE_surf_resource_utilization_release()
index 01e4a1b..2a1dc65 100644 (file)
@@ -63,8 +63,8 @@ static void linkContainers (container_t father, container_t src, container_t dst
     if (xbt_dict_get_or_null (filter, aux2)) return;
 
     //ok, not found, register it
-    xbt_dict_set (filter, aux1, xbt_strdup ("1"), xbt_free);
-    xbt_dict_set (filter, aux2, xbt_strdup ("1"), xbt_free);
+    xbt_dict_set (filter, aux1, xbt_strdup ("1"), NULL);
+    xbt_dict_set (filter, aux2, xbt_strdup ("1"), NULL);
   }
 
   //declare type
@@ -73,7 +73,7 @@ static void linkContainers (container_t father, container_t src, container_t dst
   type_t link_type = getLinkType (link_typename, father->type, src->type, dst->type);
 
   //register EDGE types for triva configuration
-  xbt_dict_set (trivaEdgeTypes, link_type->name, xbt_strdup("1"), xbt_free);
+  xbt_dict_set (trivaEdgeTypes, link_type->name, xbt_strdup("1"), NULL);
 
   //create the link
   static long long counter = 0;
@@ -83,11 +83,11 @@ static void linkContainers (container_t father, container_t src, container_t dst
   new_pajeEndLink(SIMIX_get_clock(), father, link_type, dst, "G", key);
 }
 
-static void recursiveGraphExtraction (routing_component_t rc, container_t container, xbt_dict_t filter)
+static void recursiveGraphExtraction (AS_t rc, container_t container, xbt_dict_t filter)
 {
-  if (xbt_dict_length (rc->routing_sons)){
+  if (!xbt_dict_is_empty(rc->routing_sons)){
     xbt_dict_cursor_t cursor = NULL;
-    routing_component_t rc_son;
+    AS_t rc_son;
     char *child_name;
     //bottom-up recursion
     xbt_dict_foreach(rc->routing_sons, cursor, child_name, rc_son) {
@@ -109,15 +109,24 @@ static void recursiveGraphExtraction (routing_component_t rc, container_t contai
           (child2->kind == INSTR_HOST  || child2->kind == INSTR_ROUTER) &&
           strcmp (child1_name, child2_name) != 0){
 
-        xbt_dynar_t route = global_routing->get_route (child1_name, child2_name);
+        xbt_dynar_t route = NULL;
+        xbt_ex_t e;
+
+        TRY {
+          routing_get_route_and_latency(child1_name, child2_name, &route, NULL);
+        } CATCH(e) {
+          xbt_ex_free(e);
+        }
+        if (route == NULL) continue;
+
         if (TRACE_onelink_only()){
           if (xbt_dynar_length (route) > 1) continue;
         }
-        unsigned int cpt;
-        void *link;
         container_t previous = child1;
-        xbt_dynar_foreach (route, cpt, link) {
-          char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
+        int i;
+        for (i = 0; i < xbt_dynar_length(route); i++){
+          link_CM02_t *link = ((link_CM02_t*)xbt_dynar_get_ptr (route, i));
+          char *link_name = (*link)->lmm_resource.generic_resource.name;
           container_t current = getContainerByName(link_name);
           linkContainers(container, previous, current, filter);
           previous = current;
@@ -128,11 +137,13 @@ static void recursiveGraphExtraction (routing_component_t rc, container_t contai
                 child2->kind == INSTR_AS &&
                 strcmp(child1_name, child2_name) != 0){
 
-        route_extended_t route = rc->get_route (rc, child1_name, child2_name);
+        route_t route = xbt_new0(s_route_t,1);
+        route->link_list = xbt_dynar_new(global_routing->size_of_link,NULL);
+        rc->get_route_and_latency (rc, child1_name, child2_name, route,NULL);
         unsigned int cpt;
         void *link;
         container_t previous = getContainerByName(route->src_gateway);
-        xbt_dynar_foreach (route->generic_route.link_list, cpt, link) {
+        xbt_dynar_foreach (route->link_list, cpt, link) {
           char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
           container_t current = getContainerByName(link_name);
           linkContainers (container, previous, current, filter);
@@ -140,6 +151,7 @@ static void recursiveGraphExtraction (routing_component_t rc, container_t contai
         }
         container_t last = getContainerByName(route->dst_gateway);
         linkContainers (container, previous, last, filter);
+        generic_free_route(route);
       }
     }
   }
@@ -148,10 +160,10 @@ static void recursiveGraphExtraction (routing_component_t rc, container_t contai
 /*
  * Callbacks
  */
-static void instr_routing_parse_start_AS ()
+static void instr_routing_parse_start_AS (const char*id,const char*routing)
 {
   if (getRootContainer() == NULL){
-    container_t root = newContainer (A_surfxml_AS_id, INSTR_AS, NULL);
+    container_t root = newContainer (id, INSTR_AS, NULL);
     instr_paje_init (root);
 
     if (TRACE_smpi_is_enabled()) {
@@ -171,7 +183,7 @@ static void instr_routing_parse_start_AS ()
 
   if (TRACE_needs_platform()){
     container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-    container_t new = newContainer (A_surfxml_AS_id, INSTR_AS, father);
+    container_t new = newContainer (id, INSTR_AS, father);
     xbt_dynar_push (currentContainer, &new);
   }
 }
@@ -183,24 +195,23 @@ static void instr_routing_parse_end_AS ()
   }
 }
 
-static void instr_routing_parse_start_link ()
+static void instr_routing_parse_start_link (sg_platf_link_cbarg_t link)
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-  const char *link_id = A_surfxml_link_id;
 
-  double bandwidth_value = atof(A_surfxml_link_bandwidth);
-  double latency_value = atof(A_surfxml_link_latency);
+  double bandwidth_value = link->bandwidth;
+  double latency_value = link->latency;
   xbt_dynar_t links_to_create = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
 
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX){
-    char *up = bprintf("%s_UP", link_id);
-    char *down = bprintf("%s_DOWN", link_id);
+  if (link->policy == SURF_LINK_FULLDUPLEX){
+    char *up = bprintf("%s_UP", link->id);
+    char *down = bprintf("%s_DOWN", link->id);
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(up));
     xbt_dynar_push_as (links_to_create, char*, xbt_strdup(down));
     free (up);
     free (down);
   }else{
-    xbt_dynar_push_as (links_to_create, char*, strdup(link_id));
+    xbt_dynar_push_as (links_to_create, char*, strdup(link->id));
   }
 
   char *link_name = NULL;
@@ -223,18 +234,14 @@ static void instr_routing_parse_start_link ()
   xbt_dynar_free (&links_to_create);
 }
 
-static void instr_routing_parse_end_link ()
-{
-}
-
-static void instr_routing_parse_start_host ()
+static void instr_routing_parse_start_host (sg_platf_host_cbarg_t host)
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-  container_t new = newContainer (A_surfxml_host_id, INSTR_HOST, father);
+  container_t new = newContainer (host->id, INSTR_HOST, father);
 
   if (TRACE_categorized() || TRACE_uncategorized()) {
     type_t power = getVariableType ("power", NULL, new->type);
-    new_pajeSetVariable (0, new, power, atof(A_surfxml_host_power));
+    new_pajeSetVariable (0, new, power, host->power_peak);
   }
   if (TRACE_uncategorized()){
     getVariableType ("power_used", "0.5 0.5 0.5", new->type);
@@ -268,25 +275,17 @@ static void instr_routing_parse_start_host ()
   }
 }
 
-static void instr_routing_parse_end_host ()
-{
-}
-
-static void instr_routing_parse_start_router ()
+static void instr_routing_parse_start_router (sg_platf_router_cbarg_t router)
 {
   container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
-  newContainer (A_surfxml_router_id, INSTR_ROUTER, father);
-}
-
-static void instr_routing_parse_end_router ()
-{
+  newContainer (router->id, INSTR_ROUTER, father);
 }
 
 static void instr_routing_parse_end_platform ()
 {
   xbt_dynar_free(&currentContainer);
   currentContainer = NULL;
-  xbt_dict_t filter = xbt_dict_new ();
+  xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free);
   recursiveGraphExtraction (global_routing->root, getRootContainer(), filter);
   xbt_dict_free(&filter);
   platform_created = 1;
@@ -298,16 +297,14 @@ void instr_routing_define_callbacks ()
   if (!TRACE_is_enabled()) return;
   //always need the call backs to ASes (we need only the root AS),
   //to create the rootContainer and the rootType properly
-  surfxml_add_callback(STag_surfxml_AS_cb_list, &instr_routing_parse_start_AS);
-  surfxml_add_callback(ETag_surfxml_AS_cb_list, &instr_routing_parse_end_AS);
+  sg_platf_AS_begin_add_cb(instr_routing_parse_start_AS);
+  sg_platf_AS_end_add_cb(instr_routing_parse_end_AS);
   if (!TRACE_needs_platform()) return;
-  surfxml_add_callback(STag_surfxml_link_cb_list, &instr_routing_parse_start_link);
-  surfxml_add_callback(ETag_surfxml_link_cb_list, &instr_routing_parse_end_link);
-  surfxml_add_callback(STag_surfxml_host_cb_list, &instr_routing_parse_start_host);
-  surfxml_add_callback(ETag_surfxml_host_cb_list, &instr_routing_parse_end_host);
-  surfxml_add_callback(STag_surfxml_router_cb_list, &instr_routing_parse_start_router);
-  surfxml_add_callback(ETag_surfxml_router_cb_list, &instr_routing_parse_end_router);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &instr_routing_parse_end_platform);
+  sg_platf_link_add_cb(instr_routing_parse_start_link);
+  sg_platf_host_add_cb(instr_routing_parse_start_host);
+  sg_platf_router_add_cb(instr_routing_parse_start_router);
+
+  sg_platf_postparse_add_cb(instr_routing_parse_end_platform);
 }
 
 /*
@@ -398,11 +395,11 @@ static xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_
 }
 
 static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges,
-    routing_component_t rc, container_t container)
+    AS_t rc, container_t container)
 {
-  if (xbt_dict_length (rc->routing_sons)){
+  if (!xbt_dict_is_empty(rc->routing_sons)){
     xbt_dict_cursor_t cursor = NULL;
-    routing_component_t rc_son;
+    AS_t rc_son;
     char *child_name;
     //bottom-up recursion
     xbt_dict_foreach(rc->routing_sons, cursor, child_name, rc_son) {
@@ -424,7 +421,9 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
           (child2->kind == INSTR_HOST  || child2->kind == INSTR_ROUTER) &&
           strcmp (child1_name, child2_name) != 0){
 
-        xbt_dynar_t route = global_routing->get_route (child1_name, child2_name);
+        // FIXME factorize route creation with else branch below (once possible)
+        xbt_dynar_t route=NULL;
+        routing_get_route_and_latency (child1_name, child2_name,&route,NULL);
         if (TRACE_onelink_only()){
           if (xbt_dynar_length (route) > 1) continue;
         }
@@ -445,11 +444,13 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
                 child2->kind == INSTR_AS &&
                 strcmp(child1_name, child2_name) != 0){
 
-        route_extended_t route = rc->get_route (rc, child1_name, child2_name);
+        route_t route = xbt_new0(s_route_t,1);
+        route->link_list = xbt_dynar_new(global_routing->size_of_link,NULL);
+        rc->get_route_and_latency (rc, child1_name, child2_name,route, NULL);
         unsigned int cpt;
         void *link;
         xbt_node_t current, previous = new_xbt_graph_node(graph, route->src_gateway, nodes);
-        xbt_dynar_foreach (route->generic_route.link_list, cpt, link) {
+        xbt_dynar_foreach (route->link_list, cpt, link) {
           char *link_name = ((link_CM02_t)link)->lmm_resource.generic_resource.name;
           current = new_xbt_graph_node(graph, link_name, nodes);
           //previous -> current
@@ -457,6 +458,7 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
         }
         current = new_xbt_graph_node(graph, route->dst_gateway, nodes);
         new_xbt_graph_edge (graph, previous, current, edges);
+        generic_free_route(route);
       }
     }
   }
@@ -466,8 +468,8 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
 xbt_graph_t instr_routing_platform_graph (void)
 {
   xbt_graph_t ret = xbt_graph_new_graph (0, NULL);
-  xbt_dict_t nodes = xbt_dict_new ();
-  xbt_dict_t edges = xbt_dict_new ();
+  xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL);
+  xbt_dict_t edges = xbt_dict_new_homogeneous(NULL);
   recursiveXBTGraphExtraction (ret, nodes, edges, global_routing->root, getRootContainer());
   return ret;
 }
index 7cdf66f..d4fab07 100644 (file)
@@ -82,7 +82,7 @@ static char *TRACE_smpi_put_key(int src, int dst, char *key, int n)
   xbt_dynar_t d = xbt_dict_get_or_null(keys, aux);
   if (d == NULL) {
     d = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-    xbt_dict_set(keys, aux, d, xbt_free);
+    xbt_dict_set(keys, aux, d, NULL);
   }
   //generate the key
   static unsigned long long counter = 0;
@@ -101,7 +101,7 @@ static char *TRACE_smpi_get_key(int src, int dst, char *key, int n)
   snprintf(aux, INSTR_DEFAULT_STR_SIZE, "%d#%d", src, dst);
   xbt_dynar_t d = xbt_dict_get_or_null(keys, aux);
 
-  xbt_assert(xbt_dynar_length(d)!=0,
+  xbt_assert(!xbt_dynar_is_empty(d),
       "Trying to get a link key (for message reception) that has no corresponding send (%s).", __FUNCTION__);
   char *s = xbt_dynar_get_as (d, 0, char *);
   snprintf (key, n, "%s", s);
@@ -123,7 +123,7 @@ void TRACE_internal_smpi_set_category (const char *category)
   if (xbt_dict_get_or_null (process_category, processid))
     xbt_dict_remove (process_category, processid);
   if (category != NULL)
-    xbt_dict_set (process_category, processid, xbt_strdup(category), xbt_free);
+    xbt_dict_set (process_category, processid, xbt_strdup(category), NULL);
 }
 
 const char *TRACE_internal_smpi_get_category (void)
@@ -137,8 +137,8 @@ const char *TRACE_internal_smpi_get_category (void)
 
 void TRACE_smpi_alloc()
 {
-  keys = xbt_dict_new();
-  process_category = xbt_dict_new();
+  keys = xbt_dict_new_homogeneous(xbt_free);
+  process_category = xbt_dict_new_homogeneous(xbt_free);
 }
 
 void TRACE_smpi_start(void)
index bab0e0c..8d235a0 100644 (file)
@@ -63,7 +63,7 @@ void create_jed_event(jed_event_t *event, char *name, double start_time,
 
        (*event)->resource_subsets = xbt_dynar_new(sizeof(jed_res_subset_t), NULL);
        (*event)->characteristics_list = xbt_dynar_new(sizeof(char*), NULL);
-       (*event)->info_hash = xbt_dict_new();
+       (*event)->info_hash = xbt_dict_new_homogeneous(NULL);
 
 }
 
index 6ffefda..54fdb74 100644 (file)
@@ -46,9 +46,7 @@ static int compare_ids(const void *num1, const void *num2) {
 static void jed_free_container(jed_simgrid_container_t container) {
 
        xbt_dict_free(&container->name2id);
-       if( container->resource_list != NULL ) {
-               xbt_dynar_free(&container->resource_list);
-       }
+       xbt_dynar_free(&container->resource_list);
 
        if( container->container_children != NULL ) {
                unsigned int iter;
@@ -88,23 +86,21 @@ void jed_simgrid_add_resources(jed_simgrid_container_t parent,
 
        unsigned int iter;
        char *host_name;
-       char buf[16];
-       char *buf_copy;
+       char *buf;
 
        parent->is_lowest = 1;
        xbt_dynar_free(&parent->container_children);
        parent->container_children = NULL;
-       parent->name2id = xbt_dict_new();
+       parent->name2id = xbt_dict_new_homogeneous(xbt_free);
        parent->last_id = 0;
        parent->resource_list = xbt_dynar_new(sizeof(char *), NULL);
 
        xbt_dynar_sort (host_names,     &compare_hostnames);
 
        xbt_dynar_foreach(host_names, iter, host_name) {
-               buf_copy = strdup(buf);
-               sprintf(buf_copy, "%d", parent->last_id);
+               buf = bprintf("%d", parent->last_id);
                (parent->last_id)++;
-               xbt_dict_set(parent->name2id, host_name, buf_copy, NULL);
+               xbt_dict_set(parent->name2id, host_name, buf, NULL);
                xbt_dict_set(host2_simgrid_parent_container, host_name, parent, NULL);
                xbt_dynar_push(parent->resource_list, &host_name);
        }
@@ -208,7 +204,7 @@ void jed_simgrid_get_resource_selection_by_hosts(xbt_dynar_t subset_list,
        unsigned int iter;
        xbt_dict_t parent2hostgroup;  // group hosts by parent
 
-       parent2hostgroup = xbt_dict_new();
+       parent2hostgroup = xbt_dict_new_homogeneous(NULL);
 
        xbt_assert( host_names != NULL );
 
@@ -266,9 +262,9 @@ void jedule_add_meta_info(jedule_t jedule, char *key, char *value) {
 
 void jed_create_jedule(jedule_t *jedule) {
        *jedule = (jedule_t)calloc(1,sizeof(s_jedule_t));
-       host2_simgrid_parent_container = xbt_dict_new();
-       container_name2container       = xbt_dict_new();
-       (*jedule)->jedule_meta_info    = xbt_dict_new();
+       host2_simgrid_parent_container = xbt_dict_new_homogeneous(NULL);
+       container_name2container       = xbt_dict_new_homogeneous(NULL);
+       (*jedule)->jedule_meta_info    = xbt_dict_new_homogeneous(NULL);
 }
 
 void jed_free_jedule(jedule_t jedule) {
index 664ea59..67a1e91 100644 (file)
@@ -12,6 +12,7 @@
 #include "xbt/dynar.h"
 
 #include "surf/surf_private.h"
+#include "surf/surf_resource.h"
 #include "surf/surf.h"
 
 #include "instr/jedule/jedule_sd_binding.h"
@@ -53,14 +54,14 @@ void jedule_log_sd_event(SD_task_t task) {
        xbt_dynar_free(&host_list);
 }
 
-static void create_hierarchy(routing_component_t current_comp,
+static void create_hierarchy(AS_t current_comp,
                jed_simgrid_container_t current_container) {
        xbt_dict_cursor_t cursor = NULL;
        char *key;
-       routing_component_t elem;
+       AS_t elem;
        network_element_t network_elem;
 
-       if( xbt_dict_length(current_comp->routing_sons) == 0 ) {
+       if(xbt_dict_is_empty(current_comp->routing_sons)) {
                // I am no AS
                // add hosts to jedule platform
                xbt_dynar_t hosts;
@@ -90,8 +91,8 @@ static void create_hierarchy(routing_component_t current_comp,
 
 void jedule_setup_platform() {
 
-       routing_component_t root_comp;
-       e_surf_network_element_type_t type;
+       AS_t root_comp;
+       // e_surf_network_element_type_t type;
 
        jed_simgrid_container_t root_container;
 
@@ -102,7 +103,7 @@ void jedule_setup_platform() {
        XBT_DEBUG("root name %s\n", root_comp->name);
 
        // that doesn't work
-       type = root_comp->get_network_element_type(root_comp->name);
+       // type = root_comp->get_network_element_type(root_comp->name);
 
        jed_simgrid_create_container(&root_container, root_comp->name);
        jedule->root_container = root_container;
index 1142da7..ffb8a37 100644 (file)
@@ -80,7 +80,7 @@ void MC_wait_for_requests(void)
   smx_req_t req;
   unsigned int iter;
 
-  while (xbt_dynar_length(simix_global->process_to_run)) {
+  while (!xbt_dynar_is_empty(simix_global->process_to_run)) {
     SIMIX_process_runall();
     xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
       req = &process->request;
index e5ea6c8..7496b50 100644 (file)
@@ -133,8 +133,7 @@ memory_map_t get_memory_map(void)
     ret->mapsize++;
   }
 
-  if (line)
-    free(line);
+  free(line);
 
   return ret;
 }
index 1adc99a..0fef5be 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id: private.h 5497 2008-05-26 12:19:15Z cristianrosa $  */
-
 /* Copyright (c) 2007 Arnaud Legrand, Bruno Donnassolo.
    All rights reserved.                                          */
 
old mode 100755 (executable)
new mode 100644 (file)
index 5ac10d1..ea4bdba 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "simgrid_config.h" //For getline, keep that include first
 
-#include "msg/private.h"
+#include "msg_private.h"
 #include "xbt/str.h"
 #include "xbt/dynar.h"
 #include "xbt/replay_trace_reader.h"
@@ -57,7 +57,7 @@ static int MSG_action_runner(int argc, char *argv[])
 
     while ((evt = action_get_action(argv[0]))) {
       msg_action_fun function = xbt_dict_get(action_funs, evt[1]);
-      (*function) (evt);
+      function(evt);
       free(evt);
     }
   } else {                      // Should have got my trace file in argument
@@ -70,7 +70,7 @@ static int MSG_action_runner(int argc, char *argv[])
     while ((evt=xbt_replay_trace_reader_get(reader))) {
       if (!strcmp(argv[0],evt[0])) {
         msg_action_fun function = xbt_dict_get(action_funs, evt[1]);
-        (*function) (evt);
+        function(evt);
         free(evt);
       } else {
         XBT_WARN("%s: Ignore trace element not for me",
@@ -84,8 +84,8 @@ static int MSG_action_runner(int argc, char *argv[])
 
 void _MSG_action_init()
 {
-  action_funs = xbt_dict_new();
-  action_queues = xbt_dict_new();
+  action_funs = xbt_dict_new_homogeneous(NULL);
+  action_queues = xbt_dict_new_homogeneous(NULL);
   MSG_function_register_default(MSG_action_runner);
 }
 
@@ -103,7 +103,7 @@ static const char **action_get_action(char *name)
   char *evtname = NULL;
 
   xbt_dynar_t myqueue = xbt_dict_get_or_null(action_queues, name);
-  if (myqueue == NULL || xbt_dynar_length(myqueue) == 0) {      // nothing stored for me. Read the file further
+  if (myqueue == NULL || xbt_dynar_is_empty(myqueue)) {      // nothing stored for me. Read the file further
 
     if (action_fp == NULL) {    // File closed now. There's nothing more to read. I'm out of here
       goto todo_done;
@@ -176,7 +176,7 @@ MSG_error_t MSG_action_trace_run(char *path)
   }
   res = MSG_main();
 
-  if (xbt_dict_size(action_queues)) {
+  if (!xbt_dict_is_empty(action_queues)) {
     XBT_WARN
         ("Not all actions got consumed. If the simulation ended successfully (without deadlock), you may want to add new processes to your deployment file.");
 
@@ -186,12 +186,11 @@ MSG_error_t MSG_action_trace_run(char *path)
     }
   }
 
-  if (action_line)
-    free(action_line);
+  free(action_line);
   if (path)
     fclose(action_fp);
   xbt_dict_free(&action_queues);
-  action_queues = xbt_dict_new();
+  action_queues = xbt_dict_new_homogeneous(NULL);
 
   return res;
 }
index 999e6cf..733d2bf 100644 (file)
@@ -4,7 +4,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 "msg/private.h"
+#include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "simix/simix.h"
similarity index 99%
rename from src/msg/deployment.c
rename to src/msg/msg_deployment.c
index fadf887..e2252af 100644 (file)
@@ -4,7 +4,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 "msg/private.h"
+#include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 
similarity index 97%
rename from src/msg/environment.c
rename to src/msg/msg_environment.c
index fca4a9f..93f479f 100644 (file)
@@ -4,7 +4,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 "msg/private.h"
+#include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
@@ -70,10 +70,9 @@ void MSG_create_environment(const char *file)
 
   /* Initialize MSG hosts */
   xbt_lib_foreach(host_lib, cursor, name, data) {
-       if(data[SIMIX_HOST_LEVEL])
+    if(data[SIMIX_HOST_LEVEL])
       __MSG_host_create((smx_host_t)data[SIMIX_HOST_LEVEL], NULL);
   }
-  return;
 }
 
 /**
@@ -97,5 +96,4 @@ void MSG_load_platform_script(const char *script_file)
   xbt_die
       ("Lua is not available!! to call MSG_load_platform_script, lua should be available...");
 #endif
-  return;
 }
similarity index 98%
rename from src/msg/global.c
rename to src/msg/msg_global.c
index 0652b7e..7ac93dd 100644 (file)
@@ -4,13 +4,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 "msg/private.h"
+#include "msg_private.h"
+#include "msg_mailbox.h"
 #include "mc/mc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/virtu.h"
 #include "xbt/ex.h"             /* ex_backtrace_display */
-#include "mailbox.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg,
                                 "Logging specific to MSG (kernel)");
@@ -178,6 +178,7 @@ int MSG_process_killall(int reset_PIDs)
  */
 MSG_error_t MSG_clean(void)
 {
+  XBT_DEBUG("Closing MSG");
 
 #ifdef HAVE_TRACING
   TRACE_surf_release();
similarity index 92%
rename from src/msg/gos.c
rename to src/msg/msg_gos.c
index de98ec0..740412c 100644 (file)
@@ -1,29 +1,18 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2004-2011. 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 "private.h"
-#include "xbt/sysdep.h"
+#include "msg_private.h"
+#include "msg_mailbox.h"
 #include "mc/mc.h"
 #include "xbt/log.h"
-#include "mailbox.h"
+#include "xbt/sysdep.h"
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg,
                                 "Logging specific to MSG (gos)");
 
-/** \ingroup msg_gos_functions
- *
- * \brief Return the last value returned by a MSG function (except
- * MSG_get_errno...).
- */
-MSG_error_t MSG_get_errno(void)
-{
-  return PROCESS_GET_ERRNO();
-}
-
 /** \ingroup msg_gos_functions
  * \brief Executes a task and waits for its termination.
  *
@@ -31,8 +20,8 @@ MSG_error_t MSG_get_errno(void)
  * takes only one parameter.
  * \param task a #m_task_t to execute on the location on which the
  agent is running.
- * \return #MSG_FATAL if \a task is not properly initialized and
- * #MSG_OK otherwise.
+ * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
+ * or #MSG_HOST_FAILURE otherwise
  */
 MSG_error_t MSG_task_execute(m_task_t task)
 {
@@ -62,16 +51,18 @@ MSG_error_t MSG_task_execute(m_task_t task)
 #endif
     return MSG_OK;
   }
+
+  m_process_t self = SIMIX_process_self();
+  p_simdata = SIMIX_process_self_get_data(self);
   simdata->isused=1;
   simdata->compute =
-      SIMIX_req_host_execute(task->name, SIMIX_host_self(),
+      SIMIX_req_host_execute(task->name, p_simdata->m_host->simdata->smx_host,
                            simdata->computation_amount,
                            simdata->priority);
 #ifdef HAVE_TRACING
   SIMIX_req_set_category(simdata->compute, task->category);
 #endif
 
-  p_simdata = SIMIX_process_self_get_data();
   p_simdata->waiting_action = simdata->compute;
   comp_state = SIMIX_req_host_execution_wait(simdata->compute);
   p_simdata->waiting_action = NULL;
@@ -103,7 +94,7 @@ MSG_error_t MSG_task_execute(m_task_t task)
 #ifdef HAVE_TRACING
     TRACE_msg_task_execute_end(task);
 #endif
-    MSG_RETURN(MSG_TASK_CANCELLED);
+    MSG_RETURN(MSG_TASK_CANCELED);
   }
 }
 
@@ -171,7 +162,7 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task)
   CHECK_HOST();
 
   simdata = task->simdata;
-  p_simdata = SIMIX_process_self_get_data();
+  p_simdata = SIMIX_process_self_get_data(SIMIX_process_self());
 
   xbt_assert((!simdata->compute)
               && (task->simdata->isused == 0),
@@ -214,7 +205,7 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task)
     /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
     simdata->comm = NULL;
     simdata->compute = NULL;
-    MSG_RETURN(MSG_TASK_CANCELLED);
+    MSG_RETURN(MSG_TASK_CANCELED);
   }
 }
 
@@ -269,8 +260,7 @@ MSG_error_t MSG_process_sleep(double nb_sec)
  listening. This value has to be >=0 and < than the maximal
  number of channels fixed with MSG_set_channel_number().
  * \param host the host that is to be watched.
- * \return #MSG_FATAL if \a task is equal to \c NULL, #MSG_WARNING
- if \a *task is not equal to \c NULL, and #MSG_OK otherwise.
+ * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
 MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host)
@@ -289,8 +279,7 @@ MSG_task_get_from_host(m_task_t * task, m_channel_t channel, m_host_t host)
  * \param channel the channel on which the agent should be
  listening. This value has to be >=0 and < than the maximal
  number of channels fixed with MSG_set_channel_number().
- * \return #MSG_FATAL if \a task is equal to \c NULL, #MSG_WARNING
- * if \a *task is not equal to \c NULL, and #MSG_OK otherwise.
+ * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
 {
@@ -312,8 +301,7 @@ MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
  up. In such a case, #MSG_TRANSFER_FAILURE will be returned, \a task
  will not be modified and will still be
  equal to \c NULL when returning.
- * \return #MSG_FATAL if \a task is equal to \c NULL, #MSG_WARNING
- if \a *task is not equal to \c NULL, and #MSG_OK otherwise.
+ * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
 MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel,
@@ -385,6 +373,7 @@ msg_comm_t MSG_task_isend(m_task_t task, const char *alias)
 {
   return MSG_task_isend_with_matching(task,alias,NULL,NULL);
 }
+
 /** \ingroup msg_gos_functions
  * \brief Sends a task on a mailbox, with support for matching requests
  *
@@ -412,7 +401,7 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al
   /* Prepare the task to send */
   t_simdata = task->simdata;
   t_simdata->sender = process;
-  t_simdata->source = MSG_host_self();
+  t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data(process))->m_host;
 
   xbt_assert(t_simdata->isused == 0,
               "This task is still being used somewhere else. You cannot send it now. Go fix your code!");
@@ -437,8 +426,12 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al
  * \brief Sends a task on a mailbox.
  *
  * This is a non blocking detached send function.
- * Think of it as a best effort send. The communication
- * object will be destroyed by the receiver (if any).
+ * Think of it as a best effort send. Keep in mind that the third parameter
+ * is only called if the communication fails. If the communication does work,
+ * it is responsibility of the receiver code to free anything related to
+ * the task, as usual. More details on this can be obtained on
+ * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
+ * in the SimGrid-user mailing list archive.
  *
  * \param task a #m_task_t to send on another location.
  * \param alias name of the mailbox to sent the task to
@@ -463,7 +456,7 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
   /* Prepare the task to send */
   t_simdata = task->simdata;
   t_simdata->sender = process;
-  t_simdata->source = MSG_host_self();
+  t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data(process))->m_host;
 
   xbt_assert(t_simdata->isused == 0,
               "This task is still being used somewhere else. You cannot send it now. Go fix your code!");
@@ -472,8 +465,9 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
   msg_global->sent_msg++;
 
   /* Send it by calling SIMIX network layer */
-  SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+  smx_action_t comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
                        t_simdata->rate, task, sizeof(void *), NULL, cleanup, 1);
+  t_simdata->comm = comm;
 }
 
 /** \ingroup msg_gos_functions
@@ -525,6 +519,11 @@ int MSG_comm_test(msg_comm_t comm)
   int finished = 0;
   TRY {
     finished = SIMIX_req_comm_test(comm->s_comm);
+
+    if (finished && comm->task_received != NULL) {
+      /* I am the receiver */
+      (*comm->task_received)->simdata->isused = 0;
+    }
   }
   CATCH(e) {
     switch (e.category) {
@@ -606,6 +605,11 @@ int MSG_comm_testany(xbt_dynar_t comms)
     comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t);
     /* the communication is finished */
     comm->status = status;
+
+    if (status == MSG_OK && comm->task_received != NULL) {
+      /* I am the receiver */
+      (*comm->task_received)->simdata->isused = 0;
+    }
   }
 
   return finished_index;
@@ -623,9 +627,7 @@ void MSG_comm_destroy(msg_comm_t comm)
     (*comm->task_received)->simdata->isused = 0;
   }
 
-  /* FIXME auto-destroy comms from SIMIX to avoid this request */
-  /*SIMIX_req_comm_destroy(comm->s_comm);*/
-  free(comm);
+  xbt_free(comm);
 }
 
 /** \ingroup msg_gos_functions
@@ -780,11 +782,10 @@ m_task_t MSG_comm_get_task(msg_comm_t comm)
  * \param channel the channel on which the agent should put this
  task. This value has to be >=0 and < than the maximal number of
  channels fixed with MSG_set_channel_number().
- * \return #MSG_FATAL if \a task is not properly initialized and
- * #MSG_OK otherwise. Returns #MSG_HOST_FAILURE if the host on which
- * this function was called was shut down. Returns
+ * \return #MSG_HOST_FAILURE if the host on which
+ * this function was called was shut down,
  * #MSG_TRANSFER_FAILURE if the transfer could not be properly done
- * (network failure, dest failure)
+ * (network failure, dest failure) or #MSG_OK if it succeeded.
  */
 MSG_error_t MSG_task_put(m_task_t task, m_host_t dest, m_channel_t channel)
 {
@@ -828,11 +829,10 @@ MSG_task_put_bounded(m_task_t task, m_host_t dest, m_channel_t channel,
  * \param timeout the maximum time to wait for a task before giving
  up. In such a case, #MSG_TRANSFER_FAILURE will be returned, \a task
  will not be modified
- * \return #MSG_FATAL if \a task is not properly initialized and
-#MSG_OK otherwise. Returns #MSG_HOST_FAILURE if the host on which
-this function was called was shut down. Returns
+ * \return #MSG_HOST_FAILURE if the host on which
+this function was called was shut down,
 #MSG_TRANSFER_FAILURE if the transfer could not be properly done
-(network failure, dest failure, timeout...)
+(network failure, dest failure, timeout...) or #MSG_OK if the communication succeeded.
  */
 MSG_error_t
 MSG_task_put_with_timeout(m_task_t task, m_host_t dest,
@@ -977,3 +977,15 @@ int MSG_task_listen_from(const char *alias)
 
   return MSG_process_get_PID(task->simdata->sender);
 }
+
+#ifdef MSG_USE_DEPRECATED
+/** \ingroup msg_gos_functions
+ *
+ * \brief Return the last value returned by a MSG function (except
+ * MSG_get_errno...).
+ */
+MSG_error_t MSG_get_errno(void)
+{
+  return PROCESS_GET_ERRNO();
+}
+#endif
similarity index 95%
rename from src/msg/host.c
rename to src/msg/msg_host.c
index d1425a2..5ca1eba 100644 (file)
@@ -4,10 +4,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 "msg/private.h"
+#include "msg/msg_private.h"
+#include "msg/msg_mailbox.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
-#include "mailbox.h"
 
 /** \defgroup m_host_management Management functions of Hosts
  *  \brief This section describes the host structure of MSG
@@ -117,7 +117,7 @@ const char *MSG_host_get_name(m_host_t host)
  */
 m_host_t MSG_host_self(void)
 {
-  return MSG_process_get_host(MSG_process_self());
+  return MSG_process_get_host(NULL);
 }
 
 /** \ingroup m_host_management
@@ -148,7 +148,7 @@ void __MSG_host_destroy(m_host_t host)
  */
 int MSG_get_host_number(void)
 {
-  return host_lib->count;
+  return xbt_lib_length(host_lib);
 }
 
 /** \ingroup m_host_management
@@ -162,13 +162,13 @@ m_host_t *MSG_get_host_table(void)
          char *key;
          void **data;
 
-         if (host_lib->count == 0)
+         if (xbt_lib_length(host_lib) == 0)
                return NULL;
          else
-               array = xbt_new0(void *, host_lib->count);
+               array = xbt_new0(void *, xbt_lib_length(host_lib));
 
          xbt_lib_foreach(host_lib, cursor, key, data) {
-           if(get_network_element_type(key) == SURF_NETWORK_ELEMENT_HOST)
+           if(routing_get_network_element_type(key) == SURF_NETWORK_ELEMENT_HOST)
                array[i++] = data[MSG_HOST_LEVEL];
          }
 
index 3f015f1..9872c2b 100644 (file)
@@ -6,8 +6,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 "mailbox.h"
-#include "msg/private.h"
+#include "msg_mailbox.h"
+#include "msg_private.h"
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg,
                                 "Logging specific to MSG (mailbox)");
 
@@ -79,15 +79,15 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
   CHECK_HOST();
 #ifdef HAVE_TRACING
   TRACE_msg_task_get_start();
-  double start_time = MSG_get_clock();
+  volatile double start_time = MSG_get_clock();
 #endif
 
   /* Sanity check */
   xbt_assert(task, "Null pointer for the task storage");
 
   if (*task)
-    XBT_CRITICAL
-        ("MSG_task_get() was asked to write in a non empty task struct.");
+    XBT_WARN
+        ("Asked to write the received task in a non empty struct -- proceeding.");
 
   /* Try to receive it by calling SIMIX network layer */
   TRY {
@@ -130,21 +130,17 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
   MSG_error_t ret = MSG_OK;
   simdata_task_t t_simdata = NULL;
   m_process_t process = MSG_process_self();
-  simdata_process_t p_simdata = SIMIX_process_self_get_data();
-#ifdef HAVE_TRACING
-  volatile smx_action_t comm = NULL;
-  int call_end = 0;
-#endif
+  simdata_process_t p_simdata = SIMIX_process_self_get_data(process);
   CHECK_HOST();
 
 #ifdef HAVE_TRACING
-  call_end = TRACE_msg_task_put_start(task);    //must be after CHECK_HOST()
+  int call_end = TRACE_msg_task_put_start(task);    //must be after CHECK_HOST()
 #endif
 
   /* Prepare the task to send */
   t_simdata = task->simdata;
   t_simdata->sender = process;
-  t_simdata->source = MSG_host_self();
+  t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data(process))->m_host;
 
   xbt_assert(t_simdata->isused == 0,
               "This task is still being used somewhere else. You cannot send it now. Go fix your code!");
@@ -157,22 +153,16 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
 
   /* Try to send it by calling SIMIX network layer */
   TRY {
-#ifdef HAVE_TRACING
-    if (TRACE_is_enabled()) {
-      comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+      smx_action_t comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, 0);
-      t_simdata->comm = comm;
-      SIMIX_req_set_category(comm, task->category);
-      SIMIX_req_comm_wait(comm, timeout);
-    } else {
-#endif
-      SIMIX_req_comm_send(mailbox, t_simdata->message_size,
-                          t_simdata->rate, task, sizeof(void*),
-                          NULL, NULL, timeout);
 #ifdef HAVE_TRACING
+    if (TRACE_is_enabled()) {
+      SIMIX_req_set_category(comm, task->category);
     }
 #endif
+     t_simdata->comm = comm;
+     SIMIX_req_comm_wait(comm, timeout);
   }
 
   CATCH(e) {
@@ -195,6 +185,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
     t_simdata->isused = 0;
   }
 
+
   p_simdata->waiting_task = NULL;
 #ifdef HAVE_TRACING
   if (call_end)
similarity index 100%
rename from src/msg/mailbox.h
rename to src/msg/msg_mailbox.h
similarity index 93%
rename from src/msg/private.h
rename to src/msg/msg_private.h
index ef8b829..e8af564 100644 (file)
@@ -55,8 +55,8 @@ typedef struct simdata_process {
   m_channel_t put_channel;      /* used for debugging purposes */
   smx_action_t waiting_action;
   m_task_t waiting_task;
-  int argc;                     /* arguments number if any */
   char **argv;                  /* arguments table if any */
+  int argc;                     /* arguments number if any */
   MSG_error_t last_errno;       /* the last value returned by a MSG_function */
   void* data;                   /* user data */
 } s_simdata_process_t, *simdata_process_t;
@@ -93,15 +93,19 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
 
 /*************************************************************/
 
-#define PROCESS_SET_ERRNO(val) \
-  (((simdata_process_t) SIMIX_process_self_get_data())->last_errno=val)
-#define PROCESS_GET_ERRNO() \
-  (((simdata_process_t) SIMIX_process_self_get_data())->last_errno)
+#ifdef MSG_USE_DEPRECATED
+#  define PROCESS_SET_ERRNO(val) \
+  (((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno=val)
+#  define PROCESS_GET_ERRNO() \
+  (((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno)
 #define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0)
 /* #define CHECK_ERRNO()  ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */
 
 /*#define CHECK_HOST()  xbt_assert(SIMIX_req_host_get_state(SIMIX_host_self())==1,\
                                   "Host failed, you cannot call this function. (state=%d)",SIMIX_req_host_get_state(SIMIX_host_self()))*/
+#else
+#  define MSG_RETURN(val) return(val)
+#endif
 #define CHECK_HOST()
 
 m_host_t __MSG_host_create(smx_host_t workstation, void *data);
similarity index 97%
rename from src/msg/m_process.c
rename to src/msg/msg_process.c
index a7b18f8..8a2f8ea 100644 (file)
@@ -4,7 +4,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 "msg/private.h"
+#include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 
@@ -32,7 +32,7 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
 
   if (smx_proc == SIMIX_process_self()) {
     /* avoid a SIMIX request if this function is called by the process itself */
-    msg_proc = SIMIX_process_self_get_data();
+    msg_proc = SIMIX_process_self_get_data(smx_proc);
   }
   else {
     msg_proc = SIMIX_req_process_get_data(smx_proc);
@@ -258,16 +258,19 @@ MSG_error_t MSG_process_set_data(m_process_t process, void *data)
 
 /** \ingroup m_process_management
  * \brief Return the location on which an agent is running.
- *
- * This function checks whether \a process is a valid pointer or not
-   and return the m_host_t corresponding to the location on which \a
-   process is running.
+ * \param process a process (NULL means the current one)
+ * \return the m_host_t corresponding to the location on which \a
+ * process is running.
  */
 m_host_t MSG_process_get_host(m_process_t process)
 {
-  xbt_assert(process != NULL, "Invalid parameter");
-
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata;
+  if (process == NULL) {
+    simdata = SIMIX_process_self_get_data(SIMIX_process_self());
+  }
+  else {
+    simdata = SIMIX_req_process_get_data(process);
+  }
   return simdata->m_host;
 }
 
similarity index 93%
rename from src/msg/task.c
rename to src/msg/msg_task.c
index 2a9a5c0..0aabc18 100644 (file)
@@ -4,7 +4,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 "msg/private.h"
+#include "msg_private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 
@@ -152,32 +152,35 @@ void MSG_task_set_name(m_task_t task, const char *name)
  * \brief Destroy a #m_task_t.
  *
  * Destructor for #m_task_t. Note that you should free user data, if any, \b 
-   before calling this function.
+ * before calling this function.
+ *
+ * Only the process that owns the task can destroy it.
+ * The owner changes after a successful send.
+ * If a task is successfully sent, the receiver becomes the owner and is
+ * supposed to destroy it. The sender should not use it anymore.
+ * If the task failed to be sent, the sender remains the owner of the task.
  */
 MSG_error_t MSG_task_destroy(m_task_t task)
 {
   smx_action_t action = NULL;
   xbt_assert((task != NULL), "Invalid parameter");
 
-  /* why? if somebody is using, then you can't free! ok... but will return MSG_OK? when this task will be destroyed? isn't the user code wrong? */
-  if (task->simdata->isused > 0) {
-    XBT_DEBUG("Cannot destroy task %p since somebody is using it", task);
-    return MSG_OK;
+  if (task->simdata->isused) {
+    /* the task is being sent or executed: cancel it first */
+    MSG_task_cancel(task);
   }
 #ifdef HAVE_TRACING
   TRACE_msg_task_destroy(task);
 #endif
 
-  if (task->name)
-    free(task->name);
+  xbt_free(task->name);
 
   action = task->simdata->compute;
   if (action)
     SIMIX_req_host_execution_destroy(action);
 
   /* parallel tasks only */
-  if (task->simdata->host_list)
-    xbt_free(task->simdata->host_list);
+  xbt_free(task->simdata->host_list);
 
   /* free main structures */
   xbt_free(task->simdata);
@@ -201,13 +204,7 @@ MSG_error_t MSG_task_cancel(m_task_t task)
   }
   else if (task->simdata->comm) {
     SIMIX_req_comm_cancel(task->simdata->comm);
-  }
-  else {
-    static int warned = 0;
-    if (!warned) {
-      XBT_WARN("Cannot cancel a non-running task");
-      warned = 1;
-    }
+    task->simdata->isused = 0;
   }
   return MSG_OK;
 }
index de1416b..eb4f695 100644 (file)
@@ -339,8 +339,7 @@ void RngStream_DeleteStream (RngStream * p)
 {
    if (*p == NULL)
       return;
-   if ((*p)->name != NULL)
-      free ((*p)->name);
+   free((*p)->name);
    free (*p);
    *p = NULL;
 }
index 94df936..f0eae81 100644 (file)
@@ -1259,8 +1259,8 @@ char *dax_text;
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -1269,7 +1269,7 @@ char *dax_text;
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -1305,7 +1305,7 @@ char *dax_text;
 const char rcs_dax__flexml_skeleton[] =
  "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
 const char rcs_dax__flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
+ "$" "Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp $";
 
 /* ANSI headers. */
 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
@@ -1342,54 +1342,79 @@ extern char *dax__bufferstack;
 #define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
 AT_dax__adag_version AX_dax__adag_version;
 #define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
+short int dax__adag_version_isset;
 AT_dax__uses_type AX_dax__uses_type;
 #define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
+short int dax__uses_type_isset;
 AT_dax__uses_optional AX_dax__uses_optional;
 #define A_dax__uses_optional AX_dax__uses_optional
+short int dax__uses_optional_isset;
 AT_dax__adag_name AX_dax__adag_name;
 #define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
+short int dax__adag_name_isset;
 AT_dax__child_ref AX_dax__child_ref;
 #define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
+short int dax__child_ref_isset;
 AT_dax__adag_xmlns AX_dax__adag_xmlns;
 #define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
+short int dax__adag_xmlns_isset;
 AT_dax__uses_transfer AX_dax__uses_transfer;
 #define A_dax__uses_transfer AX_dax__uses_transfer
+short int dax__uses_transfer_isset;
 AT_dax__job_id AX_dax__job_id;
 #define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
+short int dax__job_id_isset;
 AT_dax__uses_file AX_dax__uses_file;
 #define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
+short int dax__uses_file_isset;
 AT_dax__parent_ref AX_dax__parent_ref;
 #define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
+short int dax__parent_ref_isset;
 AT_dax__adag_count AX_dax__adag_count;
 #define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
+short int dax__adag_count_isset;
 AT_dax__adag_xmlns_c_xsi AX_dax__adag_xmlns_c_xsi;
 #define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
+short int dax__adag_xmlns_c_xsi_isset;
 AT_dax__adag_index AX_dax__adag_index;
 #define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
+short int dax__adag_index_isset;
 AT_dax__uses_size AX_dax__uses_size;
 #define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
+short int dax__uses_size_isset;
 AT_dax__adag_childCount AX_dax__adag_childCount;
 #define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
+short int dax__adag_childCount_isset;
 AT_dax__uses_link AX_dax__uses_link;
 #define A_dax__uses_link AX_dax__uses_link
+short int dax__uses_link_isset;
 AT_dax__job_runtime AX_dax__job_runtime;
 #define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
+short int dax__job_runtime_isset;
 AT_dax__job_level AX_dax__job_level;
 #define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
+short int dax__job_level_isset;
 AT_dax__job_namespace AX_dax__job_namespace;
 #define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
+short int dax__job_namespace_isset;
 AT_dax__job_name AX_dax__job_name;
 #define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
+short int dax__job_name_isset;
 AT_dax__adag_jobCount AX_dax__adag_jobCount;
 #define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
+short int dax__adag_jobCount_isset;
 AT_dax__job_version AX_dax__job_version;
 #define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
+short int dax__job_version_isset;
 AT_dax__adag_xsi_c_schemaLocation AX_dax__adag_xsi_c_schemaLocation;
 #define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
+short int dax__adag_xsi_c_schemaLocation_isset;
 AT_dax__uses_register AX_dax__uses_register;
 #define A_dax__uses_register AX_dax__uses_register
+short int dax__uses_register_isset;
 AT_dax__adag_fileCount AX_dax__adag_fileCount;
 #define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
+short int dax__adag_fileCount_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -1999,15 +2024,25 @@ case 17:
 YY_RULE_SETUP
 {
   AX_dax__adag_xmlns = 1;
+  dax__adag_xmlns_isset = 0;
   AX_dax__adag_xmlns_c_xsi = 35;
+  dax__adag_xmlns_c_xsi_isset = 0;
   AX_dax__adag_xsi_c_schemaLocation = 77;
+  dax__adag_xsi_c_schemaLocation_isset = 0;
   AX_dax__adag_version = 153;
+  dax__adag_version_isset = 0;
   AX_dax__adag_count = 0;
+  dax__adag_count_isset = 0;
   AX_dax__adag_index = 0;
+  dax__adag_index_isset = 0;
   AX_dax__adag_name = 0;
+  dax__adag_name_isset = 0;
   AX_dax__adag_jobCount = 0;
+  dax__adag_jobCount_isset = 0;
   AX_dax__adag_fileCount = 0;
+  dax__adag_fileCount_isset = 0;
   AX_dax__adag_childCount = 0;
+  dax__adag_childCount_isset = 0;
   ENTER(AL_dax__adag); pushbuffer(0);
   }
        YY_BREAK
@@ -2015,102 +2050,102 @@ YY_RULE_SETUP
 case 18:
 /* rule 18 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns);
+if (dax__adag_xmlns_isset != 0) {FAIL("Multiple definition of attribute xmlns in <dax__adag>");} dax__adag_xmlns_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns);
        YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns);
+if (dax__adag_xmlns_isset != 0) {FAIL("Multiple definition of attribute xmlns in <dax__adag>");}  dax__adag_xmlns_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns);
        YY_BREAK
 case 20:
 /* rule 20 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
+if (dax__adag_xmlns_c_xsi_isset != 0) {FAIL("Multiple definition of attribute xmlns:xsi in <dax__adag>");} dax__adag_xmlns_c_xsi_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
        YY_BREAK
 case 21:
 /* rule 21 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
+if (dax__adag_xmlns_c_xsi_isset != 0) {FAIL("Multiple definition of attribute xmlns:xsi in <dax__adag>");}  dax__adag_xmlns_c_xsi_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
        YY_BREAK
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
+if (dax__adag_xsi_c_schemaLocation_isset != 0) {FAIL("Multiple definition of attribute xsi:schemaLocation in <dax__adag>");} dax__adag_xsi_c_schemaLocation_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
        YY_BREAK
 case 23:
 /* rule 23 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
+if (dax__adag_xsi_c_schemaLocation_isset != 0) {FAIL("Multiple definition of attribute xsi:schemaLocation in <dax__adag>");}  dax__adag_xsi_c_schemaLocation_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
        YY_BREAK
 case 24:
 /* rule 24 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_version);
+if (dax__adag_version_isset != 0) {FAIL("Multiple definition of attribute version in <dax__adag>");} dax__adag_version_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_version);
        YY_BREAK
 case 25:
 /* rule 25 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_version);
+if (dax__adag_version_isset != 0) {FAIL("Multiple definition of attribute version in <dax__adag>");}  dax__adag_version_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_version);
        YY_BREAK
 case 26:
 /* rule 26 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_count);
+if (dax__adag_count_isset != 0) {FAIL("Multiple definition of attribute count in <dax__adag>");} dax__adag_count_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_count);
        YY_BREAK
 case 27:
 /* rule 27 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_count);
+if (dax__adag_count_isset != 0) {FAIL("Multiple definition of attribute count in <dax__adag>");}  dax__adag_count_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_count);
        YY_BREAK
 case 28:
 /* rule 28 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_index);
+if (dax__adag_index_isset != 0) {FAIL("Multiple definition of attribute index in <dax__adag>");} dax__adag_index_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_index);
        YY_BREAK
 case 29:
 /* rule 29 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_index);
+if (dax__adag_index_isset != 0) {FAIL("Multiple definition of attribute index in <dax__adag>");}  dax__adag_index_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_index);
        YY_BREAK
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_name);
+if (dax__adag_name_isset != 0) {FAIL("Multiple definition of attribute name in <dax__adag>");} dax__adag_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_name);
        YY_BREAK
 case 31:
 /* rule 31 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_name);
+if (dax__adag_name_isset != 0) {FAIL("Multiple definition of attribute name in <dax__adag>");}  dax__adag_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_name);
        YY_BREAK
 case 32:
 /* rule 32 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_jobCount);
+if (dax__adag_jobCount_isset != 0) {FAIL("Multiple definition of attribute jobCount in <dax__adag>");} dax__adag_jobCount_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_jobCount);
        YY_BREAK
 case 33:
 /* rule 33 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_jobCount);
+if (dax__adag_jobCount_isset != 0) {FAIL("Multiple definition of attribute jobCount in <dax__adag>");}  dax__adag_jobCount_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_jobCount);
        YY_BREAK
 case 34:
 /* rule 34 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_fileCount);
+if (dax__adag_fileCount_isset != 0) {FAIL("Multiple definition of attribute fileCount in <dax__adag>");} dax__adag_fileCount_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_fileCount);
        YY_BREAK
 case 35:
 /* rule 35 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_fileCount);
+if (dax__adag_fileCount_isset != 0) {FAIL("Multiple definition of attribute fileCount in <dax__adag>");}  dax__adag_fileCount_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_fileCount);
        YY_BREAK
 case 36:
 /* rule 36 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__adag_childCount);
+if (dax__adag_childCount_isset != 0) {FAIL("Multiple definition of attribute childCount in <dax__adag>");} dax__adag_childCount_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__adag_childCount);
        YY_BREAK
 case 37:
 /* rule 37 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__adag_childCount);
+if (dax__adag_childCount_isset != 0) {FAIL("Multiple definition of attribute childCount in <dax__adag>");}  dax__adag_childCount_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__adag_childCount);
        YY_BREAK
 case 38:
 YY_RULE_SETUP
@@ -2178,11 +2213,17 @@ case 46:
 YY_RULE_SETUP
 {
   AX_dax__job_id = 0;
+  dax__job_id_isset = 0;
   AX_dax__job_namespace = 0;
+  dax__job_namespace_isset = 0;
   AX_dax__job_name = 0;
+  dax__job_name_isset = 0;
   AX_dax__job_version = 157;
+  dax__job_version_isset = 0;
   AX_dax__job_runtime = 0;
+  dax__job_runtime_isset = 0;
   AX_dax__job_level = 0;
+  dax__job_level_isset = 0;
   ENTER(AL_dax__job); pushbuffer(0);
   }
        YY_BREAK
@@ -2190,62 +2231,62 @@ YY_RULE_SETUP
 case 47:
 /* rule 47 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_id);
+if (dax__job_id_isset != 0) {FAIL("Multiple definition of attribute id in <dax__job>");} dax__job_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_id);
        YY_BREAK
 case 48:
 /* rule 48 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_id);
+if (dax__job_id_isset != 0) {FAIL("Multiple definition of attribute id in <dax__job>");}  dax__job_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_id);
        YY_BREAK
 case 49:
 /* rule 49 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_namespace);
+if (dax__job_namespace_isset != 0) {FAIL("Multiple definition of attribute namespace in <dax__job>");} dax__job_namespace_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_namespace);
        YY_BREAK
 case 50:
 /* rule 50 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_namespace);
+if (dax__job_namespace_isset != 0) {FAIL("Multiple definition of attribute namespace in <dax__job>");}  dax__job_namespace_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_namespace);
        YY_BREAK
 case 51:
 /* rule 51 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_name);
+if (dax__job_name_isset != 0) {FAIL("Multiple definition of attribute name in <dax__job>");} dax__job_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_name);
        YY_BREAK
 case 52:
 /* rule 52 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_name);
+if (dax__job_name_isset != 0) {FAIL("Multiple definition of attribute name in <dax__job>");}  dax__job_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_name);
        YY_BREAK
 case 53:
 /* rule 53 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_version);
+if (dax__job_version_isset != 0) {FAIL("Multiple definition of attribute version in <dax__job>");} dax__job_version_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_version);
        YY_BREAK
 case 54:
 /* rule 54 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_version);
+if (dax__job_version_isset != 0) {FAIL("Multiple definition of attribute version in <dax__job>");}  dax__job_version_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_version);
        YY_BREAK
 case 55:
 /* rule 55 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_runtime);
+if (dax__job_runtime_isset != 0) {FAIL("Multiple definition of attribute runtime in <dax__job>");} dax__job_runtime_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_runtime);
        YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_runtime);
+if (dax__job_runtime_isset != 0) {FAIL("Multiple definition of attribute runtime in <dax__job>");}  dax__job_runtime_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_runtime);
        YY_BREAK
 case 57:
 /* rule 57 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__job_level);
+if (dax__job_level_isset != 0) {FAIL("Multiple definition of attribute level in <dax__job>");} dax__job_level_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__job_level);
        YY_BREAK
 case 58:
 /* rule 58 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__job_level);
+if (dax__job_level_isset != 0) {FAIL("Multiple definition of attribute level in <dax__job>");}  dax__job_level_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__job_level);
        YY_BREAK
 case 59:
 YY_RULE_SETUP
@@ -2319,12 +2360,19 @@ case 67:
 YY_RULE_SETUP
 {
   AX_dax__uses_file = 0;
+  dax__uses_file_isset = 0;
   AX_dax__uses_link = AU_dax__uses_link;
+  dax__uses_link_isset = 0;
   AX_dax__uses_register = A_dax__uses_register_true;
+  dax__uses_register_isset = 0;
   AX_dax__uses_transfer = A_dax__uses_transfer_true;
+  dax__uses_transfer_isset = 0;
   AX_dax__uses_optional = A_dax__uses_optional_false;
+  dax__uses_optional_isset = 0;
   AX_dax__uses_type = 161;
+  dax__uses_type_isset = 0;
   AX_dax__uses_size = 0;
+  dax__uses_size_isset = 0;
   ENTER(AL_dax__uses); pushbuffer(0);
   }
        YY_BREAK
@@ -2332,12 +2380,12 @@ YY_RULE_SETUP
 case 68:
 /* rule 68 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__uses_file);
+if (dax__uses_file_isset != 0) {FAIL("Multiple definition of attribute file in <dax__uses>");} dax__uses_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__uses_file);
        YY_BREAK
 case 69:
 /* rule 69 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__uses_file);
+if (dax__uses_file_isset != 0) {FAIL("Multiple definition of attribute file in <dax__uses>");}  dax__uses_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__uses_file);
        YY_BREAK
 case 70:
 /* rule 70 can match eol */
@@ -2398,22 +2446,22 @@ A_dax__uses_optional = A_dax__uses_optional_true;
 case 86:
 /* rule 86 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__uses_type);
+if (dax__uses_type_isset != 0) {FAIL("Multiple definition of attribute type in <dax__uses>");} dax__uses_type_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__uses_type);
        YY_BREAK
 case 87:
 /* rule 87 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__uses_type);
+if (dax__uses_type_isset != 0) {FAIL("Multiple definition of attribute type in <dax__uses>");}  dax__uses_type_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__uses_type);
        YY_BREAK
 case 88:
 /* rule 88 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__uses_size);
+if (dax__uses_size_isset != 0) {FAIL("Multiple definition of attribute size in <dax__uses>");} dax__uses_size_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__uses_size);
        YY_BREAK
 case 89:
 /* rule 89 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__uses_size);
+if (dax__uses_size_isset != 0) {FAIL("Multiple definition of attribute size in <dax__uses>");}  dax__uses_size_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__uses_size);
        YY_BREAK
 case 90:
 YY_RULE_SETUP
@@ -2481,6 +2529,7 @@ case 98:
 YY_RULE_SETUP
 {
   AX_dax__child_ref = 0;
+  dax__child_ref_isset = 0;
   ENTER(AL_dax__child); pushbuffer(0);
   }
        YY_BREAK
@@ -2488,12 +2537,12 @@ YY_RULE_SETUP
 case 99:
 /* rule 99 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__child_ref);
+if (dax__child_ref_isset != 0) {FAIL("Multiple definition of attribute ref in <dax__child>");} dax__child_ref_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__child_ref);
        YY_BREAK
 case 100:
 /* rule 100 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__child_ref);
+if (dax__child_ref_isset != 0) {FAIL("Multiple definition of attribute ref in <dax__child>");}  dax__child_ref_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__child_ref);
        YY_BREAK
 case 101:
 YY_RULE_SETUP
@@ -2561,6 +2610,7 @@ case 109:
 YY_RULE_SETUP
 {
   AX_dax__parent_ref = 0;
+  dax__parent_ref_isset = 0;
   ENTER(AL_dax__parent); pushbuffer(0);
   }
        YY_BREAK
@@ -2568,12 +2618,12 @@ YY_RULE_SETUP
 case 110:
 /* rule 110 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_dax__parent_ref);
+if (dax__parent_ref_isset != 0) {FAIL("Multiple definition of attribute ref in <dax__parent>");} dax__parent_ref_isset = 1; ENTER(VALUE1); BUFFERSET(AX_dax__parent_ref);
        YY_BREAK
 case 111:
 /* rule 111 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_dax__parent_ref);
+if (dax__parent_ref_isset != 0) {FAIL("Multiple definition of attribute ref in <dax__parent>");}  dax__parent_ref_isset = 1; ENTER(VALUE2); BUFFERSET(AX_dax__parent_ref);
        YY_BREAK
 case 112:
 YY_RULE_SETUP
index de7b957..65c2032 100644 (file)
@@ -2,8 +2,8 @@
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -12,7 +12,7 @@
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -113,54 +113,79 @@ XBT_PUBLIC_DATA(char *) dax__bufferstack;
 #define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
 XBT_PUBLIC_DATA(AT_dax__adag_version ) AX_dax__adag_version;
 #define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
+XBT_PUBLIC_DATA(short ) int dax__adag_version_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_type ) AX_dax__uses_type;
 #define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
+XBT_PUBLIC_DATA(short ) int dax__uses_type_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_optional ) AX_dax__uses_optional;
 #define A_dax__uses_optional AX_dax__uses_optional
+XBT_PUBLIC_DATA(short ) int dax__uses_optional_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_name ) AX_dax__adag_name;
 #define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
+XBT_PUBLIC_DATA(short ) int dax__adag_name_isset;
 XBT_PUBLIC_DATA(AT_dax__child_ref ) AX_dax__child_ref;
 #define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
+XBT_PUBLIC_DATA(short ) int dax__child_ref_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_xmlns ) AX_dax__adag_xmlns;
 #define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
+XBT_PUBLIC_DATA(short ) int dax__adag_xmlns_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_transfer ) AX_dax__uses_transfer;
 #define A_dax__uses_transfer AX_dax__uses_transfer
+XBT_PUBLIC_DATA(short ) int dax__uses_transfer_isset;
 XBT_PUBLIC_DATA(AT_dax__job_id ) AX_dax__job_id;
 #define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
+XBT_PUBLIC_DATA(short ) int dax__job_id_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_file ) AX_dax__uses_file;
 #define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
+XBT_PUBLIC_DATA(short ) int dax__uses_file_isset;
 XBT_PUBLIC_DATA(AT_dax__parent_ref ) AX_dax__parent_ref;
 #define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
+XBT_PUBLIC_DATA(short ) int dax__parent_ref_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_count ) AX_dax__adag_count;
 #define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
+XBT_PUBLIC_DATA(short ) int dax__adag_count_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_xmlns_c_xsi ) AX_dax__adag_xmlns_c_xsi;
 #define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
+XBT_PUBLIC_DATA(short ) int dax__adag_xmlns_c_xsi_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_index ) AX_dax__adag_index;
 #define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
+XBT_PUBLIC_DATA(short ) int dax__adag_index_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_size ) AX_dax__uses_size;
 #define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
+XBT_PUBLIC_DATA(short ) int dax__uses_size_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_childCount ) AX_dax__adag_childCount;
 #define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
+XBT_PUBLIC_DATA(short ) int dax__adag_childCount_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_link ) AX_dax__uses_link;
 #define A_dax__uses_link AX_dax__uses_link
+XBT_PUBLIC_DATA(short ) int dax__uses_link_isset;
 XBT_PUBLIC_DATA(AT_dax__job_runtime ) AX_dax__job_runtime;
 #define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
+XBT_PUBLIC_DATA(short ) int dax__job_runtime_isset;
 XBT_PUBLIC_DATA(AT_dax__job_level ) AX_dax__job_level;
 #define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
+XBT_PUBLIC_DATA(short ) int dax__job_level_isset;
 XBT_PUBLIC_DATA(AT_dax__job_namespace ) AX_dax__job_namespace;
 #define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
+XBT_PUBLIC_DATA(short ) int dax__job_namespace_isset;
 XBT_PUBLIC_DATA(AT_dax__job_name ) AX_dax__job_name;
 #define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
+XBT_PUBLIC_DATA(short ) int dax__job_name_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_jobCount ) AX_dax__adag_jobCount;
 #define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
+XBT_PUBLIC_DATA(short ) int dax__adag_jobCount_isset;
 XBT_PUBLIC_DATA(AT_dax__job_version ) AX_dax__job_version;
 #define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
+XBT_PUBLIC_DATA(short ) int dax__job_version_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_xsi_c_schemaLocation ) AX_dax__adag_xsi_c_schemaLocation;
 #define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
+XBT_PUBLIC_DATA(short ) int dax__adag_xsi_c_schemaLocation_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_register ) AX_dax__uses_register;
 #define A_dax__uses_register AX_dax__uses_register
+XBT_PUBLIC_DATA(short ) int dax__uses_register_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_fileCount ) AX_dax__adag_fileCount;
 #define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
+XBT_PUBLIC_DATA(short ) int dax__adag_fileCount_isset;
 
 /* XML application utilities. */
 XBT_PUBLIC(int ) dax__element_context(int);
diff --git a/src/simdag/dax_dtd.l b/src/simdag/dax_dtd.l
deleted file mode 100644 (file)
index 7496336..0000000
+++ /dev/null
@@ -1,876 +0,0 @@
-/* Validating XML processor for src/simdag/dax.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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
- * 
- * 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-2006 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.
- * 
- */
-
-%{
-
-/* Version strings. */
-const char rcs_dax__flexml_skeleton[] =
- "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
-const char rcs_dax__flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
-
-/* ANSI headers. */
-#include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <ctype.h>
-     
-#if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
-# ifndef __STRICT_ANSI__
-#  include <io.h>
-#  include <process.h>
-# endif
-#else
-# include <unistd.h>
-#endif
-     
-#ifndef FLEXML_INDEXSTACKSIZE
-#define FLEXML_INDEXSTACKSIZE 1000
-#endif
-
-/* Generated definitions. */
-#define FLEXML_yylineno
-#ifndef FLEXML_BUFFERSTACKSIZE
-#define FLEXML_BUFFERSTACKSIZE 1000000
-#endif
-#define FLEXML_NEED_BUFFERLIT
-
-/* XML processor api. */
-/* FleXML-provided data. */
-int dax__pcdata_ix;
-extern char *dax__bufferstack;
-#define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
-AT_dax__adag_version AX_dax__adag_version;
-#define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
-AT_dax__uses_type AX_dax__uses_type;
-#define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
-AT_dax__uses_optional AX_dax__uses_optional;
-#define A_dax__uses_optional AX_dax__uses_optional
-AT_dax__adag_name AX_dax__adag_name;
-#define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
-AT_dax__child_ref AX_dax__child_ref;
-#define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
-AT_dax__adag_xmlns AX_dax__adag_xmlns;
-#define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
-AT_dax__uses_transfer AX_dax__uses_transfer;
-#define A_dax__uses_transfer AX_dax__uses_transfer
-AT_dax__job_id AX_dax__job_id;
-#define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
-AT_dax__uses_file AX_dax__uses_file;
-#define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
-AT_dax__parent_ref AX_dax__parent_ref;
-#define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
-AT_dax__adag_count AX_dax__adag_count;
-#define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
-AT_dax__adag_xmlns_c_xsi AX_dax__adag_xmlns_c_xsi;
-#define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
-AT_dax__adag_index AX_dax__adag_index;
-#define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
-AT_dax__uses_size AX_dax__uses_size;
-#define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
-AT_dax__adag_childCount AX_dax__adag_childCount;
-#define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
-AT_dax__uses_link AX_dax__uses_link;
-#define A_dax__uses_link AX_dax__uses_link
-AT_dax__job_runtime AX_dax__job_runtime;
-#define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
-AT_dax__job_level AX_dax__job_level;
-#define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
-AT_dax__job_namespace AX_dax__job_namespace;
-#define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
-AT_dax__job_name AX_dax__job_name;
-#define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
-AT_dax__adag_jobCount AX_dax__adag_jobCount;
-#define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
-AT_dax__job_version AX_dax__job_version;
-#define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
-AT_dax__adag_xsi_c_schemaLocation AX_dax__adag_xsi_c_schemaLocation;
-#define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
-AT_dax__uses_register AX_dax__uses_register;
-#define A_dax__uses_register AX_dax__uses_register
-AT_dax__adag_fileCount AX_dax__adag_fileCount;
-#define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
-
-/* XML state. */
-#ifdef FLEX_DEBUG
-# define ENTER(state)  debug_enter(state,#state)
-# define LEAVE         debug_leave()
-# define SET(state)    debug_set(state,#state)
-  static void debug_enter(int, const char*);
-  static void debug_leave(void);
-  static void debug_set(int, const char*);
-#else
-# define ENTER(state)  (yy_push_state(state))
-# define LEAVE         (yy_pop_state())
-# define SET(state)    BEGIN(state)
-#endif
-
-/* Generic actions. */
-#define SKIP   /*skip*/
-#define SUCCEED        CLEANUP; return 0
-
-#define FAIL   return fail
-static int fail(const char*, ...);
-
-enum {flexml_max_err_msg_size = 512};
-static char flexml_err_msg[flexml_max_err_msg_size];
-const char * dax__parse_err_msg()
-{
-    return flexml_err_msg;
-}
-static void reset_dax__parse_err_msg()
-{
-    flexml_err_msg[0] = '\0';
-}
-
-/* Cleanup */
-static void cleanup(void);
-#define CLEANUP  cleanup()
-
-/* Text buffer stack handling. */
-char *dax__bufferstack = NULL;
-static int blimit = FLEXML_BUFFERSTACKSIZE;
-static int bnext = 1;
-
-static int *indexstack = NULL;
-static int ilimit = FLEXML_INDEXSTACKSIZE;
-static int inext = 1;
-
-#define BUFFERSET(P)  (P = bnext)
-#define BUFFERPUTC(C) (ck_blimit(), dax__bufferstack[bnext++] = (C))
-#define BUFFERDONE    (BUFFERPUTC('\0'))
-
-#define BUFFERLITERAL(C, P) dax__bufferliteral(C, &(P), yytext)
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_blimit()
-{
-     if (bnext >= blimit) {
-        blimit += FLEXML_BUFFERSTACKSIZE + 2;
-        {
-            char *temp = (char *) realloc(dax__bufferstack, blimit);
-            assert(temp);
-            dax__bufferstack = temp;
-        }
-     }
-     return 0;
-}
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_ilimit()
-{
-     if (inext >= ilimit) {
-        ilimit += FLEXML_INDEXSTACKSIZE + 2;
-        {
-            int *temp = (int *) realloc(indexstack, ilimit);
-            assert(temp);
-            indexstack = temp;
-        }
-     }
-     return 0;
-}
-
-#ifdef FLEXML_NEED_BUFFERLIT
-static void dax__bufferliteral(char c, int* pp, const char* text)
-{
-  const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
-  assert(s <= e); BUFFERSET(*pp);
-  while (++s<e) {
-    if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
-    else BUFFERPUTC(*s);
-  }
-  BUFFERDONE;
-}
-#endif
-
-static void pushbuffer(int p)
-{
-    ck_ilimit();
-    indexstack[inext++] = p;
-    indexstack[inext++] = bnext;    
-}
-
-static int popbuffer(void)
-{
-    assert(inext >= 2);
-    bnext = indexstack[--inext];
-    return indexstack[--inext];
-}
-
-/* General internal entities are `unput' back onto the input stream... */
-#define ENTITYTEXT(T) \
-  { char *s = (T), *e = s+strlen(s);\
-    while (--e >= s) { unput(*e); }}
-
-
-%}
-
-/* Flex standard options. */
-%option stack
-%option noyy_top_state
-%option noinput
-%option noreject
-%option noyymore
-%option noyywrap
-
-/* Flex user-requested options. */
-%option yylineno
-%option nounput
-
-/* XML character classes (currently restricted to ASCII). */
-
-/* "Common syntactic structures." */
-S              [ \t\n\r\f]+
-s              [ \t\n\r\f]*
-
-/* "Names and Tokens." */
-NameChar       [A-Za-z0-9.:_-]
-Name           [A-Za-z_:]{NameChar}*
-Names          {Name}({S}{Name})*
-Nmtoken                ({NameChar})+
-Nmtokens       {Nmtoken}({S}{Nmtoken})*
-
-/* Miscellaneous. */
-VersionNum     [a-zA-Z0-9_.:-]+
-Eq             {s}"="{s}
-Literal                \'[^'']*\'|\"[^""]*\"
-
-/* Parser states (flex `exclusive start conditions'):
- *
- * PROLOG      the XML prolog of the document before <?xml...>
- * DOCTYPE     the XML prolog of the document after <?xml...>
- * EPILOG      after the root element
- * INCOMMENT   inside an XML comment <!--....-->
- * INPI                inside an XML PI <?...?>
- * VALUE1      inside a '...'-delimited literal
- * VALUE2      inside a "..."-delimited literal
- * CDATA       inside a <![CDATA[...] ]> section.
- * ROOT_<tag>  expect root element <tag>
- * AL_<tag>    inside the attribute list for <tag>
- * IN_<tag>    inside a <tag> with element contents (ready for end tag)
- * IMPOSSIBLE  dummy to permit disabling rules; must be last
- */
-%x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
-%x ROOT_dax__adag AL_dax__adag S_dax__adag S_dax__adag_1 S_dax__adag_2 S_dax__adag_3 S_dax__adag_4 S_dax__adag_5 E_dax__adag
-%x AL_dax__job S_dax__job S_dax__job_1 S_dax__job_2 E_dax__job
-%x AL_dax__uses E_dax__uses
-%x AL_dax__child S_dax__child S_dax__child_1 S_dax__child_2 E_dax__child
-%x AL_dax__parent E_dax__parent
-%x IMPOSSIBLE
-
-%{
-/* State names. */
-const char* *dax__statenames=NULL;
-%}
-
-%%
-
- /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
- SET(PROLOG);
- reset_dax__parse_err_msg();
- dax__bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
- assert(dax__bufferstack);
- #ifdef FLEX_DEBUG
- {
-     int i;
-     for (i = 0; i < blimit; i++) {
-         dax__bufferstack[i] = '\377';
-     }
- }
- #endif
- dax__bufferstack[0] = '\0';
- indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
- assert(indexstack);
- indexstack[0] = 0;
-
-  /* FleXML_init */
-  bnext = inext = 1;
-  dax__bufferliteral('\0', &bnext, "http://pegasus.isi.edu/schema/DAX");
-  dax__bufferliteral('\0', &bnext, "http://www.w3.org/2001/XMLSchema-instance");
-  dax__bufferliteral('\0', &bnext, "http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-2.1.xsd");
-  dax__bufferliteral('\0', &bnext, "1.0");
-  dax__bufferliteral('\0', &bnext, "0.0");
-  dax__bufferliteral('\0', &bnext, "data");
-  if(!dax__statenames) {dax__statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
-  dax__statenames[PROLOG] = NULL;
-  dax__statenames[DOCTYPE] = NULL;
-  dax__statenames[EPILOG] = NULL;
-  dax__statenames[INCOMMENT] = NULL;
-  dax__statenames[INPI] = NULL;
-  dax__statenames[VALUE1] = NULL;
-  dax__statenames[VALUE2] = NULL;
-  dax__statenames[CDATA] = NULL;
-  dax__statenames[ROOT_dax__adag] = NULL;
-  dax__statenames[AL_dax__adag] = NULL;
-  dax__statenames[S_dax__adag] = "adag";
-  dax__statenames[S_dax__adag_1] = "adag";
-  dax__statenames[S_dax__adag_2] = "adag";
-  dax__statenames[S_dax__adag_3] = "adag";
-  dax__statenames[S_dax__adag_4] = "adag";
-  dax__statenames[S_dax__adag_5] = "adag";
-  dax__statenames[E_dax__adag] = "adag";
-  dax__statenames[AL_dax__job] = NULL;
-  dax__statenames[S_dax__job] = "job";
-  dax__statenames[S_dax__job_1] = "job";
-  dax__statenames[S_dax__job_2] = "job";
-  dax__statenames[E_dax__job] = "job";
-  dax__statenames[AL_dax__uses] = NULL;
-  dax__statenames[E_dax__uses] = "uses";
-  dax__statenames[AL_dax__child] = NULL;
-  dax__statenames[S_dax__child] = "child";
-  dax__statenames[S_dax__child_1] = "child";
-  dax__statenames[S_dax__child_2] = "child";
-  dax__statenames[E_dax__child] = "child";
-  dax__statenames[AL_dax__parent] = NULL;
-  dax__statenames[E_dax__parent] = "parent";
-  }
-
- /* COMMENTS and PIs: handled uniformly for efficiency. */
-
-<ROOT_dax__adag,AL_dax__adag,S_dax__adag,S_dax__adag_1,S_dax__adag_2,S_dax__adag_3,S_dax__adag_4,S_dax__adag_5,E_dax__adag,AL_dax__job,S_dax__job,S_dax__job_1,S_dax__job_2,E_dax__job,AL_dax__uses,E_dax__uses,AL_dax__child,S_dax__child,S_dax__child_1,S_dax__child_2,E_dax__child,AL_dax__parent,E_dax__parent,PROLOG,DOCTYPE,EPILOG>{
- "<!--" ENTER(INCOMMENT);
- "<?" ENTER(INPI);
-}
-<INCOMMENT>{
- "-->"         LEAVE;
- "--"          |
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in comment.");
-}
-<INPI>{
- "?>"          LEAVE;
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in PI (processing instruction).");
-}
-
- /* SPACES: skipped uniformly */
-
-<ROOT_dax__adag,AL_dax__adag,S_dax__adag,S_dax__adag_1,S_dax__adag_2,S_dax__adag_3,S_dax__adag_4,S_dax__adag_5,E_dax__adag,AL_dax__job,S_dax__job,S_dax__job_1,S_dax__job_2,E_dax__job,AL_dax__uses,E_dax__uses,AL_dax__child,S_dax__child,S_dax__child_1,S_dax__child_2,E_dax__child,AL_dax__parent,E_dax__parent,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
-
- /* PROLOG: determine root element and process it. */
-
-<PROLOG>{
- "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(ROOT_dax__adag); 
- "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
-}
-
-<PROLOG,DOCTYPE>{
- "<!DOCTYPE"{S}"adag"{S}SYSTEM{S}("'dax.dtd'"|"\"dax.dtd\""){s}">" SET(ROOT_dax__adag);
- "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
- .             FAIL("Unexpected character `%c' in prolog.", yytext[0]);
- <<EOF>>       FAIL("EOF in prolog.");
-}
-
- /* RULES DERIVED FROM DTD. */
-
- /* <!-- Small DTD for DAX files. -->  */
-
-<S_dax__child_1,S_dax__job,S_dax__adag_3,S_dax__child_2,S_dax__adag_5,S_dax__job_1,E_dax__job,E_dax__adag,S_dax__child,S_dax__adag_4,S_dax__job_2,S_dax__adag,S_dax__adag_2,S_dax__adag_1,E_dax__child>"<adag"{s} FAIL("Starting tag <adag> is not allowed here.");
-
-<ROOT_dax__adag>"<adag"{s} {
-  AX_dax__adag_xmlns = 1;
-  AX_dax__adag_xmlns_c_xsi = 35;
-  AX_dax__adag_xsi_c_schemaLocation = 77;
-  AX_dax__adag_version = 153;
-  AX_dax__adag_count = 0;
-  AX_dax__adag_index = 0;
-  AX_dax__adag_name = 0;
-  AX_dax__adag_jobCount = 0;
-  AX_dax__adag_fileCount = 0;
-  AX_dax__adag_childCount = 0;
-  ENTER(AL_dax__adag); pushbuffer(0);
-  }
-
-<AL_dax__adag>{
- "xmlns"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns);
- "xmlns"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns);
-
- "xmlns:xsi"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
- "xmlns:xsi"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_xmlns_c_xsi);
-
- "xsi:schemaLocation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
- "xsi:schemaLocation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_xsi_c_schemaLocation);
-
- "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_version);
- "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_version);
-
- "count"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_count);
- "count"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_count);
-
- "index"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_index);
- "index"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_index);
-
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_name);
-
- "jobCount"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_jobCount);
- "jobCount"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_jobCount);
-
- "fileCount"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_fileCount);
- "fileCount"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_fileCount);
-
- "childCount"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__adag_childCount);
- "childCount"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__adag_childCount);
-
- ">" {
-  LEAVE; STag_dax__adag();dax__pcdata_ix = 0; ENTER(S_dax__adag);
- }
- "/>" {
-  LEAVE; STag_dax__adag(); dax__pcdata_ix = 0; ETag_dax__adag(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_dax__adag: SET(EPILOG); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of adag element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `adag' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `adag' element.");
-}
-
-<S_dax__adag_1,S_dax__adag_5,E_dax__adag,S_dax__adag_3,S_dax__adag>{
- "</adag"{s}">" {
-  LEAVE;
-  ETag_dax__adag();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_dax__adag: SET(EPILOG); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</adag>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</adag>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</adag>' expected.");
-}
-
-<S_dax__child_1,S_dax__job,S_dax__child_2,ROOT_dax__job,S_dax__adag_5,S_dax__job_1,E_dax__job,E_dax__adag,S_dax__child,S_dax__adag_4,S_dax__job_2,E_dax__child,S_dax__adag_1>"<job"{s} FAIL("Starting tag <job> is not allowed here.");
-
-<S_dax__adag_2,S_dax__adag_3,S_dax__adag>"<job"{s} {
-  AX_dax__job_id = 0;
-  AX_dax__job_namespace = 0;
-  AX_dax__job_name = 0;
-  AX_dax__job_version = 157;
-  AX_dax__job_runtime = 0;
-  AX_dax__job_level = 0;
-  ENTER(AL_dax__job); pushbuffer(0);
-  }
-
-<AL_dax__job>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_id);
-
- "namespace"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_namespace);
- "namespace"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_namespace);
-
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_name);
-
- "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_version);
- "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_version);
-
- "runtime"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_runtime);
- "runtime"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_runtime);
-
- "level"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__job_level);
- "level"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__job_level);
-
- ">" {
-  if (!AX_dax__job_id) FAIL("Required attribute `id' not set for `job' element.");
-  if (!AX_dax__job_name) FAIL("Required attribute `name' not set for `job' element.");
-  if (!AX_dax__job_runtime) FAIL("Required attribute `runtime' not set for `job' element.");
-  LEAVE; STag_dax__job();dax__pcdata_ix = 0; ENTER(S_dax__job);
- }
- "/>" {
-  if (!AX_dax__job_id) FAIL("Required attribute `id' not set for `job' element.");
-  if (!AX_dax__job_name) FAIL("Required attribute `name' not set for `job' element.");
-  if (!AX_dax__job_runtime) FAIL("Required attribute `runtime' not set for `job' element.");
-  LEAVE; STag_dax__job(); dax__pcdata_ix = 0; ETag_dax__job(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__adag_2: case S_dax__adag_3: case S_dax__adag: SET(S_dax__adag_3); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of job element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `job' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `job' element.");
-}
-
-<S_dax__job,E_dax__job,S_dax__job_2>{
- "</job"{s}">" {
-  LEAVE;
-  ETag_dax__job();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__adag_2: case S_dax__adag_3: case S_dax__adag: SET(S_dax__adag_3); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</job>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</job>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</job>' expected.");
-}
-
- /* <!-- ignored -->
-  * <!-- ignored -->  */
-
-<S_dax__child_1,S_dax__adag_3,S_dax__child_2,S_dax__adag_5,E_dax__job,E_dax__adag,S_dax__child,S_dax__adag_4,ROOT_dax__uses,S_dax__adag,S_dax__adag_2,E_dax__child,S_dax__adag_1>"<uses"{s} FAIL("Starting tag <uses> is not allowed here.");
-
-<S_dax__job,S_dax__job_2,S_dax__job_1>"<uses"{s} {
-  AX_dax__uses_file = 0;
-  AX_dax__uses_link = AU_dax__uses_link;
-  AX_dax__uses_register = A_dax__uses_register_true;
-  AX_dax__uses_transfer = A_dax__uses_transfer_true;
-  AX_dax__uses_optional = A_dax__uses_optional_false;
-  AX_dax__uses_type = 161;
-  AX_dax__uses_size = 0;
-  ENTER(AL_dax__uses); pushbuffer(0);
-  }
-
-<AL_dax__uses>{
- "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__uses_file);
- "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__uses_file);
-
- "link"{Eq}"'input'" |
- "link"{Eq}"\"input\"" A_dax__uses_link = A_dax__uses_link_input;
- "link"{Eq}"'output'" |
- "link"{Eq}"\"output\"" A_dax__uses_link = A_dax__uses_link_output;
-
- "register"{Eq}"'false'" |
- "register"{Eq}"\"false\"" A_dax__uses_register = A_dax__uses_register_false;
- "register"{Eq}"'true'" |
- "register"{Eq}"\"true\"" A_dax__uses_register = A_dax__uses_register_true;
-
- "transfer"{Eq}"'false'" |
- "transfer"{Eq}"\"false\"" A_dax__uses_transfer = A_dax__uses_transfer_false;
- "transfer"{Eq}"'true'" |
- "transfer"{Eq}"\"true\"" A_dax__uses_transfer = A_dax__uses_transfer_true;
-
- "optional"{Eq}"'false'" |
- "optional"{Eq}"\"false\"" A_dax__uses_optional = A_dax__uses_optional_false;
- "optional"{Eq}"'true'" |
- "optional"{Eq}"\"true\"" A_dax__uses_optional = A_dax__uses_optional_true;
-
- "type"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__uses_type);
- "type"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__uses_type);
-
- "size"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__uses_size);
- "size"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__uses_size);
-
- ">" {
-  if (!AX_dax__uses_file) FAIL("Required attribute `file' not set for `uses' element.");
-  if (!AX_dax__uses_size) FAIL("Required attribute `size' not set for `uses' element.");
-  LEAVE; STag_dax__uses();dax__pcdata_ix = 0; ENTER(E_dax__uses);
- }
- "/>" {
-  if (!AX_dax__uses_file) FAIL("Required attribute `file' not set for `uses' element.");
-  if (!AX_dax__uses_size) FAIL("Required attribute `size' not set for `uses' element.");
-  LEAVE; STag_dax__uses(); dax__pcdata_ix = 0; ETag_dax__uses(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__job: case S_dax__job_2: case S_dax__job_1: SET(S_dax__job_2); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of uses element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `uses' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `uses' element.");
-}
-
-<E_dax__uses>{
- "</uses"{s}">" {
-  LEAVE;
-  ETag_dax__uses();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__job: case S_dax__job_2: case S_dax__job_1: SET(S_dax__job_2); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</uses>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</uses>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</uses>' expected.");
-}
-
-<S_dax__child_1,S_dax__job,S_dax__child_2,S_dax__job_1,E_dax__job,E_dax__adag,S_dax__child,S_dax__job_2,S_dax__adag_2,E_dax__child,ROOT_dax__child>"<child"{s} FAIL("Starting tag <child> is not allowed here.");
-
-<S_dax__adag_1,S_dax__adag_4,S_dax__adag_5,S_dax__adag_3,S_dax__adag>"<child"{s} {
-  AX_dax__child_ref = 0;
-  ENTER(AL_dax__child); pushbuffer(0);
-  }
-
-<AL_dax__child>{
- "ref"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__child_ref);
- "ref"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__child_ref);
-
- ">" {
-  if (!AX_dax__child_ref) FAIL("Required attribute `ref' not set for `child' element.");
-  LEAVE; STag_dax__child();dax__pcdata_ix = 0; ENTER(S_dax__child);
- }
- "/>" {
-  if (!AX_dax__child_ref) FAIL("Required attribute `ref' not set for `child' element.");
-  LEAVE; STag_dax__child(); dax__pcdata_ix = 0; ETag_dax__child(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__adag_1: case S_dax__adag_4: case S_dax__adag_5: case S_dax__adag_3: case S_dax__adag: SET(S_dax__adag_5); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of child element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `child' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `child' element.");
-}
-
-<S_dax__child_2,E_dax__child,S_dax__child>{
- "</child"{s}">" {
-  LEAVE;
-  ETag_dax__child();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__adag_1: case S_dax__adag_4: case S_dax__adag_5: case S_dax__adag_3: case S_dax__adag: SET(S_dax__adag_5); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</child>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</child>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</child>' expected.");
-}
-
-<S_dax__job,S_dax__adag_3,S_dax__adag_5,S_dax__job_1,E_dax__job,E_dax__adag,S_dax__adag_4,ROOT_dax__parent,S_dax__job_2,S_dax__adag,S_dax__adag_2,E_dax__child,S_dax__adag_1>"<parent"{s} FAIL("Starting tag <parent> is not allowed here.");
-
-<S_dax__child_2,S_dax__child,S_dax__child_1>"<parent"{s} {
-  AX_dax__parent_ref = 0;
-  ENTER(AL_dax__parent); pushbuffer(0);
-  }
-
-<AL_dax__parent>{
- "ref"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_dax__parent_ref);
- "ref"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_dax__parent_ref);
-
- ">" {
-  if (!AX_dax__parent_ref) FAIL("Required attribute `ref' not set for `parent' element.");
-  LEAVE; STag_dax__parent();dax__pcdata_ix = 0; ENTER(E_dax__parent);
- }
- "/>" {
-  if (!AX_dax__parent_ref) FAIL("Required attribute `ref' not set for `parent' element.");
-  LEAVE; STag_dax__parent(); dax__pcdata_ix = 0; ETag_dax__parent(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__child_2: case S_dax__child: case S_dax__child_1: SET(S_dax__child_2); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of parent element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `parent' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `parent' element.");
-}
-
-<E_dax__parent>{
- "</parent"{s}">" {
-  LEAVE;
-  ETag_dax__parent();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_dax__child_2: case S_dax__child: case S_dax__child_1: SET(S_dax__child_2); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</parent>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</parent>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</parent>' expected.");
-}
-
- /* EPILOG: after the root element. */
-
-<EPILOG>{
- . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
- <<EOF>>       SUCCEED;
-}
-
- /* CHARACTER DATA. */
-
-<IMPOSSIBLE,VALUE1,VALUE2>{
- /* Non-defined standard entities... */
-"&amp;"  BUFFERPUTC('&');
-"&lt;"   BUFFERPUTC('<');
-"&gt;"   BUFFERPUTC('>');
-"&apos;" BUFFERPUTC('\'');
-"&quot;" BUFFERPUTC('"');
-
- /* Character entities. */
- "&#"[[:digit:]]+";"   BUFFERPUTC((unsigned char)atoi(yytext+2));
- "&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
-}
-
-<IMPOSSIBLE,VALUE1,VALUE2,CDATA>{
- "\n"          |
- "\r"          |
- "\r\n"                |
- "\n\r"                BUFFERPUTC('\n');
-}
-
-<IMPOSSIBLE>{
- "<![CDATA["   ENTER(CDATA);
- "]""]>"               FAIL("Unexpected `]""]>' in character data.");
-}
-
-<VALUE1>{
- \'            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (\"'\" expected).");
-}
-
-<VALUE2>{
- \"            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (`\"' expected).");
-}
-
-<IMPOSSIBLE,VALUE1,VALUE2>{
- [^<&]         BUFFERPUTC(yytext[0]);
- [<&]          FAIL("Spurious `%c' in character data.",yytext[0]);
-}
-
-<CDATA>{
- "]""]>"               LEAVE;
- /* "]""]"             BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
- .             BUFFERPUTC(yytext[0]);
- <<EOF>>       FAIL("EOF in CDATA section.");
-}
-
- /* Impossible rules to avoid warnings from flex(1). */
- /* Ideally, this should be replaced by code in flexml.pl that
-    generates just the states not covered by other rules. */
-<*>{
- .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
-}
-
-%%
-
-/* Element context stack lookup. */
-int dax__element_context(int i)
-{
-  return (0<i && i<yy_start_stack_depth
-         ? yy_start_stack[yy_start_stack_ptr - i]
-         : 0);
-}
-
-#ifdef FLEX_DEBUG
-void print_yy_stack(char* fmt, ...)
-{
-  int i = 0; va_list ap; va_start(ap, fmt);
-  vfprintf(stderr, fmt, ap);
-  if (dax__statenames) {
-      for (i=1; i<yy_start_stack_ptr; i++) {
-          fprintf(stderr, "%s/", dax__statenames[yy_start_stack[i] ]);
-      }
-      fprintf(stderr,"%s\n", dax__statenames[YY_START]);
-  }
-  va_end(ap);
-}
-
-void print_dax__bufferstack()
-{
-    int i;
-    fputs("Buffer: ", stderr);
-    for (i = 0; i < blimit; i++) {
-       if ( dax__bufferstack[i] == '\377' ) break;
-         putc(dax__bufferstack[i], stderr);
-    }
-    putc('\n', stderr);
-}
-
-static void debug_enter(int state, const char* statename) {
-  yy_push_state(state);
-  if (yy_flex_debug) {
-       print_yy_stack("--ENTER(%s) : ",statename);
-       print_dax__bufferstack();
-  }
-}
-
-static void debug_leave(void) {
-    if (yy_flex_debug) {
-        print_yy_stack("--LEAVE : ");
-       print_dax__bufferstack();
-    }
-  yy_pop_state();
-}
-
-static void debug_set(int state, const char* statename) {
-  BEGIN(state);
-  if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
-}
-#endif
-
-
-static void cleanup(void)
-{
-    if (dax__statenames) {
-        free(dax__statenames);
-       dax__statenames = NULL;
-    }
-    free(dax__bufferstack);
-    dax__bufferstack = NULL;
-
-    free(indexstack);
-    indexstack = NULL;
-}
-
-
-static int fail(const char* fmt, ...)
-{
-    int chars_left, used;
-    va_list ap; va_start(ap, fmt);
-#ifdef FLEXML_yylineno
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (XML input line %d, state %d): ",
-                  yylineno, YY_START);
-#else
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (state %d): ",
-                  YY_START);
-#endif
-    chars_left = flexml_max_err_msg_size - used - 1;
-    vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
-    va_end(ap);
-
-#ifndef FLEXML_quiet_parser
-    /* print directly to sdterr */
-    fprintf(stderr, "%s\n", flexml_err_msg);
-    flexml_err_msg[0] = '\0';
-#endif
-
-    cleanup();
-
-    return 1;
-}
index fc7026a..61ba759 100644 (file)
 #include "simdag/simdag.h"
 #include "simdag/datatypes.h"
 #include "surf/surf.h"
+#include "xbt/swag.h"
+#include "xbt/mallocator.h"
 #include <stdbool.h>
 
-#define SD_INITIALISED() (sd_global != NULL)
-#define SD_CHECK_INIT_DONE() xbt_assert(SD_INITIALISED(), "Call SD_init() first");
-
 /* Global variables */
 
 typedef struct SD_global {
@@ -28,6 +27,8 @@ typedef struct SD_global {
   SD_link_t *recyclable_route;  /* array returned by SD_route_get_list
                                    and mallocated only once */
 
+  xbt_mallocator_t task_mallocator; /* to not remalloc new tasks */
+
   int watch_point_reached;      /* has a task just reached a watch point? */
 
   /* task state sets */
@@ -40,6 +41,7 @@ typedef struct SD_global {
   xbt_swag_t done_task_set;
   xbt_swag_t failed_task_set;
 
+  xbt_swag_t return_set;
   int task_number;
 
 } s_SD_global_t, *SD_global_t;
@@ -66,6 +68,7 @@ typedef struct SD_workstation {
 /* Task */
 typedef struct SD_task {
   s_xbt_swag_hookup_t state_hookup;
+  s_xbt_swag_hookup_t return_hookup;
   xbt_swag_t state_set;
   e_SD_task_state_t state;
   void *data;                   /* user data */
@@ -110,9 +113,11 @@ typedef struct SD_dependency {
 } s_SD_dependency_t, *SD_dependency_t;
 
 /* SimDag private functions */
+XBT_PUBLIC(xbt_swag_t) SD_simulate_swag(double how_long); /* could be public, but you need to see the internals of the SD_task_t to use it */
+
 
 SD_link_t __SD_link_create(void *surf_link, void *data);
-void __SD_link_destroy(void *link);
+#define __SD_link_destroy xbt_free_f
 
 SD_workstation_t __SD_workstation_create(void *surf_workstation,
                                          void *data);
@@ -125,6 +130,11 @@ int __SD_task_try_to_run(SD_task_t task);
 void __SD_task_just_done(SD_task_t task);
 bool acyclic_graph_detail(xbt_dynar_t dag);
 
+/* Task mallocator functions */
+void* SD_task_new_f(void);
+void SD_task_recycle_f(void *t);
+void SD_task_free_f(void *t);
+
 /* Functions to test if the task is in a given state. */
 
 /* Returns whether the given task is scheduled or runnable. */
index 5117925..684f656 100644 (file)
@@ -117,14 +117,14 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
   xbt_dynar_foreach(dag,count,task){
     if(task->kind == SD_TASK_COMM_E2E) continue;
     task->marked = 0;
-    if(xbt_dynar_length(task->tasks_after) == 0){
+    if(xbt_dynar_is_empty(task->tasks_after)){
       xbt_dynar_push(current, &task);
     }
   }
   task = NULL;
   count = 0;
   //test if something has to be done for the next iteration
-  while(xbt_dynar_length(current) != 0){
+  while(!xbt_dynar_is_empty(current)){
     next = xbt_dynar_new(sizeof(SD_task_t),NULL);
     //test if the current iteration is done
     count_current=0;
@@ -177,7 +177,7 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
     current = xbt_dynar_new(sizeof(SD_task_t),NULL);
     xbt_dynar_foreach(dag,count,task){
       if(task->kind == SD_TASK_COMM_E2E) continue;
-      if(xbt_dynar_length(task->tasks_before) == 0){
+      if(xbt_dynar_is_empty(task->tasks_before)){
         xbt_dynar_push(current, &task);
       }
     }
@@ -186,7 +186,7 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
     task = NULL;
     xbt_dynar_foreach(dag,count,task){
       if(task->kind == SD_TASK_COMM_E2E) continue;
-      if(xbt_dynar_length(task->tasks_before) == 0){
+      if(xbt_dynar_is_empty(task->tasks_before)){
         task->marked = 1;
         xbt_dynar_push(current, &task);
       }
@@ -194,7 +194,7 @@ bool acyclic_graph_detail(xbt_dynar_t dag){
     task = NULL;
     count = 0;
     //test if something has to be done for the next iteration
-    while(xbt_dynar_length(current) != 0){
+    while(!xbt_dynar_is_empty(current)){
       next = xbt_dynar_new(sizeof(SD_task_t),NULL);
       //test if the current iteration is done
       count_current=0;
@@ -286,8 +286,8 @@ xbt_dynar_t SD_daxload(const char *filename)
   dax_lineno = 1;
 
   result = xbt_dynar_new(sizeof(SD_task_t), dax_task_free);
-  files = xbt_dict_new();
-  jobs = xbt_dict_new();
+  files = xbt_dict_new_homogeneous(&dax_task_free);
+  jobs = xbt_dict_new_homogeneous(NULL);
   root_task = SD_task_create_comp_seq("root", NULL, 0);
   /* by design the root task is always SCHEDULABLE */
   __SD_task_set_state(root_task, SD_SCHEDULABLE);
@@ -295,12 +295,13 @@ xbt_dynar_t SD_daxload(const char *filename)
   xbt_dynar_push(result, &root_task);
   end_task = SD_task_create_comp_seq("end", NULL, 0);
 
-  int res;
+  _XBT_GNUC_UNUSED int res;
   res = dax_lex();
   xbt_assert(!res, "Parse error in %s: %s", filename,
               dax__parse_err_msg());
   dax__delete_buffer(input_buffer);
   fclose(in_file);
+  dax_lex_destroy();
   xbt_dict_free(&jobs);
 
   /* And now, post-process the files.
@@ -313,7 +314,7 @@ xbt_dynar_t SD_daxload(const char *filename)
     unsigned int cpt1, cpt2;
     SD_task_t newfile = NULL;
     SD_dependency_t depbefore, depafter;
-    if (xbt_dynar_length(file->tasks_before) == 0) {
+    if (xbt_dynar_is_empty(file->tasks_before)) {
       xbt_dynar_foreach(file->tasks_after, cpt2, depafter) {
         SD_task_t newfile =
             SD_task_create_comm_e2e(file->name, NULL, file->amount);
@@ -330,7 +331,7 @@ xbt_dynar_t SD_daxload(const char *filename)
 #endif
         xbt_dynar_push(result, &newfile);
       }
-    } else if (xbt_dynar_length(file->tasks_after) == 0) {
+    } else if (xbt_dynar_is_empty(file->tasks_after)) {
       xbt_dynar_foreach(file->tasks_before, cpt2, depbefore) {
         SD_task_t newfile =
             SD_task_create_comm_e2e(file->name, NULL, file->amount);
@@ -392,7 +393,7 @@ xbt_dynar_t SD_daxload(const char *filename)
 
 void STag_dax__adag(void)
 {
-  double version;
+  _XBT_GNUC_UNUSED double version;
   version = dax_parse_double(A_dax__adag_version);
 
   xbt_assert(version == 2.1,
@@ -429,7 +430,7 @@ void STag_dax__uses(void)
   file = xbt_dict_get_or_null(files, A_dax__uses_file);
   if (file == NULL) {
     file = SD_task_create_comm_e2e(A_dax__uses_file, NULL, size);
-    xbt_dict_set(files, A_dax__uses_file, file, &dax_task_free);
+    xbt_dict_set(files, A_dax__uses_file, file, NULL);
   } else {
     if (SD_task_get_amount(file) != size) {
       XBT_WARN("Ignoring file %s size redefinition from %.0f to %.0f",
index 71be0c0..8ee8eac 100644 (file)
@@ -27,17 +27,23 @@ xbt_dynar_t SD_dotload_generic(const char * filename);
 
 static double dot_parse_double(const char *string)
 {
-  if (string == NULL)
-    return -1;
-  int ret = 0;
-  double value = -1;
-
-  ret = sscanf(string, "%lg", &value);
-  if (ret != 1)
-    XBT_WARN("%s is not a double", string);
-  return value;
+    if (string == NULL)
+          return -1;
+      double value = -1;
+        char *err;
+
+          //ret = sscanf(string, "%lg", &value);
+          errno = 0;
+            value = strtod(string,&err);
+              if(errno)
+                  {
+                        XBT_WARN("Failed to convert string to double: %s\n",strerror(errno));
+                            return -1;
+                              }
+                return value;
 }
 
+
 static int dot_parse_int(const char *string)
 {
   if (string == NULL)
@@ -153,9 +159,9 @@ xbt_dynar_t SD_dotload_generic(const char * filename)
   dag_dot = agread(in_file, NIL(Agdisc_t *));
 
   result = xbt_dynar_new(sizeof(SD_task_t), dot_task_free);
-  files = xbt_dict_new();
-  jobs = xbt_dict_new();
-  computers = xbt_dict_new();
+  files = xbt_dict_new_homogeneous(&dot_task_free);
+  jobs = xbt_dict_new_homogeneous(NULL);
+  computers = xbt_dict_new_homogeneous(NULL);
   root_task = SD_task_create_comp_seq("root", NULL, 0);
   /* by design the root task is always SCHEDULABLE */
   __SD_task_set_state(root_task, SD_SCHEDULABLE);
@@ -191,7 +197,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename)
     unsigned int cpt1, cpt2;
     SD_task_t newfile = NULL;
     SD_dependency_t depbefore, depafter;
-    if (xbt_dynar_length(file->tasks_before) == 0) {
+    if (xbt_dynar_is_empty(file->tasks_before)) {
       xbt_dynar_foreach(file->tasks_after, cpt2, depafter) {
         SD_task_t newfile =
             SD_task_create_comm_e2e(file->name, NULL, file->amount);
@@ -199,7 +205,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename)
         SD_task_dependency_add(NULL, NULL, newfile, depafter->dst);
         xbt_dynar_push(result, &newfile);
       }
-    } else if (xbt_dynar_length(file->tasks_after) == 0) {
+    } else if (xbt_dynar_is_empty(file->tasks_after)) {
       xbt_dynar_foreach(file->tasks_before, cpt2, depbefore) {
         SD_task_t newfile =
             SD_task_create_comm_e2e(file->name, NULL, file->amount);
@@ -312,7 +318,7 @@ void dot_add_task(Agnode_t * dag_node)
         computer = xbt_dynar_new(sizeof(SD_task_t), NULL);
         xbt_dict_set(computers, char_performer, computer, NULL);
       }
-      if(performer < host_lib->count){
+      if(performer < xbt_lib_length(host_lib)){
         // the  wanted computer is available
         SD_task_t *task_test = NULL;
         if(order < computer->used)
@@ -348,9 +354,10 @@ void dot_add_task(Agnode_t * dag_node)
 void dot_add_input_dependencies(SD_task_t current_job, Agedge_t * edge)
 {
   SD_task_t file;
-
-  char name[80];
-  sprintf(name, "%s->%s", agnameof(agtail(edge)), agnameof(aghead(edge)));
+  char *name_tail=agnameof(agtail(edge));
+  char *name_head=agnameof(aghead(edge));
+  char *name = malloc((strlen(name_head)+strlen(name_tail)+3)*sizeof(char));
+  sprintf(name, "%s->%s", name_tail, name_head);
   double size = dot_parse_double(agget(edge, (char *) "size"));
   XBT_DEBUG("size : %e, get size : %s", size, agget(edge, (char *) "size"));
 
@@ -361,7 +368,7 @@ void dot_add_input_dependencies(SD_task_t current_job, Agedge_t * edge)
 #ifdef HAVE_TRACING
       TRACE_sd_dotloader (file, agget (edge, (char*)"category"));
 #endif
-      xbt_dict_set(files, name, file, &dot_task_free);
+      xbt_dict_set(files, name, file, NULL);
     } else {
       if (SD_task_get_amount(file) != size) {
         XBT_WARN("Ignoring file %s size redefinition from %.0f to %.0f",
@@ -375,6 +382,7 @@ void dot_add_input_dependencies(SD_task_t current_job, Agedge_t * edge)
       SD_task_dependency_add(NULL, NULL, file, current_job);
     }
   }
+  free(name);
 }
 
 /* dot_add_output_dependencies create the dependencies between a
@@ -384,8 +392,10 @@ void dot_add_input_dependencies(SD_task_t current_job, Agedge_t * edge)
 void dot_add_output_dependencies(SD_task_t current_job, Agedge_t * edge)
 {
   SD_task_t file;
-  char name[80];
-  sprintf(name, "%s->%s", agnameof(agtail(edge)), agnameof(aghead(edge)));
+  char *name_tail=agnameof(agtail(edge));
+  char *name_head=agnameof(aghead(edge));
+  char *name = malloc((strlen(name_head)+strlen(name_tail)+3)*sizeof(char));
+  sprintf(name, "%s->%s", name_tail, name_head);
   double size = dot_parse_double(agget(edge, (char *) "size"));
   XBT_DEBUG("size : %e, get size : %s", size, agget(edge, (char *) "size"));
 
@@ -396,7 +406,7 @@ void dot_add_output_dependencies(SD_task_t current_job, Agedge_t * edge)
 #ifdef HAVE_TRACING
       TRACE_sd_dotloader (file, agget (edge, (char*)"category"));
 #endif
-      xbt_dict_set(files, name, file, &dot_task_free);
+      xbt_dict_set(files, name, file, NULL);
     } else {
       if (SD_task_get_amount(file) != size) {
         XBT_WARN("Ignoring file %s size redefinition from %.0f to %.0f",
@@ -413,4 +423,5 @@ void dot_add_output_dependencies(SD_task_t current_job, Agedge_t * edge)
       SD_task_dependency_add(NULL, NULL, current_job, file);
     }
   }
+  free(name);
 }
index 762d002..3f1ceb9 100644 (file)
@@ -52,7 +52,7 @@ void SD_init(int *argc, char **argv)
 
   s_SD_task_t task;
 
-  xbt_assert(!SD_INITIALISED(), "SD_init() already called");
+  xbt_assert(sd_global == NULL, "SD_init() already called");
 
   /* Connect our log channels: that must be done manually under windows */
   XBT_LOG_CONNECT(sd_kernel, sd);
@@ -66,6 +66,8 @@ void SD_init(int *argc, char **argv)
   sd_global->recyclable_route = NULL;
   sd_global->watch_point_reached = 0;
 
+  sd_global->task_mallocator=xbt_mallocator_new(65536, SD_task_new_f,SD_task_free_f,SD_task_recycle_f);
+
   sd_global->not_scheduled_task_set =
       xbt_swag_new(xbt_swag_offset(task, state_hookup));
   sd_global->schedulable_task_set =
@@ -82,6 +84,8 @@ void SD_init(int *argc, char **argv)
       xbt_swag_new(xbt_swag_offset(task, state_hookup));
   sd_global->failed_task_set =
       xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->return_set =
+      xbt_swag_new(xbt_swag_offset(task, return_hookup));
   sd_global->task_number = 0;
 
   surf_init(argc, argv);
@@ -119,45 +123,38 @@ void SD_application_reinit(void)
 
   s_SD_task_t task;
 
-  if (SD_INITIALISED()) {
-    XBT_DEBUG("Recreating the swags...");
-    xbt_swag_free(sd_global->not_scheduled_task_set);
-    xbt_swag_free(sd_global->schedulable_task_set);
-    xbt_swag_free(sd_global->scheduled_task_set);
-    xbt_swag_free(sd_global->runnable_task_set);
-    xbt_swag_free(sd_global->in_fifo_task_set);
-    xbt_swag_free(sd_global->running_task_set);
-    xbt_swag_free(sd_global->done_task_set);
-    xbt_swag_free(sd_global->failed_task_set);
-
-    sd_global->not_scheduled_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->schedulable_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->scheduled_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->runnable_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->in_fifo_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->running_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->done_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->failed_task_set =
-        xbt_swag_new(xbt_swag_offset(task, state_hookup));
-    sd_global->task_number = 0;
+  XBT_DEBUG("Recreating the swags...");
+  xbt_swag_free(sd_global->not_scheduled_task_set);
+  xbt_swag_free(sd_global->schedulable_task_set);
+  xbt_swag_free(sd_global->scheduled_task_set);
+  xbt_swag_free(sd_global->runnable_task_set);
+  xbt_swag_free(sd_global->in_fifo_task_set);
+  xbt_swag_free(sd_global->running_task_set);
+  xbt_swag_free(sd_global->done_task_set);
+  xbt_swag_free(sd_global->failed_task_set);
+
+  sd_global->not_scheduled_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->schedulable_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->scheduled_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->runnable_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->in_fifo_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->running_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->done_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->failed_task_set =
+      xbt_swag_new(xbt_swag_offset(task, state_hookup));
+  sd_global->task_number = 0;
 
 #ifdef HAVE_JEDULE
-    jedule_sd_cleanup();
-    jedule_sd_init();
+  jedule_sd_cleanup();
+  jedule_sd_init();
 #endif
-
-  } else {
-    XBT_WARN("SD_application_reinit called before initialization of SimDag");
-    /* we cannot use exceptions here because xbt is not running! */
-  }
-
 }
 
 /**
@@ -185,15 +182,7 @@ void SD_create_environment(const char *platform_file)
   void **surf_workstation = NULL;
   void **surf_link = NULL;
 
-  platform_filename = xbt_strdup(platform_file);
-
-  // Reset callbacks
-  surf_parse_reset_callbacks();
-  // Add config callbacks
-  surf_parse_add_callback_config();
-  SD_CHECK_INIT_DONE();
   parse_platform_file(platform_file);
-  surf_config_models_create_elms();
 
   /* now let's create the SD wrappers for workstations and links */
   xbt_lib_foreach(host_lib, cursor, name, surf_workstation){
@@ -228,34 +217,44 @@ void SD_create_environment(const char *platform_file)
  * \return a NULL-terminated array of \ref SD_task_t whose state has changed.
  * \see SD_task_schedule(), SD_task_watch()
  */
-xbt_dynar_t SD_simulate(double how_long)
-{
+
+xbt_dynar_t SD_simulate(double how_long) {
+  xbt_dynar_t changed_tasks = xbt_dynar_new(sizeof(SD_task_t), NULL);
+  SD_task_t task;
+
+  SD_simulate_swag(how_long);
+  while( (task = xbt_swag_extract(sd_global->return_set)) != NULL) {
+    xbt_dynar_push(changed_tasks, &task);
+  }
+
+  return changed_tasks;
+}
+
+xbt_swag_t SD_simulate_swag(double how_long) {
   double total_time = 0.0;      /* we stop the simulation when total_time >= how_long */
   double elapsed_time = 0.0;
   SD_task_t task, task_safe, dst;
   SD_dependency_t dependency;
   surf_action_t action;
-  xbt_dynar_t changed_tasks = xbt_dynar_new(sizeof(SD_task_t), NULL);
   unsigned int iter, depcnt;
   static int first_time = 1;
 
-  SD_CHECK_INIT_DONE();
-
    if (first_time) {
-    XBT_VERB("Starting simulation...");
+     XBT_VERB("Starting simulation...");
 
-    surf_presolve();            /* Takes traces into account */
-    first_time = 0;
-  }
+     surf_presolve();            /* Takes traces into account */
+     first_time = 0;
+   }
 
   sd_global->watch_point_reached = 0;
 
+  xbt_swag_reset(sd_global->return_set);
+
   /* explore the runnable tasks */
   xbt_swag_foreach_safe(task, task_safe, sd_global->runnable_task_set) {
     XBT_VERB("Executing task '%s'", SD_task_get_name(task));
-    if (__SD_task_try_to_run(task)
-        && !xbt_dynar_member(changed_tasks, &task))
-      xbt_dynar_push(changed_tasks, &task);
+    if (__SD_task_try_to_run(task))
+      xbt_swag_insert(task,sd_global->return_set);
   }
 
   /* main loop */
@@ -289,8 +288,7 @@ xbt_dynar_t SD_simulate(double how_long)
                SD_task_get_name(task));
 
         /* the state has changed */
-        if (!xbt_dynar_member(changed_tasks, &task))
-          xbt_dynar_push(changed_tasks, &task);
+        xbt_swag_insert(task,sd_global->return_set);
 
         /* remove the dependencies after this task */
         xbt_dynar_foreach(task->tasks_after, depcnt, dependency) {
@@ -326,9 +324,8 @@ xbt_dynar_t SD_simulate(double how_long)
           if (__SD_task_is_runnable(dst)
               && !sd_global->watch_point_reached) {
             XBT_VERB("Executing task '%s'", SD_task_get_name(dst));
-            if (__SD_task_try_to_run(dst) &&
-                !xbt_dynar_member(changed_tasks, &task))
-              xbt_dynar_push(changed_tasks, &task);
+            if (__SD_task_try_to_run(dst))
+              xbt_swag_insert(dst,sd_global->return_set);
           }
         }
       }
@@ -345,15 +342,15 @@ xbt_dynar_t SD_simulate(double how_long)
         surf_workstation_model->action_unref(action);
         task->surf_action = NULL;
 
-        if (!xbt_dynar_member(changed_tasks, &task))
-          xbt_dynar_push(changed_tasks, &task);
+        xbt_swag_insert(task,sd_global->return_set);
       }
     }
   }
 
   if (!sd_global->watch_point_reached && how_long<0){
     if (xbt_swag_size(sd_global->done_task_set) < sd_global->task_number){
-        XBT_WARN("Simulation is finished but some tasks are still not done");
+        XBT_WARN("Simulation is finished but %d tasks are still not done",
+            (sd_global->task_number - xbt_swag_size(sd_global->done_task_set)));
        xbt_swag_foreach_safe (task, task_safe,sd_global->not_scheduled_task_set){
                 XBT_WARN("%s is in SD_NOT_SCHEDULED state", SD_task_get_name(task));
                }
@@ -370,7 +367,7 @@ xbt_dynar_t SD_simulate(double how_long)
          elapsed_time, total_time, sd_global->watch_point_reached);
   XBT_DEBUG("current time = %f", surf_get_clock());
 
-  return changed_tasks;
+  return sd_global->return_set;
 }
 
 /**
@@ -378,10 +375,7 @@ xbt_dynar_t SD_simulate(double how_long)
  *
  * \return the current clock, in second
  */
-double SD_get_clock(void)
-{
-  SD_CHECK_INIT_DONE();
-
+double SD_get_clock(void) {
   return surf_get_clock();
 }
 
@@ -399,34 +393,29 @@ void SD_exit(void)
   TRACE_surf_release();
 #endif
 
-  if (SD_INITIALISED()) {
-    XBT_DEBUG("Destroying workstation and link dictionaries...");
-
-    XBT_DEBUG("Destroying workstation and link arrays if necessary...");
-    if (sd_global->workstation_list != NULL)
-      xbt_free(sd_global->workstation_list);
-
-    if (sd_global->link_list != NULL)
-      xbt_free(sd_global->link_list);
+  xbt_mallocator_free(sd_global->task_mallocator);
 
-    if (sd_global->recyclable_route != NULL)
-      xbt_free(sd_global->recyclable_route);
+  XBT_DEBUG("Destroying workstation and link arrays...");
+  xbt_free(sd_global->workstation_list);
+  xbt_free(sd_global->link_list);
+  xbt_free(sd_global->recyclable_route);
 
-    XBT_DEBUG("Destroying the swags...");
-    xbt_swag_free(sd_global->not_scheduled_task_set);
-    xbt_swag_free(sd_global->schedulable_task_set);
-    xbt_swag_free(sd_global->scheduled_task_set);
-    xbt_swag_free(sd_global->runnable_task_set);
-    xbt_swag_free(sd_global->in_fifo_task_set);
-    xbt_swag_free(sd_global->running_task_set);
-    xbt_swag_free(sd_global->done_task_set);
-    xbt_swag_free(sd_global->failed_task_set);
+  XBT_DEBUG("Destroying the swags...");
+  xbt_swag_free(sd_global->not_scheduled_task_set);
+  xbt_swag_free(sd_global->schedulable_task_set);
+  xbt_swag_free(sd_global->scheduled_task_set);
+  xbt_swag_free(sd_global->runnable_task_set);
+  xbt_swag_free(sd_global->in_fifo_task_set);
+  xbt_swag_free(sd_global->running_task_set);
+  xbt_swag_free(sd_global->done_task_set);
+  xbt_swag_free(sd_global->failed_task_set);
+  xbt_swag_free(sd_global->return_set);
 
-    XBT_DEBUG("Exiting Surf...");
-    surf_exit();
+  XBT_DEBUG("Exiting Surf...");
+  surf_exit();
 
-    xbt_free(sd_global);
-    sd_global = NULL;
+  xbt_free(sd_global);
+  sd_global = NULL;
 
 #ifdef HAVE_TRACING
   TRACE_end();
@@ -435,11 +424,6 @@ void SD_exit(void)
   jedule_sd_dump();
   jedule_sd_cleanup();
 #endif
-
-  } else {
-    XBT_WARN("SD_exit() called, but SimDag is not running");
-    /* we cannot use exceptions here because xbt is not running! */
-  }
 }
 
 /**
index c69d93c..b9b83bb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,6 +9,8 @@
 #include "xbt/dict.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
+#include "surf/surf_resource.h"
+
 
 /* Creates a link and registers it in SD.
  */
@@ -18,9 +20,6 @@ SD_link_t __SD_link_create(void *surf_link, void *data)
   SD_link_t link;
   const char *name;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(surf_link != NULL, "surf_link is NULL !");
-
   link = xbt_new(s_SD_link_t, 1);
   link->surf_link = surf_link;
   link->data = data;            /* user data */
@@ -51,11 +50,8 @@ const SD_link_t *SD_link_get_list(void)
   void **data;
   int i;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(SD_link_get_number() > 0, "There is no link!");
-
   if (sd_global->link_list == NULL) {   /* this is the first time the function is called */
-    sd_global->link_list = xbt_new(SD_link_t, link_lib->count);
+    sd_global->link_list = xbt_new(SD_link_t, xbt_lib_length(link_lib));
 
     i = 0;
     xbt_lib_foreach(link_lib, cursor, key, data) {
@@ -73,8 +69,7 @@ const SD_link_t *SD_link_get_list(void)
  */
 int SD_link_get_number(void)
 {
-  SD_CHECK_INIT_DONE();
-  return link_lib->count;
+  return xbt_lib_length(link_lib);
 }
 
 /**
@@ -86,8 +81,6 @@ int SD_link_get_number(void)
  */
 void *SD_link_get_data(SD_link_t link)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   return link->data;
 }
 
@@ -103,8 +96,6 @@ void *SD_link_get_data(SD_link_t link)
  */
 void SD_link_set_data(SD_link_t link, void *data)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   link->data = data;
 }
 
@@ -116,8 +107,6 @@ void SD_link_set_data(SD_link_t link, void *data)
  */
 const char *SD_link_get_name(SD_link_t link)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   return surf_resource_name(link->surf_link);
 }
 
@@ -129,8 +118,6 @@ const char *SD_link_get_name(SD_link_t link)
  */
 double SD_link_get_current_bandwidth(SD_link_t link)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   return surf_workstation_model->extension.workstation.
       get_link_bandwidth(link->surf_link);
 }
@@ -143,8 +130,6 @@ double SD_link_get_current_bandwidth(SD_link_t link)
  */
 double SD_link_get_current_latency(SD_link_t link)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   return surf_workstation_model->extension.workstation.
       get_link_latency(link->surf_link);
 }
@@ -159,18 +144,5 @@ double SD_link_get_current_latency(SD_link_t link)
  */
 e_SD_link_sharing_policy_t SD_link_get_sharing_policy(SD_link_t link)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
   return link->sharing_policy;
 }
-
-
-/* Destroys a link.
- */
-void __SD_link_destroy(void *link)
-{
-  SD_CHECK_INIT_DONE();
-  xbt_assert(link != NULL, "Invalid parameter");
-  /* link->surf_link is freed by surf_exit and link->data is freed by the user */
-  xbt_free(link);
-}
index 9735f36..9109ff9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -16,44 +16,39 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd,
 static void __SD_task_remove_dependencies(SD_task_t task);
 static void __SD_task_destroy_scheduling_data(SD_task_t task);
 
-/**
- * \brief Creates a new task.
- *
- * \param name the name of the task (can be \c NULL)
- * \param data the user data you want to associate with the task (can be \c NULL)
- * \param amount amount of the task
- * \return the new task
- * \see SD_task_destroy()
- */
-SD_task_t SD_task_create(const char *name, void *data, double amount)
+void* SD_task_new_f(void)
 {
+  SD_task_t task = xbt_new0(s_SD_task_t, 1);
+  task->tasks_before = xbt_dynar_new(sizeof(SD_dependency_t), NULL);
+  task->tasks_after = xbt_dynar_new(sizeof(SD_dependency_t), NULL);
 
-  SD_task_t task;
-  SD_CHECK_INIT_DONE();
+  return task;
+}
 
-  task = xbt_new(s_SD_task_t, 1);
+void SD_task_recycle_f(void *t)
+{
+  SD_task_t task = (SD_task_t) t;
 
-  /* general information */
-  task->data = data;            /* user data */
-  task->name = xbt_strdup(name);
+  /* Reset the content */
   task->kind = SD_TASK_NOT_TYPED;
   task->state_hookup.prev = NULL;
   task->state_hookup.next = NULL;
   task->state_set = sd_global->not_scheduled_task_set;
+  xbt_swag_insert(task, task->state_set);
   task->state = SD_NOT_SCHEDULED;
+  task->return_hookup.prev = NULL;
+  task->return_hookup.next = NULL;
+
   task->marked = 0;
-  xbt_swag_insert(task, task->state_set);
 
-  task->amount = amount;
-  task->remains = amount;
   task->start_time = -1.0;
   task->finish_time = -1.0;
   task->surf_action = NULL;
   task->watch_points = 0;
 
   /* dependencies */
-  task->tasks_before = xbt_dynar_new(sizeof(SD_dependency_t), NULL);
-  task->tasks_after = xbt_dynar_new(sizeof(SD_dependency_t), NULL);
+  xbt_dynar_reset(task->tasks_before);
+  xbt_dynar_reset(task->tasks_after);
   task->unsatisfied_dependencies = 0;
   task->is_not_ready = 0;
 
@@ -63,6 +58,35 @@ SD_task_t SD_task_create(const char *name, void *data, double amount)
   task->computation_amount = NULL;
   task->communication_amount = NULL;
   task->rate = -1;
+}
+
+void SD_task_free_f(void *t)
+{
+  SD_task_t task = (SD_task_t)t;
+
+  xbt_dynar_free(&task->tasks_before);
+  xbt_dynar_free(&task->tasks_after);
+  xbt_free(task);
+}
+
+/**
+ * \brief Creates a new task.
+ *
+ * \param name the name of the task (can be \c NULL)
+ * \param data the user data you want to associate with the task (can be \c NULL)
+ * \param amount amount of the task
+ * \return the new task
+ * \see SD_task_destroy()
+ */
+SD_task_t SD_task_create(const char *name, void *data, double amount)
+{
+  SD_task_t task = xbt_mallocator_get(sd_global->task_mallocator);
+
+  /* general information */
+  task->data = data;            /* user data */
+  task->name = xbt_strdup(name);
+  task->amount = amount;
+  task->remains = amount;
 
   sd_global->task_number++;
 
@@ -73,6 +97,46 @@ SD_task_t SD_task_create(const char *name, void *data, double amount)
   return task;
 }
 
+/**
+ * \brief Destroys a task.
+ *
+ * The user data (if any) should have been destroyed first.
+ *
+ * \param task the task you want to destroy
+ * \see SD_task_create()
+ */
+void SD_task_destroy(SD_task_t task)
+{
+  XBT_DEBUG("Destroying task %s...", SD_task_get_name(task));
+
+  __SD_task_remove_dependencies(task);
+  /* if the task was scheduled or runnable we have to free the scheduling parameters */
+  if (__SD_task_is_scheduled_or_runnable(task))
+    __SD_task_destroy_scheduling_data(task);
+  if (task->state_set != NULL) /* would be null if just created */
+    xbt_swag_remove(task, task->state_set);
+
+  xbt_swag_remove(task, sd_global->return_set);
+
+  xbt_free(task->name);
+
+  if (task->surf_action != NULL)
+    surf_workstation_model->action_unref(task->surf_action);
+
+  xbt_free(task->workstation_list);
+  xbt_free(task->communication_amount);
+  xbt_free(task->computation_amount);
+
+  xbt_mallocator_release(sd_global->task_mallocator,task);
+  sd_global->task_number--;
+
+#ifdef HAVE_TRACING
+  TRACE_sd_task_destroy(task);
+#endif
+
+  XBT_DEBUG("Task destroyed.");
+}
+
 /**
  * \brief Returns the user data of a task
  *
@@ -82,8 +146,6 @@ SD_task_t SD_task_create(const char *name, void *data, double amount)
  */
 void *SD_task_get_data(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   return task->data;
 }
 
@@ -99,8 +161,6 @@ void *SD_task_get_data(SD_task_t task)
  */
 void SD_task_set_data(SD_task_t task, void *data)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   task->data = data;
 }
 
@@ -114,8 +174,6 @@ void SD_task_set_data(SD_task_t task, void *data)
  */
 e_SD_task_state_t SD_task_get_state(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   return task->state;
 }
 
@@ -178,8 +236,6 @@ void __SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
  */
 const char *SD_task_get_name(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   return task->name;
 }
 
@@ -201,8 +257,6 @@ xbt_dynar_t SD_task_get_parents(SD_task_t task)
   unsigned int i;
   xbt_dynar_t parents;
   SD_dependency_t dep;
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
 
   parents = xbt_dynar_new(sizeof(SD_task_t), NULL);
   xbt_dynar_foreach(task->tasks_before, i, dep) {
@@ -221,8 +275,6 @@ xbt_dynar_t SD_task_get_children(SD_task_t task)
   unsigned int i;
   xbt_dynar_t children;
   SD_dependency_t dep;
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
 
   children = xbt_dynar_new(sizeof(SD_task_t), NULL);
   xbt_dynar_foreach(task->tasks_after, i, dep) {
@@ -239,10 +291,6 @@ xbt_dynar_t SD_task_get_children(SD_task_t task)
  */
 int SD_task_get_workstation_count(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-  //xbt_assert(task->state_set != sd_global->scheduled_task_set,
-  //           "Unscheduled task %s", task->name);
   return task->workstation_nb;
 }
 
@@ -254,10 +302,6 @@ int SD_task_get_workstation_count(SD_task_t task)
  */
 SD_workstation_t *SD_task_get_workstation_list(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-  //xbt_assert(task->state_set != sd_global->scheduled_task_set,
-  //           "Unscheduled task %s", task->name);
   return task->workstation_list;
 }
 
@@ -270,8 +314,6 @@ SD_workstation_t *SD_task_get_workstation_list(SD_task_t task)
  */
 double SD_task_get_amount(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   return task->amount;
 }
 
@@ -284,9 +326,6 @@ double SD_task_get_amount(SD_task_t task)
  */
 double SD_task_get_remaining_amount(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-
   if (task->surf_action)
     return surf_workstation_model->get_remains(task->surf_action);
   else
@@ -334,13 +373,13 @@ void SD_task_dump(SD_task_t task)
   }
   XBT_INFO("  - amount: %.0f", SD_task_get_amount(task));
   XBT_INFO("  - Dependencies to satisfy: %d", task->unsatisfied_dependencies);
-  if (xbt_dynar_length(task->tasks_before)) {
+  if (!xbt_dynar_is_empty(task->tasks_before)) {
     XBT_INFO("  - pre-dependencies:");
     xbt_dynar_foreach(task->tasks_before, counter, dependency) {
       XBT_INFO("    %s", SD_task_get_name(dependency->src));
     }
   }
-  if (xbt_dynar_length(task->tasks_after)) {
+  if (!xbt_dynar_is_empty(task->tasks_after)) {
     XBT_INFO("  - post-dependencies:");
     xbt_dynar_foreach(task->tasks_after, counter, dependency) {
       XBT_INFO("    %s", SD_task_get_name(dependency->dst));
@@ -374,8 +413,7 @@ void SD_task_dotty(SD_task_t task, void *out)
  */
 static void __SD_task_dependency_destroy(void *dependency)
 {
-  if (((SD_dependency_t) dependency)->name != NULL)
-    xbt_free(((SD_dependency_t) dependency)->name);
+  xbt_free(((SD_dependency_t)dependency)->name);
   xbt_free(dependency);
 }
 
@@ -400,9 +438,6 @@ void SD_task_dependency_add(const char *name, void *data, SD_task_t src,
   int i;
   SD_dependency_t dependency;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
-
   dynar = src->tasks_after;
   length = xbt_dynar_length(dynar);
 
@@ -478,7 +513,6 @@ int SD_task_dependency_exists(SD_task_t src, SD_task_t dst)
   unsigned int counter;
   SD_dependency_t dependency;
 
-  SD_CHECK_INIT_DONE();
   xbt_assert(src != NULL
               || dst != NULL,
               "Invalid parameter: both src and dst are NULL");
@@ -514,9 +548,6 @@ void SD_task_dependency_remove(SD_task_t src, SD_task_t dst)
   int i;
   SD_dependency_t dependency;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
-
   /* remove the dependency from src->tasks_after */
   dynar = src->tasks_after;
   length = xbt_dynar_length(dynar);
@@ -588,10 +619,6 @@ void *SD_task_dependency_get_data(SD_task_t src, SD_task_t dst)
   int i;
   SD_dependency_t dependency;
 
-
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
-
   dynar = src->tasks_after;
   length = xbt_dynar_length(dynar);
 
@@ -642,9 +669,6 @@ static void __SD_print_watch_points(SD_task_t task)
  */
 void SD_task_watch(SD_task_t task, e_SD_task_state_t state)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-
   if (state & SD_NOT_SCHEDULED)
     THROWF(arg_error, 0,
            "Cannot add a watch point for state SD_NOT_SCHEDULED");
@@ -662,8 +686,6 @@ void SD_task_watch(SD_task_t task, e_SD_task_state_t state)
  */
 void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   xbt_assert(state != SD_NOT_SCHEDULED,
               "SimDag error: Cannot have a watch point for state SD_NOT_SCHEDULED");
 
@@ -693,9 +715,7 @@ double SD_task_get_execution_time(SD_task_t task,
 {
   double time, max_time = 0.0;
   int i, j;
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL && workstation_nb > 0
-              && workstation_list != NULL, "Invalid parameter");
+  xbt_assert(workstation_nb > 0, "Invalid parameter");
 
   /* the task execution time is the maximum execution time of the parallel tasks */
 
@@ -725,8 +745,6 @@ double SD_task_get_execution_time(SD_task_t task,
 
 static XBT_INLINE void SD_task_do_schedule(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-
   if (!__SD_task_is_not_scheduled(task) && !__SD_task_is_schedulable(task))
     THROWF(arg_error, 0, "Task '%s' has already been scheduled",
            SD_task_get_name(task));
@@ -808,9 +826,6 @@ void SD_task_schedule(SD_task_t task, int workstation_count,
  */
 void SD_task_unschedule(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-
   if (task->state_set != sd_global->scheduled_task_set &&
       task->state_set != sd_global->runnable_task_set &&
       task->state_set != sd_global->running_task_set &&
@@ -839,7 +854,6 @@ void SD_task_unschedule(SD_task_t task)
  */
 static void __SD_task_destroy_scheduling_data(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
   if (!__SD_task_is_scheduled_or_runnable(task)
       && !__SD_task_is_in_fifo(task))
     THROWF(arg_error, 0,
@@ -861,8 +875,6 @@ void __SD_task_really_run(SD_task_t task)
   int i;
   void **surf_workstations;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
               "Task '%s' is not runnable or in a fifo! Task state: %d",
               SD_task_get_name(task), SD_task_get_state(task));
@@ -984,8 +996,6 @@ int __SD_task_try_to_run(SD_task_t task)
   int i;
   SD_workstation_t workstation;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   xbt_assert(__SD_task_is_runnable(task),
               "Task '%s' is not runnable! Task state: %d",
               SD_task_get_name(task), SD_task_get_state(task));
@@ -1034,8 +1044,6 @@ void __SD_task_just_done(SD_task_t task)
   SD_task_t *candidates;
   int can_start = 1;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   xbt_assert(__SD_task_is_running(task),
               "The task must be running! Task state: %d",
               SD_task_get_state(task));
@@ -1180,12 +1188,12 @@ static void __SD_task_remove_dependencies(SD_task_t task)
   /* we must destroy the dependencies carefuly (with SD_dependency_remove)
      because each one is stored twice */
   SD_dependency_t dependency;
-  while (xbt_dynar_length(task->tasks_before) > 0) {
+  while (!xbt_dynar_is_empty(task->tasks_before)) {
     xbt_dynar_get_cpy(task->tasks_before, 0, &dependency);
     SD_task_dependency_remove(dependency->src, dependency->dst);
   }
 
-  while (xbt_dynar_length(task->tasks_after) > 0) {
+  while (!xbt_dynar_is_empty(task->tasks_after)) {
     xbt_dynar_get_cpy(task->tasks_after, 0, &dependency);
     SD_task_dependency_remove(dependency->src, dependency->dst);
   }
@@ -1201,8 +1209,6 @@ static void __SD_task_remove_dependencies(SD_task_t task)
  */
 double SD_task_get_start_time(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
   if (task->surf_action)
     return surf_workstation_model->
         action_get_start_time(task->surf_action);
@@ -1223,9 +1229,6 @@ double SD_task_get_start_time(SD_task_t task)
  */
 double SD_task_get_finish_time(SD_task_t task)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-
   if (task->surf_action)        /* should never happen as actions are destroyed right after their completion */
     return surf_workstation_model->
         action_get_finish_time(task->surf_action);
@@ -1233,56 +1236,6 @@ double SD_task_get_finish_time(SD_task_t task)
     return task->finish_time;
 }
 
-/**
- * \brief Destroys a task.
- *
- * The user data (if any) should have been destroyed first.
- *
- * \param task the task you want to destroy
- * \see SD_task_create()
- */
-void SD_task_destroy(SD_task_t task)
-{
-  SD_CHECK_INIT_DONE();
-  xbt_assert(task != NULL, "Invalid parameter");
-
-  XBT_DEBUG("Destroying task %s...", SD_task_get_name(task));
-
-  __SD_task_remove_dependencies(task);
-  /* if the task was scheduled or runnable we have to free the scheduling parameters */
-  if (__SD_task_is_scheduled_or_runnable(task))
-    __SD_task_destroy_scheduling_data(task);
-  xbt_swag_remove(task, task->state_set);
-
-  if (task->name != NULL)
-    xbt_free(task->name);
-
-  if (task->surf_action != NULL)
-    surf_workstation_model->action_unref(task->surf_action);
-
-  if (task->workstation_list != NULL)
-    xbt_free(task->workstation_list);
-
-  if (task->communication_amount)
-    xbt_free(task->communication_amount);
-
-  if (task->computation_amount)
-    xbt_free(task->computation_amount);
-
-#ifdef HAVE_TRACING
-  TRACE_sd_task_destroy(task);
-#endif
-
-  xbt_dynar_free(&task->tasks_before);
-  xbt_dynar_free(&task->tasks_after);
-  xbt_free(task);
-
-  sd_global->task_number--;
-
-  XBT_DEBUG("Task destroyed.");
-}
-
-
 static XBT_INLINE SD_task_t SD_task_create_sized(const char *name,
                                                  void *data, double amount,
                                                  int ws_count)
@@ -1364,7 +1317,7 @@ void SD_task_schedulev(SD_task_t task, int count,
   switch (task->kind) {
   case SD_TASK_COMM_E2E:
   case SD_TASK_COMP_SEQ:
-    xbt_assert(task->workstation_nb == count);
+    xbt_assert(task->workstation_nb == count,"Got %d locations, but were expecting %d locations",count,task->workstation_nb);
     for (i = 0; i < count; i++)
       task->workstation_list[i] = list[i];
     SD_task_do_schedule(task);
index 4680855..1f15df9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,6 +9,9 @@
 #include "xbt/dict.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
+#include "surf/surf_resource.h"
+
+
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_workstation, sd,
                                 "Logging specific to SimDag (workstation)");
@@ -21,8 +24,6 @@ SD_workstation_t __SD_workstation_create(void *surf_workstation,
 
   SD_workstation_t workstation;
   const char *name;
-  SD_CHECK_INIT_DONE();
-  xbt_assert(surf_workstation != NULL, "surf_workstation is NULL !");
 
   workstation = xbt_new(s_SD_workstation_t, 1);
   workstation->surf_workstation = surf_workstation;
@@ -46,10 +47,6 @@ SD_workstation_t __SD_workstation_create(void *surf_workstation,
  */
 SD_workstation_t SD_workstation_get_by_name(const char *name)
 {
-  SD_CHECK_INIT_DONE();
-
-  xbt_assert(name != NULL, "Invalid parameter");
-
   return xbt_lib_get_or_null(host_lib, name, SD_HOST_LEVEL);
 }
 
@@ -69,12 +66,11 @@ const SD_workstation_t *SD_workstation_get_list(void)
   void **data;
   int i;
 
-  SD_CHECK_INIT_DONE();
   xbt_assert(SD_workstation_get_number() > 0, "There is no workstation!");
 
   if (sd_global->workstation_list == NULL) {    /* this is the first time the function is called */
     sd_global->workstation_list =
-        xbt_new(SD_workstation_t, host_lib->count);
+      xbt_new(SD_workstation_t, xbt_lib_length(host_lib));
 
     i = 0;
     xbt_lib_foreach(host_lib, cursor, key, data) {
@@ -93,8 +89,7 @@ const SD_workstation_t *SD_workstation_get_list(void)
  */
 int SD_workstation_get_number(void)
 {
-  SD_CHECK_INIT_DONE();
-  return host_lib->count;
+  return xbt_lib_length(host_lib);
 }
 
 /**
@@ -106,8 +101,6 @@ int SD_workstation_get_number(void)
  */
 void *SD_workstation_get_data(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   return workstation->data;
 }
 
@@ -123,8 +116,6 @@ void *SD_workstation_get_data(SD_workstation_t workstation)
  */
 void SD_workstation_set_data(SD_workstation_t workstation, void *data)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   workstation->data = data;
 }
 
@@ -136,8 +127,6 @@ void SD_workstation_set_data(SD_workstation_t workstation, void *data)
  */
 const char *SD_workstation_get_name(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   return surf_resource_name(workstation->surf_workstation);
 }
 
@@ -163,9 +152,6 @@ const char *SD_workstation_get_property_value(SD_workstation_t ws,
  */
 xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert((workstation != NULL), "Invalid parameters");
-
   return surf_workstation_model->extension.
       workstation.get_properties(workstation->surf_workstation);
 
@@ -192,8 +178,6 @@ const SD_link_t *SD_route_get_list(SD_workstation_t src,
   void *surf_link;
   unsigned int cpt;
 
-  SD_CHECK_INIT_DONE();
-
   if (sd_global->recyclable_route == NULL) {
     /* first run */
     sd_global->recyclable_route = xbt_new(SD_link_t, SD_link_get_number());
@@ -223,7 +207,6 @@ const SD_link_t *SD_route_get_list(SD_workstation_t src,
  */
 int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
 {
-  SD_CHECK_INIT_DONE();
   return xbt_dynar_length(surf_workstation_model->extension.
                           workstation.get_route(src->surf_workstation,
                                                 dst->surf_workstation));
@@ -238,8 +221,6 @@ int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
  */
 double SD_workstation_get_power(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   return surf_workstation_model->extension.workstation.
       get_speed(workstation->surf_workstation, 1.0);
 }
@@ -253,8 +234,6 @@ double SD_workstation_get_power(SD_workstation_t workstation)
  */
 double SD_workstation_get_available_power(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   return surf_workstation_model->extension.
       workstation.get_available_speed(workstation->surf_workstation);
 }
@@ -269,8 +248,6 @@ double SD_workstation_get_available_power(SD_workstation_t workstation)
 double SD_workstation_get_computation_time(SD_workstation_t workstation,
                                            double computation_amount)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   xbt_assert(computation_amount >= 0,
               "computation_amount must be greater than or equal to zero");
   return computation_amount / SD_workstation_get_power(workstation);
@@ -294,8 +271,6 @@ double SD_route_get_current_latency(SD_workstation_t src,
   double latency;
   int i;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
   links = SD_route_get_list(src, dst);
   nb_links = SD_route_get_size(src, dst);
   latency = 0.0;
@@ -326,9 +301,6 @@ double SD_route_get_current_bandwidth(SD_workstation_t src,
   double min_bandwidth;
   int i;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
-
   links = SD_route_get_list(src, dst);
   nb_links = SD_route_get_size(src, dst);
   bandwidth = min_bandwidth = -1.0;
@@ -368,8 +340,6 @@ double SD_route_get_communication_time(SD_workstation_t src,
   double latency;
   int i;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(src != NULL && dst != NULL, "Invalid parameter");
   xbt_assert(communication_amount >= 0,
               "communication_amount must be greater than or equal to zero");
 
@@ -405,8 +375,6 @@ double SD_route_get_communication_time(SD_workstation_t src,
 e_SD_workstation_access_mode_t
 SD_workstation_get_access_mode(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   return workstation->access_mode;
 }
 
@@ -429,9 +397,6 @@ void SD_workstation_set_access_mode(SD_workstation_t workstation,
                                     e_SD_workstation_access_mode_t
                                     access_mode)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
-
   if (access_mode == workstation->access_mode) {
     return;                     // nothing is changed
   }
@@ -462,9 +427,6 @@ void SD_workstation_set_access_mode(SD_workstation_t workstation,
  */
 int __SD_workstation_is_busy(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
-
   XBT_DEBUG
       ("Workstation '%s' access mode: '%s', current task: %s, fifo size: %d",
        SD_workstation_get_name(workstation),
@@ -488,8 +450,6 @@ void __SD_workstation_destroy(void *workstation)
 
   SD_workstation_t w;
 
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   /* workstation->surf_workstation is freed by surf_exit and workstation->data is freed by the user */
 
   w = (SD_workstation_t) workstation;
@@ -506,8 +466,6 @@ void __SD_workstation_destroy(void *workstation)
  * \param workstation a workstation */
 SD_task_t SD_workstation_get_current_task(SD_workstation_t workstation)
 {
-  SD_CHECK_INIT_DONE();
-  xbt_assert(workstation != NULL, "Invalid parameter");
   xbt_assert(workstation->access_mode == SD_WORKSTATION_SEQUENTIAL_ACCESS,
               "Access mode must be set to SD_WORKSTATION_SEQUENTIAL_ACCESS"
               " to use this function");
index 7b2d98c..41694a8 100644 (file)
@@ -197,8 +197,10 @@ static XBT_INLINE smx_context_t SIMIX_context_new(xbt_main_func_t code,
                                                   smx_process_t simix_process)
 {
 
-  return (*(simix_global->context_factory->create_context))
-      (code, argc, argv, cleanup_func, simix_process);
+  return simix_global->context_factory->create_context(code,
+                                                       argc, argv,
+                                                       cleanup_func,
+                                                       simix_process);
 }
 
 /**
@@ -208,7 +210,7 @@ static XBT_INLINE smx_context_t SIMIX_context_new(xbt_main_func_t code,
  */
 static XBT_INLINE void SIMIX_context_free(smx_context_t context)
 {
-  (*(simix_global->context_factory->free)) (context);
+  simix_global->context_factory->free(context);
 }
 
 /**
@@ -217,7 +219,7 @@ static XBT_INLINE void SIMIX_context_free(smx_context_t context)
  */
 static XBT_INLINE void SIMIX_context_stop(smx_context_t context)
 {
-  (*(simix_global->context_factory->stop)) (context);
+  simix_global->context_factory->stop(context);
 }
 
 /**
@@ -227,16 +229,15 @@ static XBT_INLINE void SIMIX_context_stop(smx_context_t context)
  */
 static XBT_INLINE void SIMIX_context_suspend(smx_context_t context)
 {
-  (*(simix_global->context_factory->suspend)) (context);
+  simix_global->context_factory->suspend(context);
 }
 
 /**
- \brief executes all the processes (in parallel if possible)
- \param processes the dynar of processes to execute
+ \brief Executes all the processes to run (in parallel if possible).
  */
-static XBT_INLINE void SIMIX_context_runall(xbt_dynar_t processes)
+static XBT_INLINE void SIMIX_context_runall()
 {
-  (*(simix_global->context_factory->runall)) (processes);
+  simix_global->context_factory->runall();
 }
 
 /**
@@ -245,7 +246,7 @@ static XBT_INLINE void SIMIX_context_runall(xbt_dynar_t processes)
 static XBT_INLINE smx_context_t SIMIX_context_self(void)
 {
   if (simix_global && simix_global->context_factory != NULL) {
-    return (*(simix_global->context_factory->self))();
+    return simix_global->context_factory->self();
   }
 
   return NULL;
@@ -258,7 +259,7 @@ static XBT_INLINE smx_context_t SIMIX_context_self(void)
  */
 static XBT_INLINE void* SIMIX_context_get_data(smx_context_t context)
 {
-  return (*(simix_global->context_factory->get_data))(context);
+  return simix_global->context_factory->get_data(context);
 }
 
 XBT_PUBLIC(int) SIMIX_process_get_maxpid(void);
index c832f6d..7d2dd13 100644 (file)
@@ -26,7 +26,8 @@ typedef struct s_smx_process {
   int blocked:1;
   int suspended:1;
   smx_host_t new_host;          /* if not null, the host on which the process must migrate to */
-  smx_action_t waiting_action;
+  smx_action_t waiting_action;  /* the current blocking action if any */
+  xbt_fifo_t comms;       /* the current non-blocking communication actions */
   xbt_dict_t properties;
   s_smx_req_t request;
   void *data;                   /* kept for compatibility, it should be replaced with moddata */
@@ -58,7 +59,7 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args);
 void SIMIX_create_maestro_process(void);
 void SIMIX_process_cleanup(smx_process_t arg);
 void SIMIX_process_empty_trash(void);
-void SIMIX_process_yield(void);
+void SIMIX_process_yield(smx_process_t self);
 xbt_running_ctx_t *SIMIX_process_get_running_context(void);
 void SIMIX_process_exception_terminate(xbt_ex_t * e);
 void SIMIX_pre_process_change_host(smx_process_t process,
index 251b40f..40ad900 100644 (file)
@@ -504,7 +504,7 @@ typedef struct s_smx_req {
 
 /******************************** General *************************************/
 
-void SIMIX_request_push(void);
+void SIMIX_request_push(smx_process_t self);
 void SIMIX_request_answer(smx_req_t);
 void SIMIX_request_pre(smx_req_t, int);
 void SIMIX_request_post(smx_action_t);
index 9fc1b5d..c3632ff 100644 (file)
@@ -1,6 +1,6 @@
 /* a fast and simple context switching library                              */
 
-/* Copyright (c) 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2009 - 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,14 +22,14 @@ smx_ctx_factory_initializer_t smx_factory_initializer_to_use = NULL;
 int smx_context_stack_size = 128 * 1024;
 
 #ifdef HAVE_THREAD_LOCAL_STORAGE
-__thread smx_context_t smx_current_context;
+static __thread smx_context_t smx_current_context_parallel;
 #else
-smx_context_t smx_current_context; /* define it anyway, will be used in non-parallel mode */
 static xbt_os_thread_key_t smx_current_context_key = 0;
 #endif
-
+static smx_context_t smx_current_context_serial;
 static int smx_parallel_contexts = 1;
 static int smx_parallel_threshold = 2;
+static e_xbt_parmap_mode_t smx_parallel_synchronization_mode = XBT_PARMAP_FUTEX;
 
 /** 
  * This function is called by SIMIX_global_init() to initialize the context module.
@@ -39,7 +39,7 @@ void SIMIX_context_mod_init(void)
   if (!simix_global->context_factory) {
     /* select the context factory to use to create the contexts */
     if (smx_factory_initializer_to_use) {
-      (*smx_factory_initializer_to_use)(&(simix_global->context_factory));
+      smx_factory_initializer_to_use(&simix_global->context_factory);
     }
     else { /* use the factory specified by --cfg=contexts/factory:value */
 
@@ -70,7 +70,19 @@ void SIMIX_context_mod_init(void)
        SIMIX_ctx_raw_factory_init(&simix_global->context_factory);
       }
       else {
-        xbt_die("Invalid context factory specified");
+        XBT_ERROR("Invalid context factory specified. Valid factories on this machine:");
+#ifdef HAVE_RAWCTX
+        XBT_ERROR("  raw: high performance context factory implemented specifically for SimGrid");
+#else
+        XBT_ERROR("  (raw contextes are disabled at compilation time on this machine -- check configure logs for details)");
+#endif
+#ifdef CONTEXT_UCONTEXT
+        XBT_ERROR("  ucontext: classical system V contextes (implemented with makecontext, swapcontext and friends)");
+#else
+        XBT_ERROR("  (ucontext is disabled at compilation time on this machine -- check configure logs for details)");
+#endif
+        XBT_ERROR("  thread: slow portability layer using system threads (pthreads on UNIX, CreateThread() on windows)");
+        xbt_die("Please use a valid factory.");
       }
     }
   }
@@ -92,11 +104,29 @@ void SIMIX_context_mod_exit(void)
 
     /* finalize the context factory */
     finalize_factory = simix_global->context_factory->finalize;
-    (*finalize_factory) (&simix_global->context_factory);
+    finalize_factory(&simix_global->context_factory);
   }
   xbt_dict_remove((xbt_dict_t) _surf_cfg_set,"contexts/factory");
 }
 
+/**
+ * \brief Returns whether some parallel threads are used
+ * for the user contexts.
+ * \return 1 if parallelism is used
+ */
+XBT_INLINE int SIMIX_context_is_parallel(void) {
+  return smx_parallel_contexts > 1;
+}
+
+/**
+ * \brief Returns the number of parallel threads used
+ * for the user contexts.
+ * \return the number of threads (1 means no parallelism)
+ */
+XBT_INLINE int SIMIX_context_get_nthreads(void) {
+  return smx_parallel_contexts;
+}
+
 /**
  * \brief Sets the number of parallel threads to use
  * for the user contexts.
@@ -113,7 +143,7 @@ XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads) {
 
   if (nb_threads > 1) {
 #ifndef CONTEXT_THREADS
-    THROWF(arg_error, 0, "No thread support for parallel context execution");
+    THROWF(arg_error, 0, "The thread factory cannot be run in parallel");
 #endif
   }
 
@@ -121,21 +151,16 @@ XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads) {
 }
 
 /**
- * \brief Returns the number of parallel threads used
- * for the user contexts.
- * \return the number of threads (1 means no parallelism)
- */
-XBT_INLINE int SIMIX_context_get_nthreads(void) {
-  return smx_parallel_contexts;
-}
-
-/**
- * \brief Returns whether some parallel threads are used
- * for the user contexts.
- * \return 1 if parallelism is used
+ * \brief Returns the threshold above which user processes are run in parallel.
+ *
+ * If the number of threads is set to 1, there is no parallelism and this
+ * threshold has no effect.
+ *
+ * \return when the number of user processes ready to run is above
+ * this threshold, they are run in parallel
  */
-XBT_INLINE int SIMIX_context_is_parallel(void) {
-  return smx_parallel_contexts > 1;
+XBT_INLINE int SIMIX_context_get_parallel_threshold(void) {
+  return smx_parallel_threshold;
 }
 
 /**
@@ -152,16 +177,21 @@ XBT_INLINE void SIMIX_context_set_parallel_threshold(int threshold) {
 }
 
 /**
- * \brief Returns the threshold above which user processes are run in parallel.
- *
- * If the number of threads is set to 1, there is no parallelism and this
- * threshold has no effect.
- *
- * \return when the number of user processes ready to run is above
- * this threshold, they are run in parallel
+ * \brief Returns the synchronization mode used when processes are run in
+ * parallel.
+ * \return how threads are synchronized if processes are run in parallel
  */
-XBT_INLINE int SIMIX_context_get_parallel_threshold(void) {
-  return smx_parallel_threshold;
+XBT_INLINE e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode(void) {
+  return smx_parallel_synchronization_mode;
+}
+
+/**
+ * \brief Sets the synchronization mode to use when processes are run in
+ * parallel.
+ * \param mode how to synchronize threads if processes are run in parallel
+ */
+XBT_INLINE void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode) {
+  smx_parallel_synchronization_mode = mode;
 }
 
 /**
@@ -170,11 +200,16 @@ XBT_INLINE int SIMIX_context_get_parallel_threshold(void) {
  */
 XBT_INLINE smx_context_t SIMIX_context_get_current(void)
 {
+  if (SIMIX_context_is_parallel()) {
 #ifdef HAVE_THREAD_LOCAL_STORAGE
-  return smx_current_context;
+    return smx_current_context_parallel;
 #else
-  return xbt_os_thread_get_specific(smx_current_context_key);
+    return xbt_os_thread_get_specific(smx_current_context_key);
 #endif
+  }
+  else {
+    return smx_current_context_serial;
+  }
 }
 
 /**
@@ -183,10 +218,15 @@ XBT_INLINE smx_context_t SIMIX_context_get_current(void)
  */
 XBT_INLINE void SIMIX_context_set_current(smx_context_t context)
 {
+  if (SIMIX_context_is_parallel()) {
 #ifdef HAVE_THREAD_LOCAL_STORAGE
-  smx_current_context = context;
+    smx_current_context_parallel = context;
 #else
-  xbt_os_thread_set_specific(smx_current_context_key, context);
+    xbt_os_thread_set_specific(smx_current_context_key, context);
 #endif
+  }
+  else {
+    smx_current_context_serial = context;
+  }
 }
 
index 810ef6c..2906981 100644 (file)
@@ -72,8 +72,7 @@ void smx_ctx_base_free(smx_context_t context)
     /* free argv */
     if (context->argv) {
       for (i = 0; i < context->argc; i++)
-        if (context->argv[i])
-          free(context->argv[i]);
+        free(context->argv[i]);
 
       free(context->argv);
     }
@@ -86,7 +85,7 @@ void smx_ctx_base_free(smx_context_t context)
 void smx_ctx_base_stop(smx_context_t context)
 {
   if (context->cleanup_func)
-    (*(context->cleanup_func)) (context->data);
+    context->cleanup_func(context->data);
   context->iwannadie = 0;
   SIMIX_req_process_cleanup(context->data);
 }
index 059870e..c053cff 100644 (file)
@@ -1,4 +1,4 @@
-/* context_raw - context switching with ucontextes from System V           */
+/* context_raw - fast context switching inspired from System V ucontextes   */
 
 /* Copyright (c) 2009, 2010. The SimGrid Team.
  * All rights reserved.                                                     */
@@ -9,7 +9,6 @@
 #include "simix/private.h"
 #include "xbt/parmap.h"
 
-
 #ifdef HAVE_VALGRIND_VALGRIND_H
 #  include <valgrind/valgrind.h>
 #endif                          /* HAVE_VALGRIND_VALGRIND_H */
@@ -18,19 +17,27 @@ typedef char * raw_stack_t;
 typedef void (*rawctx_entry_point_t)(void *);
 
 typedef struct s_smx_ctx_raw {
-  s_smx_ctx_base_t super;       /* Fields of super implementation */
-  char *malloced_stack; /* malloced area containing the stack */
-  raw_stack_t stack_top; /* pointer to stack top (within previous area) */
-  raw_stack_t old_stack_top; /* to whom I should return the control */
+  s_smx_ctx_base_t super;         /* Fields of super implementation */
+  char *malloced_stack;           /* malloced area containing the stack */
+  raw_stack_t stack_top;          /* pointer to stack top (within previous area) */
 #ifdef HAVE_VALGRIND_VALGRIND_H
-  unsigned int valgrind_stack_id;       /* the valgrind stack id */
+  unsigned int valgrind_stack_id; /* the valgrind stack id */
 #endif
 #ifdef TIME_BENCH
-  unsigned int thread;  /* Just for measuring purposes */
+  unsigned int thread;            /* Just for measuring purposes */
 #endif
 } s_smx_ctx_raw_t, *smx_ctx_raw_t;
 
-smx_ctx_raw_t maestro_raw_context;
+#ifdef CONTEXT_THREADS
+static xbt_parmap_t raw_parmap;
+static raw_stack_t* raw_workers_stacks;       /* space to save the worker stack in each thread */
+static unsigned long raw_threads_working;     /* number of threads that have started their work */
+static xbt_os_thread_key_t raw_worker_id_key; /* thread-specific storage for the thread id */
+#endif
+
+static unsigned long raw_process_index = 0;   /* index of the next process to run in the
+                                               * list of runnable processes */
+static smx_ctx_raw_t raw_maestro_context;
 
 extern raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
                                    rawctx_entry_point_t entry_point, void* arg);
@@ -129,7 +136,7 @@ __asm__ (
    ".text\n"
    ".globl raw_swapcontext\n"
    ".type raw_swapcontext,@function\n"
-   "raw_swapcontext:\n"        /* Calling convention sets the arguments in rdi and rsi, respectively */
+   "raw_swapcontext:\n" /* Calling convention sets the arguments in rdi and rsi, respectively */
 #endif
    "   pushq %rdi\n"
    "   pushq %rsi\n"
@@ -161,8 +168,8 @@ __asm__ (
 );
 #else
 
-/* If you implement raw contextes for other processors, don't forget to 
-   update the definition of HAVE_RAWCTX in buildtools/Cmake/AddTests.cmake */
+/* If you implement raw contexts for other processors, don't forget to
+   update the definition of HAVE_RAWCTX in buildtools/Cmake/CompleteInFiles.cmake */
 
 raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
                             rawctx_entry_point_t entry_point, void* arg) {
@@ -177,10 +184,6 @@ void raw_swapcontext(raw_stack_t* old, raw_stack_t new) {
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context);
 
-#ifdef CONTEXT_THREADS
-static xbt_parmap_t parmap;
-#endif
-
 #ifdef TIME_BENCH
 #include "xbt/xbt_os_time.h"
 #define NUM_THREADS 4
@@ -195,7 +198,68 @@ static char new_sr = 0;
 #endif
 
 static void smx_ctx_raw_wrapper(smx_ctx_raw_t context);
+static int smx_ctx_raw_factory_finalize(smx_context_factory_t *factory);
+static smx_context_t smx_ctx_raw_create_context(xbt_main_func_t code, int argc,
+    char **argv, void_pfn_smxprocess_t cleanup_func, void *data);
+static void smx_ctx_raw_free(smx_context_t context);
+static void smx_ctx_raw_wrapper(smx_ctx_raw_t context);
+static void smx_ctx_raw_stop(smx_context_t context);
+static void smx_ctx_raw_suspend_serial(smx_context_t context);
+static void smx_ctx_raw_resume_serial(smx_process_t first_process);
+static void smx_ctx_raw_runall_serial(void);
+static void smx_ctx_raw_suspend_parallel(smx_context_t context);
+static void smx_ctx_raw_resume_parallel(smx_process_t first_process);
+static void smx_ctx_raw_runall_parallel(void);
+static void smx_ctx_raw_runall(void);
+
+/**
+ * \brief Initializes the raw context factory.
+ * \param factory where to initialize the factory
+ */
+void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory)
+{
+  XBT_VERB("Using raw contexts. Because the glibc is just not good enough for us.");
+  smx_ctx_base_factory_init(factory);
+
+  (*factory)->finalize  = smx_ctx_raw_factory_finalize;
+  (*factory)->create_context = smx_ctx_raw_create_context;
+  /* Do not overload that method (*factory)->finalize */
+  (*factory)->free = smx_ctx_raw_free;
+  (*factory)->stop = smx_ctx_raw_stop;
+  (*factory)->name = "smx_raw_context_factory";
+
+  if (SIMIX_context_is_parallel()) {
+#ifdef CONTEXT_THREADS
+    int nthreads = SIMIX_context_get_nthreads();
+    raw_parmap = xbt_parmap_new(nthreads, SIMIX_context_get_parallel_mode());
+    raw_workers_stacks = xbt_new(raw_stack_t, nthreads);
+    xbt_os_thread_key_create(&raw_worker_id_key);
+#endif
+    if (SIMIX_context_get_parallel_threshold() > 1) {
+      /* choose dynamically */
+      (*factory)->runall = smx_ctx_raw_runall;
+      (*factory)->suspend = NULL;
+    }
+    else {
+      /* always parallel */
+      (*factory)->runall = smx_ctx_raw_runall_parallel;
+      (*factory)->suspend = smx_ctx_raw_suspend_parallel;
+    }
+  }
+  else {
+    /* always serial */
+    (*factory)->runall = smx_ctx_raw_runall_serial;
+    (*factory)->suspend = smx_ctx_raw_suspend_serial;
+  }
+#ifdef TIME_BENCH
+  timer = xbt_os_timer_new();
+#endif
+}
 
+/**
+ * \brief Finalizes the raw context factory.
+ * \param factory the raw context factory
+ */
 static int smx_ctx_raw_factory_finalize(smx_context_factory_t *factory)
 {
 #ifdef TIME_BENCH
@@ -204,13 +268,23 @@ static int smx_ctx_raw_factory_finalize(smx_context_factory_t *factory)
 #endif
 
 #ifdef CONTEXT_THREADS
-  if(parmap)
-      xbt_parmap_destroy(parmap);
+  if (raw_parmap)
+    xbt_parmap_destroy(raw_parmap);
+  xbt_free(raw_workers_stacks);
 #endif
   return smx_ctx_base_factory_finalize(factory);
 }
 
-
+/**
+ * \brief Creates a new raw context.
+ * \param code main function of this context or NULL to create the maestro
+ * context
+ * \param argc argument number
+ * \param argv arguments to pass to the main function
+ * \param cleanup_func a function to call to free the user data when the
+ * context finished
+ * \param data user data
+ */
 static smx_context_t
 smx_ctx_raw_create_context(xbt_main_func_t code, int argc, char **argv,
     void_pfn_smxprocess_t cleanup_func,
@@ -226,13 +300,13 @@ smx_ctx_raw_create_context(xbt_main_func_t code, int argc, char **argv,
           cleanup_func,
           data);
 
-  /* If the user provided a function for the process then use it
-     otherwise is the context for maestro */
+  /* if the user provided a function for the process then use it,
+     otherwise it is the context for maestro */
      if (code) {
        context->malloced_stack = xbt_malloc0(smx_context_stack_size);
        context->stack_top =
            raw_makecontext(context->malloced_stack, smx_context_stack_size,
-               (void(*)(void*))smx_ctx_raw_wrapper,context);
+               (void_f_pvoid_t) smx_ctx_raw_wrapper, context);
 
 #ifdef HAVE_VALGRIND_VALGRIND_H
        context->valgrind_stack_id =
@@ -240,16 +314,19 @@ smx_ctx_raw_create_context(xbt_main_func_t code, int argc, char **argv,
                context->malloced_stack + smx_context_stack_size);
 #endif                          /* HAVE_VALGRIND_VALGRIND_H */
 
-     }else{
-       maestro_raw_context = context;
+     } else {
+       raw_maestro_context = context;
      }
 
      return (smx_context_t) context;
 }
 
+/**
+ * \brief Destroys a raw context.
+ * \param context a raw context
+ */
 static void smx_ctx_raw_free(smx_context_t context)
 {
-
   if (context) {
 
 #ifdef HAVE_VALGRIND_VALGRIND_H
@@ -257,38 +334,71 @@ static void smx_ctx_raw_free(smx_context_t context)
         context)->valgrind_stack_id);
 #endif                          /* HAVE_VALGRIND_VALGRIND_H */
 
-    free(((smx_ctx_raw_t)context)->malloced_stack);
+    free(((smx_ctx_raw_t) context)->malloced_stack);
   }
   smx_ctx_base_free(context);
 }
 
-static void smx_ctx_raw_suspend(smx_context_t context)
+/**
+ * \brief Wrapper for the main function of a context.
+ * \param context a raw context
+ */
+static void smx_ctx_raw_wrapper(smx_ctx_raw_t context)
 {
-  SIMIX_context_set_current((smx_context_t) maestro_raw_context);
-  raw_swapcontext(
-      &((smx_ctx_raw_t) context)->stack_top,
-      ((smx_ctx_raw_t) context)->old_stack_top);
+  (context->super.code) (context->super.argc, context->super.argv);
+
+  smx_ctx_raw_stop((smx_context_t) context);
 }
 
+/**
+ * \brief Stops a raw context.
+ *
+ * This function is called when the main function of the context if finished.
+ *
+ * \param context the current context
+ */
 static void smx_ctx_raw_stop(smx_context_t context)
 {
   smx_ctx_base_stop(context);
-  smx_ctx_raw_suspend(context);
+  simix_global->context_factory->suspend(context);
 }
 
-static void smx_ctx_raw_wrapper(smx_ctx_raw_t context)
-{ 
-  (context->super.code) (context->super.argc, context->super.argv);
-
-  smx_ctx_raw_stop((smx_context_t) context);
+/**
+ * \brief Suspends a running context and resumes another one or returns to
+ * maestro.
+ * \param context the current context
+ */
+static void smx_ctx_raw_suspend_serial(smx_context_t context)
+{
+  /* determine the next context */
+  smx_context_t next_context;
+  unsigned long int i = raw_process_index++;
+
+  if (i < xbt_dynar_length(simix_global->process_to_run)) {
+    /* execute the next process */
+    XBT_DEBUG("Run next process");
+    next_context = xbt_dynar_get_as(
+        simix_global->process_to_run, i, smx_process_t)->context;
+  }
+  else {
+    /* all processes were run, return to maestro */
+    XBT_DEBUG("No more process to run");
+    next_context = (smx_context_t) raw_maestro_context;
+  }
+  SIMIX_context_set_current(next_context);
+  raw_swapcontext(&((smx_ctx_raw_t) context)->stack_top,
+      ((smx_ctx_raw_t) next_context)->stack_top);
 }
 
-static void smx_ctx_raw_resume(smx_process_t process)
+/**
+ * \brief Resumes sequentially all processes ready to run.
+ * \param first_process the first process to resume
+ */
+static void smx_ctx_raw_resume_serial(smx_process_t first_process)
 {
-  smx_ctx_raw_t context = (smx_ctx_raw_t)process->context;
+  smx_ctx_raw_t context = (smx_ctx_raw_t) first_process->context;
   SIMIX_context_set_current((smx_context_t) context);
-  raw_swapcontext(
-      &((smx_ctx_raw_t) context)->old_stack_top,
+  raw_swapcontext(&raw_maestro_context->stack_top,
       ((smx_ctx_raw_t) context)->stack_top);
 }
 
@@ -360,67 +470,115 @@ void smx_ctx_raw_new_sr(void)
   XBT_VERB("New scheduling round");
 }
 #else
-static void smx_ctx_raw_runall_serial(xbt_dynar_t processes)
+
+/**
+ * \brief Resumes sequentially all processes ready to run.
+ */
+static void smx_ctx_raw_runall_serial(void)
 {
-  smx_process_t process;
-  unsigned int cursor;
+  if (!xbt_dynar_is_empty(simix_global->process_to_run)) {
+    smx_process_t first_process =
+        xbt_dynar_get_as(simix_global->process_to_run, 0, smx_process_t);
+    raw_process_index = 1;
 
-  xbt_dynar_foreach(processes, cursor, process) {
-    XBT_DEBUG("Schedule item %u of %lu",cursor,xbt_dynar_length(processes));
-    smx_ctx_raw_resume(process);
+    /* execute the first process */
+    smx_ctx_raw_resume_serial(first_process);
   }
 }
 #endif
 
-static void smx_ctx_raw_runall_parallel(xbt_dynar_t processes)
+/**
+ * \brief Stops a raw context.
+ *
+ * This function is called when the main function of the context if finished.
+ *
+ * \param context the context of the current worker thread
+ */
+static void smx_ctx_raw_stop_parallel(smx_context_t context)
 {
-#ifdef CONTEXT_THREADS
-  xbt_parmap_apply(parmap, (void_f_pvoid_t)smx_ctx_raw_resume, processes);
-#endif
+  smx_ctx_base_stop(context);
+  smx_ctx_raw_suspend_parallel(context);
 }
 
-static void smx_ctx_raw_runall(xbt_dynar_t processes)
+/**
+ * \brief Suspends a running context and resumes another one or returns to
+ * the main function of the current worker thread.
+ * \param context the context of the current worker thread
+ */
+static void smx_ctx_raw_suspend_parallel(smx_context_t context)
 {
-  if (xbt_dynar_length(processes) >= SIMIX_context_get_parallel_threshold()) {
-    XBT_DEBUG("Runall // %lu", xbt_dynar_length(processes));
-    smx_ctx_raw_runall_parallel(processes);
-  } else {
-    XBT_DEBUG("Runall serial %lu", xbt_dynar_length(processes));
-    smx_ctx_raw_runall_serial(processes);
+#ifdef CONTEXT_THREADS
+  /* determine the next context */
+  smx_process_t next_work = xbt_parmap_next(raw_parmap);
+  smx_context_t next_context;
+  raw_stack_t next_stack;
+
+  if (next_work != NULL) {
+    /* there is a next process to resume */
+    XBT_DEBUG("Run next process");
+    next_context = next_work->context;
+    next_stack = ((smx_ctx_raw_t) next_context)->stack_top;
+  }
+  else {
+    /* all processes were run, go to the barrier */
+    XBT_DEBUG("No more processes to run");
+    next_context = (smx_context_t) raw_maestro_context;
+    unsigned long worker_id =
+        (unsigned long) xbt_os_thread_get_specific(raw_worker_id_key);
+    XBT_DEBUG("Restoring worker stack %lu (working threads = %lu)",
+        worker_id, raw_threads_working);
+    next_stack = raw_workers_stacks[worker_id];
   }
+
+  SIMIX_context_set_current(next_context);
+  raw_swapcontext(&((smx_ctx_raw_t) context)->stack_top, next_stack);
+#endif
 }
 
-void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory)
+/**
+ * \brief Resumes sequentially in the current worker thread the processes ready
+ * to run.
+ * \param first_process the first process to resume
+ */
+static void smx_ctx_raw_resume_parallel(smx_process_t first_process)
 {
-  XBT_VERB("Using raw contexts. Because the glibc is just not good enough for us.");
-  smx_ctx_base_factory_init(factory);
-
-  (*factory)->finalize  = smx_ctx_raw_factory_finalize;
-  (*factory)->create_context = smx_ctx_raw_create_context;
-  /* Do not overload that method (*factory)->finalize */
-  (*factory)->free = smx_ctx_raw_free;
-  (*factory)->stop = smx_ctx_raw_stop;
-  (*factory)->suspend = smx_ctx_raw_suspend;
-  (*factory)->name = "smx_raw_context_factory";
+#ifdef CONTEXT_THREADS
+  unsigned long worker_id = __sync_fetch_and_add(&raw_threads_working, 1);
+  xbt_os_thread_set_specific(raw_worker_id_key, (void*) worker_id);
+  XBT_DEBUG("Saving worker stack %lu", worker_id);
+  raw_stack_t* worker_stack = &raw_workers_stacks[worker_id];
+
+  smx_context_t context = first_process->context;
+  SIMIX_context_set_current(context);
+  raw_swapcontext(worker_stack, ((smx_ctx_raw_t) context)->stack_top);
+#endif
+}
 
-  if (SIMIX_context_is_parallel()) {
+/**
+ * \brief Resumes in parallel all processes ready to run.
+ */
+static void smx_ctx_raw_runall_parallel(void)
+{
 #ifdef CONTEXT_THREADS
-    parmap = xbt_parmap_new(SIMIX_context_get_nthreads());
+  raw_threads_working = 0;
+  xbt_parmap_apply(raw_parmap, (void_f_pvoid_t) smx_ctx_raw_resume_parallel,
+      simix_global->process_to_run);
 #endif
-    if (SIMIX_context_get_parallel_threshold() > 1) {
-      /* choose dynamically */
-      (*factory)->runall = smx_ctx_raw_runall;
-    }
-    else {
-      /* always parallel */
-      (*factory)->runall = smx_ctx_raw_runall_parallel;
-    }
-  }
-  else {
-    /* always serial */
-    (*factory)->runall = smx_ctx_raw_runall_serial;
+}
+
+/**
+ * \brief Resumes all processes ready to run.
+ */
+static void smx_ctx_raw_runall(void)
+{
+  unsigned long nb_processes = xbt_dynar_length(simix_global->process_to_run);
+  if (nb_processes >= SIMIX_context_get_parallel_threshold()) {
+    XBT_DEBUG("Runall // %lu", nb_processes);
+    simix_global->context_factory->suspend = smx_ctx_raw_suspend_parallel;
+    smx_ctx_raw_runall_parallel();
+  } else {
+    XBT_DEBUG("Runall serial %lu", nb_processes);
+    simix_global->context_factory->suspend = smx_ctx_raw_suspend_serial;
+    smx_ctx_raw_runall_serial();
   }
-#ifdef TIME_BENCH
-  timer = xbt_os_timer_new();
-#endif
 }
index 4d30329..9cedc55 100644 (file)
@@ -8,33 +8,66 @@
 
 #include <stdarg.h>
 
-#include "smx_context_sysv_private.h"
 #include "xbt/parmap.h"
 #include "simix/private.h"
 #include "gras_config.h"
-
-#ifdef HAVE_VALGRIND_VALGRIND_H
-#  include <valgrind/valgrind.h>
-#endif                          /* HAVE_VALGRIND_VALGRIND_H */
+#include "context_sysv_config.h"        /* loads context system definitions */
 
 #ifdef _XBT_WIN32
-#include "win32_ucontext.h"
+#  include <win32_ucontext.h>     /* context relative declarations */
 #else
-#include "ucontext.h"
+#  include <ucontext.h>           /* context relative declarations */
 #endif
 
+#ifdef HAVE_VALGRIND_VALGRIND_H
+#  include <valgrind/valgrind.h>
+#endif                          /* HAVE_VALGRIND_VALGRIND_H */
+
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context);
 
+typedef struct s_smx_ctx_sysv {
+  s_smx_ctx_base_t super;       /* Fields of super implementation */
+  ucontext_t uc;                /* the ucontext that executes the code */
+#ifdef HAVE_VALGRIND_VALGRIND_H
+  unsigned int valgrind_stack_id;       /* the valgrind stack id */
+#endif
+  char stack[0];                /* the thread stack (must remain the last element of the structure) */
+} s_smx_ctx_sysv_t, *smx_ctx_sysv_t;
+
 #ifdef CONTEXT_THREADS
-static xbt_parmap_t parmap;
+static xbt_parmap_t sysv_parmap;
+static ucontext_t* sysv_workers_stacks;        /* space to save the worker's stack in each thread */
+static unsigned long sysv_threads_working;     /* number of threads that have started their work */
+static xbt_os_thread_key_t sysv_worker_id_key; /* thread-specific storage for the thread id */
 #endif
+static unsigned long sysv_process_index = 0;   /* index of the next process to run in the
+                                                * list of runnable processes */
+static smx_ctx_sysv_t sysv_maestro_context;
 
+static int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory);
+static smx_context_t
+smx_ctx_sysv_create_context_sized(size_t structure_size,
+                                  xbt_main_func_t code, int argc,
+                                  char **argv,
+                                  void_pfn_smxprocess_t cleanup_func,
+                                  void *data);
+static void smx_ctx_sysv_free(smx_context_t context);
 static smx_context_t
 smx_ctx_sysv_create_context(xbt_main_func_t code, int argc, char **argv,
     void_pfn_smxprocess_t cleanup_func, void* data);
 
 static void smx_ctx_sysv_wrapper(int count, ...);
 
+static void smx_ctx_sysv_stop_serial(smx_context_t context);
+static void smx_ctx_sysv_suspend_serial(smx_context_t context);
+static void smx_ctx_sysv_resume_serial(smx_process_t first_process);
+static void smx_ctx_sysv_runall_serial(void);
+
+static void smx_ctx_sysv_stop_parallel(smx_context_t context);
+static void smx_ctx_sysv_suspend_parallel(smx_context_t context);
+static void smx_ctx_sysv_resume_parallel(smx_process_t first_process);
+static void smx_ctx_sysv_runall_parallel(void);
+
 /* This is a bit paranoid about SIZEOF_VOIDP not being a multiple of SIZEOF_INT,
  * but it doesn't harm. */
 #define CTX_ADDR_LEN (SIZEOF_VOIDP / SIZEOF_INT + !!(SIZEOF_VOIDP % SIZEOF_INT))
@@ -59,33 +92,38 @@ void SIMIX_ctx_sysv_factory_init(smx_context_factory_t *factory)
   (*factory)->create_context = smx_ctx_sysv_create_context;
   /* Do not overload that method (*factory)->finalize */
   (*factory)->free = smx_ctx_sysv_free;
-  (*factory)->stop = smx_ctx_sysv_stop;
-  (*factory)->suspend = smx_ctx_sysv_suspend;
   (*factory)->name = "smx_sysv_context_factory";
 
   if (SIMIX_context_is_parallel()) {
 #ifdef CONTEXT_THREADS /* To use parallel ucontexts a thread pool is needed */
-    parmap = xbt_parmap_new(2);
+    int nthreads = SIMIX_context_get_nthreads();
+    sysv_parmap = xbt_parmap_new(nthreads, SIMIX_context_get_parallel_mode());
+    sysv_workers_stacks = xbt_new(ucontext_t, nthreads);
+    xbt_os_thread_key_create(&sysv_worker_id_key);
+    (*factory)->stop = smx_ctx_sysv_stop_parallel;
+    (*factory)->suspend = smx_ctx_sysv_suspend_parallel;
     (*factory)->runall = smx_ctx_sysv_runall_parallel;
-    (*factory)->self = smx_ctx_sysv_self_parallel;
 #else
     THROWF(arg_error, 0, "No thread support for parallel context execution");
 #endif
-  }else{
-    (*factory)->runall = smx_ctx_sysv_runall;
+  } else {
+    (*factory)->stop = smx_ctx_sysv_stop_serial;
+    (*factory)->suspend = smx_ctx_sysv_suspend_serial;
+    (*factory)->runall = smx_ctx_sysv_runall_serial;
   }    
 }
 
-int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory)
+static int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory)
 { 
 #ifdef CONTEXT_THREADS
-  if(parmap)
-    xbt_parmap_destroy(parmap);
+  if (sysv_parmap)
+    xbt_parmap_destroy(sysv_parmap);
+  xbt_free(sysv_workers_stacks);
 #endif
   return smx_ctx_base_factory_finalize(factory);
 }
 
-smx_context_t
+static smx_context_t
 smx_ctx_sysv_create_context_sized(size_t size, xbt_main_func_t code,
                                   int argc, char **argv,
                                   void_pfn_smxprocess_t cleanup_func,
@@ -100,15 +138,11 @@ smx_ctx_sysv_create_context_sized(size_t size, xbt_main_func_t code,
                                                                  cleanup_func,
                                                                  data);
 
-  /* If the user provided a function for the process then use it
-     otherwise is the context for maestro */
+  /* if the user provided a function for the process then use it,
+     otherwise it is the context for maestro */
   if (code) {
 
-    int res;
-    res = getcontext(&(context->uc));
-    xbt_assert(res == 0,
-                "Error in context saving: %d (%s)", errno,
-                strerror(errno));
+    getcontext(&(context->uc));
 
     context->uc.uc_link = NULL;
 
@@ -127,12 +161,11 @@ smx_ctx_sysv_create_context_sized(size_t size, xbt_main_func_t code,
     ctx_addr.addr = context;
     makecontext(&context->uc, (void (*)())smx_ctx_sysv_wrapper,
                 CTX_ADDR_LEN, CTX_ADDR_SPLIT(ctx_addr));
-  }else{
-    maestro_context = context;
+  } else {
+    sysv_maestro_context = context;
   }
 
   return (smx_context_t) context;
-
 }
 
 static smx_context_t
@@ -147,7 +180,7 @@ smx_ctx_sysv_create_context(xbt_main_func_t code, int argc, char **argv,
 
 }
 
-void smx_ctx_sysv_free(smx_context_t context)
+static void smx_ctx_sysv_free(smx_context_t context)
 {
 
   if (context) {
@@ -161,13 +194,7 @@ void smx_ctx_sysv_free(smx_context_t context)
   smx_ctx_base_free(context);
 }
 
-void smx_ctx_sysv_stop(smx_context_t context)
-{
-  smx_ctx_base_stop(context);
-  smx_ctx_sysv_suspend(context);
-}
-
-void smx_ctx_sysv_wrapper(int first, ...)
+static void smx_ctx_sysv_wrapper(int first, ...)
 { 
   union u_ctx_addr ctx_addr;
   smx_ctx_sysv_t context;
@@ -177,66 +204,116 @@ void smx_ctx_sysv_wrapper(int first, ...)
     va_list ap;
     int i;
     va_start(ap, first);
-    for(i = 1; i < CTX_ADDR_LEN; i++)
+    for (i = 1; i < CTX_ADDR_LEN; i++)
       ctx_addr.intv[i] = va_arg(ap, int);
     va_end(ap);
   }
   context = ctx_addr.addr;
   (context->super.code) (context->super.argc, context->super.argv);
 
-  smx_ctx_sysv_stop((smx_context_t) context);
+  simix_global->context_factory->stop((smx_context_t) context);
 }
 
-void smx_ctx_sysv_suspend(smx_context_t context)
+static void smx_ctx_sysv_stop_serial(smx_context_t context)
 {
-  SIMIX_context_set_current((smx_context_t) maestro_context);
-  int rv;
-  rv = swapcontext(&((smx_ctx_sysv_t) context)->uc, &((smx_ctx_sysv_t)context)->old_uc);
+  smx_ctx_base_stop(context);
+  smx_ctx_sysv_suspend_serial(context);
+}
 
-  xbt_assert((rv == 0), "Context swapping failure");
+static void smx_ctx_sysv_suspend_serial(smx_context_t context)
+{
+  /* determine the next context */
+  smx_context_t next_context;
+  unsigned long int i = sysv_process_index++;
+
+  if (i < xbt_dynar_length(simix_global->process_to_run)) {
+    /* execute the next process */
+    XBT_DEBUG("Run next process");
+    next_context = xbt_dynar_get_as(
+        simix_global->process_to_run,i, smx_process_t)->context;
+  }
+  else {
+    /* all processes were run, return to maestro */
+    XBT_DEBUG("No more process to run");
+    next_context = (smx_context_t) sysv_maestro_context;
+  }
+  SIMIX_context_set_current(next_context);
+  swapcontext(&((smx_ctx_sysv_t) context)->uc,
+      &((smx_ctx_sysv_t) next_context)->uc);
 }
 
-void smx_ctx_sysv_resume(smx_context_t context)
+static void smx_ctx_sysv_resume_serial(smx_process_t first_process)
 {
+  smx_context_t context = first_process->context;
   SIMIX_context_set_current(context);
-  int rv;
-  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
-
-  xbt_assert((rv == 0), "Context swapping failure");
+  swapcontext(&sysv_maestro_context->uc,
+      &((smx_ctx_sysv_t) context)->uc);
 }
 
-void smx_ctx_sysv_runall(xbt_dynar_t processes)
+static void smx_ctx_sysv_runall_serial(void)
 {
-  smx_process_t process;
-  unsigned int cursor;
+  if (!xbt_dynar_is_empty(simix_global->process_to_run)) {
+    smx_process_t first_process =
+        xbt_dynar_get_as(simix_global->process_to_run, 0, smx_process_t);
+    sysv_process_index = 1;
 
-  xbt_dynar_foreach(processes, cursor, process) {
-    XBT_DEBUG("Schedule item %u of %lu",cursor,xbt_dynar_length(processes));
-    smx_ctx_sysv_resume(process->context);
+    /* execute the first process */
+    smx_ctx_sysv_resume_serial(first_process);
   }
 }
 
-void smx_ctx_sysv_resume_parallel(smx_process_t process)
+static void smx_ctx_sysv_stop_parallel(smx_context_t context)
 {
-  smx_context_t context = process->context;
-  SIMIX_context_set_current((smx_context_t) context);
-  int rv;
-  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
-  SIMIX_context_set_current((smx_context_t) maestro_context);
+  smx_ctx_base_stop(context);
+  smx_ctx_sysv_suspend_parallel(context);
+}
 
-  xbt_assert((rv == 0), "Context swapping failure");
+static void smx_ctx_sysv_suspend_parallel(smx_context_t context)
+{
+#ifdef CONTEXT_THREADS
+  /* determine the next context */
+  smx_process_t next_work = xbt_parmap_next(sysv_parmap);
+  smx_context_t next_context;
+  ucontext_t* next_stack;
+
+  if (next_work != NULL) {
+    /* there is a next process to resume */
+    XBT_DEBUG("Run next process");
+    next_context = next_work->context;
+    next_stack = &((smx_ctx_sysv_t) next_context)->uc;
+  }
+  else {
+    /* all processes were run, go to the barrier */
+    XBT_DEBUG("No more processes to run");
+    next_context = (smx_context_t) sysv_maestro_context;
+    unsigned long worker_id =
+        (unsigned long) xbt_os_thread_get_specific(sysv_worker_id_key);
+    next_stack = &sysv_workers_stacks[worker_id];
+  }
+
+  SIMIX_context_set_current(next_context);
+  swapcontext(&((smx_ctx_sysv_t) context)->uc, next_stack);
+#endif
 }
 
-void smx_ctx_sysv_runall_parallel(xbt_dynar_t processes)
+static void smx_ctx_sysv_resume_parallel(smx_process_t first_process)
 {
 #ifdef CONTEXT_THREADS
-  xbt_parmap_apply(parmap, (void_f_pvoid_t)smx_ctx_sysv_resume_parallel, processes);
+  unsigned long worker_id = __sync_fetch_and_add(&sysv_threads_working, 1);
+  xbt_os_thread_set_specific(sysv_worker_id_key, (void*) worker_id);
+  ucontext_t* worker_stack = &sysv_workers_stacks[worker_id];
+
+  smx_context_t context = first_process->context;
+  SIMIX_context_set_current(context);
+  swapcontext(worker_stack, &((smx_ctx_sysv_t) context)->uc);
 #endif
 }
 
-smx_context_t smx_ctx_sysv_self_parallel(void)
+static void smx_ctx_sysv_runall_parallel(void)
 {
-  /*smx_context_t self_context = (smx_context_t) xbt_os_thread_get_extra_data();
-  return self_context ? self_context : (smx_context_t) maestro_context;*/
-  return SIMIX_context_get_current();
+#ifdef CONTEXT_THREADS
+  sysv_threads_working = 0;
+  xbt_parmap_apply(sysv_parmap, (void_f_pvoid_t) smx_ctx_sysv_resume_parallel,
+      simix_global->process_to_run);
+#endif
 }
diff --git a/src/simix/smx_context_sysv_private.h b/src/simix/smx_context_sysv_private.h
deleted file mode 100644 (file)
index 168379b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Functions of sysv context mecanism: lua inherites them                   */
-
-/* Copyright (c) 2010. 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 _XBT_CONTEXT_SYSV_PRIVATE_H
-#define _XBT_CONTEXT_SYSV_PRIVATE_H
-
-#include "xbt/swag.h"
-#include "simix/context.h"
-#include "portable.h"
-
-SG_BEGIN_DECL()
-
-/* lower this if you want to reduce the memory consumption  */
-#include "context_sysv_config.h"        /* loads context system definitions */
-#ifdef _XBT_WIN32
-#include <win32_ucontext.h>     /* context relative declarations */
-#else
-#include <ucontext.h>           /* context relative declarations */
-#endif
-
-typedef struct s_smx_ctx_sysv {
-  s_smx_ctx_base_t super;       /* Fields of super implementation */
-  ucontext_t uc;                /* the thread that execute the code */
-  ucontext_t old_uc;            /* the context that was swapped with */
-#ifdef HAVE_VALGRIND_VALGRIND_H
-  unsigned int valgrind_stack_id;       /* the valgrind stack id */
-#endif
-  char stack[0];                /* the thread stack (must remain the last element of the structure) */
-} s_smx_ctx_sysv_t, *smx_ctx_sysv_t;
-
-smx_ctx_sysv_t maestro_context;
-
-void SIMIX_ctx_sysv_factory_init(smx_context_factory_t *factory);
-int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory);
-
-smx_context_t
-smx_ctx_sysv_create_context_sized(size_t structure_size,
-                                  xbt_main_func_t code, int argc,
-                                  char **argv,
-                                  void_pfn_smxprocess_t cleanup_func,
-                                  void *data);
-void smx_ctx_sysv_free(smx_context_t context);
-void smx_ctx_sysv_stop(smx_context_t context);
-void smx_ctx_sysv_suspend(smx_context_t context);
-void smx_ctx_sysv_resume(smx_context_t new_context);
-void smx_ctx_sysv_runall(xbt_dynar_t processes);
-void smx_ctx_sysv_resume_parallel(smx_process_t new_context);
-void smx_ctx_sysv_runall_parallel(xbt_dynar_t processes);
-int smx_ctx_sysv_get_thread_id(void);
-smx_context_t smx_ctx_sysv_self_parallel(void);
-
-SG_END_DECL()
-
-#endif                          /* !_XBT_CONTEXT_SYSV_PRIVATE_H */
index a602a22..c20fc0a 100644 (file)
@@ -34,9 +34,8 @@ smx_ctx_thread_factory_create_context(xbt_main_func_t code, int argc,
 static void smx_ctx_thread_free(smx_context_t context);
 static void smx_ctx_thread_stop(smx_context_t context);
 static void smx_ctx_thread_suspend(smx_context_t context);
-static void smx_ctx_thread_resume(smx_context_t new_context);
-static void smx_ctx_thread_runall_serial(xbt_dynar_t processes);
-static void smx_ctx_thread_runall_parallel(xbt_dynar_t processes);
+static void smx_ctx_thread_runall_serial(void);
+static void smx_ctx_thread_runall_parallel(void);
 static smx_context_t smx_ctx_thread_self(void);
 
 static int smx_ctx_thread_factory_finalize(smx_context_factory_t *factory);
@@ -171,26 +170,26 @@ static void smx_ctx_thread_suspend(smx_context_t context)
     xbt_os_sem_acquire(smx_ctx_thread_sem);
 }
 
-static void smx_ctx_thread_runall_serial(xbt_dynar_t processes)
+static void smx_ctx_thread_runall_serial(void)
 {
   smx_process_t process;
   unsigned int cursor;
 
-  xbt_dynar_foreach(processes, cursor, process) {
+  xbt_dynar_foreach(simix_global->process_to_run, cursor, process) {
     xbt_os_sem_release(((smx_ctx_thread_t) process->context)->begin);
     xbt_os_sem_acquire(((smx_ctx_thread_t) process->context)->end);
   }
 }
 
-static void smx_ctx_thread_runall_parallel(xbt_dynar_t processes)
+static void smx_ctx_thread_runall_parallel(void)
 {
   unsigned int index;
   smx_process_t process;
 
-  xbt_dynar_foreach(processes, index, process)
+  xbt_dynar_foreach(simix_global->process_to_run, index, process)
     xbt_os_sem_release(((smx_ctx_thread_t) process->context)->begin);
 
-  xbt_dynar_foreach(processes, index, process) {
+  xbt_dynar_foreach(simix_global->process_to_run, index, process) {
      xbt_os_sem_acquire(((smx_ctx_thread_t) process->context)->end);
   }
 }
index 4a21d8c..2476a4b 100644 (file)
@@ -8,7 +8,7 @@
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
-#include "surf/surfxml_parse_private.h"
+#include "surf/surfxml_parse.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix,
                                 "Logging specific to SIMIX (deployment)");
@@ -33,8 +33,8 @@ static void parse_process_init(void)
   parse_argc++;
   parse_argv = xbt_realloc(parse_argv, (parse_argc) * sizeof(char *));
   parse_argv[(parse_argc) - 1] = xbt_strdup(A_surfxml_process_function);
-  surf_parse_get_double(&start_time, A_surfxml_process_start_time);
-  surf_parse_get_double(&kill_time, A_surfxml_process_kill_time);
+  start_time= surf_parse_get_double(A_surfxml_process_start_time);
+  kill_time = surf_parse_get_double(A_surfxml_process_kill_time);
 }
 
 static void parse_argument(void)
@@ -66,12 +66,12 @@ static void parse_process_finalize(void)
     XBT_DEBUG("Starting Process %s(%s) right now", parse_argv[0], parse_host);
 
     if (simix_global->create_process_function)
-      (*simix_global->create_process_function) (&process,
-                                                parse_argv[0],
-                                                parse_code, NULL,
-                                                parse_host, parse_argc,
-                                                parse_argv,
-                                                current_property_set);
+      simix_global->create_process_function(&process,
+                                            parse_argv[0],
+                                            parse_code, NULL,
+                                            parse_host, parse_argc,
+                                            parse_argv,
+                                            current_property_set);
     else
       SIMIX_req_process_create(&process, parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,
                                current_property_set);
@@ -104,16 +104,15 @@ static void parse_process_finalize(void)
  */
 void SIMIX_launch_application(const char *file)
 {
-  int parse_status;
+  _XBT_GNUC_UNUSED int parse_status;
   xbt_assert(simix_global,
               "SIMIX_global_init has to be called before SIMIX_launch_application.");
 
-  // Reset callbacks
   surf_parse_reset_callbacks();
 
   surfxml_add_callback(STag_surfxml_process_cb_list, parse_process_init);
   surfxml_add_callback(ETag_surfxml_argument_cb_list, parse_argument);
-  surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties_XML);
+  surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties);
   surfxml_add_callback(ETag_surfxml_process_cb_list,
                        parse_process_finalize);
 
index c342abc..4b64816 100644 (file)
@@ -39,18 +39,8 @@ void SIMIX_create_environment(const char *file)
 
   double start, end;
 
-  platform_filename = xbt_strdup(file);
-
-  // Reset callbacks
-  surf_parse_reset_callbacks();
-  // Add config callbacks
-  surf_parse_add_callback_config();
-
-  parse_platform_file(file);
-  surf_config_models_create_elms();
-
   start = xbt_os_time();
-  /* FIXME: what time are we measuring ??? */
+  parse_platform_file(file);
   end = xbt_os_time();
   XBT_DEBUG("PARSE TIME: %lg", (end - start));
 
index 7867902..597a36b 100644 (file)
@@ -43,7 +43,7 @@ static void _XBT_CALL inthandler(int ignored)
      SIMIX_display_process_status();
   }
   else {
-     XBT_INFO("CTRL-C pressed. bailing out without displaying because verbose-exit disabled");
+     XBT_INFO("CTRL-C pressed. bailing out without displaying because verbose-exit is disabled");
   }
   exit(1);
 }
@@ -86,7 +86,7 @@ void SIMIX_global_init(int *argc, char **argv)
         xbt_swag_new(xbt_swag_offset(proc, destroy_hookup));
 
     simix_global->maestro_process = NULL;
-    simix_global->registered_functions = xbt_dict_new();
+    simix_global->registered_functions = xbt_dict_new_homogeneous(NULL);
 
     simix_global->create_process_function = SIMIX_process_create;
     simix_global->kill_process_function = SIMIX_process_kill;
@@ -135,6 +135,7 @@ void SIMIX_clean(void)
   SIMIX_network_exit();
 
   xbt_heap_free(simix_timers);
+  simix_timers = NULL;
   /* Free the remaining data structures */
   xbt_dynar_free(&simix_global->process_to_run);
   xbt_dynar_free(&simix_global->process_that_ran);
@@ -197,7 +198,7 @@ void SIMIX_run(void)
 #ifdef TIME_BENCH
     smx_ctx_raw_new_sr();
 #endif
-    while (xbt_dynar_length(simix_global->process_to_run)) {
+    while (!xbt_dynar_is_empty(simix_global->process_to_run)) {
       XBT_DEBUG("New Sub-Schedule Round; size(queue)=%lu",
               xbt_dynar_length(simix_global->process_to_run));
       SIMIX_process_runall();
@@ -209,7 +210,9 @@ void SIMIX_run(void)
       }
     }
 
-    time = surf_solve(SIMIX_timer_next());
+    time = SIMIX_timer_next();
+    if (time != -1.0 || xbt_swag_size(simix_global->process_list) != 0)
+      time = surf_solve(time);
 
     /* Notify all the hosts that have failed */
     /* FIXME: iterate through the list of failed host and mark each of them */
@@ -238,7 +241,7 @@ void SIMIX_run(void)
     /* Clean processes to destroy */
     SIMIX_process_empty_trash();
 
-  } while (time != -1.0);
+  } while (time != -1.0 || !xbt_dynar_is_empty(simix_global->process_to_run));
 
   if (xbt_swag_size(simix_global->process_list) != 0) {
 
@@ -326,7 +329,7 @@ void SIMIX_display_process_status(void)
   XBT_INFO("%d processes are still running, waiting for something.", nbprocess);
   /*  List the process and their state */
   XBT_INFO
-    ("Legend of the following listing: \"<process> on <host>: <status>.\"");
+    ("Legend of the following listing: \"<process>(<pid>) on <host>: <status>.\"");
   xbt_swag_foreach(process, simix_global->process_list) {
 
     if (process->waiting_action) {
@@ -358,7 +361,13 @@ void SIMIX_display_process_status(void)
          action_description = "I/O";
          break;
       }
-      XBT_INFO("Waiting for %s action %p to finish", action_description, process->waiting_action);
+      XBT_INFO("Process %ld (%s@%s): waiting for %s action %p (%s) in state %d to finish",
+          process->pid, process->name, process->smx_host->name,
+         action_description, process->waiting_action,
+         process->waiting_action->name, process->waiting_action->state);
+    }
+    else {
+      XBT_INFO("Process %ld (%s@%s)", process->pid, process->name, process->smx_host->name);
     }
   }
 }
index 29589b1..db4429b 100644 (file)
@@ -84,14 +84,14 @@ void SIMIX_host_destroy(void *h)
  */
 xbt_dict_t SIMIX_host_get_dict(void)
 {
-  xbt_dict_t host_dict = xbt_dict_new();
+  xbt_dict_t host_dict = xbt_dict_new_homogeneous(NULL);
   xbt_lib_cursor_t cursor = NULL;
   char *name = NULL;
   void **host = NULL;
 
   xbt_lib_foreach(host_lib, cursor, name, host){
          if(host[SIMIX_HOST_LEVEL])
-                 xbt_dict_set(host_dict,name,host[SIMIX_HOST_LEVEL],NULL);
+            xbt_dict_set(host_dict,name,host[SIMIX_HOST_LEVEL], NULL);
   }
   return host_dict;
 }
@@ -331,7 +331,7 @@ void SIMIX_host_execution_resume(smx_action_t action)
 
 void SIMIX_execution_finish(smx_action_t action)
 {
-  xbt_fifo_item_t item;
+  volatile xbt_fifo_item_t item;
   smx_req_t req;
 
   xbt_fifo_foreach(action->request_list, item, req, smx_req_t) {
@@ -339,13 +339,13 @@ void SIMIX_execution_finish(smx_action_t action)
     switch (action->state) {
 
       case SIMIX_DONE:
-        /* do nothing, action done*/
+        /* do nothing, action done */
        XBT_DEBUG("SIMIX_execution_finished: execution successful");
         break;
 
       case SIMIX_FAILED:
+        XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", req->issuer->smx_host->name);
         TRY {
-         XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", req->issuer->smx_host->name);
           THROWF(host_error, 0, "Host failed");
         }
        CATCH(req->issuer->running_ctx->exception) {
@@ -354,8 +354,8 @@ void SIMIX_execution_finish(smx_action_t action)
       break;
 
       case SIMIX_CANCELED:
+        XBT_DEBUG("SIMIX_execution_finished: execution canceled");
         TRY {
-         XBT_DEBUG("SIMIX_execution_finished: execution canceled");
           THROWF(cancel_error, 0, "Canceled");
         }
        CATCH(req->issuer->running_ctx->exception) {
@@ -364,7 +364,8 @@ void SIMIX_execution_finish(smx_action_t action)
        break;
 
       default:
-        THROW_IMPOSSIBLE;
+        xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
+            action->state);
     }
     req->issuer->waiting_action = NULL;
     req->host_execution_wait.result = action->state;
@@ -380,7 +381,7 @@ void SIMIX_post_host_execute(smx_action_t action)
   /* FIXME: check if the host running the action failed or not*/
   /*if(surf_workstation_model->extension.workstation.get_state(action->host->host))*/
 
-  /* If the host running the action didn't fail, then the action was cancelled */
+  /* If the host running the action didn't fail, then the action was canceled */
   if (surf_workstation_model->action_state_get(action->execution.surf_exec) == SURF_ACTION_FAILED)
      action->state = SIMIX_CANCELED;
   else
index 49222ba..7d629df 100644 (file)
@@ -26,7 +26,7 @@ static void SIMIX_rdv_free(void *data);
 
 void SIMIX_network_init(void)
 {
-  rdv_points = xbt_dict_new();
+  rdv_points = xbt_dict_new_homogeneous(SIMIX_rdv_free);
 }
 
 void SIMIX_network_exit(void)
@@ -49,7 +49,7 @@ smx_rdv_t SIMIX_rdv_create(const char *name)
     rdv->comm_fifo = xbt_fifo_new();
 
     if (rdv->name)
-      xbt_dict_set(rdv_points, rdv->name, rdv, SIMIX_rdv_free);
+      xbt_dict_set(rdv_points, rdv->name, rdv, NULL);
   }
   return rdv;
 }
@@ -63,8 +63,7 @@ void SIMIX_rdv_destroy(smx_rdv_t rdv)
 void SIMIX_rdv_free(void *data)
 {
   smx_rdv_t rdv = (smx_rdv_t) data;
-  if (rdv->name)
-    xbt_free(rdv->name);
+  xbt_free(rdv->name);
   xbt_fifo_free(rdv->comm_fifo);
   xbt_free(rdv);  
 }
@@ -135,7 +134,7 @@ smx_action_t SIMIX_rdv_get_request(smx_rdv_t rdv, e_smx_comm_type_t type,
   xbt_fifo_item_t item;
   void* req_data = NULL;
 
-  xbt_fifo_foreach(rdv->comm_fifo, item, action, smx_action_t){
+  xbt_fifo_foreach(rdv->comm_fifo, item, action, smx_action_t) {
     if (action->comm.type == SIMIX_COMM_SEND) {
       req_data = action->comm.src_data;
     } else if (action->comm.type == SIMIX_COMM_RECEIVE) {
@@ -188,7 +187,7 @@ int SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), voi
   smx_action_t action;
   xbt_fifo_item_t item;
 
-  xbt_fifo_foreach(rdv->comm_fifo, item, action, smx_action_t){
+  xbt_fifo_foreach(rdv->comm_fifo, item, action, smx_action_t) {
     if (action->comm.type == SIMIX_COMM_RECEIVE
         && (!match_fun || match_fun(data, action->comm.dst_data))) {
       XBT_DEBUG("Found a matching communication action %p", action);
@@ -214,6 +213,7 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
 
   /* alloc structures */
   act = xbt_mallocator_get(simix_global->action_mallocator);
+
   act->type = SIMIX_ACTION_COMMUNICATE;
   act->state = SIMIX_WAITING;
 
@@ -242,13 +242,13 @@ smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
  */
 void SIMIX_comm_destroy(smx_action_t action)
 {
-  XBT_DEBUG("Destroy action %p (refcount:%d)", action, action->comm.refcount);
+  XBT_DEBUG("Destroy action %p (refcount: %d), state: %d",
+      action, action->comm.refcount, action->state);
 
   if (action->comm.refcount <= 0) {
        xbt_backtrace_display_current();
     xbt_die("the refcount of comm %p is already 0 before decreasing it. "
             "That's a bug!", action);
-
   }
   action->comm.refcount--;
   if (action->comm.refcount > 0)
@@ -312,9 +312,10 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
     action->state = SIMIX_READY;
     action->comm.type = SIMIX_COMM_READY;
   }
+  xbt_fifo_push(src_proc->comms, action);
 
-  /* If the communication action is detached then decrease the refcount
-   * by one, so it will be eliminated by the receivers destroy call */
+  /* if the communication action is detached then decrease the refcount
+   * by one, so it will be eliminated by the receiver's destroy call */
   if (detached) {
     action->comm.detached = 1;
     action->comm.refcount--;
@@ -355,6 +356,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
     action->state = SIMIX_READY;
     action->comm.type = SIMIX_COMM_READY;
   }
+  xbt_fifo_push(dst_proc->comms, action);
 
   /* Setup communication request */
   action->comm.dst_proc = dst_proc;
@@ -515,6 +517,7 @@ XBT_INLINE void SIMIX_comm_start(smx_action_t action)
 {
   /* If both the sender and the receiver are already there, start the communication */
   if (action->state == SIMIX_READY) {
+
     smx_host_t sender = action->comm.src_proc->smx_host;
     smx_host_t receiver = action->comm.dst_proc->smx_host;
 
@@ -546,9 +549,13 @@ XBT_INLINE void SIMIX_comm_start(smx_action_t action)
   }
 }
 
+/**
+ * \brief Answers the SIMIX requests associated to a communication action.
+ * \param action a finished communication action
+ */
 void SIMIX_comm_finish(smx_action_t action)
 {
-  unsigned int destroy_count = 0;
+  volatile unsigned int destroy_count = 0;
   smx_req_t req;
 
   while ((req = xbt_fifo_shift(action->request_list))) {
@@ -622,7 +629,9 @@ void SIMIX_comm_finish(smx_action_t action)
       case SIMIX_LINK_FAILURE:
         TRY {
          XBT_DEBUG("Link failure in action %p between '%s' and '%s': posting an exception to the issuer: %s (%p)",
-             action, action->comm.src_proc->smx_host->name, action->comm.dst_proc->smx_host->name,
+             action,
+             action->comm.src_proc ? action->comm.src_proc->smx_host->name : NULL,
+             action->comm.dst_proc ? action->comm.dst_proc->smx_host->name : NULL,
              req->issuer->name, req->issuer);
           THROWF(network_error, 0, "Link failure");
         }
@@ -631,8 +640,22 @@ void SIMIX_comm_finish(smx_action_t action)
         }
         break;
 
+      case SIMIX_CANCELED:
+        TRY {
+          if (req->issuer == action->comm.dst_proc) {
+            THROWF(cancel_error, 0, "Communication canceled by the sender");
+          }
+          else {
+            THROWF(cancel_error, 0, "Communication canceled by the receiver");
+          }
+        }
+        CATCH(req->issuer->running_ctx->exception) {
+          req->issuer->doexception = 1;
+        }
+        break;
+
       default:
-        THROW_IMPOSSIBLE;
+        xbt_die("Unexpected action state in SIMIX_comm_finish: %d", action->state);
     }
 
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
@@ -646,6 +669,7 @@ void SIMIX_comm_finish(smx_action_t action)
     }
 
     req->issuer->waiting_action = NULL;
+    xbt_fifo_remove(req->issuer->comms, action);
     SIMIX_request_answer(req);
     destroy_count++;
   }
@@ -654,6 +678,10 @@ void SIMIX_comm_finish(smx_action_t action)
     SIMIX_comm_destroy(action);
 }
 
+/**
+ * \brief This function is called when a Surf communication action is finished.
+ * \param action the corresponding Simix communication
+ */
 void SIMIX_post_comm(smx_action_t action)
 {
   /* Update action state */
@@ -675,28 +703,39 @@ void SIMIX_post_comm(smx_action_t action)
   else
     action->state = SIMIX_DONE;
 
-  XBT_DEBUG("SIMIX_post_comm: action state = %d", action->state);
+  XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d",
+      action, action->state, action->comm.src_proc, action->comm.dst_proc, action->comm.detached);
 
-  /* After this point the surf actions associated with the simix communicate
-     action are no longer needed, thus we delete them. */
+  /* destroy the surf actions associated with the Simix communication */
   SIMIX_comm_destroy_internal_actions(action);
 
-  /* If there are requests associated with the action, then answer them */
-  if (xbt_fifo_size(action->request_list))
+  /* remove the communication action from the list of pending communications
+   * of both processes (if they still exist) */
+  if (action->comm.src_proc) {
+    xbt_fifo_remove(action->comm.src_proc->comms, action);
+  }
+  if (action->comm.dst_proc) {
+    xbt_fifo_remove(action->comm.dst_proc->comms, action);
+  }
+
+  /* if there are requests associated with the action, then answer them */
+  if (xbt_fifo_size(action->request_list)) {
     SIMIX_comm_finish(action);
+  }
 }
 
 void SIMIX_comm_cancel(smx_action_t action)
 {
-  /* If the action is a waiting state means that it is still in a rdv */
+  /* if the action is a waiting state means that it is still in a rdv */
   /* so remove from it and delete it */
   if (action->state == SIMIX_WAITING) {
     SIMIX_rdv_remove(action->comm.rdv, action);
-    action->state = SIMIX_FAILED;
-  } else {
-    /* When running the MC there are no surf actions */
-    if(!MC_IS_ENABLED)
-      surf_workstation_model->action_cancel(action->comm.surf_comm);
+    action->state = SIMIX_CANCELED;
+  }
+  else if (!MC_IS_ENABLED /* when running the MC there are no surf actions */
+      && (action->state == SIMIX_READY || action->state == SIMIX_RUNNING)) {
+
+    surf_workstation_model->action_cancel(action->comm.surf_comm);
   }
 }
 
@@ -854,8 +893,15 @@ void SIMIX_comm_copy_data(smx_action_t comm)
   if (comm->comm.dst_buff_size)
     *comm->comm.dst_buff_size = buff_size;
 
+<<<<<<< HEAD
   if (buff_size > 0)
     (*SIMIX_comm_copy_data_callback) (comm, buff_size);
+=======
+  if (buff_size == 0)
+    return;
+
+  SIMIX_comm_copy_data_callback(comm, buff_size);
+>>>>>>> master
 
   /* Set the copied flag so we copy data only once */
   /* (this function might be called from both communication ends) */
index bf5707b..dcdadd2 100644 (file)
@@ -8,7 +8,6 @@
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
-#include "msg/mailbox.h"
 #include "mc/mc.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix,
@@ -35,7 +34,51 @@ XBT_INLINE smx_process_t SIMIX_process_self(void)
  */
 void SIMIX_process_cleanup(smx_process_t process)
 {
-  XBT_DEBUG("Cleanup process %s", process->name);
+  XBT_DEBUG("Cleanup process %s (%p), waiting action %p",
+      process->name, process, process->waiting_action);
+
+  /* cancel non-blocking communications */
+  smx_action_t action;
+  while ((action = xbt_fifo_pop(process->comms))) {
+
+    /* make sure no one will finish the comm after this process is destroyed */
+    SIMIX_comm_cancel(action);
+
+    if (action->comm.src_proc == process) {
+      XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p",
+          action, action->comm.detached, action->state, action->comm.src_proc, action->comm.dst_proc);
+      action->comm.src_proc = NULL;
+
+      if (action->comm.detached) {
+         if (action->comm.refcount == 0) {
+           /* I'm not supposed to destroy a detached comm from the sender side,
+            * unless there is no receiver matching the rdv */
+           action->comm.refcount++;
+           SIMIX_comm_destroy(action);
+         }
+      }
+      else {
+        SIMIX_comm_destroy(action);
+      }
+    }
+    else if (action->comm.dst_proc == process){
+      XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
+          action, action->state, action->comm.src_proc, action->comm.dst_proc);
+      action->comm.dst_proc = NULL;
+
+      if (action->comm.detached && action->comm.refcount == 1
+          && action->comm.src_proc != NULL) {
+        /* the comm will be freed right now, remove it from the sender */
+        xbt_fifo_remove(action->comm.src_proc->comms, action);
+      }
+      SIMIX_comm_destroy(action);
+    }
+    else {
+      xbt_die("Communication action %p is in my list but I'm not the sender "
+          "or the receiver", action);
+    }
+  }
+
   /*xbt_swag_remove(process, simix_global->process_to_run);*/
   xbt_swag_remove(process, simix_global->process_list);
   xbt_swag_remove(process, process->smx_host->process_list);
@@ -56,13 +99,12 @@ void SIMIX_process_empty_trash(void)
     SIMIX_context_free(process->context);
 
     /* Free the exception allocated at creation time */
-    if (process->running_ctx)
-      free(process->running_ctx);
-    if (process->properties)
-      xbt_dict_free(&process->properties);
+    free(process->running_ctx);
+    xbt_dict_free(&process->properties);
+
+    xbt_fifo_free(process->comms);
 
     free(process->name);
-    process->name = NULL;
     free(process);
   }
 }
@@ -143,6 +185,8 @@ void SIMIX_process_create(smx_process_t *process,
     (*process)->name = xbt_strdup(name);
     (*process)->smx_host = host;
     (*process)->data = data;
+    (*process)->comms = xbt_fifo_new();
+    (*process)->request.issuer = *process;
 
     XBT_VERB("Create context %s", (*process)->name);
     (*process)->context = SIMIX_context_new(code, argc, argv,
@@ -177,7 +221,8 @@ void SIMIX_process_create(smx_process_t *process,
  */
 void SIMIX_process_runall(void)
 {
-  SIMIX_context_runall(simix_global->process_to_run);
+  SIMIX_context_runall();
+
   xbt_dynar_t tmp = simix_global->process_that_ran;
   simix_global->process_that_ran = simix_global->process_to_run;
   simix_global->process_to_run = tmp;
@@ -201,6 +246,7 @@ void SIMIX_process_kill(smx_process_t process) {
   process->suspended = 0;
   /* FIXME: set doexception to 0 also? */
 
+  /* destroy the blocking action if any */
   if (process->waiting_action) {
 
     switch (process->waiting_action->type) {
@@ -278,10 +324,17 @@ void SIMIX_pre_process_suspend(smx_req_t req)
 
 void SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
 {
+  xbt_assert((process != NULL), "Invalid parameters");
+
+  if (process->suspended) {
+    XBT_DEBUG("Process '%s' is already suspended", process->name);
+    return;
+  }
+
   process->suspended = 1;
 
   /* If we are suspending another process, and it is waiting on an action,
-     suspend it's action. */
+     suspend its action. */
   if (process != issuer) {
 
     if (process->waiting_action) {
@@ -302,7 +355,8 @@ void SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
           break;
 
         default:
-          THROW_IMPOSSIBLE;
+          xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
+              process->waiting_action->type);
       }
     }
   }
@@ -312,6 +366,11 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
 {
   xbt_assert((process != NULL), "Invalid parameters");
 
+  if (!process->suspended) {
+    XBT_DEBUG("Process '%s' is not suspended", process->name);
+    return;
+  }
+
   process->suspended = 0;
 
   /* If we are resuming another process, resume the action it was waiting for
@@ -336,7 +395,8 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
           break;
 
         default:
-          THROW_IMPOSSIBLE;
+          xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
+              process->waiting_action->type);
       }
     }
     else {
@@ -354,18 +414,21 @@ int SIMIX_process_count(void)
   return xbt_swag_size(simix_global->process_list);
 }
 
-void* SIMIX_process_self_get_data(void)
+void* SIMIX_process_self_get_data(smx_process_t self)
 {
-  smx_process_t me = SIMIX_process_self();
-  if (!me) {
+  xbt_assert(self == SIMIX_process_self(), "This is not the current process");
+
+  if (!self) {
     return NULL;
   }
-  return SIMIX_process_get_data(me);
+  return SIMIX_process_get_data(self);
 }
 
-void SIMIX_process_self_set_data(void *data)
+void SIMIX_process_self_set_data(smx_process_t self, void *data)
 {
-  SIMIX_process_set_data(SIMIX_process_self(), data);
+  xbt_assert(self == SIMIX_process_self(), "This is not the current process");
+
+  SIMIX_process_set_data(self, data);
 }
 
 void* SIMIX_process_get_data(smx_process_t process)
@@ -509,20 +572,22 @@ void SIMIX_process_sleep_resume(smx_action_t action)
 }
 
 /** 
- * Calling this function makes the process to yield.
- * Only the processes can call this function, giving back the control to maestro
+ * \brief Calling this function makes the process to yield.
+ *
+ * Only the current process can call this function, giving back the control to
+ * maestro.
+ *
+ * \param self the current process
  */
-void SIMIX_process_yield(void)
+void SIMIX_process_yield(smx_process_t self)
 {
-  smx_process_t self = SIMIX_process_self();
-
   XBT_DEBUG("Yield process '%s'", self->name);
 
   /* Go into sleep and return control to maestro */
   SIMIX_context_suspend(self->context);
 
   /* Ok, maestro returned control to us */
-  XBT_DEBUG("Maestro returned control to me: '%s'", self->name);
+  XBT_DEBUG("Control returned to me: '%s'", self->name);
 
   if (self->context->iwannadie){
     XBT_DEBUG("I wanna die!");
@@ -561,3 +626,11 @@ smx_context_t SIMIX_process_get_context(smx_process_t p) {
 void SIMIX_process_set_context(smx_process_t p,smx_context_t c) {
   p->context = c;
 }
+
+/**
+ * \brief Returns the list of processes to run.
+ */
+XBT_INLINE xbt_dynar_t SIMIX_process_get_runnable(void)
+{
+  return simix_global->process_to_run;
+}
index 6a65331..c307cda 100644 (file)
@@ -5,31 +5,33 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_smurf, simix,
                                 "Logging specific to SIMIX (SMURF)");
 
-/* FIXME: we may want to save the initialization of issuer... */
 XBT_INLINE smx_req_t SIMIX_req_mine()
 {
   smx_process_t issuer = SIMIX_process_self();
   return &issuer->request;
 }
 
-void SIMIX_request_push()
+/**
+ * \brief Makes the current process do a request to the kernel and yields
+ * until completion.
+ * \param self the current process
+ */
+void SIMIX_request_push(smx_process_t self)
 {
-  smx_process_t issuer = SIMIX_process_self();
-
-  if (issuer != simix_global->maestro_process){
-    issuer->request.issuer = issuer;
-    XBT_DEBUG("Yield process '%s' on request of type %s (%d)", issuer->name,
-        SIMIX_request_name(issuer->request.call), issuer->request.call);
-    SIMIX_process_yield();
+  if (self != simix_global->maestro_process) {
+    XBT_DEBUG("Yield process '%s' on request of type %s (%d)", self->name,
+        SIMIX_request_name(self->request.call), self->request.call);
+    SIMIX_process_yield(self);
   } else {
-    SIMIX_request_pre(&issuer->request, 0);
+    SIMIX_request_pre(&self->request, 0);
   }
 }
 
 void SIMIX_request_answer(smx_req_t req)
 {
   if (req->issuer != simix_global->maestro_process){
-    XBT_DEBUG("Answer request %s (%d)", SIMIX_request_name(req->call), req->call);
+    XBT_DEBUG("Answer request %s (%d) issued by %s (%p)", SIMIX_request_name(req->call), req->call,
+        req->issuer->name, req->issuer);
     req->issuer->request.call = REQ_NO_REQ;
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, req->issuer);
   }
index ca8f8dc..f5ccd07 100644 (file)
@@ -17,7 +17,6 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
                              smx_process_t issuer, smx_req_t req);
 static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
                             smx_req_t req);
-static void SIMIX_sem_block_onto(smx_sem_t sem);
 
 /***************************** Synchro action *********************************/
 
index 243adf3..e8b691f 100644 (file)
@@ -40,7 +40,7 @@ smx_host_t SIMIX_req_host_get_by_name(const char *name)
 
   req->call = REQ_HOST_GET_BY_NAME;
   req->host_get_by_name.name = name;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_by_name.result;
 }
 
@@ -56,7 +56,7 @@ const char* SIMIX_req_host_get_name(smx_host_t host)
 
   req->call = REQ_HOST_GET_NAME;
   req->host_get_name.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_name.result;
 }
 
@@ -72,7 +72,7 @@ xbt_dict_t SIMIX_req_host_get_properties(smx_host_t host)
 
   req->call = REQ_HOST_GET_PROPERTIES;
   req->host_get_properties.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_properties.result;
 }
 
@@ -89,7 +89,7 @@ double SIMIX_req_host_get_speed(smx_host_t host)
 
   req->call = REQ_HOST_GET_SPEED;
   req->host_get_speed.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_speed.result;
 }
 
@@ -104,7 +104,7 @@ double SIMIX_req_host_get_available_speed(smx_host_t host)
 
   req->call = REQ_HOST_GET_AVAILABLE_SPEED;
   req->host_get_available_speed.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_available_speed.result;
 }
 
@@ -121,7 +121,7 @@ int SIMIX_req_host_get_state(smx_host_t host)
 
   req->call = REQ_HOST_GET_STATE;
   req->host_get_state.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_state.result;
 }
 
@@ -137,7 +137,7 @@ void* SIMIX_req_host_get_data(smx_host_t host)
 
   req->call = REQ_HOST_GET_DATA;
   req->host_get_data.host = host;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_get_data.result;
 }
 
@@ -155,7 +155,7 @@ void SIMIX_req_host_set_data(smx_host_t host, void *data)
   req->call = REQ_HOST_SET_DATA;
   req->host_set_data.host = host;
   req->host_set_data.data = data;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /** \brief Creates an action that executes some computation of an host.
@@ -183,7 +183,7 @@ smx_action_t SIMIX_req_host_execute(const char *name, smx_host_t host,
   req->host_execute.host = host;
   req->host_execute.computation_amount = computation_amount;
   req->host_execute.priority = priority;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_execute.result;
 }
 
@@ -231,7 +231,7 @@ smx_action_t SIMIX_req_host_parallel_execute(const char *name,
   req->host_parallel_execute.communication_amount = communication_amount;
   req->host_parallel_execute.amount = amount;
   req->host_parallel_execute.rate = rate;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_parallel_execute.result;
 }
 
@@ -247,7 +247,7 @@ void SIMIX_req_host_execution_destroy(smx_action_t execution)
 
   req->call = REQ_HOST_EXECUTION_DESTROY;
   req->host_execution_destroy.execution = execution;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -262,7 +262,7 @@ void SIMIX_req_host_execution_cancel(smx_action_t execution)
 
   req->call = REQ_HOST_EXECUTION_CANCEL;
   req->host_execution_cancel.execution = execution;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -277,7 +277,7 @@ double SIMIX_req_host_execution_get_remains(smx_action_t execution)
 
   req->call = REQ_HOST_EXECUTION_GET_REMAINS;
   req->host_execution_get_remains.execution = execution;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_execution_get_remains.result;
 }
 
@@ -293,7 +293,7 @@ e_smx_state_t SIMIX_req_host_execution_get_state(smx_action_t execution)
 
   req->call = REQ_HOST_EXECUTION_GET_STATE;
   req->host_execution_get_state.execution = execution;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_execution_get_state.result;
 }
 
@@ -314,7 +314,7 @@ void SIMIX_req_host_execution_set_priority(smx_action_t execution, double priori
   req->call = REQ_HOST_EXECUTION_SET_PRIORITY;
   req->host_execution_set_priority.execution = execution;
   req->host_execution_set_priority.priority = priority;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -328,7 +328,7 @@ e_smx_state_t SIMIX_req_host_execution_wait(smx_action_t execution)
 
   req->call = REQ_HOST_EXECUTION_WAIT;
   req->host_execution_wait.execution = execution;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->host_execution_wait.result;
 }
 
@@ -365,7 +365,7 @@ void SIMIX_req_process_create(smx_process_t *process, const char *name,
   req->process_create.argc = argc;
   req->process_create.argv = argv;
   req->process_create.properties = properties;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /** \brief Kills a SIMIX process.
@@ -380,7 +380,7 @@ void SIMIX_req_process_kill(smx_process_t process)
 
   req->call = REQ_PROCESS_KILL;
   req->process_kill.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /** \brief Kills all SIMIX processes.
@@ -390,7 +390,7 @@ void SIMIX_req_process_killall(void)
   smx_req_t req = SIMIX_req_mine();
 
   req->call = REQ_PROCESS_KILLALL;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /** \brief Cleans up a SIMIX process.
@@ -402,7 +402,7 @@ void SIMIX_req_process_cleanup(smx_process_t process)
 
   req->call = REQ_PROCESS_CLEANUP;
   req->process_cleanup.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -421,7 +421,7 @@ void SIMIX_req_process_change_host(smx_process_t process, smx_host_t dest)
   req->call = REQ_PROCESS_CHANGE_HOST;
   req->process_change_host.process = process;
   req->process_change_host.dest = dest;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -440,7 +440,7 @@ void SIMIX_req_process_suspend(smx_process_t process)
 
   req->call = REQ_PROCESS_SUSPEND;
   req->process_suspend.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -457,7 +457,7 @@ void SIMIX_req_process_resume(smx_process_t process)
 
   req->call = REQ_PROCESS_RESUME;
   req->process_resume.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 /**
@@ -470,29 +470,27 @@ int SIMIX_req_process_count(void)
   smx_req_t req = SIMIX_req_mine();
 
   req->call = REQ_PROCESS_COUNT;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_count.result;
 }
 
 /**
  * \brief Return the user data of a #smx_process_t.
- *
- * This functions checks whether \a process is a valid pointer or not and return the user data associated to \a process if it is possible.
- * \param process SIMIX process
- * \return A void pointer to the user data
+ * \param process a SIMIX process
+ * \return the user data of this process
  */
 void* SIMIX_req_process_get_data(smx_process_t process)
 {
   if (process == SIMIX_process_self()) {
     /* avoid a request if this function is called by the process itself */
-    return SIMIX_process_self_get_data();
+    return SIMIX_process_get_data(process);
   }
 
   smx_req_t req = SIMIX_req_mine();
 
   req->call = REQ_PROCESS_GET_DATA;
   req->process_get_data.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_get_data.result;
 }
 
@@ -507,7 +505,7 @@ void SIMIX_req_process_set_data(smx_process_t process, void *data)
 {
   if (process == SIMIX_process_self()) {
     /* avoid a request if this function is called by the process itself */
-    SIMIX_process_self_set_data(data);
+    SIMIX_process_self_set_data(process, data);
   }
   else {
 
@@ -516,7 +514,7 @@ void SIMIX_req_process_set_data(smx_process_t process, void *data)
     req->call = REQ_PROCESS_SET_DATA;
     req->process_set_data.process = process;
     req->process_set_data.data = data;
-    SIMIX_request_push();
+    SIMIX_request_push(req->issuer);
   }
 }
 
@@ -533,7 +531,7 @@ smx_host_t SIMIX_req_process_get_host(smx_process_t process)
 
   req->call = REQ_PROCESS_GET_HOST;
   req->process_get_host.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_get_host.result;
 }
 
@@ -555,7 +553,7 @@ const char* SIMIX_req_process_get_name(smx_process_t process)
 
   req->call = REQ_PROCESS_GET_NAME;
   req->process_get_name.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_get_name.result;
 }
 
@@ -572,7 +570,7 @@ int SIMIX_req_process_is_suspended(smx_process_t process)
 
   req->call = REQ_PROCESS_IS_SUSPENDED;
   req->process_is_suspended.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_is_suspended.result;
 }
 
@@ -587,7 +585,7 @@ xbt_dict_t SIMIX_req_process_get_properties(smx_process_t process)
 
   req->call = REQ_PROCESS_GET_PROPERTIES;
   req->process_get_properties.process = process;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_get_properties.result;
 }
 
@@ -609,7 +607,7 @@ e_smx_state_t SIMIX_req_process_sleep(double duration)
 
   req->call = REQ_PROCESS_SLEEP;
   req->process_sleep.duration = duration;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->process_sleep.result;
 }
 
@@ -625,7 +623,7 @@ smx_rdv_t SIMIX_req_rdv_create(const char *name)
   req->call = REQ_RDV_CREATE;
   req->rdv_create.name = name;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->rdv_create.result;
 }
 
@@ -641,7 +639,7 @@ void SIMIX_req_rdv_destroy(smx_rdv_t rdv)
   req->call = REQ_RDV_DESTROY;
   req->rdv_destroy.rdv = rdv;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 smx_rdv_t SIMIX_req_rdv_get_by_name(const char *name)
@@ -655,7 +653,7 @@ smx_rdv_t SIMIX_req_rdv_get_by_name(const char *name)
   smx_req_t req = SIMIX_req_mine();
   req->call = REQ_RDV_GEY_BY_NAME;
   req->rdv_get_by_name.name = name;
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->rdv_get_by_name.result;*/
 
   return SIMIX_rdv_get_by_name(name);
@@ -676,7 +674,7 @@ int SIMIX_req_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
   req->rdv_comm_count_by_host.rdv = rdv;
   req->rdv_comm_count_by_host.host = host;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->rdv_comm_count_by_host.result;
 }
 
@@ -692,7 +690,7 @@ smx_action_t SIMIX_req_rdv_get_head(smx_rdv_t rdv)
   req->call = REQ_RDV_GET_HEAD;
   req->rdv_get_head.rdv = rdv;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->rdv_get_head.result;
 }
 
@@ -727,7 +725,7 @@ void SIMIX_req_comm_send(smx_rdv_t rdv, double task_size, double rate,
     req->comm_send.data = data;
     req->comm_send.timeout = timeout;
 
-    SIMIX_request_push();
+    SIMIX_request_push(req->issuer);
   }
 }
 
@@ -754,7 +752,7 @@ smx_action_t SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size, double rate,
   req->comm_isend.data = data;
   req->comm_isend.detached = detached;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_isend.result;
 }
 
@@ -781,7 +779,7 @@ void SIMIX_req_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
     req->comm_recv.data = data;
     req->comm_recv.timeout = timeout;
 
-    SIMIX_request_push();
+    SIMIX_request_push(req->issuer);
   }
 }
 
@@ -799,7 +797,7 @@ smx_action_t SIMIX_req_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_bu
   req->comm_irecv.match_fun = match_fun;
   req->comm_irecv.data = data;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_irecv.result;
 }
 
@@ -807,8 +805,7 @@ void SIMIX_req_comm_destroy(smx_action_t comm)
 {
   xbt_assert(comm, "Invalid parameter");
 
-  /* FIXME remove this request type: comms are auto-destroyed now,
-   * but what happens with unfinished comms? */
+  /* FIXME remove this request type: comms are auto-destroyed now */
 
   /*
   smx_req_t req = SIMIX_req_mine();
@@ -816,7 +813,7 @@ void SIMIX_req_comm_destroy(smx_action_t comm)
   req->call = REQ_COMM_DESTROY;
   req->comm_destroy.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   */
 }
 
@@ -827,7 +824,7 @@ void SIMIX_req_comm_cancel(smx_action_t comm)
   req->call = REQ_COMM_CANCEL;
   req->comm_cancel.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 unsigned int SIMIX_req_comm_waitany(xbt_dynar_t comms)
@@ -837,20 +834,20 @@ unsigned int SIMIX_req_comm_waitany(xbt_dynar_t comms)
   req->call = REQ_COMM_WAITANY;
   req->comm_waitany.comms = comms;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_waitany.result;
 }
 
 int SIMIX_req_comm_testany(xbt_dynar_t comms)
 {
   smx_req_t req = SIMIX_req_mine();
-  if (xbt_dynar_length(comms)==0)
+  if (xbt_dynar_is_empty(comms))
     return -1;
 
   req->call = REQ_COMM_TESTANY;
   req->comm_testany.comms = comms;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_testany.result;
 }
 
@@ -864,7 +861,7 @@ void SIMIX_req_comm_wait(smx_action_t comm, double timeout)
   req->comm_wait.comm = comm;
   req->comm_wait.timeout = timeout;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 #ifdef HAVE_TRACING
@@ -887,7 +884,7 @@ void SIMIX_req_set_category(smx_action_t action, const char *category)
   req->set_category.action = action;
   req->set_category.category = category;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 #endif
 
@@ -898,7 +895,7 @@ int SIMIX_req_comm_test(smx_action_t comm)
   req->call = REQ_COMM_TEST;
   req->comm_test.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_test.result;
 }
 
@@ -909,7 +906,7 @@ double SIMIX_req_comm_get_remains(smx_action_t comm)
   req->call = REQ_COMM_GET_REMAINS;
   req->comm_get_remains.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_remains.result;
 }
 
@@ -920,7 +917,7 @@ e_smx_state_t SIMIX_req_comm_get_state(smx_action_t comm)
   req->call = REQ_COMM_GET_STATE;
   req->comm_get_state.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_state.result;
 }
 
@@ -931,7 +928,7 @@ void *SIMIX_req_comm_get_src_data(smx_action_t comm)
   req->call = REQ_COMM_GET_SRC_DATA;
   req->comm_get_src_data.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_src_data.result;
 }
 
@@ -942,7 +939,7 @@ void *SIMIX_req_comm_get_dst_data(smx_action_t comm)
   req->call = REQ_COMM_GET_DST_DATA;
   req->comm_get_dst_data.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_dst_data.result;
 }
 
@@ -953,7 +950,7 @@ smx_process_t SIMIX_req_comm_get_src_proc(smx_action_t comm)
   req->call = REQ_COMM_GET_SRC_PROC;
   req->comm_get_src_proc.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_src_proc.result;
 }
 
@@ -964,7 +961,7 @@ smx_process_t SIMIX_req_comm_get_dst_proc(smx_action_t comm)
   req->call = REQ_COMM_GET_DST_PROC;
   req->comm_get_dst_proc.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_get_dst_proc.result;
 }
 
@@ -976,7 +973,7 @@ int SIMIX_req_comm_is_latency_bounded(smx_action_t comm)
   req->call = REQ_COMM_IS_LATENCY_BOUNDED;
   req->comm_is_latency_bounded.comm = comm;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->comm_is_latency_bounded.result;
 }
 #endif
@@ -987,7 +984,7 @@ smx_mutex_t SIMIX_req_mutex_init(void)
 
   req->call = REQ_MUTEX_INIT;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->mutex_init.result;
 }
 
@@ -998,7 +995,7 @@ void SIMIX_req_mutex_destroy(smx_mutex_t mutex)
   req->call = REQ_MUTEX_DESTROY;
   req->mutex_destroy.mutex = mutex;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_mutex_lock(smx_mutex_t mutex)
@@ -1008,7 +1005,7 @@ void SIMIX_req_mutex_lock(smx_mutex_t mutex)
   req->call = REQ_MUTEX_LOCK;
   req->mutex_lock.mutex = mutex;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 int SIMIX_req_mutex_trylock(smx_mutex_t mutex)
@@ -1018,7 +1015,7 @@ int SIMIX_req_mutex_trylock(smx_mutex_t mutex)
   req->call = REQ_MUTEX_TRYLOCK;
   req->mutex_trylock.mutex = mutex;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->mutex_trylock.result;
 }
 
@@ -1029,7 +1026,7 @@ void SIMIX_req_mutex_unlock(smx_mutex_t mutex)
   req->call = REQ_MUTEX_UNLOCK;
   req->mutex_unlock.mutex = mutex;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 
@@ -1039,7 +1036,7 @@ smx_cond_t SIMIX_req_cond_init(void)
 
   req->call = REQ_COND_INIT;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->cond_init.result;
 }
 
@@ -1050,7 +1047,7 @@ void SIMIX_req_cond_destroy(smx_cond_t cond)
   req->call = REQ_COND_DESTROY;
   req->cond_destroy.cond = cond;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_cond_signal(smx_cond_t cond)
@@ -1060,7 +1057,7 @@ void SIMIX_req_cond_signal(smx_cond_t cond)
   req->call = REQ_COND_SIGNAL;
   req->cond_signal.cond = cond;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
@@ -1071,7 +1068,7 @@ void SIMIX_req_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
   req->cond_wait.cond = cond;
   req->cond_wait.mutex = mutex;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_cond_wait_timeout(smx_cond_t cond,
@@ -1087,7 +1084,7 @@ void SIMIX_req_cond_wait_timeout(smx_cond_t cond,
   req->cond_wait_timeout.mutex = mutex;
   req->cond_wait_timeout.timeout = timeout;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_cond_broadcast(smx_cond_t cond)
@@ -1097,7 +1094,7 @@ void SIMIX_req_cond_broadcast(smx_cond_t cond)
   req->call = REQ_COND_BROADCAST;
   req->cond_broadcast.cond = cond;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 
@@ -1108,7 +1105,7 @@ smx_sem_t SIMIX_req_sem_init(int capacity)
   req->call = REQ_SEM_INIT;
   req->sem_init.capacity = capacity;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->sem_init.result;
 }
 
@@ -1119,7 +1116,7 @@ void SIMIX_req_sem_destroy(smx_sem_t sem)
   req->call = REQ_SEM_DESTROY;
   req->sem_destroy.sem = sem;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_sem_release(smx_sem_t sem)
@@ -1129,7 +1126,7 @@ void SIMIX_req_sem_release(smx_sem_t sem)
   req->call = REQ_SEM_RELEASE;
   req->sem_release.sem = sem;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 int SIMIX_req_sem_would_block(smx_sem_t sem)
@@ -1139,7 +1136,7 @@ int SIMIX_req_sem_would_block(smx_sem_t sem)
   req->call = REQ_SEM_WOULD_BLOCK;
   req->sem_would_block.sem = sem;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->sem_would_block.result;
 }
 
@@ -1150,7 +1147,7 @@ void SIMIX_req_sem_acquire(smx_sem_t sem)
   req->call = REQ_SEM_ACQUIRE;
   req->sem_acquire.sem = sem;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 void SIMIX_req_sem_acquire_timeout(smx_sem_t sem, double timeout)
@@ -1163,7 +1160,7 @@ void SIMIX_req_sem_acquire_timeout(smx_sem_t sem, double timeout)
   req->sem_acquire_timeout.sem = sem;
   req->sem_acquire_timeout.timeout = timeout;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
 }
 
 int SIMIX_req_sem_get_capacity(smx_sem_t sem)
@@ -1173,7 +1170,7 @@ int SIMIX_req_sem_get_capacity(smx_sem_t sem)
   req->call = REQ_SEM_GET_CAPACITY;
   req->sem_get_capacity.sem = sem;
 
-  SIMIX_request_push();
+  SIMIX_request_push(req->issuer);
   return req->sem_get_capacity.result;
 }
 /* ************************************************************************** */
index 3633815..ca1d866 100644 (file)
@@ -4,6 +4,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 <math.h> // sqrt
 #include "private.h"
 #include "xbt/dict.h"
 #include "xbt/sysdep.h"
@@ -120,15 +121,9 @@ typedef struct {
 
 void smpi_bench_destroy(void)
 {
-  if (allocs) {
-    xbt_dict_free(&allocs);
-  }
-  if (samples) {
-    xbt_dict_free(&samples);
-  }
-  if(calls) {
-    xbt_dict_free(&calls);
-  }
+  xbt_dict_free(&allocs);
+  xbt_dict_free(&samples);
+  xbt_dict_free(&calls);
 }
 
 static void smpi_execute_flops(double flops)
@@ -147,6 +142,7 @@ static void smpi_execute_flops(double flops)
 
 static void smpi_execute(double duration)
 {
+  /* FIXME: a global variable would be less expensive to consult than a call to xbt_cfg_get_double() right on the critical path */
   if (duration >= xbt_cfg_get_double(_surf_cfg_set, "smpi/cpu_threshold")) {
     XBT_DEBUG("Sleep for %f to handle real computation time", duration);
     smpi_execute_flops(duration *
@@ -206,7 +202,7 @@ int smpi_sample_1(int global, const char *file, int line, int iters, double thre
 
   smpi_bench_end();     /* Take time from previous MPI call into account */
   if (!samples) {
-    samples = xbt_dict_new();
+    samples = xbt_dict_new_homogeneous(free);
   }
   data = xbt_dict_get_or_null(samples, loc);
   if (!data) {
@@ -217,7 +213,7 @@ int smpi_sample_1(int global, const char *file, int line, int iters, double thre
     data->iters = iters;
     data->threshold = threshold;
     data->started = 0;
-    xbt_dict_set(samples, loc, data, &free);
+    xbt_dict_set(samples, loc, data, NULL);
     return 0;
   }
   free(loc);
@@ -295,7 +291,7 @@ void *smpi_shared_malloc(size_t size, const char *file, int line)
     }
   }
   if (!allocs) {
-    allocs = xbt_dict_new();
+    allocs = xbt_dict_new_homogeneous(free);
   }
   data = xbt_dict_get_or_null(allocs, loc);
   if(!data) {
@@ -316,7 +312,7 @@ void *smpi_shared_malloc(size_t size, const char *file, int line)
     if(shm_unlink(loc) < 0) {
       XBT_WARN("Could not early unlink %s: %s", loc, strerror(errno));
     }
-    xbt_dict_set(allocs, loc, data, &free);
+    xbt_dict_set(allocs, loc, data, NULL);
     XBT_DEBUG("Mapping %s at %p through %d", loc, mem, fd);
   } else {
     mem = shm_map(data->fd, size, data);
@@ -367,7 +363,7 @@ int smpi_shared_known_call(const char* func, const char* input) {
    int known;
 
    if(!calls) {
-      calls = xbt_dict_new();
+      calls = xbt_dict_new_homogeneous(NULL);
    }
    TRY {
       xbt_dict_get(calls, loc); /* Succeed or throw */
@@ -390,7 +386,7 @@ void* smpi_shared_get_call(const char* func, const char* input) {
    void* data;
 
    if(!calls) {
-      calls = xbt_dict_new();
+      calls = xbt_dict_new_homogeneous(NULL);
    }
    data = xbt_dict_get(calls, loc);
    free(loc);
@@ -401,7 +397,7 @@ void* smpi_shared_set_call(const char* func, const char* input, void* data) {
    char* loc = bprintf("%s:%s", func, input);
 
    if(!calls) {
-      calls = xbt_dict_new();
+      calls = xbt_dict_new_homogeneous(NULL);
    }
    xbt_dict_set(calls, loc, data, NULL);
    free(loc);
index de9bc89..c467cc8 100644 (file)
@@ -79,7 +79,7 @@ void mpi_init__(int* ierr) {
    comm_lookup = xbt_dynar_new(sizeof(MPI_Comm), NULL);
    new_comm(MPI_COMM_WORLD);
 
-   request_lookup = xbt_dict_new();
+   request_lookup = xbt_dict_new_homogeneous(NULL);
 
    datatype_lookup = xbt_dynar_new(sizeof(MPI_Datatype), NULL);
    new_datatype(MPI_BYTE);
index 0089372..13d3c59 100644 (file)
@@ -107,7 +107,7 @@ int smpi_global_size(void) {
 
 smpi_process_data_t smpi_process_data(void)
 {
-  return SIMIX_process_self_get_data();
+  return SIMIX_process_self_get_data(SIMIX_process_self());
 }
 
 smpi_process_data_t smpi_process_remote_data(int index)
@@ -254,6 +254,7 @@ int MAIN__(void)
                    NULL);
 
   if(getenv("SMPI_PRETEND_CC") != NULL) {
+       /* Hack to ensure that smpicc can pretend to be a simple compiler. Particularly handy to pass it to the configuration tools */
     return 0;
   }
 
@@ -285,7 +286,7 @@ int MAIN__(void)
     SIMIX_run();
 
   if (xbt_cfg_get_int(_surf_cfg_set, "smpi/display_timing"))
-    XBT_INFO("simulation time %g", SIMIX_get_clock());
+    XBT_INFO("Simulation time: %g seconds.", SIMIX_get_clock());
 
   smpi_global_destroy();
 
index f0f7128..7a77cba 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/bash
 
-CC="gcc"
+CC=@CMAKE_C_COMPILER@
 CFLAGS="-O2 -Dmain=smpi_simulated_main"
 
 #FIXME: probably only want the last two pairs after 'make install'
index ec20d10..677f932 100755 (executable)
@@ -16,7 +16,7 @@ NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}"
 NUMPROCS="${DEFAULT_NUMPROCS}"
 POWER="${DEFAULT_POWER}"
 
-SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=TCP_gamma:4194304"
+SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304"
 
 #usage to print the way this script should be called
 function usage () {
diff --git a/src/surf/cpu.c b/src/surf/cpu.c
deleted file mode 100644 (file)
index 1a86a63..0000000
+++ /dev/null
@@ -1,512 +0,0 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. 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 "surf_private.h"
-
-typedef s_surf_action_lmm_t s_surf_action_cpu_Cas01_t,
-    *surf_action_cpu_Cas01_t;
-
-typedef struct cpu_Cas01 {
-  s_surf_resource_t generic_resource;
-  double power_peak;
-  double power_scale;
-  int core;
-  tmgr_trace_event_t power_event;
-  e_surf_resource_state_t state_current;
-  tmgr_trace_event_t state_event;
-  lmm_constraint_t constraint;
-} s_cpu_Cas01_t, *cpu_Cas01_t;
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf,
-                                "Logging specific to the SURF CPU module");
-
-
-
-surf_model_t surf_cpu_model = NULL;
-lmm_system_t cpu_maxmin_system = NULL;
-
-
-static xbt_swag_t cpu_running_action_set_that_does_not_need_being_checked =
-    NULL;
-
-static cpu_Cas01_t cpu_new(char *name, double power_peak,
-                           double power_scale,
-                           tmgr_trace_t power_trace,
-                           int core,
-                           e_surf_resource_state_t state_initial,
-                           tmgr_trace_t state_trace,
-                           xbt_dict_t cpu_properties)
-{
-  cpu_Cas01_t cpu = xbt_new0(s_cpu_Cas01_t, 1);
-  xbt_assert(!surf_cpu_resource_by_name(name),
-              "Host '%s' declared several times in the platform file",
-              name);
-  cpu->generic_resource.model = surf_cpu_model;
-  cpu->generic_resource.name = name;
-  cpu->generic_resource.properties = cpu_properties;
-  cpu->power_peak = power_peak;
-  xbt_assert(cpu->power_peak > 0, "Power has to be >0");
-  cpu->power_scale = power_scale;
-  cpu->core = core;
-  xbt_assert(core>0,"Invalid number of cores %d",core);
-  if (power_trace)
-    cpu->power_event =
-        tmgr_history_add_trace(history, power_trace, 0.0, 0, cpu);
-
-  cpu->state_current = state_initial;
-  if (state_trace)
-    cpu->state_event =
-        tmgr_history_add_trace(history, state_trace, 0.0, 0, cpu);
-
-  cpu->constraint =
-      lmm_constraint_new(cpu_maxmin_system, cpu,
-                         cpu->core * cpu->power_scale * cpu->power_peak);
-
-  xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu);
-
-  return cpu;
-}
-
-
-static void parse_cpu_init(void)
-{
-  double power_peak = 0.0;
-  double power_scale = 0.0;
-  int core = 0;
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial = SURF_RESOURCE_OFF;
-  tmgr_trace_t state_trace = NULL;
-
-  power_peak = get_cpu_power(A_surfxml_host_power);
-  surf_parse_get_double(&power_scale, A_surfxml_host_availability);
-  power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
-  surf_parse_get_int(&core, A_surfxml_host_core);
-
-  xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) ||
-              (A_surfxml_host_state == A_surfxml_host_state_OFF),
-              "Invalid state");
-  if (A_surfxml_host_state == A_surfxml_host_state_ON)
-    state_initial = SURF_RESOURCE_ON;
-  if (A_surfxml_host_state == A_surfxml_host_state_OFF)
-    state_initial = SURF_RESOURCE_OFF;
-  state_trace = tmgr_trace_new(A_surfxml_host_state_file);
-
-  cpu_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
-          power_trace, core, state_initial, state_trace, current_property_set);
-  current_property_set = NULL;
-}
-
-static void add_traces_cpu(void)
-{
-  xbt_dict_cursor_t cursor = NULL;
-  char *trace_name, *elm;
-
-  static int called = 0;
-
-  if (called)
-    return;
-  called = 1;
-
-
-  /* connect all traces relative to hosts */
-  xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) {
-    tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    cpu_Cas01_t host = surf_cpu_resource_by_name(elm);
-
-    xbt_assert(host, "Host %s undefined", elm);
-    xbt_assert(trace, "Trace %s undefined", trace_name);
-
-    host->state_event =
-        tmgr_history_add_trace(history, trace, 0.0, 0, host);
-  }
-
-  xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) {
-    tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    cpu_Cas01_t host = surf_cpu_resource_by_name(elm);
-
-    xbt_assert(host, "Host %s undefined", elm);
-    xbt_assert(trace, "Trace %s undefined", trace_name);
-
-    host->power_event =
-        tmgr_history_add_trace(history, trace, 0.0, 0, host);
-  }
-}
-
-static void cpu_define_callbacks(const char *file)
-{
-  surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_traces_cpu);
-}
-
-static int cpu_resource_used(void *resource_id)
-{
-  return lmm_constraint_used(cpu_maxmin_system,
-                             ((cpu_Cas01_t) resource_id)->constraint);
-}
-
-static int cpu_action_unref(surf_action_t action)
-{
-  action->refcount--;
-  if (!action->refcount) {
-    xbt_swag_remove(action, action->state_set);
-    if (((surf_action_cpu_Cas01_t) action)->variable)
-      lmm_variable_free(cpu_maxmin_system,
-                        ((surf_action_cpu_Cas01_t) action)->variable);
-#ifdef HAVE_TRACING
-    if (action->category)
-      xbt_free(action->category);
-#endif
-    surf_action_free(&action);
-    return 1;
-  }
-  return 0;
-}
-
-static void cpu_action_cancel(surf_action_t action)
-{
-  surf_action_state_set(action, SURF_ACTION_FAILED);
-  return;
-}
-
-static void cpu_action_state_set(surf_action_t action,
-                                 e_surf_action_state_t state)
-{
-/*   if((state==SURF_ACTION_DONE) || (state==SURF_ACTION_FAILED)) */
-/*     if(((surf_action_cpu_Cas01_t)action)->variable) { */
-/*       lmm_variable_disable(cpu_maxmin_system, ((surf_action_cpu_Cas01_t)action)->variable); */
-/*       ((surf_action_cpu_Cas01_t)action)->variable = NULL; */
-/*     } */
-
-  surf_action_state_set(action, state);
-  return;
-}
-
-static double cpu_share_resources(double now)
-{
-  s_surf_action_cpu_Cas01_t action;
-  return generic_maxmin_share_resources(surf_cpu_model->
-                                        states.running_action_set,
-                                        xbt_swag_offset(action, variable),
-                                        cpu_maxmin_system, lmm_solve);
-}
-
-static void cpu_update_actions_state(double now, double delta)
-{
-  surf_action_cpu_Cas01_t action = NULL;
-  surf_action_cpu_Cas01_t next_action = NULL;
-  xbt_swag_t running_actions = surf_cpu_model->states.running_action_set;
-
-  xbt_swag_foreach_safe(action, next_action, running_actions) {
-#ifdef HAVE_TRACING
-    if (TRACE_is_enabled()) {
-      cpu_Cas01_t x =
-        lmm_constraint_id(lmm_get_cnst_from_var
-                          (cpu_maxmin_system, action->variable, 0));
-
-      TRACE_surf_host_set_utilization(x->generic_resource.name,
-                                      action->generic_action.data,
-                                      (surf_action_t) action,
-                                      lmm_variable_getvalue
-                                      (action->variable), now - delta,
-                                      delta);
-      TRACE_last_timestamp_to_dump = now-delta;
-    }
-#endif
-    double_update(&(action->generic_action.remains),
-                  lmm_variable_getvalue(action->variable) * delta);
-    if (action->generic_action.max_duration != NO_MAX_DURATION)
-      double_update(&(action->generic_action.max_duration), delta);
-    if ((action->generic_action.remains <= 0) &&
-        (lmm_get_variable_weight(action->variable) > 0)) {
-      action->generic_action.finish = surf_get_clock();
-      cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
-    } else if ((action->generic_action.max_duration != NO_MAX_DURATION) &&
-               (action->generic_action.max_duration <= 0)) {
-      action->generic_action.finish = surf_get_clock();
-      cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
-    }
-  }
-
-  return;
-}
-
-static void cpu_update_resource_state(void *id,
-                                      tmgr_trace_event_t event_type,
-                                      double value, double date)
-{
-  cpu_Cas01_t cpu = id;
-  lmm_variable_t var = NULL;
-  lmm_element_t elem = NULL;
-
-  if (event_type == cpu->power_event) {
-    cpu->power_scale = value;
-    lmm_update_constraint_bound(cpu_maxmin_system, cpu->constraint,
-                                cpu->core * cpu->power_scale * cpu->power_peak);
-#ifdef HAVE_TRACING
-    TRACE_surf_host_set_power(date, cpu->generic_resource.name,
-                              cpu->core * cpu->power_scale * cpu->power_peak);
-#endif
-    while ((var = lmm_get_var_from_cnst
-            (cpu_maxmin_system, cpu->constraint, &elem))) {
-       surf_action_cpu_Cas01_t action = lmm_variable_id(var);
-       lmm_update_variable_bound(cpu_maxmin_system, action->variable,
-                                  cpu->power_scale * cpu->power_peak);
-    }
-    if (tmgr_trace_event_free(event_type))
-      cpu->power_event = NULL;
-  } else if (event_type == cpu->state_event) {
-    if (value > 0)
-      cpu->state_current = SURF_RESOURCE_ON;
-    else {
-      lmm_constraint_t cnst = cpu->constraint;
-      lmm_variable_t var = NULL;
-      lmm_element_t elem = NULL;
-
-      cpu->state_current = SURF_RESOURCE_OFF;
-
-      while ((var = lmm_get_var_from_cnst(cpu_maxmin_system, cnst, &elem))) {
-        surf_action_t action = lmm_variable_id(var);
-
-        if (surf_action_state_get(action) == SURF_ACTION_RUNNING ||
-            surf_action_state_get(action) == SURF_ACTION_READY ||
-            surf_action_state_get(action) ==
-            SURF_ACTION_NOT_IN_THE_SYSTEM) {
-          action->finish = date;
-          cpu_action_state_set(action, SURF_ACTION_FAILED);
-        }
-      }
-    }
-    if (tmgr_trace_event_free(event_type))
-      cpu->state_event = NULL;
-  } else {
-    XBT_CRITICAL("Unknown event ! \n");
-    xbt_abort();
-  }
-
-  return;
-}
-
-static surf_action_t cpu_execute(void *cpu, double size)
-{
-  surf_action_cpu_Cas01_t action = NULL;
-  cpu_Cas01_t CPU = cpu;
-
-  XBT_IN("(%s,%g)", surf_resource_name(CPU), size);
-  action =
-      surf_action_new(sizeof(s_surf_action_cpu_Cas01_t), size,
-                      surf_cpu_model,
-                      CPU->state_current != SURF_RESOURCE_ON);
-
-  action->suspended = 0;        /* Should be useless because of the
-                                   calloc but it seems to help valgrind... */
-
-  action->variable = lmm_variable_new(cpu_maxmin_system, action,
-                                      action->generic_action.priority,
-                                      CPU->power_scale * CPU->power_peak, 1);
-  lmm_expand(cpu_maxmin_system, CPU->constraint, action->variable, 1.0);
-  XBT_OUT();
-  return (surf_action_t) action;
-}
-
-static surf_action_t cpu_action_sleep(void *cpu, double duration)
-{
-  surf_action_cpu_Cas01_t action = NULL;
-
-  if (duration > 0)
-    duration = MAX(duration, MAXMIN_PRECISION);
-
-  XBT_IN("(%s,%g)", surf_resource_name(cpu), duration);
-  action = (surf_action_cpu_Cas01_t) cpu_execute(cpu, 1.0);
-  action->generic_action.max_duration = duration;
-  action->suspended = 2;
-  if (duration == NO_MAX_DURATION) {
-    /* Move to the *end* of the corresponding action set. This convention
-       is used to speed up update_resource_state  */
-    xbt_swag_remove(action, ((surf_action_t) action)->state_set);
-    ((surf_action_t) action)->state_set =
-        cpu_running_action_set_that_does_not_need_being_checked;
-    xbt_swag_insert(action, ((surf_action_t) action)->state_set);
-  }
-
-  lmm_update_variable_weight(cpu_maxmin_system, action->variable, 0.0);
-  XBT_OUT();
-  return (surf_action_t) action;
-}
-
-static void cpu_action_suspend(surf_action_t action)
-{
-  XBT_IN("(%p)", action);
-  if (((surf_action_cpu_Cas01_t) action)->suspended != 2) {
-    lmm_update_variable_weight(cpu_maxmin_system,
-                               ((surf_action_cpu_Cas01_t)
-                                action)->variable, 0.0);
-    ((surf_action_cpu_Cas01_t) action)->suspended = 1;
-  }
-  XBT_OUT();
-}
-
-static void cpu_action_resume(surf_action_t action)
-{
-  XBT_IN("(%p)", action);
-  if (((surf_action_cpu_Cas01_t) action)->suspended != 2) {
-    lmm_update_variable_weight(cpu_maxmin_system,
-                               ((surf_action_cpu_Cas01_t)
-                                action)->variable, action->priority);
-    ((surf_action_cpu_Cas01_t) action)->suspended = 0;
-  }
-  XBT_OUT();
-}
-
-static int cpu_action_is_suspended(surf_action_t action)
-{
-  return (((surf_action_cpu_Cas01_t) action)->suspended == 1);
-}
-
-static void cpu_action_set_max_duration(surf_action_t action,
-                                        double duration)
-{
-  XBT_IN("(%p,%g)", action, duration);
-  action->max_duration = duration;
-  XBT_OUT();
-}
-
-static void cpu_action_set_priority(surf_action_t action, double priority)
-{
-  XBT_IN("(%p,%g)", action, priority);
-  action->priority = priority;
-  lmm_update_variable_weight(cpu_maxmin_system,
-                             ((surf_action_cpu_Cas01_t) action)->variable,
-                             priority);
-
-  XBT_OUT();
-}
-
-#ifdef HAVE_TRACING
-static void cpu_action_set_category(surf_action_t action, const char *category)
-{
-  XBT_IN("(%p,%s)", action, category);
-  action->category = xbt_strdup (category);
-  XBT_OUT();
-}
-#endif
-
-static double cpu_action_get_remains(surf_action_t action)
-{
-  XBT_IN("(%p)", action);
-  return action->remains;
-  XBT_OUT();
-}
-
-static e_surf_resource_state_t cpu_get_state(void *cpu)
-{
-  return ((cpu_Cas01_t) cpu)->state_current;
-}
-
-static double cpu_get_speed(void *cpu, double load)
-{
-  return load * (((cpu_Cas01_t) cpu)->power_peak);
-}
-
-static double cpu_get_available_speed(void *cpu)
-{
-  /* number between 0 and 1 */
-  return ((cpu_Cas01_t) cpu)->power_scale;
-}
-
-static void cpu_create_resource(char *name, double power_peak,
-                                double power_scale,
-                                tmgr_trace_t power_trace,
-                                int core,
-                                e_surf_resource_state_t state_initial,
-                                tmgr_trace_t state_trace,
-                                xbt_dict_t cpu_properties)
-{
-  cpu_new(name, power_peak, power_scale, power_trace, core,
-          state_initial, state_trace, cpu_properties);
-}
-
-static void cpu_finalize(void)
-{
-  lmm_system_free(cpu_maxmin_system);
-  cpu_maxmin_system = NULL;
-
-  surf_model_exit(surf_cpu_model);
-  surf_cpu_model = NULL;
-
-  xbt_swag_free(cpu_running_action_set_that_does_not_need_being_checked);
-  cpu_running_action_set_that_does_not_need_being_checked = NULL;
-}
-
-static void surf_cpu_model_init_internal(void)
-{
-  s_surf_action_t action;
-
-  surf_cpu_model = surf_model_init();
-
-  cpu_running_action_set_that_does_not_need_being_checked =
-      xbt_swag_new(xbt_swag_offset(action, state_hookup));
-
-  surf_cpu_model->name = "CPU";
-
-  surf_cpu_model->action_unref = cpu_action_unref;
-  surf_cpu_model->action_cancel = cpu_action_cancel;
-  surf_cpu_model->action_state_set = cpu_action_state_set;
-
-  surf_cpu_model->model_private->resource_used = cpu_resource_used;
-  surf_cpu_model->model_private->share_resources = cpu_share_resources;
-  surf_cpu_model->model_private->update_actions_state =
-      cpu_update_actions_state;
-  surf_cpu_model->model_private->update_resource_state =
-      cpu_update_resource_state;
-  surf_cpu_model->model_private->finalize = cpu_finalize;
-
-  surf_cpu_model->suspend = cpu_action_suspend;
-  surf_cpu_model->resume = cpu_action_resume;
-  surf_cpu_model->is_suspended = cpu_action_is_suspended;
-  surf_cpu_model->set_max_duration = cpu_action_set_max_duration;
-  surf_cpu_model->set_priority = cpu_action_set_priority;
-#ifdef HAVE_TRACING
-  surf_cpu_model->set_category = cpu_action_set_category;
-#endif
-  surf_cpu_model->get_remains = cpu_action_get_remains;
-
-  surf_cpu_model->extension.cpu.execute = cpu_execute;
-  surf_cpu_model->extension.cpu.sleep = cpu_action_sleep;
-
-  surf_cpu_model->extension.cpu.get_state = cpu_get_state;
-  surf_cpu_model->extension.cpu.get_speed = cpu_get_speed;
-  surf_cpu_model->extension.cpu.get_available_speed =
-      cpu_get_available_speed;
-  surf_cpu_model->extension.cpu.create_resource = cpu_create_resource;
-  surf_cpu_model->extension.cpu.add_traces = add_traces_cpu;
-
-  if (!cpu_maxmin_system)
-    cpu_maxmin_system = lmm_system_new();
-}
-
-/*********************************************************************/
-/* Basic sharing model for CPU: that is where all this started... ;) */
-/*********************************************************************/
-/* @InProceedings{casanova01simgrid, */
-/*   author =       "H. Casanova", */
-/*   booktitle =    "Proceedings of the IEEE Symposium on Cluster Computing */
-/*                  and the Grid (CCGrid'01)", */
-/*   publisher =    "IEEE Computer Society", */
-/*   title =        "Simgrid: {A} Toolkit for the Simulation of Application */
-/*                  Scheduling", */
-/*   year =         "2001", */
-/*   month =        may, */
-/*   note =         "Available at */
-/*                  \url{http://grail.sdsc.edu/papers/simgrid_ccgrid01.ps.gz}." */
-/* } */
-void surf_cpu_model_init_Cas01(const char *filename)
-{
-  if (surf_cpu_model)
-    return;
-  surf_cpu_model_init_internal();
-  cpu_define_callbacks(filename);
-  xbt_dynar_push(model_list, &surf_cpu_model);
-}
similarity index 52%
rename from src/surf/cpu_im.c
rename to src/surf/cpu_cas01.c
index 19f1743..8de56ed 100644 (file)
@@ -1,26 +1,35 @@
-/* Copyright (c) 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2009-2011. 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 "surf_private.h"
+#include "surf/surf_resource.h"
+
+surf_model_t surf_cpu_model = NULL;
+lmm_system_t cpu_maxmin_system = NULL;
+e_UM_t cpu_update_mechanism = UM_UNDEFINED;
+static int selective_update = 0;
+
+static xbt_swag_t cpu_modified_cpu = NULL;
+static xbt_heap_t cpu_action_heap = NULL;
 
 #undef GENERIC_LMM_ACTION
 #undef GENERIC_ACTION
 #undef ACTION_GET_CPU
 #define GENERIC_LMM_ACTION(action) action->generic_lmm_action
 #define GENERIC_ACTION(action) GENERIC_LMM_ACTION(action).generic_action
-#define ACTION_GET_CPU(action) ((surf_action_cpu_Cas01_im_t) action)->cpu
+#define ACTION_GET_CPU(action) ((surf_action_cpu_Cas01_t) action)->cpu
 
-typedef struct surf_action_cpu_cas01_im {
+typedef struct surf_action_cpu_cas01 {
   s_surf_action_lmm_t generic_lmm_action;
   s_xbt_swag_hookup_t cpu_list_hookup;
   int index_heap;
   void *cpu;
-} s_surf_action_cpu_Cas01_im_t, *surf_action_cpu_Cas01_im_t;
+} s_surf_action_cpu_Cas01_t, *surf_action_cpu_Cas01_t;
 
-typedef struct cpu_Cas01_im {
+typedef struct cpu_Cas01 {
   s_surf_resource_t generic_resource;
   s_xbt_swag_hookup_t modified_cpu_hookup;
   double power_peak;
@@ -32,22 +41,17 @@ typedef struct cpu_Cas01_im {
   lmm_constraint_t constraint;
   xbt_swag_t action_set;
   double last_update;
-} s_cpu_Cas01_im_t, *cpu_Cas01_im_t;
+} s_cpu_Cas01_t, *cpu_Cas01_t;
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_im, surf,
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf,
                                 "Logging specific to the SURF CPU IMPROVED module");
 
 
-lmm_system_t cpu_im_maxmin_system = NULL;
-static xbt_swag_t cpu_im_modified_cpu = NULL;
-static xbt_heap_t cpu_im_action_heap = NULL;
-extern int sg_maxmin_selective_update;
-
 
 static xbt_swag_t
-    cpu_im_running_action_set_that_does_not_need_being_checked = NULL;
+    cpu_running_action_set_that_does_not_need_being_checked = NULL;
 
-static cpu_Cas01_im_t cpu_im_new(char *name, double power_peak,
+static void* cpu_create_resource(const char *name, double power_peak,
                                  double power_scale,
                                  tmgr_trace_t power_trace,
                                  int core,
@@ -55,24 +59,23 @@ static cpu_Cas01_im_t cpu_im_new(char *name, double power_peak,
                                  tmgr_trace_t state_trace,
                                  xbt_dict_t cpu_properties)
 {
-  cpu_Cas01_im_t cpu = NULL;
-  s_surf_action_cpu_Cas01_im_t action;
-  cpu = xbt_new0(s_cpu_Cas01_im_t, 1);
+  cpu_Cas01_t cpu = NULL;
+  s_surf_action_cpu_Cas01_t action;
 
   xbt_assert(!surf_cpu_resource_by_name(name),
               "Host '%s' declared several times in the platform file",
               name);
-  cpu->generic_resource.model = surf_cpu_model;
-  cpu->generic_resource.name = name;
-  cpu->generic_resource.properties = cpu_properties;
+  cpu = (cpu_Cas01_t) surf_resource_new(sizeof(s_cpu_Cas01_t),
+          surf_cpu_model, name,cpu_properties);
   cpu->power_peak = power_peak;
   xbt_assert(cpu->power_peak > 0, "Power has to be >0");
   cpu->power_scale = power_scale;
+  cpu->core = core;
+  xbt_assert(core>0,"Invalid number of cores %d",core);
+
   if (power_trace)
     cpu->power_event =
         tmgr_history_add_trace(history, power_trace, 0.0, 0, cpu);
-  cpu->core = core;
-  xbt_assert(core>0,"Invalid number of cores %d",core);
 
   cpu->state_current = state_initial;
   if (state_trace)
@@ -80,47 +83,30 @@ static cpu_Cas01_im_t cpu_im_new(char *name, double power_peak,
         tmgr_history_add_trace(history, state_trace, 0.0, 0, cpu);
 
   cpu->constraint =
-      lmm_constraint_new(cpu_im_maxmin_system, cpu,
+      lmm_constraint_new(cpu_maxmin_system, cpu,
                          cpu->core * cpu->power_scale * cpu->power_peak);
 
   xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu);
-  cpu->action_set = xbt_swag_new(xbt_swag_offset(action, cpu_list_hookup));
+  if(cpu_update_mechanism == UM_LAZY)
+    cpu->action_set = xbt_swag_new(xbt_swag_offset(action, cpu_list_hookup));
 
   return cpu;
 }
 
 
-static void parse_cpu_im_init(void)
+static void parse_cpu_init(sg_platf_host_cbarg_t host)
 {
-  double power_peak = 0.0;
-  double power_scale = 0.0;
-  int core = 0;
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial = SURF_RESOURCE_OFF;
-  tmgr_trace_t state_trace = NULL;
-
-  power_peak = get_cpu_power(A_surfxml_host_power);
-  surf_parse_get_double(&power_scale, A_surfxml_host_availability);
-  power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
-  surf_parse_get_int(&core, A_surfxml_host_core);
-
-  xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) ||
-              (A_surfxml_host_state == A_surfxml_host_state_OFF),
-              "Invalid state");
-  if (A_surfxml_host_state == A_surfxml_host_state_ON)
-    state_initial = SURF_RESOURCE_ON;
-  if (A_surfxml_host_state == A_surfxml_host_state_OFF)
-    state_initial = SURF_RESOURCE_OFF;
-  state_trace = tmgr_trace_new(A_surfxml_host_state_file);
-
-  cpu_im_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
-             power_trace, core, state_initial, state_trace,
-             current_property_set);
-  current_property_set = NULL;
-
+       cpu_create_resource(host->id,
+                         host->power_peak,
+                         host->power_scale,
+                         host->power_trace,
+                         host->core_amount,
+                         host->initial_state,
+                         host->state_trace,
+                         host->properties);
 }
 
-static void cpu_im_add_traces_cpu(void)
+static void cpu_add_traces_cpu(void)
 {
   xbt_dict_cursor_t cursor = NULL;
   char *trace_name, *elm;
@@ -132,7 +118,7 @@ static void cpu_im_add_traces_cpu(void)
   /* connect all traces relative to hosts */
   xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    cpu_Cas01_im_t host = surf_cpu_resource_by_name(elm);
+    cpu_Cas01_t host = surf_cpu_resource_by_name(elm);
 
     xbt_assert(host, "Host %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -143,7 +129,7 @@ static void cpu_im_add_traces_cpu(void)
 
   xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    cpu_Cas01_im_t host = surf_cpu_resource_by_name(elm);
+    cpu_Cas01_t host = surf_cpu_resource_by_name(elm);
 
     xbt_assert(host, "Host %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -153,36 +139,36 @@ static void cpu_im_add_traces_cpu(void)
   }
 }
 
-static void cpu_im_define_callbacks(const char *file)
+static void cpu_define_callbacks()
 {
-  surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_im_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list,
-                       &cpu_im_add_traces_cpu);
+  sg_platf_host_add_cb(parse_cpu_init);
+  sg_platf_postparse_add_cb(cpu_add_traces_cpu);
 }
 
-static int cpu_im_resource_used(void *resource_id)
+static int cpu_resource_used(void *resource)
 {
-  return lmm_constraint_used(cpu_im_maxmin_system,
-                             ((cpu_Cas01_im_t) resource_id)->constraint);
+  return lmm_constraint_used(cpu_maxmin_system,
+                             ((cpu_Cas01_t) resource)->constraint);
 }
 
-static int cpu_im_action_unref(surf_action_t action)
+static int cpu_action_unref(surf_action_t action)
 {
   action->refcount--;
   if (!action->refcount) {
     xbt_swag_remove(action, action->state_set);
     if (((surf_action_lmm_t) action)->variable)
-      lmm_variable_free(cpu_im_maxmin_system,
+      lmm_variable_free(cpu_maxmin_system,
                         ((surf_action_lmm_t) action)->variable);
+    if(cpu_update_mechanism == UM_LAZY){
     /* remove from heap */
-    xbt_heap_remove(cpu_im_action_heap,
-                    ((surf_action_cpu_Cas01_im_t) action)->index_heap);
+    xbt_heap_remove(cpu_action_heap,
+                    ((surf_action_cpu_Cas01_t) action)->index_heap);
     xbt_swag_remove(action,
-                    ((cpu_Cas01_im_t) ACTION_GET_CPU(action))->action_set);
-    xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
+                    ((cpu_Cas01_t) ACTION_GET_CPU(action))->action_set);
+    xbt_swag_insert(ACTION_GET_CPU(action), cpu_modified_cpu);
+    }
 #ifdef HAVE_TRACING
-    if (action->category)
-      xbt_free(action->category);
+    xbt_free(action->category);
 #endif
     surf_action_free(&action);
     return 1;
@@ -190,22 +176,24 @@ static int cpu_im_action_unref(surf_action_t action)
   return 0;
 }
 
-static void cpu_im_action_cancel(surf_action_t action)
+static void cpu_action_cancel(surf_action_t action)
 {
   surf_action_state_set(action, SURF_ACTION_FAILED);
-  xbt_heap_remove(cpu_im_action_heap,
-                  ((surf_action_cpu_Cas01_im_t) action)->index_heap);
+  if(cpu_update_mechanism == UM_LAZY){
+  xbt_heap_remove(cpu_action_heap,
+                  ((surf_action_cpu_Cas01_t) action)->index_heap);
   xbt_swag_remove(action,
-                  ((cpu_Cas01_im_t) ACTION_GET_CPU(action))->action_set);
+                  ((cpu_Cas01_t) ACTION_GET_CPU(action))->action_set);
+  }
   return;
 }
 
-static void cpu_im_cpu_action_state_set(surf_action_t action,
+static void cpu_cpu_action_state_set(surf_action_t action,
                                         e_surf_action_state_t state)
 {
 /*   if((state==SURF_ACTION_DONE) || (state==SURF_ACTION_FAILED)) */
 /*     if(((surf_action_lmm_t)action)->variable) { */
-/*       lmm_variable_disable(cpu_im_maxmin_system, ((surf_action_lmm_t)action)->variable); */
+/*       lmm_variable_disable(cpu_maxmin_system, ((surf_action_lmm_t)action)->variable); */
 /*       ((surf_action_lmm_t)action)->variable = NULL; */
 /*     } */
 
@@ -213,9 +201,9 @@ static void cpu_im_cpu_action_state_set(surf_action_t action,
   return;
 }
 
-static void cpu_im_update_remains(cpu_Cas01_im_t cpu, double now)
+static void cpu_update_remains(cpu_Cas01_t cpu, double now)
 {
-  surf_action_cpu_Cas01_im_t action;
+  surf_action_cpu_Cas01_t action;
 
   if (cpu->last_update >= now)
     return;
@@ -253,19 +241,19 @@ static void cpu_im_update_remains(cpu_Cas01_im_t cpu, double now)
   cpu->last_update = now;
 }
 
-static double cpu_im_share_resources(double now)
+static double cpu_share_resources_lazy(double now)
 {
-  surf_action_cpu_Cas01_im_t action;
+  surf_action_cpu_Cas01_t action;
   double min;
   double value;
-  cpu_Cas01_im_t cpu, cpu_next;
+  cpu_Cas01_t cpu, cpu_next;
 
-  xbt_swag_foreach(cpu, cpu_im_modified_cpu)
-      cpu_im_update_remains(cpu, now);
+  xbt_swag_foreach(cpu, cpu_modified_cpu)
+      cpu_update_remains(cpu, now);
 
-  lmm_solve(cpu_im_maxmin_system);
+  lmm_solve(cpu_maxmin_system);
 
-  xbt_swag_foreach_safe(cpu, cpu_next, cpu_im_modified_cpu) {
+  xbt_swag_foreach_safe(cpu, cpu_next, cpu_modified_cpu) {
     xbt_swag_foreach(action, cpu->action_set) {
       if (GENERIC_ACTION(action).state_set !=
           surf_cpu_model->states.running_action_set)
@@ -300,37 +288,43 @@ static double cpu_im_share_resources(double now)
              GENERIC_ACTION(action).max_duration);
 
       if (action->index_heap >= 0) {
-        surf_action_cpu_Cas01_im_t heap_act =
-            xbt_heap_remove(cpu_im_action_heap, action->index_heap);
+        surf_action_cpu_Cas01_t heap_act =
+            xbt_heap_remove(cpu_action_heap, action->index_heap);
         if (heap_act != action)
           DIE_IMPOSSIBLE;
       }
       if (min != -1) {
-        xbt_heap_push(cpu_im_action_heap, action, min);
+        xbt_heap_push(cpu_action_heap, action, min);
         XBT_DEBUG("Insert at heap action(%p) min %lf", action, min);
       }
     }
-    xbt_swag_remove(cpu, cpu_im_modified_cpu);
+    xbt_swag_remove(cpu, cpu_modified_cpu);
   }
-  return xbt_heap_size(cpu_im_action_heap) >
-      0 ? xbt_heap_maxkey(cpu_im_action_heap) - now : -1;
+  return xbt_heap_size(cpu_action_heap) >
+      0 ? xbt_heap_maxkey(cpu_action_heap) - now : -1;
 }
 
-static void cpu_im_update_actions_state(double now, double delta)
-{
-  surf_action_cpu_Cas01_im_t action;
+static double cpu_share_resources_full(double now) {
+  surf_action_cpu_Cas01_t action;
+  return generic_maxmin_share_resources(surf_cpu_model->states.running_action_set,
+      xbt_swag_offset(*action, generic_lmm_action.variable),
+      cpu_maxmin_system, lmm_solve);
+}
 
-  while ((xbt_heap_size(cpu_im_action_heap) > 0)
-         && (double_equals(xbt_heap_maxkey(cpu_im_action_heap), now))) {
-    action = xbt_heap_pop(cpu_im_action_heap);
+static void cpu_update_actions_state_lazy(double now, double delta)
+{
+  surf_action_cpu_Cas01_t action;
+  while ((xbt_heap_size(cpu_action_heap) > 0)
+         && (double_equals(xbt_heap_maxkey(cpu_action_heap), now))) {
+    action = xbt_heap_pop(cpu_action_heap);
     XBT_DEBUG("Action %p: finish", action);
     GENERIC_ACTION(action).finish = surf_get_clock();
     /* set the remains to 0 due to precision problems when updating the remaining amount */
 #ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
-      cpu_Cas01_im_t cpu = ((cpu_Cas01_im_t)(action->cpu));
+      cpu_Cas01_t cpu = ((cpu_Cas01_t)(action->cpu));
       TRACE_surf_host_set_utilization(cpu->generic_resource.name,
-          action->generic_lmm_action.generic_action.data,
+          GENERIC_LMM_ACTION(action).generic_action.data,
           (surf_action_t) action,
           lmm_variable_getvalue (GENERIC_LMM_ACTION(action).variable),
           cpu->last_update,
@@ -338,15 +332,15 @@ static void cpu_im_update_actions_state(double now, double delta)
     }
 #endif
     GENERIC_ACTION(action).remains = 0;
-    cpu_im_cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
-    cpu_im_update_remains(action->cpu, surf_get_clock());
+    cpu_cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
+    cpu_update_remains(action->cpu, surf_get_clock());
   }
 #ifdef HAVE_TRACING
   if (TRACE_is_enabled()) {
     //defining the last timestamp that we can safely dump to trace file
     //without losing the event ascending order (considering all CPU's)
     void **data;
-    cpu_Cas01_im_t cpu;
+    cpu_Cas01_t cpu;
     xbt_lib_cursor_t cursor;
     char *key;
     double smaller = -1;
@@ -370,29 +364,69 @@ static void cpu_im_update_actions_state(double now, double delta)
   return;
 }
 
-static void cpu_im_update_resource_state(void *id,
+static void cpu_update_actions_state_full(double now, double delta)
+{
+  surf_action_cpu_Cas01_t action = NULL;
+  surf_action_cpu_Cas01_t next_action = NULL;
+  xbt_swag_t running_actions = surf_cpu_model->states.running_action_set;
+  xbt_swag_foreach_safe(action, next_action, running_actions) {
+#ifdef HAVE_TRACING
+    if (TRACE_is_enabled()) {
+      cpu_Cas01_t x =
+        lmm_constraint_id(lmm_get_cnst_from_var
+                          (cpu_maxmin_system, GENERIC_LMM_ACTION(action).variable, 0));
+
+      TRACE_surf_host_set_utilization(x->generic_resource.name,
+                                      GENERIC_ACTION(action).data,
+                                      (surf_action_t) action,
+                                      lmm_variable_getvalue
+                                      (GENERIC_LMM_ACTION(action).variable), now - delta,
+                                      delta);
+      TRACE_last_timestamp_to_dump = now-delta;
+    }
+#endif
+    double_update(&(GENERIC_ACTION(action).remains),
+                  lmm_variable_getvalue(GENERIC_LMM_ACTION(action).variable) * delta);
+    if (GENERIC_LMM_ACTION(action).generic_action.max_duration != NO_MAX_DURATION)
+      double_update(&(GENERIC_ACTION(action).max_duration), delta);
+    if ((GENERIC_ACTION(action).remains <= 0) &&
+        (lmm_get_variable_weight(GENERIC_LMM_ACTION(action).variable) > 0)) {
+      GENERIC_ACTION(action).finish = surf_get_clock();
+      cpu_cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
+    } else if ((GENERIC_ACTION(action).max_duration != NO_MAX_DURATION) &&
+               (GENERIC_ACTION(action).max_duration <= 0)) {
+      GENERIC_ACTION(action).finish = surf_get_clock();
+      cpu_cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
+    }
+  }
+
+  return;
+}
+
+static void cpu_update_resource_state(void *id,
                                          tmgr_trace_event_t event_type,
                                          double value, double date)
 {
-  cpu_Cas01_im_t cpu = id;
+  cpu_Cas01_t cpu = id;
   lmm_variable_t var = NULL;
   lmm_element_t elem = NULL;
 
   if (event_type == cpu->power_event) {
     cpu->power_scale = value;
-    lmm_update_constraint_bound(cpu_im_maxmin_system, cpu->constraint,
+    lmm_update_constraint_bound(cpu_maxmin_system, cpu->constraint,
                                 cpu->core * cpu->power_scale * cpu->power_peak);
 #ifdef HAVE_TRACING
     TRACE_surf_host_set_power(date, cpu->generic_resource.name,
                               cpu->core * cpu->power_scale * cpu->power_peak);
 #endif
     while ((var = lmm_get_var_from_cnst
-            (cpu_im_maxmin_system, cpu->constraint, &elem))) {
-       surf_action_cpu_Cas01_im_t action = lmm_variable_id(var);
-       lmm_update_variable_bound(cpu_im_maxmin_system, action->generic_lmm_action.variable,
+            (cpu_maxmin_system, cpu->constraint, &elem))) {
+       surf_action_cpu_Cas01_t action = lmm_variable_id(var);
+       lmm_update_variable_bound(cpu_maxmin_system, GENERIC_LMM_ACTION(action).variable,
                                   cpu->power_scale * cpu->power_peak);
     }
-    xbt_swag_insert(cpu, cpu_im_modified_cpu);
+    if(cpu_update_mechanism == UM_LAZY)
+      xbt_swag_insert(cpu, cpu_modified_cpu);
     if (tmgr_trace_event_free(event_type))
       cpu->power_event = NULL;
   } else if (event_type == cpu->state_event) {
@@ -406,7 +440,7 @@ static void cpu_im_update_resource_state(void *id,
       cpu->state_current = SURF_RESOURCE_OFF;
 
       while ((var =
-              lmm_get_var_from_cnst(cpu_im_maxmin_system, cnst, &elem))) {
+              lmm_get_var_from_cnst(cpu_maxmin_system, cnst, &elem))) {
         surf_action_t action = lmm_variable_id(var);
 
         if (surf_action_state_get(action) == SURF_ACTION_RUNNING ||
@@ -414,7 +448,7 @@ static void cpu_im_update_resource_state(void *id,
             surf_action_state_get(action) ==
             SURF_ACTION_NOT_IN_THE_SYSTEM) {
           action->finish = date;
-          cpu_im_cpu_action_state_set(action, SURF_ACTION_FAILED);
+          cpu_cpu_action_state_set(action, SURF_ACTION_FAILED);
         }
       }
     }
@@ -428,14 +462,14 @@ static void cpu_im_update_resource_state(void *id,
   return;
 }
 
-static surf_action_t cpu_im_execute(void *cpu, double size)
+static surf_action_t cpu_execute(void *cpu, double size)
 {
-  surf_action_cpu_Cas01_im_t action = NULL;
-  cpu_Cas01_im_t CPU = cpu;
+  surf_action_cpu_Cas01_t action = NULL;
+  cpu_Cas01_t CPU = cpu;
 
   XBT_IN("(%s,%g)", surf_resource_name(CPU), size);
   action =
-      surf_action_new(sizeof(s_surf_action_cpu_Cas01_im_t), size,
+      surf_action_new(sizeof(s_surf_action_cpu_Cas01_t), size,
                       surf_cpu_model,
                       CPU->state_current != SURF_RESOURCE_ON);
 
@@ -443,27 +477,29 @@ static surf_action_t cpu_im_execute(void *cpu, double size)
                                                    calloc but it seems to help valgrind... */
 
   GENERIC_LMM_ACTION(action).variable =
-      lmm_variable_new(cpu_im_maxmin_system, action,
+      lmm_variable_new(cpu_maxmin_system, action,
                        GENERIC_ACTION(action).priority, CPU->power_scale * CPU->power_peak, 1);
-  action->index_heap = -1;
-  action->cpu = CPU;
-  xbt_swag_insert(CPU, cpu_im_modified_cpu);
-  xbt_swag_insert(action, CPU->action_set);
-  lmm_expand(cpu_im_maxmin_system, CPU->constraint,
+  if(cpu_update_mechanism == UM_LAZY){
+    action->index_heap = -1;
+    action->cpu = CPU;
+    xbt_swag_insert(CPU, cpu_modified_cpu);
+    xbt_swag_insert(action, CPU->action_set);
+  }
+  lmm_expand(cpu_maxmin_system, CPU->constraint,
              GENERIC_LMM_ACTION(action).variable, 1.0);
   XBT_OUT();
   return (surf_action_t) action;
 }
 
-static surf_action_t cpu_im_action_sleep(void *cpu, double duration)
+static surf_action_t cpu_action_sleep(void *cpu, double duration)
 {
-  surf_action_cpu_Cas01_im_t action = NULL;
+  surf_action_cpu_Cas01_t action = NULL;
 
   if (duration > 0)
     duration = MAX(duration, MAXMIN_PRECISION);
 
   XBT_IN("(%s,%g)", surf_resource_name(cpu), duration);
-  action = (surf_action_cpu_Cas01_im_t) cpu_im_execute(cpu, 1.0);
+  action = (surf_action_cpu_Cas01_t) cpu_execute(cpu, 1.0);
   GENERIC_ACTION(action).max_duration = duration;
   GENERIC_LMM_ACTION(action).suspended = 2;
   if (duration == NO_MAX_DURATION) {
@@ -471,77 +507,83 @@ static surf_action_t cpu_im_action_sleep(void *cpu, double duration)
        is used to speed up update_resource_state  */
     xbt_swag_remove(action, ((surf_action_t) action)->state_set);
     ((surf_action_t) action)->state_set =
-        cpu_im_running_action_set_that_does_not_need_being_checked;
+        cpu_running_action_set_that_does_not_need_being_checked;
     xbt_swag_insert(action, ((surf_action_t) action)->state_set);
   }
 
-  lmm_update_variable_weight(cpu_im_maxmin_system,
+  lmm_update_variable_weight(cpu_maxmin_system,
                              GENERIC_LMM_ACTION(action).variable, 0.0);
-  xbt_swag_insert(cpu, cpu_im_modified_cpu);
+  if(cpu_update_mechanism == UM_LAZY)
+    xbt_swag_insert(cpu, cpu_modified_cpu);
   XBT_OUT();
   return (surf_action_t) action;
 }
 
-static void cpu_im_action_suspend(surf_action_t action)
+static void cpu_action_suspend(surf_action_t action)
 {
   XBT_IN("(%p)", action);
   if (((surf_action_lmm_t) action)->suspended != 2) {
-    lmm_update_variable_weight(cpu_im_maxmin_system,
+    lmm_update_variable_weight(cpu_maxmin_system,
                                ((surf_action_lmm_t) action)->variable,
                                0.0);
     ((surf_action_lmm_t) action)->suspended = 1;
-    xbt_heap_remove(cpu_im_action_heap,
-                    ((surf_action_cpu_Cas01_im_t) action)->index_heap);
-    xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
+    if(cpu_update_mechanism == UM_LAZY){
+      xbt_heap_remove(cpu_action_heap,
+                      ((surf_action_cpu_Cas01_t) action)->index_heap);
+      xbt_swag_insert(ACTION_GET_CPU(action), cpu_modified_cpu);
+    }
   }
   XBT_OUT();
 }
 
-static void cpu_im_action_resume(surf_action_t action)
+static void cpu_action_resume(surf_action_t action)
 {
 
   XBT_IN("(%p)", action);
   if (((surf_action_lmm_t) action)->suspended != 2) {
-    lmm_update_variable_weight(cpu_im_maxmin_system,
+    lmm_update_variable_weight(cpu_maxmin_system,
                                ((surf_action_lmm_t) action)->variable,
                                action->priority);
     ((surf_action_lmm_t) action)->suspended = 0;
-    xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
+    if(cpu_update_mechanism == UM_LAZY)
+      xbt_swag_insert(ACTION_GET_CPU(action), cpu_modified_cpu);
   }
   XBT_OUT();
 }
 
-static int cpu_im_action_is_suspended(surf_action_t action)
+static int cpu_action_is_suspended(surf_action_t action)
 {
   return (((surf_action_lmm_t) action)->suspended == 1);
 }
 
-static void cpu_im_action_set_max_duration(surf_action_t action,
+static void cpu_action_set_max_duration(surf_action_t action,
                                            double duration)
 {
   XBT_IN("(%p,%g)", action, duration);
 
   action->max_duration = duration;
   /* insert cpu in modified_cpu set to notice the max duration change */
-  xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
+  if(cpu_update_mechanism == UM_LAZY)
+    xbt_swag_insert(ACTION_GET_CPU(action), cpu_modified_cpu);
   XBT_OUT();
 }
 
-static void cpu_im_action_set_priority(surf_action_t action,
+static void cpu_action_set_priority(surf_action_t action,
                                        double priority)
 {
   XBT_IN("(%p,%g)", action, priority);
   action->priority = priority;
-  lmm_update_variable_weight(cpu_im_maxmin_system,
+  lmm_update_variable_weight(cpu_maxmin_system,
                              ((surf_action_lmm_t) action)->variable,
                              priority);
 
-  xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
+  if(cpu_update_mechanism == UM_LAZY)
+    xbt_swag_insert(ACTION_GET_CPU(action), cpu_modified_cpu);
   XBT_OUT();
 }
 
 #ifdef HAVE_TRACING
-static void cpu_im_action_set_category(surf_action_t action,
+static void cpu_action_set_category(surf_action_t action,
                                        const char *category)
 {
   XBT_IN("(%p,%s)", action, category);
@@ -550,128 +592,125 @@ static void cpu_im_action_set_category(surf_action_t action,
 }
 #endif
 
-static double cpu_im_action_get_remains(surf_action_t action)
+static double cpu_action_get_remains(surf_action_t action)
 {
   XBT_IN("(%p)", action);
   /* update remains before return it */
-  cpu_im_update_remains(ACTION_GET_CPU(action), surf_get_clock());
-  return action->remains;
+  if(cpu_update_mechanism == UM_LAZY)
+    cpu_update_remains(ACTION_GET_CPU(action), surf_get_clock());
   XBT_OUT();
+  return action->remains;
 }
 
-static e_surf_resource_state_t cpu_im_get_state(void *cpu)
+static e_surf_resource_state_t cpu_get_state(void *cpu)
 {
-  return ((cpu_Cas01_im_t) cpu)->state_current;
+  return ((cpu_Cas01_t) cpu)->state_current;
 }
 
-static double cpu_im_get_speed(void *cpu, double load)
+static double cpu_get_speed(void *cpu, double load)
 {
-  return load * (((cpu_Cas01_im_t) cpu)->power_peak);
+  return load * (((cpu_Cas01_t) cpu)->power_peak);
 }
 
-static double cpu_im_get_available_speed(void *cpu)
+static double cpu_get_available_speed(void *cpu)
 {
   /* number between 0 and 1 */
-  return ((cpu_Cas01_im_t) cpu)->power_scale;
-}
-
-static void cpu_im_action_update_index_heap(void *action, int i)
-{
-  ((surf_action_cpu_Cas01_im_t) action)->index_heap = i;
+  return ((cpu_Cas01_t) cpu)->power_scale;
 }
 
-static void cpu_im_create_resource(char *name, double power_peak,
-                                   double power_scale,
-                                   tmgr_trace_t power_trace,
-                                   int core,
-                                   e_surf_resource_state_t state_initial,
-                                   tmgr_trace_t state_trace,
-                                   xbt_dict_t cpu_properties)
+static void cpu_action_update_index_heap(void *action, int i)
 {
-  cpu_im_new(name, power_peak, power_scale, power_trace, core,
-             state_initial, state_trace, cpu_properties);
+  ((surf_action_cpu_Cas01_t) action)->index_heap = i;
 }
 
-static void cpu_im_finalize(void)
+static void cpu_finalize(void)
 {
   void **cpu;
   xbt_lib_cursor_t cursor;
   char *key;
 
   xbt_lib_foreach(host_lib, cursor, key, cpu){
-         if(cpu[SURF_CPU_LEVEL])
-         {
-                   cpu_Cas01_im_t CPU = cpu[SURF_CPU_LEVEL];
-                   xbt_swag_free(CPU->action_set);
-         }
+    if(cpu[SURF_CPU_LEVEL])
+    {
+        cpu_Cas01_t CPU = cpu[SURF_CPU_LEVEL];
+        xbt_swag_free(CPU->action_set);
+    }
   }
 
-  lmm_system_free(cpu_im_maxmin_system);
-  cpu_im_maxmin_system = NULL;
+  lmm_system_free(cpu_maxmin_system);
+  cpu_maxmin_system = NULL;
 
   surf_model_exit(surf_cpu_model);
   surf_cpu_model = NULL;
 
   xbt_swag_free
-      (cpu_im_running_action_set_that_does_not_need_being_checked);
-  cpu_im_running_action_set_that_does_not_need_being_checked = NULL;
-  xbt_heap_free(cpu_im_action_heap);
-  xbt_swag_free(cpu_im_modified_cpu);
+      (cpu_running_action_set_that_does_not_need_being_checked);
+  cpu_running_action_set_that_does_not_need_being_checked = NULL;
+  if(cpu_action_heap)  xbt_heap_free(cpu_action_heap);
+  if(cpu_modified_cpu) xbt_swag_free(cpu_modified_cpu);
 }
 
-static void surf_cpu_im_model_init_internal(void)
+static void surf_cpu_model_init_internal()
 {
   s_surf_action_t action;
-  s_cpu_Cas01_im_t cpu;
+  s_cpu_Cas01_t cpu;
 
   surf_cpu_model = surf_model_init();
 
-  cpu_im_running_action_set_that_does_not_need_being_checked =
+  cpu_running_action_set_that_does_not_need_being_checked =
       xbt_swag_new(xbt_swag_offset(action, state_hookup));
 
-  surf_cpu_model->name = "CPU_IM";
+  surf_cpu_model->name = "cpu";
+
+  surf_cpu_model->action_unref = cpu_action_unref;
+  surf_cpu_model->action_cancel = cpu_action_cancel;
+  surf_cpu_model->action_state_set = cpu_cpu_action_state_set;
 
-  surf_cpu_model->action_unref = cpu_im_action_unref;
-  surf_cpu_model->action_cancel = cpu_im_action_cancel;
-  surf_cpu_model->action_state_set = cpu_im_cpu_action_state_set;
+  surf_cpu_model->model_private->resource_used = cpu_resource_used;
+
+  if(cpu_update_mechanism == UM_LAZY) {
+    surf_cpu_model->model_private->share_resources = cpu_share_resources_lazy;
+    surf_cpu_model->model_private->update_actions_state = cpu_update_actions_state_lazy;
+  } else if (cpu_update_mechanism == UM_FULL) {
+    surf_cpu_model->model_private->share_resources = cpu_share_resources_full;
+    surf_cpu_model->model_private->update_actions_state = cpu_update_actions_state_full;
+  } else
+    xbt_die("Invalid update mechanism!");
 
-  surf_cpu_model->model_private->resource_used = cpu_im_resource_used;
-  surf_cpu_model->model_private->share_resources = cpu_im_share_resources;
-  surf_cpu_model->model_private->update_actions_state =
-      cpu_im_update_actions_state;
   surf_cpu_model->model_private->update_resource_state =
-      cpu_im_update_resource_state;
-  surf_cpu_model->model_private->finalize = cpu_im_finalize;
-
-  surf_cpu_model->suspend = cpu_im_action_suspend;
-  surf_cpu_model->resume = cpu_im_action_resume;
-  surf_cpu_model->is_suspended = cpu_im_action_is_suspended;
-  surf_cpu_model->set_max_duration = cpu_im_action_set_max_duration;
-  surf_cpu_model->set_priority = cpu_im_action_set_priority;
+      cpu_update_resource_state;
+  surf_cpu_model->model_private->finalize = cpu_finalize;
+
+  surf_cpu_model->suspend = cpu_action_suspend;
+  surf_cpu_model->resume = cpu_action_resume;
+  surf_cpu_model->is_suspended = cpu_action_is_suspended;
+  surf_cpu_model->set_max_duration = cpu_action_set_max_duration;
+  surf_cpu_model->set_priority = cpu_action_set_priority;
 #ifdef HAVE_TRACING
-  surf_cpu_model->set_category = cpu_im_action_set_category;
+  surf_cpu_model->set_category = cpu_action_set_category;
 #endif
-  surf_cpu_model->get_remains = cpu_im_action_get_remains;
+  surf_cpu_model->get_remains = cpu_action_get_remains;
 
-  surf_cpu_model->extension.cpu.execute = cpu_im_execute;
-  surf_cpu_model->extension.cpu.sleep = cpu_im_action_sleep;
+  surf_cpu_model->extension.cpu.execute = cpu_execute;
+  surf_cpu_model->extension.cpu.sleep = cpu_action_sleep;
 
-  surf_cpu_model->extension.cpu.get_state = cpu_im_get_state;
-  surf_cpu_model->extension.cpu.get_speed = cpu_im_get_speed;
+  surf_cpu_model->extension.cpu.get_state = cpu_get_state;
+  surf_cpu_model->extension.cpu.get_speed = cpu_get_speed;
   surf_cpu_model->extension.cpu.get_available_speed =
-      cpu_im_get_available_speed;
-  surf_cpu_model->extension.cpu.create_resource = cpu_im_create_resource;
-  surf_cpu_model->extension.cpu.add_traces = cpu_im_add_traces_cpu;
+      cpu_get_available_speed;
+  surf_cpu_model->extension.cpu.create_resource = cpu_create_resource;
+  surf_cpu_model->extension.cpu.add_traces = cpu_add_traces_cpu;
 
-  if (!cpu_im_maxmin_system) {
-    sg_maxmin_selective_update = 1;
-    cpu_im_maxmin_system = lmm_system_new();
+  if (!cpu_maxmin_system) {
+    cpu_maxmin_system = lmm_system_new(selective_update);
+  }
+  if(cpu_update_mechanism == UM_LAZY){
+    cpu_action_heap = xbt_heap_new(8, NULL);
+    xbt_heap_set_update_callback(cpu_action_heap,
+                                 cpu_action_update_index_heap);
+    cpu_modified_cpu =
+        xbt_swag_new(xbt_swag_offset(cpu, modified_cpu_hookup));
   }
-  cpu_im_action_heap = xbt_heap_new(8, NULL);
-  xbt_heap_set_update_callback(cpu_im_action_heap,
-                               cpu_im_action_update_index_heap);
-  cpu_im_modified_cpu =
-      xbt_swag_new(xbt_swag_offset(cpu, modified_cpu_hookup));
 }
 
 /*********************************************************************/
@@ -689,11 +728,30 @@ static void surf_cpu_im_model_init_internal(void)
 /*   note =         "Available at */
 /*                  \url{http://grail.sdsc.edu/papers/simgrid_ccgrid01.ps.gz}." */
 /* } */
-void surf_cpu_model_init_Cas01_im(const char *filename)
+
+void surf_cpu_model_init_Cas01()
 {
+  char *optim = xbt_cfg_get_string(_surf_cfg_set, "cpu/optim");
+  int select = xbt_cfg_get_int(_surf_cfg_set, "cpu/maxmin_selective_update");
+
+  if(!strcmp(optim,"Full")) {
+    cpu_update_mechanism = UM_FULL;
+    selective_update = select;
+  } else if (!strcmp(optim,"Lazy")) {
+    cpu_update_mechanism = UM_LAZY;
+    selective_update = 1;
+    xbt_assert((select==1) || (xbt_cfg_is_default_value(_surf_cfg_set,"cpu/maxmin_selective_update")),
+        "Disabling selective update while using the lazy update mechanism is dumb!");
+  } else if (!strcmp(optim,"TI")) {
+    surf_cpu_model_init_ti();
+    return;
+  } else {
+    xbt_die("Unsupported optimization (%s) for this model",optim);
+  }
+
   if (surf_cpu_model)
     return;
-  surf_cpu_im_model_init_internal();
-  cpu_im_define_callbacks(filename);
+  surf_cpu_model_init_internal();
+  cpu_define_callbacks();
   xbt_dynar_push(model_list, &surf_cpu_model);
 }
index 47a3e3e..0b9f262 100644 (file)
@@ -14,7 +14,7 @@
 #include "trace_mgr_private.h"
 #include "cpu_ti_private.h"
 #include "xbt/heap.h"
-
+#include "surf/surf_resource.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_ti, surf,
                                 "Logging specific to the SURF CPU TRACE INTEGRATION module");
@@ -50,10 +50,8 @@ static int surf_cpu_ti_binary_search(double *array, double a, int low,
 
 static void surf_cpu_ti_free_trace(surf_cpu_ti_trace_t trace)
 {
-  if (trace->time_points)
-    xbt_free(trace->time_points);
-  if (trace->integral)
-    xbt_free(trace->integral);
+  xbt_free(trace->time_points);
+  xbt_free(trace->integral);
   xbt_free(trace);
 }
 
@@ -144,7 +142,7 @@ static surf_cpu_ti_tgmr_t cpu_ti_parse_trace(tmgr_trace_t power_trace,
 }
 
 
-static cpu_ti_t cpu_ti_new(char *name, double power_peak,
+static void* cpu_ti_create_resource(const char *name, double power_peak,
                            double power_scale,
                            tmgr_trace_t power_trace,
                            int core,
@@ -154,17 +152,17 @@ static cpu_ti_t cpu_ti_new(char *name, double power_peak,
 {
   tmgr_trace_t empty_trace;
   s_tmgr_event_t val;
-  cpu_ti_t cpu = xbt_new0(s_cpu_ti_t, 1);
+  cpu_ti_t cpu = NULL;
   s_surf_action_cpu_ti_t ti_action;
+  xbt_assert(core==1,"Multi-core not handled with this model yet");
   xbt_assert(!surf_cpu_resource_by_name(name),
               "Host '%s' declared several times in the platform file",
               name);
   xbt_assert(core==1,"Multi-core not handled with this model yet");
+  cpu = (cpu_ti_t) surf_resource_new(sizeof(s_cpu_ti_t),
+          surf_cpu_model, name,cpu_properties);
   cpu->action_set =
       xbt_swag_new(xbt_swag_offset(ti_action, cpu_list_hookup));
-  cpu->generic_resource.model = surf_cpu_model;
-  cpu->generic_resource.name = name;
-  cpu->generic_resource.properties = cpu_properties;
   cpu->power_peak = power_peak;
   xbt_assert(cpu->power_peak > 0, "Power has to be >0");
   XBT_DEBUG("power scale %lf", power_scale);
@@ -191,33 +189,16 @@ static cpu_ti_t cpu_ti_new(char *name, double power_peak,
 }
 
 
-static void parse_cpu_ti_init(void)
+static void parse_cpu_ti_init(sg_platf_host_cbarg_t host)
 {
-  double power_peak = 0.0;
-  double power_scale = 0.0;
-  int core = 0;
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial = SURF_RESOURCE_OFF;
-  tmgr_trace_t state_trace = NULL;
-
-  power_peak = get_cpu_power(A_surfxml_host_power);
-  surf_parse_get_double(&power_scale, A_surfxml_host_availability);
-  power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
-  surf_parse_get_int(&core, A_surfxml_host_core);
-
-  xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) ||
-              (A_surfxml_host_state == A_surfxml_host_state_OFF),
-              "Invalid state");
-  if (A_surfxml_host_state == A_surfxml_host_state_ON)
-    state_initial = SURF_RESOURCE_ON;
-  if (A_surfxml_host_state == A_surfxml_host_state_OFF)
-    state_initial = SURF_RESOURCE_OFF;
-  state_trace = tmgr_trace_new(A_surfxml_host_state_file);
-
-  cpu_ti_new(xbt_strdup(A_surfxml_host_id), power_peak, power_scale,
-             power_trace, core, state_initial, state_trace,
-             current_property_set);
-  current_property_set = NULL;
+  cpu_ti_create_resource(host->id,
+                         host->power_peak,
+                         host->power_scale,
+                         host->power_trace,
+                         host->core_amount,
+                         host->initial_state,
+                         host->state_trace,
+                         host->properties);
 
 }
 
@@ -278,10 +259,10 @@ static void add_traces_cpu_ti(void)
   }
 }
 
-static void cpu_ti_define_callbacks(const char *file)
+static void cpu_ti_define_callbacks()
 {
-  surfxml_add_callback(ETag_surfxml_host_cb_list, parse_cpu_ti_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_traces_cpu_ti);
+  sg_platf_host_add_cb(parse_cpu_ti_init);
+  sg_platf_postparse_add_cb(add_traces_cpu_ti);
 }
 
 static int cpu_ti_resource_used(void *resource_id)
@@ -700,8 +681,8 @@ static double cpu_ti_action_get_remains(surf_action_t action)
   cpu_ti_update_remaining_amount((cpu_ti_t)
                                  ((surf_action_cpu_ti_t) action)->cpu,
                                  surf_get_clock());
-  return action->remains;
   XBT_OUT();
+  return action->remains;
 }
 
 static e_surf_resource_state_t cpu_ti_get_state(void *cpu)
@@ -733,7 +714,7 @@ static double surf_cpu_ti_get_power_scale(surf_cpu_ti_tgmr_t trace,
   point =
       surf_cpu_ti_binary_search(trace->trace->time_points, reduced_a, 0,
                                 trace->trace->nb_points - 1);
-  xbt_dynar_get_cpy(trace->power_trace->event_list, 0, &val);
+  xbt_dynar_get_cpy(trace->power_trace->event_list, point, &val);
   return val.value;
 }
 
@@ -746,19 +727,6 @@ static double cpu_ti_get_available_speed(void *cpu)
   return CPU->power_scale;
 }
 
-static void cpu_ti_create_resource(char *name, double power_peak,
-                                   double power_scale,
-                                   tmgr_trace_t power_trace,
-                                   int core,
-                                   e_surf_resource_state_t state_initial,
-                                   tmgr_trace_t state_trace,
-                                   xbt_dict_t cpu_properties)
-{
-       xbt_assert(core==1,"Multi-core not handled with this model yet");
-  cpu_ti_new(name, power_peak, power_scale, power_trace, core,
-             state_initial, state_trace, cpu_properties);
-}
-
 static void cpu_ti_finalize(void)
 {
   void **cpu;
@@ -797,7 +765,7 @@ static void surf_cpu_ti_model_init_internal(void)
   cpu_ti_modified_cpu =
       xbt_swag_new(xbt_swag_offset(cpu, modified_cpu_hookup));
 
-  surf_cpu_model->name = "CPU_TI";
+  surf_cpu_model->name = "cpu_ti";
 
   surf_cpu_model->action_unref = cpu_ti_action_unref;
   surf_cpu_model->action_cancel = cpu_ti_action_cancel;
@@ -834,12 +802,12 @@ static void surf_cpu_ti_model_init_internal(void)
 
 }
 
-void surf_cpu_model_init_ti(const char *filename)
+void surf_cpu_model_init_ti()
 {
   if (surf_cpu_model)
     return;
   surf_cpu_ti_model_init_internal();
-  cpu_ti_define_callbacks(filename);
+  cpu_ti_define_callbacks();
   xbt_dynar_push(model_list, &surf_cpu_model);
 }
 
@@ -1103,18 +1071,21 @@ static double surf_cpu_ti_solve_trace_simple(surf_cpu_ti_trace_t trace,
 static int surf_cpu_ti_binary_search(double *array, double a, int low,
                                      int high)
 {
-  int mid = low + (high - low) / 2;
-  XBT_DEBUG("a %lf low %d high %d mid %d value %lf", a, low, high, mid,
-         array[mid]);
-  /* a == array[mid] */
-  if (array[mid] == a)
-    return mid;
-  /* a is between mid and mid+1 */
-  if (array[mid] < a && array[mid + 1] > a)
-    return mid;
-
-  if (array[mid] < a)
-    return surf_cpu_ti_binary_search(array, a, mid + 1, high);
-  else
-    return surf_cpu_ti_binary_search(array, a, low, mid - 1);
+  xbt_assert(low < high, "Wrong parameters: low (%d) should be smaller than"
+      " high (%d)", low, high);
+
+  int mid;
+  do {
+    mid = low + (high - low) / 2;
+    XBT_DEBUG("a %lf low %d high %d mid %d value %lf", a, low, high, mid,
+        array[mid]);
+
+    if (array[mid] > a)
+      high = mid;
+    else
+      low = mid;
+  }
+  while (low < high - 1);
+
+  return low;
 }
index ce44b58..aa9c4fa 100644 (file)
@@ -172,9 +172,7 @@ void bottleneck_solve(lmm_system_t sys)
     }
   } while (xbt_swag_size(var_list));
 
-  xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) {
-    xbt_swag_remove(cnst, cnst_list);
-  }
+  xbt_swag_reset(cnst_list);
   sys->modified = 0;
   if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) {
     XBT_DEBUG("Fair bottleneck done");
index 0d366a4..0d41371 100644 (file)
@@ -1,4 +1,3 @@
-/*     $Id$     */
 /* Copyright (c) 2007 Kayo Fujiwara. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
index dc750d3..626d2ca 100644 (file)
@@ -1,4 +1,3 @@
-/*     $Id$     */
 /* Copyright (c) 2007 Kayo Fujiwara. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
index 7f99136..d3f2f13 100644 (file)
@@ -1,5 +1,3 @@
-/* $ID$ */
-
 /* Copyright (c) 2007 Kayo Fujiwara. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
index 0f2a2a2..a73ad4d 100644 (file)
@@ -1,5 +1,3 @@
-/* $ID$ */
-
 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
  * All rights reserved.                                                     */
 
index 9fc36c9..c04dcde 100644 (file)
@@ -37,8 +37,6 @@ void lagrange_solve(lmm_system_t sys);
 //computes the value of the dichotomy using a initial values, init, with a specific variable or constraint
 static double dichotomy(double init, double diff(double, void *),
                         void *var_cnst, double min_error);
-//computes the value of the differential of variable param_var applied to mu  
-static double partial_diff_mu(double mu, void *param_var);
 //computes the value of the differential of constraint param_cnst applied to lambda  
 static double partial_diff_lambda(double lambda, void *param_cnst);
 
index 2efcd6f..c7f2d8e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -19,16 +19,15 @@ double sg_maxmin_precision = 0.00001;
 
 static void *lmm_variable_mallocator_new_f(void);
 static void lmm_variable_mallocator_free_f(void *var);
-static void lmm_variable_mallocator_reset_f(void *var);
+#define lmm_variable_mallocator_reset_f ((void_f_pvoid_t)NULL)
 static void lmm_update_modified_set(lmm_system_t sys,
                                     lmm_constraint_t cnst);
 static void lmm_remove_all_modified_set(lmm_system_t sys);
-int sg_maxmin_selective_update = 1;
 static int Global_debug_id = 1;
 static int Global_const_debug_id = 1;
 extern xbt_swag_t keep_track;
 
-lmm_system_t lmm_system_new(void)
+lmm_system_t lmm_system_new(int selective_update)
 {
   lmm_system_t l = NULL;
   s_lmm_variable_t var;
@@ -37,7 +36,7 @@ lmm_system_t lmm_system_new(void)
   l = xbt_new0(s_lmm_system_t, 1);
 
   l->modified = 0;
-  l->selective_update_active = sg_maxmin_selective_update;
+  l->selective_update_active = selective_update;
 
   XBT_DEBUG("Setting selective_update_active flag to %d\n",
          l->selective_update_active);
@@ -117,7 +116,7 @@ static XBT_INLINE void lmm_cnst_free(lmm_system_t sys,
 {
 /*   xbt_assert(xbt_swag_size(&(cnst->element_set)), */
 /*           "This list should be empty!"); */
-  remove_active_constraint(sys, cnst);
+  make_constraint_inactive(sys, cnst);
   free(cnst);
 }
 
@@ -173,11 +172,6 @@ static void lmm_variable_mallocator_free_f(void *var)
   xbt_free(var);
 }
 
-static void lmm_variable_mallocator_reset_f(void *var)
-{
-  /* lmm_variable_new() initializes everything */
-}
-
 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
                                 double weight,
                                 double bound, int number_of_constraints)
@@ -423,8 +417,7 @@ void lmm_print(lmm_system_t sys)
   trace_buf =
       xbt_realloc(trace_buf, strlen(trace_buf) + strlen(print_buf) + 1);
   strcat(trace_buf, print_buf);
-  fprintf(stderr, "%s", trace_buf);
-  //XBT_DEBUG("%20s", trace_buf); FIXME
+  XBT_DEBUG("%20s", trace_buf);
   trace_buf[0] = '\000';
 
   XBT_DEBUG("Constraints");
@@ -466,8 +459,7 @@ void lmm_print(lmm_system_t sys)
                       strlen(trace_buf) + strlen(print_buf) + 1);
       strcat(trace_buf, print_buf);
     }
-    //   XBT_DEBUG("%s", trace_buf);
-    fprintf(stderr, "%s\n", trace_buf);
+    XBT_DEBUG("%s", trace_buf);
     trace_buf[0] = '\000';
     xbt_assert(!double_positive(sum - cnst->bound),
                 "Incorrect value (%f is not smaller than %f): %g",
@@ -631,9 +623,6 @@ void lmm_solve(lmm_system_t sys)
     }
 
     /* Find out which variables reach the maximum */
-    cnst_list =
-        sys->selective_update_active ? &(sys->modified_constraint_set) :
-        &(sys->active_constraint_set);
     min_usage = -1;
     min_bound = -1;
     xbt_swag_foreach(cnst, cnst_list) {
@@ -818,12 +807,5 @@ static void lmm_update_modified_set(lmm_system_t sys,
  */
 static void lmm_remove_all_modified_set(lmm_system_t sys)
 {
-  lmm_element_t elem = NULL;
-  lmm_element_t elem_next = NULL;
-  xbt_swag_t elem_list = NULL;
-
-  elem_list = &(sys->modified_constraint_set);
-  xbt_swag_foreach_safe(elem, elem_next, elem_list) {
-    xbt_swag_remove(elem, elem_list);
-  }
+  xbt_swag_reset(&sys->modified_constraint_set);
 }
index 7b82d55..30f1589 100644 (file)
@@ -30,16 +30,16 @@ typedef struct lmm_constraint {
   s_xbt_swag_hookup_t modified_constraint_set_hookup;
   s_xbt_swag_hookup_t saturated_constraint_set_hookup;
 
-  s_xbt_swag_t element_set;     /* a list of lmm_mat_element_t */
-  s_xbt_swag_t active_element_set;      /* a list of lmm_mat_element_t */
+  s_xbt_swag_t element_set;     /* a list of lmm_element_t */
+  s_xbt_swag_t active_element_set;      /* a list of lmm_element_t */
   double bound;
   double lambda;
   double new_lambda;
   double remaining;
-  int shared;
   double usage;
   void *id;
   int id_int;
+  int shared;
 } s_lmm_constraint_t;
 
 typedef struct lmm_variable {
@@ -80,16 +80,15 @@ typedef struct lmm_system {
   xbt_mallocator_t variable_mallocator;
 } s_lmm_system_t;
 
-#define extract_variable(sys) xbt_swag_remove(xbt_swag_getFirst(&(sys->variable_set)),&(sys->variable_set))
-#define extract_constraint(sys) xbt_swag_remove(xbt_swag_getFirst(&(sys->constraint_set)),&(sys->constraint_set))
+#define extract_variable(sys) xbt_swag_extract(&(sys->variable_set))
+#define extract_constraint(sys) xbt_swag_extract(&(sys->constraint_set))
 #define insert_constraint(sys,cnst) xbt_swag_insert(cnst,&(sys->constraint_set))
 #define remove_variable(sys,var) do {xbt_swag_remove(var,&(sys->variable_set));\
                                  xbt_swag_remove(var,&(sys->saturated_variable_set));} while(0)
 #define remove_constraint(sys,cnst) do {xbt_swag_remove(cnst,&(sys->constraint_set));\
                                         xbt_swag_remove(cnst,&(sys->saturated_constraint_set));} while(0)
-#define remove_active_constraint(sys,cnst) xbt_swag_remove(cnst,&(sys->active_constraint_set))
 #define make_constraint_active(sys,cnst) xbt_swag_insert(cnst,&(sys->active_constraint_set))
-#define make_constraint_inactive(sys,cnst) remove_active_constraint(sys,cnst)
+#define make_constraint_inactive(sys,cnst) xbt_swag_remove(cnst,&(sys->active_constraint_set))
 
 static void lmm_var_free(lmm_system_t sys, lmm_variable_t var);
 static XBT_INLINE void lmm_cnst_free(lmm_system_t sys,
index 6e6e794..e81a17d 100644 (file)
@@ -1,4 +1,12 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+
+/*
+ * Network with improved management of tasks, IM (Improved Management).
+ * Uses a heap to store actions so that the share_resources is faster.
+ * This model automatically sets the selective update flag to 1 and is
+ * highly dependent on the maxmin lmm module.
+ */
+
+/* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,6 +16,17 @@
 #include "xbt/log.h"
 #include "xbt/str.h"
 
+#include "surf_private.h"
+#include "xbt/dict.h"
+#include "maxmin_private.h"
+#include "surf/surfxml_parse_values.h"
+#include "surf/surf_resource.h"
+#include "surf/surf_resource_lmm.h"
+
+#undef GENERIC_ACTION
+#define GENERIC_ACTION(action) action->generic_action
+
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network, surf,
                                 "Logging specific to the SURF network module");
 
@@ -21,67 +40,43 @@ double sg_bandwidth_factor = 1.0;       /* default value; can be set by model or
 double sg_weight_S_parameter = 0.0;     /* default value; can be set by model or from command line */
 
 double sg_tcp_gamma = 0.0;
-int sg_network_fullduplex = 0;
+int sg_network_crosstraffic = 0;
 
 xbt_dict_t gap_lookup = NULL;
 
-static double net_get_link_bandwidth(const void *link);
+e_UM_t network_update_mechanism = UM_UNDEFINED;
+static int selective_update = 0;
 
-static void gap_append(double size, const link_CM02_t link, surf_action_network_CM02_t action) {
-   const char* src = link->lmm_resource.generic_resource.name;
-   xbt_fifo_t fifo;
-   surf_action_network_CM02_t last_action;
-   double bw;
+static int net_action_is_suspended(surf_action_t action);
+static void update_action_remaining(double now);
 
-   if(sg_sender_gap > 0.0) {
-      if(!gap_lookup) {
-         gap_lookup = xbt_dict_new();
-      }
-      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, src);
-      action->sender.gap = 0.0;
-      if(fifo && xbt_fifo_size(fifo) > 0) {
-         /* Compute gap from last send */
-         last_action = (surf_action_network_CM02_t)xbt_fifo_get_item_content(xbt_fifo_get_last_item(fifo));
-         bw = net_get_link_bandwidth(link);
-         action->sender.gap = last_action->sender.gap + max(sg_sender_gap, last_action->sender.size / bw);
-         action->latency += action->sender.gap;
-      }
-      /* Append action as last send */
-      action->sender.link_name = link->lmm_resource.generic_resource.name;
-      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, action->sender.link_name);
-      if(!fifo) {
-         fifo = xbt_fifo_new();
-         xbt_dict_set(gap_lookup, action->sender.link_name, fifo, NULL);
-      }
-      action->sender.fifo_item = xbt_fifo_push(fifo, action);
-      action->sender.size = size;
-   }
-}
+static xbt_swag_t net_modified_set = NULL;
+static xbt_heap_t net_action_heap = NULL;
+xbt_swag_t keep_track = NULL;
 
-static void gap_unknown(surf_action_network_CM02_t action) {
-   action->sender.gap = 0.0;
-   action->sender.link_name = NULL;
-   action->sender.fifo_item = NULL;
-   action->sender.size = 0.0;
+/* added to manage the communication action's heap */
+static void net_action_update_index_heap(void *action, int i)
+{
+  ((surf_action_network_CM02_t) action)->index_heap = i;
 }
 
-static void gap_remove(surf_action_network_CM02_t action) {
-   xbt_fifo_t fifo;
-   size_t size;
+/* insert action on heap using a given key and a hat (heap_action_type)
+ * a hat can be of three types for communications:
+ *
+ * NORMAL = this is a normal heap entry stating the date to finish transmitting
+ * LATENCY = this is a heap entry to warn us when the latency is payed
+ * MAX_DURATION =this is a heap entry to warn us when the max_duration limit is reached
+ */
+static void heap_insert(surf_action_network_CM02_t    action, double key, enum heap_action_type hat){
+  action->hat = hat;
+  xbt_heap_push(net_action_heap, action, key);
+}
 
-   if(sg_sender_gap > 0.0 && action->sender.link_name && action->sender.fifo_item) {
-      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, action->sender.link_name);
-      xbt_fifo_remove_item(fifo, action->sender.fifo_item);
-      size = xbt_fifo_size(fifo);
-      if(size == 0) {
-         xbt_fifo_free(fifo);
-         xbt_dict_remove(gap_lookup, action->sender.link_name);
-         size = xbt_dict_size(gap_lookup);
-         if(size == 0) {
-            xbt_dict_free(&gap_lookup);
-         }
-      }
-   }
+static void heap_remove(surf_action_network_CM02_t action){
+  action->hat = NONE;
+  if(((surf_action_network_CM02_t) action)->index_heap >= 0){
+      xbt_heap_remove(net_action_heap,action->index_heap);
+  }
 }
 
 /******************************************************************************/
@@ -103,23 +98,15 @@ static double constant_bandwidth_constraint(double rate, double bound,
   return rate;
 }
 
-/**--------- <copy/paste C code snippet in surf/network.c> -------------
-  * produced by:
-  * ./regression2.py ./pingpong-in.dat 0.15 100 2 2.4e-5 1.25e8
-  * outliers: 65
-  * gnuplot: 
-    plot "./pingpong-in.dat" using 1:2 with lines title "data", \
-        (x >= 65472) ? 0.00850436*x+558.894 : \
-        (x >= 15424) ? 0.0114635*x+167.446 : \
-        (x >= 9376) ? 0.0136219*x+124.464 : \
-        (x >= 5776) ? 0.00735707*x+105.022 : \
-        (x >= 3484) ? 0.0103235*x+90.2886 : \
-        (x >= 1426) ? 0.0131384*x+77.3159 : \
-        (x >= 732) ? 0.0233927*x+93.6146 : \
-        (x >= 257) ? 0.0236608*x+93.7637 : \
-        (x >= 0) ? 0.00985119*x+96.704 : \
-        1.0 with lines title "piecewise function"
-  *-------------------------------------------------------------------*/
+/**********************/
+/*   SMPI callbacks   */
+/**********************/
+static double smpi_latency_factor(double size)
+{
+  /* 1 B <= size <= 1 KiB */
+  if (size <= 1024.0) {
+    return 1.0056;
+  }
 
 static double smpi_bandwidth_factor(double size)
 {
@@ -158,7 +145,6 @@ static double smpi_bandwidth_constraint(double rate, double bound,
   return rate < 0 ? bound : min(bound, rate * smpi_bandwidth_factor(size));
 }
 
-
 static double (*latency_factor_callback) (double) =
     &constant_latency_factor;
 static double (*bandwidth_factor_callback) (double) =
@@ -166,8 +152,10 @@ static double (*bandwidth_factor_callback) (double) =
 static double (*bandwidth_constraint_callback) (double, double, double) =
     &constant_bandwidth_constraint;
 
+static void (*gap_append) (double, const link_CM02_t, surf_action_network_CM02_t) = NULL;
+static void (*gap_remove) (surf_action_network_CM02_t) = NULL;
 
-static link_CM02_t net_link_new(char *name,
+static void* net_create_resource(const char *name,
                                 double bw_initial,
                                 tmgr_trace_t bw_trace,
                                 double lat_initial,
@@ -204,75 +192,44 @@ static link_CM02_t net_link_new(char *name,
   return nw_link;
 }
 
-static void net_parse_link_init(void)
-{
-  char *name_link;
-  double bw_initial;
-  tmgr_trace_t bw_trace;
-  double lat_initial;
-  tmgr_trace_t lat_trace;
-  e_surf_resource_state_t state_initial_link = SURF_RESOURCE_ON;
-  e_surf_link_sharing_policy_t policy_initial_link = SURF_LINK_SHARED;
-  tmgr_trace_t state_trace;
-  XBT_DEBUG("link_CM02");
-  name_link = xbt_strdup(A_surfxml_link_id);
-  surf_parse_get_double(&bw_initial, A_surfxml_link_bandwidth);
-  bw_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
-  surf_parse_get_double(&lat_initial, A_surfxml_link_latency);
-  lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
-
-  xbt_assert((A_surfxml_link_state == A_surfxml_link_state_ON)
-              || (A_surfxml_link_state ==
-                  A_surfxml_link_state_OFF), "Invalid state");
-  if (A_surfxml_link_state == A_surfxml_link_state_ON)
-    state_initial_link = SURF_RESOURCE_ON;
-  else if (A_surfxml_link_state == A_surfxml_link_state_OFF)
-    state_initial_link = SURF_RESOURCE_OFF;
-
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_SHARED)
-    policy_initial_link = SURF_LINK_SHARED;
-  else
-         {
-         if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FATPIPE)
-                 policy_initial_link = SURF_LINK_FATPIPE;
-         else if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
-                 policy_initial_link = SURF_LINK_FULLDUPLEX;
-         }
-
-  state_trace = tmgr_trace_new(A_surfxml_link_state_file);
-
-  if(policy_initial_link == SURF_LINK_FULLDUPLEX)
-  {
-         net_link_new(bprintf("%s_UP",name_link), bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
-         net_link_new(bprintf("%s_DOWN",name_link), bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
+static void net_parse_link_init(sg_platf_link_cbarg_t link)
+{
+  if(link->policy == SURF_LINK_FULLDUPLEX){
+    char *link_id;
+    link_id = bprintf("%s_UP", link->id);
+         net_create_resource(link_id,
+                           link->bandwidth,
+                           link->bandwidth_trace,
+                           link->latency,
+                           link->latency_trace,
+                           link->state,
+                           link->state_trace,
+                           link->policy,
+                           link->properties);
+         xbt_free(link_id);
+    link_id = bprintf("%s_DOWN", link->id);
+    net_create_resource(link_id,
+                        link->bandwidth,
+                        link->bandwidth_trace,
+                        link->latency,
+                        link->latency_trace,
+                        link->state,
+                        link->state_trace,
+                        link->policy,
+                        link->properties);
+    xbt_free(link_id);
   }
-  else
-  {
-         net_link_new(name_link, bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
+  else{
+    net_create_resource(link->id,
+                        link->bandwidth,
+                        link->bandwidth_trace,
+                        link->latency,
+                        link->latency_trace,
+                        link->state,
+                        link->state_trace,
+                        link->policy,
+                        link->properties);
   }
-
-}
-
-static void net_create_resource(char *name,
-                                double bw_initial,
-                                tmgr_trace_t bw_trace,
-                                double lat_initial,
-                                tmgr_trace_t lat_trace,
-                                e_surf_resource_state_t
-                                state_initial,
-                                tmgr_trace_t state_trace,
-                                e_surf_link_sharing_policy_t policy,
-                                xbt_dict_t properties)
-{
-  net_link_new(name, bw_initial, bw_trace,
-               lat_initial, lat_trace, state_initial, state_trace,
-               policy, xbt_dict_new());
 }
 
 static void net_add_traces(void)
@@ -289,7 +246,7 @@ static void net_add_traces(void)
   xbt_dict_foreach(trace_connect_list_link_avail, cursor, trace_name, elm) {
     tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
     link_CM02_t link =
-        xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
+               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
 
     xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
                 trace_name, elm);
@@ -331,11 +288,11 @@ static void net_add_traces(void)
   }
 }
 
-static void net_define_callbacks(const char *file)
+static void net_define_callbacks(void)
 {
   /* Figuring out the network links */
-  surfxml_add_callback(STag_surfxml_link_cb_list, &net_parse_link_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &net_add_traces);
+  sg_platf_link_add_cb(net_parse_link_init);
+  sg_platf_postparse_add_cb(net_add_traces);
 }
 
 static int net_resource_used(void *resource_id)
@@ -350,14 +307,18 @@ static int net_action_unref(surf_action_t action)
   action->refcount--;
   if (!action->refcount) {
     xbt_swag_remove(action, action->state_set);
-    if (((surf_action_network_CM02_t) action)->variable)
+    if (((surf_action_network_CM02_t) action)->variable){
       lmm_variable_free(network_maxmin_system,
                         ((surf_action_network_CM02_t) action)->variable);
+    }
+    if(network_update_mechanism == UM_LAZY){// remove action from the heap
+      heap_remove((surf_action_network_CM02_t) action);
+      xbt_swag_remove(action, net_modified_set);
+    }
 #ifdef HAVE_TRACING
     xbt_free(((surf_action_network_CM02_t) action)->src_name);
     xbt_free(((surf_action_network_CM02_t) action)->dst_name);
-    if (action->category)
-      xbt_free(action->category);
+    xbt_free(action->category);
 #endif
     surf_action_free(&action);
     return 1;
@@ -365,9 +326,15 @@ static int net_action_unref(surf_action_t action)
   return 0;
 }
 
+
+
 static void net_action_cancel(surf_action_t action)
 {
   surf_network_model->action_state_set(action, SURF_ACTION_FAILED);
+  if(network_update_mechanism == UM_LAZY){// remove action from the heap
+    xbt_swag_remove(action, net_modified_set);
+    heap_remove((surf_action_network_CM02_t) action);
+  }
 }
 
 void net_action_recycle(surf_action_t action)
@@ -376,7 +343,7 @@ void net_action_recycle(surf_action_t action)
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-int net_get_link_latency_limited(surf_action_t action)
+static int net_get_link_latency_limited(surf_action_t action)
 {
   return action->latency_limited;
 }
@@ -384,10 +351,48 @@ int net_get_link_latency_limited(surf_action_t action)
 
 double net_action_get_remains(surf_action_t action)
 {
+  if(network_update_mechanism == UM_LAZY)/* update remains before return it */
+    update_action_remaining(surf_get_clock());
   return action->remains;
 }
 
-static double net_share_resources(double now)
+static void update_action_remaining(double now){
+  surf_action_network_CM02_t action = NULL;
+  double delta = 0.0;
+
+  xbt_swag_foreach(action, net_modified_set) {
+
+    if(action->suspended != 0){
+        continue;
+    }
+
+    delta = now - action->last_update;
+
+    double_update(&(action->generic_action.remains),
+                  lmm_variable_getvalue(action->variable) * delta);
+
+    if (action->generic_action.max_duration != NO_MAX_DURATION)
+      double_update(&(action->generic_action.max_duration), delta);
+
+    if ((action->generic_action.remains <= 0) &&
+        (lmm_get_variable_weight(action->variable) > 0)) {
+      action->generic_action.finish = surf_get_clock();
+      surf_network_model->action_state_set((surf_action_t) action,
+                                           SURF_ACTION_DONE);
+      heap_remove(action);
+    } else if ((action->generic_action.max_duration != NO_MAX_DURATION)
+               && (action->generic_action.max_duration <= 0)) {
+      action->generic_action.finish = surf_get_clock();
+      surf_network_model->action_state_set((surf_action_t) action,
+                                           SURF_ACTION_DONE);
+      heap_remove(action);
+    }
+
+    action->last_update = now;
+  }
+}
+
+static double net_share_resources_full(double now)
 {
   s_surf_action_network_CM02_t s_action;
   surf_action_network_CM02_t action = NULL;
@@ -412,10 +417,7 @@ static double net_share_resources(double now)
     }
 #endif
     if (action->latency > 0) {
-      if (min < 0)
-        min = action->latency;
-      else if (action->latency < min)
-        min = action->latency;
+      min = (min<0)?action->latency:min(min,action->latency);
     }
   }
 
@@ -424,7 +426,81 @@ static double net_share_resources(double now)
   return min;
 }
 
-static void net_update_actions_state(double now, double delta)
+static double net_share_resources_lazy(double now)
+{
+  surf_action_network_CM02_t action = NULL;
+  double min=-1;
+  double value;
+
+  XBT_DEBUG("Before share resources, the size of modified actions set is %d", xbt_swag_size(net_modified_set));
+  update_action_remaining(now);
+
+  keep_track = net_modified_set;
+  lmm_solve(network_maxmin_system);
+  keep_track = NULL;
+
+  XBT_DEBUG("After share resources, The size of modified actions set is %d", xbt_swag_size(net_modified_set));
+
+  xbt_swag_foreach(action, net_modified_set) {
+    int max_dur_flag = 0;
+
+    if (GENERIC_ACTION(action).state_set != surf_network_model->states.running_action_set){
+      continue;
+    }
+
+    /* bogus priority, skip it */
+    if (GENERIC_ACTION(action).priority <= 0){
+      continue;
+    }
+
+    min = -1;
+    value = lmm_variable_getvalue(action->variable);
+    if (value > 0) {
+      if (GENERIC_ACTION(action).remains > 0) {
+        value = GENERIC_ACTION(action).remains / value;
+        min = now + value;
+      } else {
+        value = 0.0;
+        min = now;
+      }
+    }
+
+    if ((GENERIC_ACTION(action).max_duration != NO_MAX_DURATION)
+        && (min == -1
+            || GENERIC_ACTION(action).start +
+            GENERIC_ACTION(action).max_duration < min)){
+      min =   GENERIC_ACTION(action).start +
+          GENERIC_ACTION(action).max_duration;
+      max_dur_flag = 1;
+    }
+
+    XBT_DEBUG("Action(%p) Start %lf Finish %lf Max_duration %lf", action,
+        GENERIC_ACTION(action).start, now + value,
+        GENERIC_ACTION(action).max_duration);
+
+    if (action->index_heap >= 0) {
+      heap_remove((surf_action_network_CM02_t) action);
+    }
+
+    if (min != -1) {
+      heap_insert((surf_action_network_CM02_t) action, min, max_dur_flag?MAX_DURATION:NORMAL);
+      XBT_DEBUG("Insert at heap action(%p) min %lf now %lf", action, min, now);
+    }
+  }
+
+  //hereafter must have already the min value for this resource model
+  if(xbt_heap_size(net_action_heap) > 0 ){
+    min = xbt_heap_maxkey(net_action_heap) - now ;
+  }else{
+    min = -1;
+  }
+
+  XBT_DEBUG("The minimum with the HEAP %lf", min);
+
+  return min;
+}
+
+static void net_update_actions_state_full(double now, double delta)
 {
   double deltap = 0.0;
   surf_action_network_CM02_t action = NULL;
@@ -452,8 +528,8 @@ static void net_update_actions_state(double now, double delta)
     }
 #ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
-      xbt_dynar_t route = global_routing->get_route(action->src_name,
-                                                    action->dst_name);
+      xbt_dynar_t route=NULL;
+      routing_get_route_and_latency(action->src_name, action->dst_name,&route,NULL);
       link_CM02_t link;
       unsigned int i;
       xbt_dynar_foreach(route, i, link) {
@@ -467,12 +543,12 @@ static void net_update_actions_state(double now, double delta)
     }
 #endif
     if(!lmm_get_number_of_cnst_from_var(network_maxmin_system, action->variable)) {
-                               /* There is actually no link used, hence an infinite bandwidth.
-                                * This happens often when using models like vivaldi.
-                                * In such case, just make sure that the action completes immediately.
-                                */
-       double_update(&(action->generic_action.remains),
-                       action->generic_action.remains);
+        /* There is actually no link used, hence an infinite bandwidth.
+         * This happens often when using models like vivaldi.
+         * In such case, just make sure that the action completes immediately.
+         */
+      double_update(&(action->generic_action.remains),
+          action->generic_action.remains);
     }
     double_update(&(action->generic_action.remains),
                   lmm_variable_getvalue(action->variable) * deltap);
@@ -484,19 +560,51 @@ static void net_update_actions_state(double now, double delta)
       action->generic_action.finish = surf_get_clock();
       surf_network_model->action_state_set((surf_action_t) action,
                                            SURF_ACTION_DONE);
-      gap_remove(action);
+
+      if(gap_remove) gap_remove(action);
     } else if ((action->generic_action.max_duration != NO_MAX_DURATION)
                && (action->generic_action.max_duration <= 0)) {
       action->generic_action.finish = surf_get_clock();
       surf_network_model->action_state_set((surf_action_t) action,
                                            SURF_ACTION_DONE);
-      gap_remove(action);
+      if(gap_remove) gap_remove(action);
     }
   }
 
   return;
 }
 
+static void net_update_actions_state_lazy(double now, double delta)
+{
+  surf_action_network_CM02_t action = NULL;
+
+  while ((xbt_heap_size(net_action_heap) > 0)
+         && (double_equals(xbt_heap_maxkey(net_action_heap), now))) {
+    action = xbt_heap_pop(net_action_heap);
+    XBT_DEBUG("Action %p: finish", action);
+    GENERIC_ACTION(action).finish = surf_get_clock();
+
+    // if I am wearing a latency heat
+    if( action->hat ==  LATENCY){
+        lmm_update_variable_weight(network_maxmin_system, action->variable,
+                                           action->weight);
+        heap_remove(action);
+        action->last_update = surf_get_clock();
+
+    // if I am wearing a max_duration or normal hat
+    }else if( action->hat == MAX_DURATION || action->hat == NORMAL ){
+        // no need to communicate anymore
+        // assume that flows that reached max_duration have remaining of 0
+        GENERIC_ACTION(action).remains = 0;
+        action->generic_action.finish = surf_get_clock();
+              surf_network_model->action_state_set((surf_action_t) action,
+                                                   SURF_ACTION_DONE);
+        heap_remove(action);
+    }
+  }
+  return;
+}
+
 static void net_update_resource_state(void *id,
                                       tmgr_trace_event_t event_type,
                                       double value, double date)
@@ -522,7 +630,7 @@ static void net_update_resource_state(void *id,
                                 (nw_link->lmm_resource.power.peak *
                                  nw_link->lmm_resource.power.scale));
 #ifdef HAVE_TRACING
-    TRACE_surf_link_set_bandwidth(date, nw_link->lmm_resource.generic_resource.name,
+    TRACE_surf_link_set_bandwidth(date, (char *)(((nw_link->lmm_resource).generic_resource).name),
                                   sg_bandwidth_factor *
                                   (nw_link->lmm_resource.power.peak *
                                    nw_link->lmm_resource.power.scale));
@@ -604,6 +712,7 @@ static void net_update_resource_state(void *id,
     xbt_abort();
   }
 
+  XBT_DEBUG("There were a resource state event, need to update actions related to the constraint (%p)", nw_link->lmm_resource.constraint);
   return;
 }
 
@@ -618,27 +727,15 @@ static surf_action_t net_communicate(const char *src_name,
   surf_action_network_CM02_t action = NULL;
   double bandwidth_bound;
   double latency=0.0;
-  /* LARGE PLATFORMS HACK:
-     Add a link_CM02_t *link and a int link_nb to network_card_CM02_t. It will represent local links for this node
-     Use the cluster_id for ->id */
-
   xbt_dynar_t back_route = NULL;
   int constraints_per_variable = 0;
-  xbt_dynar_t route;
-  // I will need this route for some time so require for no cleanup
-  global_routing->get_route_latency(src_name, dst_name, &route, &latency, 0);
-
-  if (sg_network_fullduplex == 1) {
-    back_route = global_routing->get_route(dst_name, src_name);
-  }
 
-  /* LARGE PLATFORMS HACK:
-     total_route_size = route_size + src->link_nb + dst->nb */
+  xbt_dynar_t route=xbt_dynar_new(global_routing->size_of_link,NULL);
 
   XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate);
-  /* LARGE PLATFORMS HACK:
-     assert on total_route_size */
-  xbt_assert(xbt_dynar_length(route) || latency,
+
+  routing_get_route_and_latency(src_name, dst_name, &route, &latency);
+  xbt_assert(!xbt_dynar_is_empty(route) || latency,
               "You're trying to send data from %s to %s but there is no connection at all between these two hosts.",
               src_name, dst_name);
 
@@ -648,6 +745,16 @@ static surf_action_t net_communicate(const char *src_name,
       break;
     }
   }
+  if (sg_network_crosstraffic == 1) {
+    routing_get_route_and_latency(dst_name, src_name, &back_route,NULL);
+    xbt_dynar_foreach(back_route, i, link) {
+      if (link->lmm_resource.state_current == SURF_RESOURCE_OFF) {
+        failed = 1;
+        break;
+      }
+    }
+  }
+
   action =
       surf_action_new(sizeof(s_surf_action_network_CM02_t), size,
                       surf_network_model, failed);
@@ -658,77 +765,66 @@ static surf_action_t net_communicate(const char *src_name,
 
   xbt_swag_insert(action, action->generic_action.state_set);
   action->rate = rate;
+  if(network_update_mechanism == UM_LAZY){
+    action->index_heap = -1;
+    action->last_update = surf_get_clock();
+  }
 
   bandwidth_bound = -1.0;
-
+  if(sg_weight_S_parameter>0) {
+    xbt_dynar_foreach(route, i, link) {
+      action->weight +=
+          sg_weight_S_parameter /
+          (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
+    }
+  }
   xbt_dynar_foreach(route, i, link) {
-    action->weight +=
-        sg_weight_S_parameter /
+    double bb = bandwidth_factor_callback(size) *
         (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
-    if (bandwidth_bound < 0.0)
-      bandwidth_bound =
-          (*bandwidth_factor_callback) (size) *
-          (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
-    else
-      bandwidth_bound =
-          min(bandwidth_bound,
-              (*bandwidth_factor_callback) (size) *
-              (link->lmm_resource.power.peak *
-               link->lmm_resource.power.scale));
+    bandwidth_bound = (bandwidth_bound < 0.0)?bb:min(bandwidth_bound,bb);
   }
-  /* LARGE PLATFORMS HACK:
-     Add src->link and dst->link latencies */
+
   action->lat_current = action->latency;
-  action->latency *= (*latency_factor_callback) (size);
+  action->latency *= latency_factor_callback(size);
   action->rate =
-      (*bandwidth_constraint_callback) (action->rate, bandwidth_bound,
+      bandwidth_constraint_callback(action->rate, bandwidth_bound,
                                         size);
+  if(gap_append) {
+    xbt_assert(!xbt_dynar_is_empty(route),"Using a model with a gap (e.g., SMPI) with a platform without links (e.g. vivaldi)!!!");
 
-  if(xbt_dynar_length(route) > 0) {
     link = *(link_CM02_t*)xbt_dynar_get_ptr(route, 0);
     gap_append(size, link, action);
     XBT_DEBUG("Comm %p: %s -> %s gap=%f (lat=%f)",
            action, src_name, dst_name, action->sender.gap, action->latency);
-  } else {
-    gap_unknown(action);
   }
 
+  constraints_per_variable = xbt_dynar_length(route);
+  if (back_route != NULL)
+    constraints_per_variable += xbt_dynar_length(back_route);
 
-  /* LARGE PLATFORMS HACK:
-     lmm_variable_new(..., total_route_size) */
-  if (back_route != NULL) {
-    constraints_per_variable =
-        xbt_dynar_length(route) + xbt_dynar_length(back_route);
-  } else {
-    constraints_per_variable = xbt_dynar_length(route);
-  }
-
-  if (action->latency > 0)
-    action->variable =
+  if (action->latency > 0){
+      action->variable =
         lmm_variable_new(network_maxmin_system, action, 0.0, -1.0,
                          constraints_per_variable);
-  else
+    if(network_update_mechanism == UM_LAZY){
+      // add to the heap the event when the latency is payed
+      XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->latency + action->last_update);
+      heap_insert(action, action->latency + action->last_update, xbt_dynar_is_empty(route)?NORMAL:LATENCY);
+    }
+  } else
     action->variable =
         lmm_variable_new(network_maxmin_system, action, 1.0, -1.0,
                          constraints_per_variable);
 
   if (action->rate < 0) {
-    if (action->lat_current > 0)
-      lmm_update_variable_bound(network_maxmin_system, action->variable,
-                                sg_tcp_gamma / (2.0 *
-                                                action->lat_current));
-    else
-      lmm_update_variable_bound(network_maxmin_system, action->variable,
-                                -1.0);
+    lmm_update_variable_bound(network_maxmin_system, action->variable,
+        (action->lat_current > 0)?
+            sg_tcp_gamma / (2.0 * action->lat_current)  :-1.0);
   } else {
-    if (action->lat_current > 0)
-      lmm_update_variable_bound(network_maxmin_system, action->variable,
-                                min(action->rate,
-                                    sg_tcp_gamma / (2.0 *
-                                                    action->lat_current)));
-    else
-      lmm_update_variable_bound(network_maxmin_system, action->variable,
-                                action->rate);
+    lmm_update_variable_bound(network_maxmin_system, action->variable,
+        (action->lat_current > 0)?
+            min(action->rate, sg_tcp_gamma / (2.0 * action->lat_current))
+            :action->rate);
   }
 
   xbt_dynar_foreach(route, i, link) {
@@ -736,15 +832,14 @@ static surf_action_t net_communicate(const char *src_name,
                action->variable, 1.0);
   }
 
-  if (sg_network_fullduplex == 1) {
-    XBT_DEBUG("Fullduplex active adding backward flow using 5%c", '%');
+  if (sg_network_crosstraffic == 1) {
+    XBT_DEBUG("Fullduplex active adding backward flow using 5%%");
     xbt_dynar_foreach(back_route, i, link) {
       lmm_expand(network_maxmin_system, link->lmm_resource.constraint,
                  action->variable, .05);
     }
   }
-  /* LARGE PLATFORMS HACK:
-     expand also with src->link and dst->link */
+
 #ifdef HAVE_TRACING
   if (TRACE_is_enabled()) {
     action->src_name = xbt_strdup(src_name);
@@ -762,7 +857,9 @@ static surf_action_t net_communicate(const char *src_name,
 
 static xbt_dynar_t net_get_route(const char *src, const char *dst)
 {
-  return global_routing->get_route(src, dst);
+  xbt_dynar_t route=NULL;
+  routing_get_route_and_latency(src, dst,&route,NULL);
+  return route;
 }
 
 static double net_get_link_bandwidth(const void *link)
@@ -788,6 +885,9 @@ static void net_action_suspend(surf_action_t action)
   lmm_update_variable_weight(network_maxmin_system,
                              ((surf_action_network_CM02_t)
                               action)->variable, 0.0);
+
+  if(network_update_mechanism == UM_LAZY)// remove action from the heap
+    heap_remove((surf_action_network_CM02_t) action);
 }
 
 static void net_action_resume(surf_action_t action)
@@ -799,6 +899,8 @@ static void net_action_resume(surf_action_t action)
                                ((surf_action_network_CM02_t)
                                 action)->weight);
     ((surf_action_network_CM02_t) action)->suspended = 0;
+    if(network_update_mechanism == UM_LAZY)// remove action from the heap
+      heap_remove((surf_action_network_CM02_t) action);
   }
 }
 
@@ -810,6 +912,8 @@ static int net_action_is_suspended(surf_action_t action)
 void net_action_set_max_duration(surf_action_t action, double duration)
 {
   action->max_duration = duration;
+  if(network_update_mechanism == UM_LAZY)// remove action from the heap
+    heap_remove((surf_action_network_CM02_t) action);
 }
 
 #ifdef HAVE_TRACING
@@ -824,14 +928,68 @@ static void net_finalize(void)
   surf_model_exit(surf_network_model);
   surf_network_model = NULL;
 
-  global_routing->finalize();
-
   lmm_system_free(network_maxmin_system);
   network_maxmin_system = NULL;
+
+  if(network_update_mechanism == UM_LAZY){
+    xbt_heap_free(net_action_heap);
+    xbt_swag_free(net_modified_set);
+  }
+}
+
+static void smpi_gap_append(double size, const link_CM02_t link, surf_action_network_CM02_t action) {
+   const char* src = link->lmm_resource.generic_resource.name;
+   xbt_fifo_t fifo;
+   surf_action_network_CM02_t last_action;
+   double bw;
+
+   if(sg_sender_gap > 0.0) {
+      if(!gap_lookup) {
+         gap_lookup = xbt_dict_new();
+      }
+      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, src);
+      action->sender.gap = 0.0;
+      if(fifo && xbt_fifo_size(fifo) > 0) {
+         /* Compute gap from last send */
+         last_action = (surf_action_network_CM02_t)xbt_fifo_get_item_content(xbt_fifo_get_last_item(fifo));
+         bw = net_get_link_bandwidth(link);
+         action->sender.gap = last_action->sender.gap + max(sg_sender_gap, last_action->sender.size / bw);
+         action->latency += action->sender.gap;
+      }
+      /* Append action as last send */
+      action->sender.link_name = link->lmm_resource.generic_resource.name;
+      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, action->sender.link_name);
+      if(!fifo) {
+         fifo = xbt_fifo_new();
+         xbt_dict_set(gap_lookup, action->sender.link_name, fifo, NULL);
+      }
+      action->sender.fifo_item = xbt_fifo_push(fifo, action);
+      action->sender.size = size;
+   }
+}
+
+static void smpi_gap_remove(surf_action_network_CM02_t action) {
+   xbt_fifo_t fifo;
+   size_t size;
+
+   if(sg_sender_gap > 0.0 && action->sender.link_name && action->sender.fifo_item) {
+      fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, action->sender.link_name);
+      xbt_fifo_remove_item(fifo, action->sender.fifo_item);
+      size = xbt_fifo_size(fifo);
+      if(size == 0) {
+         xbt_fifo_free(fifo);
+         xbt_dict_remove(gap_lookup, action->sender.link_name);
+         size = xbt_dict_length(gap_lookup);
+         if(size == 0) {
+            xbt_dict_free(&gap_lookup);
+         }
+      }
+   }
 }
 
 static void surf_network_model_init_internal(void)
 {
+  s_surf_action_network_CM02_t comm;
   surf_network_model = surf_model_init();
 
   surf_network_model->name = "network";
@@ -844,88 +1002,129 @@ static void surf_network_model_init_internal(void)
 #endif
 
   surf_network_model->model_private->resource_used = net_resource_used;
-  surf_network_model->model_private->share_resources = net_share_resources;
-  surf_network_model->model_private->update_actions_state =
-      net_update_actions_state;
+  if(network_update_mechanism == UM_LAZY) {
+    surf_network_model->model_private->share_resources = net_share_resources_lazy;
+    surf_network_model->model_private->update_actions_state = net_update_actions_state_lazy;
+  } else if(network_update_mechanism == UM_FULL) {
+    surf_network_model->model_private->share_resources = net_share_resources_full;
+    surf_network_model->model_private->update_actions_state = net_update_actions_state_full;
+  }
+
   surf_network_model->model_private->update_resource_state =
-      net_update_resource_state;
+                 net_update_resource_state;
   surf_network_model->model_private->finalize = net_finalize;
 
   surf_network_model->suspend = net_action_suspend;
   surf_network_model->resume = net_action_resume;
   surf_network_model->is_suspended = net_action_is_suspended;
-  surf_network_model->set_max_duration = net_action_set_max_duration;
-#ifdef HAVE_TRACING
-  surf_network_model->set_category = net_action_set_category;
-#endif
+  surf_cpu_model->set_max_duration = net_action_set_max_duration;
 
   surf_network_model->extension.network.communicate = net_communicate;
   surf_network_model->extension.network.get_route = net_get_route;
   surf_network_model->extension.network.get_link_bandwidth =
-      net_get_link_bandwidth;
+                 net_get_link_bandwidth;
   surf_network_model->extension.network.get_link_latency =
-      net_get_link_latency;
+                 net_get_link_latency;
   surf_network_model->extension.network.link_shared = net_link_shared;
   surf_network_model->extension.network.add_traces = net_add_traces;
   surf_network_model->extension.network.create_resource =
-      net_create_resource;
-
-  if (!network_maxmin_system)
-    network_maxmin_system = lmm_system_new();
-
-  routing_model_create(sizeof(link_CM02_t),
-                       net_link_new(xbt_strdup("__loopback__"),
-                                    498000000, NULL, 0.000015, NULL,
-                                    SURF_RESOURCE_ON, NULL,
-                                    SURF_LINK_FATPIPE, NULL),
-                      net_get_link_latency);
+                 net_create_resource;
+
+ if (!network_maxmin_system)
+    network_maxmin_system = lmm_system_new(selective_update);
+
+ routing_model_create(sizeof(link_CM02_t),
+      net_create_resource("__loopback__",
+          498000000, NULL, 0.000015, NULL,
+          SURF_RESOURCE_ON, NULL,
+          SURF_LINK_FATPIPE, NULL));
+
+  if(network_update_mechanism == UM_LAZY){
+    net_action_heap = xbt_heap_new(8,NULL);
+    xbt_heap_set_update_callback(net_action_heap, net_action_update_index_heap);
+    net_modified_set =
+        xbt_swag_new(xbt_swag_offset(comm, action_list_hookup));
+  }
 }
 
-
+static void set_update_mechanism(void) {
+  char *optim = xbt_cfg_get_string(_surf_cfg_set, "network/optim");
+  int select = xbt_cfg_get_int(_surf_cfg_set, "network/maxmin_selective_update");
+
+  if(!strcmp(optim,"Full")) {
+    network_update_mechanism = UM_FULL;
+    selective_update = select;
+  } else if (!strcmp(optim,"Lazy")) {
+    network_update_mechanism = UM_LAZY;
+    selective_update = 1;
+    xbt_assert((select==1) || (xbt_cfg_is_default_value(_surf_cfg_set,"network/maxmin_selective_update")),
+        "Disabling selective update while using the lazy update mechanism is dumb!");
+  } else {
+    xbt_die("Unsupported optimization (%s) for this model",optim);
+  }
+}
 
 /************************************************************************/
 /* New model based on LV08 and experimental results of MPI ping-pongs   */
 /************************************************************************/
-void surf_network_model_init_SMPI(const char *filename)
+/* @Inproceedings{smpi_ipdps, */
+/*  author={Pierre-Nicolas Clauss and Mark Stillwell and Stéphane Genaud and Frédéric Suter and Henri Casanova and Martin Quinson}, */
+/*  title={Single Node On-Line Simulation of {MPI} Applications with SMPI}, */
+/*  booktitle={25th IEEE International Parallel and Distributed Processing Symposium (IPDPS'11)}, */
+/*  address={Anchorage (Alaska) USA}, */
+/*  month=may, */
+/*  year={2011} */
+/*  } */
+void surf_network_model_init_SMPI(void)
 {
 
   if (surf_network_model)
     return;
+  set_update_mechanism();
+
   surf_network_model_init_internal();
   latency_factor_callback = &smpi_latency_factor;
   bandwidth_factor_callback = &smpi_bandwidth_factor;
   bandwidth_constraint_callback = &smpi_bandwidth_constraint;
-  net_define_callbacks(filename);
+  gap_append = &smpi_gap_append;
+  gap_remove = &smpi_gap_remove;
+  net_define_callbacks();
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
 
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/sender_gap", 10e-6);
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
-  update_model_description(surf_network_model_description,
-                           "SMPI", surf_network_model);
 }
 
 /************************************************************************/
-/* New model based on optimizations discussed during this thesis        */
+/* New model based on optimizations discussed during Pedro Velho's thesis*/
 /************************************************************************/
-void surf_network_model_init_LegrandVelho(const char *filename)
+/* @techreport{VELHO:2011:HAL-00646896:1, */
+/*      url = {http://hal.inria.fr/hal-00646896/en/}, */
+/*      title = {{Flow-level network models: have we reached the limits?}}, */
+/*      author = {Velho, Pedro and Schnorr, Lucas and Casanova, Henri and Legrand, Arnaud}, */
+/*      type = {Rapport de recherche}, */
+/*      institution = {INRIA}, */
+/*      number = {RR-7821}, */
+/*      year = {2011}, */
+/*      month = Nov, */
+/*      pdf = {http://hal.inria.fr/hal-00646896/PDF/rr-validity.pdf}, */
+/*  } */
+void surf_network_model_init_LegrandVelho(void)
 {
-
   if (surf_network_model)
     return;
+
+  set_update_mechanism();
+
   surf_network_model_init_internal();
-  net_define_callbacks(filename);
+  net_define_callbacks();
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
 
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
-                            0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
-  update_model_description(surf_network_model_description,
-                           "LV08", surf_network_model);
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4); // 13.01 when callibration is done without phase effects
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",0.92);// 0.97 when callibration is done without phase effects
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);       // 20537 when callibration is done without phase effects
 }
 
 /***************************************************************************/
@@ -939,26 +1138,41 @@ void surf_network_model_init_LegrandVelho(const char *filename)
 /*   month         = {oct}, */
 /*   year          = {2002} */
 /* } */
-void surf_network_model_init_CM02(const char *filename)
+void surf_network_model_init_CM02(void)
 {
 
   if (surf_network_model)
     return;
+
+  set_update_mechanism();
   surf_network_model_init_internal();
-  net_define_callbacks(filename);
+  net_define_callbacks();
   xbt_dynar_push(model_list, &surf_network_model);
   network_solve = lmm_solve;
 
-  update_model_description(surf_network_model_description,
-                           "CM02", surf_network_model);
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 1.0);
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor", 1.0);
+  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 0.0);
 }
 
-void surf_network_model_init_Reno(const char *filename)
+/***************************************************************************/
+/* The models from Steven H. Low                                           */
+/***************************************************************************/
+/* @article{Low03,                                                         */
+/*   author={Steven H. Low},                                               */
+/*   title={A Duality Model of {TCP} and Queue Management Algorithms},     */
+/*   year={2003},                                                          */
+/*   journal={{IEEE/ACM} Transactions on Networking},                      */
+/*    volume={11}, number={4},                                             */
+/*  }                                                                      */
+void surf_network_model_init_Reno(void)
 {
   if (surf_network_model)
     return;
+
+  set_update_mechanism();
   surf_network_model_init_internal();
-  net_define_callbacks(filename);
+  net_define_callbacks();
 
   xbt_dynar_push(model_list, &surf_network_model);
   lmm_set_default_protocol_function(func_reno_f, func_reno_fp,
@@ -969,18 +1183,17 @@ void surf_network_model_init_Reno(const char *filename)
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
                             0.92);
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
-  update_model_description(surf_network_model_description,
-                           "Reno", surf_network_model);
 }
 
 
-void surf_network_model_init_Reno2(const char *filename)
+void surf_network_model_init_Reno2(void)
 {
   if (surf_network_model)
     return;
+
+  set_update_mechanism();
   surf_network_model_init_internal();
-  net_define_callbacks(filename);
+  net_define_callbacks();
 
   xbt_dynar_push(model_list, &surf_network_model);
   lmm_set_default_protocol_function(func_reno2_f, func_reno2_fp,
@@ -992,17 +1205,16 @@ void surf_network_model_init_Reno2(const char *filename)
                             0.92);
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S_parameter",
                             8775);
-
-  update_model_description(surf_network_model_description,
-                           "Reno2", surf_network_model);
 }
 
-void surf_network_model_init_Vegas(const char *filename)
+void surf_network_model_init_Vegas(void)
 {
   if (surf_network_model)
     return;
+
+  set_update_mechanism();
   surf_network_model_init_internal();
-  net_define_callbacks(filename);
+  net_define_callbacks();
 
   xbt_dynar_push(model_list, &surf_network_model);
   lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp,
@@ -1013,7 +1225,4 @@ void surf_network_model_init_Vegas(const char *filename)
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
                             0.92);
   xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
-  update_model_description(surf_network_model_description,
-                           "Vegas", surf_network_model);
 }
index 7b811c4..62d1d01 100644 (file)
@@ -21,14 +21,12 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
 static random_data_t random_latency = NULL;
 static int host_number_int = 0;
 
-static void netcste_count_hosts(void)
-{
+static void netcste_count_hosts(sg_platf_host_cbarg_t h) {
   host_number_int++;
 }
 
-static void netcste_define_callbacks(const char *file)
-{
-  surfxml_add_callback(STag_surfxml_host_cb_list, &netcste_count_hosts);
+static void netcste_define_callbacks(void) {
+  sg_platf_host_add_cb(netcste_count_hosts);
 }
 
 static int netcste_resource_used(void *resource_id)
@@ -146,25 +144,22 @@ static void netcste_action_set_category(surf_action_t action, const char *catego
 }
 #endif
 
-/* returns an array of link_Constant_t */
-static xbt_dynar_t netcste_get_route(void *src, void *dst)
-{
-  xbt_die("Calling this function does not make any sense");
-}
-
 static double netcste_get_link_bandwidth(const void *link)
 {
   DIE_IMPOSSIBLE;
+  return -1.0;
 }
 
 static double netcste_get_link_latency(const void *link)
 {
   DIE_IMPOSSIBLE;
+  return -1.0;
 }
 
 static int link_shared(const void *link)
 {
   DIE_IMPOSSIBLE;
+  return -1;
 }
 
 static void netcste_action_suspend(surf_action_t action)
@@ -191,7 +186,7 @@ static void netcste_finalize(void)
 
 
 
-void surf_network_model_init_Constant(const char *filename)
+void surf_network_model_init_Constant()
 {
   xbt_assert(surf_network_model == NULL);
   if (surf_network_model)
@@ -233,12 +228,9 @@ void surf_network_model_init_Constant(const char *filename)
 
   if (!random_latency)
     random_latency = random_new(RAND, 100, 0.0, 1.0, .125, .034);
-  netcste_define_callbacks(filename);
+  netcste_define_callbacks();
   xbt_dynar_push(model_list, &surf_network_model);
 
-  update_model_description(surf_network_model_description,
-                           "Constant", surf_network_model);
-
   xbt_cfg_set_string(_surf_cfg_set, "routing", "none");
-  routing_model_create(sizeof(double), NULL, netcste_get_link_latency);
+  routing_model_create(sizeof(double), NULL);
 }
index e8891fd..d6ff852 100644 (file)
@@ -7,6 +7,7 @@
 #include "network_gtnets_private.h"
 #include "gtnets/gtnets_interface.h"
 #include "xbt/str.h"
+#include "surf/surfxml_parse_values.h"
 
 static double time_to_next_flow_completion = -1;
 
@@ -84,38 +85,25 @@ static void route_onehop_new(int src_id, int dst_id,
 /* Parse the XML for a network link */
 static void parse_link_init(void)
 {
-  char *name;
-  double bw;
-  double lat;
   e_surf_resource_state_t state;
-  name = xbt_strdup(A_surfxml_link_id);
-  surf_parse_get_double(&bw, A_surfxml_link_bandwidth);
-  surf_parse_get_double(&lat, A_surfxml_link_latency);
   state = SURF_RESOURCE_ON;
   XBT_DEBUG("link_gtnets");
-  tmgr_trace_t bw_trace;
-  tmgr_trace_t state_trace;
-  tmgr_trace_t lat_trace;
 
-  bw_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
-  lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
-  state_trace = tmgr_trace_new(A_surfxml_link_state_file);
-
-  if (bw_trace)
+  if (struct_lnk->V_link_bandwidth_file)
     XBT_INFO
         ("The GTNetS network model doesn't support bandwidth state traces");
-  if (lat_trace)
+  if (struct_lnk->V_link_latency_file)
     XBT_INFO("The GTNetS network model doesn't support latency state traces");
-  if (state_trace)
+  if (struct_lnk->V_link_state_file)
     XBT_INFO("The GTNetS network model doesn't support link state traces");
 
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
+  if (struct_lnk->V_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
   {
-         link_new(bprintf("%s_UP",name), bw, lat, current_property_set);
-         link_new(bprintf("%s_DOWN",name), bw, lat, current_property_set);
+         link_new(bprintf("%s_UP",struct_lnk->V_link_id), struct_lnk->V_link_bandwidth, struct_lnk->V_link_latency, current_property_set);
+         link_new(bprintf("%s_DOWN",struct_lnk->V_link_id), struct_lnk->V_link_bandwidth, struct_lnk->V_link_latency, current_property_set);
 
   }
-  else  link_new(name, bw, lat, current_property_set);
+  else  link_new(struct_lnk->V_link_id, struct_lnk->V_link_bandwidth, struct_lnk->V_link_latency, current_property_set);
   current_property_set = NULL;
 }
 
@@ -125,9 +113,8 @@ static void create_gtnets_topology()
   int src_id,dst_id;
 
    XBT_DEBUG("Starting topology generation");
-// À refaire plus tard. Il faut prendre la liste des hôtes/routeurs (dans routing)
-// À partir de cette liste, on les numérote.
-// Ensuite, on peut utiliser les id pour refaire les appels GTNets qui suivent.
+// FIXME: We should take the list of hosts/routers (in the routing module), number the elements of this list,
+//   and then you can use the id to reimplement properly the following GTNets calls
 
    //get the onelinks from the parsed platform
    xbt_dynar_t onelink_routes = global_routing->get_onelink_routes();
@@ -163,7 +150,7 @@ static void create_gtnets_topology()
 }
 
 /* Main XML parsing */
-static void define_callbacks(const char *file)
+static void define_callbacks(void)
 {
   /* Figuring out the network links */
   surfxml_add_callback(ETag_surfxml_link_cb_list, &parse_link_init);
@@ -182,8 +169,7 @@ static int action_unref(surf_action_t action)
   if (!action->refcount) {
     xbt_swag_remove(action, action->state_set);
 #ifdef HAVE_TRACING
-    if (action->category)
-      xbt_free(action->category);
+    xbt_free(action->category);
 #endif
     surf_action_free(&action);
     return 1;
@@ -466,12 +452,12 @@ static int get_latency_limited(surf_action_t action)
 }
 #endif
 
-void surf_network_model_init_GTNETS(const char *filename)
+void surf_network_model_init_GTNETS(void)
 {
   if (surf_network_model)
     return;
   surf_network_model_init_internal();
-  define_callbacks(filename);
+  define_callbacks();
   xbt_dynar_push(model_list, &surf_network_model);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
diff --git a/src/surf/network_im.c b/src/surf/network_im.c
deleted file mode 100644 (file)
index b5ba625..0000000
+++ /dev/null
@@ -1,958 +0,0 @@
-
-/*
- * Network with improved management of tasks, IM (Improved Management).
- * Uses a heap to store actions so that the share_resources is faster.
- * This model automatically sets the selective update flag to 1 and is
- * highly dependent on the maxmin lmm module.
- */
-
-/* Copyright (c) 2009, 2010, 2011. 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 "xbt/log.h"
-#include "xbt/str.h"
-#include "surf_private.h"
-#include "xbt/dict.h"
-#include "maxmin_private.h"
-
-#undef GENERIC_ACTION
-#define GENERIC_ACTION(action) action->generic_action
-
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_im, surf,
-                                "Logging specific to the SURF network module");
-
-
-enum heap_action_type{
-  LATENCY = 100,
-  MAX_DURATION,
-  NORMAL,
-  NOTSET
-};
-
-typedef struct surf_action_network_CM02_im {
-  s_surf_action_t generic_action;
-  s_xbt_swag_hookup_t action_list_hookup;
-  double latency;
-  double lat_current;
-  double weight;
-  lmm_variable_t variable;
-  double rate;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  int latency_limited;
-#endif
-  int suspended;
-#ifdef HAVE_TRACING
-  char *src_name;
-  char *dst_name;
-#endif
-  int index_heap;
-  enum heap_action_type hat;
-  double last_update;
-} s_surf_action_network_CM02_im_t, *surf_action_network_CM02_im_t;
-
-
-typedef struct network_link_CM02_im {
-  s_surf_resource_lmm_t lmm_resource;   /* must remain first to be added to a trace */
-
-  /* Using this object with the public part of
-     model does not make sense */
-  double lat_current;
-  tmgr_trace_event_t lat_event;
-} s_link_CM02_im_t, *link_CM02_im_t;
-
-
-
-
-
-
-
-
-extern surf_model_t surf_network_model;
-static lmm_system_t network_im_maxmin_system = NULL;
-static void (*network_im_solve) (lmm_system_t) = NULL;
-
-extern double sg_latency_factor;
-extern double sg_bandwidth_factor;
-extern double sg_weight_S_parameter;
-
-extern double sg_tcp_gamma;
-extern int sg_network_fullduplex;
-
-
-static void im_net_action_recycle(surf_action_t action);
-static int im_net_get_link_latency_limited(surf_action_t action);
-static int im_net_action_is_suspended(surf_action_t action);
-static double im_net_action_get_remains(surf_action_t action);
-static void im_net_action_set_max_duration(surf_action_t action, double duration);
-static void surf_network_model_init_CM02_im(const char *filename);
-static void im_net_update_actions_state(double now, double delta);
-static void update_action_remaining(double now);
-
-static xbt_swag_t im_net_modified_set = NULL;
-static xbt_heap_t im_net_action_heap = NULL;
-xbt_swag_t keep_track = NULL;
-extern int sg_maxmin_selective_update;
-
-/* added to manage the communication action's heap */
-static void im_net_action_update_index_heap(void *action, int i)
-{
-  ((surf_action_network_CM02_im_t) action)->index_heap = i;
-}
-
-/* insert action on heap using a given key and a hat (heap_action_type)
- * a hat can be of three types for communications:
- *
- * NORMAL = this is a normal heap entry stating the date to finish transmitting
- * LATENCY = this is a heap entry to warn us when the latency is payed
- * MAX_DURATION =this is a heap entry to warn us when the max_duration limit is reached
- */
-static void heap_insert(surf_action_network_CM02_im_t    action, double key, enum heap_action_type hat){
-  action->hat = hat;
-  xbt_heap_push(im_net_action_heap, action, key);
-}
-
-static void heap_remove(surf_action_network_CM02_im_t action){
-  action->hat = NONE;
-  if(((surf_action_network_CM02_im_t) action)->index_heap >= 0){
-      xbt_heap_remove(im_net_action_heap,action->index_heap);
-  }
-}
-
-/******************************************************************************/
-/*                           Factors callbacks                                */
-/******************************************************************************/
-static double im_constant_latency_factor(double size)
-{
-  return sg_latency_factor;
-}
-
-static double im_constant_bandwidth_factor(double size)
-{
-  return sg_bandwidth_factor;
-}
-
-static double im_constant_bandwidth_constraint(double rate, double bound,
-                                            double size)
-{
-  return rate;
-}
-
-
-static double (*im_latency_factor_callback) (double) =
-    &im_constant_latency_factor;
-static double (*im_bandwidth_factor_callback) (double) =
-    &im_constant_bandwidth_factor;
-static double (*im_bandwidth_constraint_callback) (double, double, double) =
-    &im_constant_bandwidth_constraint;
-
-
-static link_CM02_im_t im_net_link_new(char *name,
-                                double bw_initial,
-                                tmgr_trace_t bw_trace,
-                                double lat_initial,
-                                tmgr_trace_t lat_trace,
-                                e_surf_resource_state_t
-                                state_initial,
-                                tmgr_trace_t state_trace,
-                                e_surf_link_sharing_policy_t
-                                policy, xbt_dict_t properties)
-{
-  link_CM02_im_t nw_link = (link_CM02_im_t)
-      surf_resource_lmm_new(sizeof(s_link_CM02_im_t),
-                            surf_network_model, name, properties,
-                            network_im_maxmin_system,
-                            sg_bandwidth_factor * bw_initial,
-                            history,
-                            state_initial, state_trace,
-                            bw_initial, bw_trace);
-
-  xbt_assert(!xbt_lib_get_or_null(link_lib, name, SURF_LINK_LEVEL),
-              "Link '%s' declared several times in the platform file.",
-              name);
-
-  nw_link->lat_current = lat_initial;
-  if (lat_trace)
-    nw_link->lat_event =
-        tmgr_history_add_trace(history, lat_trace, 0.0, 0, nw_link);
-
-  if (policy == SURF_LINK_FATPIPE)
-    lmm_constraint_shared(nw_link->lmm_resource.constraint);
-
-  xbt_lib_set(link_lib, name, SURF_LINK_LEVEL, nw_link);
-
-
-  return nw_link;
-}
-
-static void im_net_parse_link_init(void)
-{
-  char *name_link;
-  double bw_initial;
-  tmgr_trace_t bw_trace;
-  double lat_initial;
-  tmgr_trace_t lat_trace;
-  e_surf_resource_state_t state_initial_link = SURF_RESOURCE_ON;
-  e_surf_link_sharing_policy_t policy_initial_link = SURF_LINK_SHARED;
-  tmgr_trace_t state_trace;
-  XBT_DEBUG("link_CM02_im");
-  name_link = xbt_strdup(A_surfxml_link_id);
-  surf_parse_get_double(&bw_initial, A_surfxml_link_bandwidth);
-  bw_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
-  surf_parse_get_double(&lat_initial, A_surfxml_link_latency);
-  lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
-
-  xbt_assert((A_surfxml_link_state == A_surfxml_link_state_ON)
-              || (A_surfxml_link_state ==
-                  A_surfxml_link_state_OFF), "Invalid state");
-  if (A_surfxml_link_state == A_surfxml_link_state_ON)
-    state_initial_link = SURF_RESOURCE_ON;
-  else if (A_surfxml_link_state == A_surfxml_link_state_OFF)
-    state_initial_link = SURF_RESOURCE_OFF;
-
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_SHARED)
-    policy_initial_link = SURF_LINK_SHARED;
-  else
-         {
-         if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FATPIPE)
-                 policy_initial_link = SURF_LINK_FATPIPE;
-         else if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
-                 policy_initial_link = SURF_LINK_FULLDUPLEX;
-         }
-
-  state_trace = tmgr_trace_new(A_surfxml_link_state_file);
-
-  if(policy_initial_link == SURF_LINK_FULLDUPLEX)
-  {
-         im_net_link_new(bprintf("%s_UP",name_link), bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
-         im_net_link_new(bprintf("%s_DOWN",name_link), bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
-  }
-  else
-  {
-         im_net_link_new(name_link, bw_initial, bw_trace,
-                      lat_initial, lat_trace, state_initial_link, state_trace,
-                      policy_initial_link, xbt_dict_new());
-  }
-
-}
-
-static void im_net_create_resource(char *name,
-                                double bw_initial,
-                                tmgr_trace_t bw_trace,
-                                double lat_initial,
-                                tmgr_trace_t lat_trace,
-                                e_surf_resource_state_t
-                                state_initial,
-                                tmgr_trace_t state_trace,
-                                e_surf_link_sharing_policy_t policy,
-                                xbt_dict_t properties)
-{
-  im_net_link_new(name, bw_initial, bw_trace,
-               lat_initial, lat_trace, state_initial, state_trace,
-               policy, xbt_dict_new());
-}
-
-static void im_net_add_traces(void)
-{
-  xbt_dict_cursor_t cursor = NULL;
-  char *trace_name, *elm;
-
-  static int called = 0;
-  if (called)
-    return;
-  called = 1;
-
-  /* connect all traces relative to network */
-  xbt_dict_foreach(trace_connect_list_link_avail, cursor, trace_name, elm) {
-    tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    link_CM02_im_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
-
-    xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
-                trace_name, elm);
-    xbt_assert(trace,
-                "Cannot connect trace %s to link %s: trace undefined",
-                trace_name, elm);
-
-    link->lmm_resource.state_event =
-        tmgr_history_add_trace(history, trace, 0.0, 0, link);
-  }
-
-  xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) {
-    tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    link_CM02_im_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
-
-    xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
-                trace_name, elm);
-    xbt_assert(trace,
-                "Cannot connect trace %s to link %s: trace undefined",
-                trace_name, elm);
-
-    link->lmm_resource.power.event =
-        tmgr_history_add_trace(history, trace, 0.0, 0, link);
-  }
-
-  xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
-    tmgr_trace_t trace = xbt_dict_get_or_null(traces_set_list, trace_name);
-    link_CM02_im_t link =
-               xbt_lib_get_or_null(link_lib, elm, SURF_LINK_LEVEL);
-
-    xbt_assert(link, "Cannot connect trace %s to link %s: link undefined",
-                trace_name, elm);
-    xbt_assert(trace,
-                "Cannot connect trace %s to link %s: trace undefined",
-                trace_name, elm);
-
-    link->lat_event = tmgr_history_add_trace(history, trace, 0.0, 0, link);
-  }
-}
-
-static void im_net_define_callbacks(const char *file)
-{
-  /* Figuring out the network links */
-  surfxml_add_callback(STag_surfxml_link_cb_list, &im_net_parse_link_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &im_net_add_traces);
-}
-
-static int im_net_resource_used(void *resource_id)
-{
-  return lmm_constraint_used(network_im_maxmin_system,
-                             ((surf_resource_lmm_t)
-                              resource_id)->constraint);
-}
-
-static int im_net_action_unref(surf_action_t action)
-{
-  action->refcount--;
-  if (!action->refcount) {
-    xbt_swag_remove(action, action->state_set);
-    if (((surf_action_network_CM02_im_t) action)->variable){
-      lmm_variable_free(network_im_maxmin_system,
-                        ((surf_action_network_CM02_im_t) action)->variable);
-    }
-    // remove action from the heap
-    heap_remove((surf_action_network_CM02_im_t) action);
-
-    xbt_swag_remove(action, im_net_modified_set);
-#ifdef HAVE_TRACING
-    xbt_free(((surf_action_network_CM02_im_t) action)->src_name);
-    xbt_free(((surf_action_network_CM02_im_t) action)->dst_name);
-    if (action->category)
-      xbt_free(action->category);
-#endif
-    surf_action_free(&action);
-    return 1;
-  }
-  return 0;
-}
-
-
-
-static void im_net_action_cancel(surf_action_t action)
-{
-  surf_network_model->action_state_set(action, SURF_ACTION_FAILED);
-
-  xbt_swag_remove(action, im_net_modified_set);
-  // remove action from the heap
-  heap_remove((surf_action_network_CM02_im_t) action);
-}
-
-void im_net_action_recycle(surf_action_t action)
-{
-  return;
-}
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-int im_net_get_link_latency_limited(surf_action_t action)
-{
-  return action->latency_limited;
-}
-#endif
-
-double im_net_action_get_remains(surf_action_t action)
-{
-  /* update remains before return it */
-  update_action_remaining(surf_get_clock());
-  return action->remains;
-}
-
-static void update_action_remaining(double now){
-  surf_action_network_CM02_im_t action = NULL;
-  double delta = 0.0;
-
-  xbt_swag_foreach(action, im_net_modified_set) {
-
-    if(action->suspended != 0){
-        continue;
-    }
-
-    delta = now - action->last_update;
-
-    double_update(&(action->generic_action.remains),
-                  lmm_variable_getvalue(action->variable) * delta);
-
-    if (action->generic_action.max_duration != NO_MAX_DURATION)
-      double_update(&(action->generic_action.max_duration), delta);
-
-    if ((action->generic_action.remains <= 0) &&
-        (lmm_get_variable_weight(action->variable) > 0)) {
-      action->generic_action.finish = surf_get_clock();
-      surf_network_model->action_state_set((surf_action_t) action,
-                                           SURF_ACTION_DONE);
-      heap_remove(action);
-    } else if ((action->generic_action.max_duration != NO_MAX_DURATION)
-               && (action->generic_action.max_duration <= 0)) {
-      action->generic_action.finish = surf_get_clock();
-      surf_network_model->action_state_set((surf_action_t) action,
-                                           SURF_ACTION_DONE);
-      heap_remove(action);
-    }
-
-    action->last_update = now;
-  }
-}
-
-static double im_net_share_resources(double now)
-{
-  surf_action_network_CM02_im_t action = NULL;
-  double min=-1;
-  double value;
-
-  XBT_DEBUG("Before share resources, the size of modified actions set is %d", xbt_swag_size(im_net_modified_set));
-  update_action_remaining(now);
-
-  lmm_solve(network_im_maxmin_system);
-
-  XBT_DEBUG("After share resources, The size of modified actions set is %d", xbt_swag_size(im_net_modified_set));
-
-   xbt_swag_foreach(action, im_net_modified_set) {
-     if (GENERIC_ACTION(action).state_set != surf_network_model->states.running_action_set){
-       continue;
-     }
-
-     /* bogus priority, skip it */
-     if (GENERIC_ACTION(action).priority <= 0){
-         continue;
-     }
-
-     min = -1;
-     value = lmm_variable_getvalue(action->variable);
-     if (value > 0) {
-         if (GENERIC_ACTION(action).remains > 0) {
-             value = GENERIC_ACTION(action).remains / value;
-             min = now + value;
-         } else {
-             value = 0.0;
-             min = now;
-         }
-     }
-
-     if ((GENERIC_ACTION(action).max_duration != NO_MAX_DURATION)
-         && (min == -1
-             || GENERIC_ACTION(action).start +
-             GENERIC_ACTION(action).max_duration < min)){
-       min =   GENERIC_ACTION(action).start +
-               GENERIC_ACTION(action).max_duration;
-     }
-
-     XBT_DEBUG("Action(%p) Start %lf Finish %lf Max_duration %lf", action,
-                GENERIC_ACTION(action).start, now + value,
-                GENERIC_ACTION(action).max_duration);
-
-
-
-     if (action->index_heap >= 0) {
-         heap_remove((surf_action_network_CM02_im_t) action);
-     }
-
-     if (min != -1) {
-         heap_insert((surf_action_network_CM02_im_t) action, min, NORMAL);
-         XBT_DEBUG("Insert at heap action(%p) min %lf now %lf", action, min, now);
-     }
-   }
-
-   //hereafter must have already the min value for this resource model
-   if(xbt_heap_size(im_net_action_heap) > 0 ){
-       min = xbt_heap_maxkey(im_net_action_heap) - now ;
-   }else{
-       min = -1;
-   }
-
-   XBT_DEBUG("The minimum with the HEAP %lf", min);
-
-
-  return min;
-}
-
-static void im_net_update_actions_state(double now, double delta)
-{
-  surf_action_network_CM02_im_t action = NULL;
-
-  while ((xbt_heap_size(im_net_action_heap) > 0)
-         && (double_equals(xbt_heap_maxkey(im_net_action_heap), now))) {
-    action = xbt_heap_pop(im_net_action_heap);
-    XBT_DEBUG("Action %p: finish", action);
-    GENERIC_ACTION(action).finish = surf_get_clock();
-
-    // if I am wearing a latency heat
-    if( action->hat ==  LATENCY){
-        lmm_update_variable_weight(network_im_maxmin_system, action->variable,
-                                           action->weight);
-        heap_remove(action);
-        action->last_update = surf_get_clock();
-
-        XBT_DEBUG("Action (%p) is not limited by latency anymore", action);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-          GENERIC_ACTION(action).latency_limited = 0;
-#endif
-
-    // if I am wearing a max_duration or normal hat
-    }else if( action->hat == MAX_DURATION || action->hat == NORMAL ){
-        // no need to communicate anymore
-        // assume that flows that reached max_duration have remaining of 0
-        GENERIC_ACTION(action).remains = 0;
-        action->generic_action.finish = surf_get_clock();
-              surf_network_model->action_state_set((surf_action_t) action,
-                                                   SURF_ACTION_DONE);
-        heap_remove(action);
-    }
-  }
-  return;
-}
-
-static void im_net_update_resource_state(void *id,
-                                      tmgr_trace_event_t event_type,
-                                      double value, double date)
-{
-  link_CM02_im_t nw_link = id;
-  /*   printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
-  /*     "%lg" " for event %p\n", surf_get_clock(), nw_link->name, */
-  /*     value, event_type); */
-
-  if (event_type == nw_link->lmm_resource.power.event) {
-    double delta =
-        sg_weight_S_parameter / value - sg_weight_S_parameter /
-        (nw_link->lmm_resource.power.peak *
-         nw_link->lmm_resource.power.scale);
-    lmm_variable_t var = NULL;
-    lmm_element_t elem = NULL;
-    surf_action_network_CM02_im_t action = NULL;
-
-    nw_link->lmm_resource.power.peak = value;
-    lmm_update_constraint_bound(network_im_maxmin_system,
-                                nw_link->lmm_resource.constraint,
-                                sg_bandwidth_factor *
-                                (nw_link->lmm_resource.power.peak *
-                                 nw_link->lmm_resource.power.scale));
-#ifdef HAVE_TRACING
-    TRACE_surf_link_set_bandwidth(date, (char *)(((nw_link->lmm_resource).generic_resource).name),
-                                  sg_bandwidth_factor *
-                                  (nw_link->lmm_resource.power.peak *
-                                   nw_link->lmm_resource.power.scale));
-#endif
-    if (sg_weight_S_parameter > 0) {
-      while ((var = lmm_get_var_from_cnst
-              (network_im_maxmin_system, nw_link->lmm_resource.constraint,
-               &elem))) {
-        action = lmm_variable_id(var);
-        action->weight += delta;
-        if (!(action->suspended))
-          lmm_update_variable_weight(network_im_maxmin_system,
-                                     action->variable, action->weight);
-      }
-    }
-    if (tmgr_trace_event_free(event_type))
-      nw_link->lmm_resource.power.event = NULL;
-  } else if (event_type == nw_link->lat_event) {
-    double delta = value - nw_link->lat_current;
-    lmm_variable_t var = NULL;
-    lmm_element_t elem = NULL;
-    surf_action_network_CM02_im_t action = NULL;
-
-    nw_link->lat_current = value;
-    while ((var = lmm_get_var_from_cnst
-            (network_im_maxmin_system, nw_link->lmm_resource.constraint,
-             &elem))) {
-      action = lmm_variable_id(var);
-      action->lat_current += delta;
-      action->weight += delta;
-      if (action->rate < 0)
-        lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                  sg_tcp_gamma / (2.0 *
-                                                  action->lat_current));
-      else {
-        lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                  min(action->rate,
-                                      sg_tcp_gamma / (2.0 *
-                                                      action->lat_current)));
-
-        if (action->rate < sg_tcp_gamma / (2.0 * action->lat_current)) {
-          XBT_INFO("Flow is limited BYBANDWIDTH");
-        } else {
-          XBT_INFO("Flow is limited BYLATENCY, latency of flow is %f",
-                action->lat_current);
-        }
-      }
-      if (!(action->suspended))
-        lmm_update_variable_weight(network_im_maxmin_system, action->variable,
-                                   action->weight);
-
-    }
-    if (tmgr_trace_event_free(event_type))
-      nw_link->lat_event = NULL;
-  } else if (event_type == nw_link->lmm_resource.state_event) {
-    if (value > 0)
-      nw_link->lmm_resource.state_current = SURF_RESOURCE_ON;
-    else {
-      lmm_constraint_t cnst = nw_link->lmm_resource.constraint;
-      lmm_variable_t var = NULL;
-      lmm_element_t elem = NULL;
-
-      nw_link->lmm_resource.state_current = SURF_RESOURCE_OFF;
-      while ((var = lmm_get_var_from_cnst
-              (network_im_maxmin_system, cnst, &elem))) {
-        surf_action_t action = lmm_variable_id(var);
-
-        if (surf_action_state_get(action) == SURF_ACTION_RUNNING ||
-            surf_action_state_get(action) == SURF_ACTION_READY) {
-          action->finish = date;
-          surf_network_model->action_state_set(action, SURF_ACTION_FAILED);
-        }
-      }
-    }
-    if (tmgr_trace_event_free(event_type))
-      nw_link->lmm_resource.state_event = NULL;
-  } else {
-    XBT_CRITICAL("Unknown event ! \n");
-    xbt_abort();
-  }
-
-  XBT_DEBUG("There were a resource state event, need to update actions related to the constraint (%p)", nw_link->lmm_resource.constraint);
-  return;
-}
-
-
-static surf_action_t im_net_communicate(const char *src_name,
-                                     const char *dst_name, double size,
-                                     double rate)
-{
-  unsigned int i;
-  link_CM02_im_t link;
-  int failed = 0;
-  surf_action_network_CM02_im_t action = NULL;
-  double bandwidth_bound;
-  /* LARGE PLATFORMS HACK:
-     Add a link_CM02_im_t *link and a int link_nb to network_card_CM02_im_t. It will represent local links for this node
-     Use the cluster_id for ->id */
-
-  xbt_dynar_t back_route = NULL;
-  int constraints_per_variable = 0;
-  // I will need this route for some time so let's call get_route_no_cleanup
-  xbt_dynar_t route = global_routing->get_route_no_cleanup(src_name, dst_name);
-
-
-  if (sg_network_fullduplex == 1) {
-    back_route = global_routing->get_route(dst_name, src_name);
-  }
-
-  /* LARGE PLATFORMS HACK:
-     total_route_size = route_size + src->link_nb + dst->nb */
-
-  XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate);
-  /* LARGE PLATFORMS HACK:
-     assert on total_route_size */
-  xbt_assert(xbt_dynar_length(route),
-              "You're trying to send data from %s to %s but there is no connection between these two hosts.",
-              src_name, dst_name);
-
-  xbt_dynar_foreach(route, i, link) {
-    if (link->lmm_resource.state_current == SURF_RESOURCE_OFF) {
-      failed = 1;
-      break;
-    }
-  }
-  action =
-      surf_action_new(sizeof(s_surf_action_network_CM02_im_t), size,
-                      surf_network_model, failed);
-
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  (action->generic_action).latency_limited = 0;
-#endif
-
-  xbt_swag_insert(action, action->generic_action.state_set);
-  action->rate = rate;
-  action->index_heap = -1;
-  action->latency = 0.0;
-  action->weight = 0.0;
-  action->last_update = surf_get_clock();
-
-  bandwidth_bound = -1.0;
-  xbt_dynar_foreach(route, i, link) {
-    action->latency += link->lat_current;
-    action->weight +=
-        link->lat_current +
-        sg_weight_S_parameter /
-        (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
-    if (bandwidth_bound < 0.0)
-      bandwidth_bound =
-          (*im_bandwidth_factor_callback) (size) *
-          (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
-    else
-      bandwidth_bound =
-          min(bandwidth_bound,
-              (*im_bandwidth_factor_callback) (size) *
-              (link->lmm_resource.power.peak *
-               link->lmm_resource.power.scale));
-  }
-  /* LARGE PLATFORMS HACK:
-     Add src->link and dst->link latencies */
-  action->lat_current = action->latency;
-  action->latency *= (*im_latency_factor_callback) (size);
-  action->rate =
-      (*im_bandwidth_constraint_callback) (action->rate, bandwidth_bound,
-                                        size);
-
-  /* LARGE PLATFORMS HACK:
-     lmm_variable_new(..., total_route_size) */
-  if (back_route != NULL) {
-    constraints_per_variable =
-        xbt_dynar_length(route) + xbt_dynar_length(back_route);
-  } else {
-    constraints_per_variable = xbt_dynar_length(route);
-  }
-
-  if (action->latency > 0){
-      action->variable =
-        lmm_variable_new(network_im_maxmin_system, action, 0.0, -1.0,
-                         constraints_per_variable);
-    // add to the heap the event when the latency is payed
-    XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->latency + action->last_update);
-    heap_insert(action, action->latency + action->last_update, LATENCY);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-        (action->generic_action).latency_limited = 1;
-#endif
-  }
-  else
-    action->variable =
-        lmm_variable_new(network_im_maxmin_system, action, 1.0, -1.0,
-                         constraints_per_variable);
-
-  if (action->rate < 0) {
-    if (action->lat_current > 0)
-      lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                sg_tcp_gamma / (2.0 *
-                                                action->lat_current));
-    else
-      lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                -1.0);
-  } else {
-    if (action->lat_current > 0)
-      lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                min(action->rate,
-                                    sg_tcp_gamma / (2.0 *
-                                                    action->lat_current)));
-    else
-      lmm_update_variable_bound(network_im_maxmin_system, action->variable,
-                                action->rate);
-  }
-
-  xbt_dynar_foreach(route, i, link) {
-    lmm_expand(network_im_maxmin_system, link->lmm_resource.constraint,
-               action->variable, 1.0);
-  }
-
-  if (sg_network_fullduplex == 1) {
-    XBT_DEBUG("Fullduplex active adding backward flow using 5%c", '%');
-    xbt_dynar_foreach(back_route, i, link) {
-      lmm_expand(network_im_maxmin_system, link->lmm_resource.constraint,
-                 action->variable, .05);
-    }
-  }
-
-  /* LARGE PLATFORMS HACK:
-     expand also with src->link and dst->link */
-#ifdef HAVE_TRACING
-  if (TRACE_is_enabled()) {
-    action->src_name = xbt_strdup(src_name);
-    action->dst_name = xbt_strdup(dst_name);
-  } else {
-    action->src_name = action->dst_name = NULL;
-  }
-#endif
-
-  xbt_dynar_free(&route);
-  XBT_OUT();
-
-  return (surf_action_t) action;
-}
-
-static xbt_dynar_t im_net_get_route(const char *src, const char *dst)
-{
-  return global_routing->get_route(src, dst);
-}
-
-static double im_net_get_link_bandwidth(const void *link)
-{
-  surf_resource_lmm_t lmm = (surf_resource_lmm_t) link;
-  return lmm->power.peak * lmm->power.scale;
-}
-
-static double im_net_get_link_latency(const void *link)
-{
-  return ((link_CM02_im_t) link)->lat_current;
-}
-
-static int im_net_link_shared(const void *link)
-{
-  return
-      lmm_constraint_is_shared(((surf_resource_lmm_t) link)->constraint);
-}
-
-static void im_net_action_suspend(surf_action_t action)
-{
-  ((surf_action_network_CM02_im_t) action)->suspended = 1;
-  lmm_update_variable_weight(network_im_maxmin_system,
-                             ((surf_action_network_CM02_im_t)
-                              action)->variable, 0.0);
-
-  // remove action from the heap
-  heap_remove((surf_action_network_CM02_im_t) action);
-}
-
-static void im_net_action_resume(surf_action_t action)
-{
-  if (((surf_action_network_CM02_im_t) action)->suspended) {
-    lmm_update_variable_weight(network_im_maxmin_system,
-                               ((surf_action_network_CM02_im_t)
-                                action)->variable,
-                               ((surf_action_network_CM02_im_t)
-                                action)->weight);
-    ((surf_action_network_CM02_im_t) action)->suspended = 0;
-    // remove action from the heap
-    heap_remove((surf_action_network_CM02_im_t) action);
-  }
-}
-
-static int im_net_action_is_suspended(surf_action_t action)
-{
-  return ((surf_action_network_CM02_im_t) action)->suspended;
-}
-
-void im_net_action_set_max_duration(surf_action_t action, double duration)
-{
-  action->max_duration = duration;
-  // remove action from the heap
-  heap_remove((surf_action_network_CM02_im_t) action);
-}
-
-
-static void im_net_finalize(void)
-{
-  surf_model_exit(surf_network_model);
-  surf_network_model = NULL;
-
-  global_routing->finalize();
-
-  lmm_system_free(network_im_maxmin_system);
-  network_im_maxmin_system = NULL;
-
-  xbt_heap_free(im_net_action_heap);
-  xbt_swag_free(im_net_modified_set);
-
-}
-
-static void im_surf_network_model_init_internal(void)
-{
-  s_surf_action_network_CM02_im_t comm;
-  XBT_INFO("You are using the UNSAFE lazy management optimization, I hope you know what you are doing.");
-  XBT_INFO("====> For now this optimization is only available for LV08_im network model.");
-
-  surf_network_model = surf_model_init();
-
-  surf_network_model->name = "network";
-  surf_network_model->action_unref = im_net_action_unref;
-  surf_network_model->action_cancel = im_net_action_cancel;
-  surf_network_model->action_recycle = im_net_action_recycle;
-  surf_network_model->get_remains = im_net_action_get_remains;
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-  surf_network_model->get_latency_limited = im_net_get_link_latency_limited;
-#endif
-
-  surf_network_model->model_private->resource_used = im_net_resource_used;
-  surf_network_model->model_private->share_resources = im_net_share_resources;
-  surf_network_model->model_private->update_actions_state =
-                 im_net_update_actions_state;
-  surf_network_model->model_private->update_resource_state =
-                 im_net_update_resource_state;
-  surf_network_model->model_private->finalize = im_net_finalize;
-
-  surf_network_model->suspend = im_net_action_suspend;
-  surf_network_model->resume = im_net_action_resume;
-  surf_network_model->is_suspended = im_net_action_is_suspended;
-  surf_cpu_model->set_max_duration = im_net_action_set_max_duration;
-
-  surf_network_model->extension.network.communicate = im_net_communicate;
-  surf_network_model->extension.network.get_route = im_net_get_route;
-  surf_network_model->extension.network.get_link_bandwidth =
-                 im_net_get_link_bandwidth;
-  surf_network_model->extension.network.get_link_latency =
-                 im_net_get_link_latency;
-  surf_network_model->extension.network.link_shared = im_net_link_shared;
-  surf_network_model->extension.network.add_traces = im_net_add_traces;
-  surf_network_model->extension.network.create_resource =
-                 im_net_create_resource;
-
-
-  if (!network_im_maxmin_system){
-       sg_maxmin_selective_update = 1;
-    network_im_maxmin_system = lmm_system_new();
-  }
-  im_net_action_heap = xbt_heap_new(8,NULL);
-
-  xbt_heap_set_update_callback(im_net_action_heap, im_net_action_update_index_heap);
-
-  routing_model_create(sizeof(link_CM02_im_t),        im_net_link_new(xbt_strdup("__loopback__"),
-                                                                      498000000, NULL, 0.000015, NULL,
-                                                                      SURF_RESOURCE_ON, NULL,
-                                                                      SURF_LINK_FATPIPE, NULL),
-                              im_net_get_link_latency);
-  im_net_modified_set =
-      xbt_swag_new(xbt_swag_offset(comm, action_list_hookup));
-  keep_track = im_net_modified_set;
-}
-
-
-
-/************************************************************************/
-/* New model based on optimizations discussed during this thesis        */
-/************************************************************************/
-void im_surf_network_model_init_LegrandVelho(const char *filename)
-{
-
-  if (surf_network_model)
-    return;
-  im_surf_network_model_init_internal();
-  im_net_define_callbacks(filename);
-  xbt_dynar_push(model_list, &surf_network_model);
-  network_im_solve = lmm_solve;
-
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/latency_factor", 10.4);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
-                            0.92);
-  xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
-  update_model_description(surf_network_model_description,
-                           "LV08_im", surf_network_model);
-}
-
-
-
index 50cf119..7b4a54f 100644 (file)
@@ -5,6 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "surf_private.h"
+#include "surf/maxmin.h"
 #include "surf/ns3/ns3_interface.h"
 #include "xbt/lib.h"
 #include "surf/network_ns3_private.h"
@@ -18,6 +19,21 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_ns3, surf,
                                 "Logging specific to the SURF network NS3 module");
 
 extern routing_global_t global_routing;
+extern xbt_dict_t dict_socket;
+
+static double time_to_next_flow_completion = -1;
+
+static double ns3_share_resources(double min);
+static void ns3_update_actions_state(double now, double delta);
+static void finalize(void);
+static surf_action_t ns3_communicate(const char *src_name,
+                                 const char *dst_name, double size, double rate);
+static void action_suspend(surf_action_t action);
+static void action_resume(surf_action_t action);
+static int action_is_suspended(surf_action_t action);
+static int action_unref(surf_action_t action);
+
+xbt_dynar_t IPV4addr;
 
 static void replace_str(char *str, const char *orig, const char *rep)
 {
@@ -35,20 +51,20 @@ static void replace_str(char *str, const char *orig, const char *rep)
   str = xbt_strdup(buffer);
 }
 
-static void replace_bdw_ns3(char * bdw)
+static void replace_bdw_ns3(char ** bdw)
 {
-       char *temp = xbt_strdup(bdw);
-       xbt_free(bdw);
-       bdw = bprintf("%fbps",atof(temp));
+       char *temp = xbt_strdup(*bdw);
+       xbt_free(*bdw);
+       *bdw = bprintf("%fBps",atof(temp));
        xbt_free(temp);
 
 }
 
-static void replace_lat_ns3(char * lat)
+static void replace_lat_ns3(char ** lat)
 {
-       char *temp = xbt_strdup(lat);
-       xbt_free(lat);
-       lat = bprintf("%fs",atof(temp));
+       char *temp = xbt_strdup(*lat);
+       xbt_free(*lat);
+       *lat = bprintf("%fs",atof(temp));
        xbt_free(temp);
 }
 
@@ -61,10 +77,18 @@ void parse_ns3_add_host(void)
                                ns3_add_host(A_surfxml_host_id)
                                );
 }
+
+static void ns3_free_dynar(void * elmts){
+       free(elmts);
+       return;
+}
+
 void parse_ns3_add_link(void)
 {
        XBT_DEBUG("NS3_ADD_LINK '%s'",A_surfxml_link_id);
 
+       if(!IPV4addr) IPV4addr = xbt_dynar_new(sizeof(char*),ns3_free_dynar);
+
        tmgr_trace_t bw_trace;
        tmgr_trace_t state_trace;
        tmgr_trace_t lat_trace;
@@ -171,15 +195,13 @@ void parse_ns3_add_cluster(void)
                }
        }
 
-
-
        //Create links
        unsigned int cpt;
        int elmts;
        char * lat = xbt_strdup(cluster_lat);
        char * bw =  xbt_strdup(cluster_bw);
-       replace_lat_ns3(lat);
-       replace_bdw_ns3(bw);
+       replace_lat_ns3(&lat);
+       replace_bdw_ns3(&bw);
 
        xbt_dynar_foreach(tab_elements_num,cpt,elmts)
        {
@@ -193,7 +215,9 @@ void parse_ns3_add_cluster(void)
                if(host_src && host_dst){}
                else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
 
-               ns3_add_link(host_src->node_num,host_dst->node_num,bw,lat);
+               ns3_add_link(host_src->node_num,host_src->type,
+                                        host_dst->node_num,host_dst->type,
+                                        bw,lat);
 
                free(router_id);
                free(host_id);
@@ -204,8 +228,8 @@ void parse_ns3_add_cluster(void)
        //Create link backbone
        lat = xbt_strdup(cluster_bb_lat);
        bw =  xbt_strdup(cluster_bb_bw);
-       replace_lat_ns3(lat);
-       replace_bdw_ns3(bw);
+       replace_lat_ns3(&lat);
+       replace_bdw_ns3(&bw);
        ns3_add_cluster(bw,lat,A_surfxml_cluster_id);
        xbt_free(lat);
        xbt_free(bw);   
@@ -234,44 +258,20 @@ static xbt_dynar_t ns3_get_route(const char *src, const char *dst)
 void parse_ns3_end_platform(void)
 {
        ns3_end_platform();
-
-         xbt_lib_cursor_t cursor = NULL;
-         char *name = NULL;
-         void **data = NULL;
-         XBT_DEBUG("link_lib");
-         xbt_lib_foreach(link_lib, cursor, name, data) {
-                       XBT_DEBUG("\tSee link '%s'\t--> NS3_LEVEL %p",
-                                       name,
-                                       data[NS3_LINK_LEVEL]);
-         }
-         XBT_DEBUG(" ");
-         XBT_DEBUG("host_lib");
-         xbt_lib_foreach(host_lib, cursor, name, data) {
-                       XBT_DEBUG("\tSee host '%s'\t--> NS3_LEVEL %p",
-                                       name,
-                                       data[NS3_HOST_LEVEL]);
-         }
-         XBT_DEBUG(" ");
-         XBT_DEBUG("as_router_lib");
-         xbt_lib_foreach(as_router_lib, cursor, name, data) {
-                       XBT_DEBUG("\tSee ASR '%s'\t--> NS3_LEVEL %p",
-                                       name,
-                                       data[NS3_ASR_LEVEL]);
-         }
-
-         XBT_DEBUG(" ");
 }
 
 /* Create the ns3 topology based on routing strategy */
 void create_ns3_topology()
 {
-   XBT_INFO("Starting topology generation");
+   XBT_DEBUG("Starting topology generation");
+
+   xbt_dynar_shrink(IPV4addr,0);
 
    //get the onelinks from the parsed platform
    xbt_dynar_t onelink_routes = global_routing->get_onelink_routes();
    if (!onelink_routes)
      xbt_die("There is no routes!");
-   XBT_INFO("Have get_onelink_routes, found %ld routes",onelink_routes->used);
+   XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
    //save them in trace file
    onelink_t onelink;
    unsigned int iter;
@@ -281,17 +281,17 @@ void create_ns3_topology()
      void *link = onelink->link_ptr;
 
      if( strcmp(src,dst) && ((surf_ns3_link_t)link)->created){
-     XBT_INFO("Route from '%s' to '%s' with link '%s'",src,dst,((surf_ns3_link_t)link)->data->id);
+     XBT_DEBUG("Route from '%s' to '%s' with link '%s'",src,dst,((surf_ns3_link_t)link)->data->id);
      char * link_bdw = xbt_strdup(((surf_ns3_link_t)link)->data->bdw);
         char * link_lat = xbt_strdup(((surf_ns3_link_t)link)->data->lat);
+        replace_lat_ns3(&link_lat);
+        replace_bdw_ns3(&link_bdw);
         ((surf_ns3_link_t)link)->created = 0;
 
-        replace_bdw_ns3(link_bdw);
-        replace_lat_ns3(link_lat);
-//      XBT_INFO("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
-     XBT_INFO("\tLink (%s) bdw:%s->%s lat:%s->%s",((surf_ns3_link_t)link)->data->id,
-                ((surf_ns3_link_t)link)->data->bdw,link_bdw,
-                ((surf_ns3_link_t)link)->data->lat,link_lat
+        //      XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
+     XBT_DEBUG("\tLink (%s) bdw:%s lat:%s",((surf_ns3_link_t)link)->data->id,
+                link_bdw,
+                link_lat
                 );
 
      //create link ns3
@@ -303,7 +303,7 @@ void create_ns3_topology()
      if(host_src && host_dst){}
      else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
 
-     ns3_add_link(host_src->node_num,host_dst->node_num,link_bdw,link_lat);
+     ns3_add_link(host_src->node_num,host_src->type,host_dst->node_num,host_dst->type,link_bdw,link_lat);
 
      xbt_free(link_bdw);
      xbt_free(link_lat);
@@ -311,7 +311,7 @@ void create_ns3_topology()
    }
 }
 
-static void define_callbacks_ns3(const char *filename)
+static void define_callbacks_ns3(void)
 {
   surfxml_add_callback(STag_surfxml_host_cb_list, &parse_ns3_add_host);              //HOST
   surfxml_add_callback(STag_surfxml_router_cb_list, &parse_ns3_add_router);      //ROUTER
@@ -323,10 +323,6 @@ static void define_callbacks_ns3(const char *filename)
   surfxml_add_callback(ETag_surfxml_platform_cb_list, &parse_ns3_end_platform); //InitializeRoutes
 }
 
-static void free_ns3_elmts(void * elmts)
-{
-}
-
 static void free_ns3_link(void * elmts)
 {
        ns3_link_t link = elmts;
@@ -342,20 +338,216 @@ static void free_ns3_host(void * elmts)
        free(host);
 }
 
-void surf_network_model_init_NS3(const char *filename)
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+static int ns3_get_link_latency_limited(surf_action_t action)
+{
+  return 0;
+}
+#endif
+
+#ifdef HAVE_TRACING
+static void ns3_action_set_category(surf_action_t action, const char *category)
 {
+  action->category = xbt_strdup (category);
+}
+#endif
+
+void surf_network_model_init_NS3()
+{
+       if (surf_network_model)
+               return;
+
        surf_network_model = surf_model_init();
        surf_network_model->name = "network NS3";
        surf_network_model->extension.network.get_link_latency = ns3_get_link_latency;
        surf_network_model->extension.network.get_link_bandwidth = ns3_get_link_bandwidth;
        surf_network_model->extension.network.get_route = ns3_get_route;
+
+       surf_network_model->model_private->share_resources = ns3_share_resources;
+       surf_network_model->model_private->update_actions_state = ns3_update_actions_state;
+       surf_network_model->model_private->finalize = finalize;
+
+       surf_network_model->suspend = action_suspend;
+       surf_network_model->resume = action_resume;
+       surf_network_model->is_suspended = action_is_suspended;
+       surf_network_model->action_unref = action_unref;
+       surf_network_model->extension.network.communicate = ns3_communicate;
+
+#ifdef HAVE_TRACING
+  surf_network_model->set_category = ns3_action_set_category;
+#endif
+
+       /* Added the initialization for NS3 interface */
+
+       if (ns3_initialize(xbt_cfg_get_string(_surf_cfg_set,"ns3/TcpModel"))) {
+       xbt_die("Impossible to initialize NS3 interface");
+       }
+
        routing_model_create(sizeof(s_surf_ns3_link_t), NULL, NULL);
-       define_callbacks_ns3(filename);
+       define_callbacks_ns3();
 
        NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
        NS3_ASR_LEVEL  = xbt_lib_add_level(as_router_lib,(void_f_pvoid_t)free_ns3_host);
        NS3_LINK_LEVEL = xbt_lib_add_level(link_lib,(void_f_pvoid_t)free_ns3_link);
 
+       xbt_dynar_push(model_list, &surf_network_model);
        update_model_description(surf_network_model_description,
                    "NS3", surf_network_model);
+
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+       surf_network_model->get_latency_limited = ns3_get_link_latency_limited;
+#endif
+}
+
+static void finalize(void)
+{
+       ns3_finalize();
+       xbt_dynar_free_container(&IPV4addr);
+       xbt_dict_free(&dict_socket);
+}
+
+static double ns3_share_resources(double min)
+{
+       XBT_DEBUG("ns3_share_resources");
+
+       xbt_swag_t running_actions =
+         surf_network_model->states.running_action_set;
+
+       //get the first relevant value from the running_actions list
+       if (!xbt_swag_size(running_actions) || min == 0.0)
+         return -1.0;
+       else
+        do {
+          ns3_simulator(min);
+          time_to_next_flow_completion = ns3_time() - surf_get_clock();
+        } while(double_equals(time_to_next_flow_completion,0));
+
+       XBT_DEBUG("min       : %f",min);
+       XBT_DEBUG("ns3  time : %f",ns3_time());
+       XBT_DEBUG("surf time : %f",surf_get_clock());
+       XBT_DEBUG("Next completion %f :",time_to_next_flow_completion);
+
+       return time_to_next_flow_completion;
+}
+
+static void ns3_update_actions_state(double now, double delta)
+{
+         xbt_dict_cursor_t cursor = NULL;
+         char *key;
+         void *data;
+
+         static xbt_dynar_t socket_to_destroy = NULL;
+    if(!socket_to_destroy) socket_to_destroy = xbt_dynar_new(sizeof(char*),NULL);
+
+         surf_action_network_ns3_t action = NULL;
+         xbt_swag_t running_actions =
+             surf_network_model->states.running_action_set;
+
+         /* If there are no running flows, just return */
+         if (!xbt_swag_size(running_actions)) {
+           while(double_positive(now-ns3_time())) {
+             ns3_simulator(now-ns3_time());
+           }
+           return;
+         }
+
+         xbt_dict_foreach(dict_socket,cursor,key,data){
+           action = (surf_action_network_ns3_t)ns3_get_socket_action(data);
+           XBT_DEBUG("Processing socket %p (action %p)",data,action);
+           action->generic_action.remains = action->generic_action.cost - ns3_get_socket_sent(data);
+
+#ifdef HAVE_TRACING
+           if (TRACE_is_enabled() &&
+               surf_action_state_get(&(action->generic_action)) == SURF_ACTION_RUNNING){
+             double data_sent = ns3_get_socket_sent(data);
+             double data_delta_sent = data_sent - action->last_sent;
+
+             xbt_dynar_t route = global_routing->get_route(action->src_name, action->dst_name);
+             unsigned int i;
+             for (i = 0; i < xbt_dynar_length (route); i++){
+               surf_ns3_link_t *link = ((surf_ns3_link_t*)xbt_dynar_get_ptr (route, i));
+               TRACE_surf_link_set_utilization ((*link)->generic_resource.name,
+                   action->generic_action.data,
+                   (surf_action_t) action,
+                   (data_delta_sent)/delta,
+                   now-delta,
+                   delta);
+             }
+             action->last_sent = data_sent;
+           }
+#endif
+
+           if(ns3_get_socket_is_finished(data) == 1){
+             xbt_dynar_push(socket_to_destroy,&key);
+             XBT_DEBUG("Destroy socket %p of action %p", key, action);
+             action->generic_action.finish = now;
+             surf_action_state_set(&(action->generic_action), SURF_ACTION_DONE);
+           }
+         }
+
+         while (!xbt_dynar_is_empty(socket_to_destroy)){
+           xbt_dynar_pop(socket_to_destroy,&key);
+
+           void *data = xbt_dict_get (dict_socket, key);
+           surf_action_network_ns3_t action = (surf_action_network_ns3_t)ns3_get_socket_action(data);
+           XBT_DEBUG ("Removing socket %p of action %p", key, action);
+           xbt_dict_remove(dict_socket,key);
+         }
+         return;
+}
+
+/* Max durations are not supported */
+static surf_action_t ns3_communicate(const char *src_name,
+                                 const char *dst_name, double size, double rate)
+{
+  surf_action_network_ns3_t action = NULL;
+
+  XBT_DEBUG("Communicate from %s to %s",src_name,dst_name);
+  action = surf_action_new(sizeof(s_surf_action_network_ns3_t), size, surf_network_model, 0);
+
+  ns3_create_flow(src_name, dst_name, surf_get_clock(), size, action);
+
+#ifdef HAVE_TRACING
+  action->last_sent = 0;
+  action->src_name = xbt_strdup (src_name);
+  action->dst_name = xbt_strdup (dst_name);
+#endif
+
+  return (surf_action_t) action;
+}
+
+/* Suspend a flow() */
+static void action_suspend(surf_action_t action)
+{
+  THROW_UNIMPLEMENTED;
+}
+
+/* Resume a flow() */
+static void action_resume(surf_action_t action)
+{
+  THROW_UNIMPLEMENTED;
+}
+
+/* Test whether a flow is suspended */
+static int action_is_suspended(surf_action_t action)
+{
+  return 0;
+}
+
+static int action_unref(surf_action_t action)
+{
+  action->refcount--;
+  if (!action->refcount) {
+    xbt_swag_remove(action, action->state_set);
+
+#ifdef HAVE_TRACING
+    xbt_free(((surf_action_network_ns3_t)action)->src_name);
+    xbt_free(((surf_action_network_ns3_t)action)->dst_name);
+    xbt_free(action->category);
+#endif
+    XBT_DEBUG ("Removing action %p", action);
+    surf_action_free(&action);
+    return 1;
+  }
+  return 0;
 }
index 03a27ee..271af77 100644 (file)
@@ -22,4 +22,14 @@ typedef struct surf_ns3_link{
        int created;
 }s_surf_ns3_link_t, *surf_ns3_link_t;
 
+typedef struct surf_action_network_ns3 {
+  s_surf_action_t generic_action;
+#ifdef HAVE_TRACING
+  double last_sent;
+  char *src_name;
+  char *dst_name;
+#endif //HAVE_TRACING
+} s_surf_action_network_ns3_t, *surf_action_network_ns3_t;
+
+
 #endif                          /* _SURF_NETWORK_NS3_PRIVATE_H */
index 363bb18..68dfe46 100644 (file)
@@ -20,9 +20,16 @@ typedef struct network_link_CM02 {
   tmgr_trace_event_t lat_event;
 } s_link_CM02_t, *link_CM02_t;
 
+enum heap_action_type{
+  LATENCY = 100,
+  MAX_DURATION,
+  NORMAL,
+  NOTSET
+};
 
 typedef struct surf_action_network_CM02 {
   s_surf_action_t generic_action;
+  s_xbt_swag_hookup_t action_list_hookup;
   double latency;
   double lat_current;
   double weight;
@@ -38,12 +45,13 @@ typedef struct surf_action_network_CM02 {
   int latency_limited;
 #endif
   int suspended;
-
 #ifdef HAVE_TRACING
   char *src_name;
   char *dst_name;
 #endif
-
+  int index_heap;
+  enum heap_action_type hat;
+  double last_update;
 } s_surf_action_network_CM02_t, *surf_action_network_CM02_t;
 
 #endif                          /* _SURF_NETWORK_PRIVATE_H */
diff --git a/src/surf/ns3/my-point-to-point-helper.cc b/src/surf/ns3/my-point-to-point-helper.cc
new file mode 100644 (file)
index 0000000..f59149a
--- /dev/null
@@ -0,0 +1,440 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
+#include "ns3/abort.h"
+#include "ns3/log.h"
+#include "ns3/simulator.h"
+#include "ns3/point-to-point-net-device.h"
+#include "ns3/point-to-point-channel.h"
+#include "ns3/point-to-point-remote-channel.h"
+#include "ns3/queue.h"
+#include "ns3/config.h"
+#include "ns3/packet.h"
+#include "ns3/names.h"
+#include "ns3/string.h"
+#include "ns3/mpi-interface.h"
+#include "ns3/mpi-receiver.h"
+
+#include "ns3/trace-helper.h"
+#include "my-point-to-point-helper.h"
+
+NS_LOG_COMPONENT_DEFINE ("MyPointToPointHelper");
+
+///> RED Parameters  see src/node/red-queue.* for details
+//.AddAttribute ("Mode",
+//                "Whether to use Bytes (see MaxBytes) or Packets (see MaxPackets) as the maximum queue size metric.",
+//                EnumValue (BYTES), ///> currently supports BYTES only
+//                MakeEnumAccessor (&RedQueue::SetMode),
+//                MakeEnumChecker (BYTES, "Bytes",
+//                                 PACKETS, "Packets"))
+// .AddAttribute ("MaxPackets",
+//                "The maximum number of packets accepted by this RedQueue.",
+//                UintegerValue (100),
+//                MakeUintegerAccessor (&RedQueue::m_maxPackets),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("MaxBytes",
+//                "The maximum number of bytes accepted by this RedQueue.",
+//                UintegerValue (100000),
+//                MakeUintegerAccessor (&RedQueue::m_maxBytes),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("m_burst",
+//                "maximum number of m_burst packets accepted by this queue",
+//                UintegerValue (6), ///> bursts must be > minTh/avpkt
+//                MakeUintegerAccessor (&RedQueue::m_burst),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("m_avPkt",
+//                "In bytes, use with m_burst to determine the time constant for average queue size calculations",
+//                UintegerValue (1024), ///> average packet size
+//                MakeUintegerAccessor (&RedQueue::m_avPkt),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("m_minTh",
+//                "Average queue size at which marking becomes a m_prob",
+//                UintegerValue (5120), ///> in bytes  1024x5
+//                MakeUintegerAccessor (&RedQueue::m_minTh),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("m_maxTh",
+//                "Maximal marking m_prob, should be at least twice min to prevent synchronous retransmits",
+//                UintegerValue (15360), ///> in bytes 1024x15
+//                MakeUintegerAccessor (&RedQueue::m_maxTh),
+//                MakeUintegerChecker<uint32_t> ())
+// .AddAttribute ("m_rate",
+//                "this m_rate is used for calculating the average queue size after some idle time.",
+//                UintegerValue (1500000), ///> in bps, should be set to bandwidth of interface
+//                MakeUintegerAccessor (&RedQueue::m_rate),
+//                MakeUintegerChecker<uint64_t> ())
+// .AddAttribute ("m_prob",
+//                "Probability for marking, suggested values are 0.01 and 0.02",
+//                DoubleValue (0.02),
+//                MakeDoubleAccessor (&RedQueue::m_prob),
+//                MakeDoubleChecker <double> ())
+std::string qMode = "Bytes";
+std::string qBurst = "6";
+std::string qAvPkt = "1024";
+std::string qLimit = "25600"; //"100000";
+std::string qthMin = "5120";  // 1024 x 5 bytes
+std::string qthMax = "15360"; // 1024 x 15 bytes
+std::string qIdleRate = "1500000";  //1.5 Mbps
+std::string qProb = "0.02";
+
+namespace ns3 {
+
+MyPointToPointHelper::MyPointToPointHelper ()
+{
+  m_queueFactory.SetTypeId ("ns3::DropTailQueue");
+  m_queueFactory_red.SetTypeId ("ns3::RedQueue");
+//  m_queueFactory_red.Set ("Mode",    StringValue (qMode));
+//  m_queueFactory_red.Set ("MaxBytes",StringValue (qLimit));
+//  m_queueFactory_red.Set ("m_burst", StringValue (qBurst));
+//  m_queueFactory_red.Set ("m_avPkt", StringValue (qAvPkt));
+//  m_queueFactory_red.Set ("m_minTh", StringValue (qthMin));
+//  m_queueFactory_red.Set ("m_maxTh", StringValue (qthMax));
+//  m_queueFactory_red.Set ("m_rate",  StringValue (qIdleRate));
+//  m_queueFactory_red.Set ("m_prob",  StringValue (qProb));
+  m_deviceFactory.SetTypeId ("ns3::PointToPointNetDevice");
+  m_channelFactory.SetTypeId ("ns3::PointToPointChannel");
+  m_remoteChannelFactory.SetTypeId ("ns3::PointToPointRemoteChannel");
+}
+
+void 
+MyPointToPointHelper::SetQueue (std::string type,
+                              std::string n1, const AttributeValue &v1,
+                              std::string n2, const AttributeValue &v2,
+                              std::string n3, const AttributeValue &v3,
+                              std::string n4, const AttributeValue &v4,
+                              std::string n5, const AttributeValue &v5,
+                              std::string n6, const AttributeValue &v6,
+                              std::string n7, const AttributeValue &v7,
+                              std::string n8, const AttributeValue &v8)
+{
+  m_queueFactory.SetTypeId (type);
+  m_queueFactory.Set (n1, v1);
+  m_queueFactory.Set (n2, v2);
+  m_queueFactory.Set (n3, v3);
+  m_queueFactory.Set (n4, v4);
+  m_queueFactory.Set (n5, v5);
+  m_queueFactory.Set (n6, v6);
+  m_queueFactory.Set (n7, v7);
+  m_queueFactory.Set (n8, v8);
+}
+
+void 
+MyPointToPointHelper::SetDeviceAttribute (std::string n1, const AttributeValue &v1)
+{
+  m_deviceFactory.Set (n1, v1);
+}
+
+void 
+MyPointToPointHelper::SetChannelAttribute (std::string n1, const AttributeValue &v1)
+{
+  m_channelFactory.Set (n1, v1);
+  m_remoteChannelFactory.Set (n1, v1);
+}
+
+void 
+MyPointToPointHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename)
+{
+  //
+  // All of the Pcap enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type PointToPointNetDevice.
+  //
+  Ptr<PointToPointNetDevice> device = nd->GetObject<PointToPointNetDevice> ();
+  if (device == 0)
+    {
+      NS_LOG_INFO ("MyPointToPointHelper::EnablePcapInternal(): Device " << device << " not of type ns3::PointToPointNetDevice");
+      return;
+    }
+
+  PcapHelper pcapHelper;
+
+  std::string filename;
+  if (explicitFilename)
+    {
+      filename = prefix;
+    }
+  else
+    {
+      filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+    }
+
+  Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, std::ios::out, 
+                                                     PcapHelper::DLT_PPP);
+  pcapHelper.HookDefaultSink<PointToPointNetDevice> (device, "PromiscSniffer", file);
+}
+
+void 
+MyPointToPointHelper::EnableAsciiInternal (
+  Ptr<OutputStreamWrapper> stream, 
+  std::string prefix, 
+  Ptr<NetDevice> nd,
+  bool explicitFilename)
+{
+  //
+  // All of the ascii enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type PointToPointNetDevice.
+  //
+  Ptr<PointToPointNetDevice> device = nd->GetObject<PointToPointNetDevice> ();
+  if (device == 0)
+    {
+      NS_LOG_INFO ("MyPointToPointHelper::EnableAsciiInternal(): Device " << device <<
+                   " not of type ns3::PointToPointNetDevice");
+      return;
+    }
+
+  //
+  // Our default trace sinks are going to use packet printing, so we have to 
+  // make sure that is turned on.
+  //
+  Packet::EnablePrinting ();
+
+  //
+  // If we are not provided an OutputStreamWrapper, we are expected to create 
+  // one using the usual trace filename conventions and do a Hook*WithoutContext
+  // since there will be one file per context and therefore the context would
+  // be redundant.
+  //
+  if (stream == 0)
+    {
+      //
+      // Set up an output stream object to deal with private ofstream copy 
+      // constructor and lifetime issues.  Let the helper decide the actual
+      // name of the file given the prefix.
+      //
+      AsciiTraceHelper asciiTraceHelper;
+
+      std::string filename;
+      if (explicitFilename)
+        {
+          filename = prefix;
+        }
+      else
+        {
+          filename = asciiTraceHelper.GetFilenameFromDevice (prefix, device);
+        }
+
+      Ptr<OutputStreamWrapper> theStream = asciiTraceHelper.CreateFileStream (filename);
+
+      //
+      // The MacRx trace source provides our "r" event.
+      //
+      asciiTraceHelper.HookDefaultReceiveSinkWithoutContext<PointToPointNetDevice> (device, "MacRx", theStream);
+
+      //
+      // The "+", '-', and 'd' events are driven by trace sources actually in the
+      // transmit queue.
+      //
+      Ptr<Queue> queue = device->GetQueue ();
+      asciiTraceHelper.HookDefaultEnqueueSinkWithoutContext<Queue> (queue, "Enqueue", theStream);
+      asciiTraceHelper.HookDefaultDropSinkWithoutContext<Queue> (queue, "Drop", theStream);
+      asciiTraceHelper.HookDefaultDequeueSinkWithoutContext<Queue> (queue, "Dequeue", theStream);
+
+      // PhyRxDrop trace source for "d" event
+      asciiTraceHelper.HookDefaultDropSinkWithoutContext<PointToPointNetDevice> (device, "PhyRxDrop", theStream);
+
+      return;
+    }
+
+  //
+  // If we are provided an OutputStreamWrapper, we are expected to use it, and
+  // to providd a context.  We are free to come up with our own context if we
+  // want, and use the AsciiTraceHelper Hook*WithContext functions, but for 
+  // compatibility and simplicity, we just use Config::Connect and let it deal
+  // with the context.
+  //
+  // Note that we are going to use the default trace sinks provided by the 
+  // ascii trace helper.  There is actually no AsciiTraceHelper in sight here,
+  // but the default trace sinks are actually publicly available static 
+  // functions that are always there waiting for just such a case.
+  //
+  uint32_t nodeid = nd->GetNode ()->GetId ();
+  uint32_t deviceid = nd->GetIfIndex ();
+  std::ostringstream oss;
+
+  oss << "/NodeList/" << nd->GetNode ()->GetId () << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/MacRx";
+  Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultReceiveSinkWithContext, stream));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/TxQueue/Enqueue";
+  Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultEnqueueSinkWithContext, stream));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/TxQueue/Dequeue";
+  Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultDequeueSinkWithContext, stream));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/TxQueue/Drop";
+  Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultDropSinkWithContext, stream));
+
+  oss.str ("");
+  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/PhyRxDrop";
+  Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultDropSinkWithContext, stream));
+}
+
+NetDeviceContainer 
+MyPointToPointHelper::Install (NodeContainer c)
+{
+  NS_ASSERT (c.GetN () == 2);
+  return Install (c.Get (0), c.Get (1));
+}
+
+NetDeviceContainer 
+MyPointToPointHelper::Install (Ptr<Node> a, e_ns3_network_element_type_t type_a, Ptr<Node> b, e_ns3_network_element_type_t type_b)
+{
+  NetDeviceContainer container;
+  Ptr<Queue> queueA;
+  Ptr<Queue> queueB;
+
+  Ptr<PointToPointNetDevice> devA = m_deviceFactory.Create<PointToPointNetDevice> ();
+  devA->SetAddress (Mac48Address::Allocate ());
+  a->AddDevice (devA);
+
+  if(type_a == NS3_NETWORK_ELEMENT_ROUTER){
+       queueA = m_queueFactory_red.Create<Queue> ();
+  }
+  else
+         queueA = m_queueFactory.Create<Queue> ();
+  devA->SetQueue (queueA);
+
+  Ptr<PointToPointNetDevice> devB = m_deviceFactory.Create<PointToPointNetDevice> ();
+  devB->SetAddress (Mac48Address::Allocate ());
+  b->AddDevice (devB);
+
+  if(type_b == NS3_NETWORK_ELEMENT_ROUTER){
+       queueB = m_queueFactory_red.Create<Queue> ();
+  }
+  else
+         queueB = m_queueFactory.Create<Queue> ();
+  devB->SetQueue (queueB);
+
+  // If MPI is enabled, we need to see if both nodes have the same system id 
+  // (rank), and the rank is the same as this instance.  If both are true, 
+  //use a normal p2p channel, otherwise use a remote channel
+  bool useNormalChannel = true;
+  Ptr<PointToPointChannel> channel = 0;
+  if (MpiInterface::IsEnabled ())
+    {
+      uint32_t n1SystemId = a->GetSystemId ();
+      uint32_t n2SystemId = b->GetSystemId ();
+      uint32_t currSystemId = MpiInterface::GetSystemId ();
+      if (n1SystemId != currSystemId || n2SystemId != currSystemId) 
+        {
+          useNormalChannel = false;
+        }
+    }
+  if (useNormalChannel)
+    {
+      channel = m_channelFactory.Create<PointToPointChannel> ();
+    }
+  else
+    {
+      channel = m_remoteChannelFactory.Create<PointToPointRemoteChannel> ();
+      Ptr<MpiReceiver> mpiRecA = CreateObject<MpiReceiver> ();
+      Ptr<MpiReceiver> mpiRecB = CreateObject<MpiReceiver> ();
+      mpiRecA->SetReceiveCallback (MakeCallback (&PointToPointNetDevice::Receive, devA));
+      mpiRecB->SetReceiveCallback (MakeCallback (&PointToPointNetDevice::Receive, devB));
+      devA->AggregateObject (mpiRecA);
+      devB->AggregateObject (mpiRecB);
+    }
+
+  devA->Attach (channel);
+  devB->Attach (channel);
+  container.Add (devA);
+  container.Add (devB);
+
+  return container;
+}
+
+NetDeviceContainer 
+MyPointToPointHelper::Install (Ptr<Node> a, Ptr<Node> b)
+{
+  NetDeviceContainer container;
+
+  Ptr<PointToPointNetDevice> devA = m_deviceFactory.Create<PointToPointNetDevice> ();
+  devA->SetAddress (Mac48Address::Allocate ());
+  a->AddDevice (devA);
+  Ptr<Queue> queueA = m_queueFactory.Create<Queue> ();
+  devA->SetQueue (queueA);
+  Ptr<PointToPointNetDevice> devB = m_deviceFactory.Create<PointToPointNetDevice> ();
+  devB->SetAddress (Mac48Address::Allocate ());
+  b->AddDevice (devB);
+  Ptr<Queue> queueB = m_queueFactory.Create<Queue> ();
+  devB->SetQueue (queueB);
+  // If MPI is enabled, we need to see if both nodes have the same system id
+  // (rank), and the rank is the same as this instance.  If both are true,
+  //use a normal p2p channel, otherwise use a remote channel
+  bool useNormalChannel = true;
+  Ptr<PointToPointChannel> channel = 0;
+  if (MpiInterface::IsEnabled ())
+    {
+      uint32_t n1SystemId = a->GetSystemId ();
+      uint32_t n2SystemId = b->GetSystemId ();
+      uint32_t currSystemId = MpiInterface::GetSystemId ();
+      if (n1SystemId != currSystemId || n2SystemId != currSystemId)
+        {
+          useNormalChannel = false;
+        }
+    }
+  if (useNormalChannel)
+    {
+      channel = m_channelFactory.Create<PointToPointChannel> ();
+    }
+  else
+    {
+      channel = m_remoteChannelFactory.Create<PointToPointRemoteChannel> ();
+      Ptr<MpiReceiver> mpiRecA = CreateObject<MpiReceiver> ();
+      Ptr<MpiReceiver> mpiRecB = CreateObject<MpiReceiver> ();
+      mpiRecA->SetReceiveCallback (MakeCallback (&PointToPointNetDevice::Receive, devA));
+      mpiRecB->SetReceiveCallback (MakeCallback (&PointToPointNetDevice::Receive, devB));
+      devA->AggregateObject (mpiRecA);
+      devB->AggregateObject (mpiRecB);
+    }
+
+  devA->Attach (channel);
+  devB->Attach (channel);
+  container.Add (devA);
+  container.Add (devB);
+
+  return container;
+}
+
+NetDeviceContainer
+MyPointToPointHelper::Install (Ptr<Node> a, std::string bName)
+{
+  Ptr<Node> b = Names::Find<Node> (bName);
+  return Install (a, b);
+}
+
+NetDeviceContainer 
+MyPointToPointHelper::Install (std::string aName, Ptr<Node> b)
+{
+  Ptr<Node> a = Names::Find<Node> (aName);
+  return Install (a, b);
+}
+
+NetDeviceContainer 
+MyPointToPointHelper::Install (std::string aName, std::string bName)
+{
+  Ptr<Node> a = Names::Find<Node> (aName);
+  Ptr<Node> b = Names::Find<Node> (bName);
+  return Install (a, b);
+}
+
+} // namespace ns3
diff --git a/src/surf/ns3/my-point-to-point-helper.h b/src/surf/ns3/my-point-to-point-helper.h
new file mode 100644 (file)
index 0000000..7edd931
--- /dev/null
@@ -0,0 +1,205 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008 INRIA
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+#ifndef POINT_TO_POINT_HELPER_H
+#define POINT_TO_POINT_HELPER_H
+
+#include <string>
+
+#include "ns3/object-factory.h"
+#include "ns3/net-device-container.h"
+#include "ns3/node-container.h"
+#include "ns3/deprecated.h"
+
+#include "ns3/trace-helper.h"
+
+#include "ns3_interface.h"
+
+namespace ns3 {
+
+class Queue;
+class NetDevice;
+class Node;
+
+/**
+ * \brief Build a set of PointToPointNetDevice objects
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
+ * "mixins".
+ */
+class MyPointToPointHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice
+{
+public:
+  /**
+   * Create a MyPointToPointHelper to make life easier when creating point to
+   * point networks.
+   */
+  MyPointToPointHelper ();
+  virtual ~MyPointToPointHelper () {}
+
+  /**
+   * Each point to point net device must have a queue to pass packets through.
+   * This method allows one to set the type of the queue that is automatically
+   * created when the device is created and attached to a node.
+   *
+   * \param type the type of queue
+   * \param n1 the name of the attribute to set on the queue
+   * \param v1 the value of the attribute to set on the queue
+   * \param n2 the name of the attribute to set on the queue
+   * \param v2 the value of the attribute to set on the queue
+   * \param n3 the name of the attribute to set on the queue
+   * \param v3 the value of the attribute to set on the queue
+   * \param n4 the name of the attribute to set on the queue
+   * \param v4 the value of the attribute to set on the queue
+   *
+   * Set the type of queue to create and associated to each
+   * PointToPointNetDevice created through MyPointToPointHelper::Install.
+   */
+  void SetQueue (std::string type,
+                 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
+                 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
+                 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
+                 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
+                 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
+                 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
+                 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue (),
+                 std::string n8 = "", const AttributeValue &v8 = EmptyAttributeValue ());
+
+  /**
+   * Set an attribute value to be propagated to each NetDevice created by the
+   * helper.
+   *
+   * \param name the name of the attribute to set
+   * \param value the value of the attribute to set
+   *
+   * Set these attributes on each ns3::PointToPointNetDevice created
+   * by MyPointToPointHelper::Install
+   */
+  void SetDeviceAttribute (std::string name, const AttributeValue &value);
+
+  /**
+   * Set an attribute value to be propagated to each Channel created by the
+   * helper.
+   *
+   * \param name the name of the attribute to set
+   * \param value the value of the attribute to set
+   *
+   * Set these attribute on each ns3::PointToPointChannel created
+   * by MyPointToPointHelper::Install
+   */
+  void SetChannelAttribute (std::string name, const AttributeValue &value);
+
+  /**
+   * \param c a set of nodes
+   *
+   * This method creates a ns3::PointToPointChannel with the
+   * attributes configured by MyPointToPointHelper::SetChannelAttribute,
+   * then, for each node in the input container, we create a 
+   * ns3::PointToPointNetDevice with the requested attributes, 
+   * a queue for this ns3::NetDevice, and associate the resulting 
+   * ns3::NetDevice with the ns3::Node and ns3::PointToPointChannel.
+   */
+  NetDeviceContainer Install (NodeContainer c);
+
+  /**
+   * \param a first node
+   * \param b second node
+   *
+   * Saves you from having to construct a temporary NodeContainer. 
+   * Also, if MPI is enabled, for distributed simulations, 
+   * appropriate remote point-to-point channels are created.
+   */
+  NetDeviceContainer Install (Ptr<Node> a, Ptr<Node> b);
+
+  /**
+   * \param a first node
+   * \param b second node
+   *
+   * Saves you from having to construct a temporary NodeContainer.
+   * Also, if MPI is enabled, for distributed simulations,
+   * appropriate remote point-to-point channels are created.
+   */
+  NetDeviceContainer Install (Ptr<Node> a, e_ns3_network_element_type_t type_a, Ptr<Node> b, e_ns3_network_element_type_t type_b);
+
+  /**
+   * \param a first node
+   * \param bName name of second node
+   *
+   * Saves you from having to construct a temporary NodeContainer.
+   */
+  NetDeviceContainer Install (Ptr<Node> a, std::string bName);
+
+  /**
+   * \param aName Name of first node
+   * \param b second node
+   *
+   * Saves you from having to construct a temporary NodeContainer.
+   */
+  NetDeviceContainer Install (std::string aName, Ptr<Node> b);
+
+  /**
+   * \param aNode Name of first node
+   * \param bNode Name of second node
+   *
+   * Saves you from having to construct a temporary NodeContainer.
+   */
+  NetDeviceContainer Install (std::string aNode, std::string bNode);
+
+private:
+  /**
+   * \brief Enable pcap output the indicated net device.
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * \param prefix Filename prefix to use for pcap files.
+   * \param nd Net device for which you want to enable tracing.
+   * \param promiscuous If true capture all possible packets available at the device.
+   * \param explicitFilename Treat the prefix as an explicit filename if true
+   */
+  virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename);
+
+  /**
+   * \brief Enable ascii trace output on the indicated net device.
+   * \internal
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * \param stream The output stream object to use when logging ascii traces.
+   * \param prefix Filename prefix to use for ascii trace files.
+   * \param nd Net device for which you want to enable tracing.
+   */
+  virtual void EnableAsciiInternal (
+    Ptr<OutputStreamWrapper> stream,
+    std::string prefix,
+    Ptr<NetDevice> nd,
+    bool explicitFilename);
+
+  ObjectFactory m_queueFactory;
+  ObjectFactory m_queueFactory_red;
+  ObjectFactory m_channelFactory;
+  ObjectFactory m_remoteChannelFactory;
+  ObjectFactory m_deviceFactory;
+};
+
+} // namespace ns3
+
+#endif /* POINT_TO_POINT_HELPER_H */
index 4542034..21eb92a 100644 (file)
@@ -5,16 +5,18 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "ns3_interface.h"
-#include "ns3/core-module.h"
-#include "ns3/simulator-module.h"
-#include "ns3/node-module.h"
-#include "ns3/helper-module.h"
-#include "ns3/global-route-manager.h"
-#include "ns3/global-route-manager.h"
-#include "ns3/ipv4-global-routing-helper.h"
+#include "ns3_simulator.h"
+#include "xbt/lib.h"
+#include "xbt/log.h"
+#include "xbt/dynar.h"
+
 
 using namespace ns3;
 
+extern xbt_lib_t host_lib;
+extern int NS3_HOST_LEVEL;             //host node for ns3
+extern xbt_dynar_t IPV4addr;
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(interface_ns3, surf,
                                 "Logging specific to the SURF network NS3 module");
 
@@ -27,17 +29,111 @@ int number_of_nodes = 0;
 int number_of_clusters_nodes = 0;
 int number_of_links = 1;
 int number_of_networks = 1;
+int port_number = 1025; //Port number is limited from 1025 to 65 000
+
+static NS3Sim* ns3_sim = 0;
+
+void ns3_simulator(double min){
+                       ns3_sim->simulator_start(min);
+}
+
+void* ns3_get_socket_action(void *socket){
+               return ns3_sim->get_action_from_socket(socket);
+}
+
+double ns3_get_socket_remains(void *socket){
+               return ns3_sim->get_remains_from_socket(socket);
+}
+
+double ns3_get_socket_sent(void *socket){
+  return ns3_sim->get_sent_from_socket(socket);
+}
+
+char ns3_get_socket_is_finished(void *socket){
+               return ns3_sim->get_finished(socket);
+}
+
+double ns3_time(){
+       return Simulator::Now().GetSeconds();
+}
+
+int ns3_create_flow(const char* a,const char *b,double start,u_int32_t TotalBytes,void * action)
+{
+       ns3_nodes_t node1 = (ns3_nodes_t) xbt_lib_get_or_null(host_lib,a,NS3_HOST_LEVEL);
+       ns3_nodes_t node2 = (ns3_nodes_t) xbt_lib_get_or_null(host_lib,b,NS3_HOST_LEVEL);
+
+       Ptr<Node> src_node = nodes.Get(node1->node_num);
+       Ptr<Node> dst_node = nodes.Get(node2->node_num);
+
+       char* addr = (char*)xbt_dynar_get_as(IPV4addr,node2->node_num,char*);
+
+       XBT_DEBUG("ns3_create_flow %d Bytes from %d to %d with Interface %s",TotalBytes, node1->node_num, node2->node_num,addr);
+       ns3_sim->create_flow_NS3(src_node,
+                       dst_node,
+                       port_number,
+                       start,
+                       addr,
+                       TotalBytes,
+                       action);
+
+       port_number++;
+       if(port_number >= 65001 ) xbt_die("Too many connections! Port number is saturated.");
+       return 0;
+}
+
+// clean up
+int ns3_finalize(void){
+       if (!ns3_sim) return -1;
+       delete ns3_sim;
+       ns3_sim = 0;
+       return 0;
+}
+
+// initialize the NS3 interface and environment
+int ns3_initialize(const char* TcpProtocol){
+  xbt_assert(!ns3_sim, "ns3 already initialized");
+  ns3_sim = new NS3Sim();
+
+//  tcpModel are:
+//  "ns3::TcpNewReno"
+//  "ns3::TcpReno"
+//  "ns3::TcpTahoe"
+
+  Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1024)); // 1024-byte packet for easier reading
+  Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
+
+  if(!strcmp(TcpProtocol,"default")){
+         return 0;
+  }
+  if(!strcmp(TcpProtocol,"Reno")){
+         XBT_INFO("Switching Tcp protocol to '%s'",TcpProtocol);
+         Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpReno"));
+         return 0;
+  }
+  if(!strcmp(TcpProtocol,"NewReno")){
+         XBT_INFO("Switching Tcp protocol to '%s'",TcpProtocol);
+         Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpNewReno"));
+         return 0;
+  }
+  if(!strcmp(TcpProtocol,"Tahoe")){
+         XBT_INFO("Switching Tcp protocol to '%s'",TcpProtocol);
+         Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue("ns3::TcpTahoe"));
+         return 0;
+  }
+
+  XBT_ERROR("The ns3/TcpModel must be : NewReno or Reno or Tahoe");
+}
 
 void * ns3_add_host(char * id)
 {
        ns3_nodes_t host  = xbt_new0(s_ns3_nodes_t,1);
-       XBT_INFO("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
+       XBT_DEBUG("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
        Ptr<Node> node =  CreateObject<Node> (0);
        stack.Install(node);
        nodes.Add(node);
        host->node_num = number_of_nodes;
        host->type = NS3_NETWORK_ELEMENT_HOST;
-       host->data = node;
+       host->data = GetPointer(node);
        number_of_nodes++;
        return host;
 }
@@ -45,7 +141,7 @@ void * ns3_add_host(char * id)
 void * ns3_add_host_cluster(char * id)
 {
        ns3_nodes_t host  = xbt_new0(s_ns3_nodes_t,1);
-       XBT_INFO("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
+       XBT_DEBUG("Interface ns3 add host[%d] '%s'",number_of_nodes,id);
        Ptr<Node> node =  CreateObject<Node> (0);
        stack.Install(node);
        Cluster_nodes.Add(node);
@@ -60,7 +156,7 @@ void * ns3_add_host_cluster(char * id)
 void * ns3_add_router(char * id)
 {
        ns3_nodes_t router  = xbt_new0(s_ns3_nodes_t,1);
-       XBT_INFO("Interface ns3 add router[%d] '%s'",number_of_nodes,id);
+       XBT_DEBUG("Interface ns3 add router[%d] '%s'",number_of_nodes,id);
        Ptr<Node> node =  CreateObject<Node> (0);
        stack.Install(node);
        nodes.Add(node);
@@ -102,6 +198,7 @@ void * ns3_add_cluster(char * bw,char * lat,char *id)
        XBT_DEBUG("Assign IP Addresses %s to CSMA.",adr);
        Ipv4AddressHelper ipv4;
        ipv4.SetBase (adr, "255.255.0.0");
+       free(adr);
        interfaces.Add(ipv4.Assign (devices));
 
        if(number_of_links == 255){
@@ -113,23 +210,33 @@ void * ns3_add_cluster(char * bw,char * lat,char *id)
                number_of_links++;
        }
        XBT_DEBUG("Number of nodes in Cluster_nodes: %d",Cluster_nodes.GetN());
-
 }
 
 void * ns3_add_AS(char * id)
 {
-       XBT_INFO("Interface ns3 add AS '%s'",id);
+       XBT_DEBUG("Interface ns3 add AS '%s'",id);
        return NULL;
 }
 
-void * ns3_add_link(int src,int dst,char * bw,char * lat)
+static char* transformIpv4Address (Ipv4Address from){
+       std::stringstream sstream;
+               sstream << from ;
+               std::string s = sstream.str();
+               return bprintf("%s",s.c_str());
+}
+
+void * ns3_add_link(int src, e_ns3_network_element_type_t type_src,
+                                       int dst, e_ns3_network_element_type_t type_dst,
+                                       char * bw,char * lat)
 {
        if(number_of_links == 1 ) {
                LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);
                LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);
        }
 
-       PointToPointHelper pointToPoint;
+
+       MyPointToPointHelper pointToPoint;
+
        NetDeviceContainer netA;
        Ipv4AddressHelper address;
 
@@ -141,14 +248,22 @@ void * ns3_add_link(int src,int dst,char * bw,char * lat)
        pointToPoint.SetChannelAttribute ("Delay", StringValue (lat));
        //pointToPoint.EnablePcapAll("test_ns3_trace"); //DEBUG
 
-       netA.Add(pointToPoint.Install (a, b));
+       netA.Add(pointToPoint.Install (a, type_src, b, type_dst));
 
        char * adr = bprintf("%d.%d.0.0",number_of_networks,number_of_links);
        address.SetBase (adr, "255.255.0.0");
        XBT_DEBUG("\tInterface stack '%s'",adr);
+       free(adr);
        interfaces.Add(address.Assign (netA));
 
-       XBT_DEBUG(" ");
+       char *tmp = transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-2));
+       xbt_dynar_set_as(IPV4addr,src,char*,tmp);
+       XBT_DEBUG("Have write '%s' for Node '%d'",(char*)xbt_dynar_get_as(IPV4addr,src,char*),src);
+
+       tmp = transformIpv4Address(interfaces.GetAddress(interfaces.GetN()-1));
+       xbt_dynar_set_as(IPV4addr,dst,char*,tmp);
+       XBT_DEBUG("Have write '%s' for Node '%d'",(char*)xbt_dynar_get_as(IPV4addr,dst,char*),dst);
+
        if(number_of_links == 255){
                if(number_of_networks == 255)
                        xbt_die("Number of links and networks exceed 255*255");
@@ -161,48 +276,7 @@ void * ns3_add_link(int src,int dst,char * bw,char * lat)
 
 void * ns3_end_platform(void)
 {
-       XBT_INFO("InitializeRoutes");
+       XBT_DEBUG("InitializeRoutes");
        GlobalRouteManager::BuildGlobalRoutingDatabase();
        GlobalRouteManager::InitializeRoutes();
-
-       //TODO REMOVE ;)
-       Ptr<Node> a = nodes.Get(0);
-       Ptr<Node> b = nodes.Get(1);
-       Ptr<Node> c = nodes.Get(2);
-       Ptr<Node> d = nodes.Get(3);
-
-       UdpEchoServerHelper echoServer (9);
-
-       ApplicationContainer serverApps = echoServer.Install (a);
-       serverApps.Start (Seconds (1.0));
-       serverApps.Stop (Seconds (20.0));
-
-       UdpEchoClientHelper echoClient (interfaces.GetAddress (0), 9);
-       echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
-       echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
-       echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
-       ApplicationContainer clientApps_b = echoClient.Install (b);
-       clientApps_b.Start (Seconds (2.0));
-       clientApps_b.Stop (Seconds (10.0));
-
-       UdpEchoClientHelper echoClient2 (interfaces.GetAddress (0), 9);
-       echoClient2.SetAttribute ("MaxPackets", UintegerValue (1));
-       echoClient2.SetAttribute ("Interval", TimeValue (Seconds (1.)));
-       echoClient2.SetAttribute ("PacketSize", UintegerValue (512));
-       ApplicationContainer clientApps_c = echoClient2.Install (c);
-       clientApps_c.Start (Seconds (3.0));
-       clientApps_c.Stop (Seconds (10.0));
-
-       UdpEchoClientHelper echoClient3 (interfaces.GetAddress (0), 9);
-       echoClient3.SetAttribute ("MaxPackets", UintegerValue (1));
-       echoClient3.SetAttribute ("Interval", TimeValue (Seconds (1.)));
-       echoClient3.SetAttribute ("PacketSize", UintegerValue (256));
-       ApplicationContainer clientApps_d = echoClient3.Install (d);
-       clientApps_d.Start (Seconds (4.0));
-       clientApps_d.Stop (Seconds (10.0));
-
-       Simulator::Run ();
-       Simulator::Destroy ();
-
-       //HEEEEEEE
 }
index 73780c0..15f847d 100644 (file)
@@ -29,11 +29,22 @@ typedef struct ns3_nodes{
 extern "C" {
 #endif
 
+XBT_PUBLIC(int)    ns3_finalize(void);
+XBT_PUBLIC(int)    ns3_initialize(const char* TcpProtocol);
+XBT_PUBLIC(int)    ns3_create_flow(const char* a,const char *b,double start,u_int32_t TotalBytes,void * action);
+XBT_PUBLIC(void)   ns3_simulator(double min);
+XBT_PUBLIC(double) ns3_time(void);
+XBT_PUBLIC(void*)  ns3_get_socket_action(void *socket);
+XBT_PUBLIC(double) ns3_get_socket_remains(void *socket);
+XBT_PUBLIC(double) ns3_get_socket_sent(void *socket);
+XBT_PUBLIC(char)   ns3_get_socket_is_finished(void *socket);
 XBT_PUBLIC(void *) ns3_add_host(char * id);
 XBT_PUBLIC(void *) ns3_add_host_cluster(char * id);
 XBT_PUBLIC(void *) ns3_add_router(char * id);
 XBT_PUBLIC(void *) ns3_add_AS(char * id);
-XBT_PUBLIC(void *) ns3_add_link(int src,int dst,char * bw,char * lat);
+XBT_PUBLIC(void *) ns3_add_link(int src, e_ns3_network_element_type_t type_src,
+                                                               int dst, e_ns3_network_element_type_t type_dst,
+                                                               char * bw,char * lat);
 XBT_PUBLIC(void *) ns3_end_platform(void);
 XBT_PUBLIC(void *) ns3_add_cluster(char * bw,char * lat,char *id);
 #ifdef __cplusplus
index 29fd20e..5e2c108 100644 (file)
@@ -5,6 +5,27 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "surf/ns3/ns3_simulator.h"
+#include "xbt/dict.h"
+#include "xbt/log.h"
+#include "xbt/sysdep.h"
+
+using namespace ns3;
+using namespace std;
+
+xbt_dict_t dict_socket = NULL;
+
+NS3Sim SimulatorNS3;
+static char socket_key[24];
+
+static void receive_callback(Ptr<Socket> localSocket);
+static void send_callback(Ptr<Socket> localSocket, uint32_t txSpace);
+static void datasent_callback(Ptr<Socket> localSocket, uint32_t dataSent);
+static void StartFlow(Ptr<Socket> sock,
+    const char *to,
+    uint16_t port_number);
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simulator_ns3, surf,
+                                "Logging specific to the SURF network NS3 module");
 
 // Constructor.
 NS3Sim::NS3Sim(){
@@ -12,3 +33,177 @@ NS3Sim::NS3Sim(){
 //Destructor.
 NS3Sim::~NS3Sim(){
 }
+
+static XBT_INLINE void transformSocketPtr (Ptr<Socket> localSocket){
+  std::stringstream sstream;
+  sstream << localSocket ;
+  std::string s = sstream.str();
+  sprintf(socket_key,"%s",s.c_str());
+}
+
+/*
+ * This function create a flow from src to dst
+ *
+ * Parameters
+ *             src: node source
+ *             dst: node destination
+ *             port_number: The port number to use
+ *             start: the time the communication start
+ *             addr:  ip address
+ *             totalBytes: number of bytes to transmit
+ */
+void NS3Sim::create_flow_NS3(
+               Ptr<Node> src,
+               Ptr<Node> dst,
+               uint16_t port_number,
+               double start,
+               const char *addr,
+               uint32_t totalBytes,
+               void * action)
+{
+       if(!dict_socket) dict_socket = xbt_dict_new_homogeneous(free);
+
+       PacketSinkHelper sink ("ns3::TcpSocketFactory",
+                                                       InetSocketAddress (Ipv4Address::GetAny(),
+                                                       port_number));
+       sink.Install (dst);
+
+       Ptr<Socket> sock = Socket::CreateSocket (src,
+                                                       TcpSocketFactory::GetTypeId());
+
+       MySocket *mysocket = new MySocket();
+       mysocket->totalBytes = totalBytes;
+       mysocket->remaining = totalBytes;
+       mysocket->bufferedBytes = 0;
+       mysocket->sentBytes = 0;
+       mysocket->finished = 0;
+       mysocket->action = action;
+
+       transformSocketPtr(sock);
+       xbt_dict_set(dict_socket,socket_key, mysocket,NULL);
+
+       sock->Bind(InetSocketAddress(port_number));
+       XBT_DEBUG("Create flow starting to %fs + %fs = %fs",start-ns3_time(), ns3_time(), start);
+
+       Simulator::Schedule (Seconds(start-ns3_time()),&StartFlow, sock, addr, port_number);
+//     Simulator::Schedule (Seconds(0.0),&StartFlow, sock, addr, port_number);
+
+}
+
+void* NS3Sim::get_action_from_socket(void *socket){
+       return ((MySocket *)socket)->action;
+}
+
+char NS3Sim::get_finished(void *socket){
+       return ((MySocket *)socket)->finished;
+}
+
+double NS3Sim::get_remains_from_socket(void *socket){
+       return ((MySocket *)socket)->remaining;
+}
+
+double NS3Sim::get_sent_from_socket(void *socket){
+  return ((MySocket *)socket)->sentBytes;
+}
+
+void NS3Sim::simulator_start(double min){
+  if(min > 0.0)
+    Simulator::Stop(Seconds(min));
+  XBT_DEBUG("Start simulator");
+  Simulator::Run ();
+}
+
+static MySocket* get_my_socket(Ptr<Socket> localSocket) {
+       transformSocketPtr(localSocket);
+       return (MySocket*)xbt_dict_get_or_null(dict_socket,socket_key);
+}
+
+static void receive_callback(Ptr<Socket> localSocket){
+  MySocket* mysocket = get_my_socket(localSocket);
+
+  if (mysocket->finished == 0){
+    mysocket->finished = 1;
+    XBT_DEBUG("recv_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
+    XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds());
+    Simulator::Stop(Seconds(0.0));
+    Simulator::Run();
+  }
+}
+
+static void send_callback(Ptr<Socket> localSocket, uint32_t txSpace){
+       MySocket* mysocket = get_my_socket(localSocket);
+
+       if (mysocket->remaining == 0){
+                 //all data was already buffered (and socket was already closed), just return
+                 return;
+       }
+
+       uint8_t *data = (uint8_t*)malloc(sizeof(uint8_t)*txSpace);
+
+       while (mysocket->bufferedBytes < mysocket->totalBytes
+                       && localSocket->GetTxAvailable () > 0)
+       {
+      uint32_t toWrite = min ((mysocket->remaining), txSpace);
+      toWrite = min (toWrite, localSocket->GetTxAvailable ());
+      int amountSent = localSocket->Send (data, toWrite, 0);
+
+      if(amountSent < 0)
+         return;
+      (mysocket->bufferedBytes) += amountSent;
+      (mysocket->remaining) -= amountSent;
+      XBT_DEBUG("send_cb of F[%p, %p, %d] (%d/%d) %d buffered", mysocket, mysocket->action, mysocket->totalBytes, mysocket->remaining, mysocket->totalBytes, amountSent);
+
+    }
+
+       free(data);
+
+       if ((mysocket->bufferedBytes) >= mysocket->totalBytes){
+               localSocket->Close();
+       }
+}
+
+static void datasent_callback(Ptr<Socket> localSocket, uint32_t dataSent){
+  MySocket* mysocket = get_my_socket(localSocket);
+  mysocket->sentBytes += dataSent;
+  XBT_DEBUG("datasent_cb of F[%p, %p, %d] %d sent", mysocket, mysocket->action, mysocket->totalBytes, dataSent);
+}
+
+static void normalClose_callback(Ptr<Socket> localSocket){
+  MySocket* mysocket = get_my_socket(localSocket);
+  XBT_DEBUG("normalClose_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
+  receive_callback (localSocket);
+}
+
+static void errorClose_callback(Ptr<Socket> localSocket){
+  MySocket* mysocket = get_my_socket(localSocket);
+  XBT_DEBUG("errorClose_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
+  xbt_die("NS3: a socket was closed anormally");
+}
+
+static void succeededConnect_callback(Ptr<Socket> localSocket){
+  MySocket* mysocket = get_my_socket(localSocket);
+  XBT_DEBUG("succeededConnect_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
+}
+
+static void failedConnect_callback(Ptr<Socket> localSocket){
+  MySocket* mysocket = get_my_socket(localSocket);
+  XBT_DEBUG("failedConnect_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
+  xbt_die("NS3: a socket failed to connect");
+}
+
+static void StartFlow(Ptr<Socket> sock,
+    const char *to,
+    uint16_t port_number)
+{
+  InetSocketAddress serverAddr (to, port_number);
+
+  sock->Connect(serverAddr);
+  sock->SetSendCallback (MakeCallback (&send_callback));
+  sock->SetRecvCallback (MakeCallback (&receive_callback));
+  sock->SetDataSentCallback (MakeCallback (&datasent_callback));
+  sock->SetConnectCallback (MakeCallback (&succeededConnect_callback), MakeCallback (&failedConnect_callback));
+  sock->SetCloseCallbacks (MakeCallback (&normalClose_callback), MakeCallback (&errorClose_callback));
+
+  MySocket* mysocket = get_my_socket(sock);
+  XBT_DEBUG("startFlow_cb of F[%p, %p, %d] dest=%s port=%d", mysocket, mysocket->action, mysocket->totalBytes, to, port_number);
+}
index dce821b..aab3a04 100644 (file)
@@ -9,15 +9,62 @@
 
 #ifdef __cplusplus
 
+#include "ns3/core-module.h"
+#include "my-point-to-point-helper.h"
+
+#ifdef _NS3_3_10
+       /*NS3 3.10*/
+       #include "ns3/helper-module.h"
+       #include "ns3/simulator-module.h"
+       #include "ns3/node-module.h"
+       #include "ns3/helper-module.h"
+       #include "ns3/global-routing-module.h"
+       #include "ns3/tcp-socket-factory.h"
+#else
+       /*NS3 3.12*/
+       #include "ns3/node.h"
+       #include "ns3/global-route-manager.h"
+       #include "ns3/csma-helper.h"
+       #include "ns3/internet-stack-helper.h"
+       #include "ns3/ipv4-address-helper.h"
+       #include "ns3/point-to-point-helper.h"
+       #include "ns3/packet-sink-helper.h"
+       #include "ns3/inet-socket-address.h"
+       #include "ns3/tcp-socket-factory.h"
+#endif
+
+using namespace ns3;
+using namespace std;
+
+struct MySocket{
+  uint32_t bufferedBytes;
+  uint32_t sentBytes;
+  uint32_t remaining;
+  uint32_t totalBytes;
+  char finished;
+  void* action;
+};
+
 //Simulator s;
 class NS3Sim {
-       NS3Sim();
-       ~NS3Sim();
 
 private:
 
 public:
-
+       NS3Sim();
+       ~NS3Sim();
+       void create_flow_NS3(Ptr<Node> src,
+                                               Ptr<Node> dst,
+                                               uint16_t port_number,
+                                               double start,
+                                               const char *addr,
+                                               uint32_t TotalBytes,
+                                               void * action);
+       void simulator_start(double min);
+       void* get_action_from_socket(void *socket);
+       double get_remains_from_socket(void *socket);
+       double get_sent_from_socket(void *socket);
+       char get_finished(void *socket);
 };
 
 #endif                          /* __cplusplus */
diff --git a/src/surf/ns3/red-queue.cc b/src/surf/ns3/red-queue.cc
new file mode 100644 (file)
index 0000000..ca26c5e
--- /dev/null
@@ -0,0 +1,769 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2010 Regents of the University of California
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Duy Nguyen<duy@soe.ucsc.edu>
+ *
+ */
+
+#include "ns3/log.h"
+#include "ns3/enum.h"
+#include "ns3/uinteger.h"
+#include "ns3/double.h"
+#include "red-queue.h"
+#include "ns3/simulator.h"
+#include "ns3/nstime.h"
+#include "ns3/random-variable.h"
+
+#include <cstdlib>
+
+NS_LOG_COMPONENT_DEFINE ("red");
+
+#define RED_STATS_TABLE_SIZE 256
+#define RED_STATS_MASK (RED_STATS_TABLE_SIZE - 1)
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (RedQueue);
+
+TypeId RedQueue::GetTypeId (void)
+{
+  ///< Note: these paramemters must be worked out beforehand for RED to work correctly
+  ///< How these parameters are set up can affect RED performance greatly
+  static TypeId tid = TypeId ("ns3::RedQueue")
+                      .SetParent<Queue> ()
+                      .AddConstructor<RedQueue> ()
+                      .AddAttribute ("Mode",
+                                     "Whether to use Bytes (see MaxBytes) or Packets (see MaxPackets) as the maximum queue size metric.",
+                                     EnumValue (BYTES), ///> currently supports BYTES only
+                                     MakeEnumAccessor (&RedQueue::SetMode),
+                                     MakeEnumChecker (BYTES, "Bytes",
+                                                      PACKETS, "Packets"))
+                      .AddAttribute ("MaxPackets",
+                                     "The maximum number of packets accepted by this RedQueue.",
+                                     UintegerValue (100),
+                                     MakeUintegerAccessor (&RedQueue::m_maxPackets),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("MaxBytes",
+                                     "The maximum number of bytes accepted by this RedQueue.",
+                                     UintegerValue (100000),
+                                     MakeUintegerAccessor (&RedQueue::m_maxBytes),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("m_burst",
+                                     "maximum number of m_burst packets accepted by this queue",
+                                     UintegerValue (6), ///> bursts must be > minTh/avpkt
+                                     MakeUintegerAccessor (&RedQueue::m_burst),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("m_avPkt",
+                                     "In bytes, use with m_burst to determine the time constant for average queue size calculations",
+                                     UintegerValue (1024), ///> average packet size
+                                     MakeUintegerAccessor (&RedQueue::m_avPkt),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("m_minTh",
+                                     "Average queue size at which marking becomes a m_prob",
+                                     UintegerValue (5120), ///> in bytes  1024x5
+                                     MakeUintegerAccessor (&RedQueue::m_minTh),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("m_maxTh",
+                                     "Maximal marking m_prob, should be at least twice min to prevent synchronous retransmits",
+                                     UintegerValue (15360), ///> in bytes 1024x15
+                                     MakeUintegerAccessor (&RedQueue::m_maxTh),
+                                     MakeUintegerChecker<uint32_t> ())
+                      .AddAttribute ("m_rate",
+                                     "this m_rate is used for calculating the average queue size after some idle time.",
+                                     UintegerValue (1500000), ///> in bps, should be set to bandwidth of interface
+                                     MakeUintegerAccessor (&RedQueue::m_rate),
+                                     MakeUintegerChecker<uint64_t> ())
+                      .AddAttribute ("m_prob",
+                                     "Probability for marking, suggested values are 0.01 and 0.02",
+                                     DoubleValue (0.02),
+                                     MakeDoubleAccessor (&RedQueue::m_prob),
+                                     MakeDoubleChecker <double> ())
+  ;
+
+  return tid;
+}
+
+RedQueue::RedQueue ()
+  : Queue (),
+    m_packets (),
+    m_bytesInQueue (0),
+    m_wLog (0),
+    m_pLog (0),
+    m_rmask (0),
+    m_scellLog (0),
+    m_scellMax (0),
+    m_count (-1),
+    m_randNum (0),
+    m_qavg (0),
+    m_initialized (false)
+{
+
+  m_sTable = Uint32tVector (RED_STATS_TABLE_SIZE);
+
+}
+
+RedQueue::~RedQueue ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+}
+
+void
+RedQueue::SetMode (enum Mode mode)
+{
+  NS_LOG_FUNCTION (mode);
+  m_mode = mode;
+}
+
+RedQueue::Mode
+RedQueue::GetMode (void)
+{
+  return m_mode;
+}
+
+uint64_t
+RedQueue::GetAverageQueueSize (void)
+{
+  return m_qavg;
+}
+
+
+/**
+ * The paper says:
+ * Given minimum threshold min_th and that we wish to allow bursts of L packets
+ * Then Wq should be chosen to satisfy avg_L < min_th
+ * L + 1 + [(1-Wq)^(L+1) - 1]/ Wq    <  min_th
+ * L + 1 - min_th < [1 - (1-Wq)^(L+1)]/Wq
+ * i.e. given min_th 5, L=50, necessary that Wq <= 0.0042
+ *
+ * Hence
+ * burst + 1 - minTh/avPkt < (1-(1-W)^burst)/W
+ * this low-pass filter is used to calculate the avg queue size
+ *
+ */
+uint32_t
+RedQueue::evalEwma (uint32_t minTh, uint32_t burst, uint32_t avpkt)
+{
+  NS_LOG_FUNCTION (this);
+  uint32_t wlog = 1;
+
+
+  ///< Just a random W
+  double W = 0.5;
+
+  double temp = 0;
+
+  ///< Note: bursts must be larger than minTh/avpkt for it to work
+  temp = (double)burst + 1 - (double)minTh / avpkt;
+
+  NS_LOG_DEBUG ( "\t temp =" << temp);
+
+  if (temp < 1.0)
+    {
+      NS_LOG_DEBUG ("\tFailed to calculate EWMA constant");
+      return -1;
+    }
+
+  /**
+   * wlog =1 , W = .5
+   * wlog =2 , W = .25
+   * wlog =3 , W = .125
+   * wlog =4 , W = .0625
+   * wlog =5 , W = .03125
+   * wlog =6 , W = .015625
+   * wlog =7 , W = .0078125
+   * wlog =8 , W = .00390625
+   * wlog =9 , W = .001953125
+   * wlog =10, W = .0009765625
+   */
+  for (wlog = 1; wlog < 32; wlog++, W /= 2)
+    {
+      if (temp <= (1 - pow (1 - W, burst)) / W )
+        {
+          NS_LOG_DEBUG ("\t wlog=" << wlog);
+          return wlog;
+        }
+    }
+
+  NS_LOG_DEBUG ("\tFailed to calculate EWMA constant");
+  return -1;
+}
+
+/**
+ *
+ * Plog = log (prob / (maxTh -minTh) );
+ *
+ * Paper says: When a packet arrives at the gateway and the average queue size
+ * is between min_th and max_th, the initial packet marking probability is:
+ * Pb = C1*avg - C2
+ * where,
+ * C1 = maxP/(max_th - mint_th)
+ * C2 = maxP*min_th/(max_th - mint_th)
+ * maxP could be chosen so that C1 a power of two
+ */
+uint32_t
+RedQueue::evalP (uint32_t minTh, uint32_t maxTh, double prob)
+{
+  NS_LOG_FUNCTION (this);
+
+  uint32_t i = maxTh - minTh ;
+
+  if (i <= 0)
+    {
+      NS_LOG_DEBUG ("maxTh - minTh = 0");
+      return -1;
+    }
+
+  prob /= i;
+
+  ///< It returns the index that makes C1 a power of two
+  for (i = 0; i < 32; i++)
+    {
+      if (prob > 1.0)
+        {
+          break;
+        }
+      prob *= 2;
+    }
+
+  ///< Error checking
+  if (i >= 32 )
+    {
+      NS_LOG_DEBUG ("i >= 32, this shouldn't happen");
+      return -1;
+    }
+
+  NS_LOG_DEBUG ("\t i(makes C1 power of two)=" << i);
+  return i;
+}
+
+
+/**
+ * avg = avg*(1-W)^m  where m = t/xmitTime
+ *
+ * m_sTable[ t/2^cellLog] = -log(1-W) * t/xmitTime
+ * m_sTable[ t >> cellLog]= -log(1-W) * t/xmitTime
+ *
+ * t is converted to t/2^cellLog for storage in the table
+ * find out what is cellLog and return it
+ *
+ */
+uint32_t
+RedQueue::evalIdleDamping (uint32_t wLog, uint32_t avpkt, uint32_t bps)
+{
+  NS_LOG_FUNCTION (this);
+
+  ///> in microsecond ticks: 1 sec = 1000000 microsecond ticks
+  double xmitTime =  ((double) avpkt / bps) * 1000000;
+
+  ///> -log(1 - 1/2^wLog) / xmitTime
+  ///> note W = 1/2^wLog
+  double wLogTemp = -log (1.0 - 1.0 / (1 << wLog)) / xmitTime;
+
+
+  ///> the maximum allow idle time
+  double maxTime = 31 / wLogTemp;
+
+  NS_LOG_DEBUG ("\t xmitTime=" << xmitTime << " wLogTemp=" << wLogTemp
+                               << " maxTime=" << maxTime);
+
+
+  uint32_t cLog, i;
+
+  for (cLog = 0; cLog < 32; cLog++)
+    {
+
+      ///> maxTime < 512* 2^cLog
+      ///>  finds the cLog that's able to cover this maxTime
+      if (maxTime / (1 << cLog) < 512)
+        {
+          break;
+        }
+
+    }
+  if (cLog >= 32)
+    {
+      return -1;
+    }
+
+  m_sTable[0] = 0;
+
+  for (i = 1; i < 255; i++)
+    {
+      ///> wLogTemp * i * 2^cLog
+      m_sTable[i] = (i << cLog) * wLogTemp;
+
+
+      if (m_sTable[i] > 31)
+        {
+          m_sTable[i] = 31;
+        }
+    }
+
+  m_sTable[255] = 31;
+
+  NS_LOG_DEBUG ("\t cLog=" << cLog);
+  return cLog;
+}
+
+
+///> red random mask
+uint32_t
+RedQueue::Rmask (uint32_t pLog)
+{
+  ///> ~OUL creates a 32 bit mask
+  ///> 2^Plog - 1
+  return pLog < 32 ? ((1 << pLog) - 1) : ~0UL;
+
+}
+
+
+void
+RedQueue::SetParams (uint32_t minTh, uint32_t maxTh,
+                     uint32_t wLog, uint32_t pLog, uint64_t scellLog)
+{
+  NS_LOG_FUNCTION (this);
+
+  m_qavg = 0;
+  m_count = -1;
+  m_minTh = minTh;
+  m_maxTh = maxTh;
+  m_wLog = wLog;
+  m_pLog = pLog;
+  m_rmask = Rmask (pLog);
+  m_scellLog = scellLog;
+  m_scellMax = (255 << m_scellLog);
+
+  NS_LOG_DEBUG ("\t m_wLog" << m_wLog << " m_pLog" << m_pLog << " m_scellLog" << m_scellLog
+                            << " m_minTh" << m_minTh << " m_maxTh" << m_maxTh
+                            << " rmask=" << m_rmask << " m_scellMax=" << m_scellMax);
+}
+
+int
+RedQueue::IsIdling ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  //use IsZero instead
+  if ( m_idleStart.GetNanoSeconds () != 0)
+    {
+      NS_LOG_DEBUG ("\t IsIdling");
+    }
+
+  return m_idleStart.GetNanoSeconds () != 0;
+}
+void
+RedQueue::StartIdlePeriod ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  m_idleStart = Simulator::Now ();
+}
+void
+RedQueue::EndIdlePeriod ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  m_idleStart = NanoSeconds (0);
+}
+void
+RedQueue::Restart ()
+{
+
+  NS_LOG_FUNCTION_NOARGS ();
+
+  EndIdlePeriod ();
+  m_qavg = 0;
+  m_count = -1;
+
+}
+
+/**
+ * m = idletime / s
+ *
+ * m  is the number of pkts that might have been transmitted by the gateway
+ * during the time that the queue was free
+ * s is a typical transmission for a packet
+ *
+ * m = idletime / (average pkt size / bandwidth)
+ *
+ * avg = avg *(1-W)^m
+ *
+ * We need to precompute a table for this calculation because of the exp power
+ *
+ */
+uint64_t
+RedQueue::AvgFromIdleTime ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  uint64_t idleTime;
+  int shift;
+
+  idleTime = ns3::Time(Simulator::Now() - m_idleStart).GetMicroSeconds();
+  //idleTime = RedTimeToInteger (Simulator::Now() - m_idleStart, Time::US);
+
+  if (idleTime > m_scellMax)
+    {
+      idleTime = m_scellMax; 
+    }
+
+  NS_LOG_DEBUG ("\t idleTime=" << idleTime);
+  //PrintTable ();
+
+  shift = m_sTable [(idleTime >>  m_scellLog) & RED_STATS_MASK];
+
+  if (shift)
+    {
+      //std::cout << "shift " << m_qavg << "=>" << (m_qavg >> shift) << std::endl;
+      return m_qavg >> shift;
+    }
+  else
+    {
+      idleTime = (m_qavg * idleTime) >> m_scellLog;
+
+
+      NS_LOG_DEBUG ("\t idleus=" << idleTime);
+
+      if (idleTime < (m_qavg / 2))
+        {
+         //std::cout <<"idleus " <<  m_qavg << " - " << idleus << " = " << (m_qavg-idleus) << std::endl;
+          return m_qavg - idleTime;
+        }
+      else
+        {
+         //std:: cout <<"half " << m_qavg << "=>" <<  (m_qavg/2) << std::endl;
+          return (m_qavg / 2) ;
+        }
+    }
+}
+
+uint64_t
+RedQueue::AvgFromNonIdleTime (uint32_t backlog)
+{
+  NS_LOG_FUNCTION (this << backlog);
+
+  NS_LOG_DEBUG ("qavg " << m_qavg);
+  NS_LOG_DEBUG ("backlog" << backlog);
+
+ /**
+  * This is basically EWMA
+  * m_qavg = q_avg*(1-W) + backlog*W
+  * m_qavg = q_avg + W(backlog - q_avg)
+  *
+  */
+  return m_qavg + (backlog - (m_qavg >> m_wLog));
+}
+
+uint64_t
+RedQueue::AvgCalc (uint32_t backlog)
+{
+  NS_LOG_FUNCTION (this << backlog);
+
+  uint64_t qtemp;
+
+  if ( !IsIdling ())
+    {
+      qtemp = AvgFromNonIdleTime (backlog);
+      NS_LOG_DEBUG ("NonIdle Avg " << qtemp);
+      //std::cout <<"n "<< qtemp << std::endl;
+      return qtemp;
+    }
+  else
+    {
+      qtemp = AvgFromIdleTime ();
+      NS_LOG_DEBUG ("Idle Avg" << qtemp);
+      //std::cout <<"i "<< qtemp << std::endl;
+      return qtemp;
+    }
+}
+
+int
+RedQueue::CheckThresh (uint64_t avg)
+{
+
+  NS_LOG_FUNCTION (this << avg);
+  NS_LOG_DEBUG ("\t check threshold: min " << m_minTh << " max" << m_maxTh);
+
+  if (avg < m_minTh)
+    {
+      return BELOW_MIN_THRESH;
+    }
+  else if (avg >= m_maxTh)
+    {
+      return ABOVE_MAX_THRESH;
+    }
+  else
+    {
+      return BETWEEN_THRESH;
+    }
+}
+uint32_t
+RedQueue::RedRandom ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  ///> obtain a random u32 number
+  ///> return m_rmask & ran.GetInteger ();
+  //checkme
+  return m_rmask & rand ();
+}
+int
+RedQueue::MarkProbability (uint64_t avg)
+{
+  NS_LOG_FUNCTION (this << avg);
+  NS_LOG_DEBUG ("\t m_randNum " << m_randNum);
+  NS_LOG_DEBUG ("\t right\t" << m_randNum);
+  NS_LOG_DEBUG ("\t left\t" << ((avg - m_minTh)*m_count));
+
+  ///> max_P* (qavg - qth_min)/(qth_max-qth_min) < rnd/qcount
+  //return !((avg - m_minTh ) * m_count < m_randNum);
+  //checkme
+  return !((avg - m_minTh )* m_count < m_randNum);
+
+}
+int
+RedQueue::Processing (uint64_t qavg)
+{
+
+  NS_LOG_FUNCTION (this << "qavg" << qavg << " m_minTh" << m_minTh << " m_maxTh" << m_maxTh);
+
+  switch (CheckThresh (qavg))
+    {
+    case BELOW_MIN_THRESH:
+      NS_LOG_DEBUG ("\t below threshold ");
+
+      m_count = -1;
+      return DONT_MARK;
+
+    case BETWEEN_THRESH:
+      NS_LOG_DEBUG ("\t between threshold ");
+
+      if (++m_count)
+        {
+          NS_LOG_DEBUG ("\t check Mark Prob");
+          if (MarkProbability (qavg))
+            {
+              m_count = 0;
+              m_randNum = RedRandom ();
+
+              NS_LOG_DEBUG ("\t Marked Will Drop " << m_qavg);
+
+              return PROB_MARK;
+            }
+          NS_LOG_DEBUG ("\t Marked Will Save " << m_qavg);
+        }
+      else
+        {
+          m_randNum = RedRandom ();
+        }
+      return DONT_MARK;
+
+    case ABOVE_MAX_THRESH:
+
+      NS_LOG_DEBUG ("\t above threshold ");
+
+      m_count = -1;
+      return HARD_MARK;
+    }
+
+  NS_LOG_DEBUG ("BUG HERE\n");
+  return DONT_MARK;
+}
+
+
+bool
+RedQueue::DoEnqueue (Ptr<Packet> p)
+{
+  NS_LOG_FUNCTION (this << p);
+
+  if (m_mode == PACKETS && (m_packets.size () >= m_maxPackets))
+    {
+      NS_LOG_LOGIC ("Queue full (at max packets) -- droppping pkt");
+      Drop (p);
+      return false;
+    }
+
+  if (m_mode == BYTES && (m_bytesInQueue + p->GetSize () >= m_maxBytes))
+    {
+      NS_LOG_LOGIC ("Queue full (packet would exceed max bytes) -- droppping pkt");
+      Drop (p);
+      return false;
+    }
+
+  if (!m_initialized)
+    {
+      // making sure all the variables are initialized ok
+      NS_LOG_DEBUG ("\t m_maxPackets" << m_maxPackets
+                                      << " m_maxBytes" << m_maxBytes
+                                      << " m_burst" << m_burst << " m_avPkt" << m_avPkt
+                                      << " m_minTh" << m_minTh << " m_maxTh" << m_maxTh
+                                      << " m_rate" << m_rate <<  " m_prob" << m_prob);
+
+      m_wLog = evalEwma (m_minTh, m_burst, m_avPkt);
+      m_pLog = evalP (m_minTh, m_maxTh, m_prob);
+      m_scellLog = evalIdleDamping (m_wLog, m_avPkt, m_rate);
+
+      SetParams (m_minTh, m_maxTh, m_wLog, m_pLog, m_scellLog);
+      EndIdlePeriod ();
+//      srand((unsigned)time(0));
+      m_initialized = true;
+    }
+
+//  PrintTable();
+
+  if (GetMode () == BYTES)
+    {
+      m_qavg = AvgCalc (m_bytesInQueue);
+    }
+  else if (GetMode () == PACKETS)
+    {
+      //not yet supported
+//      m_qavg = AvgCalc (m_packets.size ());
+    }
+
+  NS_LOG_DEBUG ("\t bytesInQueue  " << m_bytesInQueue << "\tQavg " << m_qavg);
+  NS_LOG_DEBUG ("\t packetsInQueue  " << m_packets.size () << "\tQavg " << m_qavg);
+
+
+  if (IsIdling ())
+    {
+      EndIdlePeriod ();
+    }
+
+  switch (Processing (m_qavg) )
+    {
+    case DONT_MARK:
+      break;
+
+    case PROB_MARK:
+      NS_LOG_DEBUG ("\t Dropping due to Prob Mark " << m_qavg);
+      m_stats.probDrop++;
+      m_stats.probMark++;
+      Drop (p);
+      return false;
+
+    case HARD_MARK:
+      NS_LOG_DEBUG ("\t Dropping due to Hard Mark " << m_qavg);
+      m_stats.forcedMark++;
+      m_stats.probDrop++;
+      Drop (p);
+      return false;
+    }
+
+
+  m_bytesInQueue += p->GetSize ();
+  m_packets.push_back (p);
+
+  NS_LOG_LOGIC ("Number packets " << m_packets.size ());
+  NS_LOG_LOGIC ("Number bytes " << m_bytesInQueue);
+
+  return true;
+}
+
+Ptr<Packet>
+RedQueue::DoDequeue (void)
+{
+  NS_LOG_FUNCTION (this);
+
+  if (m_packets.empty ())
+    {
+      NS_LOG_LOGIC ("Queue empty");
+      return 0;
+    }
+
+  Ptr<Packet> p = m_packets.front ();
+  m_packets.pop_front ();
+  m_bytesInQueue -= p->GetSize ();
+
+  NS_LOG_LOGIC ("Popped " << p);
+
+  NS_LOG_LOGIC ("Number packets " << m_packets.size ());
+  NS_LOG_LOGIC ("Number bytes " << m_bytesInQueue);
+
+  if (m_bytesInQueue <= 0 && !IsIdling ())
+    {
+      StartIdlePeriod ();
+    }
+
+  return p;
+}
+
+///> just for completeness
+/// m_packets.remove (p) also works
+int
+RedQueue::DropPacket (Ptr<Packet> p)
+{
+
+  NS_LOG_FUNCTION (this << p);
+
+  NS_LOG_DEBUG ("\t Dropping Packet p");
+
+  std::list<Ptr<Packet> >::iterator iter;
+  uint32_t packetSize;
+
+  for (iter = m_packets.begin(); iter != m_packets.end(); ++iter)
+    {
+      if (*iter == p)
+        {
+         packetSize= p->GetSize ();
+          m_packets.erase(iter);
+          m_bytesInQueue -= packetSize; 
+          return 1;
+        }
+    }
+
+  if (!IsIdling ())
+    {
+      StartIdlePeriod ();
+    }
+
+  return 0;
+}
+
+Ptr<const Packet>
+RedQueue::DoPeek (void) const
+{
+  NS_LOG_FUNCTION (this);
+
+  if (m_packets.empty ())
+    {
+      NS_LOG_LOGIC ("Queue empty");
+      return NULL;
+    }
+
+  Ptr<Packet> p = m_packets.front ();
+
+  NS_LOG_LOGIC ("Number packets " << m_packets.size ());
+  NS_LOG_LOGIC ("Number bytes " << m_bytesInQueue);
+
+  return p;
+}
+
+void
+RedQueue::PrintTable ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+
+  for (uint32_t i = 0; i < RED_STATS_TABLE_SIZE; i++)
+    {
+      std::cout << m_sTable[i] << " ";
+    }
+  std::cout << std::endl;
+}
+
+
+} // namespace ns3
diff --git a/src/surf/ns3/red-queue.h b/src/surf/ns3/red-queue.h
new file mode 100644 (file)
index 0000000..1adece9
--- /dev/null
@@ -0,0 +1,240 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2010 Regents of the University of California
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Duy Nguyen<duy@soe.ucsc.edu>
+ *
+ * Random Early Detection (RED) algorithm.
+ *
+ * This implementation uses Bytes as queue size metric by default
+ * based on the Kuznetsov's implementation of Red in Linux. 
+ * Therefore, only bytes as queue size metric is supported at the moment.
+ *
+ * Original RED is from
+ * Sally Floyd and Van Jacobson, "Random Early Detection Gateways for
+ * Congestion Avoidance", 1993, IEEE/ACM Transactions on Networking
+ *
+ * Description:
+ *
+ * Packet arrival:
+ * avg = (1-W)*avg + W*currentQueueLen
+ * W is the queue weight( chosen as 2^(-Wlog)).  Decrease W for larger bursts
+ *
+ * if ( avg > maxTh) -> mark/drop packets
+ * if ( avg < minTh) -> allow packets
+ * if ( minTh < avg < maxTh) -> calculate probability for marking/dropping
+ *
+ *
+ * Pb = maxP*(avg - minTh)/(maxTh - minTh)
+ * Note: As avg varies from minTh to maxTh, Pb varies 0 to maxP
+ *
+ * Pa = Pb /(1 - count*Pb)
+ * The final marking probability Pa increases slowly as the count increases
+ * since the last marked packet
+ *
+ * maxP can be chosen s/t:
+ * maxP = (maxTh - minTh )/2^Plog
+ *
+ * To allow large bursts of L packets of size S, W can be chosen as:
+ * (see paper for details)
+ *
+ * L + 1 - minTh/S < (1-(1-W)^L)/W
+ *
+ *
+ * Some parameters:
+ * W = 0.002
+ * maxP = .02
+ *
+ *
+ */
+
+#ifndef RED_QUEUE_H
+#define RED_QUEUE_H
+
+#include <queue>
+#include "ns3/packet.h"
+#include "ns3/queue.h"
+#include "ns3/nstime.h"
+
+namespace ns3 {
+
+class TraceContainer;
+
+/**
+ * \ingroup queue
+ *
+ * \brief A RED packet queue
+ */
+class RedQueue : public Queue
+{
+public:
+  typedef std::vector< uint32_t> Uint32tVector;
+
+  struct Stats
+  {
+    uint32_t probDrop;  ///< Early probability drops
+    uint32_t probMark;  ///< Early probability marks
+    uint32_t forcedDrop;  ///< Forced drops, qavg > max threshold
+    uint32_t forcedMark;  ///< Forced marks, qavg > max threshold
+    uint32_t pdrop;  ///< Drops due to queue limits
+    uint32_t other;  ///< Drops due to drop calls
+    uint32_t backlog;
+  };
+
+  static TypeId GetTypeId (void);
+  /**
+   * \brief RedQueue Constructor
+   *
+   */
+  RedQueue ();
+
+  virtual ~RedQueue ();
+
+  /**
+   * Enumeration of the modes supported in the class.
+   *
+   */
+  enum Mode
+  {
+    ILLEGAL,     /**< Mode not set */
+    PACKETS,     /**< Use number of packets for maximum queue size */
+    BYTES,       /**< Use number of bytes for maximum queue size */
+  };
+
+  /**
+   * Enumeration of RED thresholds
+   *
+   */
+  enum
+  {
+    BELOW_MIN_THRESH,
+    ABOVE_MAX_THRESH,
+    BETWEEN_THRESH,
+  };
+
+  /**
+   * Enumeration Marking
+   *
+   */
+  enum
+  {
+    DONT_MARK,
+    PROB_MARK,
+    HARD_MARK,
+  };
+
+  /**
+   * Set the operating mode of this device.
+   *
+   * \param mode The operating mode of this device.
+   *
+   */
+  void SetMode (RedQueue::Mode mode);
+
+  /**
+   * Get the encapsulation mode of this device.
+   *
+   * \returns The encapsulation mode of this device.
+   */
+  RedQueue::Mode  GetMode (void);
+
+ /**
+   * Get the average queue size
+   *
+   * \returns The average queue size in bytes
+   */
+  uint64_t GetAverageQueueSize (void);
+
+
+private:
+  void SetParams (uint32_t minTh, uint32_t maxTh,
+                  uint32_t wLog, uint32_t pLog, uint64_t scellLog );
+  void StartIdlePeriod ();
+  void EndIdlePeriod ();
+  void Restart ();
+  void printRedOpt ();
+  void printStats ();
+  void PrintTable ();
+
+  int IsIdling ();
+  int CheckThresh (uint64_t avg);
+  int Processing (uint64_t avg);
+  int MarkProbability (uint64_t avg);
+  int DropPacket (Ptr<Packet> p);
+
+  uint64_t AvgFromIdleTime ();
+  uint64_t AvgCalc (uint32_t backlog);
+
+  ///< Avg = Avg*(1-W) + backlog*W
+  uint64_t AvgFromNonIdleTime (uint32_t backlog);
+
+  ///< burst + 1 - qmin/avpkt < (1-(1-W)^burst)/W
+  ///< this low-pass filter is used to calculate the avg queue size
+  uint32_t evalEwma (uint32_t minTh, uint32_t burst, uint32_t avpkt);
+
+  ///< Plog = log (prob / (qMax - qMin))
+  uint32_t evalP (uint32_t minTh, uint32_t maxTh, double prob);
+
+  ///< -log(1-W) * t/TxTime
+  uint32_t evalIdleDamping (uint32_t wLog, uint32_t avpkt, uint32_t rate);
+
+  uint32_t Rmask (uint32_t pLog);
+  uint32_t RedRandom ();
+
+  virtual bool DoEnqueue (Ptr<Packet> p);
+  virtual Ptr<Packet> DoDequeue (void);
+  virtual Ptr<const Packet> DoPeek (void) const;
+
+
+  std::list<Ptr<Packet> > m_packets;
+
+  Mode     m_mode;
+
+  uint32_t m_bytesInQueue;
+
+  ///< users' configurable options
+  uint32_t m_maxPackets;
+  uint32_t m_maxBytes;
+  uint32_t m_burst;
+
+  /**
+   * in bytes, use with burst to determine the time constant
+   * for average queue size calculations, for ewma
+   */
+  uint32_t m_avPkt;
+  uint32_t m_minTh; ///> Min avg length threshold (bytes), should be < maxTh/2
+  uint32_t m_maxTh; ///> Max avg length threshold (bytes), should be >= 2*minTh
+  uint32_t m_rate; ///> bandwidth in bps
+  uint32_t m_wLog; ///> log(W) bits
+  uint32_t m_pLog; ///> random number bits log (P_max/(maxTh - minTh))
+  uint32_t m_rmask;
+  uint32_t m_scellLog; ///> cell size for idle damping
+  uint64_t m_scellMax;
+  uint32_t m_count;  ///> number of packets since last random number generation
+  uint32_t m_randNum; ///> a random number 0 ...2^Plog
+
+  uint64_t m_qavg; ///> average q length
+  double m_prob;
+  bool m_initialized;
+
+  Stats m_stats;
+  Time m_idleStart; ///> start of current idle period
+  Uint32tVector m_sTable;
+};
+
+}; // namespace ns3
+
+#endif /* RED_QUEUE_H */
diff --git a/src/surf/sg_platf.c b/src/surf/sg_platf.c
new file mode 100644 (file)
index 0000000..1db868e
--- /dev/null
@@ -0,0 +1,159 @@
+/* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011. 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 "xbt/misc.h"
+#include "xbt/log.h"
+#include "xbt/str.h"
+#include "xbt/dict.h"
+#include "simgrid/platf_interface.h"
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
+xbt_dynar_t sg_platf_host_cb_list = NULL;   // of sg_platf_host_cb_t
+xbt_dynar_t sg_platf_link_cb_list = NULL;   // of sg_platf_link_cb_t
+xbt_dynar_t sg_platf_router_cb_list = NULL; // of sg_platf_router_cb_t
+xbt_dynar_t sg_platf_peer_cb_list = NULL; // of sg_platf_peer_cb_t
+xbt_dynar_t sg_platf_cluster_cb_list = NULL; // of sg_platf_cluster_cb_t
+xbt_dynar_t sg_platf_AS_begin_cb_list = NULL; //of sg_platf_AS_begin_cb_t
+xbt_dynar_t sg_platf_AS_end_cb_list = NULL; //of void_f_void_t
+xbt_dynar_t sg_platf_postparse_cb_list = NULL; // of void_f_void_t
+
+static int surf_parse_models_setup_already_called;
+
+
+/** Module management function: creates all internal data structures */
+void sg_platf_init(void) {
+  sg_platf_host_cb_list = xbt_dynar_new(sizeof(sg_platf_host_cb_t), NULL);
+  sg_platf_router_cb_list = xbt_dynar_new(sizeof(sg_platf_host_cb_t), NULL);
+  sg_platf_link_cb_list = xbt_dynar_new(sizeof(sg_platf_host_cb_t), NULL);
+  sg_platf_peer_cb_list = xbt_dynar_new(sizeof(sg_platf_peer_cb_t), NULL);
+  sg_platf_cluster_cb_list = xbt_dynar_new(sizeof(sg_platf_cluster_cb_t), NULL);
+  sg_platf_postparse_cb_list = xbt_dynar_new(sizeof(sg_platf_link_cb_t),NULL);
+  sg_platf_AS_begin_cb_list = xbt_dynar_new(sizeof(sg_platf_AS_begin_cb_t),NULL);
+  sg_platf_AS_end_cb_list = xbt_dynar_new(sizeof(void_f_void_t),NULL);
+}
+/** Module management function: frees all internal data structures */
+void sg_platf_exit(void) {
+  xbt_dynar_free(&sg_platf_host_cb_list);
+  xbt_dynar_free(&sg_platf_router_cb_list);
+  xbt_dynar_free(&sg_platf_link_cb_list);
+  xbt_dynar_free(&sg_platf_postparse_cb_list);
+  xbt_dynar_free(&sg_platf_peer_cb_list);
+  xbt_dynar_free(&sg_platf_cluster_cb_list);
+  xbt_dynar_free(&sg_platf_AS_begin_cb_list);
+  xbt_dynar_free(&sg_platf_AS_end_cb_list);
+
+  /* make sure that we will reinit the models while loading the platf once reinited */
+  surf_parse_models_setup_already_called = 0;
+}
+
+void sg_platf_new_host(sg_platf_host_cbarg_t h){
+  unsigned int iterator;
+  sg_platf_host_cb_t fun;
+  xbt_dynar_foreach(sg_platf_host_cb_list, iterator, fun) {
+    fun(h);
+  }
+}
+void sg_platf_new_router(sg_platf_router_cbarg_t router) {
+  unsigned int iterator;
+  sg_platf_router_cb_t fun;
+  xbt_dynar_foreach(sg_platf_router_cb_list, iterator, fun) {
+    fun(router);
+  }
+}
+void sg_platf_new_link(sg_platf_link_cbarg_t link){
+  unsigned int iterator;
+  sg_platf_link_cb_t fun;
+  xbt_dynar_foreach(sg_platf_link_cb_list, iterator, fun) {
+    fun(link);
+  }
+}
+void sg_platf_new_peer(sg_platf_peer_cbarg_t peer){
+  unsigned int iterator;
+  sg_platf_peer_cb_t fun;
+  xbt_dynar_foreach(sg_platf_peer_cb_list, iterator, fun) {
+    fun(peer);
+  }
+}
+void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster){
+  unsigned int iterator;
+  sg_platf_cluster_cb_t fun;
+  xbt_dynar_foreach(sg_platf_cluster_cb_list, iterator, fun) {
+    fun(cluster);
+  }
+}
+
+void sg_platf_begin() { /* Do nothing: just for symmetry of user code */ }
+
+void sg_platf_end() {
+  unsigned int iterator;
+  void_f_void_t fun;
+  xbt_dynar_foreach(sg_platf_postparse_cb_list, iterator, fun) {
+    fun();
+  }
+}
+
+static int surf_parse_models_setup_already_called = 0;
+
+void sg_platf_new_AS_begin(const char *id, const char *routing) {
+  unsigned int iterator;
+  sg_platf_AS_begin_cb_t fun;
+
+  if (!surf_parse_models_setup_already_called && !xbt_dynar_is_empty(sg_platf_AS_begin_cb_list)) {
+    /* Initialize the surf models. That must be done after we got all config, and before we need the models.
+     * That is, after the last <config> tag, if any, and before the first of cluster|peer|AS|trace|trace_connect
+     *
+     * I'm not sure for <trace> and <trace_connect>, there may be a bug here
+     * (FIXME: check it out by creating a file beginning with one of these tags)
+     * but cluster and peer create ASes internally, so putting the code in there is ok.
+     *
+     * We are also guarding against xbt_dynar_length(sg_platf_AS_begin_cb_list) because we don't
+     * want to initialize the models if we are parsing the file to get the deployment. That could happen if
+     * the same file would be used for platf and deploy: it'd contain AS tags even during the deploy parsing.
+     * Removing that guard would result of the models to get re-inited when parsing for deploy.
+     */
+    surf_parse_models_setup_already_called = 1;
+    surf_config_models_setup();
+  }
+
+  xbt_dynar_foreach(sg_platf_AS_begin_cb_list, iterator, fun) {
+    fun(id, routing);
+  }
+}
+
+void sg_platf_new_AS_end() {
+  unsigned int iterator;
+  void_f_void_t fun;
+  xbt_dynar_foreach(sg_platf_AS_end_cb_list, iterator, fun) {
+    fun();
+  }
+}
+
+
+void sg_platf_host_add_cb(sg_platf_host_cb_t fct) {
+  xbt_dynar_push(sg_platf_host_cb_list, &fct);
+}
+void sg_platf_link_add_cb(sg_platf_link_cb_t fct) {
+  xbt_dynar_push(sg_platf_link_cb_list, &fct);
+}
+void sg_platf_router_add_cb(sg_platf_router_cb_t fct) {
+  xbt_dynar_push(sg_platf_router_cb_list, &fct);
+}
+void sg_platf_peer_add_cb(sg_platf_peer_cb_t fct) {
+  xbt_dynar_push(sg_platf_peer_cb_list, &fct);
+}
+void sg_platf_cluster_add_cb(sg_platf_cluster_cb_t fct) {
+  xbt_dynar_push(sg_platf_cluster_cb_list, &fct);
+}
+void sg_platf_postparse_add_cb(void_f_void_t fct) {
+  xbt_dynar_push(sg_platf_postparse_cb_list, &fct);
+}
+void sg_platf_AS_begin_add_cb(sg_platf_AS_begin_cb_t fct) {
+  xbt_dynar_push(sg_platf_AS_begin_cb_list, &fct);
+}
+void sg_platf_AS_end_add_cb(void_f_void_t fct) {
+  xbt_dynar_push(sg_platf_AS_end_cb_list, &fct);
+}
+
index 83cc58e..9aae03f 100644 (file)
@@ -25,7 +25,7 @@
 <!ATTLIST trace_connect trace CDATA #REQUIRED>
 <!ATTLIST trace_connect element CDATA #REQUIRED>
 
-<!ELEMENT AS (((AS|include|link|cluster|peer|trace|trace_connect)*,(ASroute|trace|trace_connect)*,(bypassRoute|trace|trace_connect)*)|((host|router|link|trace|trace_connect)*,(route|trace|trace_connect)*))>
+<!ELEMENT AS (((AS|include|link|cluster|peer|trace|trace_connect)*,(ASroute|trace|trace_connect)*,(bypassRoute|trace|trace_connect)*)|((include|host|router|link|trace|trace_connect)*,(route|trace|trace_connect)*))>
 
 <!ATTLIST AS id CDATA #REQUIRED>
 <!ATTLIST AS routing CDATA #REQUIRED>
@@ -55,6 +55,7 @@
 <!ATTLIST cluster bb_sharing_policy (SHARED|FATPIPE) "SHARED">
 <!ATTLIST cluster availability_file CDATA "">
 <!ATTLIST cluster state_file CDATA "">
+<!ATTLIST cluster router_id CDATA "">
 
 <!ELEMENT peer EMPTY>
 <!ATTLIST peer id CDATA #REQUIRED>
index ad68b8b..982ec57 100644 (file)
@@ -403,8 +403,8 @@ static void yy_fatal_error (yyconst char msg[]  );
        *yy_cp = '\0'; \
        (yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 403
-#define YY_END_OF_BUFFER 404
+#define YY_NUM_RULES 405
+#define YY_END_OF_BUFFER 406
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -412,7 +412,7 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static yyconst flex_int16_t yy_accept[2408] =
+static yyconst flex_int16_t yy_accept[2421] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -434,39 +434,39 @@ static yyconst flex_int16_t yy_accept[2408] =
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,  404,  402,   15,   10,   10,   15,   15,  382,
+        0,    0,  406,  404,   15,   10,   10,   15,   15,  384,
 
-       10,  382,    5,    6,    5,    8,    9,    8,  398,  390,
-      391,  399,  396,  399,  397,  401,  390,  391,  401,  402,
+       10,  384,    5,    6,    5,    8,    9,    8,  400,  392,
+      393,  401,  398,  401,  399,  403,  392,  393,  403,  404,
        22,   10,   22,   22,   22,   20,   22,   26,   10,   26,
-       26,  402,   26,  402,  402,   26,   33,   10,   33,   33,
+       26,  404,   26,  404,  404,   26,   33,   10,   33,   33,
        33,   31,   33,   37,   10,   37,   48,   10,   48,   48,
-       48,   46,   48,   48,   48,  399,  398,   78,   10,   78,
+       48,   46,   48,   48,   48,  401,  400,   78,   10,   78,
        78,   78,   76,   78,   78,   78,   78,   78,   82,   10,
-       82,  402,   82,  101,   10,  101,  101,  101,   99,  101,
+       82,  404,   82,  101,   10,  101,  101,  101,   99,  101,
       101,  101,  105,   10,  105,  114,   10,  114,  114,  114,
-      112,  114,  114,  118,   10,  118,  118,  402,  118,  118,
+      112,  114,  114,  118,   10,  118,  118,  404,  118,  118,
 
-      402,  402,  118,  402,  118,  402,  118,  141,   10,  141,
+      404,  404,  118,  404,  118,  404,  118,  141,   10,  141,
       141,  141,  139,  141,  141,  141,  141,  141,  145,   10,
-      145,  145,  184,   10,  184,  184,  184,  182,  184,  184,
-      184,  184,  184,  184,  184,  184,  188,   10,  188,  209,
-       10,  209,  209,  209,  207,  209,  209,  209,  209,  209,
-      209,  209,  213,   10,  213,  222,   10,  222,  222,  222,
-      220,  222,  222,  226,   10,  226,  253,   10,  253,  253,
-      253,  251,  253,  253,  253,  253,  257,   10,  257,  257,
-      270,   10,  270,  270,  270,  268,  270,  270,  274,   10,
-      274,  402,  274,  291,   10,  291,  291,  291,  289,  291,
-
-      291,  291,  295,   10,  295,  295,  308,   10,  308,  308,
-      308,  306,  308,  308,  312,   10,  312,  325,   10,  325,
-      325,  325,  323,  325,  325,  325,  329,   10,  329,  329,
-      342,   10,  342,  342,  342,  340,  342,  342,  342,  342,
-      346,   10,  346,  402,  346,  353,   10,  353,  353,  353,
-      351,  353,  357,   10,  357,  364,   10,  364,  364,  364,
-      362,  364,  368,   10,  368,  368,  377,   10,  377,  377,
-      377,  375,  377,  377,  381,   10,  381,   10,    0,    2,
-        2,    0,    4,    7,  393,  392,    0,    0,    0,    0,
+      145,  145,  186,   10,  186,  186,  186,  184,  186,  186,
+      186,  186,  186,  186,  186,  186,  190,   10,  190,  211,
+       10,  211,  211,  211,  209,  211,  211,  211,  211,  211,
+      211,  211,  215,   10,  215,  224,   10,  224,  224,  224,
+      222,  224,  224,  228,   10,  228,  255,   10,  255,  255,
+      255,  253,  255,  255,  255,  255,  259,   10,  259,  259,
+      272,   10,  272,  272,  272,  270,  272,  272,  276,   10,
+      276,  404,  276,  293,   10,  293,  293,  293,  291,  293,
+
+      293,  293,  297,   10,  297,  297,  310,   10,  310,  310,
+      310,  308,  310,  310,  314,   10,  314,  327,   10,  327,
+      327,  327,  325,  327,  327,  327,  331,   10,  331,  331,
+      344,   10,  344,  344,  344,  342,  344,  344,  344,  344,
+      348,   10,  348,  404,  348,  355,   10,  355,  355,  355,
+      353,  355,  359,   10,  359,  366,   10,  366,  366,  366,
+      364,  366,  370,   10,  370,  370,  379,   10,  379,  379,
+      379,  377,  379,  379,  383,   10,  383,   10,    0,    2,
+        2,    0,    4,    7,  395,  394,    0,    0,    0,    0,
         0,    0,    0,   21,   23,   23,    0,    0,    0,    0,
 
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -475,202 +475,202 @@ static yyconst flex_int16_t yy_accept[2408] =
        79,   79,   79,   79,   79,   79,   79,   79,   79,    0,
         0,  100,  102,  102,  102,  102,    0,  113,  115,  115,
       115,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-      140,  142,  142,  142,  142,  142,  142,    0,  183,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,    0,  208,  210,  210,  210,  210,  210,  210,
-      210,  210,    0,  221,  223,  223,  223,    0,  252,  254,
-
-      254,  254,  254,  254,  254,    0,  269,  271,  271,  271,
-      271,    0,    0,  290,  292,  292,  292,  292,  292,    0,
-      307,  309,  309,  309,    0,  324,  326,  326,  326,  326,
-        0,  341,  343,  343,  343,  343,  343,    0,    0,  352,
-      354,  354,    0,  363,  365,  365,    0,  376,  378,  378,
-      378,    0,    0,    0,    0,    0,    3,    0,    0,    0,
-        0,    0,    0,    0,  400,    0,   23,    0,    0,  107,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,  106,    0,    0,    0,    0,
-        0,   34,    0,    0,   49,    0,    0,   49,    0,    0,
-
-        0,  395,   79,    0,    0,   79,   79,   79,   79,   79,
-       79,    0,    0,    0,  102,  102,  102,    0,    0,    0,
-        0,  115,    0,    0,  107,    0,    0,    0,    0,  106,
-        0,    0,  142,  142,  142,    0,    0,  142,  142,    0,
-        0,  185,  185,    0,    0,  185,    0,    0,  185,  185,
-      185,  185,  185,  185,  185,    0,    0,  210,  210,  210,
-        0,    0,  210,  210,  210,    0,    0,  223,    0,    0,
-        0,    0,  254,    0,    0,  254,  254,  254,    0,    0,
-      271,  271,  271,    0,    0,    0,  292,  292,  292,  292,
-        0,    0,  309,    0,    0,    0,    0,  326,  326,  326,
-
-        0,    0,  343,  343,  343,  343,    0,    0,    0,  354,
-        0,    0,    0,    0,    0,    0,    0,    0,  378,    0,
-        0,    0,   14,    1,    0,    0,  388,    0,    0,    0,
-      385,  384,    0,    0,   23,    0,    0,   25,    0,  107,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+      140,  142,  142,  142,  142,  142,  142,    0,  185,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
+      187,  187,  187,    0,  210,  212,  212,  212,  212,  212,
+      212,  212,  212,    0,  223,  225,  225,  225,    0,  254,
+
+      256,  256,  256,  256,  256,  256,    0,  271,  273,  273,
+      273,  273,    0,    0,  292,  294,  294,  294,  294,  294,
+        0,  309,  311,  311,  311,    0,  326,  328,  328,  328,
+      328,    0,  343,  345,  345,  345,  345,  345,    0,    0,
+      354,  356,  356,    0,  365,  367,  367,    0,  378,  380,
+      380,  380,    0,    0,    0,    0,    0,    3,    0,    0,
+        0,    0,    0,    0,    0,  402,    0,   23,    0,    0,
+      107,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,  106,    0,    0,    0,
-        0,    0,   34,    0,    0,   36,    0,   49,    0,   41,
-       40,   49,    0,    0,    0,   51,    0,   79,    0,   55,
-       54,    0,    0,   79,    0,    0,   79,   79,   79,    0,
-        0,   81,    0,    0,  102,  102,  102,    0,    0,  104,
-
-        0,    0,  109,  108,  115,    0,    0,  117,    0,    0,
-        0,    0,    0,    0,    0,    0,  142,  142,  142,    0,
-      122,  121,  142,  142,    0,    0,  144,    0,  185,  185,
-      185,  185,    0,  161,  160,  185,    0,  149,  148,    0,
-        0,  185,  185,  185,  185,  185,  185,    0,    0,  187,
-        0,  210,  210,  210,  210,    0,  192,  191,    0,    0,
-      210,  210,    0,    0,  212,    0,  223,    0,  217,  216,
-        0,    0,  225,    0,  254,    0,  230,  229,  254,  254,
-      254,    0,    0,  256,    0,    0,    0,    0,    0,  271,
-        0,    0,  273,    0,    0,    0,    0,  292,  292,    0,
-
-        0,  292,    0,    0,  294,    0,  309,    0,  299,  298,
-        0,    0,  311,    0,    0,    0,  326,  326,    0,    0,
-        0,    0,  328,    0,  343,  343,  343,  343,    0,    0,
-      345,    0,    0,  354,    0,    0,  356,    0,    0,  361,
-      360,    0,    0,  367,    0,    0,  372,  371,  378,    0,
-        0,  380,    0,    0,    0,  389,  383,    0,    0,    0,
-       23,    0,    0,    0,    0,    0,    0,  119,    0,  227,
-      190,    0,    0,  369,    0,    0,    0,    0,    0,    0,
-        0,  189,    0,    0,    0,    0,    0,    0,    0,   49,
-        0,    0,   79,    0,   59,   58,    0,    0,    0,   57,
-
-       56,   79,    0,    0,   79,    0,  370,  102,    0,    0,
-      102,    0,  115,    0,  116,    0,    0,  120,  228,    0,
-        0,    0,  142,  142,    0,    0,  142,  142,    0,  185,
-      185,  185,  185,    0,    0,    0,  163,  162,  185,  185,
-      185,  185,  185,  185,    0,  210,  210,  210,  210,    0,
-      200,  199,  210,  210,    0,  223,    0,  254,  254,  254,
-      254,    0,    0,  263,  262,    0,  261,  260,  271,    0,
-      227,    0,  280,  279,  292,  292,    0,  278,  277,  292,
-        0,  309,    0,    0,  318,  317,  326,  326,    0,  316,
-      315,    0,  343,    0,    0,  343,  343,    0,    0,  354,
-
-        0,    0,  378,    0,    0,    0,    0,   12,    0,  386,
-      387,    0,   23,    0,    0,    0,    0,    0,    0,  119,
-        0,  227,    0,  190,    0,    0,  369,    0,  258,   39,
-        0,    0,    0,    0,  189,    0,   38,    0,   30,   29,
-        0,    0,   43,   42,   49,    0,    0,   79,    0,   61,
-       60,   79,    0,   65,   64,   79,    0,  370,  102,    0,
-        0,    0,    0,    0,    0,  115,    0,    0,  120,  228,
-      259,  259,  258,  142,  142,    0,  126,  125,    0,    0,
-        0,    0,  142,    0,  185,    0,    0,  185,  185,    0,
-      159,  158,    0,    0,  185,  185,  185,  185,  185,    0,
-
-      210,    0,    0,  210,  210,    0,    0,  210,    0,  223,
-        0,  254,  254,  254,    0,    0,  254,    0,  271,    0,
-        0,  292,  292,  292,    0,  309,    0,  326,  326,    0,
-      343,    0,  333,  332,  343,  343,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   11,    0,
-       23,    0,    0,    0,    0,    0,  359,    0,    0,    0,
-        0,   53,  258,  214,   39,    0,  358,   52,    0,    0,
-        0,   38,    0,    0,   49,    0,    0,   79,   79,   79,
-        0,  102,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   96,   95,    0,  115,    0,    0,  259,  215,  142,
-
-      142,    0,  124,  123,    0,    0,    0,  142,    0,  143,
-      185,    0,  171,  170,    0,    0,  185,    0,  157,  156,
-        0,    0,  185,  185,  185,    0,    0,    0,  210,    0,
-      196,  195,    0,    0,  210,    0,  194,  193,  210,    0,
-      211,  223,    0,  254,  254,  254,    0,    0,    0,  254,
-        0,  255,  271,    0,    0,    0,    0,    0,    0,  292,
-        0,  309,    0,    0,    0,    0,    0,    0,  343,  343,
-      343,    0,    0,    0,  350,  349,    0,    0,    0,  374,
-      373,    0,  379,    0,    0,    0,    0,    0,    0,    0,
-      275,    0,    0,  147,  359,   28,    0,    0,  331,   53,
-
-      214,    0,  358,   52,  146,   27,  330,    0,    0,   49,
-        0,    0,   50,   79,    0,    0,   79,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,  276,    0,  215,  142,  142,    0,    0,
-      142,  185,    0,  173,  172,  185,    0,  151,  150,    0,
-        0,  185,  185,    0,  153,  152,    0,  210,    0,  198,
-      197,  210,  210,  223,    0,  254,    0,    0,  254,  254,
-        0,    0,  254,  271,    0,  272,    0,    0,  284,  283,
-        0,  282,  281,  292,    0,  309,    0,    0,  322,  321,
-        0,  320,  319,    0,  343,  343,  343,    0,    0,    0,
-
-        0,    0,    0,    0,   17,    0,   19,   18,    0,  275,
-      347,    0,  147,   28,  296,   16,  331,    0,  146,   27,
-      330,    0,    0,   49,  394,   79,    0,   67,   66,   79,
-        0,   80,    0,   98,   97,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,  111,  110,  276,
-        0,  142,  142,    0,    0,    0,    0,  142,  185,  185,
-        0,  155,  154,  185,  185,    0,  210,  210,  210,  223,
-        0,  224,  254,    0,  236,  235,  254,  254,    0,    0,
-        0,    0,  254,  271,  297,  292,    0,  309,    0,    0,
-        0,    0,  343,  343,    0,  348,    0,    0,  366,    0,
-
-        0,    0,   17,    0,  347,    0,  296,   16,    0,    0,
-        0,   35,   49,    0,    0,   79,    0,    0,    0,    0,
+        0,    0,   34,    0,    0,   49,    0,    0,   49,    0,
+
+        0,    0,  397,   79,    0,    0,   79,   79,   79,   79,
+       79,   79,    0,    0,    0,  102,  102,  102,    0,    0,
+        0,    0,  115,    0,    0,  107,    0,    0,    0,    0,
+      106,    0,    0,  142,  142,  142,    0,    0,  142,  142,
+        0,    0,  187,  187,    0,    0,  187,    0,    0,  187,
+      187,  187,  187,  187,  187,  187,  187,    0,    0,  212,
+      212,  212,    0,    0,  212,  212,  212,    0,    0,  225,
+        0,    0,    0,    0,  256,    0,    0,  256,  256,  256,
+        0,    0,  273,  273,  273,    0,    0,    0,  294,  294,
+      294,  294,    0,    0,  311,    0,    0,    0,    0,  328,
+
+      328,  328,    0,    0,  345,  345,  345,  345,    0,    0,
+        0,  356,    0,    0,    0,    0,    0,    0,    0,    0,
+      380,    0,    0,    0,   14,    1,    0,    0,  390,    0,
+        0,    0,  387,  386,    0,    0,   23,    0,    0,   25,
+        0,  107,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  106,    0,
+        0,    0,    0,    0,   34,    0,    0,   36,    0,   49,
+        0,   41,   40,   49,    0,    0,    0,   51,    0,   79,
+        0,   55,   54,    0,    0,   79,    0,    0,   79,   79,
+       79,    0,    0,   81,    0,    0,  102,  102,  102,    0,
+
+        0,  104,    0,    0,  109,  108,  115,    0,    0,  117,
         0,    0,    0,    0,    0,    0,    0,    0,  142,  142,
-        0,  132,    0,  131,  142,  185,  185,  185,  185,    0,
-      186,  210,  210,  210,  223,    0,    0,  254,  254,  254,
-        0,  240,    0,  239,  254,  271,  297,  292,    0,  293,
-        0,    0,    0,    0,    0,  335,  334,    0,    0,  343,
-        0,  344,  348,    0,    0,    0,    0,    0,   24,    0,
+      142,    0,  122,  121,  142,  142,    0,    0,  144,    0,
+      187,  187,  187,  187,    0,  161,  160,  187,    0,  149,
+      148,    0,    0,  187,  187,  187,  187,  187,  187,  187,
+        0,    0,  189,    0,  212,  212,  212,  212,    0,  194,
+      193,    0,    0,  212,  212,    0,    0,  214,    0,  225,
+        0,  219,  218,    0,    0,  227,    0,  256,    0,  232,
+      231,  256,  256,  256,    0,    0,  258,    0,    0,    0,
+        0,    0,  273,    0,    0,  275,    0,    0,    0,    0,
+
+      294,  294,    0,    0,  294,    0,    0,  296,    0,  311,
+        0,  301,  300,    0,    0,  313,    0,    0,    0,  328,
+      328,    0,    0,    0,    0,  330,    0,  345,  345,  345,
+      345,    0,    0,  347,    0,    0,  356,    0,    0,  358,
+        0,    0,  363,  362,    0,    0,  369,    0,    0,  374,
+      373,  380,    0,    0,  382,    0,    0,    0,  391,  385,
+        0,    0,    0,   23,    0,    0,    0,    0,    0,    0,
+      119,    0,  229,  192,    0,    0,  371,    0,    0,    0,
+        0,    0,    0,    0,  191,    0,    0,    0,    0,    0,
+        0,    0,   49,    0,    0,   79,    0,   59,   58,    0,
+
+        0,    0,   57,   56,   79,    0,    0,   79,    0,  372,
+      102,    0,    0,  102,    0,  115,    0,  116,    0,    0,
+      120,  230,    0,    0,    0,  142,  142,    0,    0,  142,
+      142,    0,  187,  187,  187,  187,    0,    0,    0,  163,
+      162,  187,  187,  187,  187,  187,  187,  187,    0,  212,
+      212,  212,  212,    0,  202,  201,  212,  212,    0,  225,
+        0,  256,  256,  256,  256,    0,    0,  265,  264,    0,
+      263,  262,  273,    0,  229,    0,  282,  281,  294,  294,
+        0,  280,  279,  294,    0,  311,    0,    0,  320,  319,
+      328,  328,    0,  318,  317,    0,  345,    0,    0,  345,
+
+      345,    0,    0,  356,    0,    0,  380,    0,    0,    0,
+        0,   12,    0,  388,  389,    0,   23,    0,    0,    0,
+        0,    0,    0,  119,    0,  229,    0,  192,    0,    0,
+      371,    0,  260,   39,    0,    0,    0,    0,  191,    0,
+       38,    0,   30,   29,    0,    0,   43,   42,   49,    0,
+        0,   79,    0,   61,   60,   79,    0,   65,   64,   79,
+        0,  372,  102,    0,    0,    0,    0,    0,    0,  115,
+        0,    0,  120,  230,  261,  261,  260,  142,  142,    0,
+      126,  125,    0,    0,    0,    0,  142,    0,  187,    0,
+        0,  187,  187,    0,  159,  158,    0,    0,  187,  187,
+
+      187,  187,  187,  187,    0,  212,    0,    0,  212,  212,
+        0,    0,  212,    0,  225,    0,  256,  256,  256,    0,
+        0,  256,    0,  273,    0,    0,  294,  294,  294,    0,
+      311,    0,  328,  328,    0,  345,    0,  335,  334,  345,
+      345,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   11,    0,   23,    0,    0,    0,    0,
+        0,  361,    0,    0,    0,    0,   53,  260,  216,   39,
+        0,  360,   52,    0,    0,    0,   38,    0,    0,   49,
+        0,    0,   79,   79,   79,    0,  102,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   96,   95,    0,  115,
+
+        0,    0,  261,  217,  142,  142,    0,  124,  123,    0,
+        0,    0,  142,    0,  143,  187,    0,  171,  170,    0,
+        0,  187,    0,  157,  156,    0,    0,  187,  187,  187,
+      187,    0,    0,    0,  212,    0,  198,  197,    0,    0,
+      212,    0,  196,  195,  212,    0,  213,  225,    0,  256,
+      256,  256,    0,    0,    0,  256,    0,  257,  273,    0,
+        0,    0,    0,    0,    0,  294,    0,  311,    0,    0,
+        0,    0,    0,    0,  345,  345,  345,    0,    0,    0,
+      352,  351,    0,    0,    0,  376,  375,    0,  381,    0,
+        0,    0,    0,    0,    0,    0,  277,    0,    0,  147,
+
+      361,   28,    0,    0,  333,   53,  216,    0,  360,   52,
+      146,   27,  332,    0,    0,   49,    0,    0,   50,   79,
+        0,    0,   79,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  278,
+        0,  217,  142,  142,    0,    0,  142,  187,    0,  173,
+      172,  187,    0,  151,  150,    0,    0,  187,  187,  187,
+        0,  153,  152,    0,  212,    0,  200,  199,  212,  212,
+      225,    0,  256,    0,    0,  256,  256,    0,    0,  256,
+      273,    0,  274,    0,    0,  286,  285,    0,  284,  283,
+      294,    0,  311,    0,    0,  324,  323,    0,  322,  321,
+
+        0,  345,  345,  345,    0,    0,    0,    0,    0,    0,
+        0,   17,    0,   19,   18,    0,  277,  349,    0,  147,
+       28,  298,   16,  333,    0,  146,   27,  332,    0,    0,
+       49,  396,   79,    0,   67,   66,   79,    0,   80,    0,
+       98,   97,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  111,  110,  278,    0,  142,  142,
+        0,    0,    0,    0,  142,  187,  187,    0,  155,  154,
+      187,  187,  187,    0,  212,  212,  212,  225,    0,  226,
+      256,    0,  238,  237,  256,  256,    0,    0,    0,    0,
+      256,  273,  299,  294,    0,  311,    0,    0,    0,    0,
+
+      345,  345,    0,  350,    0,    0,  368,    0,    0,    0,
+       17,    0,  349,    0,  298,   16,    0,    0,    0,   35,
+       49,    0,    0,   79,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,  142,  142,    0,  132,
+        0,  131,  142,  187,  187,    0,    0,  187,  187,    0,
+      188,  212,  212,  212,  225,    0,    0,  256,  256,  256,
+        0,  242,    0,  241,  256,  273,  299,  294,    0,  295,
+        0,    0,    0,    0,    0,  337,  336,    0,    0,  345,
+        0,  346,  350,    0,    0,    0,    0,    0,   24,    0,
         0,    0,   49,    0,    0,    0,   79,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,  142,
 
-      142,  134,  133,    0,    0,  185,  185,  185,    0,    0,
-      210,  210,    0,    0,  223,    0,  232,  231,  254,  254,
-      254,  242,  241,    0,    0,  271,  292,    0,    0,    0,
-        0,  310,    0,    0,  339,  338,    0,    0,    0,  355,
-        0,    0,    0,  313,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   79,    0,    0,    0,    0,   88,
-        0,    0,    0,    0,   87,    0,  314,  142,    0,    0,
-        0,  136,  135,  185,  185,  185,    0,  181,  180,  210,
-        0,    0,    0,  206,  205,    0,    0,  254,  254,  254,
-        0,  244,  243,    0,    0,    0,    0,    0,    0,    0,
-
-        0,    0,    0,    0,    0,  337,  336,    0,    0,    0,
-      313,    0,    0,    0,   45,   44,    0,    0,    0,    0,
-        0,    0,    0,    0,   79,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,  314,    0,    0,  142,    0,  138,
-      137,  185,  185,  185,  210,    0,  202,  201,    0,  219,
-      218,  254,    0,    0,  254,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  142,
+      142,  134,  133,    0,    0,  187,  187,    0,  183,  182,
+      187,    0,    0,  212,  212,    0,    0,  225,    0,  234,
+      233,  256,  256,  256,  244,  243,    0,    0,  273,  294,
+        0,    0,    0,    0,  312,    0,    0,  341,  340,    0,
+        0,    0,  357,    0,    0,    0,  315,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   79,    0,    0,
+        0,    0,   88,    0,    0,    0,    0,   87,    0,  316,
+      142,    0,    0,    0,  136,  135,  187,  187,  187,    0,
+      181,  180,  212,    0,    0,    0,  208,  207,    0,    0,
+
+      256,  256,  256,    0,  246,  245,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  339,  338,
+        0,    0,    0,  315,    0,    0,    0,   45,   44,    0,
+        0,    0,    0,    0,    0,    0,    0,   79,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  316,    0,    0,
+      142,    0,  138,  137,  187,  187,  187,  212,    0,  204,
+      203,    0,  221,  220,  256,    0,    0,  256,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   84,   83,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,   94,    0,    0,    0,
-       93,    0,    0,    0,  128,  127,  142,  185,  185,  185,
-
-      210,  254,    0,  238,  237,  254,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,  301,    0,    0,  300,
-        0,  327,    0,    0,    0,    0,    0,    0,   84,   83,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   63,
-       62,    0,    0,    0,    0,    0,    0,    0,  142,  185,
-      185,    0,    0,  210,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,   84,   83,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,   94,
+
+        0,    0,    0,   93,    0,    0,    0,  128,  127,  142,
+      187,  187,  187,  212,  256,    0,  240,  239,  256,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  303,
+        0,    0,  302,    0,  329,    0,    0,    0,    0,    0,
+        0,   84,   83,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   63,   62,    0,    0,    0,    0,    0,    0,
+        0,  142,  187,  187,    0,    0,  212,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   75,   71,    0,
-        0,   74,   70,    0,   92,    0,    0,   91,    0,    0,
-        0,  103,  142,  185,  185,    0,    0,    0,  210,    0,
-
-      234,  233,    0,    0,    0,  267,    0,  266,    0,  288,
-        0,  287,    0,  303,  305,  302,  304,    0,    0,    0,
-       12,    0,   12,    0,    0,    0,    0,    0,   86,   90,
-       85,   89,  142,  185,  185,    0,    0,    0,    0,  210,
-        0,    0,    0,    0,  265,  264,  286,  285,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       75,   71,    0,    0,   74,   70,    0,   92,    0,    0,
+
+       91,    0,    0,    0,  103,  142,  187,  187,    0,    0,
+        0,  212,    0,  236,  235,    0,    0,    0,  269,    0,
+      268,    0,  290,    0,  289,    0,  305,  307,  304,  306,
+        0,    0,    0,   12,    0,   12,    0,    0,    0,    0,
+        0,   86,   90,   85,   89,  142,  187,  187,    0,    0,
+        0,    0,  212,    0,    0,    0,    0,  267,  266,  288,
+      287,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   69,
-        0,   68,    0,    0,  130,  129,    0,  179,  178,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,  204,
-
-      203,    0,    0,    0,    0,    0,    0,    0,   11,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   73,   72,
+        0,    0,   69,    0,   68,    0,    0,  130,  129,    0,
+
+      179,  178,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  206,  205,    0,    0,    0,    0,    0,    0,
+        0,   11,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   73,   72,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-      165,    0,    0,  164,    0,    0,  246,    0,    0,  245,
-        0,    0,    0,    0,    0,  169,    0,  168,    0,  248,
-        0,  247,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  165,    0,    0,  164,    0,    0,  248,
+        0,    0,  247,    0,    0,    0,    0,    0,  169,    0,
 
-        0,    0,    0,    0,  175,    0,  174,    0,    0,    0,
-        0,    0,    0,  177,  176,  167,  166,  250,  249,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+      168,    0,  250,    0,  249,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  175,    0,  174,
+        0,    0,    0,    0,    0,    0,  177,  176,  167,  166,
+      252,  251,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -678,7 +678,8 @@ static yyconst flex_int16_t yy_accept[2408] =
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
-        0,    0,    0,    0,    0,   13,    0
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   13,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -725,7 +726,7 @@ static yyconst flex_int32_t yy_meta[73] =
         5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[2701] =
+static yyconst flex_int16_t yy_base[2714] =
     {   0,
         0,    0,    0,    3,    6,    9,   12,   29,   16,   19,
        14,   17,   33,   36,   49,   55,   45,   61,   66,   72,
@@ -747,702 +748,706 @@ static yyconst flex_int16_t yy_base[2701] =
      1647, 1650, 1936, 2002, 1654, 1657, 1710, 1713, 1716, 1720,
      1723, 1767, 2068, 2137, 1770, 1773, 2206, 2263, 1777, 1780,
      1824, 1827, 1830, 1834, 1837, 1890, 2320, 2389, 1893, 1896,
-        0,    0, 6532, 8043, 8043,   95,  100,   29,   41, 8043,
-
-      103,   51, 8043, 8043, 6521, 8043, 8043, 6508, 8043, 6523,
-     6523,  498, 8043, 8043, 8043, 8043, 6517, 6517, 6472,  145,
-     8043,  161, 6496,    0,  146, 8043, 6462, 8043,  166, 2454,
-       88,  204,  205,  254, 6502,    3, 8043,  169, 6489,    0,
-      153, 8043, 6451, 8043,  260,  419, 8043,  322, 6487,    0,
-      244, 8043, 6447, 6451, 6449,  420, 6450, 8043,  364, 6476,
-        0,  248, 8043, 6442, 6440,  257, 6442,  360, 8043,  440,
-       31, 6478, 6422, 8043,  567, 6464,    0,  306, 8043, 6424,
-     6423, 6414, 8043,  624,  482, 8043,  633, 6458,    0,  416,
-     8043, 6421, 6410, 8043,  692, 1908, 1909, 6412,   35, 6446,
-
-      240,  135,  740,  691,   59, 6455,  152, 8043,  697, 6446,
-        0,  417, 8043, 6392, 6398, 6407, 6394, 6388, 8043,  702,
-     6442,  181, 8043,  764, 6429,    0,  479, 8043, 6379,  300,
-     6385, 6392, 6394,  185, 6393,  439, 8043,  767,  546, 8043,
-      824, 6417,    0,  480, 8043, 6367, 6365, 6370, 6379, 6381,
-     6363, 6357, 8043,  830,  611, 8043,  833, 6403,    0,  483,
-     8043, 6358, 6367, 8043,  889,  612, 8043,  895, 6398,    0,
-      543, 8043, 6364, 6360, 6362,  483, 8043,  898, 6396,  210,
-     8043,  937, 6387,    0,  609, 8043, 6340,  279, 8043,  954,
-      626, 6389, 6341, 8043,  960, 6379,    0,  752, 8043, 6330,
-
-     6325,  306, 8043, 1003, 6382,  554, 8043, 1020, 6369,    0,
-      808, 8043, 6331, 6335, 8043, 1026, 1211, 8043, 1231, 6364,
-        0,  809, 8043, 6317, 6312, 6312, 8043, 1270, 6364,  560,
-     8043, 1287, 6355,    0,  873, 8043, 6304, 6309, 6313, 6298,
-     8043, 1344,  304,  449,  310, 8043, 1352, 6344,    0,  874,
-     8043, 6314, 8043, 1355, 1331, 8043, 1410, 6340,    0,  938,
-     8043, 6307, 8043, 1418, 6346,  593, 8043, 1421, 6333,    0,
-      939, 8043, 6300, 6302, 8043, 1477, 1397, 1480,  672, 6277,
-     8043, 6337, 6326, 8043, 8043, 8043, 1474,  317, 6274, 6273,
-     6271, 6316, 6276, 8043,    0, 6269, 6266, 6281, 6254, 6246,
-
-      621, 6251, 6251, 6254,   30,  630, 6241,  687,  710, 6266,
-      702, 6243,  967, 6234,  757, 1227, 1482, 8043,    0, 6239,
-     6240, 8043,    0, 6233, 1899, 6226,  514, 6223, 6265, 8043,
-        0, 6223, 1958, 6212, 6229, 6216, 6224, 6218, 6218, 6204,
-     1489, 8043,    0, 6211, 6202, 6213, 6190, 8043,    0, 1966,
-     6188, 6233, 6211, 6177, 6186, 6186,  963, 6203, 1168, 1288,
-     8043,    0, 6192,  819, 1976, 6166, 6186, 6178, 8043,    0,
-     6180, 6180, 2022, 6162, 2025, 6155, 6151, 6167, 6163, 6165,
-     6164, 6154, 6156, 8043,    0, 6157, 6153, 6138, 2028, 6132,
-     6124, 6144, 6129, 8043,    0, 5747, 2031, 5743, 8043,    0,
-
-     5745, 2034, 5738, 5755, 5754, 5743, 8043,    0, 5734, 5749,
-     5738, 5732, 5738, 8043,    0, 5720, 5738, 5733, 5715, 5751,
-     8043,    0, 5703, 2088, 5708, 8043,    0, 5698, 5712, 5708,
-     5703, 8043,    0, 5690, 5684, 5689, 5694, 5679, 5672, 8043,
-        0, 5677, 5685, 8043,    0, 2091, 5674, 8043,    0, 2094,
-     5665, 5659, 5701, 5701,  929, 5650, 8043, 1536,    0, 5645,
-     5638, 5682, 5680, 5630, 8043, 5642, 5623, 1903, 2100, 1553,
-     5633, 5621, 5615, 5620, 5614, 5627, 5574, 5578, 5580, 5566,
-     5565, 5553, 5571, 5557, 5548, 1612, 5540, 5556, 5553, 5542,
-     5554, 5539, 2097, 2161, 5538, 2158, 1678, 5532, 5564, 2165,
-
-     2168, 8043, 5528, 2171, 1858, 2176, 5519, 2226, 5521, 5521,
-     5518, 2234, 2237, 5503, 5503, 5503, 5502, 2240, 2285, 2288,
-     2119, 5485, 2291, 2297, 1618, 5487, 5470, 5459, 5448, 1798,
-     5446, 5445, 5454, 5441, 5452, 2294, 2127, 5450, 5427, 2340,
-     2343, 5432, 1170, 2300, 2190, 5435, 2349, 2352, 2367, 5424,
-     5422, 5417, 5408, 5401, 5403, 2409, 2412, 5399,  953, 5389,
-     2415, 2370, 2418, 5387, 5372, 2421, 2424, 5372, 2436, 2378,
-     2445, 2450, 5383, 2459, 2477, 5381, 5367, 5360, 2465, 2470,
-     2489, 2495, 2520, 2498, 2526, 5358, 2529, 2532, 2538, 2541,
-     2550, 2561, 5365, 2564, 2569, 2583, 2587, 2590, 2593, 2602,
-
-     2611, 2614, 5357, 5340, 5346, 5326, 2620, 2623, 5335, 5319,
-     2626, 2633, 2645, 2648, 2658, 2663, 2666, 2670, 5316, 2687,
-     2690, 5362, 8043, 8043,  989, 5321, 8043, 5362, 5360, 5297,
-     8043, 8043, 5295, 5293, 5297, 2693, 2697, 8043, 2700, 1741,
-     5290, 5279, 5297, 5278, 5282, 5267, 5274, 5273, 5261, 5258,
-      639, 5271, 5251, 5266, 5261, 5258, 1924, 5242, 5246, 5238,
-      819, 5248, 2712, 2719, 2724, 8043, 2730, 2733, 2678, 8043,
-     8043, 2738, 5272, 2743, 2756, 8043, 2762, 5220, 2765, 8043,
-     8043, 2775, 2781, 2789, 2793, 2800, 5233, 2811, 5227, 2814,
-     2817, 8043, 2820,  884, 5225, 2823, 5219, 2829, 2841, 8043,
-
-     2844, 2848, 8043, 8043, 5210, 2856, 2863, 8043, 2866, 5204,
-     5207, 5188, 5187, 5177, 5167, 5166, 5164, 5170, 2869, 2876,
-     8043, 8043, 5155, 5158, 2887, 2892, 8043, 2895, 5150, 5133,
-     5144, 5136, 2899, 8043, 8043, 2907, 2914, 8043, 8043, 2925,
-     2928, 5125, 5128, 5133, 5125, 5124, 5117, 2936, 2939, 8043,
-     2943, 5113, 5092, 5080, 5094, 2946, 8043, 8043, 2962, 2965,
-     5080, 5090, 2973, 2976, 8043, 2980, 5077, 2983, 8043, 8043,
-     2995, 2999, 8043, 3002, 5057, 3014, 8043, 8043, 5065, 5067,
-     5066, 3005, 3010, 8043, 3024, 3032, 3036, 3044, 3050, 5065,
-     3058, 3062, 8043, 3069, 5058, 3065, 3077, 5045, 5045, 3072,
-
-     3090, 5055, 3098, 3101, 8043, 3104, 5046, 3107, 8043, 8043,
-     3123, 3126, 8043, 3129, 3132, 3136, 5030, 5029, 3151, 3154,
-     3162, 3169, 8043, 3172, 5026, 3175, 5043, 5023, 3181, 3184,
-     8043, 3193, 5020, 5023, 3196, 3203, 8043, 3206, 3215, 8043,
-     8043, 3225, 3228, 8043, 3234, 3237, 8043, 8043, 5022, 3247,
-     3254, 8043, 3260,  926, 3266, 8043, 8043, 5048, 5047, 5008,
-     4991, 3269, 4984, 4990, 4983, 4980, 4989, 1930, 4976, 1994,
-     1984, 4983, 4979, 1997, 4969, 4976, 4975, 4969, 4959, 4953,
-     4946, 2059, 4958, 4947, 3273, 3279, 3294, 3297, 3300, 4946,
-     4970, 3308, 4940, 3315, 8043, 8043, 3323, 3328, 3337, 8043,
-
-     8043, 4931, 3345, 3348, 4926, 3358, 2062, 4901, 3363, 3366,
-     3377, 3381, 4899, 3384, 8043, 4891, 4891, 2198, 2201, 4899,
-     4898, 4896, 4895, 4886, 3387, 3391, 3405, 3409, 3413, 4892,
-     3416, 4863, 4879, 3419, 3437, 3445, 8043, 8043, 3423, 4856,
-     4876, 4863, 4869, 4832, 3456, 4853, 3459, 4832, 4841, 3462,
-     8043, 8043, 3470, 4844, 3479, 4833, 3482, 4825, 4830, 4811,
-     3488, 3492, 3502, 8043, 8043, 3511, 8043, 8043, 4803, 3521,
-     3427, 3524, 8043, 8043, 4802, 4813, 3536, 8043, 8043, 4795,
-     3544, 4790, 3549, 3552, 8043, 8043, 4789, 4803, 3564, 8043,
-     8043, 3572, 4780, 3575, 3578, 4769, 4786, 3593, 4768, 3596,
-
-     3599, 3606, 3614, 3620,  718, 4806, 3625, 8043, 4805, 8043,
-     8043, 4761, 4754, 3628, 4734, 4743, 4717, 4728, 4718, 2244,
-     4707, 2312, 4706, 2485, 4694, 4688, 2492, 4692, 3587, 3632,
-     4696, 4689, 4682, 4682, 3635, 4662, 3639, 3647, 8043, 8043,
-     3655, 3659, 8043, 8043, 4666, 4682, 3668, 4653, 3687, 8043,
-     8043, 4653, 3695, 8043, 8043, 4642, 3682, 3703, 4642, 3706,
-     1574, 1820, 3714, 3722, 3732, 4653, 4639, 4634, 3735, 3738,
-     3743, 3746, 3751, 4648, 4632, 3754, 8043, 8043, 3762, 3765,
-     3773, 3780, 4638, 3776, 4640, 3791, 3795, 3803, 4602, 3811,
-     8043, 8043, 3821, 3824, 3832, 4582, 4585, 4584, 3835, 3839,
-
-     4583, 3842, 3846, 3854, 4571, 3860, 3863, 4576, 3872, 4568,
-     3878, 4575, 4552, 4568, 3881, 3884, 4563, 3892, 4530, 3899,
-     4538, 3905, 3911, 3914, 3918, 4527, 3923, 3932, 3937, 3942,
-     4510, 3951, 8043, 8043, 4513, 4499, 3945, 4500, 3964, 3971,
-     3985, 3989, 3992, 3997, 4010,  818,  415,  948, 8043, 4486,
-     4013, 4016, 4497, 4487, 4509, 4445, 4019, 4445, 4429, 4426,
-     4396, 4022, 4025, 4031, 4035, 4404, 4038, 4045, 4387, 4386,
-     4369, 4048, 4330, 4051, 4328, 4354, 4054, 4313, 4057, 4306,
-     4060, 4063, 4338, 4302, 1189, 4236, 4248, 4221, 1246, 4216,
-     4066, 8043, 8043, 4081, 4085, 4026, 4035, 4088, 4091, 3945,
-
-     3935, 4096, 8043, 8043, 4104, 3925, 3874, 3803, 4112, 8043,
-     3675, 4115, 8043, 8043, 4123, 4131,   91, 4141, 8043, 8043,
-     4149, 4152, 4160,  127,  163, 4163, 4167, 4181,  250, 4184,
-     8043, 8043, 4192, 4196,  332, 4204, 8043, 8043,  377, 4212,
-     8043,  441, 4215,  430, 4218,  513, 4221,  554,  635,  666,
-     4236, 8043,  695, 4239,  750, 4242, 4245, 4260, 4265,  766,
-     4273,  762, 4279, 4282, 4285, 4293, 4300, 4311,  827,  829,
-      846, 4314,  859, 4317, 8043, 8043, 4325, 4333, 4340, 8043,
-     8043, 4348, 8043, 1267, 1202,  966,  894, 4352, 4355, 4363,
-     4370,  902,  972, 4382, 4387, 4390,  974, 1136, 4393, 4396,
-
-     4399, 1153, 4402, 4405, 4408, 4411, 4414, 1163, 4417, 1220,
-     1233, 4420, 8043, 1217, 4423, 4427, 1261, 4441, 4444, 4447,
-     1290, 1294, 1294, 1304, 1306, 1341, 1352, 1359, 1365, 1360,
-     4455, 4462, 4465, 4474, 1343, 4480, 1356, 1349, 1430, 1441,
-     1383, 1407, 4483, 8043, 8043, 1408, 4491, 8043, 8043, 4499,
-     4505, 1408, 1416, 4513, 8043, 8043, 4521, 1426, 4524, 8043,
-     8043, 1419, 1431, 1424, 4532, 1452, 4535, 4540, 1469, 1468,
-     1573, 1628, 1473, 1483, 4553, 8043, 1476, 4556, 8043, 8043,
-     4565, 8043, 8043, 1495, 4573, 1491, 4576, 4579, 8043, 8043,
-     4588, 8043, 8043, 4596, 4599, 1521, 1529, 4602, 1531, 4605,
-
-     4608, 4611, 1644, 1603, 4617, 4633, 8043, 8043, 4642, 4645,
-     4648, 1533, 4651, 4654, 4657, 4661, 4667, 1551, 4670, 4673,
-     4676, 1556, 4679, 1552, 8043, 4682, 4685, 8043, 8043, 1573,
-     4693, 8043, 4701, 8043, 8043, 1641, 1627, 1647, 1642, 1652,
-     1660, 1646, 1662, 1657, 1695, 4712, 4715, 8043, 8043, 4723,
-     1661, 1673, 1679, 1706, 1729, 1712, 1731, 1693, 1706, 1723,
-     4727, 8043, 8043, 1724, 1734, 4735, 1732, 1737, 1739, 1743,
-     4738, 8043, 4741, 4744, 8043, 8043, 1740, 1741, 1793, 1829,
-     1817, 1837, 1794, 1805, 4759, 1809, 4762, 4765, 4768, 4773,
-     4776, 4788, 4783, 1812, 4796, 4801, 4804, 4807, 8043, 4810,
-
-     1932, 1909, 4815, 4818, 4829, 1799, 4837, 4840, 1807, 1808,
-     4843, 8043, 1814, 4846, 4849, 1847, 1866, 1862, 1877, 1865,
-     1877, 1876, 1876, 1900, 1915, 1927, 4857, 1904, 1907, 1909,
-     1975, 8043, 1980, 8043, 4864, 1924, 1945, 1959, 4872, 4876,
-     8043, 1972, 1974, 4882, 1977, 4885, 4891, 1991, 1987, 1992,
-     2046, 8043, 2045, 8043, 4903, 1996, 4906, 1998, 4909, 8043,
-     4912, 4917, 4930, 4933, 4936, 8043, 8043, 4944, 4952, 4962,
-     4965, 8043, 4968, 4971, 2047, 2096, 2064, 4974, 8043, 2006,
-     2052, 2055, 4980, 4984, 2151, 2324, 2047, 2081, 2090, 2094,
-     2097, 2118, 2097, 2110, 2110, 2113, 2157, 4993, 2129, 2115,
-
-     5000, 8043, 8043, 5003, 5006, 2119, 2134, 2141, 5014, 5021,
-     2159, 5032, 5036, 5039, 5054, 5057, 8043, 8043, 2175, 2181,
-     2178, 8043, 8043, 5065, 5068, 5076, 5079, 5083, 2683, 2713,
-     5097, 8043, 5100, 5103, 8043, 8043, 5111, 5119, 5129, 8043,
-     2230, 2423, 2486, 5132, 2200, 2204, 5135, 5138, 2218, 2222,
-     2343, 2221, 2225, 2353, 2201, 2260, 2264, 2263, 2270, 8043,
-     2293, 2306, 2312, 2322, 8043, 5148, 5153, 5156, 5159, 5167,
-     5177, 8043, 8043, 2335, 2323, 2379, 5185, 8043, 8043, 2383,
-     5193, 5196, 5204, 8043, 8043, 5212, 5215, 2374, 5223, 2391,
-     5226, 8043, 8043, 5234, 5237, 5245, 5248, 2409, 2414, 2414,
-
-     2420, 2421, 2423, 5256, 5259, 8043, 8043, 2489, 2495, 5267,
-     5162, 2397, 2415, 5271, 8043, 8043, 2485, 2481, 2485, 2497,
-     2504, 2502, 2503, 2521, 5279, 2515, 2536, 2553, 2539, 2522,
-     2547, 2565, 2554, 5286, 5289, 5292, 5298, 2523, 5310, 8043,
-     8043, 2525, 2523, 2527, 2548, 5318, 8043, 8043, 5326, 8043,
-     8043, 2555, 5336, 5339, 2538, 5347, 2597, 2674, 5355, 2708,
-     2716, 2568, 2584, 2614, 2590, 2603, 2630, 5363, 2621, 5366,
-     5369, 5372, 5391, 5394, 2620, 2630, 2633, 2624, 2636, 2651,
-     2680, 2667, 5397, 5400, 2682, 2682, 8043, 2699, 2701, 2726,
-     8043, 2732, 5408, 5411, 8043, 8043, 2713, 2715, 2716, 5419,
-
-     2718, 5422, 5427, 8043, 8043, 5440, 2744, 2760, 2752, 2763,
-     2762, 2773, 2765, 2779, 2772, 2784, 8043, 2793, 2803, 8043,
-     5443, 8043, 2815, 5446, 5449, 5458, 5478, 5525, 5468, 5489,
-     2811, 2832, 2833, 2801, 2828, 2846, 2847, 2822, 5498, 8043,
-     8043, 2857, 2841, 2842, 2875, 2854, 2859, 5515, 2841, 2845,
-     2855, 5519, 5506, 2854, 5537, 5545, 5555, 5558, 2908, 2880,
-     2912, 2883, 2918, 2886, 2924, 2896, 2930, 2945, 2944, 2945,
-     2990, 5573, 2952, 2953, 5593, 5640, 2943, 8043, 8043, 2922,
-     2956, 8043, 8043, 2950, 8043, 2984, 2985, 8043, 2985, 2986,
-     5566, 8043, 2968, 2971, 2957, 5581, 3004, 3010, 2979, 5613,
-
-     8043, 8043, 5621, 3120, 3123, 8043, 3035, 8043, 3041, 8043,
-     3051, 8043, 3049, 8043, 8043, 8043, 8043, 3057, 3092, 3067,
-     3084, 3132, 3086, 5630, 3082, 3088, 3100, 3093, 8043, 8043,
-     8043, 8043, 5634, 5652, 5660, 3126, 3091, 3139, 3093, 5663,
-     3171, 3094, 3181, 3115, 8043, 8043, 8043, 8043, 5670, 3162,
-     3160, 3182, 5673, 3196, 3189, 3205, 3193, 5666, 5692, 5700,
-     5703, 5711, 5714, 3180, 3192, 3211, 3194, 3209, 3222, 5725,
-     5729, 3207, 3219, 3231, 3219, 3227, 3243, 5737, 3246, 8043,
-     3244, 8043, 3245, 5743, 8043, 8043, 5752, 8043, 8043, 5760,
-     3266, 3281, 3247, 3257, 3253, 3257, 3274, 3275, 5768, 8043,
-
-     8043, 3278, 3290, 3291, 3296, 3302, 3300, 3353, 8043, 3338,
-     3336, 3333, 3327, 3336, 3334, 3341, 3349, 3350, 3347, 3367,
-     3373, 3372, 3378, 3379, 3384, 3409, 3410, 3417, 8043, 8043,
-     3404, 3423, 3410, 3430, 3416, 3414, 3442, 3432, 3429, 3452,
-     3442, 3446, 3463, 3456, 3456, 3473, 3481, 3463, 3465, 3472,
-     3472, 3490, 3481, 3513, 3503, 3494, 3523, 3508, 3498, 3531,
-     3517, 3520, 3550, 3545, 3530, 3536, 3533, 3546, 3577, 3552,
-     8043, 3577, 3560, 8043, 3598, 3572, 8043, 3602, 3579, 8043,
-     3635, 3577, 3595, 3588, 3621, 8043, 3621, 8043, 3628, 8043,
-     3638, 8043, 3640, 5776, 3647, 3668, 3650, 3668, 3635, 3637,
-
-     3648, 3651, 5779, 3694, 8043, 3694, 8043, 3705, 3704, 3708,
-     3710, 3731, 3753, 8043, 8043, 8043, 8043, 8043, 8043, 3723,
-     3752, 3780, 3801, 3707, 3739, 3912, 3943, 3710, 3858, 3877,
-     3879, 3811, 3884, 3885, 3950, 3851, 3909, 3798, 3903, 3917,
-     4057, 4024, 4066, 3709, 3952, 3792, 3965, 4076, 4091, 3977,
-     4118, 3700, 4077, 4092, 4110, 4154, 4157, 3990, 4128, 3970,
-     4169, 4121, 4140, 3768, 3771, 4139, 4171, 4172, 4208, 4206,
-     4211, 4287, 4313, 4238, 4285, 4213, 4305, 4116, 4288, 4321,
-     4414, 4233, 4253, 4089, 4302, 4327, 4418, 4434, 4440, 4291,
-     4312, 4452, 4468, 4421, 4501, 4493, 4509, 4183, 4520, 4511,
-
-     4512, 3958, 4470, 5787, 5790, 8043, 8043, 5810, 5819, 5828,
-     5837, 5846, 5855, 5864, 5873, 5882, 5891, 5900, 5909, 5918,
-     5927, 5936, 5945, 5954, 5963, 5972, 5981, 5990, 5999, 6008,
-     6017, 6026, 6035, 6044, 6053, 6062, 6071, 6080, 6089, 6098,
-     6107, 6116, 6125, 6134, 6143, 6152, 6161, 6170, 6179, 6186,
-     6193, 6200, 6207, 6214, 6221, 6228, 6235, 6242, 6249, 6256,
-     6263, 6270, 6277, 6284, 6291, 6298, 6305, 6312, 6321, 6328,
-     6333, 6340, 6345, 6352, 6357, 6364, 6369, 6376, 6381, 6388,
-     6393, 6400, 6405, 6412, 6417, 6424, 6429, 6436, 6441, 6448,
-     6453, 6460, 6465, 6472, 6477, 6484, 6489, 6496, 6501, 6508,
-
-     6513, 6520, 6525, 6532, 6537, 6544, 6549, 6558, 6564, 6571,
-     6579, 6586, 6594, 6601, 6609, 6616, 6624, 6631, 6639, 6646,
-     6654, 6661, 6669, 6676, 6684, 6691, 6699, 6706, 6714, 6721,
-     6729, 6737, 6745, 6753, 6761, 6768, 6776, 6784, 6792, 6799,
-     6807, 6814, 6822, 6830, 6837, 6845, 6854, 6860, 6867, 6875,
-     6883, 6891, 6899, 6907, 6914, 6922, 6929, 6937, 6944, 6952,
-     6959, 6967, 6974, 6982, 6989, 6997, 7004, 7012, 7019, 7027,
-     7034, 7042, 7049, 7057, 7064, 7072, 7079, 7087, 7094, 7102,
-     7109, 7117, 7125, 7132, 7140, 7149, 7158, 7165, 7173, 7181,
-     7188, 7196, 7203, 7211, 7218, 7226, 7233, 7240, 7248, 7255,
-
-     7263, 7270, 7278, 7285, 7293, 7300, 7308, 7315, 7323, 7330,
-     7338, 7345, 7353, 7360, 7368, 7375, 7383, 7391, 7399, 7407,
-     7415, 7423, 7432, 7441, 7448, 7456, 7464, 7471, 7479, 7486,
-     7494, 7501, 7509, 7516, 7523, 7531, 7538, 7546, 7553, 7561,
-     7568, 7576, 7583, 7591, 7598, 7606, 7614, 7622, 7629, 7637,
-     7645, 7653, 7660, 7668, 7676, 7684, 7692, 7701, 7710, 7718,
-     7726, 7734, 7741, 7749, 7756, 7764, 7772, 7780, 7788, 7795,
-     7802, 7810, 7817, 7824, 7832, 7839, 7846, 7854, 7861, 7869,
-     7876, 7884, 7892, 7899, 7907, 7915, 7923, 7932, 7941, 7949,
-     7957, 7964, 7971, 7979, 7988, 7997, 8006, 8015, 8024, 8033
-
+        0,    0, 6569, 8061, 8061,   95,  100,   29,   41, 8061,
+
+      103,   51, 8061, 8061, 6558, 8061, 8061, 6543, 8061, 6558,
+     6558,  498, 8061, 8061, 8061, 8061, 6554, 6554, 6509,  145,
+     8061,  161, 6531,    0,  146, 8061, 6497, 8061,  166, 2454,
+       88,  204,  205,  254, 6537,    3, 8061,  169, 6526,    0,
+      153, 8061, 6488, 8061,  260,  419, 8061,  322, 6524,    0,
+      244, 8061, 6482, 6486, 6484,  420, 6487, 8061,  364, 6513,
+        0,  248, 8061, 6479, 6475,  257, 6477,  360, 8061,  440,
+       31, 6513, 6459, 8061,  567, 6501,    0,  306, 8061, 6461,
+     6458, 6449, 8061,  624,  482, 8061,  633, 6493,    0,  416,
+     8061, 6458, 6447, 8061,  692, 1908, 1909, 6449,   35, 6481,
+
+      240,  135,  740,  950,   59, 6490,  152, 8061,  697, 6481,
+        0,  417, 8061, 6429, 6435, 6444, 6429, 6423, 8061,  700,
+     6477,  181, 8061,  764, 6466,    0,  479, 8061, 6416,  300,
+     6422, 6427, 6429,  185,  436,  439, 8061,  767,  546, 8061,
+      824, 6457,    0,  483, 8061, 6405, 6403, 6410, 6415, 6417,
+     6403, 6395, 8061,  830,  611, 8061,  833, 6441,    0,  543,
+     8061, 6398, 6403, 8061,  889,  612, 8061,  895, 6434,    0,
+      545, 8061, 6404, 6398, 6400,  434, 8061,  898, 6436,  210,
+     8061,  937, 6423,    0,  609, 8061, 6376,  279, 8061,  954,
+      626, 6429, 6379, 8061,  961, 6417,    0,  685, 8061, 6370,
+
+     6361,  306, 8061, 1020, 6418,  560, 8061, 1026, 6409,    0,
+      742, 8061, 6369, 6373, 8061, 1213,  752, 8061, 1230, 6404,
+        0,  751, 8061, 6353, 6348, 6352, 8061, 1270, 6402,  693,
+     8061, 1287, 6393,    0,  808, 8061, 6344, 6345, 6349, 6338,
+     8061, 1344,  304,  512,  310, 8061, 1352, 6382,    0,  809,
+     8061, 6352, 8061, 1355, 1331, 8061, 1410, 6380,    0,  873,
+     8061, 6343, 8061, 1418, 6382,  527, 8061, 1421, 6373,    0,
+      874, 8061, 6338, 6340, 8061, 1477, 1397, 1480,  451, 6317,
+     8061, 6373, 6362, 8061, 8061, 8061, 1474,  317, 6314, 6311,
+     6309, 6356, 6312, 8061,    0, 6305, 6306, 6327, 6300, 6292,
+
+      620, 6297, 6297, 6300,   30,  697, 6289,  621,  897, 6314,
+      757, 6291,  901, 6282,  822,  967, 1170, 8061,    0, 6279,
+     6280, 8061,    0, 6277, 1899, 6266,  646, 6263, 6309, 8061,
+        0, 6263, 1958, 6252, 6273, 6256, 6264, 6262, 6258, 6244,
+     1227, 8061,    0, 6255, 6242, 6253, 6234, 8061,    0, 1966,
+     6228, 6273, 6255, 6217, 6226, 6230,  963, 6243, 1288, 1354,
+     8061,    0, 6232,  882, 1976, 6210, 6226, 6218, 8061,    0,
+     6224, 6220, 2022, 6202, 2025, 6199, 6191, 6207, 6207, 6186,
+     6204, 6203, 6193, 6195, 8061,    0, 6196, 6192, 6177, 2028,
+     6171, 6163, 6183, 6168, 8061,    0, 6164, 2031, 6160, 8061,
+
+        0, 6163, 2034, 6152, 6169, 6168, 6153, 8061,    0, 6144,
+     6159, 5767, 5761, 5767, 8061,    0, 5756, 5774, 5770, 5760,
+     5797, 8061,    0, 5753, 2088, 5757, 8061,    0, 5748, 5765,
+     5754, 5754, 8061,    0, 5741, 5727, 5732, 5737, 5722, 5718,
+     8061,    0, 5719, 5728, 8061,    0, 2091, 5720, 8061,    0,
+     2094, 5710, 5705, 5746, 5751, 1200, 5700, 8061, 1533,    0,
+     5692, 5692, 5735, 5726, 5680, 8061, 5691, 5673, 1903, 2100,
+     1549, 5674, 5665, 5658, 5657, 5651, 5664, 5649, 5656, 5658,
+     5644, 5641, 5633, 5650, 5637, 5635, 1552, 5585, 5598, 5594,
+     5584, 5595, 5586, 2097, 2161, 5585, 2158, 1678, 5579, 5603,
+
+     2165, 2168, 8061, 5573, 2171, 1858, 2176, 5564, 2226, 5567,
+     5570, 5573, 2234, 2237, 5548, 5549, 5555, 5555, 2240, 2285,
+     2288, 2119, 5532, 2291, 2297, 1618, 5535, 5530, 5530, 5516,
+     1798, 5515, 5513, 5516, 5506, 5517, 2294, 2127, 5515, 5487,
+     2340, 2343, 5481, 1553, 2300, 2190, 5481, 2349, 2352, 2367,
+     5479, 5477, 5472, 5457, 5458, 5454, 5458, 2409, 2412, 5450,
+      948, 5441, 2415, 2370, 2418, 5442, 5427, 2421, 2424, 5427,
+     2436, 2378, 2445, 2450, 5439, 2459, 2477, 5433, 5410, 5407,
+     2465, 2470, 2489, 2495, 2520, 2498, 2526, 5411, 2529, 2532,
+     2538, 2541, 2550, 2561, 5405, 2564, 2569, 2583, 2587, 2590,
+
+     2593, 2602, 2611, 2614, 5406, 5388, 5394, 5387, 2620, 2623,
+     5395, 5377, 2626, 2633, 2645, 2648, 2658, 2663, 2666, 2670,
+     5369, 2687, 2690, 5416, 8061, 8061, 1011, 5367, 8061, 5408,
+     5406, 5343, 8061, 8061, 5341, 5338, 5345, 2693, 2697, 8061,
+     2700, 1741, 5338, 5330, 5348, 5329, 5327, 5313, 5319, 5314,
+     5305, 5298,  687, 5312, 5295, 5303, 5298, 5299, 1924, 5283,
+     5285, 5278,  698, 5290, 2712, 2719, 2724, 8061, 2730, 2733,
+     2678, 8061, 8061, 2738, 5311, 2743, 2756, 8061, 2762, 5270,
+     2765, 8061, 8061, 2775, 2781, 2789, 2793, 2800, 5282, 2811,
+     5276, 2814, 2817, 8061, 2820,  819, 5273, 2823, 5270, 2829,
+
+     2841, 8061, 2844, 2848, 8061, 8061, 5264, 2856, 2863, 8061,
+     2866, 5255, 5266, 5236, 5244, 5230, 5229, 5223, 5226, 5232,
+     2869, 2876, 8061, 8061, 5209, 5220, 2887, 2892, 8061, 2895,
+     5204, 5192, 5203, 5195, 2899, 8061, 8061, 2907, 2914, 8061,
+     8061, 2925, 2928, 5176, 5183, 5187, 5176, 5170, 5168, 5154,
+     2936, 2939, 8061, 2943, 5151, 5147, 5135, 5150, 2946, 8061,
+     8061, 2962, 2965, 5135, 5142, 2973, 2976, 8061, 2980, 5140,
+     2983, 8061, 8061, 2995, 2999, 8061, 3002, 5120, 3014, 8061,
+     8061, 5110, 5109, 5111, 3005, 3010, 8061, 3024, 3032, 3036,
+     3044, 3050, 5110, 3058, 3062, 8061, 3069, 5103, 3065, 3077,
+
+     5081, 5080, 3072, 3090, 5091, 3098, 3101, 8061, 3104, 5091,
+     3107, 8061, 8061, 3123, 3126, 8061, 3129, 3132, 3136, 5071,
+     5071, 3151, 3154, 3162, 3169, 8061, 3172, 5067, 3175, 5081,
+     5061, 3181, 3184, 8061, 3193, 5058, 5062, 3196, 3203, 8061,
+     3206, 3215, 8061, 8061, 3225, 3228, 8061, 3234, 3237, 8061,
+     8061, 5061, 3247, 3254, 8061, 3260,  929, 3266, 8061, 8061,
+     5095, 5094, 5055, 5046, 3269, 5038, 5034, 5027, 5016, 5025,
+     1930, 5012, 1994, 1984, 5018, 5018, 1997, 5007, 5013, 5012,
+     5006, 4989, 4983, 4980, 2059, 4987, 4986, 3273, 3279, 3294,
+     3297, 3300, 4985, 5010, 3308, 4982, 3315, 8061, 8061, 3323,
+
+     3328, 3337, 8061, 8061, 4980, 3345, 3348, 4973, 3358, 2062,
+     4963, 3363, 3366, 3377, 3381, 4958, 3384, 8061, 4939, 4938,
+     2198, 2201, 4949, 4940, 4922, 4925, 4906, 3387, 3391, 3405,
+     3409, 3413, 4913, 3416, 4893, 4903, 3419, 3437, 3445, 8061,
+     8061, 3423, 4879, 4896, 4877, 4864, 4876, 4851, 3456, 4872,
+     3459, 4852, 4860, 3462, 8061, 8061, 3470, 4867, 3479, 4855,
+     3482, 4838, 4842, 4831, 3488, 3492, 3502, 8061, 8061, 3511,
+     8061, 8061, 4819, 3521, 3427, 3524, 8061, 8061, 4817, 4832,
+     3536, 8061, 8061, 4810, 3544, 4809, 3549, 3552, 8061, 8061,
+     4804, 4814, 3564, 8061, 8061, 3572, 4807, 3575, 3578, 4795,
+
+     4789, 3593, 4776, 3596, 3599, 3606, 3614, 3620,  923, 4813,
+     3625, 8061, 4812, 8061, 8061, 4768, 4768, 3628, 4757, 4767,
+     4750, 4751, 4747, 2244, 4745, 2312, 4744, 2485, 4732, 4725,
+     2492, 4726, 3587, 3632, 4729, 4713, 4709, 4708, 3635, 4693,
+     3639, 3647, 8061, 8061, 3655, 3659, 8061, 8061, 4700, 4715,
+     3668, 4685, 3687, 8061, 8061, 4676, 3695, 8061, 8061, 4665,
+     3682, 3703, 4661, 3706, 1578, 1640, 3714, 3722, 3732, 4668,
+     4653, 4646, 3735, 3738, 3743, 3746, 3751, 4661, 4648, 3754,
+     8061, 8061, 3762, 3765, 3773, 3780, 4654, 3776, 4656, 3791,
+     3795, 3803, 4635, 3811, 8061, 8061, 3821, 3824, 3832, 4639,
+
+     4645, 4637, 4613, 3835, 3839, 4591, 3842, 3846, 3854, 4579,
+     3860, 3863, 4584, 3872, 4572, 3878, 4580, 4558, 4574, 3881,
+     3884, 4573, 3892, 4559, 3899, 4572, 3905, 3911, 3914, 3918,
+     4532, 3923, 3932, 3937, 3942, 4525, 3951, 8061, 8061, 4527,
+     4505, 3945, 4513, 3964, 3971, 3985, 3989, 3992, 3997, 4010,
+      818, 1273,  981, 8061, 4498, 4013, 4016, 4500, 4490, 4512,
+     4482, 4019, 4457, 4429, 4426, 4424, 4022, 4025, 4031, 4035,
+     4428, 4038, 4045, 4397, 4386, 4369, 4048, 4331, 4051, 4330,
+     4357, 4054, 4301, 4057, 4303, 4060, 4063, 4250, 4234,  583,
+     4221, 4075, 4037, 1189, 4007, 4066, 8061, 8061, 4081, 4085,
+
+     3931, 3944, 4088, 4091, 3733, 3739, 4096, 8061, 8061, 4104,
+      112,  139,  163, 4112, 8061,  250, 4115, 8061, 8061, 4123,
+     4131,  324, 4141, 8061, 8061, 4149, 4152, 4160,  377,  387,
+      440, 4163, 4167, 4181,  503, 4184, 8061, 8061, 4192, 4196,
+      622, 4204, 8061, 8061,  640, 4212, 8061,  674, 4215,  750,
+     4218,  775, 4221,  788,  852,  832, 4236, 8061,  846, 4239,
+      853, 4242, 4245, 4260, 4265,  878, 4273,  924, 4279, 4282,
+     4285, 4293, 4300, 4311,  952, 1136, 1165, 4314, 1164, 4317,
+     8061, 8061, 4325, 4333, 4340, 8061, 8061, 4348, 8061, 1256,
+     1259, 1466, 1170, 4352, 4355, 4363, 4370, 1186, 1206, 4382,
+
+     4387, 4390, 1216, 1227, 4393, 4396, 4399, 1263, 4402, 4405,
+     4408, 4411, 4414, 1271, 4417, 1282, 1303, 4420, 8061, 1311,
+     4423, 4427, 1342, 4441, 4444, 4447, 1364, 1361, 1365, 1380,
+     1399, 1422, 1426, 1426, 1433, 1426, 4455, 4462, 4465, 4474,
+     1409, 4480, 1416, 1409, 1507, 1514, 1426, 1431, 4483, 8061,
+     8061, 1430, 4491, 8061, 8061, 4499, 4505, 1456, 1460, 1473,
+     4513, 8061, 8061, 4521, 1476, 4524, 8061, 8061, 1470, 1498,
+     1507, 4532, 1533, 4535, 4540, 1543, 1535, 1573, 1639, 1557,
+     1567, 4553, 8061, 1562, 4556, 8061, 8061, 4565, 8061, 8061,
+     1589, 4573, 1594, 4576, 4579, 8061, 8061, 4588, 8061, 8061,
+
+     4596, 4599, 1611, 1607, 4602, 1611, 4605, 4608, 4611, 1668,
+     1666, 4617, 4633, 8061, 8061, 4642, 4645, 4648, 1617, 4651,
+     4654, 4657, 4661, 4667, 1628, 4670, 4673, 4676, 1645, 4679,
+     1654, 8061, 4682, 4685, 8061, 8061, 1662, 4693, 8061, 4701,
+     8061, 8061, 1708, 1695, 1713, 1708, 1720, 1738, 1738, 1760,
+     1755, 1763, 4712, 4715, 8061, 8061, 4723, 1722, 1735, 1743,
+     1770, 1797, 1793, 1826, 1790, 1787, 1791, 4727, 8061, 8061,
+     4735, 1785, 1796, 4738, 1796, 1801, 1804, 1805, 4741, 8061,
+     4744, 4747, 8061, 8061, 1808, 1804, 1841, 1863, 1859, 1895,
+     1856, 1861, 4762, 1863, 4765, 4768, 4773, 4776, 4779, 4797,
+
+     4786, 1860, 4805, 4808, 4811, 4815, 8061, 4819, 1932, 1909,
+     4824, 4838, 4841, 1848, 4844, 4847, 1858, 1863, 4850, 8061,
+     1863, 4853, 4857, 1906, 1922, 1923, 1939, 1927, 1943, 1946,
+     1943, 1958, 1970, 2001, 4865, 1973, 1976, 1979, 2040, 8061,
+     2042, 8061, 4871, 1985, 2006, 4877, 4885, 1996, 4895, 4898,
+     8061, 1990, 1993, 4901, 2001, 4904, 4907, 2030, 2046, 2047,
+     2102, 8061, 2100, 8061, 4925, 2052, 4928, 2053, 4931, 8061,
+     4934, 4937, 4945, 4952, 4955, 8061, 8061, 4964, 4967, 4975,
+     4978, 8061, 4982, 4985, 2107, 2096, 2114, 4988, 8061, 2065,
+     2066, 2071, 4993, 4997, 2324, 2340, 2064, 2102, 2113, 2158,
+
+     2164, 2181, 2159, 2169, 2173, 2176, 2222, 5007, 2179, 2162,
+     5011, 8061, 8061, 5014, 5019, 2163, 2187, 5032, 8061, 8061,
+     2194, 5040, 5043, 2183, 5051, 5054, 5058, 5072, 5075, 8061,
+     8061, 2199, 2205, 2202, 8061, 8061, 5083, 5086, 5094, 5097,
+     5101, 2683, 2713, 5115, 8061, 5118, 5121, 8061, 8061, 5129,
+     5137, 5147, 8061, 2259, 2423, 2486, 5150, 2210, 2211, 5153,
+     5156, 2247, 2270, 2429, 2274, 2282, 2485, 2287, 2332, 2322,
+     2338, 2343, 8061, 2363, 2388, 2386, 2391, 8061, 5166, 5171,
+     5174, 5177, 5185, 5195, 8061, 8061, 2394, 2383, 2399, 5203,
+     8061, 8061, 2408, 5211, 5214, 5222, 8061, 8061, 5230, 5233,
+
+     2398, 5241, 2409, 5244, 8061, 8061, 5252, 5255, 5263, 5266,
+     2446, 2473, 2478, 2480, 2489, 2489, 5274, 5277, 8061, 8061,
+     2535, 2556, 5285, 5180, 2470, 2471, 5289, 8061, 8061, 2527,
+     2515, 2521, 2530, 2537, 2526, 2527, 2541, 5297, 2534, 2555,
+     2573, 2560, 2559, 2586, 2601, 2597, 5304, 5307, 5310, 5316,
+     2566, 5328, 8061, 8061, 2578, 2574, 2566, 2585, 5336, 8061,
+     8061, 5344, 8061, 8061, 2588, 5354, 5357, 2570, 5365, 2674,
+     2708, 5373, 2716, 2727, 2612, 2621, 2652, 2620, 2636, 2666,
+     5381, 2657, 5384, 5387, 5390, 5409, 5412, 2670, 2680, 2687,
+     2690, 2695, 2730, 2745, 2734, 5415, 5418, 2746, 2750, 8061,
+
+     2756, 2759, 2759, 8061, 2768, 5426, 5429, 8061, 8061, 2742,
+     2744, 2748, 5437, 2750, 5440, 5445, 8061, 8061, 5458, 2774,
+     2802, 2793, 2809, 2800, 2812, 2803, 2815, 2818, 2829, 8061,
+     2821, 2836, 8061, 5461, 8061, 2857, 5464, 5467, 5476, 5496,
+     5543, 5486, 5507, 2838, 2868, 2869, 2844, 2862, 2883, 2891,
+     2864, 5516, 8061, 8061, 2900, 2880, 2881, 2912, 2889, 2891,
+     5533, 2866, 2874, 2884, 5537, 5524, 2877, 5555, 5563, 5573,
+     5576, 2945, 2914, 2945, 2918, 2952, 2921, 2953, 2931, 2966,
+     2967, 2979, 2981, 2990, 5591, 3023, 3012, 5611, 5658, 2977,
+     8061, 8061, 2956, 2981, 8061, 8061, 2986, 8061, 3025, 3031,
+
+     8061, 3032, 3040, 5584, 8061, 2997, 3004, 2986, 5599, 3120,
+     3123, 3024, 5631, 8061, 8061, 5639, 3141, 3154, 8061, 3081,
+     8061, 3079, 8061, 3084, 8061, 3086, 8061, 8061, 8061, 8061,
+     3092, 3205, 3077, 3108, 3182, 3106, 5648, 3102, 3093, 3105,
+     3096, 8061, 8061, 8061, 8061, 5652, 5670, 5678, 3126, 3094,
+     3181, 3112, 5681, 3192, 3115, 3193, 3132, 8061, 8061, 8061,
+     8061, 5688, 3206, 3199, 3233, 5691, 3238, 3225, 3243, 3231,
+     5684, 5710, 5718, 5721, 5729, 5732, 3219, 3227, 3243, 3226,
+     3245, 3257, 5743, 5747, 3244, 3257, 3269, 3253, 3261, 3283,
+     5755, 3287, 8061, 3274, 8061, 3279, 5761, 8061, 8061, 5770,
+
+     8061, 8061, 5778, 3296, 3306, 3278, 3287, 3291, 3301, 3311,
+     3317, 5786, 8061, 8061, 3319, 3325, 3325, 3334, 3340, 3336,
+     3357, 8061, 3370, 3383, 3376, 3370, 3381, 3376, 3384, 3409,
+     3410, 3407, 3419, 3419, 3420, 3427, 3427, 3425, 3431, 3441,
+     3449, 8061, 8061, 3430, 3455, 3439, 3465, 3456, 3456, 3473,
+     3463, 3460, 3478, 3472, 3469, 3491, 3481, 3478, 3496, 3517,
+     3492, 3493, 3495, 3496, 3509, 3506, 3553, 3534, 3525, 3554,
+     3539, 3534, 3566, 3557, 3548, 3577, 3585, 3563, 3578, 3582,
+     3588, 3614, 3592, 8061, 3637, 3614, 8061, 3648, 3622, 8061,
+     3655, 3633, 8061, 3661, 3632, 3648, 3637, 3651, 8061, 3651,
+
+     8061, 3653, 8061, 3666, 8061, 3674, 5794, 3677, 3705, 3687,
+     3705, 3675, 3676, 3678, 3683, 5797, 3723, 8061, 3721, 8061,
+     3726, 3734, 3745, 3750, 3753, 3812, 8061, 8061, 8061, 8061,
+     8061, 8061, 3752, 3780, 3811, 3891, 3869, 3879, 3771, 3943,
+     3750, 3809, 3885, 3917, 3857, 3884, 3871, 3950, 3850, 3944,
+     3798, 4024, 4057, 4066, 4089, 4091, 3958, 4076, 3792, 3961,
+     4119, 4137, 3977, 4118, 4061, 4116, 4110, 4139, 4157, 4171,
+     3949, 4183, 3965, 4169, 4092, 4140, 3741, 4189, 4208, 4213,
+     4233, 4235, 3941, 4209, 4287, 4313, 4211, 4285, 4305, 4367,
+     4240, 4288, 4414, 4432, 4290, 4291, 4121, 4302, 4321, 4418,
+
+     4434, 4440, 4312, 4318, 4452, 4468, 4501, 4520, 4493, 4509,
+     4528, 4550, 4512, 4670, 4435, 3851, 5805, 5808, 8061, 8061,
+     5828, 5837, 5846, 5855, 5864, 5873, 5882, 5891, 5900, 5909,
+     5918, 5927, 5936, 5945, 5954, 5963, 5972, 5981, 5990, 5999,
+     6008, 6017, 6026, 6035, 6044, 6053, 6062, 6071, 6080, 6089,
+     6098, 6107, 6116, 6125, 6134, 6143, 6152, 6161, 6170, 6179,
+     6188, 6197, 6204, 6211, 6218, 6225, 6232, 6239, 6246, 6253,
+     6260, 6267, 6274, 6281, 6288, 6295, 6302, 6309, 6316, 6323,
+     6330, 6339, 6346, 6351, 6358, 6363, 6370, 6375, 6382, 6387,
+     6394, 6399, 6406, 6411, 6418, 6423, 6430, 6435, 6442, 6447,
+
+     6454, 6459, 6466, 6471, 6478, 6483, 6490, 6495, 6502, 6507,
+     6514, 6519, 6526, 6531, 6538, 6543, 6550, 6555, 6562, 6567,
+     6576, 6582, 6589, 6597, 6604, 6612, 6619, 6627, 6634, 6642,
+     6649, 6657, 6664, 6672, 6679, 6687, 6694, 6702, 6709, 6717,
+     6724, 6732, 6739, 6747, 6755, 6763, 6771, 6779, 6786, 6794,
+     6802, 6810, 6817, 6825, 6832, 6840, 6848, 6855, 6863, 6872,
+     6878, 6885, 6893, 6901, 6909, 6917, 6925, 6932, 6940, 6947,
+     6955, 6962, 6970, 6977, 6985, 6992, 7000, 7007, 7015, 7022,
+     7030, 7037, 7045, 7052, 7060, 7067, 7075, 7082, 7090, 7097,
+     7105, 7112, 7120, 7127, 7135, 7143, 7150, 7158, 7167, 7176,
+
+     7183, 7191, 7199, 7206, 7214, 7221, 7229, 7236, 7244, 7251,
+     7258, 7266, 7273, 7281, 7288, 7296, 7303, 7311, 7318, 7326,
+     7333, 7341, 7348, 7356, 7363, 7371, 7378, 7386, 7393, 7401,
+     7409, 7417, 7425, 7433, 7441, 7450, 7459, 7466, 7474, 7482,
+     7489, 7497, 7504, 7512, 7519, 7527, 7534, 7541, 7549, 7556,
+     7564, 7571, 7579, 7586, 7594, 7601, 7609, 7616, 7624, 7632,
+     7640, 7647, 7655, 7663, 7671, 7678, 7686, 7694, 7702, 7710,
+     7719, 7728, 7736, 7744, 7752, 7759, 7767, 7774, 7782, 7790,
+     7798, 7806, 7813, 7820, 7828, 7835, 7842, 7850, 7857, 7864,
+     7872, 7879, 7887, 7894, 7902, 7910, 7917, 7925, 7933, 7941,
+
+     7950, 7959, 7967, 7975, 7982, 7989, 7997, 8006, 8015, 8024,
+     8033, 8042, 8051
     } ;
 
-static yyconst flex_int16_t yy_def[2701] =
+static yyconst flex_int16_t yy_def[2714] =
     {   0,
-     2408, 2408, 2409, 2409, 2409, 2409, 2410, 2410, 2411, 2411,
-     2412, 2412, 2413, 2413, 2413, 2413, 2414, 2414, 2408, 2408,
-     2415, 2415, 2416, 2416, 2416, 2416, 2408, 2408, 2416, 2416,
-     2416, 2416, 2408, 2408, 2416, 2416, 2408, 2408, 2416, 2416,
-     2416, 2416, 2417, 2417, 2418, 2418, 2419, 2419, 2413, 2413,
-     2420, 2420, 2421, 2421, 2408, 2408, 2421, 2421, 2421, 2421,
-     2422, 2422, 2423, 2423, 2424, 2424, 2425, 2425, 2425, 2425,
-     2408, 2408, 2425, 2425, 2425, 2425, 2408, 2408, 2425, 2425,
-     2408, 2408, 2425, 2425, 2425, 2425, 2408, 2408, 2425, 2425,
-     2408, 2408, 2425, 2425, 2425, 2425, 2426, 2426, 2427, 2427,
-
-     2408, 2408, 2427, 2427, 2427, 2427, 2407,  107, 2428, 2428,
-     2407,  111, 2429, 2429, 2430, 2430, 2431, 2431, 2432, 2432,
-     2433, 2433, 2408, 2408, 2433, 2433, 2433, 2433, 2434, 2434,
-     2435, 2435, 2408, 2408, 2435, 2435, 2435, 2435, 2436, 2436,
-     2437, 2437, 2408, 2408, 2437, 2437, 2437, 2437, 2438, 2438,
-     2439, 2439, 2440, 2440, 2441, 2441, 2408, 2408, 2441, 2441,
-     2441, 2441, 2442, 2442, 2443, 2443, 2408, 2408, 2443, 2443,
-     2443, 2443, 2444, 2444, 2445, 2445, 2446, 2446, 2447, 2447,
-     2408, 2408, 2447, 2447, 2447, 2447, 2448, 2448, 2449, 2449,
-     2408, 2408, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2450, 2407, 2407, 2450, 2407, 2407, 2407,
-      230,  230,  230,  230,  233,  233, 2407, 2407, 2407, 2451,
-     2407, 2407, 2451, 2407, 2407, 2407, 2407, 2407, 2407, 2452,
-     2407, 2407, 2452, 2452, 2452, 2407, 2407, 2407, 2407, 2407,
-     2453, 2407, 2407, 2453, 2453, 2453, 2453, 2453, 2407, 2407,
-      233,  271,  271, 2407, 2407, 2407, 2454, 2407, 2407, 2454,
-     2454, 2454, 2407, 2407, 2407, 2407, 2407, 2407, 2455, 2407,
-     2407, 2455, 2455, 2407, 2407,  234,  271,  234,  296,  297,
-
-      297,  297,  297,  303,  304,  303,  303, 2407, 2407, 2407,
-     2456, 2407, 2407, 2456, 2456, 2456, 2456, 2456, 2407, 2407,
-      271,  271, 2407, 2407, 2407, 2457, 2407, 2407, 2457, 2457,
-     2457, 2457, 2457, 2457, 2457, 2457, 2407, 2407, 2407, 2407,
-     2407, 2407, 2458, 2407, 2407, 2458, 2458, 2458, 2458, 2458,
-     2458, 2458, 2407, 2407, 2407, 2407, 2407, 2407, 2459, 2407,
-     2407, 2459, 2459, 2407, 2407, 2407, 2407, 2407, 2407, 2460,
-     2407, 2407, 2460, 2460, 2460, 2460, 2407, 2407,  271,  271,
-     2407, 2407, 2407, 2461, 2407, 2407, 2461, 2461, 2407, 2407,
-      271,  391,  391, 2407, 2407, 2407, 2462, 2407, 2407, 2462,
-
-     2462, 2462, 2407, 2407,  391,  391, 2407, 2407, 2407, 2463,
-     2407, 2407, 2463, 2463, 2407, 2407, 2407, 2407, 2407, 2407,
-     2464, 2407, 2407, 2464, 2464, 2464, 2407, 2407,  391,  391,
-     2407, 2407, 2407, 2465, 2407, 2407, 2465, 2465, 2465, 2465,
-     2407, 2407,  271,  271,  271, 2407, 2407, 2407, 2466, 2407,
-     2407, 2466, 2407, 2407, 2407, 2407, 2407, 2407, 2467, 2407,
-     2407, 2467, 2407, 2407,  271,  271, 2407, 2407, 2407, 2468,
-     2407, 2407, 2468, 2468, 2407, 2407, 2407, 2407, 2469, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2470, 2470, 2471, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2472, 2472,
-     2473, 2407, 2474, 2474, 2474, 2474, 2407, 2475, 2407, 2407,
-     2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2476, 2477,
-     2407, 2407, 2478, 2478, 2478, 2478, 2479, 2407, 2480, 2480,
-     2480, 2481, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2482, 2482, 2482, 2482, 2482, 2482, 2483, 2407, 2484,
-     2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484, 2484,
-     2484, 2484, 2485, 2407, 2486, 2486, 2486, 2486, 2486, 2486,
-     2486, 2486, 2487, 2407, 2488, 2488, 2488, 2489, 2407, 2490,
-
-     2490, 2490, 2490, 2490, 2490, 2491, 2407, 2492, 2492, 2492,
-     2492, 2493, 2407, 2407, 2494, 2494, 2494, 2494, 2494, 2495,
-     2407, 2496, 2496, 2496, 2497, 2407, 2498, 2498, 2498, 2498,
-     2499, 2407, 2500, 2500, 2500, 2500, 2500, 2501, 2407, 2407,
-     2502, 2502, 2503, 2407, 2504, 2504, 2505, 2407, 2506, 2506,
-     2506, 2507, 2508, 2407, 2508, 2407, 2407, 2407, 2509, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2510, 2511, 2511, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2512, 2513, 2513, 2514, 2407, 2407, 2514, 2407, 2515,
-
-     2515, 2407, 2516, 2407, 2407, 2516, 2516, 2516, 2516, 2516,
-     2516, 2517, 2517, 2407, 2518, 2518, 2518, 2519, 2519, 2407,
-     2407, 2520, 2521, 2521, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2522, 2522, 2522, 2407, 2407, 2522, 2522, 2523,
-     2523, 2524, 2524, 2407, 2407, 2524, 2407, 2407, 2524, 2524,
-     2524, 2524, 2524, 2524, 2524, 2525, 2525, 2526, 2526, 2526,
-     2407, 2407, 2526, 2526, 2526, 2527, 2527, 2528, 2407, 2407,
-     2529, 2529, 2530, 2407, 2407, 2530, 2530, 2530, 2531, 2531,
-     2532, 2532, 2532, 2533, 2533, 2407, 2534, 2534, 2534, 2534,
-     2535, 2535, 2536, 2407, 2407, 2537, 2537, 2538, 2538, 2538,
-
-     2539, 2539, 2540, 2540, 2540, 2540, 2541, 2541, 2407, 2542,
-     2543, 2543, 2407, 2407, 2544, 2544, 2407, 2407, 2545, 2546,
-     2546, 2547, 2407, 2407, 2547, 2407, 2407, 2548, 2407, 2407,
-     2407, 2407, 2407, 2407, 2549, 2407, 2550, 2407, 2550, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2551, 2407, 2552, 2407, 2552, 2553, 2407, 2407,
-     2407, 2553, 2407, 2407, 2554, 2407, 2554, 2555, 2407, 2407,
-     2407, 2407, 2407, 2555, 2407, 2407, 2555, 2555, 2555, 2407,
-     2556, 2407, 2556, 2407, 2557, 2557, 2557, 2407, 2558, 2407,
-
-     2558, 2407, 2407, 2407, 2559, 2407, 2560, 2407, 2560, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2561, 2561, 2561, 2407,
-     2407, 2407, 2561, 2561, 2407, 2562, 2407, 2562, 2563, 2563,
-     2563, 2563, 2407, 2407, 2407, 2563, 2407, 2407, 2407, 2407,
-     2407, 2563, 2563, 2563, 2563, 2563, 2563, 2407, 2564, 2407,
-     2564, 2565, 2565, 2565, 2565, 2407, 2407, 2407, 2407, 2407,
-     2565, 2565, 2407, 2566, 2407, 2566, 2567, 2407, 2407, 2407,
-     2407, 2568, 2407, 2568, 2569, 2407, 2407, 2407, 2569, 2569,
-     2569, 2407, 2570, 2407, 2570, 2407, 2407, 2407, 2407, 2571,
-     2407, 2572, 2407, 2572, 2407, 2407, 2407, 2573, 2573, 2407,
-
-     2407, 2573, 2407, 2574, 2407, 2574, 2575, 2407, 2407, 2407,
-     2407, 2576, 2407, 2576, 2407, 2407, 2577, 2577, 2407, 2407,
-     2407, 2578, 2407, 2578, 2579, 2579, 2579, 2579, 2407, 2580,
-     2407, 2580, 2407, 2581, 2407, 2582, 2407, 2582, 2407, 2407,
-     2407, 2407, 2583, 2407, 2583, 2407, 2407, 2407, 2584, 2407,
-     2585, 2407, 2585, 2586, 2587, 2407, 2407, 2407, 2407, 2407,
-     2588, 2589, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2590, 2407, 2407, 2591,
-     2407, 2592, 2593, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2593, 2407, 2407, 2593, 2594, 2407, 2595, 2407, 2407,
-     2595, 2596, 2597, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2598, 2598, 2407, 2407, 2598, 2598, 2599, 2600,
-     2600, 2600, 2600, 2407, 2407, 2407, 2407, 2407, 2600, 2600,
-     2600, 2600, 2600, 2600, 2601, 2602, 2602, 2602, 2602, 2407,
-     2407, 2407, 2602, 2602, 2603, 2604, 2605, 2606, 2606, 2606,
-     2606, 2607, 2407, 2407, 2407, 2407, 2407, 2407, 2608, 2609,
-     2407, 2407, 2407, 2407, 2610, 2610, 2407, 2407, 2407, 2610,
-     2611, 2612, 2613, 2407, 2407, 2407, 2614, 2614, 2407, 2407,
-     2407, 2615, 2616, 2407, 2407, 2616, 2616, 2617, 2407, 2618,
-
-     2619, 2620, 2621, 2622, 2623, 2624, 2624, 2407, 2624, 2407,
-     2407, 2407, 2625, 2626, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2627, 2407, 2407, 2407, 2628, 2407, 2629, 2630, 2407, 2407,
-     2407, 2630, 2407, 2407, 2407, 2630, 2631, 2407, 2632, 2407,
-     2407, 2407, 2407, 2407, 2633, 2634, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2635, 2635, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2635, 2636, 2637, 2407, 2407, 2637, 2637, 2407,
-     2407, 2407, 2407, 2407, 2637, 2637, 2637, 2637, 2637, 2638,
-
-     2639, 2407, 2407, 2639, 2639, 2407, 2407, 2639, 2640, 2641,
-     2642, 2643, 2643, 2643, 2407, 2407, 2643, 2644, 2645, 2646,
-     2407, 2647, 2647, 2647, 2648, 2649, 2650, 2651, 2651, 2652,
-     2653, 2407, 2407, 2407, 2653, 2653, 2654, 2407, 2407, 2407,
-     2655, 2656, 2407, 2407, 2657, 2658, 2659, 2659, 2407, 2407,
-     2660, 2661, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2662, 2663, 2407, 2664, 2665, 2665, 2665,
-     2666, 2667, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2668, 2669, 2407, 2407, 2407, 2407, 2670,
-
-     2670, 2407, 2407, 2407, 2407, 2407, 2407, 2670, 2407, 2407,
-     2671, 2407, 2407, 2407, 2407, 2407, 2671, 2407, 2407, 2407,
-     2407, 2407, 2671, 2671, 2671, 2407, 2407, 2672, 2673, 2407,
-     2407, 2407, 2407, 2407, 2673, 2407, 2407, 2407, 2673, 2407,
-     2407, 2674, 2675, 2676, 2676, 2676, 2407, 2407, 2407, 2676,
-     2407, 2407, 2677, 2678, 2407, 2407, 2407, 2407, 2407, 2679,
-     2680, 2681, 2682, 2407, 2407, 2407, 2407, 2683, 2684, 2684,
-     2684, 2685, 2407, 2407, 2407, 2407, 2686, 2687, 2407, 2407,
-     2407, 2407, 2407, 2688, 2689, 2689, 2407, 2407, 2407, 2690,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2691, 2692,
-     2407, 2407, 2407, 2693, 2407, 2407, 2693, 2694, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2668, 2407, 2407, 2407, 2407, 2407, 2670, 2670, 2407, 2407,
-     2670, 2671, 2407, 2407, 2407, 2671, 2407, 2407, 2407, 2407,
-     2407, 2671, 2671, 2407, 2407, 2407, 2672, 2673, 2407, 2407,
-     2407, 2673, 2673, 2674, 2675, 2676, 2407, 2407, 2676, 2676,
-     2407, 2407, 2676, 2677, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2679, 2680, 2681, 2682, 2407, 2407, 2407,
-     2407, 2407, 2407, 2683, 2684, 2684, 2684, 2685, 2407, 2686,
-
-     2687, 2688, 2689, 2689, 2407, 2407, 2407, 2407, 2690, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2691, 2692, 2407, 2693, 2407, 2407, 2407, 2693,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2668, 2407, 2407, 2407, 2407,
-     2407, 2670, 2670, 2407, 2407, 2407, 2407, 2670, 2671, 2671,
-     2407, 2407, 2407, 2671, 2671, 2672, 2673, 2673, 2673, 2674,
-     2407, 2407, 2676, 2407, 2407, 2407, 2676, 2676, 2407, 2407,
-     2407, 2407, 2676, 2677, 2407, 2679, 2680, 2681, 2682, 2683,
-     2407, 2407, 2684, 2684, 2685, 2407, 2686, 2407, 2407, 2688,
-
-     2689, 2689, 2407, 2690, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2692, 2407, 2407, 2693, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2668, 2407, 2670, 2670,
-     2407, 2407, 2407, 2407, 2670, 2671, 2671, 2671, 2671, 2407,
-     2407, 2673, 2673, 2673, 2674, 2407, 2407, 2676, 2676, 2676,
-     2407, 2407, 2407, 2407, 2676, 2677, 2407, 2679, 2407, 2407,
-     2407, 2407, 2682, 2683, 2407, 2407, 2407, 2407, 2407, 2684,
-     2407, 2407, 2407, 2686, 2688, 2689, 2689, 2407, 2407, 2407,
-     2407, 2407, 2692, 2407, 2407, 2407, 2693, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2668, 2407, 2670,
-
-     2670, 2407, 2407, 2407, 2407, 2671, 2671, 2671, 2407, 2407,
-     2673, 2673, 2407, 2407, 2674, 2407, 2407, 2407, 2676, 2676,
-     2676, 2407, 2407, 2407, 2407, 2677, 2679, 2407, 2407, 2407,
-     2407, 2407, 2683, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2688, 2689, 2689, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2693, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2668, 2407, 2670, 2407, 2407,
-     2407, 2407, 2407, 2671, 2671, 2671, 2407, 2407, 2407, 2673,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2676, 2676, 2676,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2683, 2407, 2407, 2407, 2688, 2689, 2689,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2693, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2668, 2407, 2407, 2407, 2670, 2407, 2407,
-     2407, 2671, 2671, 2671, 2673, 2407, 2407, 2407, 2407, 2407,
-     2407, 2676, 2407, 2407, 2676, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2683, 2688, 2689,
-     2689, 2689, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2668, 2407, 2407, 2407, 2670, 2671, 2671, 2671,
-
-     2673, 2676, 2407, 2407, 2407, 2676, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2688, 2689, 2689, 2689, 2695, 2696, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2668, 2670, 2671,
-     2671, 2407, 2407, 2673, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2688, 2689, 2697, 2698, 2695, 2696, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2670, 2671, 2671, 2407, 2407, 2407, 2673, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2688, 2697, 2689,
-     2699, 2698, 2700, 2689, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2670, 2671, 2671, 2407, 2407, 2407, 2407, 2673,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2688, 2699,
-     2407, 2700, 2689, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2688, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2688, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2688, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2688, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2688, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2688, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2688, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2688, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2688, 2688, 2407, 2407, 2407, 2407, 2407, 2407, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-
-     2688, 2688, 2688, 2688, 2688, 2407,    0, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407
-
+     2421, 2421, 2422, 2422, 2422, 2422, 2423, 2423, 2424, 2424,
+     2425, 2425, 2426, 2426, 2426, 2426, 2427, 2427, 2421, 2421,
+     2428, 2428, 2429, 2429, 2429, 2429, 2421, 2421, 2429, 2429,
+     2429, 2429, 2421, 2421, 2429, 2429, 2421, 2421, 2429, 2429,
+     2429, 2429, 2430, 2430, 2431, 2431, 2432, 2432, 2426, 2426,
+     2433, 2433, 2434, 2434, 2421, 2421, 2434, 2434, 2434, 2434,
+     2435, 2435, 2436, 2436, 2437, 2437, 2438, 2438, 2438, 2438,
+     2421, 2421, 2438, 2438, 2438, 2438, 2421, 2421, 2438, 2438,
+     2421, 2421, 2438, 2438, 2438, 2438, 2421, 2421, 2438, 2438,
+     2421, 2421, 2438, 2438, 2438, 2438, 2439, 2439, 2440, 2440,
+
+     2421, 2421, 2440, 2440, 2440, 2440, 2420,  107, 2441, 2441,
+     2420,  111, 2442, 2442, 2443, 2443, 2444, 2444, 2445, 2445,
+     2446, 2446, 2421, 2421, 2446, 2446, 2446, 2446, 2447, 2447,
+     2448, 2448, 2421, 2421, 2448, 2448, 2448, 2448, 2449, 2449,
+     2450, 2450, 2421, 2421, 2450, 2450, 2450, 2450, 2451, 2451,
+     2452, 2452, 2453, 2453, 2454, 2454, 2421, 2421, 2454, 2454,
+     2454, 2454, 2455, 2455, 2456, 2456, 2421, 2421, 2456, 2456,
+     2456, 2456, 2457, 2457, 2458, 2458, 2459, 2459, 2460, 2460,
+     2421, 2421, 2460, 2460, 2460, 2460, 2461, 2461, 2462, 2462,
+     2421, 2421, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2463, 2420, 2420, 2463, 2420, 2420, 2420,
+      230,  230,  230,  230,  233,  233, 2420, 2420, 2420, 2464,
+     2420, 2420, 2464, 2420, 2420, 2420, 2420, 2420, 2420, 2465,
+     2420, 2420, 2465, 2465, 2465, 2420, 2420, 2420, 2420, 2420,
+     2466, 2420, 2420, 2466, 2466, 2466, 2466, 2466, 2420, 2420,
+      233,  271,  271, 2420, 2420, 2420, 2467, 2420, 2420, 2467,
+     2467, 2467, 2420, 2420, 2420, 2420, 2420, 2420, 2468, 2420,
+     2420, 2468, 2468, 2420, 2420,  234,  271,  234,  296,  297,
+
+      297,  297,  297,  303,  304,  303,  303, 2420, 2420, 2420,
+     2469, 2420, 2420, 2469, 2469, 2469, 2469, 2469, 2420, 2420,
+      271,  271, 2420, 2420, 2420, 2470, 2420, 2420, 2470, 2470,
+     2470, 2470, 2470, 2470, 2470, 2470, 2420, 2420, 2420, 2420,
+     2420, 2420, 2471, 2420, 2420, 2471, 2471, 2471, 2471, 2471,
+     2471, 2471, 2420, 2420, 2420, 2420, 2420, 2420, 2472, 2420,
+     2420, 2472, 2472, 2420, 2420, 2420, 2420, 2420, 2420, 2473,
+     2420, 2420, 2473, 2473, 2473, 2473, 2420, 2420,  271,  271,
+     2420, 2420, 2420, 2474, 2420, 2420, 2474, 2474, 2420, 2420,
+      271,  391,  391, 2420, 2420, 2420, 2475, 2420, 2420, 2475,
+
+     2475, 2475, 2420, 2420,  391,  391, 2420, 2420, 2420, 2476,
+     2420, 2420, 2476, 2476, 2420, 2420, 2420, 2420, 2420, 2420,
+     2477, 2420, 2420, 2477, 2477, 2477, 2420, 2420,  391,  391,
+     2420, 2420, 2420, 2478, 2420, 2420, 2478, 2478, 2478, 2478,
+     2420, 2420,  271,  271,  271, 2420, 2420, 2420, 2479, 2420,
+     2420, 2479, 2420, 2420, 2420, 2420, 2420, 2420, 2480, 2420,
+     2420, 2480, 2420, 2420,  271,  271, 2420, 2420, 2420, 2481,
+     2420, 2420, 2481, 2481, 2420, 2420, 2420, 2420, 2482, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2483, 2483, 2484, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2485, 2485,
+     2486, 2420, 2487, 2487, 2487, 2487, 2420, 2488, 2420, 2420,
+     2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2490,
+     2420, 2420, 2491, 2491, 2491, 2491, 2492, 2420, 2493, 2493,
+     2493, 2494, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2495, 2495, 2495, 2495, 2495, 2495, 2496, 2420, 2497,
+     2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
+     2497, 2497, 2497, 2498, 2420, 2499, 2499, 2499, 2499, 2499,
+     2499, 2499, 2499, 2500, 2420, 2501, 2501, 2501, 2502, 2420,
+
+     2503, 2503, 2503, 2503, 2503, 2503, 2504, 2420, 2505, 2505,
+     2505, 2505, 2506, 2420, 2420, 2507, 2507, 2507, 2507, 2507,
+     2508, 2420, 2509, 2509, 2509, 2510, 2420, 2511, 2511, 2511,
+     2511, 2512, 2420, 2513, 2513, 2513, 2513, 2513, 2514, 2420,
+     2420, 2515, 2515, 2516, 2420, 2517, 2517, 2518, 2420, 2519,
+     2519, 2519, 2520, 2521, 2420, 2521, 2420, 2420, 2420, 2522,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2523, 2524, 2524,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2525, 2526, 2526, 2527, 2420, 2420, 2527, 2420,
+
+     2528, 2528, 2420, 2529, 2420, 2420, 2529, 2529, 2529, 2529,
+     2529, 2529, 2530, 2530, 2420, 2531, 2531, 2531, 2532, 2532,
+     2420, 2420, 2533, 2534, 2534, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2535, 2535, 2535, 2420, 2420, 2535, 2535,
+     2536, 2536, 2537, 2537, 2420, 2420, 2537, 2420, 2420, 2537,
+     2537, 2537, 2537, 2537, 2537, 2537, 2537, 2538, 2538, 2539,
+     2539, 2539, 2420, 2420, 2539, 2539, 2539, 2540, 2540, 2541,
+     2420, 2420, 2542, 2542, 2543, 2420, 2420, 2543, 2543, 2543,
+     2544, 2544, 2545, 2545, 2545, 2546, 2546, 2420, 2547, 2547,
+     2547, 2547, 2548, 2548, 2549, 2420, 2420, 2550, 2550, 2551,
+
+     2551, 2551, 2552, 2552, 2553, 2553, 2553, 2553, 2554, 2554,
+     2420, 2555, 2556, 2556, 2420, 2420, 2557, 2557, 2420, 2420,
+     2558, 2559, 2559, 2560, 2420, 2420, 2560, 2420, 2420, 2561,
+     2420, 2420, 2420, 2420, 2420, 2420, 2562, 2420, 2563, 2420,
+     2563, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2564, 2420, 2565, 2420, 2565, 2566,
+     2420, 2420, 2420, 2566, 2420, 2420, 2567, 2420, 2567, 2568,
+     2420, 2420, 2420, 2420, 2420, 2568, 2420, 2420, 2568, 2568,
+     2568, 2420, 2569, 2420, 2569, 2420, 2570, 2570, 2570, 2420,
+
+     2571, 2420, 2571, 2420, 2420, 2420, 2572, 2420, 2573, 2420,
+     2573, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2574, 2574,
+     2574, 2420, 2420, 2420, 2574, 2574, 2420, 2575, 2420, 2575,
+     2576, 2576, 2576, 2576, 2420, 2420, 2420, 2576, 2420, 2420,
+     2420, 2420, 2420, 2576, 2576, 2576, 2576, 2576, 2576, 2576,
+     2420, 2577, 2420, 2577, 2578, 2578, 2578, 2578, 2420, 2420,
+     2420, 2420, 2420, 2578, 2578, 2420, 2579, 2420, 2579, 2580,
+     2420, 2420, 2420, 2420, 2581, 2420, 2581, 2582, 2420, 2420,
+     2420, 2582, 2582, 2582, 2420, 2583, 2420, 2583, 2420, 2420,
+     2420, 2420, 2584, 2420, 2585, 2420, 2585, 2420, 2420, 2420,
+
+     2586, 2586, 2420, 2420, 2586, 2420, 2587, 2420, 2587, 2588,
+     2420, 2420, 2420, 2420, 2589, 2420, 2589, 2420, 2420, 2590,
+     2590, 2420, 2420, 2420, 2591, 2420, 2591, 2592, 2592, 2592,
+     2592, 2420, 2593, 2420, 2593, 2420, 2594, 2420, 2595, 2420,
+     2595, 2420, 2420, 2420, 2420, 2596, 2420, 2596, 2420, 2420,
+     2420, 2597, 2420, 2598, 2420, 2598, 2599, 2600, 2420, 2420,
+     2420, 2420, 2420, 2601, 2602, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2603,
+     2420, 2420, 2604, 2420, 2605, 2606, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2606, 2420, 2420, 2606, 2607, 2420,
+     2608, 2420, 2420, 2608, 2609, 2610, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2611, 2611, 2420, 2420, 2611,
+     2611, 2612, 2613, 2613, 2613, 2613, 2420, 2420, 2420, 2420,
+     2420, 2613, 2613, 2613, 2613, 2613, 2613, 2613, 2614, 2615,
+     2615, 2615, 2615, 2420, 2420, 2420, 2615, 2615, 2616, 2617,
+     2618, 2619, 2619, 2619, 2619, 2620, 2420, 2420, 2420, 2420,
+     2420, 2420, 2621, 2622, 2420, 2420, 2420, 2420, 2623, 2623,
+     2420, 2420, 2420, 2623, 2624, 2625, 2626, 2420, 2420, 2420,
+     2627, 2627, 2420, 2420, 2420, 2628, 2629, 2420, 2420, 2629,
+
+     2629, 2630, 2420, 2631, 2632, 2633, 2634, 2635, 2636, 2637,
+     2637, 2420, 2637, 2420, 2420, 2420, 2638, 2639, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2640, 2420, 2420, 2420, 2641, 2420,
+     2642, 2643, 2420, 2420, 2420, 2643, 2420, 2420, 2420, 2643,
+     2644, 2420, 2645, 2420, 2420, 2420, 2420, 2420, 2646, 2647,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2648, 2648, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2648, 2649, 2650, 2420,
+     2420, 2650, 2650, 2420, 2420, 2420, 2420, 2420, 2650, 2650,
+
+     2650, 2650, 2650, 2650, 2651, 2652, 2420, 2420, 2652, 2652,
+     2420, 2420, 2652, 2653, 2654, 2655, 2656, 2656, 2656, 2420,
+     2420, 2656, 2657, 2658, 2659, 2420, 2660, 2660, 2660, 2661,
+     2662, 2663, 2664, 2664, 2665, 2666, 2420, 2420, 2420, 2666,
+     2666, 2667, 2420, 2420, 2420, 2668, 2669, 2420, 2420, 2670,
+     2671, 2672, 2672, 2420, 2420, 2673, 2674, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2675, 2676,
+     2420, 2677, 2678, 2678, 2678, 2679, 2680, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2681, 2682,
+
+     2420, 2420, 2420, 2420, 2683, 2683, 2420, 2420, 2420, 2420,
+     2420, 2420, 2683, 2420, 2420, 2684, 2420, 2420, 2420, 2420,
+     2420, 2684, 2420, 2420, 2420, 2420, 2420, 2684, 2684, 2684,
+     2684, 2420, 2420, 2685, 2686, 2420, 2420, 2420, 2420, 2420,
+     2686, 2420, 2420, 2420, 2686, 2420, 2420, 2687, 2688, 2689,
+     2689, 2689, 2420, 2420, 2420, 2689, 2420, 2420, 2690, 2691,
+     2420, 2420, 2420, 2420, 2420, 2692, 2693, 2694, 2695, 2420,
+     2420, 2420, 2420, 2696, 2697, 2697, 2697, 2698, 2420, 2420,
+     2420, 2420, 2699, 2700, 2420, 2420, 2420, 2420, 2420, 2701,
+     2702, 2702, 2420, 2420, 2420, 2703, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2704, 2705, 2420, 2420, 2420, 2706,
+     2420, 2420, 2706, 2707, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2681, 2420, 2420, 2420,
+     2420, 2420, 2683, 2683, 2420, 2420, 2683, 2684, 2420, 2420,
+     2420, 2684, 2420, 2420, 2420, 2420, 2420, 2684, 2684, 2684,
+     2420, 2420, 2420, 2685, 2686, 2420, 2420, 2420, 2686, 2686,
+     2687, 2688, 2689, 2420, 2420, 2689, 2689, 2420, 2420, 2689,
+     2690, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2692, 2693, 2694, 2695, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2696, 2697, 2697, 2697, 2698, 2420, 2699, 2700, 2701, 2702,
+     2702, 2420, 2420, 2420, 2420, 2703, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2704,
+     2705, 2420, 2706, 2420, 2420, 2420, 2706, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2681, 2420, 2420, 2420, 2420, 2420, 2683, 2683,
+     2420, 2420, 2420, 2420, 2683, 2684, 2684, 2420, 2420, 2420,
+     2684, 2684, 2684, 2685, 2686, 2686, 2686, 2687, 2420, 2420,
+     2689, 2420, 2420, 2420, 2689, 2689, 2420, 2420, 2420, 2420,
+     2689, 2690, 2420, 2692, 2693, 2694, 2695, 2696, 2420, 2420,
+
+     2697, 2697, 2698, 2420, 2699, 2420, 2420, 2701, 2702, 2702,
+     2420, 2703, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2705, 2420, 2420, 2706, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2681, 2420, 2683, 2683, 2420, 2420,
+     2420, 2420, 2683, 2684, 2684, 2420, 2420, 2684, 2684, 2420,
+     2420, 2686, 2686, 2686, 2687, 2420, 2420, 2689, 2689, 2689,
+     2420, 2420, 2420, 2420, 2689, 2690, 2420, 2692, 2420, 2420,
+     2420, 2420, 2695, 2696, 2420, 2420, 2420, 2420, 2420, 2697,
+     2420, 2420, 2420, 2699, 2701, 2702, 2702, 2420, 2420, 2420,
+     2420, 2420, 2705, 2420, 2420, 2420, 2706, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2681, 2420, 2683,
+     2683, 2420, 2420, 2420, 2420, 2684, 2684, 2420, 2420, 2420,
+     2684, 2420, 2420, 2686, 2686, 2420, 2420, 2687, 2420, 2420,
+     2420, 2689, 2689, 2689, 2420, 2420, 2420, 2420, 2690, 2692,
+     2420, 2420, 2420, 2420, 2420, 2696, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2701, 2702, 2702, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2706, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2681, 2420,
+     2683, 2420, 2420, 2420, 2420, 2420, 2684, 2684, 2684, 2420,
+     2420, 2420, 2686, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2689, 2689, 2689, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2696, 2420, 2420, 2420,
+     2701, 2702, 2702, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2706, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2681, 2420, 2420, 2420,
+     2683, 2420, 2420, 2420, 2684, 2684, 2684, 2686, 2420, 2420,
+     2420, 2420, 2420, 2420, 2689, 2420, 2420, 2689, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2696, 2701, 2702, 2702, 2702, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2681, 2420, 2420, 2420, 2683,
+     2684, 2684, 2684, 2686, 2689, 2420, 2420, 2420, 2689, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2701, 2702, 2702, 2702, 2708,
+     2709, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2681, 2683, 2684, 2684, 2420, 2420, 2686, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2701, 2702, 2710, 2711, 2708, 2709, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2683, 2684, 2684, 2420, 2420,
+     2420, 2686, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2701, 2710, 2702, 2712, 2711, 2713, 2702, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2683, 2684, 2684, 2420, 2420,
+     2420, 2420, 2686, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2701, 2712, 2420, 2713, 2702, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2701, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2701, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2701, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2701,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2701, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2701, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2701, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2701, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2701, 2701, 2420, 2420, 2420, 2420,
+     2420, 2420, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2420,    0,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420
     } ;
 
-static yyconst flex_int16_t yy_nxt[8116] =
+static yyconst flex_int16_t yy_nxt[8134] =
     {   0,
-     2407,  196,  197,  196,  196,  197,  196,  196,  197,  196,
+     2420,  196,  197,  196,  196,  197,  196,  196,  197,  196,
       196,  197,  196,  201,  197,  201,  207,  198,  204,  207,
-      198,  204, 2407,  199, 2407,  205,  199, 2407,  205,  202,
+      198,  204, 2420,  199, 2420,  205,  199, 2420,  205,  202,
       201,  197,  201,  479,  208,  210,  211,  208,  210,  211,
       212,  213,  540,  212,  213,  479,  202,  217,  218,  480,
       214,  210,  211,  214,  215,  482,  212,  210,  211,  512,
       215,  481,  212,  217,  218,  513,  214,  197,  197,  197,
       552,  481,  214,  197,  197,  197,  229,  197,  229,  229,
-      197,  229,  678,  220,  229,  197,  229,  512,  679,  220,
-      502,  219,  230,  541,  680,  230,  478,  478,  478,  509,
+      197,  229,  679,  220,  229,  197,  229,  512,  680,  220,
+      502,  219,  230,  541,  681,  230,  478,  478,  478,  509,
 
       231,  478,  478,  478,  478,  478,  478,  219,  221,  222,
       197,  222,  221,  221,  221,  221,  221,  221,  221,  223,
       221,  221,  221,  557,  221,  225,  221,  226,  221,  229,
       197,  229,  197,  197,  197,  197,  197,  197,  508,  229,
-      197,  229,  229,  197,  229,  231, 2407, 1546,  232,  482,
+      197,  229,  229,  197,  229,  231, 2420, 1545,  232,  482,
       482,  232,  509,  221,  221,  230,  510,  482,  230,  229,
       197,  229,  478,  478,  478,  481,  481,  478,  478,  478,
-      478,  478,  478,  481, 1552,  233,  227,  221,  222,  197,
+      478,  478,  478,  481, 1546,  233,  227,  221,  222,  197,
       222,  221,  221,  221,  221,  221,  221,  221,  223,  221,
       221,  221,  568,  221,  225,  221,  226,  221,  229,  197,
 
       229,  197,  197,  197,  197,  197,  197,  493,  229,  197,
-      229,  229,  197,  229,  233, 2407,  509,  234,  514, 1553,
-      234,  606,  221,  221,  231,  510,  510,  231,  197,  197,
+      229,  229,  197,  229,  233, 2420,  509,  234,  514, 1547,
+      234,  607,  221,  221,  231,  510,  510,  231,  197,  197,
       197,  197,  197,  197,  229,  197,  229,  229,  197,  229,
       229,  197,  229,  513,  235,  227,  577,  235,  482,  578,
-      233, 2407,  482,  233,  511,  515,  236,  229,  197,  229,
-      512,  478,  478,  478,  481, 2407,  513,  516,  481,  509,
+      233, 2420,  482,  233,  511,  515,  236,  229,  197,  229,
+      512,  478,  478,  478,  481, 2420,  513,  516,  481,  509,
       514,  514,  513,  236,  237,  238,  197,  238,  237,  237,
       237,  237,  237,  237,  237,  239,  237,  237,  237,  500,
       237,  241,  237,  242,  237,  245,  197,  245,  245,  197,
 
-      245,  270,  197,  270,  508,  534, 1558,  210,  211,  535,
-      482,  246,  212,  536,  246,  638,  517,  271,  509,  237,
-      237,  638,  256,  478,  478,  478,  481,  243,  237,  238,
+      245,  270,  197,  270,  508,  534, 1548,  210,  211,  535,
+      482,  246,  212,  536,  246,  639,  517,  271,  509,  237,
+      237,  639,  256,  478,  478,  478,  481,  243,  237,  238,
       197,  238,  237,  237,  237,  237,  237,  237,  237,  239,
-      237,  237,  237,  610,  237,  241,  237,  242,  237,  572,
-      611,  257,  639,  210,  211,  270,  197,  270,  212,  197,
+      237,  237,  237,  611,  237,  241,  237,  242,  237,  572,
+      612,  257,  640,  210,  211,  270,  197,  270,  212,  197,
       197,  197,  197,  197,  197,  478,  478,  478,  256,  573,
-      618,  271,  513,  237,  237,  272,  660,  619,  272,  661,
-     1562,  243,  247,  248,  197,  248,  247,  247,  247,  247,
+      619,  271,  513,  237,  237,  272,  661,  620,  272,  662,
+     1552,  243,  247,  248,  197,  248,  247,  247,  247,  247,
       247,  247,  247,  249,  247,  247,  247,  257,  247,  251,
 
       247,  252,  247,  270,  197,  270,  270,  197,  270,  270,
       197,  270,  538,  270,  197,  270,  284,  197,  284,  271,
       482,  482,  271,  482,  527,  273,  539,  247,  247,  273,
-      521,  528,  285, 1563, 1208,  253,  481,  481,  254,  481,
+      521,  528,  285, 1558, 1559,  253,  481,  481,  254,  481,
       481,  478,  478,  478,  255,  247,  248,  197,  248,  247,
       247,  247,  247,  247,  247,  247,  249,  247,  247,  247,
-     2407,  247,  251,  247,  252,  247,  284,  197,  284,  295,
-      197,  295,  295,  197,  295, 1485,  295,  197,  295,  295,
-      197,  295,  285,  482,  482,  296,  482,  482,  296, 1564,
-      247,  247,  297,  547,  580,  297, 1566,  639,  253,  481,
+      655,  247,  251,  247,  252,  247,  284,  197,  284,  295,
+      197,  295,  295,  197,  295,  656,  295,  197,  295,  295,
+      197,  295,  285,  482,  579,  296,  482,  482,  296,  605,
+      247,  247,  297,  547,  581,  297, 1560,  580,  253,  481,
 
-      481,  254,  481,  481,  487,  581,  582,  255,  258,  259,
+      606,  254,  481,  481,  487,  582,  583,  255,  258,  259,
       197,  259,  258,  258,  258,  258,  258,  258,  258,  260,
-      258,  258,  258,  654,  258,  262,  258,  263,  258,  197,
-      197,  197,  197,  197,  197,  295,  197,  295,  604,  295,
-      197,  295,  295,  197,  295,  298,  488,  482,  298,  605,
-      482,  299,  489,  258,  258,  299,  490,  583,  300,  699,
-     1570,  491,  264,  481,  265,  620,  481,  266,  478,  478,
-      478,  631,  267,  268,  258,  259,  197,  259,  258,  258,
-      258,  258,  258,  258,  258,  260,  258,  258,  258, 1571,
+      258,  258,  258, 2420,  258,  262,  258,  263,  258,  197,
+      197,  197,  197,  197,  197,  295,  197,  295,  648,  295,
+      197,  295,  295,  197,  295,  298,  488,  482,  298,  482,
+      482,  299,  489,  258,  258,  299,  490,  584,  300, 1565,
+      640,  491,  264,  481,  265,  481,  481,  266,  478,  478,
+      478,  621,  267,  268,  258,  259,  197,  259,  258,  258,
+      258,  258,  258,  258,  258,  260,  258,  258,  258,  513,
       258,  262,  258,  263,  258,  295,  197,  295,  197,  197,
 
-      197,  197,  197,  197,  647,  295,  197,  295,  295,  197,
-      295,  300,  504,  482,  301,  482,  482,  301,  504,  258,
-      258,  297,  593,  598,  297,  478,  478,  478,  264,  481,
-      265,  481,  481,  266,  478,  478,  478,  612,  267,  268,
+      197,  197,  197,  197, 1529,  295,  197,  295,  295,  197,
+      295,  300, 1530,  482,  301,  482,  482,  301,  504,  258,
+      258,  297,  594,  599,  297,  478,  478,  478,  264,  481,
+      265,  481,  481,  266,  478,  478,  478,  613,  267,  268,
       274,  275,  197,  275,  274,  274,  274,  274,  274,  274,
-      274,  276,  274,  274,  274,  513,  274,  278,  274,  279,
+      274,  276,  274,  274,  274,  655,  274,  278,  274,  279,
       274,  197,  197,  197,  197,  197,  197,  295,  197,  295,
-     1572,  295,  197,  295,  295,  197,  295,  302,  681,  673,
-      302,  654,  674,  300,  613,  274,  274,  300,  513, 1073,
-      303,  682,  280,  478,  478,  478,  655,  281,  478,  478,
+     1569,  295,  197,  295,  295,  197,  295,  302,  674,  674,
+      302,  675,  685,  300,  614,  274,  274,  300,  513,  482,
+      303,  700,  280,  478,  478,  478, 1570,  281,  478,  478,
 
-      478, 1074, 2407,  478,  478,  478,  282,  274,  275,  197,
+      478,  478,  478,  478,  632,  481,  282,  274,  275,  197,
       275,  274,  274,  274,  274,  274,  274,  274,  276,  274,
-      274,  274, 1573,  274,  278,  274,  279,  274,  295,  197,
-      295,  197,  197,  197,  197,  197,  197,  823,  295,  197,
-      295,  295,  197,  295,  303,  673,  555,  304,  684,  556,
-      304, 1574,  274,  274,  305,  560,  482,  305,  685,  280,
-      687,  510, 1346,  674,  281,  478,  478,  478,  478,  478,
-      478,  682,  481,  282,  286,  287,  197,  287,  286,  286,
+      274,  274, 1571,  274,  278,  274,  279,  274,  295,  197,
+      295,  197,  197,  197,  197,  197,  197, 1076,  295,  197,
+      295,  295,  197,  295,  303,  682,  482,  304, 1086, 1077,
+      304,  504,  274,  274,  305,  482,  482,  305,  683,  280,
+     1077,  510,  481,  626,  281,  478,  478,  478,  478,  478,
+      478,  481,  481,  282,  286,  287,  197,  287,  286,  286,
       286,  286,  286,  286,  286,  288,  286,  286,  286,  500,
       286,  290,  286,  291,  286,  197,  197,  197,  197,  197,
 
       197,  295,  197,  295,  559,  295,  197,  295,  295,  197,
-      295,  306,  482,  482,  306,  687, 1577,  303,  684,  286,
-      286,  303, 1584, 1586,  307,  478,  478,  478,  481,  481,
-      292,  478,  478,  478,  478,  478,  478,  823,  293,  286,
+      295,  306,  482,  482,  306,  688, 1573,  303,  675,  286,
+      286,  303, 1577, 1578,  307,  478,  478,  478,  481,  481,
+      292,  478,  478,  478,  478,  478,  478,  825,  293,  286,
       287,  197,  287,  286,  286,  286,  286,  286,  286,  286,
-      288,  286,  286,  286, 1484,  286,  290,  286,  291,  286,
-      295,  197,  295,  320,  197,  320,  320,  197,  320, 1083,
+      288,  286,  286,  286, 1490,  286,  290,  286,  291,  286,
+      295,  197,  295,  320,  197,  320,  320,  197,  320, 1086,
       197,  197,  197,  197,  197,  197,  307,  482,  482,  321,
-      734, 1074,  321,  735,  286,  286,  272, 1595, 1596,  272,
+      688, 1110,  321,  685,  286,  286,  272, 1579, 1580,  272,
       478,  478,  478,  481,  481,  292,  478,  478,  478,  478,
 
-      478,  478, 1597,  293,  308,  309,  197,  309,  308,  308,
-      308,  308,  308,  308,  308,  310,  308,  308,  308, 1599,
+      478,  478, 1581,  293,  308,  309,  197,  309,  308,  308,
+      308,  308,  308,  308,  308,  310,  308,  308,  308, 1584,
       308,  312,  308,  313,  308,  320,  197,  320,  320,  197,
-      320,  320,  197,  320, 1083,  320,  197,  320,  478,  478,
-      478,  321,  482,  482,  321,  823, 1107,  322,  823,  308,
-      308,  322,  314, 1605,  315,  478,  478,  478,  481,  481,
-      316,  478,  478,  478,  825, 1205,  317, 1208, 1611,  318,
+      320,  320,  197,  320, 1591,  320,  197,  320,  478,  478,
+      478,  321,  825,  735,  321,  686,  736,  322,  825,  308,
+      308,  322,  314,  690,  315,  478,  478,  478,  683,  680,
+      316, 2420,  478,  478,  478,  691,  317, 1351, 1209,  318,
       308,  309,  197,  309,  308,  308,  308,  308,  308,  308,
-      308,  310,  308,  308,  308, 1208,  308,  312,  308,  313,
+      308,  310,  308,  308,  308, 1593,  308,  312,  308,  313,
       308,  338,  197,  338,  338,  197,  338,  354,  197,  354,
 
-     1486,  354,  197,  354,  478,  478,  478,  339,  823,  953,
-      339,  685, 1054,  355,  954,  308,  308,  355,  314,  689,
-      315,  478,  478,  478,  729,  679,  316,  478,  478,  478,
-     1604,  690,  317, 1612, 1615,  318,  323,  324,  197,  324,
+     1212,  354,  197,  354,  956,  555,  503,  339,  556,  957,
+      339,  686, 1602,  355,  560,  308,  308,  355,  314,  690,
+      315,  478,  478,  478,  730,  680,  316,  478,  478,  478,
+      825,  681,  317, 1492, 1057,  318,  323,  324,  197,  324,
       323,  323,  323,  323,  323,  323,  323,  325,  323,  323,
       323,  326,  323,  327,  323,  328,  323,  326,  326,  326,
       326,  326,  326,  326,  326,  326,  326,  326,  326,  326,
@@ -1459,772 +1464,774 @@ static yyconst flex_int16_t yy_nxt[8116] =
       343,  343,  343,  343,  349,  343,  350,  343,  343,  343,
       351,  343,  343,  352,  343,  343,  343,  343,  343,  343,
       356,  357,  197,  357,  356,  356,  356,  356,  356,  356,
-      356,  358,  356,  356,  356, 1616,  356,  360,  356,  361,
+      356,  358,  356,  356,  356, 1603,  356,  360,  356,  361,
 
       356,  365,  197,  365,  365,  197,  365,  378,  197,  378,
-     1523,  378,  197,  378, 1618,  482,  685,  366, 1524,  930,
-      366, 1208,  625,  379, 1622,  356,  356,  379,  931,  731,
-      362,  481,  478,  478,  478,  932,  363,  356,  357,  197,
+     1534,  378,  197,  378,  478,  478,  478,  366, 1535,  825,
+      366, 1604,  679,  379, 1606,  356,  356,  379,  680, 1612,
+      362,  478,  478,  478,  691,  827,  363,  356,  357,  197,
       357,  356,  356,  356,  356,  356,  356,  356,  358,  356,
-      356,  356, 1603,  356,  360,  356,  361,  356,  197,  197,
-      197,  197,  197,  197,  378,  197,  378, 1528,  378,  197,
-      378,  478,  478,  478,  272, 1529, 1624,  272, 1625,  689,
-      379, 1626,  356,  356,  379,  679,  823,  362,  478,  478,
-      478,  680, 1602,  363,  367,  368,  197,  368,  367,  367,
+      356,  356, 1618,  356,  360,  356,  361,  356,  197,  197,
+      197,  197,  197,  197,  378,  197,  378, 1619,  378,  197,
+      378,  478,  478,  478,  272,  825, 1622,  272, 1212,  690,
+      379, 1609,  356,  356,  379,  680, 1623,  362,  478,  478,
+      478,  715, 1212,  363,  367,  368,  197,  368,  367,  367,
 
-      367,  367,  367,  367,  367,  369,  367,  367,  367, 1630,
+      367,  367,  367,  367,  367,  369,  367,  367,  367, 1610,
       367,  371,  367,  372,  367,  378,  197,  378,  378,  197,
-      378,  390,  197,  390, 1636,  390,  197,  390,  197,  197,
-      197,  380, 1637, 1638,  380,  482,  685,  391, 1639,  367,
-      367,  391,  643,  373,  392,  478,  478,  478, 1640,  732,
+      378,  390,  197,  390, 1625,  390,  197,  390,  197,  197,
+      197,  380, 1629, 1491,  380,  482,  686,  391, 1631,  367,
+      367,  391,  644,  373,  392,  478,  478,  478, 1632,  732,
       374,  481,  375,  478,  478,  478,  478,  478,  478,  376,
       367,  368,  197,  368,  367,  367,  367,  367,  367,  367,
-      367,  369,  367,  367,  367, 1641,  367,  371,  367,  372,
+      367,  369,  367,  367,  367, 1633,  367,  371,  367,  372,
       367,  197,  197,  197,  390,  197,  390,  390,  197,  390,
-     1642,  390,  197,  390,  390,  197,  390,  392, 1643, 1644,
+     1637,  390,  197,  390,  390,  197,  390,  392, 1643, 1644,
 
-      391,  482, 1645,  391, 1651,  367,  367,  393,  652,  373,
-      393,  478,  478,  478, 1652, 1653,  374,  481,  375,  478,
+      391,  482,  686,  391, 1645,  367,  367,  393,  653,  373,
+      393,  478,  478,  478, 1646,  733,  374,  481,  375,  478,
       478,  478,  478,  478,  478,  376,  381,  382,  197,  382,
       381,  381,  381,  381,  381,  381,  381,  383,  381,  381,
-      381, 1658,  381,  385,  381,  386,  381,  404,  197,  404,
-      404,  197,  404,  197,  197,  197, 1654,  197,  197,  197,
-      404,  197,  404,  405, 1655, 1659,  405, 1656, 1660,  392,
-     1664,  381,  381,  392, 1665, 1657,  405,  387,  478,  478,
-      478,  478,  478,  478, 1667, 1668,  658,  658,  658, 1669,
-     1670,  388,  381,  382,  197,  382,  381,  381,  381,  381,
-
-      381,  381,  381,  383,  381,  381,  381, 1673,  381,  385,
+      381, 1647,  381,  385,  381,  386,  381,  404,  197,  404,
+      404,  197,  404,  197,  197,  197, 1648,  197,  197,  197,
+      404,  197,  404,  405, 1649, 1650,  405, 1651, 1652,  392,
+     1658,  381,  381,  392, 1659, 1660,  405,  387,  478,  478,
+      478,  478,  478,  478, 1665, 1212,  659,  659,  659, 1666,
+     1667,  388,  381,  382,  197,  382,  381,  381,  381,  381,
+
+      381,  381,  381,  383,  381,  381,  381, 1671,  381,  385,
       381,  386,  381,  404,  197,  404,  404,  197,  404,  404,
-      197,  404, 1677,  416,  197,  416,  416,  197,  416,  405,
-     1678, 1683,  406, 1684,  678,  406, 1685,  381,  381,  417,
-      679,  689,  417,  387,  659, 1686,  690,  679,  658,  658,
-      658, 1688,  827,  714,  840,  840,  840,  388,  394,  395,
+      197,  404, 1672,  416,  197,  416,  416,  197,  416,  405,
+     1611, 1673,  406, 1661, 1675,  406, 1676,  381,  381,  417,
+     1663, 1662,  417,  387,  660,  659,  659,  659, 1664,  829,
+      842,  842,  842,  859,  859,  859, 1677,  388,  394,  395,
       197,  395,  394,  394,  394,  394,  394,  394,  394,  396,
-      394,  394,  394, 1693,  394,  398,  394,  399,  394,  428,
-      197,  428,  428,  197,  428,  197,  197,  197, 1694,  197,
-      197,  197,  428,  197,  428,  429, 1383, 1696,  429, 1679,
-
-     1706,  392, 1384,  394,  394,  392, 1385, 1680,  429,  400,
-     1386, 1709,  401,  857,  857,  857, 1710,  841, 1713,  840,
-      840,  840, 1208,  402,  394,  395,  197,  395,  394,  394,
-      394,  394,  394,  394,  394,  396,  394,  394,  394, 1716,
+      394,  394,  394, 1678,  394,  398,  394,  399,  394,  428,
+      197,  428,  428,  197,  428,  197,  197,  197, 1681,  197,
+      197,  197,  428,  197,  428,  429, 1685, 1686,  429, 1687,
+
+     1388,  392,  932,  394,  394,  392, 1389, 1688,  429,  400,
+     1390,  933,  401,  843, 1391, 1691,  843, 1692,  934,  842,
+      842,  842, 1693,  402,  394,  395,  197,  395,  394,  394,
+      394,  394,  394,  394,  394,  396,  394,  394,  394, 1694,
       394,  398,  394,  399,  394,  428,  197,  428,  428,  197,
-      428,  428,  197,  428, 1681,  442,  197,  442,  442,  197,
-      442,  429, 1682, 1208,  430, 1717, 1718,  430, 1702,  394,
-      394,  443, 1719, 1720,  443,  400,  841, 1721,  401,  869,
-      869,  869,  910,  870, 1722, 1723,  871, 1724, 1725,  402,
+      428,  428,  197,  428, 1696,  442,  197,  442,  442,  197,
+      442,  429, 1392, 1701,  430, 1689, 1702,  430, 1393,  394,
+      394,  443, 1394, 1690,  443,  400, 1395, 1704,  401,  871,
+      871,  871,  912,  872, 1714, 1212,  873, 1212, 1717,  402,
       407,  408,  197,  408,  407,  407,  407,  407,  407,  407,
 
-      407,  409,  407,  407,  407, 1701,  407,  411,  407,  412,
+      407,  409,  407,  407,  407, 1718,  407,  411,  407,  412,
       407,  197,  197,  197,  197,  197,  197,  442,  197,  442,
-     1726,  442,  197,  442,  442,  197,  442,  444, 1728, 1729,
-      444, 1730, 1731,  443, 1732,  407,  407,  443, 1733, 1734,
-      445,  413,  840,  840,  840, 1735,  414,  407,  408,  197,
+     1721,  442,  197,  442,  442,  197,  442,  444, 1724, 1709,
+      444, 1710, 1725,  443, 1726,  407,  407,  443, 1727, 1728,
+      445,  413,  842,  842,  842, 1729,  414,  407,  408,  197,
       408,  407,  407,  407,  407,  407,  407,  407,  409,  407,
-      407,  407, 1736,  407,  411,  407,  412,  407,  442,  197,
-      442,  454,  197,  454,  454,  197,  454, 1737,  464,  197,
-      464,  464,  197,  464,  445, 1738, 1739,  455, 1742, 1743,
-      455, 1744,  407,  407,  465, 1745, 1749,  465,  413,  857,
+      407,  407, 1730,  407,  411,  407,  412,  407,  442,  197,
+      442,  454,  197,  454,  454,  197,  454, 1731,  464,  197,
+      464,  464,  197,  464,  445, 1732, 1733,  455, 1734, 1736,
+      455, 1737,  407,  407,  465, 1738, 1739,  465,  413,  859,
 
-      857,  857, 1750,  414,  418,  419,  197,  419,  418,  418,
-      418,  418,  418,  418,  418,  420,  418,  418,  418, 1751,
+      859,  859, 1740,  414,  418,  419,  197,  419,  418,  418,
+      418,  418,  418,  418,  418,  420,  418,  418,  418, 1741,
       418,  422,  418,  423,  418,  197,  197,  197,  197,  197,
-      197,  464,  197,  464, 1752,  464,  197,  464,  464,  197,
-      464,  272, 1387, 1753,  272, 1754, 1755,  465, 1388,  418,
-      418,  465, 1389, 1756,  466,  424, 1390, 1758,  425,  879,
-      879,  879,  910,  880, 1770, 1780,  881, 1781, 1782,  426,
+      197,  464,  197,  464, 1742,  464,  197,  464,  464,  197,
+      464,  272, 1743, 1744,  272, 1745, 1748,  465, 1749,  418,
+      418,  465, 1752, 1753,  466,  424, 1754, 1755,  425,  881,
+      881,  881,  912,  882, 1759, 1760,  883, 1761, 1762,  426,
       418,  419,  197,  419,  418,  418,  418,  418,  418,  418,
-      418,  420,  418,  418,  418, 1783,  418,  422,  418,  423,
+      418,  420,  418,  418,  418, 1763,  418,  422,  418,  423,
       418,  464,  197,  464,  476,  197,  476,  476,  197,  476,
 
-      696,  696,  696, 1787,  836,  836,  836,  466, 1788, 1789,
-      477, 1790, 1791,  477, 1792,  418,  418,  697, 1793,  552,
-      552,  424,  838, 1794,  425,  857,  857,  857, 1208,  553,
-      558, 1220, 1220, 1220, 1795,  426,  431,  432,  197,  432,
+      697,  697,  697, 1764,  838,  838,  838,  466, 1765, 1766,
+      477, 1768, 1780,  477, 1790,  418,  418,  698, 1791,  552,
+      552,  424,  840, 1792,  425,  859,  859,  859, 1212,  553,
+      558, 1224, 1224, 1224, 1793,  426,  431,  432,  197,  432,
       431,  431,  431,  431,  431,  431,  431,  433,  431,  431,
-      431, 1208,  431,  435,  431,  436,  431,  554,  554,  704,
-      704,  704, 1796,  555, 1797, 1777,  556,  720,  720,  720,
-     1799,  513,  557, 1800, 1801,  507,  705,  736,  736,  736,
-     1802,  431,  431, 1776,  721, 1224, 1224, 1224, 1803,  437,
-     1806,  438, 1807,  439,  737, 1222, 1222, 1222, 1227, 1227,
-
-     1227,  440,  431,  432,  197,  432,  431,  431,  431,  431,
-      431,  431,  431,  433,  431,  431,  431, 1808,  431,  435,
-      431,  436,  431,  744,  744,  744,  747,  747,  747,  761,
-      761,  761,  769,  769,  769,  774,  774,  774, 1811, 1812,
-      745, 1223, 1815,  748, 1819, 1820,  762,  431,  431,  770,
-     1821, 1822,  775, 1823, 1826,  437, 1827,  438, 1844,  439,
-     1235, 1235, 1235, 1258, 1258, 1258,  823,  440,  446,  447,
+      431, 1212,  431,  435,  431,  436,  431,  554,  554,  705,
+      705,  705, 1797,  555, 1798, 1787,  556,  721,  721,  721,
+     1799,  513,  557, 1800, 1801,  507,  706,  737,  737,  737,
+     1802,  431,  431, 1786,  722, 1228, 1228, 1228, 1803,  437,
+     1804,  438, 1805,  439,  738, 1226, 1226, 1226, 1231, 1231,
+
+     1231,  440,  431,  432,  197,  432,  431,  431,  431,  431,
+      431,  431,  431,  433,  431,  431,  431, 1806,  431,  435,
+      431,  436,  431,  745,  745,  745,  748,  748,  748,  763,
+      763,  763,  771,  771,  771,  776,  776,  776, 1807, 1809,
+      746, 1227, 1810,  749, 1811, 1812,  764,  431,  431,  772,
+     1813, 1816,  777, 1817, 1821,  437, 1824,  438, 1825,  439,
+     1239, 1239, 1239, 1262, 1262, 1262, 1828,  440,  446,  447,
       197,  447,  446,  446,  446,  446,  446,  446,  446,  448,
-      446,  446,  446, 1208,  446,  450,  446,  451,  446,  794,
-      794,  794,  813,  813,  813,  817,  817,  817,  864,  864,
+      446,  446,  446, 1832,  446,  450,  446,  451,  446,  796,
+      796,  796,  815,  815,  815,  819,  819,  819,  866,  866,
 
-      864,  836,  836,  836, 1845, 1841,  795, 1846, 1855,  814,
-     1856, 1857,  818,  446,  446, 1208,  866, 1858, 1859,  838,
-      902,  902,  902, 1860,  903, 1843, 1861,  904,  920,  920,
-      920, 1862,  921, 1863, 1864,  922,  452,  446,  447,  197,
+      866,  838,  838,  838, 1833, 1834,  797, 1835, 1836,  816,
+     1839, 1840,  820,  446,  446, 1212,  868, 1857, 1858,  840,
+      904,  904,  904, 1859,  905, 1868,  825,  906,  922,  922,
+      922, 1869,  923, 1212, 1870,  924,  452,  446,  447,  197,
       447,  446,  446,  446,  446,  446,  446,  446,  448,  446,
-      446,  446, 1842,  446,  450,  446,  451,  446,  839,  696,
-      696,  696,  864,  864,  864, 1865,  874,  874,  874,  874,
-      874,  874,  704,  704,  704, 1849,  697,  882,  882,  882,
-      866, 1867,  446,  446,  876, 1850, 1868,  876, 1851,  705,
-     1874,  933,  933,  933,  883,  934, 1875, 1876,  935, 1269,
+      446,  446, 1855,  446,  450,  446,  451,  446,  841,  697,
+      697,  697,  866,  866,  866, 1854,  876,  876,  876,  876,
+      876,  876,  705,  705,  705, 1856,  698,  884,  884,  884,
+      868, 1871,  446,  446,  878, 1872, 1873,  878, 1874,  706,
+     1875,  935,  935,  935,  885,  936, 1876, 1877,  937, 1273,
 
-     1269, 1269, 1270, 1270, 1270,  452,  456,  457,  197,  457,
+     1273, 1273, 1274, 1274, 1274,  452,  456,  457,  197,  457,
       456,  456,  456,  456,  456,  456,  456,  458,  456,  456,
-      456,  867,  456,  460,  456,  461,  456,  885,  885,  885,
-     1880, 1888,  877, 1889, 1890,  890,  890,  890,  890,  890,
-      890,  898,  898,  898,  886, 1220, 1220, 1220, 1223,  823,
-     1912,  456,  456,  892, 1913, 1917,  892, 1918, 1921,  900,
-     1922, 1925,  462,  456,  457,  197,  457,  456,  456,  456,
-      456,  456,  456,  456,  458,  456,  456,  456, 1908,  456,
-      460,  456,  461,  456, 1926,  893,  898,  898,  898,  720,
-      720,  720,  906,  906,  906,  736,  736,  736,  906,  906,
-
-      906,  744,  744,  744,  900, 1927,  721, 1928,  456,  456,
-      908, 1929,  737, 1222, 1222, 1222,  908, 1930,  745,  462,
+      456,  869,  456,  460,  456,  461,  456,  887,  887,  887,
+     1878, 1880,  879, 1881, 1887,  892,  892,  892,  892,  892,
+      892,  900,  900,  900,  888, 1224, 1224, 1224, 1227, 1888,
+     1889,  456,  456,  894, 1893, 1901,  894, 1902, 1903,  902,
+     1925, 1926,  462,  456,  457,  197,  457,  456,  456,  456,
+      456,  456,  456,  456,  458,  456,  456,  456,  825,  456,
+      460,  456,  461,  456, 1930,  895,  900,  900,  900,  721,
+      721,  721,  908,  908,  908,  737,  737,  737,  908,  908,
+
+      908,  745,  745,  745,  902, 1931,  722, 1921,  456,  456,
+      910, 1934,  738, 1226, 1226, 1226,  910, 1935,  746,  462,
       467,  468,  197,  468,  467,  467,  467,  467,  467,  467,
-      467,  469,  467,  467,  467,  909,  467,  471,  467,  472,
-      467,  925,  925,  925,  925,  925,  925, 1931, 1852,  901,
-      747,  747,  747,  937,  937,  937, 1932,  938, 1853,  927,
-      939, 1854,  927, 1933, 1919,  467,  467,  748,  940,  940,
-      940,  956,  956,  956, 1923,  957,  473, 1920,  958,  968,
-      968,  968, 1942,  969, 1943,  941,  970, 1924,  474,  467,
+      467,  469,  467,  467,  467,  911,  467,  471,  467,  472,
+      467,  927,  927,  927,  927,  927,  927, 1938, 1862,  903,
+      748,  748,  748,  939,  939,  939, 1939,  940, 1863,  929,
+      941, 1864,  929, 1940, 1865,  467,  467,  749,  942,  942,
+      942,  959,  959,  959, 1866,  960,  473, 1867,  961,  971,
+      971,  971, 1941,  972, 1942,  943,  973, 1943,  474,  467,
       468,  197,  468,  467,  467,  467,  467,  467,  467,  467,
 
-      469,  467,  467,  467,  928,  467,  471,  467,  472,  467,
-      948,  948,  948,  948,  948,  948,  761,  761,  761,  959,
-      959,  959,  963,  963,  963,  963,  963,  963,  950, 1944,
-     1945,  950, 1952,  762,  467,  467,  960,  769,  769,  769,
-      965, 1955, 1208,  965, 1962,  473,  971,  971,  971, 1963,
-     1964,  971,  971,  971,  770, 1965, 1966,  474,  482, 1967,
-      774,  774,  774, 1973,  973,  497,  982,  982,  982,  973,
-      951,  982,  982,  982,  481,  498,  966,  775,  976,  976,
-      976, 1974,  977, 1909,  984,  978, 1224, 1224, 1224,  984,
-      986,  986,  986, 1227, 1227, 1227,  988,  988,  988,  991,
-
-      991,  991,  499,  500,  501, 1208, 1975,  987,  823,  502,
-      503,  974,  504,  989, 1208, 1976,  505,  993,  506, 1977,
-      507, 2407, 2407, 2407, 1978, 1979,  985,  991,  991,  991,
-      996,  996,  996, 2407, 2407, 2407, 1980, 1981, 2407, 1000,
-     1000, 1000, 2407, 2407, 2407,  993, 1910,  997, 1982, 1970,
-     2407, 1003, 1003, 1003, 1985, 1969, 1001, 1986, 1987, 2407,
-     1988, 1989, 1003, 1003, 1003,  794,  794,  794, 1990, 1005,
-     1008, 1008, 1008, 1991, 1009, 1992, 1997, 1010, 1998,  990,
-     1005, 1999,  795,  998, 1011, 1011, 1011,  994, 1011, 1011,
-     1011, 1015, 1015, 1015, 2407, 2407, 2407,  999, 2000, 1006,
-
-     1002, 2001, 1013, 1019, 1019, 1019, 1013, 2002, 1016, 2006,
-     2015, 2407, 1021, 1021, 1021, 1021, 1021, 1021, 2016, 2017,
-     1020, 1029, 1029, 1029, 1029, 1029, 1029, 1035, 1035, 1035,
-     1023, 2007, 2018, 1023, 1035, 1035, 1035, 2019, 2020, 1031,
-      823, 2008, 1031, 1014, 1017, 1037,  813,  813,  813, 1039,
-     1039, 1039, 1037, 1040, 2031, 2032, 1041, 2033, 1018, 1042,
-     1042, 1042, 2034,  814, 1042, 1042, 1042,  817,  817,  817,
-     2035, 1046, 1046, 1046, 2023, 1047, 2036, 1044, 1048,  869,
-      869,  869, 1044,  870,  818, 1024,  871, 1032, 1050, 1050,
-     1050, 1050, 1050, 1050,  836,  836,  836, 1038,  836,  836,
-
-      836,  836,  836,  836, 2037, 2038, 1052, 1898, 2009, 1052,
-     2042, 2043,  838, 1085, 1085, 1085,  838, 1899, 2010,  838,
-      864,  864,  864, 1900, 1045,  864,  864,  864, 2044, 2045,
-     1086,  864,  864,  864, 1088, 1088, 1088, 1901,  866, 2407,
-     2407, 2407, 2011,  866,  874,  874,  874, 1902, 1062,  866,
-     2013, 1089, 2012, 1903, 1053, 2046, 2407,  874,  874,  874,
-     2014, 2047,  876,  874,  874,  874,  879,  879,  879, 2049,
-      880, 2050, 2051,  881, 2054,  876,  882,  882,  882, 2059,
-     1087,  876, 1094, 1094, 1094, 2060, 1095, 2061, 2062, 1096,
-     1097, 1097, 1097,  883,  885,  885,  885, 2063, 2064, 1090,
-
-     2065, 1099, 1099, 1099, 2066, 1100, 2067, 1098, 1101, 2068,
-     1092,  886, 1103, 1103, 1103,  890,  890,  890,  890,  890,
-      890,  890,  890,  890, 1109, 1109, 1109, 2069, 2070, 1104,
-      898,  898,  898,  892,  823, 2077,  892, 2078, 2079,  892,
-     2080, 1110,  898,  898,  898,  898,  898,  898,  900,  902,
-      902,  902, 2081,  903, 2082, 2083,  904,  906,  906,  906,
-      900, 2084, 2085,  900,  906,  906,  906, 1114, 1114, 1114,
-     1125, 1125, 1125, 2086, 2087,  908, 2071,  920,  920,  920,
-     1106,  921,  908, 2088,  922, 1115, 2089, 1126,  925,  925,
-      925, 2090, 1112,  925,  925,  925,  925,  925,  925, 2093,
-
-      933,  933,  933, 2094,  934, 2095,  927,  935, 1134, 1134,
-     1134,  927, 2099, 2106,  927,  937,  937,  937, 2107,  938,
-     2108, 2109,  939, 2110, 2111, 1135,  940,  940,  940, 1136,
-     1136, 1136, 2112, 1137, 2113, 2114, 1138,  948,  948,  948,
-      948,  948,  948,  941,  948,  948,  948,  956,  956,  956,
-     2115,  957, 2116, 2117,  958,  950, 2125, 2120,  950, 2126,
-     1129, 2120,  950,  959,  959,  959, 1150, 1150, 1150, 2127,
-     1151, 2121, 2123, 1152,  963,  963,  963,  963,  963,  963,
-      960,  963,  963,  963,  968,  968,  968, 2128,  969, 2129,
-     2130,  970,  965, 2131, 2132,  965,  971,  971,  971,  965,
-
-      971,  971,  971,  971,  971,  971,  982,  982,  982,  823,
-     1145,  982,  982,  982,  973,  976,  976,  976,  973,  977,
-     2133,  973,  978, 2134,  984,  982,  982,  982, 2135,  984,
-     2136, 2140, 1155,  986,  986,  986, 2138, 1163, 1163, 1163,
-     2145, 1164, 2137,  984, 1165,  988,  988,  988, 2139, 2146,
-      987, 1166, 1166, 1166, 2118, 1167, 2147, 2148, 1168,  991,
-      991,  991,  989,  991,  991,  991,  996,  996,  996, 1157,
-      991,  991,  991, 1000, 1000, 1000,  823,  993, 1172, 1172,
-     1172,  993, 1173,  997, 1162, 1174, 1208, 1209,  993, 2151,
-     1001, 1177, 1177, 1177, 2151, 1178, 2154, 2120, 1179, 1003,
-
-     1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1008, 1008,
-     1008, 2121, 1009, 2155, 2156, 1010, 2149, 1005, 2157, 2166,
-     1005, 2169, 2174, 1005, 1011, 1011, 1011, 1011, 1011, 1011,
-     1011, 1011, 1011, 1015, 1015, 1015, 1170, 1184, 1184, 1184,
-     2120, 1185, 1013, 2177, 1186, 1013, 2141, 2164, 1013, 2143,
-     1016, 2123, 1019, 1019, 1019, 1189, 1189, 1189, 2142, 1190,
-     2167, 2144, 1191, 1021, 1021, 1021, 2165, 2151, 1181, 1020,
-     1021, 1021, 1021, 1021, 1021, 1021, 1194, 1194, 1194, 2168,
-     2179, 1023, 1029, 1029, 1029, 1029, 1029, 1029, 1023, 1183,
-     2151, 1023, 2172, 1195, 1029, 1029, 1029, 1035, 1035, 1035,
-
-     1031, 2180, 2175, 1031, 1035, 1035, 1035, 1035, 1035, 1035,
-     2181, 2173, 1031, 2182, 2183, 1037, 1039, 1039, 1039, 2193,
-     1040, 2176, 1037, 1041, 2194, 1037, 1042, 1042, 1042, 1042,
-     1042, 1042, 2195, 2196, 1192, 1042, 1042, 1042, 1046, 1046,
-     1046, 2197, 1047, 2198, 1044, 1048, 2202, 1044, 1050, 1050,
-     1050, 2203, 2204, 1044, 1198, 1050, 1050, 1050, 2205, 2206,
-     1201, 1050, 1050, 1050, 2207, 2209, 1052, 1207, 1207, 1207,
-      836,  836,  836, 1052, 1085, 1085, 1085, 2210, 2211, 1052,
-     1238, 1238, 1238, 2216, 1239, 1208, 1209, 1240,  838, 2217,
-     2218, 1086, 2212, 2219, 1202,  864,  864,  864, 1088, 1088,
-
-     1088, 1242, 1242, 1242, 2213, 1243, 2220, 2214, 1244,  874,
-      874,  874, 2221,  866, 2222, 1089, 1094, 1094, 1094, 2215,
-     1095, 1204, 2223, 1096, 1097, 1097, 1097,  876, 2224, 1249,
-     1249, 1249, 2225, 1250, 2226, 1214, 1251, 2227, 1099, 1099,
-     1099, 1098, 1100, 2229, 2230, 1101, 1103, 1103, 1103, 1253,
-     1253, 1253, 1241, 1254, 2231, 2232, 1255, 2233, 1247,  890,
-      890,  890, 2234, 1104, 1109, 1109, 1109, 1260, 1260, 1260,
-     2235, 1261,  823, 2236, 1262, 2237, 2238,  892, 1263, 1263,
-     1263, 1110,  898,  898,  898, 1114, 1114, 1114, 1125, 1125,
-     1125, 2239, 1276, 1276, 1276, 1264, 1277, 2228, 2240, 1278,
-
-      900, 2241, 2242, 1115, 2243, 1126, 1279, 1279, 1279, 1257,
-     1281, 1281, 1281, 2244,  925,  925,  925, 1286, 1286, 1286,
-     1134, 1134, 1134, 1280, 1293, 1293, 1293, 1282, 1222, 1222,
-     1222, 1265,  927, 2245, 1287, 2246,  823, 1135, 1290, 1290,
-     1290, 1294, 1291, 2248, 2249, 1292, 1136, 1136, 1136, 2250,
-     1137, 2251, 2252, 1138, 2253, 2247, 1283,  948,  948,  948,
-     1302, 1302, 1302, 1150, 1150, 1150, 2254, 1151, 2255, 2256,
-     1152, 1306, 1306, 1306, 1321,  950, 2257, 1303, 2258, 1284,
-      963,  963,  963,  971,  971,  971, 2259, 2260, 1307, 1315,
-     1315, 1315, 2261,  982,  982,  982, 2262, 2263,  965, 2265,
-
-      823,  973, 2266, 1163, 1163, 1163, 1316, 1164, 2267, 2268,
-     1165,  984, 1166, 1166, 1166, 2269, 1167, 2270, 2271, 1168,
-     2264, 1300,  991,  991,  991, 1172, 1172, 1172, 2272, 1173,
-     2273, 2274, 1174, 2275, 2276, 1317, 2277, 1177, 1177, 1177,
-      993, 1178, 2278, 1309, 1179, 1003, 1003, 1003, 1311, 1318,
-     1011, 1011, 1011, 1184, 1184, 1184, 2279, 1185, 2280, 2282,
-     1186, 2283, 2284, 1005,  823, 1189, 1189, 1189, 1013, 1190,
-     2281, 2285, 1191, 1021, 1021, 1021, 1194, 1194, 1194, 1332,
-     1332, 1332, 2286, 1333, 2287, 2288, 1334, 1320, 1363, 1363,
-     1363, 1023, 2289, 1195, 1029, 1029, 1029, 1339, 1339, 1339,
-
-     1035, 1035, 1035, 2290, 2291, 1325, 1327, 1042, 1042, 1042,
-     2292, 2293, 1031, 2295, 1340, 1343, 1343, 1343, 1037, 2296,
-     1330, 1050, 1050, 1050, 2297, 1044, 1207, 1207, 1207,  836,
-      836,  836, 1344, 1365, 1365, 1365, 1235, 1235, 1235, 1052,
-     1372, 1372, 1372, 1337, 1208, 2298, 2299,  838, 1238, 1238,
-     1238, 1364, 1239, 2300,  823, 1240,  864,  864,  864, 1342,
-     1242, 1242, 1242, 2301, 1243, 2302, 1341, 1244, 2294,  874,
-      874,  874, 2304, 2305,  866, 2306, 2307, 1347, 2308, 1366,
-     2309, 1352, 1345,  890,  890,  890, 1373,  876, 1249, 1249,
-     1249, 2310, 1250, 1348, 2311, 1251, 1253, 1253, 1253, 2314,
-
-     1254,  892, 2315, 1255, 1258, 1258, 1258, 1260, 1260, 1260,
-     2316, 1261, 2317, 2318, 1262, 1263, 1263, 1263, 2319,  823,
-     1377, 2330, 1374, 1391, 1391, 1391,  823, 1392,  823,  823,
-     1393, 1542, 1264,  898,  898,  898, 1269, 1269, 1269, 1270,
-     1270, 1270,  823, 1381, 1398, 1398, 1398, 1398, 1398, 1398,
-      823,  900, 1363, 1363, 1363, 1276, 1276, 1276,  823, 1277,
-     2346, 2354, 1278, 1279, 1279, 1279, 1402, 1402, 1402, 2326,
-     1403,  823,  823, 1404, 1281, 1281, 1281, 1409, 1409, 1409,
-     1280, 1405, 1405, 1405, 1394, 1406, 2320,  823, 1407, 2322,
-      823, 1282, 1286, 1286, 1286, 1410, 1412, 1412, 1412,  823,
-
-     1413, 2327, 2348, 1414, 1415, 1415, 1415, 1399, 2321, 1287,
-     1364,  823, 1290, 1290, 1290, 1399, 1291,  823, 2323, 1292,
-      823, 1416, 1293, 1293, 1293, 1418, 1418, 1418, 2366, 1419,
-      823, 2367, 1420, 1421, 1421, 1421, 1426, 1426, 1426, 1294,
-      948,  948,  948, 1302, 1302, 1302, 2324, 1430, 1430, 1430,
-     1422, 1431, 2340, 1427, 1432, 1433, 1433, 1433,  950, 1541,
-     1303, 1306, 1306, 1306, 1436, 1436, 1436, 2325, 1437, 2331,
-      823, 1438, 1434, 1440, 1440, 1440, 2334,  823, 1307,  971,
-      971,  971, 1315, 1315, 1315, 1447, 1447, 1447, 2332, 1448,
-     2333, 1441, 1449, 1451, 1451, 1451,  823,  973,  823, 1316,
-
-      991,  991,  991,  823,  823, 1428, 1456, 1456, 1456, 1540,
-     2338, 1452, 1458, 1458, 1458, 2407, 2407, 2407,  993, 1003,
-     1003, 1003,  823, 1457, 1011, 1011, 1011, 2328,  823, 1459,
-     1443,  823, 2407, 1464, 1464, 1464,  823, 1005, 1466, 1466,
-     1466, 2336, 1013, 1021, 1021, 1021, 1029, 1029, 1029, 2335,
-     1465, 1454, 1332, 1332, 1332, 1467, 1333, 2341, 2329, 1334,
-     1539, 1023,  823, 2404, 1031, 1339, 1339, 1339, 2339,  823,
-     1463,  823, 1474, 1474, 1474, 2349, 1475,  823, 1460, 1476,
-     2362, 2342, 1340, 1538,  823, 1461, 1035, 1035, 1035,  823,
-     1042, 1042, 1042, 1343, 1343, 1343,  823, 1472, 1479, 1479,
-
-     1479, 1537, 1480, 2347, 1037, 1481, 2337, 1468, 1044,  823,
-     1344, 1482, 1482, 1482, 1488, 1488, 1488,  836,  836,  836,
-     1495, 1495, 1495, 1500, 1500, 1500, 1363, 1363, 1363, 1483,
-     2352, 1489, 1501, 1501, 1501,  838, 1365, 1365, 1365, 1503,
-     1503, 1503, 2360,  823, 1477, 1478, 1504, 1504, 1504, 1372,
-     1372, 1372,  864,  864,  864, 1512, 1512, 1512, 1515, 1515,
-     1515,  890,  890,  890, 1519, 1519, 1519, 1391, 1391, 1391,
-      866, 1392, 1535, 1513, 1393, 1516,  823, 1490, 1534,  892,
-     2344, 1520,  898,  898,  898,  823, 1532, 1532, 1532, 1398,
-     1398, 1398, 1536, 1536, 1536,  823,  823, 1402, 1402, 1402,
-
-      900, 1403, 1509, 1533, 1404, 1405, 1405, 1405,  823, 1406,
-      823,  823, 1407, 1409, 1409, 1409, 1412, 1412, 1412, 1518,
-     1413, 2343, 2345, 1414, 1415, 1415, 1415, 2380, 1531,  823,
-     2350, 1410, 1543, 1543, 1543,  823, 1544,  823, 2355, 1545,
-      823, 1416, 1418, 1418, 1418, 2351, 1419,  823, 2386, 1420,
-     1421, 1421, 1421, 1547, 1547, 1547, 2356, 1548,  823,  823,
-     1549, 1550, 1550, 1550, 1426, 1426, 1426, 1422, 1554, 1554,
-     1554, 2353, 1555,  823, 2357, 1556,  823, 2364, 1551, 2363,
-     2361, 1427,  948,  948,  948, 1430, 1430, 1430,  823, 1431,
-      823,  823, 1432, 1433, 1433, 1433, 2365, 1559, 1559, 1559,
-
-      950, 1560,  823, 2368, 1561, 1436, 1436, 1436, 2358, 1437,
-     1434, 2359, 1438, 1440, 1440, 1440,  971,  971,  971, 1567,
-     1567, 1567, 1447, 1447, 1447,  823, 1448,  823, 2370, 1449,
-      823, 1441,  823, 1557,  973, 2369, 1568, 1451, 1451, 1451,
-     1575, 1575, 1575, 1456, 1456, 1456, 1578, 1578, 1578, 2400,
-     1579, 1530,  823, 1580, 2372, 1452, 1527,  823, 1576, 2373,
-     1457, 1458, 1458, 1458, 2371, 1569, 1581, 1581, 1581, 1526,
-     1582, 1525,  823, 1583, 1003, 1003, 1003, 2378, 1459, 1565,
-     1011, 1011, 1011, 1464, 1464, 1464, 1588, 1588, 1588, 2384,
-     1589, 2376, 1005, 1590, 1466, 1466, 1466, 2374, 1013, 2381,
-
-     1465, 1591, 1591, 1591,  823, 1592,  823,  823, 1593, 2385,
-      823, 1467, 1021, 1021, 1021, 1029, 1029, 1029, 1474, 1474,
-     1474,  823, 1475, 2375,  823, 1476, 1035, 1035, 1035, 1587,
-     1023,  823,  823, 1031, 1042, 1042, 1042, 1522, 2377, 1585,
-      823, 1479, 1479, 1479, 1037, 1480,  823, 2392, 1481, 1482,
-     1482, 1482, 1044, 1488, 1488, 1488, 1606, 1606, 1606, 1521,
-     1607, 2387, 1517, 1608,  836,  836,  836, 1483, 2393, 2379,
-     1489, 1610, 1610, 1610, 1514, 1511, 1594, 1600, 1510, 1598,
-     1508, 2388,  838, 1613, 1613, 1613, 2382, 1601, 1495, 1495,
-     1495, 1614, 1614, 1614, 1617, 1617, 1617, 1500, 1500, 1500,
-
-     1501, 1501, 1501, 1503, 1503, 1503, 1504, 1504, 1504, 1619,
-     1619, 1619, 1620, 1620, 1620, 1621, 1621, 1621,  864,  864,
-      864, 1512, 1512, 1512, 1515, 1515, 1515, 1609, 1627, 1627,
-     1627, 2396, 1628,  823, 1507, 1629,  866,  823, 1506, 1513,
-      823, 1516, 1631, 1631, 1631, 1519, 1519, 1519, 1633, 1633,
-     1633, 1505, 1634,  823, 1502, 1635,  898,  898,  898,  823,
-     1632, 1499, 1520, 1532, 1532, 1532, 1647, 1647, 1647, 1623,
-     1648,  823, 2389, 1649,  900, 1650, 1650, 1650, 2404, 2383,
-     1533, 1536, 1536, 1536, 1543, 1543, 1543,  823, 1544,  823,
-     1498, 1545, 1547, 1547, 1547, 1497, 1548, 1496, 2390, 1549,
-
-     1550, 1550, 1550, 2394, 2391, 1646, 1661, 1661, 1661, 1494,
-     1662, 2397,  823, 1663, 1554, 1554, 1554, 1551, 1555, 2395,
-      823, 1556,  948,  948,  948, 1559, 1559, 1559,  823, 1560,
-      823,  823, 1561, 1671, 1671, 1671, 1567, 1567, 1567,  823,
-      950, 1674, 1674, 1674, 2398, 1675, 1493, 1492, 1676, 1491,
-     1487, 1672, 1473, 1568, 1575, 1575, 1575, 1578, 1578, 1578,
-     2399, 1579, 2402, 2403, 1580, 1471, 1581, 1581, 1581, 1470,
-     1582, 1469, 1576, 1583, 1003, 1003, 1003, 1011, 1011, 1011,
-     1588, 1588, 1588, 1462, 1589, 1666, 2401, 1590, 1455, 1591,
-     1591, 1591, 1005, 1592, 1453, 1013, 1593, 1021, 1021, 1021,
-
-     1691, 1691, 1691, 1029, 1029, 1029, 1035, 1035, 1035, 1698,
-     1698, 1698, 1700, 1700, 1700, 1023, 1450, 1692, 1703, 1703,
-     1703, 1031, 1446, 1445, 1037, 1687, 1444, 1699, 1442, 1439,
-      823, 1435, 1429, 1690, 1606, 1606, 1606, 1425, 1607, 1424,
-     1423, 1608, 1689,  836,  836,  836, 1610, 1610, 1610, 1705,
-     1705, 1705, 1613, 1613, 1613, 1614, 1614, 1614, 1707, 1707,
-     1707,  838, 1708, 1708, 1708, 1697, 1417, 1695, 1617, 1617,
-     1617, 1619, 1619, 1619, 1620, 1620, 1620, 1621, 1621, 1621,
-     1711, 1711, 1711, 1714, 1714, 1714, 1627, 1627, 1627, 1411,
-     1628, 1408, 1401, 1629, 1631, 1631, 1631, 1400, 1712, 1397,
-
-     1715, 1704, 1633, 1633, 1633, 1396, 1634, 1395, 1382, 1635,
-     1380, 1379, 1632,  898,  898,  898, 1647, 1647, 1647, 1378,
-     1648, 1376, 1375, 1649, 1650, 1650, 1650, 1371, 1661, 1661,
-     1661,  900, 1662, 1370, 1369, 1663, 1740, 1740, 1740, 1671,
-     1671, 1671, 1746, 1746, 1746, 1674, 1674, 1674, 1368, 1675,
-     1367, 1362, 1676, 1361, 1741, 1360, 1359, 1672, 1358, 1747,
-     1757, 1757, 1757, 1759, 1759, 1759, 1761, 1761, 1761, 1011,
-     1011, 1011, 1357, 1727, 1021, 1021, 1021, 1691, 1691, 1691,
-     1356, 1760, 1355, 1762, 1768, 1768, 1768, 1013, 1748, 1765,
-     1765, 1765, 1023, 1766, 1692, 1354, 1767, 1771, 1771, 1771,
-
-     1353, 1769, 1773, 1773, 1773, 1035, 1035, 1035, 1698, 1698,
-     1698, 1700, 1700, 1700, 1351, 1772, 1703, 1703, 1703, 1778,
-     1778, 1778, 1350, 1037, 1349, 1208, 1699, 1338, 1763,  823,
-     1705, 1705, 1705, 1336, 1764, 1335, 1331, 1779, 1707, 1707,
-     1707, 1708, 1708, 1708, 1711, 1711, 1711, 1714, 1714, 1714,
-     1784, 1784, 1784, 1329, 1785, 1328, 1326, 1786,  898,  898,
-      898, 1324, 1712, 1323, 1715, 1804, 1804, 1804, 1322, 1319,
-     1774, 1314, 1775, 1809, 1809, 1809,  900, 1740, 1740, 1740,
-     1313, 1312, 1805, 1813, 1813, 1813, 1746, 1746, 1746, 1310,
-     1810, 1308, 1816, 1816, 1816, 1741, 1817, 1305, 1304, 1818,
-
-     1814, 1301, 1299, 1747, 1824, 1824, 1824, 1757, 1757, 1757,
-     1759, 1759, 1759, 1761, 1761, 1761, 1298, 1798, 1828, 1828,
-     1828, 1825, 1829, 1297, 1296, 1830, 1295, 1289, 1760, 1288,
-     1762, 1831, 1831, 1831, 1021, 1021, 1021, 1765, 1765, 1765,
-     1285, 1766, 1275, 1274, 1767, 1768, 1768, 1768, 1273, 1832,
-     1272, 1271, 1023, 1834, 1834, 1834, 1268, 1835, 1267, 1266,
-     1836, 1259, 1769, 1837, 1837, 1837, 1771, 1771, 1771, 1773,
-     1773, 1773, 1839, 1839, 1839, 1778, 1778, 1778, 1256, 1252,
-     1838, 1847, 1847, 1847, 1772, 1784, 1784, 1784, 1248, 1785,
-     1840, 1246, 1786, 1779,  898,  898,  898, 1245, 1848, 1237,
-
-     1833, 1869, 1869, 1869, 1804, 1804, 1804, 1871, 1871, 1871,
-     1236, 1872,  900, 1234, 1873, 1809, 1809, 1809, 1870, 1233,
-     1232, 1805, 1877, 1877, 1877, 1231, 1878, 1230, 1229, 1879,
-     1228, 1226, 1810, 1881, 1881, 1881, 1225, 1813, 1813, 1813,
-     1883, 1883, 1883, 1221, 1884, 1219, 1218, 1885, 1217, 1216,
-     1882, 1215, 1213, 1866, 1814, 1886, 1886, 1886, 1816, 1816,
-     1816, 1212, 1817, 1211, 1210, 1818, 1824, 1824, 1824, 1891,
-     1891, 1891, 1887, 1892, 1203, 1200, 1893, 1894, 1894, 1894,
-     1896, 1896, 1896, 1825, 1828, 1828, 1828, 1199, 1829, 1197,
-     1196, 1830, 1193, 1188, 1895, 1187, 1182, 1897, 1831, 1831,
-
-     1831, 1021, 1021, 1021, 1834, 1834, 1834, 1180, 1835, 1176,
-     1175, 1836, 1837, 1837, 1837, 1171, 1832, 1169, 1161, 1023,
-     1905, 1905, 1905, 1160, 1906, 1159, 1158, 1907, 1156, 1838,
-     1839, 1839, 1839, 1911, 1911, 1911, 1847, 1847, 1847, 1914,
-     1914, 1914, 1154, 1915, 1153, 1149, 1916, 1148, 1840,  898,
-      898,  898, 1147, 1848, 1935, 1935, 1935, 1936, 1936, 1936,
-     1869, 1869, 1869, 1911, 1911, 1911, 1904,  900, 1939, 1939,
-     1939, 1146, 1940, 1144, 1937, 1941, 1143, 1870, 1871, 1871,
-     1871, 1142, 1872, 1141, 1140, 1873, 1877, 1877, 1877, 1139,
-     1878, 1133, 1132, 1879, 1881, 1881, 1881, 1946, 1946, 1946,
-
-     1934, 1947, 1131, 1938, 1948, 1883, 1883, 1883, 1130, 1884,
-     1128, 1882, 1885, 1886, 1886, 1886, 1949, 1949, 1949, 1127,
-     1950, 1124, 1123, 1951, 1953, 1953, 1953, 1891, 1891, 1891,
-     1887, 1892, 1122, 1121, 1893, 1894, 1894, 1894, 1956, 1956,
-     1956, 1954, 1957, 1120, 1119, 1958, 1896, 1896, 1896, 1959,
-     1959, 1959, 1895, 1960, 1118, 1117, 1961, 1021, 1021, 1021,
-     1905, 1905, 1905, 1897, 1906, 1116, 1113, 1907, 1971, 1971,
-     1971, 1111, 1914, 1914, 1914, 1023, 1915, 1108, 1105, 1916,
-     1983, 1983, 1983, 1102, 1093, 1972, 1208,  898,  898,  898,
-     1935, 1935, 1935, 1936, 1936, 1936, 1091, 1984, 1084, 1994,
-
-     1994, 1994, 1082, 1995, 1081,  900, 1996, 1080, 1968, 1079,
-     1937, 1939, 1939, 1939, 1078, 1940, 1077, 1076, 1941, 1946,
-     1946, 1946, 1075, 1947, 1072, 1071, 1948, 1949, 1949, 1949,
-     1070, 1950, 1069, 1068, 1951, 1067, 1993, 1953, 1953, 1953,
-     2003, 2003, 2003, 1066, 2004, 1065, 1064, 2005, 1956, 1956,
-     1956, 1063, 1957, 1061, 1954, 1958, 1959, 1959, 1959, 1060,
-     1960, 1059, 1058, 1961, 2021, 2021, 2021, 2024, 2024, 2024,
-     1971, 1971, 1971, 2026, 2026, 2026, 1057, 2027, 1056, 1055,
-     2028,  823, 2022, 1049, 2025, 1208, 1034, 1972, 1208, 1033,
-     1028, 1208, 2029, 2029, 2029, 2030, 2030, 2030, 1983, 1983,
-
-     1983, 2039, 2039, 2039, 1027, 2040, 1026, 1025, 2041,  898,
-      898,  898, 1994, 1994, 1994, 1984, 1995, 1007,  995, 1996,
-     2052, 2052, 2052, 2055, 2055, 2055,  981,  900, 2003, 2003,
-     2003,  980, 2004,  979,  975, 2005,  967, 2053,  962,  961,
-     2056, 2057, 2057, 2057, 2021, 2021, 2021, 2024, 2024, 2024,
-     2072, 2072, 2072,  955, 2073,  952,  947, 2074, 2058, 2026,
-     2026, 2026, 2022, 2027, 2025, 1208, 2028,  946, 1208, 2029,
-     2029, 2029,  945,  944, 2048,  943,  942, 1208, 1206, 1206,
-     1206, 1206, 1206, 1206, 1206, 1206, 1206,  936,  929, 1206,
-     2030, 2030, 2030,  924, 1206, 1206, 1206, 1208, 1206, 2039,
-
-     2039, 2039,  923, 2040,  919,  918, 2041, 2096, 2096, 2096,
-      917, 2097,  916,  915, 2098,  914, 2091, 2091, 2091,  913,
-     2052, 2052, 2052, 1206, 1206, 1206, 1206, 1206, 1206, 1206,
-     1206, 1206, 1206, 1206, 2092,  912, 1206, 2053, 2055, 2055,
-     2055, 1206, 1206, 1206, 1208, 1206, 2100, 2100, 2100,  911,
-     2101,  905,  897, 2102,  896, 2056, 2057, 2057, 2057, 2103,
-     2103, 2103,  895, 2104,  894,  889, 2105, 2091, 2091, 2091,
-     1206, 1206,  888, 2058, 2072, 2072, 2072,  887, 2073,  884,
-      878, 2074, 2096, 2096, 2096, 2092, 2097,  873,  872, 2098,
-      868,  863, 1208, 1206, 1206, 1206, 1206, 1206, 2124, 1206,
-
-     1206, 1206,  862,  861, 1206,  860,  859,  858,  856, 1206,
-     1206, 1206, 1208, 1206, 2100, 2100, 2100,  855, 2101,  854,
-      853, 2102, 2103, 2103, 2103,  852, 2104,  851,  850, 2105,
-      849, 2153, 2153, 2153,  848, 2158, 2158, 2158, 1206, 1206,
-     1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 2124, 1208,
-     1209, 1206, 2159, 2160, 2160, 2160, 1206, 1206, 1206, 1208,
-     1206, 2162, 2162, 2162, 2170, 2170, 2170, 2158, 2158, 2158,
-     2161, 2178, 2178, 2178, 2153, 2153, 2153,  847, 2163,  846,
-      845, 2171,  844,  843, 2159, 1206, 1206,  842,  835,  823,
-      834,  833, 1208, 2184, 2184, 2184,  832, 2185,  831,  830,
-
-     2186, 2160, 2160, 2160, 2187, 2187, 2187,  829, 2188,  826,
-      824, 2189, 2162, 2162, 2162, 2190, 2190, 2190, 2161, 2191,
-      823,  821, 2192,  819,  816, 1347, 2170, 2170, 2170, 2163,
-     2199, 2199, 2199,  812, 2200,  810,  809, 2201, 2178, 2178,
-     2178,  808,  806, 2171, 2184, 2184, 2184,  805, 2185,  804,
-      803, 2186,  802, 2187, 2187, 2187,  823, 2188,  800,  799,
-     2189, 2190, 2190, 2190,  798, 2191,  797,  793, 2192, 2199,
-     2199, 2199,  792, 2200,  790, 2208, 2201, 2303, 2303, 2303,
-     2303, 2303, 2303,  789, 2312,  788,  787, 2313, 2405, 2405,
-     2405, 2405, 2405, 2405,  786,  823,  785,  783,  823,  782,
-
-      781,  780,  778,  777,  776,  773, 2406,  772,  768, 2406,
-      194,  194,  194,  194,  194,  194,  194,  194,  194,  195,
-      195,  195,  195,  195,  195,  195,  195,  195,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  203,  203,  203,
-      203,  203,  203,  203,  203,  203,  206,  206,  206,  206,
-      206,  206,  206,  206,  206,  209,  209,  209,  209,  209,
-      209,  209,  209,  209,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  224,  224,  224,  224,  224,  224,  224,
-      224,  224,  228,  228,  228,  228,  228,  228,  228,  228,
-      228,  240,  240,  240,  240,  240,  240,  240,  240,  240,
-
-      244,  244,  244,  244,  244,  244,  244,  244,  244,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  261,  261,
-      261,  261,  261,  261,  261,  261,  261,  269,  269,  269,
-      269,  269,  269,  269,  269,  269,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  283,  283,  283,  283,  283,
-      283,  283,  283,  283,  289,  289,  289,  289,  289,  289,
-      289,  289,  289,  294,  294,  294,  294,  294,  294,  294,
-      294,  294,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  319,  319,  319,  319,  319,  319,  319,  319,  319,
-      337,  337,  337,  337,  337,  337,  337,  337,  337,  353,
-
-      353,  353,  353,  353,  353,  353,  353,  353,  359,  359,
-      359,  359,  359,  359,  359,  359,  359,  364,  364,  364,
-      364,  364,  364,  364,  364,  364,  370,  370,  370,  370,
-      370,  370,  370,  370,  370,  377,  377,  377,  377,  377,
-      377,  377,  377,  377,  384,  384,  384,  384,  384,  384,
-      384,  384,  384,  389,  389,  389,  389,  389,  389,  389,
-      389,  389,  397,  397,  397,  397,  397,  397,  397,  397,
-      397,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      410,  410,  410,  410,  410,  410,  410,  410,  410,  415,
-      415,  415,  415,  415,  415,  415,  415,  415,  421,  421,
-
-      421,  421,  421,  421,  421,  421,  421,  427,  427,  427,
-      427,  427,  427,  427,  427,  427,  434,  434,  434,  434,
-      434,  434,  434,  434,  434,  441,  441,  441,  441,  441,
-      441,  441,  441,  441,  449,  449,  449,  449,  449,  449,
-      449,  449,  449,  453,  453,  453,  453,  453,  453,  453,
-      453,  453,  459,  459,  459,  459,  459,  459,  459,  459,
-      459,  463,  463,  463,  463,  463,  463,  463,  463,  463,
-      470,  470,  470,  470,  470,  470,  470,  470,  470,  475,
-      475,  475,  475,  475,  475,  475,  475,  475,  495,  495,
-      495,  767,  765,  764,  495,  519,  519,  519,  763,  760,
-
-      759,  519,  523,  523,  523,  758,  757,  755,  523,  531,
-      531,  531,  754,  753,  752,  531,  543,  543,  543,  751,
-      750,  749,  543,  549,  549,  549,  746,  743,  742,  549,
-      562,  562,  562,  741,  739,  738,  562,  570,  570,  570,
-      733,  730,  728,  570,  585,  585,  585,  727,  726,  725,
-      585,  595,  595,  595,  724,  722,  719,  595,  600,  600,
-      600,  717,  716,  715,  600,  608,  608,  608,  713,  711,
-      710,  608,  615,  615,  615,  709,  708,  707,  615,  622,
-      622,  622,  706,  703,  702,  622,  627,  627,  627,  701,
-      698,  695,  627,  633,  633,  633,  694,  692,  691,  633,
-
-      641,  641,  641,  688,  686,  683,  641,  645,  645,  645,
-      677,  676,  675,  645,  649,  649,  649,  672,  671,  670,
-      649,  653,  653,  653,  653,  653,  653,  653,  669,  653,
-      495,  495,  495,  667,  666,  665,  495,  668,  664,  663,
-      662,  668,  519,  519,  519,  657,  654,  656,  519,  693,
-      651,  650,  648,  693,  523,  523,  523,  647,  646,  644,
-      523,  700,  642,  640,  637,  700,  531,  531,  531,  636,
-      635,  634,  531,  712,  632,  631,  630,  712,  543,  543,
-      543,  629,  628,  626,  543,  718,  624,  623,  621,  718,
-      549,  549,  549,  620,  617,  616,  549,  723,  614,  504,
-
-     2407,  723,  562,  562,  562,  609,  607,  606,  562,  740,
-      603,  602,  601,  740,  570,  570,  570,  599,  597,  596,
-      570,  756,  594,  592,  591,  756,  585,  585,  585,  590,
-      589,  588,  585,  766,  587,  586,  584,  766,  595,  595,
-      595,  579,  576,  575,  595,  771,  574,  571,  569,  771,
-      600,  600,  600,  568,  567,  566,  600,  779,  565,  564,
-      563,  779,  608,  608,  608,  561, 2407,  510,  608,  784,
-      556,  551,  550,  784,  615,  615,  615,  548,  546,  545,
-      615,  791,  544,  542,  513,  791,  622,  622,  622, 2407,
-      537,  533,  622,  796,  532,  530,  529,  796,  627,  627,
-
-      627,  526,  525,  524,  627,  801,  522,  520,  518,  801,
-      633,  633,  633, 2407,  496,  494,  633,  807,  492,  486,
-      485,  807,  641,  641,  641,  486,  485,  484,  641,  811,
-      483, 2407, 2407,  811,  645,  645,  645, 2407, 2407, 2407,
-      645,  815, 2407, 2407, 2407,  815,  649,  649,  649, 2407,
-     2407, 2407,  649,  820, 2407, 2407, 2407,  820,  822,  822,
-      822,  822,  822,  822,  822,  822,  822,  828, 2407, 2407,
-     2407, 2407,  828,  495,  495,  495, 2407, 2407, 2407,  495,
-      837,  837,  837,  837, 2407, 2407,  837,  837,  519,  519,
-      519, 2407, 2407, 2407,  519,  865,  865,  865,  865, 2407,
-
-     2407,  865,  865,  523,  523,  523, 2407, 2407, 2407,  523,
-      875,  875,  875,  875, 2407, 2407,  875,  875,  531,  531,
-      531, 2407, 2407, 2407,  531,  891,  891,  891,  891, 2407,
-     2407,  891,  891,  543,  543,  543, 2407, 2407, 2407,  543,
-      899,  899,  899,  899, 2407, 2407,  899,  899,  549,  549,
-      549, 2407, 2407, 2407,  549,  907,  907,  907,  907, 2407,
-     2407,  907,  907,  562,  562,  562, 2407, 2407, 2407,  562,
-      926,  926,  926,  926, 2407, 2407,  926,  926,  570,  570,
-      570, 2407, 2407, 2407,  570,  949,  949,  949,  949, 2407,
-     2407,  949,  949,  585,  585,  585, 2407, 2407, 2407,  585,
-
-      964,  964,  964,  964, 2407, 2407,  964,  964,  595,  595,
-      595, 2407, 2407, 2407,  595,  972,  972,  972,  972, 2407,
-     2407,  972,  972,  600,  600,  600, 2407, 2407, 2407,  600,
-      983,  983,  983,  983, 2407, 2407,  983,  983,  608,  608,
-      608,  608, 2407,  608, 2407,  608,  992,  992,  992,  992,
-     2407, 2407,  992,  992,  615,  615,  615,  615, 2407,  615,
-     2407,  615, 1004, 1004, 1004, 1004, 2407, 2407, 1004, 1004,
-      622,  622,  622, 2407, 2407, 2407,  622, 1012, 1012, 1012,
-     1012, 2407, 2407, 1012, 1012,  627,  627,  627,  627, 2407,
-      627, 2407,  627, 1022, 1022, 1022, 1022, 2407, 2407, 1022,
-
-     1022,  633,  633,  633, 2407, 2407, 2407,  633, 1030, 1030,
-     1030, 1030, 2407, 2407, 1030, 1030,  641,  641,  641, 2407,
-     2407, 2407,  641, 1036, 1036, 1036, 1036, 2407, 2407, 1036,
-     1036, 1043, 1043, 1043, 1043, 2407, 2407, 1043, 1043,  649,
-      649,  649, 2407, 2407, 2407,  649, 1051, 1051, 1051, 1051,
-     2407, 2407, 1051, 1051,  822,  822,  822,  822,  822,  822,
-      822,  822,  822,  828, 2407,  828, 2407, 2407,  828,  495,
-      495,  495, 2407, 2407, 2407,  495,  837,  837,  837,  837,
-     2407, 2407,  837,  837,  519,  519,  519,  519, 2407,  519,
-     2407,  519,  865,  865,  865,  865, 2407, 2407,  865,  865,
-
-      523,  523,  523,  523, 2407,  523, 2407,  523,  875,  875,
-      875,  875, 2407, 2407,  875,  875,  531,  531,  531, 2407,
-     2407, 2407,  531,  891,  891,  891,  891, 2407, 2407,  891,
-      891,  543,  543,  543, 2407, 2407, 2407,  543,  899,  899,
-      899,  899, 2407, 2407,  899,  899,  549,  549,  549, 2407,
-     2407, 2407,  549,  907,  907,  907,  907, 2407, 2407,  907,
-      907,  562,  562,  562, 2407, 2407, 2407,  562,  926,  926,
-      926,  926, 2407, 2407,  926,  926,  570,  570,  570, 2407,
-     2407, 2407,  570,  949,  949,  949,  949, 2407, 2407,  949,
-      949,  585,  585,  585, 2407, 2407, 2407,  585,  964,  964,
-
-      964,  964, 2407, 2407,  964,  964,  595,  595,  595, 2407,
-     2407, 2407,  595,  972,  972,  972,  972, 2407, 2407,  972,
-      972,  600,  600,  600, 2407, 2407, 2407,  600,  983,  983,
-      983,  983, 2407, 2407,  983,  983,  608,  608,  608, 2407,
-     2407, 2407,  608,  992,  992,  992,  992, 2407, 2407,  992,
-      992,  615,  615,  615, 2407, 2407, 2407,  615, 1004, 1004,
-     1004, 1004, 2407, 2407, 1004, 1004,  622,  622,  622, 2407,
-     2407, 2407,  622, 1012, 1012, 1012, 1012, 2407, 2407, 1012,
-     1012,  627,  627,  627, 2407, 2407, 2407,  627, 1022, 1022,
-     1022, 1022, 2407, 2407, 1022, 1022,  633,  633,  633, 2407,
-
-     2407, 2407,  633, 1030, 1030, 1030, 1030, 2407, 2407, 1030,
-     1030,  641,  641,  641, 2407, 2407, 2407,  641, 1036, 1036,
-     1036, 1036, 2407, 2407, 1036, 1036, 1043, 1043, 1043, 1043,
-     2407, 2407, 1043, 1043,  649,  649,  649, 2407, 2407, 2407,
-      649, 1051, 1051, 1051, 1051, 2407, 2407, 1051, 1051,  822,
-      822,  822,  822,  822,  822,  822,  822,  822, 1206, 1206,
-     1206, 1206, 1206, 1206, 1206, 1206, 1206,  495,  495,  495,
-     2407, 2407, 2407,  495,  837,  837,  837,  837, 2407, 2407,
-      837,  837,  865,  865,  865,  865, 2407, 2407,  865,  865,
-      523,  523,  523, 2407, 2407, 2407,  523,  875,  875,  875,
-
-      875, 2407, 2407,  875,  875,  531,  531,  531, 2407, 2407,
-     2407,  531,  891,  891,  891,  891, 2407, 2407,  891,  891,
-      543,  543,  543, 2407, 2407, 2407,  543,  899,  899,  899,
-      899, 2407, 2407,  899,  899,  549,  549,  549, 2407, 2407,
-     2407,  549,  562,  562,  562, 2407, 2407, 2407,  562,  926,
-      926,  926,  926, 2407, 2407,  926,  926,  570,  570,  570,
-     2407, 2407, 2407,  570,  949,  949,  949,  949, 2407, 2407,
-      949,  949,  585,  585,  585, 2407, 2407, 2407,  585,  964,
-      964,  964,  964, 2407, 2407,  964,  964,  595,  595,  595,
-     2407, 2407, 2407,  595,  972,  972,  972,  972, 2407, 2407,
-
-      972,  972,  600,  600,  600, 2407, 2407, 2407,  600,  983,
-      983,  983,  983, 2407, 2407,  983,  983,  608,  608,  608,
-     2407, 2407, 2407,  608,  992,  992,  992,  992, 2407, 2407,
-      992,  992,  615,  615,  615, 2407, 2407, 2407,  615, 1004,
-     1004, 1004, 1004, 2407, 2407, 1004, 1004,  622,  622,  622,
-     2407, 2407, 2407,  622, 1012, 1012, 1012, 1012, 2407, 2407,
-     1012, 1012,  627,  627,  627, 2407, 2407, 2407,  627, 1022,
-     1022, 1022, 1022, 2407, 2407, 1022, 1022,  633,  633,  633,
-     2407, 2407, 2407,  633, 1030, 1030, 1030, 1030, 2407, 2407,
-     1030, 1030,  641,  641,  641,  641, 2407,  641, 2407,  641,
-
-     1036, 1036, 1036, 1036, 2407, 2407, 1036, 1036, 1043, 1043,
-     1043, 1043, 2407, 2407, 1043, 1043,  649,  649,  649,  649,
-     2407,  649, 2407,  649, 1051, 1051, 1051, 1051, 2407, 2407,
-     1051, 1051,  822,  822,  822,  822,  822,  822,  822,  822,
-      822, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206,
-      495,  495,  495, 2407, 2407, 2407,  495,  837,  837,  837,
-      837, 2407, 2407,  837,  837,  865,  865,  865,  865, 2407,
-     2407,  865,  865,  523,  523,  523, 2407, 2407, 2407,  523,
-      875,  875,  875,  875, 2407, 2407,  875,  875,  531,  531,
-      531, 2407, 2407, 2407,  531,  891,  891,  891,  891, 2407,
-
-     2407,  891,  891,  543,  543,  543, 2407, 2407, 2407,  543,
-      899,  899,  899,  899, 2407, 2407,  899,  899,  549,  549,
-      549, 2407, 2407, 2407,  549,  562,  562,  562, 2407, 2407,
-     2407,  562,  926,  926,  926,  926, 2407, 2407,  926,  926,
-      570,  570,  570, 2407, 2407, 2407,  570,  949,  949,  949,
-      949, 2407, 2407,  949,  949,  585,  585,  585, 2407, 2407,
-     2407,  585,  964,  964,  964,  964, 2407, 2407,  964,  964,
-      595,  595,  595, 2407, 2407, 2407,  595,  972,  972,  972,
-      972, 2407, 2407,  972,  972,  600,  600,  600, 2407, 2407,
-     2407,  600,  983,  983,  983,  983, 2407, 2407,  983,  983,
-
-      608,  608,  608, 2407, 2407, 2407,  608,  992,  992,  992,
-      992, 2407, 2407,  992,  992,  615,  615,  615,  615, 2407,
-      615, 2407,  615, 1004, 1004, 1004, 1004, 2407, 2407, 1004,
-     1004,  622,  622,  622, 2407, 2407, 2407,  622, 1012, 1012,
-     1012, 1012, 2407, 2407, 1012, 1012,  627,  627,  627,  627,
-     2407,  627, 2407,  627, 1022, 1022, 1022, 1022, 2407, 2407,
-     1022, 1022,  633,  633,  633, 2407, 2407, 2407,  633, 1030,
-     1030, 1030, 1030, 2407, 2407, 1030, 1030, 1036, 1036, 1036,
-     1036, 2407, 2407, 1036, 1036, 1043, 1043, 1043, 1043, 2407,
-     2407, 1043, 1043, 1051, 1051, 1051, 1051, 2407, 2407, 1051,
-
-     1051,  822,  822,  822,  822,  822,  822,  822,  822,  822,
-     1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206,  495,
-      495,  495,  495, 2407,  495, 2407,  495,  837,  837,  837,
-      837, 2407, 2407,  837,  837,  865,  865,  865,  865, 2407,
-     2407,  865,  865,  523,  523,  523, 2407, 2407, 2407,  523,
-      875,  875,  875,  875, 2407, 2407,  875,  875,  531,  531,
-      531, 2407, 2407, 2407,  531,  891,  891,  891,  891, 2407,
-     2407,  891,  891,  543,  543,  543,  543, 2407,  543, 2407,
-      543,  899,  899,  899,  899, 2407, 2407,  899,  899,  549,
-      549,  549,  549, 2407,  549, 2407,  549,  562,  562,  562,
-
-     2407, 2407, 2407,  562,  570,  570,  570, 2407, 2407, 2407,
-      570,  949,  949,  949,  949, 2407, 2407,  949,  949,  585,
-      585,  585, 2407, 2407, 2407,  585,  595,  595,  595, 2407,
-     2407, 2407,  595,  972,  972,  972,  972, 2407, 2407,  972,
-      972,  600,  600,  600, 2407, 2407, 2407,  600,  608,  608,
-      608, 2407, 2407, 2407,  608,  992,  992,  992,  992, 2407,
-     2407,  992,  992,  615,  615,  615, 2407, 2407, 2407,  615,
-     1004, 1004, 1004, 1004, 2407, 2407, 1004, 1004,  622,  622,
-      622, 2407, 2407, 2407,  622, 1012, 1012, 1012, 1012, 2407,
-     2407, 1012, 1012, 1022, 1022, 1022, 1022, 2407, 2407, 1022,
-
-     1022,  633,  633,  633, 2407, 2407, 2407,  633, 1030, 1030,
-     1030, 1030, 2407, 2407, 1030, 1030, 1036, 1036, 1036, 1036,
-     2407, 2407, 1036, 1036, 1043, 1043, 1043, 1043, 2407, 2407,
-     1043, 1043,  822,  822,  822,  822,  822,  822,  822,  822,
-      822, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206,
-      837,  837,  837,  837, 2407, 2407,  837,  837,  865,  865,
-      865,  865, 2407, 2407,  865,  865,  523,  523,  523, 2407,
-     2407, 2407,  523,  531,  531,  531, 2407, 2407, 2407,  531,
-      891,  891,  891,  891, 2407, 2407,  891,  891, 2075, 2075,
-     2075, 2075, 2075, 2075, 2075, 2075, 2075, 2076, 2076, 2076,
-
-     2076, 2076, 2076, 2076, 2076, 2076, 2119, 2119, 2119, 2119,
-     2119, 2119, 2119, 2119, 2119, 2122, 2122, 2122, 2122, 2122,
-     2122, 2122, 2122, 2122, 2150, 2150, 2150, 2150, 2150, 2150,
-     2150, 2150, 2150, 2152, 2152, 2152, 2152, 2152, 2152, 2152,
-     2152, 2152,  193, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407
+      469,  467,  467,  467,  930,  467,  471,  467,  472,  467,
+      951,  951,  951,  951,  951,  951,  763,  763,  763,  962,
+      962,  962,  966,  966,  966,  966,  966,  966,  953, 1944,
+     1945,  953, 1946,  764,  467,  467,  963,  771,  771,  771,
+      968, 1955, 1212,  968, 1956,  473,  974,  974,  974, 1957,
+     1932,  974,  974,  974,  772, 1958, 1965,  474,  482, 1968,
+      776,  776,  776, 1933,  976,  497,  985,  985,  985,  976,
+      954,  985,  985,  985,  481,  498,  969,  777,  979,  979,
+      979, 1975,  980, 1922,  987,  981, 1228, 1228, 1228,  987,
+      989,  989,  989, 1231, 1231, 1231,  991,  991,  991,  994,
+
+      994,  994,  499,  500,  501, 1212, 1936,  990, 1976,  502,
+      503,  977,  504,  992, 1977, 1978,  505,  996,  506, 1937,
+      507, 2420, 2420, 2420, 1979, 1980,  988,  994,  994,  994,
+      999,  999,  999, 2420, 2420, 2420, 1986, 1987, 2420, 1003,
+     1003, 1003, 2420, 2420, 2420,  996, 1923, 1000, 1988, 1989,
+     2420, 1006, 1006, 1006,  825, 1990, 1004, 1991, 1992, 2420,
+     1993, 1994, 1006, 1006, 1006,  796,  796,  796, 1995, 1008,
+     1011, 1011, 1011, 1998, 1012, 1212, 1999, 1013, 2000,  993,
+     1008, 2001,  797, 1001, 1014, 1014, 1014,  997, 1014, 1014,
+     1014, 1018, 1018, 1018, 2420, 2420, 2420, 1002, 2002, 1009,
+
+     1005, 1982, 1016, 1022, 1022, 1022, 1016, 2003, 1019, 2004,
+     1983, 2420, 1024, 1024, 1024, 1024, 1024, 1024, 2005, 2010,
+     1023, 1032, 1032, 1032, 1032, 1032, 1032, 1038, 1038, 1038,
+     1026, 2011, 2012, 1026, 1038, 1038, 1038, 2013, 2014, 1034,
+     2015, 2019, 1034, 1017, 1020, 1040,  815,  815,  815, 1042,
+     1042, 1042, 1040, 1043, 2028, 2029, 1044, 2030, 1021, 1045,
+     1045, 1045, 2031,  816, 1045, 1045, 1045,  819,  819,  819,
+     2032, 1049, 1049, 1049, 2033, 1050,  825, 1047, 1051,  871,
+      871,  871, 1047,  872,  820, 1027,  873, 1035, 1053, 1053,
+     1053, 1053, 1053, 1053,  838,  838,  838, 1041,  838,  838,
+
+      838,  838,  838,  838, 2044, 2045, 1055, 1911, 2020, 1055,
+     2036, 2046,  840, 1088, 1088, 1088,  840, 1912, 2021,  840,
+      866,  866,  866, 1913, 1048,  866,  866,  866, 2047, 2048,
+     1089,  866,  866,  866, 1091, 1091, 1091, 1914,  868, 2420,
+     2420, 2420, 2022,  868,  876,  876,  876, 1915, 1065,  868,
+     2024, 1092, 2023, 1916, 1056, 2049, 2420,  876,  876,  876,
+     2025, 2026,  878,  876,  876,  876,  881,  881,  881, 2050,
+      882, 2027, 2051,  883, 2055,  878,  884,  884,  884, 2056,
+     1090,  878, 1097, 1097, 1097, 2057, 1098, 2058, 2059, 1099,
+     1100, 1100, 1100,  885,  887,  887,  887, 2060, 2062, 1093,
+
+     2063, 1102, 1102, 1102, 2064, 1103, 2067, 1101, 1104, 2072,
+     1095,  888, 1106, 1106, 1106,  892,  892,  892,  892,  892,
+      892,  892,  892,  892, 1112, 1112, 1112, 2073, 2074, 1107,
+      900,  900,  900,  894, 2075, 2076,  894, 2077, 2078,  894,
+     2079, 1113,  900,  900,  900,  900,  900,  900,  902,  904,
+      904,  904, 2080,  905, 2081, 2082,  906,  908,  908,  908,
+      902, 2083, 2090,  902,  908,  908,  908, 1117, 1117, 1117,
+     1128, 1128, 1128, 2091, 2092,  910,  825,  922,  922,  922,
+     1109,  923,  910, 2093,  924, 1118, 2094, 1129,  927,  927,
+      927, 2095, 1115,  927,  927,  927,  927,  927,  927, 2096,
+
+      935,  935,  935, 2097,  936, 2098,  929,  937, 1137, 1137,
+     1137,  929, 2099, 2100,  929,  939,  939,  939, 2084,  940,
+     2101, 2102,  941, 2103, 2106, 1138,  942,  942,  942, 1139,
+     1139, 1139, 2107, 1140, 2108, 2112, 1141,  951,  951,  951,
+      951,  951,  951,  943,  951,  951,  951,  959,  959,  959,
+     2119,  960, 2120, 2121,  961,  953, 2122, 2123,  953, 2124,
+     1132, 2125,  953,  962,  962,  962, 1154, 1154, 1154, 2126,
+     1155, 2127, 2128, 1156,  966,  966,  966,  966,  966,  966,
+      963,  966,  966,  966,  971,  971,  971, 2129,  972, 2130,
+     2138,  973,  968, 2139, 2140,  968,  974,  974,  974,  968,
+
+      974,  974,  974,  974,  974,  974,  985,  985,  985,  825,
+     1149,  985,  985,  985,  976,  979,  979,  979,  976,  980,
+     2133,  976,  981, 2141,  987,  985,  985,  985, 2133,  987,
+     2142, 2136, 1159,  989,  989,  989, 2143, 1167, 1167, 1167,
+     2144, 1168, 2134,  987, 1169,  991,  991,  991, 2145, 2146,
+      990, 1170, 1170, 1170, 2131, 1171, 2147, 2148, 1172,  994,
+      994,  994,  992,  994,  994,  994,  999,  999,  999, 1161,
+      994,  994,  994, 1003, 1003, 1003, 2153,  996, 1176, 1176,
+     1176,  996, 1177, 1000, 1166, 1178, 2158, 2159,  996, 2160,
+     1004, 1181, 1181, 1181, 2161, 1182, 1212, 1213, 1183, 1006,
+
+     1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1011, 1011,
+     1011,  825, 1012, 2164, 2164, 1013, 2167, 1008, 2168, 2169,
+     1008, 2170, 2179, 1008, 1014, 1014, 1014, 1014, 1014, 1014,
+     1014, 1014, 1014, 1018, 1018, 1018, 1174, 1188, 1188, 1188,
+     2182, 1189, 1016, 2187, 1190, 1016, 2149, 2177, 1016, 2151,
+     1019, 2162, 1022, 1022, 1022, 1193, 1193, 1193, 2150, 1194,
+     2190, 2152, 1195, 1024, 1024, 1024, 2178, 2154, 1185, 1023,
+     1024, 1024, 1024, 1024, 1024, 1024, 1198, 1198, 1198, 2155,
+     2156, 1026, 1032, 1032, 1032, 1032, 1032, 1032, 1026, 1187,
+     2133, 1026, 2157, 1199, 1032, 1032, 1032, 1038, 1038, 1038,
+
+     1034, 2136, 2180, 1034, 1038, 1038, 1038, 1038, 1038, 1038,
+     2133, 2164, 1034, 2185, 2188, 1040, 1042, 1042, 1042, 2192,
+     1043, 2181, 1040, 1044, 2134, 1040, 1045, 1045, 1045, 1045,
+     1045, 1045, 2186, 2189, 1196, 1045, 1045, 1045, 1049, 1049,
+     1049, 2164, 1050, 2193, 1047, 1051, 2194, 1047, 1053, 1053,
+     1053, 2195, 2196, 1047, 1202, 1053, 1053, 1053, 2206, 2207,
+     1205, 1053, 1053, 1053, 2208, 2209, 1055, 1211, 1211, 1211,
+      838,  838,  838, 1055, 1088, 1088, 1088, 2210, 2211, 1055,
+     1242, 1242, 1242, 2215, 1243, 1212, 1213, 1244,  840, 2216,
+     2217, 1089, 2218, 2219, 1206,  866,  866,  866, 1091, 1091,
+
+     1091, 1246, 1246, 1246, 2220, 1247, 2222, 2223, 1248,  876,
+      876,  876, 2224,  868, 2229, 1092, 1097, 1097, 1097, 2230,
+     1098, 1208, 2225, 1099, 1100, 1100, 1100,  878, 2231, 1253,
+     1253, 1253, 2227, 1254, 2226, 1218, 1255, 2232, 1102, 1102,
+     1102, 1101, 1103, 2233, 2228, 1104, 1106, 1106, 1106, 1257,
+     1257, 1257, 1245, 1258, 2234, 2235, 1259, 2236, 1251,  892,
+      892,  892, 2237, 1107, 1112, 1112, 1112, 1264, 1264, 1264,
+     2238, 1265, 2239, 2240, 1266, 2242,  825,  894, 1267, 1267,
+     1267, 1113,  900,  900,  900, 1117, 1117, 1117, 1128, 1128,
+     1128, 2243, 1280, 1280, 1280, 1268, 1281, 2244, 2245, 1282,
+
+      902, 2241, 2246, 1118, 2247, 1129, 1283, 1283, 1283, 1261,
+     1285, 1285, 1285, 2248,  927,  927,  927, 1290, 1290, 1290,
+     1137, 1137, 1137, 1284, 1297, 1297, 1297, 1286, 1226, 1226,
+     1226, 1269,  929, 2249, 1291, 2250, 2251, 1138, 1294, 1294,
+     1294, 1298, 1295, 2252, 2253, 1296, 1139, 1139, 1139, 2254,
+     1140, 2255, 2256, 1141, 2257, 2258, 1287,  951,  951,  951,
+     1307, 1307, 1307, 1154, 1154, 1154, 2259, 1155,  825, 2261,
+     1156, 1311, 1311, 1311, 1326,  953, 2262, 1308, 2263, 1288,
+      966,  966,  966,  974,  974,  974, 2264, 2260, 1312, 1320,
+     1320, 1320, 2265,  985,  985,  985, 2266, 2267,  968, 2268,
+
+     2269,  976, 2270, 1167, 1167, 1167, 1321, 1168, 2271, 2272,
+     1169,  987, 1170, 1170, 1170, 2273, 1171, 2274, 2275, 1172,
+     2276, 1305,  994,  994,  994, 1176, 1176, 1176, 2278, 1177,
+     2279, 2280, 1178, 2281, 2282, 1322,  825, 1181, 1181, 1181,
+      996, 1182, 2283, 1314, 1183, 1006, 1006, 1006, 1316, 1323,
+     1014, 1014, 1014, 1188, 1188, 1188, 2277, 1189, 2284, 2285,
+     1190, 2286, 2287, 1008, 2288, 1193, 1193, 1193, 1016, 1194,
+     2289, 2290, 1195, 1024, 1024, 1024, 1198, 1198, 1198, 1337,
+     1337, 1337, 2291, 1338, 2292, 2293, 1339, 1325, 1368, 1368,
+     1368, 1026, 2295, 1199, 1032, 1032, 1032, 1344, 1344, 1344,
+
+     1038, 1038, 1038, 2296,  825, 1330, 1332, 1045, 1045, 1045,
+     2294, 2297, 1034, 2298, 1345, 1348, 1348, 1348, 1040, 2299,
+     1335, 1053, 1053, 1053, 2300, 1047, 1211, 1211, 1211,  838,
+      838,  838, 1349, 1370, 1370, 1370, 1239, 1239, 1239, 1055,
+     1377, 1377, 1377, 1342, 1212, 2301, 2302,  840, 1242, 1242,
+     1242, 1369, 1243, 2303, 2304, 1244,  866,  866,  866, 1347,
+     1246, 1246, 1246, 2305, 1247, 2306, 1346, 1248, 2308,  876,
+      876,  876, 2309, 2310,  868, 2311, 2312, 1352, 2313, 1371,
+      825, 1357, 1350,  892,  892,  892, 1378,  878, 1253, 1253,
+     1253, 2314, 1254, 1353, 2307, 1255, 1257, 1257, 1257, 2315,
+
+     1258,  894, 2317, 1259, 1262, 1262, 1262, 1264, 1264, 1264,
+     2318, 1265, 2319, 2320, 1266, 1267, 1267, 1267, 2321, 2322,
+     1382, 2323, 1379, 1396, 1396, 1396, 2324, 1397, 2327, 2328,
+     1398, 2329, 1268,  900,  900,  900, 1273, 1273, 1273, 1274,
+     1274, 1274, 2330, 1386, 1403, 1403, 1403, 1403, 1403, 1403,
+     2331,  902, 1368, 1368, 1368, 1280, 1280, 1280, 2332, 1281,
+      825, 2343, 1282, 1283, 1283, 1283, 1407, 1407, 1407,  825,
+     1408,  825,  825, 1409, 1285, 1285, 1285, 1414, 1414, 1414,
+     1284, 1410, 1410, 1410, 1399, 1411, 2341, 1544, 1412, 1543,
+      825, 1286, 1290, 1290, 1290, 1415, 1417, 1417, 1417,  825,
+
+     1418, 2379, 2361, 1419, 1420, 1420, 1420, 1404, 2333, 1291,
+     1369,  825, 1294, 1294, 1294, 1404, 1295,  825, 2335, 1296,
+     2344, 1421, 1297, 1297, 1297, 1423, 1423, 1423,  825, 1424,
+      825,  825, 1425, 1426, 1426, 1426, 1432, 1432, 1432, 1298,
+      951,  951,  951, 1307, 1307, 1307, 2336, 1436, 1436, 1436,
+     1427, 1437, 2353, 1433, 1438, 1439, 1439, 1439,  953, 2417,
+     1308, 1311, 1311, 1311, 1442, 1442, 1442, 2334, 1443,  825,
+      825, 1444, 1440, 1446, 1446, 1446,  825, 2337, 1312,  974,
+      974,  974, 1320, 1320, 1320, 1453, 1453, 1453,  825, 1454,
+      825, 1447, 1455, 1457, 1457, 1457, 2345,  976,  825, 1321,
+
+      994,  994,  994,  825,  825, 1434, 1462, 1462, 1462, 2351,
+      825, 1458, 1464, 1464, 1464, 2420, 2420, 2420,  996, 1006,
+     1006, 1006, 2347, 1463, 1014, 1014, 1014, 2349, 2346, 1465,
+     1449, 2339, 2420, 1470, 1470, 1470,  825, 1008, 1472, 1472,
+     1472, 2340, 1016, 1024, 1024, 1024, 1032, 1032, 1032, 2348,
+     1471, 1460, 1337, 1337, 1337, 1473, 1338, 2338, 2342, 1339,
+      825, 1026,  825,  825, 1034, 1344, 1344, 1344,  825,  825,
+     1469, 2362, 1480, 1480, 1480, 2375, 1481,  825, 1466, 1482,
+      825, 1541, 1345, 1540,  825, 1467, 1038, 1038, 1038, 2385,
+     1045, 1045, 1045, 1348, 1348, 1348,  825, 1478, 1485, 1485,
+
+     1485, 2373, 1486, 2352, 1040, 1487, 2350, 1474, 1047, 2359,
+     1349, 1488, 1488, 1488, 1494, 1494, 1494,  838,  838,  838,
+     1501, 1501, 1501, 1506, 1506, 1506, 1368, 1368, 1368, 1489,
+     2365, 1495, 1507, 1507, 1507,  840, 1370, 1370, 1370, 1509,
+     1509, 1509, 1536,  825, 1483, 1484, 1510, 1510, 1510, 1377,
+     1377, 1377,  866,  866,  866, 1518, 1518, 1518, 1521, 1521,
+     1521,  892,  892,  892, 1525, 1525, 1525, 1396, 1396, 1396,
+      868, 1397, 1533, 1519, 1398, 1522,  825, 1496, 2354,  894,
+      825, 1526,  900,  900,  900,  825, 1538, 1538, 1538, 1403,
+     1403, 1403, 1542, 1542, 1542,  825, 1532, 1407, 1407, 1407,
+
+      902, 1408, 1515, 1539, 1409, 1410, 1410, 1410,  825, 1411,
+      825,  825, 1412, 1414, 1414, 1414, 1417, 1417, 1417, 1524,
+     1418, 2355, 2367, 1419, 1420, 1420, 1420, 2360, 1537,  825,
+     2356, 1415, 1549, 1549, 1549,  825, 1550,  825,  825, 1551,
+      825, 1421, 1423, 1423, 1423, 2357, 1424, 2358, 2377, 1425,
+     1426, 1426, 1426, 1553, 1553, 1553,  825, 1554,  825,  825,
+     1555, 1556, 1556, 1556, 1432, 1432, 1432, 1427, 1561, 1561,
+     1561, 2366, 1562, 2363, 2369, 1563,  825, 2368, 1557, 2376,
+     2399, 1433,  951,  951,  951, 1436, 1436, 1436,  825, 1437,
+      825, 2364, 1438, 1439, 1439, 1439, 2378, 1566, 1566, 1566,
+
+      953, 1567,  825, 2370, 1568, 1442, 1442, 1442,  825, 1443,
+     1440, 2371, 1444, 1446, 1446, 1446,  974,  974,  974, 1574,
+     1574, 1574, 1453, 1453, 1453, 2372, 1454,  825,  825, 1455,
+      825, 1447,  825, 1564,  976, 2374, 1575, 1457, 1457, 1457,
+     1582, 1582, 1582, 1462, 1462, 1462, 1585, 1585, 1585, 2380,
+     1586, 2393,  825, 1587,  825, 1458, 1531, 2386, 1583,  825,
+     1463, 1464, 1464, 1464, 2389, 1576, 1588, 1588, 1588, 1528,
+     1589, 1527, 2381, 1590, 1006, 1006, 1006, 2382, 1465, 1572,
+     1014, 1014, 1014, 1470, 1470, 1470, 1595, 1595, 1595, 2383,
+     1596, 2384, 1008, 1597, 1472, 1472, 1472, 2387, 1016, 2394,
+
+     1471, 1598, 1598, 1598,  825, 1599,  825,  825, 1600,  825,
+      825, 1473, 1024, 1024, 1024, 1032, 1032, 1032, 1480, 1480,
+     1480,  825, 1481, 2388,  825, 1482, 1038, 1038, 1038, 1594,
+     1026,  825,  825, 1034, 1045, 1045, 1045,  825, 2390, 1592,
+      825, 1485, 1485, 1485, 1040, 1486, 2397, 2398, 1487, 1488,
+     1488, 1488, 1047, 1494, 1494, 1494, 1613, 1613, 1613, 1523,
+     1614, 2400, 1520, 1615,  838,  838,  838, 1489, 2405, 2391,
+     1495, 1617, 1617, 1617, 2406, 2401, 1601, 1607, 1517, 1605,
+     1516, 1514,  840, 1620, 1620, 1620,  825, 1608, 1501, 1501,
+     1501, 1621, 1621, 1621, 1624, 1624, 1624, 1506, 1506, 1506,
+
+     1507, 1507, 1507, 1509, 1509, 1509, 1510, 1510, 1510, 1626,
+     1626, 1626, 1627, 1627, 1627, 1628, 1628, 1628,  866,  866,
+      866, 1518, 1518, 1518, 1521, 1521, 1521, 1616, 1634, 1634,
+     1634, 2392, 1635,  825, 1513, 1636,  868,  825, 1512, 1519,
+     2417, 1522, 1638, 1638, 1638, 1525, 1525, 1525, 1640, 1640,
+     1640,  825, 1641,  825,  825, 1642,  900,  900,  900,  825,
+     1639, 1511, 1526, 1538, 1538, 1538, 1654, 1654, 1654, 1630,
+     1655,  825, 2402, 1656,  902, 1657, 1657, 1657, 1508, 2395,
+     1539, 1542, 1542, 1542, 1549, 1549, 1549,  825, 1550, 1505,
+     1504, 1551, 1553, 1553, 1553, 1503, 1554, 2396, 2403, 1555,
+
+     1556, 1556, 1556, 2407, 2404, 1653, 1668, 1668, 1668, 1502,
+     1669, 2409,  825, 1670, 1561, 1561, 1561, 1557, 1562, 2408,
+      825, 1563,  951,  951,  951, 1566, 1566, 1566,  825, 1567,
+     2410,  825, 1568, 1679, 1679, 1679, 1574, 1574, 1574,  825,
+      953, 1682, 1682, 1682, 2411, 1683, 1500,  825, 1684, 1499,
+     1498, 1680, 1497, 1575, 1582, 1582, 1582, 1585, 1585, 1585,
+     2412, 1586, 1493, 2415, 1587, 1479, 1588, 1588, 1588,  825,
+     1589, 1477, 1583, 1590, 1006, 1006, 1006, 1014, 1014, 1014,
+     1595, 1595, 1595, 1476, 1596, 1674, 1475, 1597, 1468, 1598,
+     1598, 1598, 1008, 1599, 2413, 1016, 1600, 1024, 1024, 1024,
+
+     1699, 1699, 1699, 1032, 1032, 1032, 1038, 1038, 1038, 1706,
+     1706, 1706, 1708, 1708, 1708, 1026, 2414, 1700, 1711, 1711,
+     1711, 1034, 1461, 1459, 1040, 1695, 1456, 1707, 1452, 1451,
+      825, 1450, 1448, 1698, 1613, 1613, 1613, 1445, 1614, 1441,
+     1435, 1615, 1697,  838,  838,  838, 1617, 1617, 1617, 1713,
+     1713, 1713, 1620, 1620, 1620, 1621, 1621, 1621, 1715, 1715,
+     1715,  840, 1716, 1716, 1716, 1705, 1431, 1703, 1624, 1624,
+     1624, 1626, 1626, 1626, 1627, 1627, 1627, 1628, 1628, 1628,
+     1719, 1719, 1719, 1722, 1722, 1722, 1634, 1634, 1634,  825,
+     1635, 1430, 1429, 1636, 1638, 1638, 1638, 1428, 1720, 1422,
+
+     1723, 1712, 1640, 1640, 1640, 1416, 1641, 1413, 1406, 1642,
+     1405, 1402, 1639,  900,  900,  900, 1654, 1654, 1654, 1401,
+     1655, 2416, 1400, 1656, 1657, 1657, 1657, 1387, 1668, 1668,
+     1668,  902, 1669, 1385, 1384, 1670, 1746, 1746, 1746, 1750,
+     1750, 1750, 1679, 1679, 1679, 1756, 1756, 1756, 1682, 1682,
+     1682, 1383, 1683, 1747, 1381, 1684, 1380, 1751, 1376, 1375,
+     1680, 1374, 1757, 1767, 1767, 1767, 1769, 1769, 1769, 1771,
+     1771, 1771, 1373, 1735, 1014, 1014, 1014, 1024, 1024, 1024,
+     1699, 1699, 1699, 1372, 1770, 1367, 1772, 1778, 1778, 1778,
+     1366, 1758, 1016, 1365, 1364, 1026, 1363, 1700, 1775, 1775,
+
+     1775, 1362, 1776, 1361, 1779, 1777, 1781, 1781, 1781, 1783,
+     1783, 1783, 1038, 1038, 1038, 1360, 1706, 1706, 1706, 1359,
+     1708, 1708, 1708, 1358, 1782, 1711, 1711, 1711, 1356, 1355,
+     1040, 1354, 1212, 1773, 1707, 1343, 1341, 1774,  825, 1788,
+     1788, 1788, 1713, 1713, 1713, 1715, 1715, 1715, 1716, 1716,
+     1716, 1719, 1719, 1719, 1722, 1722, 1722, 1789, 1794, 1794,
+     1794, 1340, 1795, 1336, 1334, 1796,  900,  900,  900, 1720,
+     1333, 1723, 1814, 1814, 1814, 1331, 1329, 1784, 1746, 1746,
+     1746, 1785, 1328, 1327,  902, 1324, 1818, 1818, 1818, 1815,
+     1819, 1319, 1318, 1820, 1317, 1747, 1822, 1822, 1822, 1750,
+
+     1750, 1750, 1826, 1826, 1826, 1756, 1756, 1756, 1829, 1829,
+     1829, 1315, 1830, 1823, 1313, 1831, 1310, 1751, 1309, 1827,
+     1306, 1304, 1757, 1303, 1302, 1808, 1837, 1837, 1837, 1767,
+     1767, 1767, 1769, 1769, 1769, 1771, 1771, 1771, 1841, 1841,
+     1841, 1301, 1842, 1838, 1300, 1843, 1844, 1844, 1844, 1299,
+     1770, 1293, 1772, 1024, 1024, 1024, 1775, 1775, 1775, 1292,
+     1776, 1289, 1279, 1777, 1845, 1778, 1778, 1778, 1847, 1847,
+     1847, 1026, 1848, 1278, 1277, 1849, 1850, 1850, 1850, 1781,
+     1781, 1781, 1779, 1783, 1783, 1783, 1852, 1852, 1852, 1788,
+     1788, 1788, 1276, 1851, 1860, 1860, 1860, 1782, 1794, 1794,
+
+     1794, 1275, 1795, 1272, 1853, 1796, 1271, 1789,  900,  900,
+      900, 1861, 1882, 1882, 1882, 1814, 1814, 1814, 1270, 1846,
+     1884, 1884, 1884, 1263, 1885, 1260,  902, 1886, 1256, 1883,
+     1252, 1250, 1815, 1818, 1818, 1818, 1249, 1819, 1241, 1240,
+     1820, 1822, 1822, 1822, 1890, 1890, 1890, 1238, 1891, 1237,
+     1236, 1892, 1894, 1894, 1894, 1826, 1826, 1826, 1823, 1896,
+     1896, 1896, 1235, 1897, 1234, 1233, 1898, 1879, 1232, 1895,
+     1230, 1229, 1827, 1899, 1899, 1899, 1829, 1829, 1829, 1225,
+     1830, 1223, 1222, 1831, 1837, 1837, 1837, 1904, 1904, 1904,
+     1900, 1905, 1221, 1220, 1906, 1907, 1907, 1907, 1909, 1909,
+
+     1909, 1838, 1841, 1841, 1841, 1219, 1842, 1217, 1216, 1843,
+     1215, 1214, 1908, 1207, 1204, 1910, 1844, 1844, 1844, 1024,
+     1024, 1024, 1847, 1847, 1847, 1203, 1848, 1201, 1200, 1849,
+     1850, 1850, 1850, 1197, 1845, 1192, 1191, 1026, 1918, 1918,
+     1918, 1186, 1919, 1184, 1180, 1920, 1179, 1851, 1852, 1852,
+     1852, 1924, 1924, 1924, 1860, 1860, 1860, 1927, 1927, 1927,
+     1175, 1928, 1173, 1165, 1929, 1164, 1853,  900,  900,  900,
+     1163, 1861, 1948, 1948, 1948, 1949, 1949, 1949, 1882, 1882,
+     1882, 1924, 1924, 1924, 1917,  902, 1952, 1952, 1952, 1162,
+     1953, 1160, 1950, 1954, 1158, 1883, 1884, 1884, 1884, 1157,
+
+     1885, 1153, 1152, 1886, 1890, 1890, 1890, 1151, 1891, 1150,
+     1148, 1892, 1894, 1894, 1894, 1959, 1959, 1959, 1947, 1960,
+     1147, 1951, 1961, 1896, 1896, 1896, 1146, 1897, 1145, 1895,
+     1898, 1899, 1899, 1899, 1962, 1962, 1962, 1144, 1963, 1143,
+     1142, 1964, 1966, 1966, 1966, 1904, 1904, 1904, 1900, 1905,
+     1136, 1135, 1906, 1907, 1907, 1907, 1969, 1969, 1969, 1967,
+     1970, 1134, 1133, 1971, 1909, 1909, 1909, 1972, 1972, 1972,
+     1908, 1973, 1131, 1130, 1974, 1024, 1024, 1024, 1918, 1918,
+     1918, 1910, 1919, 1127, 1126, 1920, 1984, 1984, 1984, 1125,
+     1927, 1927, 1927, 1026, 1928, 1124, 1123, 1929, 1996, 1996,
+
+     1996, 1122, 1121, 1985, 1212,  900,  900,  900, 1948, 1948,
+     1948, 1949, 1949, 1949, 1120, 1997, 1119, 2007, 2007, 2007,
+     1116, 2008, 1114,  902, 2009, 1111, 1981, 1108, 1950, 1952,
+     1952, 1952, 1105, 1953, 1096, 1094, 1954, 1959, 1959, 1959,
+     1087, 1960, 1085, 1084, 1961, 1962, 1962, 1962, 1083, 1963,
+     1082, 1081, 1964, 1080, 2006, 1966, 1966, 1966, 2016, 2016,
+     2016, 1079, 2017, 1078, 1075, 2018, 1969, 1969, 1969, 1074,
+     1970, 1073, 1967, 1971, 1972, 1972, 1972, 1072, 1973, 1071,
+     1070, 1974, 2034, 2034, 2034, 2037, 2037, 2037, 1984, 1984,
+     1984, 2039, 2039, 2039, 1069, 2040, 1068, 1067, 2041, 1066,
+
+     2035, 1064, 2038, 1212, 1063, 1985, 1212, 1062, 1061, 1212,
+     2042, 2042, 2042, 2043, 2043, 2043, 1996, 1996, 1996, 2052,
+     2052, 2052, 1060, 2053, 1059, 1058, 2054,  900,  900,  900,
+     2007, 2007, 2007, 1997, 2008,  825, 1052, 2009, 2065, 2065,
+     2065, 2068, 2068, 2068, 1037,  902, 2016, 2016, 2016, 1036,
+     2017, 1031, 1030, 2018, 1029, 2066, 1028, 1010, 2069, 2070,
+     2070, 2070, 2034, 2034, 2034, 2037, 2037, 2037, 2085, 2085,
+     2085,  998, 2086,  984,  983, 2087, 2071, 2039, 2039, 2039,
+     2035, 2040, 2038, 1212, 2041,  982, 1212, 2042, 2042, 2042,
+      978,  970, 2061,  965,  964, 1212, 1210, 1210, 1210, 1210,
+
+     1210, 1210, 1210, 1210, 1210,  958,  955, 1210, 2043, 2043,
+     2043,  950, 1210, 1210, 1210, 1212, 1210, 2052, 2052, 2052,
+      949, 2053,  948,  947, 2054, 2109, 2109, 2109,  946, 2110,
+      945,  944, 2111,  938, 2104, 2104, 2104,  931, 2065, 2065,
+     2065, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210,
+     1210, 1210, 2105,  926, 1210, 2066, 2068, 2068, 2068, 1210,
+     1210, 1210, 1212, 1210, 2113, 2113, 2113,  925, 2114,  921,
+      920, 2115,  919, 2069, 2070, 2070, 2070, 2116, 2116, 2116,
+      918, 2117,  917,  916, 2118, 2104, 2104, 2104, 1210, 1210,
+      915, 2071, 2085, 2085, 2085,  914, 2086,  913,  907, 2087,
+
+     2109, 2109, 2109, 2105, 2110,  899,  898, 2111,  897,  896,
+     1212, 1210, 1210, 1210, 1210, 1210, 2137, 1210, 1210, 1210,
+      891,  890, 1210,  889,  886,  880,  875, 1210, 1210, 1210,
+     1212, 1210, 2113, 2113, 2113,  874, 2114,  870,  865, 2115,
+     2116, 2116, 2116,  864, 2117,  863,  862, 2118,  861, 2166,
+     2166, 2166,  860, 2171, 2171, 2171, 1210, 1210, 1210, 1210,
+     1210, 1210, 1210, 1210, 1210, 1210, 2137, 1212, 1213, 1210,
+     2172, 2173, 2173, 2173, 1210, 1210, 1210, 1212, 1210, 2175,
+     2175, 2175, 2183, 2183, 2183, 2171, 2171, 2171, 2174, 2191,
+     2191, 2191, 2166, 2166, 2166,  858, 2176,  857,  856, 2184,
+
+      855,  854, 2172, 1210, 1210,  853,  852,  825,  851,  850,
+     1212, 2197, 2197, 2197,  849, 2198,  848,  847, 2199, 2173,
+     2173, 2173, 2200, 2200, 2200,  846, 2201,  845,  844, 2202,
+     2175, 2175, 2175, 2203, 2203, 2203, 2174, 2204,  837,  836,
+     2205,  835,  834, 1352, 2183, 2183, 2183, 2176, 2212, 2212,
+     2212,  833, 2213,  832,  831, 2214, 2191, 2191, 2191,  828,
+      826, 2184, 2197, 2197, 2197,  825, 2198,  823,  821, 2199,
+      818, 2200, 2200, 2200,  825, 2201,  814,  812, 2202, 2203,
+     2203, 2203,  811, 2204,  810,  808, 2205, 2212, 2212, 2212,
+      807, 2213,  806, 2221, 2214, 2316, 2316, 2316, 2316, 2316,
+
+     2316,  805, 2325,  804,  802, 2326, 2418, 2418, 2418, 2418,
+     2418, 2418,  801,  825,  800,  799,  825,  795,  794,  792,
+      791,  790,  789,  788, 2419,  787,  785, 2419,  194,  194,
+      194,  194,  194,  194,  194,  194,  194,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  200,  200,  200,  200,
+      200,  200,  200,  200,  200,  203,  203,  203,  203,  203,
+      203,  203,  203,  203,  206,  206,  206,  206,  206,  206,
+      206,  206,  206,  209,  209,  209,  209,  209,  209,  209,
+      209,  209,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  224,  224,  224,  224,  224,  224,  224,  224,  224,
+
+      228,  228,  228,  228,  228,  228,  228,  228,  228,  240,
+      240,  240,  240,  240,  240,  240,  240,  240,  244,  244,
+      244,  244,  244,  244,  244,  244,  244,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  261,  261,  261,  261,
+      261,  261,  261,  261,  261,  269,  269,  269,  269,  269,
+      269,  269,  269,  269,  277,  277,  277,  277,  277,  277,
+      277,  277,  277,  283,  283,  283,  283,  283,  283,  283,
+      283,  283,  289,  289,  289,  289,  289,  289,  289,  289,
+      289,  294,  294,  294,  294,  294,  294,  294,  294,  294,
+      311,  311,  311,  311,  311,  311,  311,  311,  311,  319,
+
+      319,  319,  319,  319,  319,  319,  319,  319,  337,  337,
+      337,  337,  337,  337,  337,  337,  337,  353,  353,  353,
+      353,  353,  353,  353,  353,  353,  359,  359,  359,  359,
+      359,  359,  359,  359,  359,  364,  364,  364,  364,  364,
+      364,  364,  364,  364,  370,  370,  370,  370,  370,  370,
+      370,  370,  370,  377,  377,  377,  377,  377,  377,  377,
+      377,  377,  384,  384,  384,  384,  384,  384,  384,  384,
+      384,  389,  389,  389,  389,  389,  389,  389,  389,  389,
+      397,  397,  397,  397,  397,  397,  397,  397,  397,  403,
+      403,  403,  403,  403,  403,  403,  403,  403,  410,  410,
+
+      410,  410,  410,  410,  410,  410,  410,  415,  415,  415,
+      415,  415,  415,  415,  415,  415,  421,  421,  421,  421,
+      421,  421,  421,  421,  421,  427,  427,  427,  427,  427,
+      427,  427,  427,  427,  434,  434,  434,  434,  434,  434,
+      434,  434,  434,  441,  441,  441,  441,  441,  441,  441,
+      441,  441,  449,  449,  449,  449,  449,  449,  449,  449,
+      449,  453,  453,  453,  453,  453,  453,  453,  453,  453,
+      459,  459,  459,  459,  459,  459,  459,  459,  459,  463,
+      463,  463,  463,  463,  463,  463,  463,  463,  470,  470,
+      470,  470,  470,  470,  470,  470,  470,  475,  475,  475,
+
+      475,  475,  475,  475,  475,  475,  495,  495,  495,  784,
+      783,  782,  495,  519,  519,  519,  780,  779,  778,  519,
+      523,  523,  523,  775,  774,  770,  523,  531,  531,  531,
+      769,  767,  766,  531,  543,  543,  543,  765,  762,  761,
+      543,  549,  549,  549,  760,  759,  757,  549,  562,  562,
+      562,  756,  755,  754,  562,  570,  570,  570,  753,  752,
+      751,  570,  586,  586,  586,  750,  747,  744,  586,  596,
+      596,  596,  743,  742,  740,  596,  601,  601,  601,  739,
+      734,  731,  601,  609,  609,  609,  729,  728,  727,  609,
+      616,  616,  616,  726,  725,  723,  616,  623,  623,  623,
+
+      720,  718,  717,  623,  628,  628,  628,  716,  714,  712,
+      628,  634,  634,  634,  711,  710,  709,  634,  642,  642,
+      642,  708,  707,  704,  642,  646,  646,  646,  703,  702,
+      699,  646,  650,  650,  650,  696,  695,  693,  650,  654,
+      654,  654,  654,  654,  654,  654,  692,  654,  495,  495,
+      495,  689,  687,  684,  495,  669,  678,  677,  676,  669,
+      519,  519,  519,  673,  672,  671,  519,  694,  670,  668,
+      667,  694,  523,  523,  523,  666,  665,  664,  523,  701,
+      663,  658,  655,  701,  531,  531,  531,  657,  652,  651,
+      531,  713,  649,  648,  647,  713,  543,  543,  543,  645,
+
+      643,  641,  543,  719,  638,  637,  636,  719,  549,  549,
+      549,  635,  633,  632,  549,  724,  631,  630,  629,  724,
+      562,  562,  562,  627,  625,  624,  562,  741,  622,  621,
+      618,  741,  570,  570,  570,  617,  615,  504,  570,  758,
+     2420,  610,  608,  758,  586,  586,  586,  607,  604,  603,
+      586,  768,  602,  600,  598,  768,  596,  596,  596,  597,
+      595,  593,  596,  773,  592,  591,  590,  773,  601,  601,
+      601,  589,  588,  587,  601,  781,  585,  576,  575,  781,
+      609,  609,  609,  574,  571,  569,  609,  786,  568,  567,
+      566,  786,  616,  616,  616,  565,  564,  563,  616,  793,
+
+      561, 2420,  510,  793,  623,  623,  623,  556,  551,  550,
+      623,  798,  548,  546,  545,  798,  628,  628,  628,  544,
+      542,  513,  628,  803, 2420,  537,  533,  803,  634,  634,
+      634,  532,  530,  529,  634,  809,  526,  525,  524,  809,
+      642,  642,  642,  522,  520,  518,  642,  813, 2420,  496,
+      494,  813,  646,  646,  646,  492,  486,  485,  646,  817,
+      486,  485,  484,  817,  650,  650,  650,  483, 2420, 2420,
+      650,  822, 2420, 2420, 2420,  822,  824,  824,  824,  824,
+      824,  824,  824,  824,  824,  830, 2420, 2420, 2420, 2420,
+      830,  495,  495,  495, 2420, 2420, 2420,  495,  839,  839,
+
+      839,  839, 2420, 2420,  839,  839,  519,  519,  519, 2420,
+     2420, 2420,  519,  867,  867,  867,  867, 2420, 2420,  867,
+      867,  523,  523,  523, 2420, 2420, 2420,  523,  877,  877,
+      877,  877, 2420, 2420,  877,  877,  531,  531,  531, 2420,
+     2420, 2420,  531,  893,  893,  893,  893, 2420, 2420,  893,
+      893,  543,  543,  543, 2420, 2420, 2420,  543,  901,  901,
+      901,  901, 2420, 2420,  901,  901,  549,  549,  549, 2420,
+     2420, 2420,  549,  909,  909,  909,  909, 2420, 2420,  909,
+      909,  562,  562,  562, 2420, 2420, 2420,  562,  928,  928,
+      928,  928, 2420, 2420,  928,  928,  570,  570,  570, 2420,
+
+     2420, 2420,  570,  952,  952,  952,  952, 2420, 2420,  952,
+      952,  586,  586,  586, 2420, 2420, 2420,  586,  967,  967,
+      967,  967, 2420, 2420,  967,  967,  596,  596,  596, 2420,
+     2420, 2420,  596,  975,  975,  975,  975, 2420, 2420,  975,
+      975,  601,  601,  601, 2420, 2420, 2420,  601,  986,  986,
+      986,  986, 2420, 2420,  986,  986,  609,  609,  609,  609,
+     2420,  609, 2420,  609,  995,  995,  995,  995, 2420, 2420,
+      995,  995,  616,  616,  616,  616, 2420,  616, 2420,  616,
+     1007, 1007, 1007, 1007, 2420, 2420, 1007, 1007,  623,  623,
+      623, 2420, 2420, 2420,  623, 1015, 1015, 1015, 1015, 2420,
+
+     2420, 1015, 1015,  628,  628,  628,  628, 2420,  628, 2420,
+      628, 1025, 1025, 1025, 1025, 2420, 2420, 1025, 1025,  634,
+      634,  634, 2420, 2420, 2420,  634, 1033, 1033, 1033, 1033,
+     2420, 2420, 1033, 1033,  642,  642,  642, 2420, 2420, 2420,
+      642, 1039, 1039, 1039, 1039, 2420, 2420, 1039, 1039, 1046,
+     1046, 1046, 1046, 2420, 2420, 1046, 1046,  650,  650,  650,
+     2420, 2420, 2420,  650, 1054, 1054, 1054, 1054, 2420, 2420,
+     1054, 1054,  824,  824,  824,  824,  824,  824,  824,  824,
+      824,  830, 2420,  830, 2420, 2420,  830,  495,  495,  495,
+     2420, 2420, 2420,  495,  839,  839,  839,  839, 2420, 2420,
+
+      839,  839,  519,  519,  519,  519, 2420,  519, 2420,  519,
+      867,  867,  867,  867, 2420, 2420,  867,  867,  523,  523,
+      523,  523, 2420,  523, 2420,  523,  877,  877,  877,  877,
+     2420, 2420,  877,  877,  531,  531,  531, 2420, 2420, 2420,
+      531,  893,  893,  893,  893, 2420, 2420,  893,  893,  543,
+      543,  543, 2420, 2420, 2420,  543,  901,  901,  901,  901,
+     2420, 2420,  901,  901,  549,  549,  549, 2420, 2420, 2420,
+      549,  909,  909,  909,  909, 2420, 2420,  909,  909,  562,
+      562,  562, 2420, 2420, 2420,  562,  928,  928,  928,  928,
+     2420, 2420,  928,  928,  570,  570,  570, 2420, 2420, 2420,
+
+      570,  952,  952,  952,  952, 2420, 2420,  952,  952,  586,
+      586,  586, 2420, 2420, 2420,  586,  967,  967,  967,  967,
+     2420, 2420,  967,  967,  596,  596,  596, 2420, 2420, 2420,
+      596,  975,  975,  975,  975, 2420, 2420,  975,  975,  601,
+      601,  601, 2420, 2420, 2420,  601,  986,  986,  986,  986,
+     2420, 2420,  986,  986,  609,  609,  609, 2420, 2420, 2420,
+      609,  995,  995,  995,  995, 2420, 2420,  995,  995,  616,
+      616,  616, 2420, 2420, 2420,  616, 1007, 1007, 1007, 1007,
+     2420, 2420, 1007, 1007,  623,  623,  623, 2420, 2420, 2420,
+      623, 1015, 1015, 1015, 1015, 2420, 2420, 1015, 1015,  628,
+
+      628,  628, 2420, 2420, 2420,  628, 1025, 1025, 1025, 1025,
+     2420, 2420, 1025, 1025,  634,  634,  634, 2420, 2420, 2420,
+      634, 1033, 1033, 1033, 1033, 2420, 2420, 1033, 1033,  642,
+      642,  642, 2420, 2420, 2420,  642, 1039, 1039, 1039, 1039,
+     2420, 2420, 1039, 1039, 1046, 1046, 1046, 1046, 2420, 2420,
+     1046, 1046,  650,  650,  650, 2420, 2420, 2420,  650, 1054,
+     1054, 1054, 1054, 2420, 2420, 1054, 1054,  824,  824,  824,
+      824,  824,  824,  824,  824,  824, 1210, 1210, 1210, 1210,
+     1210, 1210, 1210, 1210, 1210,  495,  495,  495, 2420, 2420,
+     2420,  495,  839,  839,  839,  839, 2420, 2420,  839,  839,
+
+      867,  867,  867,  867, 2420, 2420,  867,  867,  523,  523,
+      523, 2420, 2420, 2420,  523,  877,  877,  877,  877, 2420,
+     2420,  877,  877,  531,  531,  531, 2420, 2420, 2420,  531,
+      893,  893,  893,  893, 2420, 2420,  893,  893,  543,  543,
+      543, 2420, 2420, 2420,  543,  901,  901,  901,  901, 2420,
+     2420,  901,  901,  549,  549,  549, 2420, 2420, 2420,  549,
+      562,  562,  562, 2420, 2420, 2420,  562,  928,  928,  928,
+      928, 2420, 2420,  928,  928,  570,  570,  570, 2420, 2420,
+     2420,  570,  952,  952,  952,  952, 2420, 2420,  952,  952,
+      586,  586,  586, 2420, 2420, 2420,  586,  967,  967,  967,
+
+      967, 2420, 2420,  967,  967,  596,  596,  596, 2420, 2420,
+     2420,  596,  975,  975,  975,  975, 2420, 2420,  975,  975,
+      601,  601,  601, 2420, 2420, 2420,  601,  986,  986,  986,
+      986, 2420, 2420,  986,  986,  609,  609,  609, 2420, 2420,
+     2420,  609,  995,  995,  995,  995, 2420, 2420,  995,  995,
+      616,  616,  616, 2420, 2420, 2420,  616, 1007, 1007, 1007,
+     1007, 2420, 2420, 1007, 1007,  623,  623,  623, 2420, 2420,
+     2420,  623, 1015, 1015, 1015, 1015, 2420, 2420, 1015, 1015,
+      628,  628,  628, 2420, 2420, 2420,  628, 1025, 1025, 1025,
+     1025, 2420, 2420, 1025, 1025,  634,  634,  634, 2420, 2420,
+
+     2420,  634, 1033, 1033, 1033, 1033, 2420, 2420, 1033, 1033,
+      642,  642,  642,  642, 2420,  642, 2420,  642, 1039, 1039,
+     1039, 1039, 2420, 2420, 1039, 1039, 1046, 1046, 1046, 1046,
+     2420, 2420, 1046, 1046,  650,  650,  650,  650, 2420,  650,
+     2420,  650, 1054, 1054, 1054, 1054, 2420, 2420, 1054, 1054,
+      824,  824,  824,  824,  824,  824,  824,  824,  824, 1210,
+     1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210,  495,  495,
+      495, 2420, 2420, 2420,  495,  839,  839,  839,  839, 2420,
+     2420,  839,  839,  867,  867,  867,  867, 2420, 2420,  867,
+      867,  523,  523,  523, 2420, 2420, 2420,  523,  877,  877,
+
+      877,  877, 2420, 2420,  877,  877,  531,  531,  531, 2420,
+     2420, 2420,  531,  893,  893,  893,  893, 2420, 2420,  893,
+      893,  543,  543,  543, 2420, 2420, 2420,  543,  901,  901,
+      901,  901, 2420, 2420,  901,  901,  549,  549,  549, 2420,
+     2420, 2420,  549,  562,  562,  562, 2420, 2420, 2420,  562,
+      928,  928,  928,  928, 2420, 2420,  928,  928,  570,  570,
+      570, 2420, 2420, 2420,  570,  952,  952,  952,  952, 2420,
+     2420,  952,  952,  586,  586,  586, 2420, 2420, 2420,  586,
+      967,  967,  967,  967, 2420, 2420,  967,  967,  596,  596,
+      596, 2420, 2420, 2420,  596,  975,  975,  975,  975, 2420,
+
+     2420,  975,  975,  601,  601,  601, 2420, 2420, 2420,  601,
+      986,  986,  986,  986, 2420, 2420,  986,  986,  609,  609,
+      609, 2420, 2420, 2420,  609,  995,  995,  995,  995, 2420,
+     2420,  995,  995,  616,  616,  616,  616, 2420,  616, 2420,
+      616, 1007, 1007, 1007, 1007, 2420, 2420, 1007, 1007,  623,
+      623,  623, 2420, 2420, 2420,  623, 1015, 1015, 1015, 1015,
+     2420, 2420, 1015, 1015,  628,  628,  628,  628, 2420,  628,
+     2420,  628, 1025, 1025, 1025, 1025, 2420, 2420, 1025, 1025,
+      634,  634,  634, 2420, 2420, 2420,  634, 1033, 1033, 1033,
+     1033, 2420, 2420, 1033, 1033, 1039, 1039, 1039, 1039, 2420,
+
+     2420, 1039, 1039, 1046, 1046, 1046, 1046, 2420, 2420, 1046,
+     1046, 1054, 1054, 1054, 1054, 2420, 2420, 1054, 1054,  824,
+      824,  824,  824,  824,  824,  824,  824,  824, 1210, 1210,
+     1210, 1210, 1210, 1210, 1210, 1210, 1210,  495,  495,  495,
+      495, 2420,  495, 2420,  495,  839,  839,  839,  839, 2420,
+     2420,  839,  839,  867,  867,  867,  867, 2420, 2420,  867,
+      867,  523,  523,  523, 2420, 2420, 2420,  523,  877,  877,
+      877,  877, 2420, 2420,  877,  877,  531,  531,  531, 2420,
+     2420, 2420,  531,  893,  893,  893,  893, 2420, 2420,  893,
+      893,  543,  543,  543,  543, 2420,  543, 2420,  543,  901,
+
+      901,  901,  901, 2420, 2420,  901,  901,  549,  549,  549,
+      549, 2420,  549, 2420,  549,  562,  562,  562, 2420, 2420,
+     2420,  562,  570,  570,  570, 2420, 2420, 2420,  570,  952,
+      952,  952,  952, 2420, 2420,  952,  952,  586,  586,  586,
+     2420, 2420, 2420,  586,  596,  596,  596, 2420, 2420, 2420,
+      596,  975,  975,  975,  975, 2420, 2420,  975,  975,  601,
+      601,  601, 2420, 2420, 2420,  601,  609,  609,  609, 2420,
+     2420, 2420,  609,  995,  995,  995,  995, 2420, 2420,  995,
+      995,  616,  616,  616, 2420, 2420, 2420,  616, 1007, 1007,
+     1007, 1007, 2420, 2420, 1007, 1007,  623,  623,  623, 2420,
+
+     2420, 2420,  623, 1015, 1015, 1015, 1015, 2420, 2420, 1015,
+     1015, 1025, 1025, 1025, 1025, 2420, 2420, 1025, 1025,  634,
+      634,  634, 2420, 2420, 2420,  634, 1033, 1033, 1033, 1033,
+     2420, 2420, 1033, 1033, 1039, 1039, 1039, 1039, 2420, 2420,
+     1039, 1039, 1046, 1046, 1046, 1046, 2420, 2420, 1046, 1046,
+      824,  824,  824,  824,  824,  824,  824,  824,  824, 1210,
+     1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210,  839,  839,
+      839,  839, 2420, 2420,  839,  839,  867,  867,  867,  867,
+     2420, 2420,  867,  867,  523,  523,  523, 2420, 2420, 2420,
+      523,  531,  531,  531, 2420, 2420, 2420,  531,  893,  893,
+
+      893,  893, 2420, 2420,  893,  893, 2088, 2088, 2088, 2088,
+     2088, 2088, 2088, 2088, 2088, 2089, 2089, 2089, 2089, 2089,
+     2089, 2089, 2089, 2089, 2132, 2132, 2132, 2132, 2132, 2132,
+     2132, 2132, 2132, 2135, 2135, 2135, 2135, 2135, 2135, 2135,
+     2135, 2135, 2163, 2163, 2163, 2163, 2163, 2163, 2163, 2163,
+     2163, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165,
+      193, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420
     } ;
 
-static yyconst flex_int16_t yy_chk[8116] =
+static yyconst flex_int16_t yy_chk[8134] =
     {   0,
         0,    3,    3,    3,    4,    4,    4,    5,    5,    5,
         6,    6,    6,    7,    7,    7,   11,    3,    9,   12,
@@ -2241,15 +2248,15 @@ static yyconst flex_int16_t yy_chk[8116] =
        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
        21,   21,   21,  305,   21,   21,   21,   21,   21,   26,
        26,   26,   27,   27,   27,   28,   28,   28,  231,   29,
-       29,   29,   30,   30,   30,   26,  302, 1417,   27,  220,
+       29,   29,   30,   30,   30,   26,  302, 1411,   27,  220,
       225,   28,  231,   21,   21,   29,  302,  241,   30,   31,
        31,   31,  222,  222,  222,  220,  225,  229,  229,  229,
-      238,  238,  238,  241, 1424,   31,   21,   22,   22,   22,
+      238,  238,  238,  241, 1412,   31,   21,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
        22,   22,  322,   22,   22,   22,   22,   22,   32,   32,
 
        32,   33,   33,   33,   34,   34,   34,  220,   35,   35,
-       35,   36,   36,   36,   32,  232,  307,   33,  307, 1425,
+       35,   36,   36,   36,   32,  232,  307,   33,  307, 1413,
        34,  380,   22,   22,   35,  232,  233,   36,   37,   37,
        37,   38,   38,   38,   39,   39,   39,   40,   40,   40,
        41,   41,   41,  322,   37,   22,  334,   38,  251,  334,
@@ -2259,7 +2266,7 @@ static yyconst flex_int16_t yy_chk[8116] =
        43,   43,   43,   43,   43,   43,   43,   43,   43,  301,
        43,   43,   43,   43,   43,   45,   45,   45,   46,   46,
 
-       46,   53,   53,   53,  234,  266, 1429,   49,   49,  266,
+       46,   53,   53,   53,  234,  266, 1416,   49,   49,  266,
       278,   45,   49,  266,   46,  443,  234,   53,  234,   43,
        43,  445,   49,  248,  248,  248,  278,   43,   44,   44,
        44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
@@ -2267,79 +2274,79 @@ static yyconst flex_int16_t yy_chk[8116] =
       388,   49,  443,   50,   50,   54,   54,   54,   50,   55,
        55,   55,   56,   56,   56,  259,  259,  259,   50,  330,
       402,   54,  445,   44,   44,   55,  488,  402,   56,  488,
-     1435,   44,   47,   47,   47,   47,   47,   47,   47,   47,
+     1422,   44,   47,   47,   47,   47,   47,   47,   47,   47,
        47,   47,   47,   47,   47,   47,   47,   50,   47,   47,
 
        47,   47,   47,   57,   57,   57,   58,   58,   58,   59,
        59,   59,  268,   60,   60,   60,   63,   63,   63,   57,
       290,  312,   58,  246,  256,   59,  268,   47,   47,   60,
-      246,  256,   63, 1439, 1347,   47,  290,  312,   47,  246,
+      246,  256,   63, 1429, 1430,   47,  290,  312,   47,  246,
       256,  270,  270,  270,   47,   48,   48,   48,   48,   48,
        48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
-      444,   48,   48,   48,   48,   48,   64,   64,   64,   67,
-       67,   67,   68,   68,   68, 1347,   69,   69,   69,   70,
-       70,   70,   64,  327,  344,   67,  285,  360,   68, 1442,
-       48,   48,   69,  285,  336,   70, 1444,  444,   48,  327,
+      479,   48,   48,   48,   48,   48,   64,   64,   64,   67,
+       67,   67,   68,   68,   68,  479,   69,   69,   69,   70,
+       70,   70,   64,  327,  335,   67,  285,  344,   68,  376,
+       48,   48,   69,  285,  336,   70, 1431,  335,   48,  327,
 
-      344,   48,  285,  360,  212,  336,  336,   48,   51,   51,
+      376,   48,  285,  344,  212,  336,  336,   48,   51,   51,
        51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
-       51,   51,   51,  527,   51,   51,   51,   51,   51,   71,
-       71,   71,   72,   72,   72,   73,   73,   73,  376,   74,
-       74,   74,   75,   75,   75,   71,  212,  371,   72,  376,
-      339,   73,  212,   51,   51,   74,  212,  339,   75,  527,
-     1446,  212,   51,  371,   51,  406,  339,   51,  275,  275,
-      275,  430,   51,   51,   52,   52,   52,   52,   52,   52,
-       52,   52,   52,   52,   52,   52,   52,   52,   52, 1448,
+       51,   51,   51,  444,   51,   51,   51,   51,   51,   71,
+       71,   71,   72,   72,   72,   73,   73,   73,  466,   74,
+       74,   74,   75,   75,   75,   71,  212,  360,   72,  371,
+      339,   73,  212,   51,   51,   74,  212,  339,   75, 1435,
+      444,  212,   51,  360,   51,  371,  339,   51,  275,  275,
+      275,  406,   51,   51,   52,   52,   52,   52,   52,   52,
+       52,   52,   52,   52,   52,   52,   52,   52,   52,  466,
        52,   52,   52,   52,   52,   76,   76,   76,   77,   77,
 
-       77,   78,   78,   78,  466,   79,   79,   79,   80,   80,
-       80,   76,  406,  385,   77,  355,  366,   78,  430,   52,
+       77,   78,   78,   78, 1390,   79,   79,   79,   80,   80,
+       80,   76, 1390,  385,   77,  355,  366,   78,  406,   52,
        52,   79,  355,  366,   80,  284,  284,  284,   52,  385,
        52,  355,  366,   52,  287,  287,  287,  391,   52,   52,
        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
-       61,   61,   61,   61,   61,  466,   61,   61,   61,   61,
+       61,   61,   61,   61,   61,  527,   61,   61,   61,   61,
        61,   81,   81,   81,   82,   82,   82,   83,   83,   83,
-     1449,   84,   84,   84,   85,   85,   85,   81,  506,  501,
-       82,  479,  501,   83,  391,   61,   61,   84,  391,  851,
-       85,  506,   61,  295,  295,  295,  479,   61,  309,  309,
+     1441,   84,   84,   84,   85,   85,   85,   81,  501,  508,
+       82,  501,  508,   83,  391,   61,   61,   84,  391,  398,
+       85,  527,   61,  295,  295,  295, 1445,   61,  309,  309,
 
-      309,  851,  304,  320,  320,  320,   61,   62,   62,   62,
+      309,  320,  320,  320,  430,  398,   61,   62,   62,   62,
        62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
-       62,   62, 1450,   62,   62,   62,   62,   62,   86,   86,
-       86,   87,   87,   87,   88,   88,   88, 1205,   89,   89,
-       89,   90,   90,   90,   86,  508,  304,   87,  508,  304,
-       88, 1453,   62,   62,   89,  304,  398,   90,  509,   62,
-      511,  303, 1205,  511,   62,  324,  324,  324,  338,  338,
-      338,  509,  398,   62,   65,   65,   65,   65,   65,   65,
+       62,   62, 1448,   62,   62,   62,   62,   62,   86,   86,
+       86,   87,   87,   87,   88,   88,   88,  853,   89,   89,
+       89,   90,   90,   90,   86,  506,  411,   87,  863,  853,
+       88,  430,   62,   62,   89,  422,  417,   90,  506,   62,
+      863,  303,  411,  417,   62,  324,  324,  324,  338,  338,
+      338,  422,  417,   62,   65,   65,   65,   65,   65,   65,
        65,   65,   65,   65,   65,   65,   65,   65,   65,  303,
        65,   65,   65,   65,   65,   91,   91,   91,   92,   92,
 
        92,   93,   93,   93,  303,   94,   94,   94,   95,   95,
-       95,   91,  411,  422,   92,  515, 1455,   93,  515,   65,
-       65,   94, 1460, 1462,   95,  341,  341,  341,  411,  422,
-       65,  354,  354,  354,  357,  357,  357, 1346,   65,   66,
+       95,   91,  435,  450,   92,  511, 1450,   93,  511,   65,
+       65,   94, 1452, 1454,   95,  341,  341,  341,  435,  450,
+       65,  354,  354,  354,  357,  357,  357, 1351,   65,   66,
        66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
-       66,   66,   66,   66, 1346,   66,   66,   66,   66,   66,
-       96,   96,   96,   99,   99,   99,  100,  100,  100,  861,
-      101,  101,  101,  102,  102,  102,   96,  435,  450,   99,
-      564,  861,  100,  564,   66,   66,  101, 1469, 1470,  102,
-      365,  365,  365,  435,  450,   66,  368,  368,  368,  378,
-
-      378,  378, 1471,   66,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97, 1473,
+       66,   66,   66,   66, 1351,   66,   66,   66,   66,   66,
+       96,   96,   96,   99,   99,   99,  100,  100,  100,  896,
+      101,  101,  101,  102,  102,  102,   96,  460,  471,   99,
+      515,  896,  100,  515,   66,   66,  101, 1455, 1456,  102,
+      365,  365,  365,  460,  471,   66,  368,  368,  368,  378,
+
+      378,  378, 1459,   66,   97,   97,   97,   97,   97,   97,
+       97,   97,   97,   97,   97,   97,   97,   97,   97, 1461,
        97,   97,   97,   97,   97,  103,  103,  103,  104,  104,
-      104,  105,  105,  105,  894,  106,  106,  106,  382,  382,
-      382,  103,  460,  471,  104, 1054,  894,  105,  655,   97,
-       97,  106,   97, 1487,   97,  390,  390,  390,  460,  471,
-       97,  395,  395,  395,  655, 1054,   97, 1348, 1492,   97,
+      104,  105,  105,  105, 1466,  106,  106,  106,  382,  382,
+      382,  103, 1209,  564,  104,  509,  564,  105, 1057,   97,
+       97,  106,   97,  513,   97,  390,  390,  390,  509,  513,
+       97,  304,  395,  395,  395,  513,   97, 1209, 1057,   97,
        98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
-       98,   98,   98,   98,   98, 1486,   98,   98,   98,   98,
+       98,   98,   98,   98,   98, 1468,   98,   98,   98,   98,
        98,  109,  109,  109,  110,  110,  110,  113,  113,  113,
 
-     1348,  114,  114,  114,  404,  404,  404,  109,  825,  759,
-      110,  557,  825,  113,  759,   98,   98,  114,   98,  513,
-       98,  408,  408,  408,  557,  513,   98,  416,  416,  416,
-     1486,  513,   98, 1493, 1497,   98,  107,  107,  107,  107,
+     1353,  114,  114,  114,  761,  304,  304,  109,  304,  761,
+      110,  557, 1475,  113,  304,   98,   98,  114,   98,  516,
+       98,  404,  404,  404,  557,  516,   98,  408,  408,  408,
+      827,  516,   98, 1353,  827,   98,  107,  107,  107,  107,
       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
@@ -2356,773 +2363,775 @@ static yyconst flex_int16_t yy_chk[8116] =
       111,  111,  111,  111,  111,  111,  111,  111,  111,  111,
       111,  111,  111,  111,  111,  111,  111,  111,  111,  111,
       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
-      115,  115,  115,  115,  115, 1498,  115,  115,  115,  115,
+      115,  115,  115,  115,  115, 1476,  115,  115,  115,  115,
 
       115,  117,  117,  117,  118,  118,  118,  121,  121,  121,
-     1385,  122,  122,  122, 1502,  417,  559,  117, 1385,  743,
-      118, 1485,  417,  121, 1508,  115,  115,  122,  743,  559,
-      115,  417,  419,  419,  419,  743,  115,  116,  116,  116,
+     1394,  122,  122,  122,  416,  416,  416,  117, 1394,  656,
+      118, 1477,  517,  121, 1479,  115,  115,  122,  517, 1493,
+      115,  419,  419,  419,  517,  656,  115,  116,  116,  116,
       116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
-      116,  116, 1485,  116,  116,  116,  116,  116,  123,  123,
-      123,  124,  124,  124,  125,  125,  125, 1389,  126,  126,
-      126,  428,  428,  428,  123, 1389, 1510,  124, 1511,  516,
-      125, 1514,  116,  116,  126,  516, 1484,  116,  432,  432,
-      432,  516, 1484,  116,  119,  119,  119,  119,  119,  119,
+      116,  116, 1498,  116,  116,  116,  116,  116,  123,  123,
+      123,  124,  124,  124,  125,  125,  125, 1499,  126,  126,
+      126,  428,  428,  428,  123, 1490, 1503,  124, 1491,  541,
+      125, 1490,  116,  116,  126,  541, 1504,  116,  432,  432,
+      432,  541, 1352,  116,  119,  119,  119,  119,  119,  119,
 
-      119,  119,  119,  119,  119,  119,  119,  119,  119, 1517,
+      119,  119,  119,  119,  119,  119,  119,  119,  119, 1491,
       119,  119,  119,  119,  119,  127,  127,  127,  128,  128,
-      128,  131,  131,  131, 1521,  132,  132,  132,  133,  133,
-      133,  127, 1522, 1523,  128,  455,  560,  131, 1524,  119,
-      119,  132,  455,  119,  133,  442,  442,  442, 1525,  560,
+      128,  131,  131,  131, 1508,  132,  132,  132,  133,  133,
+      133,  127, 1514, 1352,  128,  455,  559,  131, 1516,  119,
+      119,  132,  455,  119,  133,  442,  442,  442, 1517,  559,
       119,  455,  119,  447,  447,  447,  454,  454,  454,  119,
       120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
-      120,  120,  120,  120,  120, 1526,  120,  120,  120,  120,
+      120,  120,  120,  120,  120, 1520,  120,  120,  120,  120,
       120,  134,  134,  134,  135,  135,  135,  136,  136,  136,
-     1527,  137,  137,  137,  138,  138,  138,  134, 1528, 1529,
+     1523,  137,  137,  137,  138,  138,  138,  134, 1527, 1528,
 
-      135,  477, 1530,  136, 1535,  120,  120,  137,  477,  120,
-      138,  457,  457,  457, 1537, 1538,  120,  477,  120,  464,
+      135,  477,  560,  136, 1529,  120,  120,  137,  477,  120,
+      138,  457,  457,  457, 1530,  560,  120,  477,  120,  464,
       464,  464,  468,  468,  468,  120,  129,  129,  129,  129,
       129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
-      129, 1541,  129,  129,  129,  129,  129,  141,  141,  141,
-      142,  142,  142,  143,  143,  143, 1539,  144,  144,  144,
-      145,  145,  145,  141, 1539, 1542,  142, 1540, 1546,  143,
-     1552,  129,  129,  144, 1553, 1540,  145,  129,  476,  476,
-      476,  478,  478,  478, 1558, 1562,  487,  487,  487, 1563,
-     1564,  129,  130,  130,  130,  130,  130,  130,  130,  130,
-
-      130,  130,  130,  130,  130,  130,  130, 1566,  130,  130,
+      129, 1531,  129,  129,  129,  129,  129,  141,  141,  141,
+      142,  142,  142,  143,  143,  143, 1532,  144,  144,  144,
+      145,  145,  145,  141, 1533, 1534,  142, 1535, 1536,  143,
+     1541,  129,  129,  144, 1543, 1544,  145,  129,  476,  476,
+      476,  478,  478,  478, 1547, 1492,  487,  487,  487, 1548,
+     1552,  129,  130,  130,  130,  130,  130,  130,  130,  130,
+
+      130,  130,  130,  130,  130,  130,  130, 1558,  130,  130,
       130,  130,  130,  146,  146,  146,  147,  147,  147,  148,
-      148,  148, 1569,  151,  151,  151,  152,  152,  152,  146,
-     1570, 1573,  147, 1574,  517,  148, 1577,  130,  130,  151,
-      517,  541,  152,  130,  487, 1584,  517,  541,  658,  658,
-      658, 1586,  658,  541,  670,  670,  670,  130,  139,  139,
+      148,  148, 1559,  151,  151,  151,  152,  152,  152,  146,
+     1492, 1560,  147, 1545, 1565,  148, 1569,  130,  130,  151,
+     1546, 1545,  152,  130,  487,  659,  659,  659, 1546,  659,
+      671,  671,  671,  687,  687,  687, 1570,  130,  139,  139,
       139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
-      139,  139,  139, 1596,  139,  139,  139,  139,  139,  155,
-      155,  155,  156,  156,  156,  157,  157,  157, 1597,  158,
-      158,  158,  159,  159,  159,  155, 1261, 1599,  156, 1571,
-
-     1612,  157, 1261,  139,  139,  158, 1261, 1571,  159,  139,
-     1261, 1618,  139,  686,  686,  686, 1622,  670, 1624,  725,
-      725,  725, 1604,  139,  140,  140,  140,  140,  140,  140,
-      140,  140,  140,  140,  140,  140,  140,  140,  140, 1630,
+      139,  139,  139, 1571,  139,  139,  139,  139,  139,  155,
+      155,  155,  156,  156,  156,  157,  157,  157, 1573,  158,
+      158,  158,  159,  159,  159,  155, 1576, 1577,  156, 1578,
+
+     1265,  157,  744,  139,  139,  158, 1265, 1578,  159,  139,
+     1265,  744,  139,  671, 1265, 1580,  687, 1581,  744,  726,
+      726,  726, 1584,  139,  140,  140,  140,  140,  140,  140,
+      140,  140,  140,  140,  140,  140,  140,  140,  140, 1591,
       140,  140,  140,  140,  140,  160,  160,  160,  161,  161,
-      161,  162,  162,  162, 1572,  165,  165,  165,  166,  166,
-      166,  160, 1572, 1603,  161, 1636, 1637,  162, 1604,  140,
-      140,  165, 1638, 1639,  166,  140,  686, 1640,  140,  697,
-      697,  697,  725,  697, 1641, 1642,  697, 1643, 1644,  140,
+      161,  162,  162,  162, 1593,  165,  165,  165,  166,  166,
+      166,  160, 1266, 1603,  161, 1579, 1604,  162, 1266,  140,
+      140,  165, 1266, 1579,  166,  140, 1266, 1606,  140,  698,
+      698,  698,  726,  698, 1619, 1611,  698, 1610, 1625,  140,
       149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
 
-      149,  149,  149,  149,  149, 1603,  149,  149,  149,  149,
+      149,  149,  149,  149,  149, 1629,  149,  149,  149,  149,
       149,  167,  167,  167,  168,  168,  168,  169,  169,  169,
-     1645,  170,  170,  170,  171,  171,  171,  167, 1651, 1652,
-      168, 1653, 1654,  169, 1655,  149,  149,  170, 1656, 1657,
-      171,  149,  840,  840,  840, 1658,  149,  150,  150,  150,
+     1631,  170,  170,  170,  171,  171,  171,  167, 1637, 1610,
+      168, 1611, 1643,  169, 1644,  149,  149,  170, 1645, 1646,
+      171,  149,  842,  842,  842, 1647,  149,  150,  150,  150,
       150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
-      150,  150, 1659,  150,  150,  150,  150,  150,  172,  172,
-      172,  175,  175,  175,  176,  176,  176, 1660,  179,  179,
-      179,  180,  180,  180,  172, 1664, 1665,  175, 1667, 1668,
-      176, 1669,  150,  150,  179, 1670, 1677,  180,  150,  730,
+      150,  150, 1648,  150,  150,  150,  150,  150,  172,  172,
+      172,  175,  175,  175,  176,  176,  176, 1649,  179,  179,
+      179,  180,  180,  180,  172, 1650, 1651,  175, 1652, 1658,
+      176, 1659,  150,  150,  179, 1660, 1661,  180,  150,  731,
 
-      730,  730, 1678,  150,  153,  153,  153,  153,  153,  153,
-      153,  153,  153,  153,  153,  153,  153,  153,  153, 1679,
+      731,  731, 1662,  150,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153, 1663,
       153,  153,  153,  153,  153,  181,  181,  181,  182,  182,
-      182,  183,  183,  183, 1680,  184,  184,  184,  185,  185,
-      185,  181, 1262, 1681,  182, 1682, 1683,  183, 1262,  153,
-      153,  184, 1262, 1684,  185,  153, 1262, 1686,  153,  705,
-      705,  705,  730,  705, 1694, 1706,  705, 1709, 1710,  153,
+      182,  183,  183,  183, 1664,  184,  184,  184,  185,  185,
+      185,  181, 1665, 1666,  182, 1667, 1672,  183, 1673,  153,
+      153,  184, 1675, 1676,  185,  153, 1677, 1678,  153,  706,
+      706,  706,  731,  706, 1685, 1686,  706, 1687, 1688,  153,
       154,  154,  154,  154,  154,  154,  154,  154,  154,  154,
-      154,  154,  154,  154,  154, 1713,  154,  154,  154,  154,
+      154,  154,  154,  154,  154, 1689,  154,  154,  154,  154,
       154,  186,  186,  186,  189,  189,  189,  190,  190,  190,
 
-      525,  525,  525, 1716,  668,  668,  668,  186, 1717, 1718,
-      189, 1719, 1720,  190, 1721,  154,  154,  525, 1722,  296,
-      297,  154,  668, 1723,  154,  857,  857,  857, 1702,  296,
-      297, 1068, 1068, 1068, 1724,  154,  163,  163,  163,  163,
+      525,  525,  525, 1690,  669,  669,  669,  186, 1691, 1692,
+      189, 1694, 1702,  190, 1714,  154,  154,  525, 1717,  296,
+      297,  154,  669, 1718,  154,  859,  859,  859, 1710,  296,
+      297, 1071, 1071, 1071, 1721,  154,  163,  163,  163,  163,
       163,  163,  163,  163,  163,  163,  163,  163,  163,  163,
-      163, 1701,  163,  163,  163,  163,  163,  296,  297,  533,
-      533,  533, 1725,  296, 1726, 1702,  296,  550,  550,  550,
-     1728,  297,  296, 1729, 1730,  297,  533,  565,  565,  565,
-     1731,  163,  163, 1701,  550, 1071, 1071, 1071, 1733,  163,
-     1736,  163, 1737,  163,  565, 1070, 1070, 1070, 1074, 1074,
-
-     1074,  163,  164,  164,  164,  164,  164,  164,  164,  164,
-      164,  164,  164,  164,  164,  164,  164, 1738,  164,  164,
-      164,  164,  164,  573,  573,  573,  575,  575,  575,  589,
-      589,  589,  597,  597,  597,  602,  602,  602, 1742, 1743,
-      573, 1070, 1745,  575, 1748, 1749,  589,  164,  164,  597,
-     1750, 1751,  602, 1753, 1756,  164, 1758,  164, 1780,  164,
-     1082, 1082, 1082, 1107, 1107, 1107, 1775,  164,  173,  173,
+      163, 1709,  163,  163,  163,  163,  163,  296,  297,  533,
+      533,  533, 1724,  296, 1725, 1710,  296,  550,  550,  550,
+     1726,  297,  296, 1727, 1728,  297,  533,  565,  565,  565,
+     1729,  163,  163, 1709,  550, 1074, 1074, 1074, 1730,  163,
+     1731,  163, 1732,  163,  565, 1073, 1073, 1073, 1077, 1077,
+
+     1077,  163,  164,  164,  164,  164,  164,  164,  164,  164,
+      164,  164,  164,  164,  164,  164,  164, 1733,  164,  164,
+      164,  164,  164,  573,  573,  573,  575,  575,  575,  590,
+      590,  590,  598,  598,  598,  603,  603,  603, 1734, 1736,
+      573, 1073, 1737,  575, 1738, 1739,  590,  164,  164,  598,
+     1741, 1744,  603, 1745, 1748,  164, 1752,  164, 1753,  164,
+     1085, 1085, 1085, 1110, 1110, 1110, 1755,  164,  173,  173,
       173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173, 1777,  173,  173,  173,  173,  173,  624,
-      624,  624,  646,  646,  646,  650,  650,  650,  693,  693,
+      173,  173,  173, 1758,  173,  173,  173,  173,  173,  625,
+      625,  625,  647,  647,  647,  651,  651,  651,  694,  694,
 
-      693,  669,  669,  669, 1781, 1775,  624, 1782, 1787,  646,
-     1788, 1789,  650,  173,  173, 1776,  693, 1790, 1791,  669,
-      721,  721,  721, 1792,  721, 1777, 1793,  721,  737,  737,
-      737, 1794,  737, 1795, 1796,  737,  173,  174,  174,  174,
+      694,  670,  670,  670, 1759, 1760,  625, 1761, 1763,  647,
+     1766, 1768,  651,  173,  173, 1786,  694, 1790, 1791,  670,
+      722,  722,  722, 1792,  722, 1797, 1785,  722,  738,  738,
+      738, 1798,  738, 1787, 1799,  738,  173,  174,  174,  174,
       174,  174,  174,  174,  174,  174,  174,  174,  174,  174,
-      174,  174, 1776,  174,  174,  174,  174,  174,  669,  696,
-      696,  696,  694,  694,  694, 1797,  700,  700,  700,  701,
-      701,  701,  704,  704,  704, 1785,  696,  706,  706,  706,
-      694, 1799,  174,  174,  700, 1785, 1800,  701, 1785,  704,
-     1806,  745,  745,  745,  706,  745, 1807, 1808,  745, 1118,
+      174,  174, 1786,  174,  174,  174,  174,  174,  670,  697,
+      697,  697,  695,  695,  695, 1785,  701,  701,  701,  702,
+      702,  702,  705,  705,  705, 1787,  697,  707,  707,  707,
+      695, 1800,  174,  174,  701, 1801, 1802,  702, 1803,  705,
+     1804,  746,  746,  746,  707,  746, 1805, 1806,  746, 1121,
 
-     1118, 1118, 1119, 1119, 1119,  174,  177,  177,  177,  177,
+     1121, 1121, 1122, 1122, 1122,  174,  177,  177,  177,  177,
       177,  177,  177,  177,  177,  177,  177,  177,  177,  177,
-      177,  694,  177,  177,  177,  177,  177,  708,  708,  708,
-     1811, 1819,  701, 1820, 1821,  712,  712,  712,  713,  713,
-      713,  718,  718,  718,  708, 1220, 1220, 1220, 1119, 1841,
-     1845,  177,  177,  712, 1846, 1849,  713, 1850, 1852,  718,
-     1853, 1855,  177,  178,  178,  178,  178,  178,  178,  178,
-      178,  178,  178,  178,  178,  178,  178,  178, 1841,  178,
-      178,  178,  178,  178, 1856,  713,  719,  719,  719,  720,
-      720,  720,  723,  723,  723,  736,  736,  736,  724,  724,
-
-      724,  744,  744,  744,  719, 1857,  720, 1858,  178,  178,
-      723, 1859,  736, 1222, 1222, 1222,  724, 1861,  744,  178,
+      177,  695,  177,  177,  177,  177,  177,  709,  709,  709,
+     1807, 1809,  702, 1810, 1816,  713,  713,  713,  714,  714,
+      714,  719,  719,  719,  709, 1224, 1224, 1224, 1122, 1817,
+     1821,  177,  177,  713, 1824, 1832,  714, 1833, 1834,  719,
+     1858, 1859,  177,  178,  178,  178,  178,  178,  178,  178,
+      178,  178,  178,  178,  178,  178,  178,  178, 1854,  178,
+      178,  178,  178,  178, 1862,  714,  720,  720,  720,  721,
+      721,  721,  724,  724,  724,  737,  737,  737,  725,  725,
+
+      725,  745,  745,  745,  720, 1863,  721, 1854,  178,  178,
+      724, 1865,  737, 1226, 1226, 1226,  725, 1866,  745,  178,
       187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
-      187,  187,  187,  187,  187,  724,  187,  187,  187,  187,
-      187,  740,  740,  740,  741,  741,  741, 1862, 1786,  719,
-      747,  747,  747,  748,  748,  748, 1863,  748, 1786,  740,
-      748, 1786,  741, 1864, 1851,  187,  187,  747,  749,  749,
-      749,  762,  762,  762, 1854,  762,  187, 1851,  762,  770,
-      770,  770, 1874,  770, 1875,  749,  770, 1854,  187,  188,
+      187,  187,  187,  187,  187,  725,  187,  187,  187,  187,
+      187,  741,  741,  741,  742,  742,  742, 1868, 1795,  720,
+      748,  748,  748,  749,  749,  749, 1869,  749, 1795,  741,
+      749, 1795,  742, 1870, 1796,  187,  187,  748,  750,  750,
+      750,  764,  764,  764, 1796,  764,  187, 1796,  764,  772,
+      772,  772, 1871,  772, 1872,  750,  772, 1874,  187,  188,
       188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
 
-      188,  188,  188,  188,  741,  188,  188,  188,  188,  188,
-      756,  756,  756,  757,  757,  757,  761,  761,  761,  763,
-      763,  763,  766,  766,  766,  767,  767,  767,  756, 1876,
-     1880,  757, 1888,  761,  188,  188,  763,  769,  769,  769,
-      766, 1890, 1842,  767, 1898,  188,  771,  771,  771, 1899,
-     1900,  772,  772,  772,  769, 1901, 1902,  188,  230, 1903,
-      774,  774,  774, 1912,  771,  230,  779,  779,  779,  772,
-      757,  780,  780,  780,  230,  230,  767,  774,  775,  775,
-      775, 1913,  775, 1842,  779,  775, 1224, 1224, 1224,  780,
-      781,  781,  781, 1227, 1227, 1227,  782,  782,  782,  784,
-
-      784,  784,  230,  230,  230, 1843, 1917,  781, 1908,  230,
-      230,  772,  230,  782, 1909, 1918,  230,  784,  230, 1919,
-      230,  783,  783,  783, 1920, 1921,  780,  785,  785,  785,
-      787,  787,  787,  788,  788,  788, 1922, 1923,  783,  789,
-      789,  789,  790,  790,  790,  785, 1843,  787, 1924, 1909,
-      788,  791,  791,  791, 1926, 1908,  789, 1927, 1928,  790,
-     1929, 1930,  792,  792,  792,  794,  794,  794, 1931,  791,
-      795,  795,  795, 1932,  795, 1933, 1938,  795, 1942,  783,
-      792, 1943,  794,  788,  796,  796,  796,  785,  797,  797,
-      797,  798,  798,  798,  799,  799,  799,  788, 1944,  792,
-
-      790, 1945,  796,  800,  800,  800,  797, 1952,  798, 1955,
-     1962,  799,  801,  801,  801,  802,  802,  802, 1963, 1964,
-      800,  807,  807,  807,  808,  808,  808,  811,  811,  811,
-      801, 1957, 1965,  802,  812,  812,  812, 1966, 1967,  807,
-     1969, 1957,  808,  797,  799,  811,  813,  813,  813,  814,
-      814,  814,  812,  814, 1975, 1976,  814, 1977,  799,  815,
-      815,  815, 1978,  813,  816,  816,  816,  817,  817,  817,
-     1979,  818,  818,  818, 1969,  818, 1980,  815,  818,  869,
-      869,  869,  816,  869,  817,  802,  869,  808,  820,  820,
-      820,  821,  821,  821,  836,  836,  836,  812,  837,  837,
-
-      837,  839,  839,  839, 1981, 1982,  820, 1829, 1958,  821,
-     1985, 1986,  836,  863,  863,  863,  837, 1829, 1958,  839,
-      864,  864,  864, 1829,  816,  865,  865,  865, 1988, 1989,
-      863,  867,  867,  867,  868,  868,  868, 1830,  864,  872,
-      872,  872, 1960,  865,  874,  874,  874, 1830,  839,  867,
-     1961,  868, 1960, 1830,  821, 1990,  872,  875,  875,  875,
-     1961, 1992,  874,  877,  877,  877,  879,  879,  879, 1997,
-      879, 1998, 1999,  879, 2001,  875,  882,  882,  882, 2007,
-      867,  877,  883,  883,  883, 2008,  883, 2009, 2010,  883,
-      884,  884,  884,  882,  885,  885,  885, 2011, 2012,  872,
-
-     2013,  886,  886,  886, 2014,  886, 2015,  884,  886, 2016,
-      877,  885,  888,  888,  888,  890,  890,  890,  891,  891,
-      891,  893,  893,  893,  896,  896,  896, 2018, 2019,  888,
-      898,  898,  898,  890, 2023, 2031,  891, 2032, 2033,  893,
-     2034,  896,  899,  899,  899,  901,  901,  901,  898,  902,
-      902,  902, 2035,  902, 2036, 2037,  902,  906,  906,  906,
-      899, 2038, 2042,  901,  907,  907,  907,  909,  909,  909,
-      919,  919,  919, 2043, 2044,  906, 2023,  920,  920,  920,
-      893,  920,  907, 2045,  920,  909, 2046,  919,  925,  925,
-      925, 2047,  901,  926,  926,  926,  928,  928,  928, 2049,
-
-      933,  933,  933, 2050,  933, 2051,  925,  933,  936,  936,
-      936,  926, 2054, 2059,  928,  937,  937,  937, 2060,  937,
-     2061, 2062,  937, 2063, 2064,  936,  940,  940,  940,  941,
-      941,  941, 2065,  941, 2066, 2067,  941,  948,  948,  948,
-      949,  949,  949,  940,  951,  951,  951,  956,  956,  956,
-     2068,  956, 2069, 2070,  956,  948, 2077, 2073,  949, 2080,
-      928, 2074,  951,  959,  959,  959,  960,  960,  960, 2081,
-      960, 2073, 2074,  960,  963,  963,  963,  964,  964,  964,
-      959,  966,  966,  966,  968,  968,  968, 2084,  968, 2086,
-     2087,  968,  963, 2089, 2090,  964,  971,  971,  971,  966,
-
-      972,  972,  972,  974,  974,  974,  982,  982,  982, 2071,
-      951,  983,  983,  983,  971,  976,  976,  976,  972,  976,
-     2093,  974,  976, 2094,  982,  985,  985,  985, 2095,  983,
-     2097, 2099,  966,  986,  986,  986, 2098,  987,  987,  987,
-     2107,  987, 2097,  985,  987,  988,  988,  988, 2098, 2109,
-      986,  989,  989,  989, 2071,  989, 2111, 2113,  989,  991,
-      991,  991,  988,  992,  992,  992,  996,  996,  996,  974,
-      994,  994,  994, 1000, 1000, 1000, 2118,  991,  997,  997,
-      997,  992,  997,  996,  985,  997, 2120, 2120,  994, 2121,
-     1000, 1001, 1001, 1001, 2123, 1001, 2125, 2119, 1001, 1003,
-
-     1003, 1003, 1004, 1004, 1004, 1006, 1006, 1006, 1008, 1008,
-     1008, 2119, 1008, 2126, 2127, 1008, 2118, 1003, 2128, 2137,
-     1004, 2139, 2142, 1006, 1011, 1011, 1011, 1012, 1012, 1012,
-     1014, 1014, 1014, 1015, 1015, 1015,  994, 1016, 1016, 1016,
-     2122, 1016, 1011, 2144, 1016, 1012, 2104, 2136, 1014, 2105,
-     1015, 2122, 1019, 1019, 1019, 1020, 1020, 1020, 2104, 1020,
-     2138, 2105, 1020, 1021, 1021, 1021, 2136, 2150, 1006, 1019,
-     1022, 1022, 1022, 1024, 1024, 1024, 1026, 1026, 1026, 2138,
-     2151, 1021, 1029, 1029, 1029, 1030, 1030, 1030, 1022, 1014,
-     2152, 1024, 2141, 1026, 1032, 1032, 1032, 1035, 1035, 1035,
-
-     1029, 2154, 2143, 1030, 1036, 1036, 1036, 1038, 1038, 1038,
-     2155, 2141, 1032, 2156, 2157, 1035, 1039, 1039, 1039, 2164,
-     1039, 2143, 1036, 1039, 2165, 1038, 1042, 1042, 1042, 1043,
-     1043, 1043, 2166, 2167, 1024, 1045, 1045, 1045, 1046, 1046,
-     1046, 2168, 1046, 2169, 1042, 1046, 2172, 1043, 1050, 1050,
-     1050, 2173, 2174, 1045, 1032, 1051, 1051, 1051, 2175, 2176,
-     1038, 1053, 1053, 1053, 2177, 2179, 1050, 1055, 1055, 1055,
-     1062, 1062, 1062, 1051, 1085, 1085, 1085, 2181, 2183, 1053,
-     1086, 1086, 1086, 2193, 1086, 1055, 1055, 1086, 1062, 2194,
-     2195, 1085, 2191, 2196, 1045, 1087, 1087, 1087, 1088, 1088,
-
-     1088, 1089, 1089, 1089, 2191, 1089, 2197, 2192, 1089, 1092,
-     1092, 1092, 2198, 1087, 2202, 1088, 1094, 1094, 1094, 2192,
-     1094, 1053, 2203, 1094, 1097, 1097, 1097, 1092, 2204, 1098,
-     1098, 1098, 2205, 1098, 2206, 1062, 1098, 2207, 1099, 1099,
-     1099, 1097, 1099, 2210, 2211, 1099, 1103, 1103, 1103, 1104,
-     1104, 1104, 1087, 1104, 2212, 2213, 1104, 2214, 1092, 1106,
-     1106, 1106, 2215, 1103, 1109, 1109, 1109, 1110, 1110, 1110,
-     2216, 1110, 2208, 2217, 1110, 2218, 2219, 1106, 1111, 1111,
-     1111, 1109, 1112, 1112, 1112, 1114, 1114, 1114, 1125, 1125,
-     1125, 2220, 1126, 1126, 1126, 1111, 1126, 2208, 2221, 1126,
-
-     1112, 2222, 2223, 1114, 2224, 1125, 1127, 1127, 1127, 1106,
-     1128, 1128, 1128, 2225, 1129, 1129, 1129, 1131, 1131, 1131,
-     1134, 1134, 1134, 1127, 1139, 1139, 1139, 1128, 1171, 1171,
-     1171, 1112, 1129, 2226, 1131, 2227, 2228, 1134, 1135, 1135,
-     1135, 1139, 1135, 2231, 2232, 1135, 1136, 1136, 1136, 2233,
-     1136, 2234, 2235, 1136, 2236, 2228, 1128, 1145, 1145, 1145,
-     1147, 1147, 1147, 1150, 1150, 1150, 2237, 1150, 2238, 2239,
-     1150, 1153, 1153, 1153, 1171, 1145, 2240, 1147, 2241, 1129,
-     1155, 1155, 1155, 1157, 1157, 1157, 2242, 2243, 1153, 1161,
-     1161, 1161, 2244, 1162, 1162, 1162, 2245, 2246, 1155, 2248,
-
-     2247, 1157, 2249, 1163, 1163, 1163, 1161, 1163, 2250, 2251,
-     1163, 1162, 1166, 1166, 1166, 2252, 1166, 2253, 2254, 1166,
-     2247, 1145, 1170, 1170, 1170, 1172, 1172, 1172, 2255, 1172,
-     2256, 2257, 1172, 2258, 2259, 1161, 2260, 1177, 1177, 1177,
-     1170, 1177, 2261, 1155, 1177, 1181, 1181, 1181, 1157, 1162,
-     1183, 1183, 1183, 1184, 1184, 1184, 2262, 1184, 2263, 2265,
-     1184, 2266, 2267, 1181, 2264, 1189, 1189, 1189, 1183, 1189,
-     2264, 2268, 1189, 1192, 1192, 1192, 1194, 1194, 1194, 1195,
-     1195, 1195, 2269, 1195, 2270, 2272, 1195, 1170, 1229, 1229,
-     1229, 1192, 2273, 1194, 1198, 1198, 1198, 1200, 1200, 1200,
-
-     1201, 1201, 1201, 2275, 2276, 1181, 1183, 1202, 1202, 1202,
-     2278, 2279, 1198, 2282, 1200, 1203, 1203, 1203, 1201, 2283,
-     1192, 1204, 1204, 1204, 2284, 1202, 1207, 1207, 1207, 1214,
-     1214, 1214, 1203, 1230, 1230, 1230, 1235, 1235, 1235, 1204,
-     1237, 1237, 1237, 1198, 1207, 2285, 2287, 1214, 1238, 1238,
-     1238, 1229, 1238, 2289, 2281, 1238, 1241, 1241, 1241, 1202,
-     1242, 1242, 1242, 2291, 1242, 2293, 1201, 1242, 2281, 1247,
-     1247, 1247, 2295, 2296, 1241, 2297, 2298, 1207, 2299, 1230,
-     2300, 1214, 1204, 1257, 1257, 1257, 1237, 1247, 1249, 1249,
-     1249, 2301, 1249, 1207, 2302, 1249, 1253, 1253, 1253, 2304,
-
-     1253, 1257, 2306, 1253, 1258, 1258, 1258, 1260, 1260, 1260,
-     2308, 1260, 2309, 2310, 1260, 1263, 1263, 1263, 2311, 2352,
-     1247, 2328, 1241, 1264, 1264, 1264, 2324, 1264, 2344, 2328,
-     1264, 1411, 1263, 1265, 1265, 1265, 1269, 1269, 1269, 1270,
-     1270, 1270, 2320, 1257, 1271, 1271, 1271, 1272, 1272, 1272,
-     2312, 1265, 1273, 1273, 1273, 1276, 1276, 1276, 2325, 1276,
-     2344, 2352, 1276, 1279, 1279, 1279, 1280, 1280, 1280, 2324,
-     1280, 2321, 2313, 1280, 1281, 1281, 1281, 1284, 1284, 1284,
-     1279, 1282, 1282, 1282, 1265, 1282, 2312, 2364, 1282, 2320,
-     2365, 1281, 1286, 1286, 1286, 1284, 1287, 1287, 1287, 2322,
-
-     1287, 2325, 2346, 1287, 1288, 1288, 1288, 1271, 2313, 1286,
-     1272, 2346, 1290, 1290, 1290, 1273, 1290, 2338, 2321, 1290,
-     2323, 1288, 1293, 1293, 1293, 1294, 1294, 1294, 2364, 1294,
-     2332, 2365, 1294, 1295, 1295, 1295, 1299, 1299, 1299, 1293,
-     1300, 1300, 1300, 1302, 1302, 1302, 2322, 1303, 1303, 1303,
-     1295, 1303, 2338, 1299, 1303, 1304, 1304, 1304, 1300, 1408,
-     1302, 1306, 1306, 1306, 1307, 1307, 1307, 2323, 1307, 2329,
-     2336, 1307, 1304, 1309, 1309, 1309, 2332, 2329, 1306, 1311,
-     1311, 1311, 1315, 1315, 1315, 1316, 1316, 1316, 2330, 1316,
-     2331, 1309, 1316, 1318, 1318, 1318, 2330, 1311, 2331, 1315,
-
-     1320, 1320, 1320, 2333, 2334, 1300, 1322, 1322, 1322, 1407,
-     2336, 1318, 1323, 1323, 1323, 1324, 1324, 1324, 1320, 1325,
-     1325, 1325, 2339, 1322, 1327, 1327, 1327, 2326, 2337, 1323,
-     1311, 2326, 1324, 1328, 1328, 1328, 2340, 1325, 1329, 1329,
-     1329, 2334, 1327, 1330, 1330, 1330, 1337, 1337, 1337, 2333,
-     1328, 1320, 1332, 1332, 1332, 1329, 1332, 2339, 2327, 1332,
-     1406, 1330, 2327, 2402, 1337, 1339, 1339, 1339, 2337, 2335,
-     1327, 2345, 1340, 1340, 1340, 2347, 1340, 2402, 1324, 1340,
-     2360, 2340, 1339, 1401, 2347, 1325, 1341, 1341, 1341, 2360,
-     1342, 1342, 1342, 1343, 1343, 1343, 2350, 1337, 1344, 1344,
-
-     1344, 1400, 1344, 2345, 1341, 1344, 2335, 1330, 1342, 2358,
-     1343, 1345, 1345, 1345, 1351, 1351, 1351, 1352, 1352, 1352,
-     1357, 1357, 1357, 1362, 1362, 1362, 1363, 1363, 1363, 1345,
-     2350, 1351, 1364, 1364, 1364, 1352, 1365, 1365, 1365, 1367,
-     1367, 1367, 2358, 2342, 1341, 1342, 1368, 1368, 1368, 1372,
-     1372, 1372, 1374, 1374, 1374, 1377, 1377, 1377, 1379, 1379,
-     1379, 1381, 1381, 1381, 1382, 1382, 1382, 1391, 1391, 1391,
-     1374, 1391, 1397, 1377, 1391, 1379, 2341, 1352, 1396, 1381,
-     2342, 1382, 1394, 1394, 1394, 2343, 1395, 1395, 1395, 1398,
-     1398, 1398, 1399, 1399, 1399, 2348, 2353, 1402, 1402, 1402,
-
-     1394, 1402, 1374, 1395, 1402, 1405, 1405, 1405, 2384, 1405,
-     2349, 2354, 1405, 1409, 1409, 1409, 1412, 1412, 1412, 1381,
-     1412, 2341, 2343, 1412, 1415, 1415, 1415, 2378, 1394, 2355,
-     2348, 1409, 1416, 1416, 1416, 2378, 1416, 2351, 2353, 1416,
-     2362, 1415, 1418, 1418, 1418, 2349, 1418, 2359, 2384, 1418,
-     1421, 1421, 1421, 1422, 1422, 1422, 2354, 1422, 2366, 2363,
-     1422, 1423, 1423, 1423, 1426, 1426, 1426, 1421, 1427, 1427,
-     1427, 2351, 1427, 2356, 2355, 1427, 2357, 2362, 1423, 2361,
-     2359, 1426, 1428, 1428, 1428, 1430, 1430, 1430, 2361, 1430,
-     2367, 2368, 1430, 1433, 1433, 1433, 2363, 1434, 1434, 1434,
-
-     1428, 1434, 2398, 2366, 1434, 1436, 1436, 1436, 2356, 1436,
-     1433, 2357, 1436, 1440, 1440, 1440, 1443, 1443, 1443, 1445,
-     1445, 1445, 1447, 1447, 1447, 2370, 1447, 2369, 2368, 1447,
-     2371, 1440, 2376, 1428, 1443, 2367, 1445, 1451, 1451, 1451,
-     1454, 1454, 1454, 1456, 1456, 1456, 1457, 1457, 1457, 2398,
-     1457, 1390, 2382, 1457, 2370, 1451, 1388, 2374, 1454, 2371,
-     1456, 1458, 1458, 1458, 2369, 1445, 1459, 1459, 1459, 1387,
-     1459, 1386, 2383, 1459, 1461, 1461, 1461, 2376, 1458, 1443,
-     1463, 1463, 1463, 1464, 1464, 1464, 1465, 1465, 1465, 2382,
-     1465, 2374, 1461, 1465, 1466, 1466, 1466, 2372, 1463, 2379,
-
-     1464, 1467, 1467, 1467, 2375, 1467, 2372, 2379, 1467, 2383,
-     2390, 1466, 1468, 1468, 1468, 1472, 1472, 1472, 1474, 1474,
-     1474, 2385, 1474, 2373, 2377, 1474, 1477, 1477, 1477, 1463,
-     1468, 2391, 2373, 1472, 1478, 1478, 1478, 1384, 2375, 1461,
-     2380, 1479, 1479, 1479, 1477, 1479, 2386, 2390, 1479, 1482,
-     1482, 1482, 1478, 1488, 1488, 1488, 1489, 1489, 1489, 1383,
-     1489, 2385, 1380, 1489, 1490, 1490, 1490, 1482, 2391, 2377,
-     1488, 1491, 1491, 1491, 1378, 1376, 1468, 1477, 1375, 1472,
-     1373, 2386, 1490, 1494, 1494, 1494, 2380, 1478, 1495, 1495,
-     1495, 1496, 1496, 1496, 1499, 1499, 1499, 1500, 1500, 1500,
-
-     1501, 1501, 1501, 1503, 1503, 1503, 1504, 1504, 1504, 1505,
-     1505, 1505, 1506, 1506, 1506, 1507, 1507, 1507, 1509, 1509,
-     1509, 1512, 1512, 1512, 1515, 1515, 1515, 1490, 1516, 1516,
-     1516, 2394, 1516, 2381, 1371, 1516, 1509, 2387, 1370, 1512,
-     2394, 1515, 1518, 1518, 1518, 1519, 1519, 1519, 1520, 1520,
-     1520, 1369, 1520, 2388, 1366, 1520, 1531, 1531, 1531, 2389,
-     1518, 1361, 1519, 1532, 1532, 1532, 1533, 1533, 1533, 1509,
-     1533, 2392, 2387, 1533, 1531, 1534, 1534, 1534, 2403, 2381,
-     1532, 1536, 1536, 1536, 1543, 1543, 1543, 2393, 1543, 2403,
-     1360, 1543, 1547, 1547, 1547, 1359, 1547, 1358, 2388, 1547,
-
-     1550, 1550, 1550, 2392, 2389, 1531, 1551, 1551, 1551, 1356,
-     1551, 2395, 2396, 1551, 1554, 1554, 1554, 1550, 1554, 2393,
-     2395, 1554, 1557, 1557, 1557, 1559, 1559, 1559, 2397, 1559,
-     2400, 2401, 1559, 1565, 1565, 1565, 1567, 1567, 1567, 2399,
-     1557, 1568, 1568, 1568, 2396, 1568, 1355, 1354, 1568, 1353,
-     1350, 1565, 1338, 1567, 1575, 1575, 1575, 1578, 1578, 1578,
-     2397, 1578, 2400, 2401, 1578, 1336, 1581, 1581, 1581, 1335,
-     1581, 1331, 1575, 1581, 1585, 1585, 1585, 1587, 1587, 1587,
-     1588, 1588, 1588, 1326, 1588, 1557, 2399, 1588, 1321, 1591,
-     1591, 1591, 1585, 1591, 1319, 1587, 1591, 1594, 1594, 1594,
-
-     1595, 1595, 1595, 1598, 1598, 1598, 1600, 1600, 1600, 1601,
-     1601, 1601, 1602, 1602, 1602, 1594, 1317, 1595, 1605, 1605,
-     1605, 1598, 1314, 1313, 1600, 1585, 1312, 1601, 1310, 1308,
-     1602, 1305, 1301, 1594, 1606, 1606, 1606, 1298, 1606, 1297,
-     1296, 1606, 1587, 1609, 1609, 1609, 1610, 1610, 1610, 1611,
-     1611, 1611, 1613, 1613, 1613, 1614, 1614, 1614, 1615, 1615,
-     1615, 1609, 1616, 1616, 1616, 1600, 1289, 1598, 1617, 1617,
-     1617, 1619, 1619, 1619, 1620, 1620, 1620, 1621, 1621, 1621,
-     1623, 1623, 1623, 1626, 1626, 1626, 1627, 1627, 1627, 1285,
-     1627, 1283, 1275, 1627, 1631, 1631, 1631, 1274, 1623, 1268,
-
-     1626, 1609, 1633, 1633, 1633, 1267, 1633, 1266, 1259, 1633,
-     1256, 1252, 1631, 1646, 1646, 1646, 1647, 1647, 1647, 1248,
-     1647, 1246, 1245, 1647, 1650, 1650, 1650, 1236, 1661, 1661,
-     1661, 1646, 1661, 1234, 1233, 1661, 1666, 1666, 1666, 1671,
-     1671, 1671, 1673, 1673, 1673, 1674, 1674, 1674, 1232, 1674,
-     1231, 1228, 1674, 1226, 1666, 1225, 1223, 1671, 1221, 1673,
-     1685, 1685, 1685, 1687, 1687, 1687, 1688, 1688, 1688, 1689,
-     1689, 1689, 1219, 1646, 1690, 1690, 1690, 1691, 1691, 1691,
-     1218, 1687, 1217, 1688, 1693, 1693, 1693, 1689, 1673, 1692,
-     1692, 1692, 1690, 1692, 1691, 1216, 1692, 1695, 1695, 1695,
-
-     1215, 1693, 1696, 1696, 1696, 1697, 1697, 1697, 1698, 1698,
-     1698, 1700, 1700, 1700, 1213, 1695, 1703, 1703, 1703, 1704,
-     1704, 1704, 1212, 1697, 1209, 1206, 1698, 1199, 1689, 1700,
-     1705, 1705, 1705, 1197, 1690, 1196, 1193, 1704, 1707, 1707,
-     1707, 1708, 1708, 1708, 1711, 1711, 1711, 1714, 1714, 1714,
-     1715, 1715, 1715, 1188, 1715, 1187, 1182, 1715, 1727, 1727,
-     1727, 1180, 1711, 1176, 1714, 1735, 1735, 1735, 1175, 1169,
-     1697, 1160, 1700, 1739, 1739, 1739, 1727, 1740, 1740, 1740,
-     1159, 1158, 1735, 1744, 1744, 1744, 1746, 1746, 1746, 1156,
-     1739, 1154, 1747, 1747, 1747, 1740, 1747, 1149, 1148, 1747,
-
-     1744, 1146, 1144, 1746, 1755, 1755, 1755, 1757, 1757, 1757,
-     1759, 1759, 1759, 1761, 1761, 1761, 1143, 1727, 1762, 1762,
-     1762, 1755, 1762, 1142, 1141, 1762, 1140, 1133, 1759, 1132,
-     1761, 1763, 1763, 1763, 1764, 1764, 1764, 1765, 1765, 1765,
-     1130, 1765, 1124, 1123, 1765, 1768, 1768, 1768, 1122, 1763,
-     1121, 1120, 1764, 1769, 1769, 1769, 1117, 1769, 1116, 1113,
-     1769, 1108, 1768, 1770, 1770, 1770, 1771, 1771, 1771, 1773,
-     1773, 1773, 1774, 1774, 1774, 1778, 1778, 1778, 1105, 1102,
-     1770, 1783, 1783, 1783, 1771, 1784, 1784, 1784, 1093, 1784,
-     1774, 1091, 1784, 1778, 1798, 1798, 1798, 1090, 1783, 1084,
-
-     1764, 1801, 1801, 1801, 1804, 1804, 1804, 1805, 1805, 1805,
-     1083, 1805, 1798, 1081, 1805, 1809, 1809, 1809, 1801, 1080,
-     1079, 1804, 1810, 1810, 1810, 1078, 1810, 1077, 1076, 1810,
-     1075, 1073, 1809, 1812, 1812, 1812, 1072, 1813, 1813, 1813,
-     1814, 1814, 1814, 1069, 1814, 1067, 1066, 1814, 1065, 1064,
-     1812, 1063, 1061, 1798, 1813, 1815, 1815, 1815, 1816, 1816,
-     1816, 1060, 1816, 1059, 1058, 1816, 1824, 1824, 1824, 1825,
-     1825, 1825, 1815, 1825, 1049, 1034, 1825, 1826, 1826, 1826,
-     1827, 1827, 1827, 1824, 1828, 1828, 1828, 1033, 1828, 1028,
-     1027, 1828, 1025, 1018, 1826, 1017, 1007, 1827, 1831, 1831,
-
-     1831, 1833, 1833, 1833, 1834, 1834, 1834, 1002, 1834,  999,
-      998, 1834, 1837, 1837, 1837,  995, 1831,  990,  981, 1833,
-     1838, 1838, 1838,  980, 1838,  979,  975, 1838,  967, 1837,
-     1839, 1839, 1839, 1844, 1844, 1844, 1847, 1847, 1847, 1848,
-     1848, 1848,  962, 1848,  961,  955, 1848,  954, 1839, 1866,
-     1866, 1866,  953, 1847, 1867, 1867, 1867, 1868, 1868, 1868,
-     1869, 1869, 1869, 1911, 1911, 1911, 1833, 1866, 1870, 1870,
-     1870,  952, 1870,  947, 1868, 1870,  946, 1869, 1871, 1871,
-     1871,  945, 1871,  944,  943, 1871, 1877, 1877, 1877,  942,
-     1877,  932,  931, 1877, 1881, 1881, 1881, 1882, 1882, 1882,
-
-     1866, 1882,  930, 1868, 1882, 1883, 1883, 1883,  929, 1883,
-      924, 1881, 1883, 1886, 1886, 1886, 1887, 1887, 1887,  923,
-     1887,  918,  917, 1887, 1889, 1889, 1889, 1891, 1891, 1891,
-     1886, 1891,  916,  915, 1891, 1894, 1894, 1894, 1895, 1895,
-     1895, 1889, 1895,  914,  913, 1895, 1896, 1896, 1896, 1897,
-     1897, 1897, 1894, 1897,  912,  911, 1897, 1904, 1904, 1904,
-     1905, 1905, 1905, 1896, 1905,  910,  905, 1905, 1910, 1910,
-     1910,  897, 1914, 1914, 1914, 1904, 1914,  895,  889, 1914,
-     1925, 1925, 1925,  887,  878, 1910, 1910, 1934, 1934, 1934,
-     1935, 1935, 1935, 1936, 1936, 1936,  873, 1925,  862, 1937,
-
-     1937, 1937,  860, 1937,  859, 1934, 1937,  858, 1904,  856,
-     1936, 1939, 1939, 1939,  855, 1939,  854,  853, 1939, 1946,
-     1946, 1946,  852, 1946,  850,  849, 1946, 1949, 1949, 1949,
-      848, 1949,  847,  846, 1949,  845, 1934, 1953, 1953, 1953,
-     1954, 1954, 1954,  844, 1954,  843,  842, 1954, 1956, 1956,
-     1956,  841, 1956,  835, 1953, 1956, 1959, 1959, 1959,  834,
-     1959,  833,  830, 1959, 1968, 1968, 1968, 1970, 1970, 1970,
-     1971, 1971, 1971, 1972, 1972, 1972,  829, 1972,  828,  826,
-     1972,  822, 1968,  819, 1970, 1970,  810, 1971, 1971,  809,
-      806, 1972, 1973, 1973, 1973, 1974, 1974, 1974, 1983, 1983,
-
-     1983, 1984, 1984, 1984,  805, 1984,  804,  803, 1984, 1993,
-     1993, 1993, 1994, 1994, 1994, 1983, 1994,  793,  786, 1994,
-     2000, 2000, 2000, 2002, 2002, 2002,  778, 1993, 2003, 2003,
-     2003,  777, 2003,  776,  773, 2003,  768, 2000,  765,  764,
-     2002, 2006, 2006, 2006, 2021, 2021, 2021, 2024, 2024, 2024,
-     2025, 2025, 2025,  760, 2025,  758,  755, 2025, 2006, 2026,
-     2026, 2026, 2021, 2026, 2024, 2024, 2026,  754, 2025, 2029,
-     2029, 2029,  753,  752, 1993,  751,  750, 2026, 2027, 2027,
-     2027, 2027, 2027, 2027, 2027, 2027, 2027,  746,  742, 2027,
-     2030, 2030, 2030,  739, 2027, 2027, 2027, 2027, 2027, 2039,
-
-     2039, 2039,  738, 2039,  735,  734, 2039, 2053, 2053, 2053,
-      733, 2053,  732,  731, 2053,  729, 2048, 2048, 2048,  728,
-     2052, 2052, 2052, 2027, 2027, 2028, 2028, 2028, 2028, 2028,
-     2028, 2028, 2028, 2028, 2048,  727, 2028, 2052, 2055, 2055,
-     2055, 2028, 2028, 2028, 2028, 2028, 2056, 2056, 2056,  726,
-     2056,  722,  717, 2056,  716, 2055, 2057, 2057, 2057, 2058,
-     2058, 2058,  715, 2058,  714,  711, 2058, 2091, 2091, 2091,
-     2028, 2028,  710, 2057, 2072, 2072, 2072,  709, 2072,  707,
-      703, 2072, 2096, 2096, 2096, 2091, 2096,  699,  698, 2096,
-      695,  692, 2072, 2075, 2075, 2075, 2075, 2075, 2075, 2075,
-
-     2075, 2075,  691,  690, 2075,  689,  688,  687,  685, 2075,
-     2075, 2075, 2075, 2075, 2100, 2100, 2100,  684, 2100,  683,
-      682, 2100, 2103, 2103, 2103,  681, 2103,  680,  679, 2103,
-      678, 2124, 2124, 2124,  677, 2133, 2133, 2133, 2075, 2075,
-     2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2124,
-     2124, 2076, 2133, 2134, 2134, 2134, 2076, 2076, 2076, 2076,
-     2076, 2135, 2135, 2135, 2140, 2140, 2140, 2158, 2158, 2158,
-     2134, 2149, 2149, 2149, 2153, 2153, 2153,  676, 2135,  675,
-      674, 2140,  673,  672, 2158, 2076, 2076,  671,  667, 2149,
-      666,  664, 2153, 2159, 2159, 2159,  663, 2159,  662,  661,
-
-     2159, 2160, 2160, 2160, 2161, 2161, 2161,  660, 2161,  656,
-      654, 2161, 2162, 2162, 2162, 2163, 2163, 2163, 2160, 2163,
-      653,  652, 2163,  651,  647, 2153, 2170, 2170, 2170, 2162,
-     2171, 2171, 2171,  643, 2171,  642,  639, 2171, 2178, 2178,
-     2178,  638,  637, 2170, 2184, 2184, 2184,  636, 2184,  635,
-      634, 2184,  631, 2187, 2187, 2187, 2178, 2187,  630,  629,
-     2187, 2190, 2190, 2190,  628, 2190,  625,  623, 2190, 2199,
-     2199, 2199,  620, 2199,  619, 2178, 2199, 2294, 2294, 2294,
-     2303, 2303, 2303,  618, 2303,  617,  616, 2303, 2404, 2404,
-     2404, 2405, 2405, 2405,  613, 2294,  612,  611, 2303,  610,
-
-      609,  606,  605,  604,  603,  601, 2404,  598,  596, 2405,
-     2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2408, 2409,
-     2409, 2409, 2409, 2409, 2409, 2409, 2409, 2409, 2410, 2410,
-     2410, 2410, 2410, 2410, 2410, 2410, 2410, 2411, 2411, 2411,
-     2411, 2411, 2411, 2411, 2411, 2411, 2412, 2412, 2412, 2412,
-     2412, 2412, 2412, 2412, 2412, 2413, 2413, 2413, 2413, 2413,
-     2413, 2413, 2413, 2413, 2414, 2414, 2414, 2414, 2414, 2414,
-     2414, 2414, 2414, 2415, 2415, 2415, 2415, 2415, 2415, 2415,
-     2415, 2415, 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
-     2416, 2417, 2417, 2417, 2417, 2417, 2417, 2417, 2417, 2417,
-
-     2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2419,
-     2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2420, 2420,
-     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2421, 2421, 2421,
-     2421, 2421, 2421, 2421, 2421, 2421, 2422, 2422, 2422, 2422,
-     2422, 2422, 2422, 2422, 2422, 2423, 2423, 2423, 2423, 2423,
-     2423, 2423, 2423, 2423, 2424, 2424, 2424, 2424, 2424, 2424,
-     2424, 2424, 2424, 2425, 2425, 2425, 2425, 2425, 2425, 2425,
-     2425, 2425, 2426, 2426, 2426, 2426, 2426, 2426, 2426, 2426,
-     2426, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427,
-     2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2429,
-
-     2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2430, 2430,
-     2430, 2430, 2430, 2430, 2430, 2430, 2430, 2431, 2431, 2431,
-     2431, 2431, 2431, 2431, 2431, 2431, 2432, 2432, 2432, 2432,
-     2432, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433, 2433,
-     2433, 2433, 2433, 2433, 2434, 2434, 2434, 2434, 2434, 2434,
-     2434, 2434, 2434, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
-     2435, 2435, 2436, 2436, 2436, 2436, 2436, 2436, 2436, 2436,
-     2436, 2437, 2437, 2437, 2437, 2437, 2437, 2437, 2437, 2437,
-     2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2439,
-     2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2440, 2440,
-
-     2440, 2440, 2440, 2440, 2440, 2440, 2440, 2441, 2441, 2441,
-     2441, 2441, 2441, 2441, 2441, 2441, 2442, 2442, 2442, 2442,
-     2442, 2442, 2442, 2442, 2442, 2443, 2443, 2443, 2443, 2443,
-     2443, 2443, 2443, 2443, 2444, 2444, 2444, 2444, 2444, 2444,
-     2444, 2444, 2444, 2445, 2445, 2445, 2445, 2445, 2445, 2445,
-     2445, 2445, 2446, 2446, 2446, 2446, 2446, 2446, 2446, 2446,
-     2446, 2447, 2447, 2447, 2447, 2447, 2447, 2447, 2447, 2447,
-     2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2449,
-     2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2450, 2450,
-     2450,  593,  592,  591, 2450, 2451, 2451, 2451,  590,  588,
-
-      587, 2451, 2452, 2452, 2452,  586,  583,  582, 2452, 2453,
-     2453, 2453,  581,  580,  579, 2453, 2454, 2454, 2454,  578,
-      577,  576, 2454, 2455, 2455, 2455,  574,  572,  571, 2455,
-     2456, 2456, 2456,  568,  567,  566, 2456, 2457, 2457, 2457,
-      563,  558,  556, 2457, 2458, 2458, 2458,  555,  554,  553,
-     2458, 2459, 2459, 2459,  552,  551,  547, 2459, 2460, 2460,
-     2460,  546,  545,  544, 2460, 2461, 2461, 2461,  540,  539,
-      538, 2461, 2462, 2462, 2462,  537,  536,  535, 2462, 2463,
-     2463, 2463,  534,  532,  529, 2463, 2464, 2464, 2464,  528,
-      526,  524, 2464, 2465, 2465, 2465,  521,  520,  514, 2465,
-
-     2466, 2466, 2466,  512,  510,  507, 2466, 2467, 2467, 2467,
-      504,  503,  502, 2467, 2468, 2468, 2468,  500,  499,  498,
-     2468, 2469, 2469, 2469, 2469, 2469, 2469, 2469,  497, 2469,
-     2470, 2470, 2470,  496,  493,  492, 2470, 2471,  491,  490,
-      489, 2471, 2472, 2472, 2472,  483,  482,  480, 2472, 2473,
-      474,  473,  469, 2473, 2474, 2474, 2474,  465,  462,  458,
-     2474, 2475,  452,  448,  440, 2475, 2476, 2476, 2476,  439,
-      438,  437, 2476, 2477,  433,  429,  426, 2477, 2478, 2478,
-     2478,  425,  424,  420, 2478, 2479,  414,  413,  409, 2479,
-     2480, 2480, 2480,  405,  401,  400, 2480, 2481,  396,  393,
-
-      392, 2481, 2482, 2482, 2482,  387,  383,  379, 2482, 2483,
-      375,  374,  373, 2483, 2484, 2484, 2484,  369,  363,  362,
-     2484, 2485,  358,  352,  351, 2485, 2486, 2486, 2486,  350,
-      349,  348, 2486, 2487,  347,  346,  342, 2487, 2488, 2488,
-     2488,  335,  333,  332, 2488, 2489,  331,  329,  325, 2489,
-     2490, 2490, 2490,  321,  318,  317, 2490, 2491,  316,  315,
-      314, 2491, 2492, 2492, 2492,  310,  306,  300, 2492, 2493,
-      298,  293,  292, 2493, 2494, 2494, 2494,  288,  282,  281,
-     2494, 2495,  280,  276,  273, 2495, 2496, 2496, 2496,  272,
-      267,  265, 2496, 2497,  264,  260,  257, 2497, 2498, 2498,
-
-     2498,  255,  254,  253, 2498, 2499,  249,  243,  239, 2499,
-     2500, 2500, 2500,  235,  227,  223, 2500, 2501,  219,  218,
-      217, 2501, 2502, 2502, 2502,  211,  210,  208, 2502, 2503,
-      205,  193,    0, 2503, 2504, 2504, 2504,    0,    0,    0,
-     2504, 2505,    0,    0,    0, 2505, 2506, 2506, 2506,    0,
-        0,    0, 2506, 2507,    0,    0,    0, 2507, 2508, 2508,
-     2508, 2508, 2508, 2508, 2508, 2508, 2508, 2509,    0,    0,
-        0,    0, 2509, 2510, 2510, 2510,    0,    0,    0, 2510,
-     2511, 2511, 2511, 2511,    0,    0, 2511, 2511, 2512, 2512,
-     2512,    0,    0,    0, 2512, 2513, 2513, 2513, 2513,    0,
-
-        0, 2513, 2513, 2514, 2514, 2514,    0,    0,    0, 2514,
-     2515, 2515, 2515, 2515,    0,    0, 2515, 2515, 2516, 2516,
-     2516,    0,    0,    0, 2516, 2517, 2517, 2517, 2517,    0,
-        0, 2517, 2517, 2518, 2518, 2518,    0,    0,    0, 2518,
-     2519, 2519, 2519, 2519,    0,    0, 2519, 2519, 2520, 2520,
-     2520,    0,    0,    0, 2520, 2521, 2521, 2521, 2521,    0,
-        0, 2521, 2521, 2522, 2522, 2522,    0,    0,    0, 2522,
-     2523, 2523, 2523, 2523,    0,    0, 2523, 2523, 2524, 2524,
-     2524,    0,    0,    0, 2524, 2525, 2525, 2525, 2525,    0,
-        0, 2525, 2525, 2526, 2526, 2526,    0,    0,    0, 2526,
-
-     2527, 2527, 2527, 2527,    0,    0, 2527, 2527, 2528, 2528,
-     2528,    0,    0,    0, 2528, 2529, 2529, 2529, 2529,    0,
-        0, 2529, 2529, 2530, 2530, 2530,    0,    0,    0, 2530,
-     2531, 2531, 2531, 2531,    0,    0, 2531, 2531, 2532, 2532,
-     2532, 2532,    0, 2532,    0, 2532, 2533, 2533, 2533, 2533,
-        0,    0, 2533, 2533, 2534, 2534, 2534, 2534,    0, 2534,
-        0, 2534, 2535, 2535, 2535, 2535,    0,    0, 2535, 2535,
-     2536, 2536, 2536,    0,    0,    0, 2536, 2537, 2537, 2537,
-     2537,    0,    0, 2537, 2537, 2538, 2538, 2538, 2538,    0,
-     2538,    0, 2538, 2539, 2539, 2539, 2539,    0,    0, 2539,
-
-     2539, 2540, 2540, 2540,    0,    0,    0, 2540, 2541, 2541,
-     2541, 2541,    0,    0, 2541, 2541, 2542, 2542, 2542,    0,
-        0,    0, 2542, 2543, 2543, 2543, 2543,    0,    0, 2543,
-     2543, 2544, 2544, 2544, 2544,    0,    0, 2544, 2544, 2545,
-     2545, 2545,    0,    0,    0, 2545, 2546, 2546, 2546, 2546,
-        0,    0, 2546, 2546, 2547, 2547, 2547, 2547, 2547, 2547,
-     2547, 2547, 2547, 2548,    0, 2548,    0,    0, 2548, 2549,
-     2549, 2549,    0,    0,    0, 2549, 2550, 2550, 2550, 2550,
-        0,    0, 2550, 2550, 2551, 2551, 2551, 2551,    0, 2551,
-        0, 2551, 2552, 2552, 2552, 2552,    0,    0, 2552, 2552,
-
-     2553, 2553, 2553, 2553,    0, 2553,    0, 2553, 2554, 2554,
-     2554, 2554,    0,    0, 2554, 2554, 2555, 2555, 2555,    0,
-        0,    0, 2555, 2556, 2556, 2556, 2556,    0,    0, 2556,
-     2556, 2557, 2557, 2557,    0,    0,    0, 2557, 2558, 2558,
-     2558, 2558,    0,    0, 2558, 2558, 2559, 2559, 2559,    0,
-        0,    0, 2559, 2560, 2560, 2560, 2560,    0,    0, 2560,
-     2560, 2561, 2561, 2561,    0,    0,    0, 2561, 2562, 2562,
-     2562, 2562,    0,    0, 2562, 2562, 2563, 2563, 2563,    0,
-        0,    0, 2563, 2564, 2564, 2564, 2564,    0,    0, 2564,
-     2564, 2565, 2565, 2565,    0,    0,    0, 2565, 2566, 2566,
-
-     2566, 2566,    0,    0, 2566, 2566, 2567, 2567, 2567,    0,
-        0,    0, 2567, 2568, 2568, 2568, 2568,    0,    0, 2568,
-     2568, 2569, 2569, 2569,    0,    0,    0, 2569, 2570, 2570,
-     2570, 2570,    0,    0, 2570, 2570, 2571, 2571, 2571,    0,
-        0,    0, 2571, 2572, 2572, 2572, 2572,    0,    0, 2572,
-     2572, 2573, 2573, 2573,    0,    0,    0, 2573, 2574, 2574,
-     2574, 2574,    0,    0, 2574, 2574, 2575, 2575, 2575,    0,
-        0,    0, 2575, 2576, 2576, 2576, 2576,    0,    0, 2576,
-     2576, 2577, 2577, 2577,    0,    0,    0, 2577, 2578, 2578,
-     2578, 2578,    0,    0, 2578, 2578, 2579, 2579, 2579,    0,
-
-        0,    0, 2579, 2580, 2580, 2580, 2580,    0,    0, 2580,
-     2580, 2581, 2581, 2581,    0,    0,    0, 2581, 2582, 2582,
-     2582, 2582,    0,    0, 2582, 2582, 2583, 2583, 2583, 2583,
+      188,  188,  188,  188,  742,  188,  188,  188,  188,  188,
+      758,  758,  758,  759,  759,  759,  763,  763,  763,  765,
+      765,  765,  768,  768,  768,  769,  769,  769,  758, 1875,
+     1876,  759, 1877,  763,  188,  188,  765,  771,  771,  771,
+      768, 1887, 1855,  769, 1888,  188,  773,  773,  773, 1889,
+     1864,  774,  774,  774,  771, 1893, 1901,  188,  230, 1903,
+      776,  776,  776, 1864,  773,  230,  781,  781,  781,  774,
+      759,  782,  782,  782,  230,  230,  769,  776,  777,  777,
+      777, 1911,  777, 1855,  781,  777, 1228, 1228, 1228,  782,
+      783,  783,  783, 1231, 1231, 1231,  784,  784,  784,  786,
+
+      786,  786,  230,  230,  230, 1856, 1867,  783, 1912,  230,
+      230,  774,  230,  784, 1913, 1914,  230,  786,  230, 1867,
+      230,  785,  785,  785, 1915, 1916,  782,  787,  787,  787,
+      789,  789,  789,  790,  790,  790, 1925, 1926,  785,  791,
+      791,  791,  792,  792,  792,  787, 1856,  789, 1930, 1931,
+      790,  793,  793,  793, 1921, 1932,  791, 1933, 1934,  792,
+     1935, 1936,  794,  794,  794,  796,  796,  796, 1937,  793,
+      797,  797,  797, 1939,  797, 1922, 1940,  797, 1941,  785,
+      794, 1942,  796,  790,  798,  798,  798,  787,  799,  799,
+      799,  800,  800,  800,  801,  801,  801,  790, 1943,  794,
+
+      792, 1921,  798,  802,  802,  802,  799, 1944,  800, 1945,
+     1922,  801,  803,  803,  803,  804,  804,  804, 1946, 1951,
+      802,  809,  809,  809,  810,  810,  810,  813,  813,  813,
+      803, 1955, 1956,  804,  814,  814,  814, 1957, 1958,  809,
+     1965, 1968,  810,  799,  801,  813,  815,  815,  815,  816,
+      816,  816,  814,  816, 1975, 1976,  816, 1977,  801,  817,
+      817,  817, 1978,  815,  818,  818,  818,  819,  819,  819,
+     1979,  820,  820,  820, 1980,  820, 1982,  817,  820,  871,
+      871,  871,  818,  871,  819,  804,  871,  810,  822,  822,
+      822,  823,  823,  823,  838,  838,  838,  814,  839,  839,
+
+      839,  841,  841,  841, 1988, 1989,  822, 1842, 1970,  823,
+     1982, 1990,  838,  865,  865,  865,  839, 1842, 1970,  841,
+      866,  866,  866, 1842,  818,  867,  867,  867, 1991, 1992,
+      865,  869,  869,  869,  870,  870,  870, 1843,  866,  874,
+      874,  874, 1971,  867,  876,  876,  876, 1843,  841,  869,
+     1973,  870, 1971, 1843,  823, 1993,  874,  877,  877,  877,
+     1973, 1974,  876,  879,  879,  879,  881,  881,  881, 1994,
+      881, 1974, 1995,  881, 1998,  877,  884,  884,  884, 1999,
+      869,  879,  885,  885,  885, 2001,  885, 2002, 2003,  885,
+      886,  886,  886,  884,  887,  887,  887, 2005, 2010,  874,
+
+     2011,  888,  888,  888, 2012,  888, 2014,  886,  888, 2020,
+      879,  887,  890,  890,  890,  892,  892,  892,  893,  893,
+      893,  895,  895,  895,  898,  898,  898, 2021, 2022,  890,
+      900,  900,  900,  892, 2023, 2024,  893, 2025, 2026,  895,
+     2027,  898,  901,  901,  901,  903,  903,  903,  900,  904,
+      904,  904, 2028,  904, 2029, 2031,  904,  908,  908,  908,
+      901, 2032, 2044,  903,  909,  909,  909,  911,  911,  911,
+      921,  921,  921, 2045, 2046,  908, 2036,  922,  922,  922,
+      895,  922,  909, 2047,  922,  911, 2048,  921,  927,  927,
+      927, 2049,  903,  928,  928,  928,  930,  930,  930, 2050,
+
+      935,  935,  935, 2051,  935, 2055,  927,  935,  938,  938,
+      938,  928, 2056, 2057,  930,  939,  939,  939, 2036,  939,
+     2058, 2059,  939, 2060, 2062,  938,  942,  942,  942,  943,
+      943,  943, 2063,  943, 2064, 2067,  943,  951,  951,  951,
+      952,  952,  952,  942,  954,  954,  954,  959,  959,  959,
+     2072,  959, 2073, 2074,  959,  951, 2075, 2076,  952, 2077,
+      930, 2078,  954,  962,  962,  962,  963,  963,  963, 2079,
+      963, 2080, 2081,  963,  966,  966,  966,  967,  967,  967,
+      962,  969,  969,  969,  971,  971,  971, 2082,  971, 2083,
+     2090,  971,  966, 2093, 2094,  967,  974,  974,  974,  969,
+
+      975,  975,  975,  977,  977,  977,  985,  985,  985, 2084,
+      954,  986,  986,  986,  974,  979,  979,  979,  975,  979,
+     2087,  977,  979, 2097,  985,  988,  988,  988, 2086,  986,
+     2099, 2087,  969,  989,  989,  989, 2100,  990,  990,  990,
+     2102,  990, 2086,  988,  990,  991,  991,  991, 2103, 2106,
+      989,  992,  992,  992, 2084,  992, 2107, 2108,  992,  994,
+      994,  994,  991,  995,  995,  995,  999,  999,  999,  977,
+      997,  997,  997, 1003, 1003, 1003, 2112,  994, 1000, 1000,
+     1000,  995, 1000,  999,  988, 1000, 2120, 2122,  997, 2124,
+     1003, 1004, 1004, 1004, 2126, 1004, 2133, 2133, 1004, 1006,
+
+     1006, 1006, 1007, 1007, 1007, 1009, 1009, 1009, 1011, 1011,
+     1011, 2131, 1011, 2134, 2136, 1011, 2138, 1006, 2139, 2140,
+     1007, 2141, 2150, 1009, 1014, 1014, 1014, 1015, 1015, 1015,
+     1017, 1017, 1017, 1018, 1018, 1018,  997, 1019, 1019, 1019,
+     2152, 1019, 1014, 2155, 1019, 1015, 2110, 2149, 1017, 2111,
+     1018, 2131, 1022, 1022, 1022, 1023, 1023, 1023, 2110, 1023,
+     2157, 2111, 1023, 1024, 1024, 1024, 2149, 2117, 1009, 1022,
+     1025, 1025, 1025, 1027, 1027, 1027, 1029, 1029, 1029, 2117,
+     2118, 1024, 1032, 1032, 1032, 1033, 1033, 1033, 1025, 1017,
+     2135, 1027, 2118, 1029, 1035, 1035, 1035, 1038, 1038, 1038,
+
+     1032, 2135, 2151, 1033, 1039, 1039, 1039, 1041, 1041, 1041,
+     2132, 2163, 1035, 2154, 2156, 1038, 1042, 1042, 1042, 2164,
+     1042, 2151, 1039, 1042, 2132, 1041, 1045, 1045, 1045, 1046,
+     1046, 1046, 2154, 2156, 1027, 1048, 1048, 1048, 1049, 1049,
+     1049, 2165, 1049, 2167, 1045, 1049, 2168, 1046, 1053, 1053,
+     1053, 2169, 2170, 1048, 1035, 1054, 1054, 1054, 2177, 2178,
+     1041, 1056, 1056, 1056, 2179, 2180, 1053, 1058, 1058, 1058,
+     1065, 1065, 1065, 1054, 1088, 1088, 1088, 2181, 2182, 1056,
+     1089, 1089, 1089, 2185, 1089, 1058, 1058, 1089, 1065, 2186,
+     2187, 1088, 2188, 2189, 1048, 1090, 1090, 1090, 1091, 1091,
+
+     1091, 1092, 1092, 1092, 2190, 1092, 2192, 2194, 1092, 1095,
+     1095, 1095, 2196, 1090, 2206, 1091, 1097, 1097, 1097, 2207,
+     1097, 1056, 2204, 1097, 1100, 1100, 1100, 1095, 2208, 1101,
+     1101, 1101, 2205, 1101, 2204, 1065, 1101, 2209, 1102, 1102,
+     1102, 1100, 1102, 2210, 2205, 1102, 1106, 1106, 1106, 1107,
+     1107, 1107, 1090, 1107, 2211, 2215, 1107, 2216, 1095, 1109,
+     1109, 1109, 2217, 1106, 1112, 1112, 1112, 1113, 1113, 1113,
+     2218, 1113, 2219, 2220, 1113, 2223, 2221, 1109, 1114, 1114,
+     1114, 1112, 1115, 1115, 1115, 1117, 1117, 1117, 1128, 1128,
+     1128, 2224, 1129, 1129, 1129, 1114, 1129, 2225, 2226, 1129,
+
+     1115, 2221, 2227, 1117, 2228, 1128, 1130, 1130, 1130, 1109,
+     1131, 1131, 1131, 2229, 1132, 1132, 1132, 1134, 1134, 1134,
+     1137, 1137, 1137, 1130, 1142, 1142, 1142, 1131, 1175, 1175,
+     1175, 1115, 1132, 2230, 1134, 2231, 2232, 1137, 1138, 1138,
+     1138, 1142, 1138, 2233, 2234, 1138, 1139, 1139, 1139, 2235,
+     1139, 2236, 2237, 1139, 2238, 2239, 1131, 1149, 1149, 1149,
+     1151, 1151, 1151, 1154, 1154, 1154, 2240, 1154, 2241, 2244,
+     1154, 1157, 1157, 1157, 1175, 1149, 2245, 1151, 2246, 1132,
+     1159, 1159, 1159, 1161, 1161, 1161, 2247, 2241, 1157, 1165,
+     1165, 1165, 2248, 1166, 1166, 1166, 2249, 2250, 1159, 2251,
+
+     2252, 1161, 2253, 1167, 1167, 1167, 1165, 1167, 2254, 2255,
+     1167, 1166, 1170, 1170, 1170, 2256, 1170, 2257, 2258, 1170,
+     2259, 1149, 1174, 1174, 1174, 1176, 1176, 1176, 2261, 1176,
+     2262, 2263, 1176, 2264, 2265, 1165, 2260, 1181, 1181, 1181,
+     1174, 1181, 2266, 1159, 1181, 1185, 1185, 1185, 1161, 1166,
+     1187, 1187, 1187, 1188, 1188, 1188, 2260, 1188, 2267, 2268,
+     1188, 2269, 2270, 1185, 2271, 1193, 1193, 1193, 1187, 1193,
+     2272, 2273, 1193, 1196, 1196, 1196, 1198, 1198, 1198, 1199,
+     1199, 1199, 2274, 1199, 2275, 2276, 1199, 1174, 1233, 1233,
+     1233, 1196, 2278, 1198, 1202, 1202, 1202, 1204, 1204, 1204,
+
+     1205, 1205, 1205, 2279, 2277, 1185, 1187, 1206, 1206, 1206,
+     2277, 2280, 1202, 2281, 1204, 1207, 1207, 1207, 1205, 2282,
+     1196, 1208, 1208, 1208, 2283, 1206, 1211, 1211, 1211, 1218,
+     1218, 1218, 1207, 1234, 1234, 1234, 1239, 1239, 1239, 1208,
+     1241, 1241, 1241, 1202, 1211, 2285, 2286, 1218, 1242, 1242,
+     1242, 1233, 1242, 2288, 2289, 1242, 1245, 1245, 1245, 1206,
+     1246, 1246, 1246, 2291, 1246, 2292, 1205, 1246, 2295, 1251,
+     1251, 1251, 2296, 2297, 1245, 2298, 2300, 1211, 2302, 1234,
+     2294, 1218, 1208, 1261, 1261, 1261, 1241, 1251, 1253, 1253,
+     1253, 2304, 1253, 1211, 2294, 1253, 1257, 1257, 1257, 2306,
+
+     1257, 1261, 2308, 1257, 1262, 1262, 1262, 1264, 1264, 1264,
+     2309, 1264, 2310, 2311, 1264, 1267, 1267, 1267, 2312, 2313,
+     1251, 2314, 1245, 1268, 1268, 1268, 2315, 1268, 2317, 2319,
+     1268, 2321, 1267, 1269, 1269, 1269, 1273, 1273, 1273, 1274,
+     1274, 1274, 2322, 1261, 1275, 1275, 1275, 1276, 1276, 1276,
+     2323, 1269, 1277, 1277, 1277, 1280, 1280, 1280, 2324, 1280,
+     2377, 2341, 1280, 1283, 1283, 1283, 1284, 1284, 1284, 2341,
+     1284, 2333, 2325, 1284, 1285, 1285, 1285, 1288, 1288, 1288,
+     1283, 1286, 1286, 1286, 1269, 1286, 2339, 1406, 1286, 1405,
+     2339, 1285, 1290, 1290, 1290, 1288, 1291, 1291, 1291, 2334,
+
+     1291, 2377, 2359, 1291, 1292, 1292, 1292, 1275, 2325, 1290,
+     1276, 2359, 1294, 1294, 1294, 1277, 1294, 2351, 2333, 1294,
+     2342, 1292, 1297, 1297, 1297, 1298, 1298, 1298, 2342, 1298,
+     2335, 2326, 1298, 1299, 1299, 1299, 1304, 1304, 1304, 1297,
+     1305, 1305, 1305, 1307, 1307, 1307, 2334, 1308, 1308, 1308,
+     1299, 1308, 2351, 1304, 1308, 1309, 1309, 1309, 1305, 2416,
+     1307, 1311, 1311, 1311, 1312, 1312, 1312, 2326, 1312, 2349,
+     2416, 1312, 1309, 1314, 1314, 1314, 2345, 2335, 1311, 1316,
+     1316, 1316, 1320, 1320, 1320, 1321, 1321, 1321, 2337, 1321,
+     2347, 1314, 1321, 1323, 1323, 1323, 2343, 1316, 2338, 1320,
+
+     1325, 1325, 1325, 2346, 2343, 1305, 1327, 1327, 1327, 2349,
+     2336, 1323, 1328, 1328, 1328, 1329, 1329, 1329, 1325, 1330,
+     1330, 1330, 2345, 1327, 1332, 1332, 1332, 2347, 2344, 1328,
+     1316, 2337, 1329, 1333, 1333, 1333, 2344, 1330, 1334, 1334,
+     1334, 2338, 1332, 1335, 1335, 1335, 1342, 1342, 1342, 2346,
+     1333, 1325, 1337, 1337, 1337, 1334, 1337, 2336, 2340, 1337,
+     2383, 1335, 2340, 2350, 1342, 1344, 1344, 1344, 2371, 2348,
+     1332, 2360, 1345, 1345, 1345, 2373, 1345, 2357, 1329, 1345,
+     2360, 1402, 1344, 1401, 2373, 1330, 1346, 1346, 1346, 2383,
+     1347, 1347, 1347, 1348, 1348, 1348, 2363, 1342, 1349, 1349,
+
+     1349, 2371, 1349, 2350, 1346, 1349, 2348, 1335, 1347, 2357,
+     1348, 1350, 1350, 1350, 1356, 1356, 1356, 1357, 1357, 1357,
+     1362, 1362, 1362, 1367, 1367, 1367, 1368, 1368, 1368, 1350,
+     2363, 1356, 1369, 1369, 1369, 1357, 1370, 1370, 1370, 1372,
+     1372, 1372, 1395, 2352, 1346, 1347, 1373, 1373, 1373, 1377,
+     1377, 1377, 1379, 1379, 1379, 1382, 1382, 1382, 1384, 1384,
+     1384, 1386, 1386, 1386, 1387, 1387, 1387, 1396, 1396, 1396,
+     1379, 1396, 1393, 1382, 1396, 1384, 2353, 1357, 2352, 1386,
+     2365, 1387, 1399, 1399, 1399, 2354, 1400, 1400, 1400, 1403,
+     1403, 1403, 1404, 1404, 1404, 2358, 1392, 1407, 1407, 1407,
+
+     1399, 1407, 1379, 1400, 1407, 1410, 1410, 1410, 2355, 1410,
+     2356, 2375, 1410, 1414, 1414, 1414, 1417, 1417, 1417, 1386,
+     1417, 2353, 2365, 1417, 1420, 1420, 1420, 2358, 1399, 2367,
+     2354, 1414, 1421, 1421, 1421, 2366, 1421, 2364, 2361, 1421,
+     2397, 1420, 1423, 1423, 1423, 2355, 1423, 2356, 2375, 1423,
+     1426, 1426, 1426, 1427, 1427, 1427, 2362, 1427, 2368, 2376,
+     1427, 1428, 1428, 1428, 1432, 1432, 1432, 1426, 1433, 1433,
+     1433, 2364, 1433, 2361, 2367, 1433, 2369, 2366, 1428, 2374,
+     2397, 1432, 1434, 1434, 1434, 1436, 1436, 1436, 2374, 1436,
+     2370, 2362, 1436, 1439, 1439, 1439, 2376, 1440, 1440, 1440,
+
+     1434, 1440, 2372, 2368, 1440, 1442, 1442, 1442, 2378, 1442,
+     1439, 2369, 1442, 1446, 1446, 1446, 1449, 1449, 1449, 1451,
+     1451, 1451, 1453, 1453, 1453, 2370, 1453, 2379, 2384, 1453,
+     2387, 1446, 2380, 1434, 1449, 2372, 1451, 1457, 1457, 1457,
+     1460, 1460, 1460, 1462, 1462, 1462, 1463, 1463, 1463, 2378,
+     1463, 2391, 2381, 1463, 2382, 1457, 1391, 2384, 1460, 2391,
+     1462, 1464, 1464, 1464, 2387, 1451, 1465, 1465, 1465, 1389,
+     1465, 1388, 2379, 1465, 1467, 1467, 1467, 2380, 1464, 1449,
+     1469, 1469, 1469, 1470, 1470, 1470, 1471, 1471, 1471, 2381,
+     1471, 2382, 1467, 1471, 1472, 1472, 1472, 2385, 1469, 2392,
+
+     1470, 1473, 1473, 1473, 2388, 1473, 2385, 2392, 1473, 2395,
+     2396, 1472, 1474, 1474, 1474, 1478, 1478, 1478, 1480, 1480,
+     1480, 2398, 1480, 2386, 2389, 1480, 1483, 1483, 1483, 1469,
+     1474, 2403, 2386, 1478, 1484, 1484, 1484, 2404, 2388, 1467,
+     2399, 1485, 1485, 1485, 1483, 1485, 2395, 2396, 1485, 1488,
+     1488, 1488, 1484, 1494, 1494, 1494, 1495, 1495, 1495, 1385,
+     1495, 2398, 1383, 1495, 1496, 1496, 1496, 1488, 2403, 2389,
+     1494, 1497, 1497, 1497, 2404, 2399, 1474, 1483, 1381, 1478,
+     1380, 1378, 1496, 1500, 1500, 1500, 2390, 1484, 1501, 1501,
+     1501, 1502, 1502, 1502, 1505, 1505, 1505, 1506, 1506, 1506,
+
+     1507, 1507, 1507, 1509, 1509, 1509, 1510, 1510, 1510, 1511,
+     1511, 1511, 1512, 1512, 1512, 1513, 1513, 1513, 1515, 1515,
+     1515, 1518, 1518, 1518, 1521, 1521, 1521, 1496, 1522, 1522,
+     1522, 2390, 1522, 2393, 1376, 1522, 1515, 2400, 1375, 1518,
+     2415, 1521, 1524, 1524, 1524, 1525, 1525, 1525, 1526, 1526,
+     1526, 2394, 1526, 2401, 2415, 1526, 1537, 1537, 1537, 2402,
+     1524, 1374, 1525, 1538, 1538, 1538, 1539, 1539, 1539, 1515,
+     1539, 2405, 2400, 1539, 1537, 1540, 1540, 1540, 1371, 2393,
+     1538, 1542, 1542, 1542, 1549, 1549, 1549, 2406, 1549, 1366,
+     1365, 1549, 1553, 1553, 1553, 1364, 1553, 2394, 2401, 1553,
+
+     1556, 1556, 1556, 2405, 2402, 1537, 1557, 1557, 1557, 1363,
+     1557, 2407, 2409, 1557, 1561, 1561, 1561, 1556, 1561, 2406,
+     2407, 1561, 1564, 1564, 1564, 1566, 1566, 1566, 2410, 1566,
+     2408, 2413, 1566, 1572, 1572, 1572, 1574, 1574, 1574, 2408,
+     1564, 1575, 1575, 1575, 2409, 1575, 1361, 2411, 1575, 1360,
+     1359, 1572, 1358, 1574, 1582, 1582, 1582, 1585, 1585, 1585,
+     2410, 1585, 1355, 2413, 1585, 1343, 1588, 1588, 1588, 2412,
+     1588, 1341, 1582, 1588, 1592, 1592, 1592, 1594, 1594, 1594,
+     1595, 1595, 1595, 1340, 1595, 1564, 1336, 1595, 1331, 1598,
+     1598, 1598, 1592, 1598, 2411, 1594, 1598, 1601, 1601, 1601,
+
+     1602, 1602, 1602, 1605, 1605, 1605, 1607, 1607, 1607, 1608,
+     1608, 1608, 1609, 1609, 1609, 1601, 2412, 1602, 1612, 1612,
+     1612, 1605, 1326, 1324, 1607, 1592, 1322, 1608, 1319, 1318,
+     1609, 1317, 1315, 1601, 1613, 1613, 1613, 1313, 1613, 1310,
+     1306, 1613, 1594, 1616, 1616, 1616, 1617, 1617, 1617, 1618,
+     1618, 1618, 1620, 1620, 1620, 1621, 1621, 1621, 1622, 1622,
+     1622, 1616, 1623, 1623, 1623, 1607, 1303, 1605, 1624, 1624,
+     1624, 1626, 1626, 1626, 1627, 1627, 1627, 1628, 1628, 1628,
+     1630, 1630, 1630, 1633, 1633, 1633, 1634, 1634, 1634, 2414,
+     1634, 1302, 1301, 1634, 1638, 1638, 1638, 1300, 1630, 1293,
+
+     1633, 1616, 1640, 1640, 1640, 1289, 1640, 1287, 1279, 1640,
+     1278, 1272, 1638, 1653, 1653, 1653, 1654, 1654, 1654, 1271,
+     1654, 2414, 1270, 1654, 1657, 1657, 1657, 1263, 1668, 1668,
+     1668, 1653, 1668, 1260, 1256, 1668, 1671, 1671, 1671, 1674,
+     1674, 1674, 1679, 1679, 1679, 1681, 1681, 1681, 1682, 1682,
+     1682, 1252, 1682, 1671, 1250, 1682, 1249, 1674, 1240, 1238,
+     1679, 1237, 1681, 1693, 1693, 1693, 1695, 1695, 1695, 1696,
+     1696, 1696, 1236, 1653, 1697, 1697, 1697, 1698, 1698, 1698,
+     1699, 1699, 1699, 1235, 1695, 1232, 1696, 1701, 1701, 1701,
+     1230, 1681, 1697, 1229, 1227, 1698, 1225, 1699, 1700, 1700,
+
+     1700, 1223, 1700, 1222, 1701, 1700, 1703, 1703, 1703, 1704,
+     1704, 1704, 1705, 1705, 1705, 1221, 1706, 1706, 1706, 1220,
+     1708, 1708, 1708, 1219, 1703, 1711, 1711, 1711, 1217, 1216,
+     1705, 1213, 1210, 1697, 1706, 1203, 1201, 1698, 1708, 1712,
+     1712, 1712, 1713, 1713, 1713, 1715, 1715, 1715, 1716, 1716,
+     1716, 1719, 1719, 1719, 1722, 1722, 1722, 1712, 1723, 1723,
+     1723, 1200, 1723, 1197, 1192, 1723, 1735, 1735, 1735, 1719,
+     1191, 1722, 1743, 1743, 1743, 1186, 1184, 1705, 1746, 1746,
+     1746, 1708, 1180, 1179, 1735, 1173, 1747, 1747, 1747, 1743,
+     1747, 1164, 1163, 1747, 1162, 1746, 1749, 1749, 1749, 1750,
+
+     1750, 1750, 1754, 1754, 1754, 1756, 1756, 1756, 1757, 1757,
+     1757, 1160, 1757, 1749, 1158, 1757, 1153, 1750, 1152, 1754,
+     1150, 1148, 1756, 1147, 1146, 1735, 1765, 1765, 1765, 1767,
+     1767, 1767, 1769, 1769, 1769, 1771, 1771, 1771, 1772, 1772,
+     1772, 1145, 1772, 1765, 1144, 1772, 1773, 1773, 1773, 1143,
+     1769, 1136, 1771, 1774, 1774, 1774, 1775, 1775, 1775, 1135,
+     1775, 1133, 1127, 1775, 1773, 1778, 1778, 1778, 1779, 1779,
+     1779, 1774, 1779, 1126, 1125, 1779, 1780, 1780, 1780, 1781,
+     1781, 1781, 1778, 1783, 1783, 1783, 1784, 1784, 1784, 1788,
+     1788, 1788, 1124, 1780, 1793, 1793, 1793, 1781, 1794, 1794,
+
+     1794, 1123, 1794, 1120, 1784, 1794, 1119, 1788, 1808, 1808,
+     1808, 1793, 1811, 1811, 1811, 1814, 1814, 1814, 1116, 1774,
+     1815, 1815, 1815, 1111, 1815, 1108, 1808, 1815, 1105, 1811,
+     1096, 1094, 1814, 1818, 1818, 1818, 1093, 1818, 1087, 1086,
+     1818, 1822, 1822, 1822, 1823, 1823, 1823, 1084, 1823, 1083,
+     1082, 1823, 1825, 1825, 1825, 1826, 1826, 1826, 1822, 1827,
+     1827, 1827, 1081, 1827, 1080, 1079, 1827, 1808, 1078, 1825,
+     1076, 1075, 1826, 1828, 1828, 1828, 1829, 1829, 1829, 1072,
+     1829, 1070, 1069, 1829, 1837, 1837, 1837, 1838, 1838, 1838,
+     1828, 1838, 1068, 1067, 1838, 1839, 1839, 1839, 1840, 1840,
+
+     1840, 1837, 1841, 1841, 1841, 1066, 1841, 1064, 1063, 1841,
+     1062, 1061, 1839, 1052, 1037, 1840, 1844, 1844, 1844, 1846,
+     1846, 1846, 1847, 1847, 1847, 1036, 1847, 1031, 1030, 1847,
+     1850, 1850, 1850, 1028, 1844, 1021, 1020, 1846, 1851, 1851,
+     1851, 1010, 1851, 1005, 1002, 1851, 1001, 1850, 1852, 1852,
+     1852, 1857, 1857, 1857, 1860, 1860, 1860, 1861, 1861, 1861,
+      998, 1861,  993,  984, 1861,  983, 1852, 1879, 1879, 1879,
+      982, 1860, 1880, 1880, 1880, 1881, 1881, 1881, 1882, 1882,
+     1882, 1924, 1924, 1924, 1846, 1879, 1883, 1883, 1883,  978,
+     1883,  970, 1881, 1883,  965, 1882, 1884, 1884, 1884,  964,
+
+     1884,  958,  957, 1884, 1890, 1890, 1890,  956, 1890,  955,
+      950, 1890, 1894, 1894, 1894, 1895, 1895, 1895, 1879, 1895,
+      949, 1881, 1895, 1896, 1896, 1896,  948, 1896,  947, 1894,
+     1896, 1899, 1899, 1899, 1900, 1900, 1900,  946, 1900,  945,
+      944, 1900, 1902, 1902, 1902, 1904, 1904, 1904, 1899, 1904,
+      934,  933, 1904, 1907, 1907, 1907, 1908, 1908, 1908, 1902,
+     1908,  932,  931, 1908, 1909, 1909, 1909, 1910, 1910, 1910,
+     1907, 1910,  926,  925, 1910, 1917, 1917, 1917, 1918, 1918,
+     1918, 1909, 1918,  920,  919, 1918, 1923, 1923, 1923,  918,
+     1927, 1927, 1927, 1917, 1927,  917,  916, 1927, 1938, 1938,
+
+     1938,  915,  914, 1923, 1923, 1947, 1947, 1947, 1948, 1948,
+     1948, 1949, 1949, 1949,  913, 1938,  912, 1950, 1950, 1950,
+      907, 1950,  899, 1947, 1950,  897, 1917,  891, 1949, 1952,
+     1952, 1952,  889, 1952,  880,  875, 1952, 1959, 1959, 1959,
+      864, 1959,  862,  861, 1959, 1962, 1962, 1962,  860, 1962,
+      858,  857, 1962,  856, 1947, 1966, 1966, 1966, 1967, 1967,
+     1967,  855, 1967,  854,  852, 1967, 1969, 1969, 1969,  851,
+     1969,  850, 1966, 1969, 1972, 1972, 1972,  849, 1972,  848,
+      847, 1972, 1981, 1981, 1981, 1983, 1983, 1983, 1984, 1984,
+     1984, 1985, 1985, 1985,  846, 1985,  845,  844, 1985,  843,
+
+     1981,  837, 1983, 1983,  836, 1984, 1984,  835,  832, 1985,
+     1986, 1986, 1986, 1987, 1987, 1987, 1996, 1996, 1996, 1997,
+     1997, 1997,  831, 1997,  830,  828, 1997, 2006, 2006, 2006,
+     2007, 2007, 2007, 1996, 2007,  824,  821, 2007, 2013, 2013,
+     2013, 2015, 2015, 2015,  812, 2006, 2016, 2016, 2016,  811,
+     2016,  808,  807, 2016,  806, 2013,  805,  795, 2015, 2019,
+     2019, 2019, 2034, 2034, 2034, 2037, 2037, 2037, 2038, 2038,
+     2038,  788, 2038,  780,  779, 2038, 2019, 2039, 2039, 2039,
+     2034, 2039, 2037, 2037, 2039,  778, 2038, 2042, 2042, 2042,
+      775,  770, 2006,  767,  766, 2039, 2040, 2040, 2040, 2040,
+
+     2040, 2040, 2040, 2040, 2040,  762,  760, 2040, 2043, 2043,
+     2043,  757, 2040, 2040, 2040, 2040, 2040, 2052, 2052, 2052,
+      756, 2052,  755,  754, 2052, 2066, 2066, 2066,  753, 2066,
+      752,  751, 2066,  747, 2061, 2061, 2061,  743, 2065, 2065,
+     2065, 2040, 2040, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+     2041, 2041, 2061,  740, 2041, 2065, 2068, 2068, 2068, 2041,
+     2041, 2041, 2041, 2041, 2069, 2069, 2069,  739, 2069,  736,
+      735, 2069,  734, 2068, 2070, 2070, 2070, 2071, 2071, 2071,
+      733, 2071,  732,  730, 2071, 2104, 2104, 2104, 2041, 2041,
+      729, 2070, 2085, 2085, 2085,  728, 2085,  727,  723, 2085,
+
+     2109, 2109, 2109, 2104, 2109,  718,  717, 2109,  716,  715,
+     2085, 2088, 2088, 2088, 2088, 2088, 2088, 2088, 2088, 2088,
+      712,  711, 2088,  710,  708,  704,  700, 2088, 2088, 2088,
+     2088, 2088, 2113, 2113, 2113,  699, 2113,  696,  693, 2113,
+     2116, 2116, 2116,  692, 2116,  691,  690, 2116,  689, 2137,
+     2137, 2137,  688, 2146, 2146, 2146, 2088, 2088, 2089, 2089,
+     2089, 2089, 2089, 2089, 2089, 2089, 2089, 2137, 2137, 2089,
+     2146, 2147, 2147, 2147, 2089, 2089, 2089, 2089, 2089, 2148,
+     2148, 2148, 2153, 2153, 2153, 2171, 2171, 2171, 2147, 2162,
+     2162, 2162, 2166, 2166, 2166,  686, 2148,  685,  684, 2153,
+
+      683,  682, 2171, 2089, 2089,  681,  680, 2162,  679,  678,
+     2166, 2172, 2172, 2172,  677, 2172,  676,  675, 2172, 2173,
+     2173, 2173, 2174, 2174, 2174,  674, 2174,  673,  672, 2174,
+     2175, 2175, 2175, 2176, 2176, 2176, 2173, 2176,  668,  667,
+     2176,  665,  664, 2166, 2183, 2183, 2183, 2175, 2184, 2184,
+     2184,  663, 2184,  662,  661, 2184, 2191, 2191, 2191,  657,
+      655, 2183, 2197, 2197, 2197,  654, 2197,  653,  652, 2197,
+      648, 2200, 2200, 2200, 2191, 2200,  644,  643, 2200, 2203,
+     2203, 2203,  640, 2203,  639,  638, 2203, 2212, 2212, 2212,
+      637, 2212,  636, 2191, 2212, 2307, 2307, 2307, 2316, 2316,
+
+     2316,  635, 2316,  632,  631, 2316, 2417, 2417, 2417, 2418,
+     2418, 2418,  630, 2307,  629,  626, 2316,  624,  621,  620,
+      619,  618,  617,  614, 2417,  613,  612, 2418, 2421, 2421,
+     2421, 2421, 2421, 2421, 2421, 2421, 2421, 2422, 2422, 2422,
+     2422, 2422, 2422, 2422, 2422, 2422, 2423, 2423, 2423, 2423,
+     2423, 2423, 2423, 2423, 2423, 2424, 2424, 2424, 2424, 2424,
+     2424, 2424, 2424, 2424, 2425, 2425, 2425, 2425, 2425, 2425,
+     2425, 2425, 2425, 2426, 2426, 2426, 2426, 2426, 2426, 2426,
+     2426, 2426, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2427,
+     2427, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428,
+
+     2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2429, 2430,
+     2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2431, 2431,
+     2431, 2431, 2431, 2431, 2431, 2431, 2431, 2432, 2432, 2432,
+     2432, 2432, 2432, 2432, 2432, 2432, 2433, 2433, 2433, 2433,
+     2433, 2433, 2433, 2433, 2433, 2434, 2434, 2434, 2434, 2434,
+     2434, 2434, 2434, 2434, 2435, 2435, 2435, 2435, 2435, 2435,
+     2435, 2435, 2435, 2436, 2436, 2436, 2436, 2436, 2436, 2436,
+     2436, 2436, 2437, 2437, 2437, 2437, 2437, 2437, 2437, 2437,
+     2437, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438, 2438,
+     2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2439, 2440,
+
+     2440, 2440, 2440, 2440, 2440, 2440, 2440, 2440, 2441, 2441,
+     2441, 2441, 2441, 2441, 2441, 2441, 2441, 2442, 2442, 2442,
+     2442, 2442, 2442, 2442, 2442, 2442, 2443, 2443, 2443, 2443,
+     2443, 2443, 2443, 2443, 2443, 2444, 2444, 2444, 2444, 2444,
+     2444, 2444, 2444, 2444, 2445, 2445, 2445, 2445, 2445, 2445,
+     2445, 2445, 2445, 2446, 2446, 2446, 2446, 2446, 2446, 2446,
+     2446, 2446, 2447, 2447, 2447, 2447, 2447, 2447, 2447, 2447,
+     2447, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448, 2448,
+     2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2450,
+     2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2451, 2451,
+
+     2451, 2451, 2451, 2451, 2451, 2451, 2451, 2452, 2452, 2452,
+     2452, 2452, 2452, 2452, 2452, 2452, 2453, 2453, 2453, 2453,
+     2453, 2453, 2453, 2453, 2453, 2454, 2454, 2454, 2454, 2454,
+     2454, 2454, 2454, 2454, 2455, 2455, 2455, 2455, 2455, 2455,
+     2455, 2455, 2455, 2456, 2456, 2456, 2456, 2456, 2456, 2456,
+     2456, 2456, 2457, 2457, 2457, 2457, 2457, 2457, 2457, 2457,
+     2457, 2458, 2458, 2458, 2458, 2458, 2458, 2458, 2458, 2458,
+     2459, 2459, 2459, 2459, 2459, 2459, 2459, 2459, 2459, 2460,
+     2460, 2460, 2460, 2460, 2460, 2460, 2460, 2460, 2461, 2461,
+     2461, 2461, 2461, 2461, 2461, 2461, 2461, 2462, 2462, 2462,
+
+     2462, 2462, 2462, 2462, 2462, 2462, 2463, 2463, 2463,  611,
+      610,  607, 2463, 2464, 2464, 2464,  606,  605,  604, 2464,
+     2465, 2465, 2465,  602,  599,  597, 2465, 2466, 2466, 2466,
+      594,  593,  592, 2466, 2467, 2467, 2467,  591,  589,  588,
+     2467, 2468, 2468, 2468,  587,  584,  583, 2468, 2469, 2469,
+     2469,  582,  581,  580, 2469, 2470, 2470, 2470,  579,  578,
+      577, 2470, 2471, 2471, 2471,  576,  574,  572, 2471, 2472,
+     2472, 2472,  571,  568,  567, 2472, 2473, 2473, 2473,  566,
+      563,  558, 2473, 2474, 2474, 2474,  556,  555,  554, 2474,
+     2475, 2475, 2475,  553,  552,  551, 2475, 2476, 2476, 2476,
+
+      547,  546,  545, 2476, 2477, 2477, 2477,  544,  540,  539,
+     2477, 2478, 2478, 2478,  538,  537,  536, 2478, 2479, 2479,
+     2479,  535,  534,  532, 2479, 2480, 2480, 2480,  529,  528,
+      526, 2480, 2481, 2481, 2481,  524,  521,  520, 2481, 2482,
+     2482, 2482, 2482, 2482, 2482, 2482,  514, 2482, 2483, 2483,
+     2483,  512,  510,  507, 2483, 2484,  504,  503,  502, 2484,
+     2485, 2485, 2485,  500,  499,  498, 2485, 2486,  497,  496,
+      493, 2486, 2487, 2487, 2487,  492,  491,  490, 2487, 2488,
+      489,  483,  482, 2488, 2489, 2489, 2489,  480,  474,  473,
+     2489, 2490,  469,  465,  462, 2490, 2491, 2491, 2491,  458,
+
+      452,  448, 2491, 2492,  440,  439,  438, 2492, 2493, 2493,
+     2493,  437,  433,  429, 2493, 2494,  426,  425,  424, 2494,
+     2495, 2495, 2495,  420,  414,  413, 2495, 2496,  409,  405,
+      401, 2496, 2497, 2497, 2497,  400,  396,  393, 2497, 2498,
+      392,  387,  383, 2498, 2499, 2499, 2499,  379,  375,  374,
+     2499, 2500,  373,  369,  363, 2500, 2501, 2501, 2501,  362,
+      358,  352, 2501, 2502,  351,  350,  349, 2502, 2503, 2503,
+     2503,  348,  347,  346, 2503, 2504,  342,  333,  332, 2504,
+     2505, 2505, 2505,  331,  329,  325, 2505, 2506,  321,  318,
+      317, 2506, 2507, 2507, 2507,  316,  315,  314, 2507, 2508,
+
+      310,  306,  300, 2508, 2509, 2509, 2509,  298,  293,  292,
+     2509, 2510,  288,  282,  281, 2510, 2511, 2511, 2511,  280,
+      276,  273, 2511, 2512,  272,  267,  265, 2512, 2513, 2513,
+     2513,  264,  260,  257, 2513, 2514,  255,  254,  253, 2514,
+     2515, 2515, 2515,  249,  243,  239, 2515, 2516,  235,  227,
+      223, 2516, 2517, 2517, 2517,  219,  218,  217, 2517, 2518,
+      211,  210,  208, 2518, 2519, 2519, 2519,  205,  193,    0,
+     2519, 2520,    0,    0,    0, 2520, 2521, 2521, 2521, 2521,
+     2521, 2521, 2521, 2521, 2521, 2522,    0,    0,    0,    0,
+     2522, 2523, 2523, 2523,    0,    0,    0, 2523, 2524, 2524,
+
+     2524, 2524,    0,    0, 2524, 2524, 2525, 2525, 2525,    0,
+        0,    0, 2525, 2526, 2526, 2526, 2526,    0,    0, 2526,
+     2526, 2527, 2527, 2527,    0,    0,    0, 2527, 2528, 2528,
+     2528, 2528,    0,    0, 2528, 2528, 2529, 2529, 2529,    0,
+        0,    0, 2529, 2530, 2530, 2530, 2530,    0,    0, 2530,
+     2530, 2531, 2531, 2531,    0,    0,    0, 2531, 2532, 2532,
+     2532, 2532,    0,    0, 2532, 2532, 2533, 2533, 2533,    0,
+        0,    0, 2533, 2534, 2534, 2534, 2534,    0,    0, 2534,
+     2534, 2535, 2535, 2535,    0,    0,    0, 2535, 2536, 2536,
+     2536, 2536,    0,    0, 2536, 2536, 2537, 2537, 2537,    0,
+
+        0,    0, 2537, 2538, 2538, 2538, 2538,    0,    0, 2538,
+     2538, 2539, 2539, 2539,    0,    0,    0, 2539, 2540, 2540,
+     2540, 2540,    0,    0, 2540, 2540, 2541, 2541, 2541,    0,
+        0,    0, 2541, 2542, 2542, 2542, 2542,    0,    0, 2542,
+     2542, 2543, 2543, 2543,    0,    0,    0, 2543, 2544, 2544,
+     2544, 2544,    0,    0, 2544, 2544, 2545, 2545, 2545, 2545,
+        0, 2545,    0, 2545, 2546, 2546, 2546, 2546,    0,    0,
+     2546, 2546, 2547, 2547, 2547, 2547,    0, 2547,    0, 2547,
+     2548, 2548, 2548, 2548,    0,    0, 2548, 2548, 2549, 2549,
+     2549,    0,    0,    0, 2549, 2550, 2550, 2550, 2550,    0,
+
+        0, 2550, 2550, 2551, 2551, 2551, 2551,    0, 2551,    0,
+     2551, 2552, 2552, 2552, 2552,    0,    0, 2552, 2552, 2553,
+     2553, 2553,    0,    0,    0, 2553, 2554, 2554, 2554, 2554,
+        0,    0, 2554, 2554, 2555, 2555, 2555,    0,    0,    0,
+     2555, 2556, 2556, 2556, 2556,    0,    0, 2556, 2556, 2557,
+     2557, 2557, 2557,    0,    0, 2557, 2557, 2558, 2558, 2558,
+        0,    0,    0, 2558, 2559, 2559, 2559, 2559,    0,    0,
+     2559, 2559, 2560, 2560, 2560, 2560, 2560, 2560, 2560, 2560,
+     2560, 2561,    0, 2561,    0,    0, 2561, 2562, 2562, 2562,
+        0,    0,    0, 2562, 2563, 2563, 2563, 2563,    0,    0,
+
+     2563, 2563, 2564, 2564, 2564, 2564,    0, 2564,    0, 2564,
+     2565, 2565, 2565, 2565,    0,    0, 2565, 2565, 2566, 2566,
+     2566, 2566,    0, 2566,    0, 2566, 2567, 2567, 2567, 2567,
+        0,    0, 2567, 2567, 2568, 2568, 2568,    0,    0,    0,
+     2568, 2569, 2569, 2569, 2569,    0,    0, 2569, 2569, 2570,
+     2570, 2570,    0,    0,    0, 2570, 2571, 2571, 2571, 2571,
+        0,    0, 2571, 2571, 2572, 2572, 2572,    0,    0,    0,
+     2572, 2573, 2573, 2573, 2573,    0,    0, 2573, 2573, 2574,
+     2574, 2574,    0,    0,    0, 2574, 2575, 2575, 2575, 2575,
+        0,    0, 2575, 2575, 2576, 2576, 2576,    0,    0,    0,
+
+     2576, 2577, 2577, 2577, 2577,    0,    0, 2577, 2577, 2578,
+     2578, 2578,    0,    0,    0, 2578, 2579, 2579, 2579, 2579,
+        0,    0, 2579, 2579, 2580, 2580, 2580,    0,    0,    0,
+     2580, 2581, 2581, 2581, 2581,    0,    0, 2581, 2581, 2582,
+     2582, 2582,    0,    0,    0, 2582, 2583, 2583, 2583, 2583,
         0,    0, 2583, 2583, 2584, 2584, 2584,    0,    0,    0,
      2584, 2585, 2585, 2585, 2585,    0,    0, 2585, 2585, 2586,
-     2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2587, 2587,
-     2587, 2587, 2587, 2587, 2587, 2587, 2587, 2588, 2588, 2588,
-        0,    0,    0, 2588, 2589, 2589, 2589, 2589,    0,    0,
-     2589, 2589, 2590, 2590, 2590, 2590,    0,    0, 2590, 2590,
-     2591, 2591, 2591,    0,    0,    0, 2591, 2592, 2592, 2592,
-
-     2592,    0,    0, 2592, 2592, 2593, 2593, 2593,    0,    0,
-        0, 2593, 2594, 2594, 2594, 2594,    0,    0, 2594, 2594,
-     2595, 2595, 2595,    0,    0,    0, 2595, 2596, 2596, 2596,
-     2596,    0,    0, 2596, 2596, 2597, 2597, 2597,    0,    0,
-        0, 2597, 2598, 2598, 2598,    0,    0,    0, 2598, 2599,
-     2599, 2599, 2599,    0,    0, 2599, 2599, 2600, 2600, 2600,
-        0,    0,    0, 2600, 2601, 2601, 2601, 2601,    0,    0,
-     2601, 2601, 2602, 2602, 2602,    0,    0,    0, 2602, 2603,
-     2603, 2603, 2603,    0,    0, 2603, 2603, 2604, 2604, 2604,
-        0,    0,    0, 2604, 2605, 2605, 2605, 2605,    0,    0,
-
-     2605, 2605, 2606, 2606, 2606,    0,    0,    0, 2606, 2607,
-     2607, 2607, 2607,    0,    0, 2607, 2607, 2608, 2608, 2608,
-        0,    0,    0, 2608, 2609, 2609, 2609, 2609,    0,    0,
-     2609, 2609, 2610, 2610, 2610,    0,    0,    0, 2610, 2611,
-     2611, 2611, 2611,    0,    0, 2611, 2611, 2612, 2612, 2612,
-        0,    0,    0, 2612, 2613, 2613, 2613, 2613,    0,    0,
-     2613, 2613, 2614, 2614, 2614,    0,    0,    0, 2614, 2615,
-     2615, 2615, 2615,    0,    0, 2615, 2615, 2616, 2616, 2616,
-        0,    0,    0, 2616, 2617, 2617, 2617, 2617,    0,    0,
-     2617, 2617, 2618, 2618, 2618, 2618,    0, 2618,    0, 2618,
-
-     2619, 2619, 2619, 2619,    0,    0, 2619, 2619, 2620, 2620,
-     2620, 2620,    0,    0, 2620, 2620, 2621, 2621, 2621, 2621,
-        0, 2621,    0, 2621, 2622, 2622, 2622, 2622,    0,    0,
-     2622, 2622, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623,
-     2623, 2624, 2624, 2624, 2624, 2624, 2624, 2624, 2624, 2624,
-     2625, 2625, 2625,    0,    0,    0, 2625, 2626, 2626, 2626,
-     2626,    0,    0, 2626, 2626, 2627, 2627, 2627, 2627,    0,
-        0, 2627, 2627, 2628, 2628, 2628,    0,    0,    0, 2628,
-     2629, 2629, 2629, 2629,    0,    0, 2629, 2629, 2630, 2630,
-     2630,    0,    0,    0, 2630, 2631, 2631, 2631, 2631,    0,
-
-        0, 2631, 2631, 2632, 2632, 2632,    0,    0,    0, 2632,
-     2633, 2633, 2633, 2633,    0,    0, 2633, 2633, 2634, 2634,
-     2634,    0,    0,    0, 2634, 2635, 2635, 2635,    0,    0,
-        0, 2635, 2636, 2636, 2636, 2636,    0,    0, 2636, 2636,
-     2637, 2637, 2637,    0,    0,    0, 2637, 2638, 2638, 2638,
-     2638,    0,    0, 2638, 2638, 2639, 2639, 2639,    0,    0,
-        0, 2639, 2640, 2640, 2640, 2640,    0,    0, 2640, 2640,
-     2641, 2641, 2641,    0,    0,    0, 2641, 2642, 2642, 2642,
-     2642,    0,    0, 2642, 2642, 2643, 2643, 2643,    0,    0,
-        0, 2643, 2644, 2644, 2644, 2644,    0,    0, 2644, 2644,
-
-     2645, 2645, 2645,    0,    0,    0, 2645, 2646, 2646, 2646,
-     2646,    0,    0, 2646, 2646, 2647, 2647, 2647, 2647,    0,
-     2647,    0, 2647, 2648, 2648, 2648, 2648,    0,    0, 2648,
-     2648, 2649, 2649, 2649,    0,    0,    0, 2649, 2650, 2650,
-     2650, 2650,    0,    0, 2650, 2650, 2651, 2651, 2651, 2651,
-        0, 2651,    0, 2651, 2652, 2652, 2652, 2652,    0,    0,
-     2652, 2652, 2653, 2653, 2653,    0,    0,    0, 2653, 2654,
-     2654, 2654, 2654,    0,    0, 2654, 2654, 2655, 2655, 2655,
-     2655,    0,    0, 2655, 2655, 2656, 2656, 2656, 2656,    0,
-        0, 2656, 2656, 2657, 2657, 2657, 2657,    0,    0, 2657,
-
-     2657, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658, 2658,
-     2659, 2659, 2659, 2659, 2659, 2659, 2659, 2659, 2659, 2660,
-     2660, 2660, 2660,    0, 2660,    0, 2660, 2661, 2661, 2661,
-     2661,    0,    0, 2661, 2661, 2662, 2662, 2662, 2662,    0,
-        0, 2662, 2662, 2663, 2663, 2663,    0,    0,    0, 2663,
-     2664, 2664, 2664, 2664,    0,    0, 2664, 2664, 2665, 2665,
-     2665,    0,    0,    0, 2665, 2666, 2666, 2666, 2666,    0,
-        0, 2666, 2666, 2667, 2667, 2667, 2667,    0, 2667,    0,
-     2667, 2668, 2668, 2668, 2668,    0,    0, 2668, 2668, 2669,
-     2669, 2669, 2669,    0, 2669,    0, 2669, 2670, 2670, 2670,
-
-        0,    0,    0, 2670, 2671, 2671, 2671,    0,    0,    0,
-     2671, 2672, 2672, 2672, 2672,    0,    0, 2672, 2672, 2673,
-     2673, 2673,    0,    0,    0, 2673, 2674, 2674, 2674,    0,
-        0,    0, 2674, 2675, 2675, 2675, 2675,    0,    0, 2675,
+     2586, 2586,    0,    0,    0, 2586, 2587, 2587, 2587, 2587,
+        0,    0, 2587, 2587, 2588, 2588, 2588,    0,    0,    0,
+     2588, 2589, 2589, 2589, 2589,    0,    0, 2589, 2589, 2590,
+
+     2590, 2590,    0,    0,    0, 2590, 2591, 2591, 2591, 2591,
+        0,    0, 2591, 2591, 2592, 2592, 2592,    0,    0,    0,
+     2592, 2593, 2593, 2593, 2593,    0,    0, 2593, 2593, 2594,
+     2594, 2594,    0,    0,    0, 2594, 2595, 2595, 2595, 2595,
+        0,    0, 2595, 2595, 2596, 2596, 2596, 2596,    0,    0,
+     2596, 2596, 2597, 2597, 2597,    0,    0,    0, 2597, 2598,
+     2598, 2598, 2598,    0,    0, 2598, 2598, 2599, 2599, 2599,
+     2599, 2599, 2599, 2599, 2599, 2599, 2600, 2600, 2600, 2600,
+     2600, 2600, 2600, 2600, 2600, 2601, 2601, 2601,    0,    0,
+        0, 2601, 2602, 2602, 2602, 2602,    0,    0, 2602, 2602,
+
+     2603, 2603, 2603, 2603,    0,    0, 2603, 2603, 2604, 2604,
+     2604,    0,    0,    0, 2604, 2605, 2605, 2605, 2605,    0,
+        0, 2605, 2605, 2606, 2606, 2606,    0,    0,    0, 2606,
+     2607, 2607, 2607, 2607,    0,    0, 2607, 2607, 2608, 2608,
+     2608,    0,    0,    0, 2608, 2609, 2609, 2609, 2609,    0,
+        0, 2609, 2609, 2610, 2610, 2610,    0,    0,    0, 2610,
+     2611, 2611, 2611,    0,    0,    0, 2611, 2612, 2612, 2612,
+     2612,    0,    0, 2612, 2612, 2613, 2613, 2613,    0,    0,
+        0, 2613, 2614, 2614, 2614, 2614,    0,    0, 2614, 2614,
+     2615, 2615, 2615,    0,    0,    0, 2615, 2616, 2616, 2616,
+
+     2616,    0,    0, 2616, 2616, 2617, 2617, 2617,    0,    0,
+        0, 2617, 2618, 2618, 2618, 2618,    0,    0, 2618, 2618,
+     2619, 2619, 2619,    0,    0,    0, 2619, 2620, 2620, 2620,
+     2620,    0,    0, 2620, 2620, 2621, 2621, 2621,    0,    0,
+        0, 2621, 2622, 2622, 2622, 2622,    0,    0, 2622, 2622,
+     2623, 2623, 2623,    0,    0,    0, 2623, 2624, 2624, 2624,
+     2624,    0,    0, 2624, 2624, 2625, 2625, 2625,    0,    0,
+        0, 2625, 2626, 2626, 2626, 2626,    0,    0, 2626, 2626,
+     2627, 2627, 2627,    0,    0,    0, 2627, 2628, 2628, 2628,
+     2628,    0,    0, 2628, 2628, 2629, 2629, 2629,    0,    0,
+
+        0, 2629, 2630, 2630, 2630, 2630,    0,    0, 2630, 2630,
+     2631, 2631, 2631, 2631,    0, 2631,    0, 2631, 2632, 2632,
+     2632, 2632,    0,    0, 2632, 2632, 2633, 2633, 2633, 2633,
+        0,    0, 2633, 2633, 2634, 2634, 2634, 2634,    0, 2634,
+        0, 2634, 2635, 2635, 2635, 2635,    0,    0, 2635, 2635,
+     2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2636, 2637,
+     2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2638, 2638,
+     2638,    0,    0,    0, 2638, 2639, 2639, 2639, 2639,    0,
+        0, 2639, 2639, 2640, 2640, 2640, 2640,    0,    0, 2640,
+     2640, 2641, 2641, 2641,    0,    0,    0, 2641, 2642, 2642,
+
+     2642, 2642,    0,    0, 2642, 2642, 2643, 2643, 2643,    0,
+        0,    0, 2643, 2644, 2644, 2644, 2644,    0,    0, 2644,
+     2644, 2645, 2645, 2645,    0,    0,    0, 2645, 2646, 2646,
+     2646, 2646,    0,    0, 2646, 2646, 2647, 2647, 2647,    0,
+        0,    0, 2647, 2648, 2648, 2648,    0,    0,    0, 2648,
+     2649, 2649, 2649, 2649,    0,    0, 2649, 2649, 2650, 2650,
+     2650,    0,    0,    0, 2650, 2651, 2651, 2651, 2651,    0,
+        0, 2651, 2651, 2652, 2652, 2652,    0,    0,    0, 2652,
+     2653, 2653, 2653, 2653,    0,    0, 2653, 2653, 2654, 2654,
+     2654,    0,    0,    0, 2654, 2655, 2655, 2655, 2655,    0,
+
+        0, 2655, 2655, 2656, 2656, 2656,    0,    0,    0, 2656,
+     2657, 2657, 2657, 2657,    0,    0, 2657, 2657, 2658, 2658,
+     2658,    0,    0,    0, 2658, 2659, 2659, 2659, 2659,    0,
+        0, 2659, 2659, 2660, 2660, 2660, 2660,    0, 2660,    0,
+     2660, 2661, 2661, 2661, 2661,    0,    0, 2661, 2661, 2662,
+     2662, 2662,    0,    0,    0, 2662, 2663, 2663, 2663, 2663,
+        0,    0, 2663, 2663, 2664, 2664, 2664, 2664,    0, 2664,
+        0, 2664, 2665, 2665, 2665, 2665,    0,    0, 2665, 2665,
+     2666, 2666, 2666,    0,    0,    0, 2666, 2667, 2667, 2667,
+     2667,    0,    0, 2667, 2667, 2668, 2668, 2668, 2668,    0,
+
+        0, 2668, 2668, 2669, 2669, 2669, 2669,    0,    0, 2669,
+     2669, 2670, 2670, 2670, 2670,    0,    0, 2670, 2670, 2671,
+     2671, 2671, 2671, 2671, 2671, 2671, 2671, 2671, 2672, 2672,
+     2672, 2672, 2672, 2672, 2672, 2672, 2672, 2673, 2673, 2673,
+     2673,    0, 2673,    0, 2673, 2674, 2674, 2674, 2674,    0,
+        0, 2674, 2674, 2675, 2675, 2675, 2675,    0,    0, 2675,
      2675, 2676, 2676, 2676,    0,    0,    0, 2676, 2677, 2677,
-     2677,    0,    0,    0, 2677, 2678, 2678, 2678, 2678,    0,
-        0, 2678, 2678, 2679, 2679, 2679,    0,    0,    0, 2679,
-     2680, 2680, 2680, 2680,    0,    0, 2680, 2680, 2681, 2681,
-     2681,    0,    0,    0, 2681, 2682, 2682, 2682, 2682,    0,
-        0, 2682, 2682, 2683, 2683, 2683, 2683,    0,    0, 2683,
-
-     2683, 2684, 2684, 2684,    0,    0,    0, 2684, 2685, 2685,
-     2685, 2685,    0,    0, 2685, 2685, 2686, 2686, 2686, 2686,
-        0,    0, 2686, 2686, 2687, 2687, 2687, 2687,    0,    0,
-     2687, 2687, 2688, 2688, 2688, 2688, 2688, 2688, 2688, 2688,
-     2688, 2689, 2689, 2689, 2689, 2689, 2689, 2689, 2689, 2689,
-     2690, 2690, 2690, 2690,    0,    0, 2690, 2690, 2691, 2691,
-     2691, 2691,    0,    0, 2691, 2691, 2692, 2692, 2692,    0,
-        0,    0, 2692, 2693, 2693, 2693,    0,    0,    0, 2693,
-     2694, 2694, 2694, 2694,    0,    0, 2694, 2694, 2695, 2695,
-     2695, 2695, 2695, 2695, 2695, 2695, 2695, 2696, 2696, 2696,
-
-     2696, 2696, 2696, 2696, 2696, 2696, 2697, 2697, 2697, 2697,
-     2697, 2697, 2697, 2697, 2697, 2698, 2698, 2698, 2698, 2698,
-     2698, 2698, 2698, 2698, 2699, 2699, 2699, 2699, 2699, 2699,
-     2699, 2699, 2699, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
-     2700, 2700, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-
-     2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407, 2407,
-     2407, 2407, 2407, 2407, 2407
+     2677, 2677,    0,    0, 2677, 2677, 2678, 2678, 2678,    0,
+        0,    0, 2678, 2679, 2679, 2679, 2679,    0,    0, 2679,
+     2679, 2680, 2680, 2680, 2680,    0, 2680,    0, 2680, 2681,
+
+     2681, 2681, 2681,    0,    0, 2681, 2681, 2682, 2682, 2682,
+     2682,    0, 2682,    0, 2682, 2683, 2683, 2683,    0,    0,
+        0, 2683, 2684, 2684, 2684,    0,    0,    0, 2684, 2685,
+     2685, 2685, 2685,    0,    0, 2685, 2685, 2686, 2686, 2686,
+        0,    0,    0, 2686, 2687, 2687, 2687,    0,    0,    0,
+     2687, 2688, 2688, 2688, 2688,    0,    0, 2688, 2688, 2689,
+     2689, 2689,    0,    0,    0, 2689, 2690, 2690, 2690,    0,
+        0,    0, 2690, 2691, 2691, 2691, 2691,    0,    0, 2691,
+     2691, 2692, 2692, 2692,    0,    0,    0, 2692, 2693, 2693,
+     2693, 2693,    0,    0, 2693, 2693, 2694, 2694, 2694,    0,
+
+        0,    0, 2694, 2695, 2695, 2695, 2695,    0,    0, 2695,
+     2695, 2696, 2696, 2696, 2696,    0,    0, 2696, 2696, 2697,
+     2697, 2697,    0,    0,    0, 2697, 2698, 2698, 2698, 2698,
+        0,    0, 2698, 2698, 2699, 2699, 2699, 2699,    0,    0,
+     2699, 2699, 2700, 2700, 2700, 2700,    0,    0, 2700, 2700,
+     2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2702,
+     2702, 2702, 2702, 2702, 2702, 2702, 2702, 2702, 2703, 2703,
+     2703, 2703,    0,    0, 2703, 2703, 2704, 2704, 2704, 2704,
+        0,    0, 2704, 2704, 2705, 2705, 2705,    0,    0,    0,
+     2705, 2706, 2706, 2706,    0,    0,    0, 2706, 2707, 2707,
+
+     2707, 2707,    0,    0, 2707, 2707, 2708, 2708, 2708, 2708,
+     2708, 2708, 2708, 2708, 2708, 2709, 2709, 2709, 2709, 2709,
+     2709, 2709, 2709, 2709, 2710, 2710, 2710, 2710, 2710, 2710,
+     2710, 2710, 2710, 2711, 2711, 2711, 2711, 2711, 2711, 2711,
+     2711, 2711, 2712, 2712, 2712, 2712, 2712, 2712, 2712, 2712,
+     2712, 2713, 2713, 2713, 2713, 2713, 2713, 2713, 2713, 2713,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420, 2420,
+     2420, 2420, 2420
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[404] =
+static yyconst flex_int32_t yy_rule_can_match_eol[406] =
     {   0,
 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 
     0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 
@@ -3133,18 +3142,18 @@ static yyconst flex_int32_t yy_rule_can_match_eol[404] =
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 
     0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
+    1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 
     1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1
-    0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 
     1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 
-    1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
-    0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 
-    1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 
-    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 
-    0, 0, 1, 0,     };
+    1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 
+    1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 
+    1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 
+    0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 
+    1, 0, 0, 0, 1, 0,     };
 
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
@@ -3164,8 +3173,8 @@ char *surf_parse_text;
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -3174,7 +3183,7 @@ char *surf_parse_text;
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -3210,7 +3219,7 @@ char *surf_parse_text;
 const char rcs_surfxml_flexml_skeleton[] =
  "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
 const char rcs_surfxml_flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
+ "$" "Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp $";
 
 /* ANSI headers. */
 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
@@ -3247,164 +3256,247 @@ extern char *surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
 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_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_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_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_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_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
 #define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
+short int surfxml_ASroute_symmetrical_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_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_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_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_host_state AX_surfxml_host_state;
 #define A_surfxml_host_state AX_surfxml_host_state
+short int surfxml_host_state_isset;
 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_host_power AX_surfxml_host_power;
 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
+short int surfxml_host_power_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_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_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_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_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_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_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_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_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_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_cluster_availability_file AX_surfxml_cluster_availability_file;
 #define A_surfxml_cluster_availability_file (surfxml_bufferstack + AX_surfxml_cluster_availability_file)
+short int surfxml_cluster_availability_file_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_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_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_link_state AX_surfxml_link_state;
 #define A_surfxml_link_state AX_surfxml_link_state
+short int surfxml_link_state_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_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_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_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_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_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_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_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_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_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_cluster_state_file AX_surfxml_cluster_state_file;
 #define A_surfxml_cluster_state_file (surfxml_bufferstack + AX_surfxml_cluster_state_file)
+short int surfxml_cluster_state_file_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_route_symmetrical AX_surfxml_route_symmetrical;
 #define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
+short int surfxml_route_symmetrical_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_cluster_power AX_surfxml_cluster_power;
 #define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
+short int surfxml_cluster_power_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_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_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_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_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_availability AX_surfxml_host_availability;
 #define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
+short int surfxml_host_availability_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_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_bypassRoute_gw_dst AX_surfxml_bypassRoute_gw_dst;
 #define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
+short int surfxml_bypassRoute_gw_dst_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_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_peer_power AX_surfxml_peer_power;
 #define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
+short int surfxml_peer_power_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_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_bypassRoute_gw_src AX_surfxml_bypassRoute_gw_src;
 #define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
+short int surfxml_bypassRoute_gw_src_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_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_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_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_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_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_platform_version AX_surfxml_platform_version;
 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
+short int surfxml_platform_version_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -4014,13 +4106,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 2408 )
+                               if ( yy_current_state >= 2421 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 8043 );
+               while ( yy_base[yy_current_state] != 8061 );
 
 yy_find_action:
                yy_act = yy_accept[yy_current_state];
@@ -4142,6 +4234,7 @@ case 17:
 YY_RULE_SETUP
 {
   AX_surfxml_platform_version = 1;
+  surfxml_platform_version_isset = 0;
   ENTER(AL_surfxml_platform); pushbuffer(0);
   }
        YY_BREAK
@@ -4149,12 +4242,12 @@ YY_RULE_SETUP
 case 18:
 /* rule 18 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
+if (surfxml_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in <surfxml_platform>");} surfxml_platform_version_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
        YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
+if (surfxml_platform_version_isset != 0) {FAIL("Multiple definition of attribute version in <surfxml_platform>");}  surfxml_platform_version_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
        YY_BREAK
 case 20:
 YY_RULE_SETUP
@@ -4211,7 +4304,7 @@ case YY_STATE_EOF(S_surfxml_platform):
 case YY_STATE_EOF(S_surfxml_platform_4):
 case YY_STATE_EOF(S_surfxml_platform_6):
 case YY_STATE_EOF(E_surfxml_platform):
-FAIL("Premature EOF: `</platform>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</platform>' expected.");
        YY_BREAK
 
 case 27:
@@ -4224,6 +4317,7 @@ case 28:
 YY_RULE_SETUP
 {
   AX_surfxml_include_file = 0;
+  surfxml_include_file_isset = 0;
   ENTER(AL_surfxml_include); pushbuffer(0);
   }
        YY_BREAK
@@ -4231,12 +4325,12 @@ YY_RULE_SETUP
 case 29:
 /* rule 29 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file);
+if (surfxml_include_file_isset != 0) {FAIL("Multiple definition of attribute file in <surfxml_include>");} surfxml_include_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file);
        YY_BREAK
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file);
+if (surfxml_include_file_isset != 0) {FAIL("Multiple definition of attribute file in <surfxml_include>");}  surfxml_include_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file);
        YY_BREAK
 case 31:
 YY_RULE_SETUP
@@ -4251,7 +4345,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
   LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
+   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
    case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
    case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
   }
@@ -4277,7 +4372,8 @@ YY_RULE_SETUP
   ETag_surfxml_include();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
+   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
    case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
    case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
   }
@@ -4293,7 +4389,7 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</include>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_include):
-FAIL("Premature EOF: `</include>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</include>' expected.");
        YY_BREAK
 
 case 38:
@@ -4306,8 +4402,11 @@ case 39:
 YY_RULE_SETUP
 {
   AX_surfxml_trace_id = 0;
+  surfxml_trace_id_isset = 0;
   AX_surfxml_trace_file = 0;
+  surfxml_trace_file_isset = 0;
   AX_surfxml_trace_periodicity = 0;
+  surfxml_trace_periodicity_isset = 0;
   ENTER(AL_surfxml_trace); pushbuffer(0);
   }
        YY_BREAK
@@ -4315,32 +4414,32 @@ YY_RULE_SETUP
 case 40:
 /* rule 40 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
+if (surfxml_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_trace>");} surfxml_trace_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
        YY_BREAK
 case 41:
 /* rule 41 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
+if (surfxml_trace_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_trace>");}  surfxml_trace_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
        YY_BREAK
 case 42:
 /* rule 42 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
+if (surfxml_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in <surfxml_trace>");} surfxml_trace_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
        YY_BREAK
 case 43:
 /* rule 43 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
+if (surfxml_trace_file_isset != 0) {FAIL("Multiple definition of attribute file in <surfxml_trace>");}  surfxml_trace_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
        YY_BREAK
 case 44:
 /* rule 44 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
+if (surfxml_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in <surfxml_trace>");} surfxml_trace_periodicity_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
        YY_BREAK
 case 45:
 /* rule 45 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
+if (surfxml_trace_periodicity_isset != 0) {FAIL("Multiple definition of attribute periodicity in <surfxml_trace>");}  surfxml_trace_periodicity_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
        YY_BREAK
 case 46:
 YY_RULE_SETUP
@@ -4403,7 +4502,7 @@ YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</trace>' expected.",surf_parse_text);
        YY_BREAK
 case YY_STATE_EOF(IN_trace):
-FAIL("Premature EOF: `</trace>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</trace>' expected.");
        YY_BREAK
 
 case 52:
@@ -4416,13 +4515,21 @@ case 53:
 YY_RULE_SETUP
 {
   AX_surfxml_random_id = 0;
+  surfxml_random_id_isset = 0;
   AX_surfxml_random_min = 0;
+  surfxml_random_min_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_std_deviation = 0;
+  surfxml_random_std_deviation_isset = 0;
   AX_surfxml_random_seed = 5;
+  surfxml_random_seed_isset = 0;
   AX_surfxml_random_radical = 0;
+  surfxml_random_radical_isset = 0;
   AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
+  surfxml_random_generator_isset = 0;
   ENTER(AL_surfxml_random); pushbuffer(0);
   }
        YY_BREAK
@@ -4430,72 +4537,72 @@ YY_RULE_SETUP
 case 54:
 /* rule 54 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
+if (surfxml_random_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_random>");} surfxml_random_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
        YY_BREAK
 case 55:
 /* rule 55 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
+if (surfxml_random_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_random>");}  surfxml_random_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
        YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
+if (surfxml_random_min_isset != 0) {FAIL("Multiple definition of attribute min in <surfxml_random>");} surfxml_random_min_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
        YY_BREAK
 case 57:
 /* rule 57 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
+if (surfxml_random_min_isset != 0) {FAIL("Multiple definition of attribute min in <surfxml_random>");}  surfxml_random_min_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
        YY_BREAK
 case 58:
 /* rule 58 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
+if (surfxml_random_max_isset != 0) {FAIL("Multiple definition of attribute max in <surfxml_random>");} surfxml_random_max_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
        YY_BREAK
 case 59:
 /* rule 59 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
+if (surfxml_random_max_isset != 0) {FAIL("Multiple definition of attribute max in <surfxml_random>");}  surfxml_random_max_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
        YY_BREAK
 case 60:
 /* rule 60 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
+if (surfxml_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in <surfxml_random>");} surfxml_random_mean_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
        YY_BREAK
 case 61:
 /* rule 61 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
+if (surfxml_random_mean_isset != 0) {FAIL("Multiple definition of attribute mean in <surfxml_random>");}  surfxml_random_mean_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
        YY_BREAK
 case 62:
 /* rule 62 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
+if (surfxml_random_std_deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in <surfxml_random>");} surfxml_random_std_deviation_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
        YY_BREAK
 case 63:
 /* rule 63 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
+if (surfxml_random_std_deviation_isset != 0) {FAIL("Multiple definition of attribute std_deviation in <surfxml_random>");}  surfxml_random_std_deviation_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
        YY_BREAK
 case 64:
 /* rule 64 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_seed);
+if (surfxml_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in <surfxml_random>");} surfxml_random_seed_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_seed);
        YY_BREAK
 case 65:
 /* rule 65 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_seed);
+if (surfxml_random_seed_isset != 0) {FAIL("Multiple definition of attribute seed in <surfxml_random>");}  surfxml_random_seed_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_seed);
        YY_BREAK
 case 66:
 /* rule 66 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_random_radical);
+if (surfxml_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_random>");} surfxml_random_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_random_radical);
        YY_BREAK
 case 67:
 /* rule 67 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_random_radical);
+if (surfxml_random_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_random>");}  surfxml_random_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_random_radical);
        YY_BREAK
 case 68:
 /* rule 68 can match eol */
@@ -4586,7 +4693,7 @@ FAIL("Unexpected character `%c': `</random>' expected.",surf_parse_text[0]);
 case YY_STATE_EOF(S_surfxml_random_2):
 case YY_STATE_EOF(S_surfxml_random):
 case YY_STATE_EOF(E_surfxml_random):
-FAIL("Premature EOF: `</random>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</random>' expected.");
        YY_BREAK
 
 case 83:
@@ -4599,8 +4706,11 @@ case 84:
 YY_RULE_SETUP
 {
   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;
   AX_surfxml_trace_connect_element = 0;
+  surfxml_trace_connect_element_isset = 0;
   ENTER(AL_surfxml_trace_connect); pushbuffer(0);
   }
        YY_BREAK
@@ -4643,22 +4753,22 @@ A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
 case 95:
 /* rule 95 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
+if (surfxml_trace_connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in <surfxml_trace_connect>");} surfxml_trace_connect_trace_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
        YY_BREAK
 case 96:
 /* rule 96 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
+if (surfxml_trace_connect_trace_isset != 0) {FAIL("Multiple definition of attribute trace in <surfxml_trace_connect>");}  surfxml_trace_connect_trace_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
        YY_BREAK
 case 97:
 /* rule 97 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
+if (surfxml_trace_connect_element_isset != 0) {FAIL("Multiple definition of attribute element in <surfxml_trace_connect>");} surfxml_trace_connect_element_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
        YY_BREAK
 case 98:
 /* rule 98 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
+if (surfxml_trace_connect_element_isset != 0) {FAIL("Multiple definition of attribute element in <surfxml_trace_connect>");}  surfxml_trace_connect_element_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
        YY_BREAK
 case 99:
 YY_RULE_SETUP
@@ -4723,7 +4833,7 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</trace_connect>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_trace_connect):
-FAIL("Premature EOF: `</trace_connect>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</trace_connect>' expected.");
        YY_BREAK
 
 case 106:
@@ -4736,7 +4846,9 @@ case 107:
 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);
   }
        YY_BREAK
@@ -4744,22 +4856,22 @@ YY_RULE_SETUP
 case 108:
 /* rule 108 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
+if (surfxml_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_AS>");} surfxml_AS_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
        YY_BREAK
 case 109:
 /* rule 109 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
+if (surfxml_AS_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_AS>");}  surfxml_AS_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
        YY_BREAK
 case 110:
 /* rule 110 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
+if (surfxml_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in <surfxml_AS>");} surfxml_AS_routing_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
        YY_BREAK
 case 111:
 /* rule 111 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
+if (surfxml_AS_routing_isset != 0) {FAIL("Multiple definition of attribute routing in <surfxml_AS>");}  surfxml_AS_routing_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
        YY_BREAK
 case 112:
 YY_RULE_SETUP
@@ -4825,7 +4937,7 @@ case YY_STATE_EOF(S_surfxml_AS_13):
 case YY_STATE_EOF(S_surfxml_AS_8):
 case YY_STATE_EOF(S_surfxml_AS):
 case YY_STATE_EOF(S_surfxml_AS_4):
-FAIL("Premature EOF: `</AS>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</AS>' expected.");
        YY_BREAK
 
 case 119:
@@ -4838,13 +4950,21 @@ case 120:
 YY_RULE_SETUP
 {
   AX_surfxml_host_id = 0;
+  surfxml_host_id_isset = 0;
   AX_surfxml_host_power = 0;
+  surfxml_host_power_isset = 0;
   AX_surfxml_host_core = 16;
+  surfxml_host_core_isset = 0;
   AX_surfxml_host_availability = 18;
+  surfxml_host_availability_isset = 0;
   AX_surfxml_host_availability_file = 0;
+  surfxml_host_availability_file_isset = 0;
   AX_surfxml_host_state = A_surfxml_host_state_ON;
+  surfxml_host_state_isset = 0;
   AX_surfxml_host_state_file = 0;
+  surfxml_host_state_file_isset = 0;
   AX_surfxml_host_coordinates = 0;
+  surfxml_host_coordinates_isset = 0;
   ENTER(AL_surfxml_host); pushbuffer(0);
   }
        YY_BREAK
@@ -4852,52 +4972,52 @@ YY_RULE_SETUP
 case 121:
 /* rule 121 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
+if (surfxml_host_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_host>");} surfxml_host_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
        YY_BREAK
 case 122:
 /* rule 122 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
+if (surfxml_host_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_host>");}  surfxml_host_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
        YY_BREAK
 case 123:
 /* rule 123 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
+if (surfxml_host_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_host>");} surfxml_host_power_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
        YY_BREAK
 case 124:
 /* rule 124 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
+if (surfxml_host_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_host>");}  surfxml_host_power_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
        YY_BREAK
 case 125:
 /* rule 125 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core);
+if (surfxml_host_core_isset != 0) {FAIL("Multiple definition of attribute core in <surfxml_host>");} surfxml_host_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core);
        YY_BREAK
 case 126:
 /* rule 126 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core);
+if (surfxml_host_core_isset != 0) {FAIL("Multiple definition of attribute core in <surfxml_host>");}  surfxml_host_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core);
        YY_BREAK
 case 127:
 /* rule 127 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
+if (surfxml_host_availability_isset != 0) {FAIL("Multiple definition of attribute availability in <surfxml_host>");} surfxml_host_availability_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
        YY_BREAK
 case 128:
 /* rule 128 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
+if (surfxml_host_availability_isset != 0) {FAIL("Multiple definition of attribute availability in <surfxml_host>");}  surfxml_host_availability_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
        YY_BREAK
 case 129:
 /* rule 129 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
+if (surfxml_host_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_host>");} surfxml_host_availability_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
        YY_BREAK
 case 130:
 /* rule 130 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
+if (surfxml_host_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_host>");}  surfxml_host_availability_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
        YY_BREAK
 case 131:
 /* rule 131 can match eol */
@@ -4916,22 +5036,22 @@ A_surfxml_host_state = A_surfxml_host_state_OFF;
 case 135:
 /* rule 135 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
+if (surfxml_host_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_host>");} surfxml_host_state_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
        YY_BREAK
 case 136:
 /* rule 136 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
+if (surfxml_host_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_host>");}  surfxml_host_state_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
        YY_BREAK
 case 137:
 /* rule 137 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates);
+if (surfxml_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_host>");} surfxml_host_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates);
        YY_BREAK
 case 138:
 /* rule 138 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates);
+if (surfxml_host_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_host>");}  surfxml_host_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates);
        YY_BREAK
 case 139:
 YY_RULE_SETUP
@@ -4988,7 +5108,7 @@ FAIL("Unexpected character `%c': `</host>' expected.",surf_parse_text[0]);
 case YY_STATE_EOF(S_surfxml_host):
 case YY_STATE_EOF(E_surfxml_host):
 case YY_STATE_EOF(S_surfxml_host_2):
-FAIL("Premature EOF: `</host>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</host>' expected.");
        YY_BREAK
 
 case 146:
@@ -5001,19 +5121,35 @@ case 147:
 YY_RULE_SETUP
 {
   AX_surfxml_cluster_id = 0;
+  surfxml_cluster_id_isset = 0;
   AX_surfxml_cluster_prefix = 0;
+  surfxml_cluster_prefix_isset = 0;
   AX_surfxml_cluster_suffix = 0;
+  surfxml_cluster_suffix_isset = 0;
   AX_surfxml_cluster_radical = 0;
+  surfxml_cluster_radical_isset = 0;
   AX_surfxml_cluster_power = 0;
+  surfxml_cluster_power_isset = 0;
   AX_surfxml_cluster_core = 22;
+  surfxml_cluster_core_isset = 0;
   AX_surfxml_cluster_bw = 0;
+  surfxml_cluster_bw_isset = 0;
   AX_surfxml_cluster_lat = 0;
+  surfxml_cluster_lat_isset = 0;
   AX_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
+  surfxml_cluster_sharing_policy_isset = 0;
   AX_surfxml_cluster_bb_bw = 0;
+  surfxml_cluster_bb_bw_isset = 0;
   AX_surfxml_cluster_bb_lat = 0;
+  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_availability_file = 0;
+  surfxml_cluster_availability_file_isset = 0;
   AX_surfxml_cluster_state_file = 0;
+  surfxml_cluster_state_file_isset = 0;
+  AX_surfxml_cluster_router_id = 0;
+  surfxml_cluster_router_id_isset = 0;
   ENTER(AL_surfxml_cluster); pushbuffer(0);
   }
        YY_BREAK
@@ -5021,82 +5157,82 @@ YY_RULE_SETUP
 case 148:
 /* rule 148 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
+if (surfxml_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_cluster>");} surfxml_cluster_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
        YY_BREAK
 case 149:
 /* rule 149 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
+if (surfxml_cluster_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_cluster>");}  surfxml_cluster_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
        YY_BREAK
 case 150:
 /* rule 150 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
+if (surfxml_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in <surfxml_cluster>");} surfxml_cluster_prefix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
        YY_BREAK
 case 151:
 /* rule 151 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
+if (surfxml_cluster_prefix_isset != 0) {FAIL("Multiple definition of attribute prefix in <surfxml_cluster>");}  surfxml_cluster_prefix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
        YY_BREAK
 case 152:
 /* rule 152 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
+if (surfxml_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in <surfxml_cluster>");} surfxml_cluster_suffix_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
        YY_BREAK
 case 153:
 /* rule 153 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
+if (surfxml_cluster_suffix_isset != 0) {FAIL("Multiple definition of attribute suffix in <surfxml_cluster>");}  surfxml_cluster_suffix_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
        YY_BREAK
 case 154:
 /* rule 154 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
+if (surfxml_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_cluster>");} surfxml_cluster_radical_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
        YY_BREAK
 case 155:
 /* rule 155 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
+if (surfxml_cluster_radical_isset != 0) {FAIL("Multiple definition of attribute radical in <surfxml_cluster>");}  surfxml_cluster_radical_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
        YY_BREAK
 case 156:
 /* rule 156 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
+if (surfxml_cluster_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_cluster>");} surfxml_cluster_power_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
        YY_BREAK
 case 157:
 /* rule 157 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
+if (surfxml_cluster_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_cluster>");}  surfxml_cluster_power_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
        YY_BREAK
 case 158:
 /* rule 158 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core);
+if (surfxml_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in <surfxml_cluster>");} surfxml_cluster_core_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core);
        YY_BREAK
 case 159:
 /* rule 159 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core);
+if (surfxml_cluster_core_isset != 0) {FAIL("Multiple definition of attribute core in <surfxml_cluster>");}  surfxml_cluster_core_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core);
        YY_BREAK
 case 160:
 /* rule 160 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
+if (surfxml_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in <surfxml_cluster>");} surfxml_cluster_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
        YY_BREAK
 case 161:
 /* rule 161 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
+if (surfxml_cluster_bw_isset != 0) {FAIL("Multiple definition of attribute bw in <surfxml_cluster>");}  surfxml_cluster_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
        YY_BREAK
 case 162:
 /* rule 162 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
+if (surfxml_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_cluster>");} surfxml_cluster_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
        YY_BREAK
 case 163:
 /* rule 163 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
+if (surfxml_cluster_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_cluster>");}  surfxml_cluster_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
        YY_BREAK
 case 164:
 /* rule 164 can match eol */
@@ -5122,22 +5258,22 @@ A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FATPIPE;
 case 170:
 /* rule 170 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
+if (surfxml_cluster_bb_bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in <surfxml_cluster>");} surfxml_cluster_bb_bw_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
        YY_BREAK
 case 171:
 /* rule 171 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
+if (surfxml_cluster_bb_bw_isset != 0) {FAIL("Multiple definition of attribute bb_bw in <surfxml_cluster>");}  surfxml_cluster_bb_bw_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
        YY_BREAK
 case 172:
 /* rule 172 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
+if (surfxml_cluster_bb_lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in <surfxml_cluster>");} surfxml_cluster_bb_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
        YY_BREAK
 case 173:
 /* rule 173 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
+if (surfxml_cluster_bb_lat_isset != 0) {FAIL("Multiple definition of attribute bb_lat in <surfxml_cluster>");}  surfxml_cluster_bb_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
        YY_BREAK
 case 174:
 /* rule 174 can match eol */
@@ -5156,24 +5292,34 @@ A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_FATPIP
 case 178:
 /* rule 178 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_availability_file);
+if (surfxml_cluster_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_cluster>");} surfxml_cluster_availability_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_availability_file);
        YY_BREAK
 case 179:
 /* rule 179 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_availability_file);
+if (surfxml_cluster_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_cluster>");}  surfxml_cluster_availability_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_availability_file);
        YY_BREAK
 case 180:
 /* rule 180 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_state_file);
+if (surfxml_cluster_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_cluster>");} surfxml_cluster_state_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_state_file);
        YY_BREAK
 case 181:
 /* rule 181 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_state_file);
+if (surfxml_cluster_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_cluster>");}  surfxml_cluster_state_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_state_file);
        YY_BREAK
 case 182:
+/* rule 182 can match eol */
+YY_RULE_SETUP
+if (surfxml_cluster_router_id_isset != 0) {FAIL("Multiple definition of attribute router_id in <surfxml_cluster>");} surfxml_cluster_router_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_router_id);
+       YY_BREAK
+case 183:
+/* rule 183 can match eol */
+YY_RULE_SETUP
+if (surfxml_cluster_router_id_isset != 0) {FAIL("Multiple definition of attribute router_id in <surfxml_cluster>");}  surfxml_cluster_router_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_router_id);
+       YY_BREAK
+case 184:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
@@ -5186,7 +5332,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
  }
        YY_BREAK
-case 183:
+case 185:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
@@ -5203,11 +5349,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 184:
+case 186:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of cluster element.", surf_parse_text[0]);
        YY_BREAK
-case 185:
+case 187:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `cluster' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5215,8 +5361,8 @@ case YY_STATE_EOF(AL_surfxml_cluster):
 FAIL("EOF in attribute list of `cluster' element.");
        YY_BREAK
 
-case 186:
-/* rule 186 can match eol */
+case 188:
+/* rule 188 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5228,121 +5374,129 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 187:
-/* rule 187 can match eol */
+case 189:
+/* rule 189 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</cluster>' expected.",surf_parse_text);
        YY_BREAK
-case 188:
+case 190:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</cluster>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_cluster):
-FAIL("Premature EOF: `</cluster>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</cluster>' expected.");
        YY_BREAK
 
-case 189:
-/* rule 189 can match eol */
+case 191:
+/* rule 191 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <peer> is not allowed here.");
        YY_BREAK
-case 190:
-/* rule 190 can match eol */
+case 192:
+/* rule 192 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_peer_id = 0;
+  surfxml_peer_id_isset = 0;
   AX_surfxml_peer_power = 0;
+  surfxml_peer_power_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_lat = 0;
+  surfxml_peer_lat_isset = 0;
   AX_surfxml_peer_coordinates = 0;
+  surfxml_peer_coordinates_isset = 0;
   AX_surfxml_peer_availability_file = 0;
+  surfxml_peer_availability_file_isset = 0;
   AX_surfxml_peer_state_file = 0;
+  surfxml_peer_state_file_isset = 0;
   ENTER(AL_surfxml_peer); pushbuffer(0);
   }
        YY_BREAK
 
-case 191:
-/* rule 191 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
-       YY_BREAK
-case 192:
-/* rule 192 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
-       YY_BREAK
 case 193:
 /* rule 193 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
+if (surfxml_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_peer>");} surfxml_peer_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
        YY_BREAK
 case 194:
 /* rule 194 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
+if (surfxml_peer_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_peer>");}  surfxml_peer_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
        YY_BREAK
 case 195:
 /* rule 195 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
+if (surfxml_peer_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_peer>");} surfxml_peer_power_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
        YY_BREAK
 case 196:
 /* rule 196 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
+if (surfxml_peer_power_isset != 0) {FAIL("Multiple definition of attribute power in <surfxml_peer>");}  surfxml_peer_power_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
        YY_BREAK
 case 197:
 /* rule 197 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
+if (surfxml_peer_bw_in_isset != 0) {FAIL("Multiple definition of attribute bw_in in <surfxml_peer>");} surfxml_peer_bw_in_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
        YY_BREAK
 case 198:
 /* rule 198 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
+if (surfxml_peer_bw_in_isset != 0) {FAIL("Multiple definition of attribute bw_in in <surfxml_peer>");}  surfxml_peer_bw_in_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
        YY_BREAK
 case 199:
 /* rule 199 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
+if (surfxml_peer_bw_out_isset != 0) {FAIL("Multiple definition of attribute bw_out in <surfxml_peer>");} surfxml_peer_bw_out_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
        YY_BREAK
 case 200:
 /* rule 200 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
+if (surfxml_peer_bw_out_isset != 0) {FAIL("Multiple definition of attribute bw_out in <surfxml_peer>");}  surfxml_peer_bw_out_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
        YY_BREAK
 case 201:
 /* rule 201 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
+if (surfxml_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_peer>");} surfxml_peer_lat_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
        YY_BREAK
 case 202:
 /* rule 202 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
+if (surfxml_peer_lat_isset != 0) {FAIL("Multiple definition of attribute lat in <surfxml_peer>");}  surfxml_peer_lat_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
        YY_BREAK
 case 203:
 /* rule 203 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability_file);
+if (surfxml_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_peer>");} surfxml_peer_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
        YY_BREAK
 case 204:
 /* rule 204 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability_file);
+if (surfxml_peer_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_peer>");}  surfxml_peer_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
        YY_BREAK
 case 205:
 /* rule 205 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state_file);
+if (surfxml_peer_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_peer>");} surfxml_peer_availability_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability_file);
        YY_BREAK
 case 206:
 /* rule 206 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state_file);
+if (surfxml_peer_availability_file_isset != 0) {FAIL("Multiple definition of attribute availability_file in <surfxml_peer>");}  surfxml_peer_availability_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability_file);
        YY_BREAK
 case 207:
+/* rule 207 can match eol */
+YY_RULE_SETUP
+if (surfxml_peer_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_peer>");} surfxml_peer_state_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state_file);
+       YY_BREAK
+case 208:
+/* rule 208 can match eol */
+YY_RULE_SETUP
+if (surfxml_peer_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_peer>");}  surfxml_peer_state_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state_file);
+       YY_BREAK
+case 209:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
@@ -5353,7 +5507,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_peer();surfxml_pcdata_ix = 0; ENTER(E_surfxml_peer);
  }
        YY_BREAK
-case 208:
+case 210:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
@@ -5368,11 +5522,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 209:
+case 211:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of peer element.", surf_parse_text[0]);
        YY_BREAK
-case 210:
+case 212:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `peer' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5380,8 +5534,8 @@ case YY_STATE_EOF(AL_surfxml_peer):
 FAIL("EOF in attribute list of `peer' element.");
        YY_BREAK
 
-case 211:
-/* rule 211 can match eol */
+case 213:
+/* rule 213 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5393,62 +5547,64 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 212:
-/* rule 212 can match eol */
+case 214:
+/* rule 214 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</peer>' expected.",surf_parse_text);
        YY_BREAK
-case 213:
+case 215:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</peer>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_peer):
-FAIL("Premature EOF: `</peer>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</peer>' expected.");
        YY_BREAK
 
-case 214:
-/* rule 214 can match eol */
+case 216:
+/* rule 216 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <router> is not allowed here.");
        YY_BREAK
-case 215:
-/* rule 215 can match eol */
+case 217:
+/* rule 217 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_router_id = 0;
+  surfxml_router_id_isset = 0;
   AX_surfxml_router_coordinates = 0;
+  surfxml_router_coordinates_isset = 0;
   ENTER(AL_surfxml_router); pushbuffer(0);
   }
        YY_BREAK
 
-case 216:
-/* rule 216 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
-       YY_BREAK
-case 217:
-/* rule 217 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
-       YY_BREAK
 case 218:
 /* rule 218 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
+if (surfxml_router_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_router>");} surfxml_router_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
        YY_BREAK
 case 219:
 /* rule 219 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
+if (surfxml_router_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_router>");}  surfxml_router_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
        YY_BREAK
 case 220:
+/* rule 220 can match eol */
+YY_RULE_SETUP
+if (surfxml_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_router>");} surfxml_router_coordinates_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
+       YY_BREAK
+case 221:
+/* rule 221 can match eol */
+YY_RULE_SETUP
+if (surfxml_router_coordinates_isset != 0) {FAIL("Multiple definition of attribute coordinates in <surfxml_router>");}  surfxml_router_coordinates_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
+       YY_BREAK
+case 222:
 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);
  }
        YY_BREAK
-case 221:
+case 223:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
@@ -5458,11 +5614,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 222:
+case 224:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of router element.", surf_parse_text[0]);
        YY_BREAK
-case 223:
+case 225:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `router' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5470,8 +5626,8 @@ case YY_STATE_EOF(AL_surfxml_router):
 FAIL("EOF in attribute list of `router' element.");
        YY_BREAK
 
-case 224:
-/* rule 224 can match eol */
+case 226:
+/* rule 226 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5482,136 +5638,144 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 225:
-/* rule 225 can match eol */
+case 227:
+/* rule 227 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</router>' expected.",surf_parse_text);
        YY_BREAK
-case 226:
+case 228:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</router>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_router):
-FAIL("Premature EOF: `</router>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</router>' expected.");
        YY_BREAK
 
-case 227:
-/* rule 227 can match eol */
+case 229:
+/* rule 229 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <link> is not allowed here.");
        YY_BREAK
-case 228:
-/* rule 228 can match eol */
+case 230:
+/* rule 230 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_link_id = 0;
+  surfxml_link_id_isset = 0;
   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_latency = 24;
+  surfxml_link_latency_isset = 0;
   AX_surfxml_link_latency_file = 0;
+  surfxml_link_latency_file_isset = 0;
   AX_surfxml_link_state = A_surfxml_link_state_ON;
+  surfxml_link_state_isset = 0;
   AX_surfxml_link_state_file = 0;
+  surfxml_link_state_file_isset = 0;
   AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+  surfxml_link_sharing_policy_isset = 0;
   ENTER(AL_surfxml_link); pushbuffer(0);
   }
        YY_BREAK
 
-case 229:
-/* rule 229 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
-       YY_BREAK
-case 230:
-/* rule 230 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
-       YY_BREAK
 case 231:
 /* rule 231 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
+if (surfxml_link_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_link>");} surfxml_link_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
        YY_BREAK
 case 232:
 /* rule 232 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
+if (surfxml_link_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_link>");}  surfxml_link_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
        YY_BREAK
 case 233:
 /* rule 233 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
+if (surfxml_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in <surfxml_link>");} surfxml_link_bandwidth_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
        YY_BREAK
 case 234:
 /* rule 234 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
+if (surfxml_link_bandwidth_isset != 0) {FAIL("Multiple definition of attribute bandwidth in <surfxml_link>");}  surfxml_link_bandwidth_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
        YY_BREAK
 case 235:
 /* rule 235 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
+if (surfxml_link_bandwidth_file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in <surfxml_link>");} surfxml_link_bandwidth_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
        YY_BREAK
 case 236:
 /* rule 236 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
+if (surfxml_link_bandwidth_file_isset != 0) {FAIL("Multiple definition of attribute bandwidth_file in <surfxml_link>");}  surfxml_link_bandwidth_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
        YY_BREAK
 case 237:
 /* rule 237 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
+if (surfxml_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in <surfxml_link>");} surfxml_link_latency_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
        YY_BREAK
 case 238:
 /* rule 238 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
+if (surfxml_link_latency_isset != 0) {FAIL("Multiple definition of attribute latency in <surfxml_link>");}  surfxml_link_latency_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
        YY_BREAK
 case 239:
 /* rule 239 can match eol */
+YY_RULE_SETUP
+if (surfxml_link_latency_file_isset != 0) {FAIL("Multiple definition of attribute latency_file in <surfxml_link>");} surfxml_link_latency_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
+       YY_BREAK
 case 240:
 /* rule 240 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_state = A_surfxml_link_state_ON;
+if (surfxml_link_latency_file_isset != 0) {FAIL("Multiple definition of attribute latency_file in <surfxml_link>");}  surfxml_link_latency_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
        YY_BREAK
 case 241:
 /* rule 241 can match eol */
 case 242:
 /* rule 242 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_state = A_surfxml_link_state_OFF;
+A_surfxml_link_state = A_surfxml_link_state_ON;
        YY_BREAK
 case 243:
 /* rule 243 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
-       YY_BREAK
 case 244:
 /* rule 244 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
+A_surfxml_link_state = A_surfxml_link_state_OFF;
        YY_BREAK
 case 245:
 /* rule 245 can match eol */
+YY_RULE_SETUP
+if (surfxml_link_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_link>");} surfxml_link_state_file_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
+       YY_BREAK
 case 246:
 /* rule 246 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
+if (surfxml_link_state_file_isset != 0) {FAIL("Multiple definition of attribute state_file in <surfxml_link>");}  surfxml_link_state_file_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
        YY_BREAK
 case 247:
 /* rule 247 can match eol */
 case 248:
 /* rule 248 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
+A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
        YY_BREAK
 case 249:
 /* rule 249 can match eol */
 case 250:
 /* rule 250 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FULLDUPLEX;
+A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
        YY_BREAK
 case 251:
+/* rule 251 can match eol */
+case 252:
+/* rule 252 can match eol */
+YY_RULE_SETUP
+A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FULLDUPLEX;
+       YY_BREAK
+case 253:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
@@ -5619,7 +5783,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
  }
        YY_BREAK
-case 252:
+case 254:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
@@ -5631,11 +5795,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 253:
+case 255:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of link element.", surf_parse_text[0]);
        YY_BREAK
-case 254:
+case 256:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `link' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5643,8 +5807,8 @@ case YY_STATE_EOF(AL_surfxml_link):
 FAIL("EOF in attribute list of `link' element.");
        YY_BREAK
 
-case 255:
-/* rule 255 can match eol */
+case 257:
+/* rule 257 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5656,72 +5820,75 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 256:
-/* rule 256 can match eol */
+case 258:
+/* rule 258 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</link>' expected.",surf_parse_text);
        YY_BREAK
-case 257:
+case 259:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</link>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_link):
 case YY_STATE_EOF(S_surfxml_link_2):
 case YY_STATE_EOF(S_surfxml_link):
-FAIL("Premature EOF: `</link>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</link>' expected.");
        YY_BREAK
 
-case 258:
-/* rule 258 can match eol */
+case 260:
+/* rule 260 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <route> is not allowed here.");
        YY_BREAK
-case 259:
-/* rule 259 can match eol */
+case 261:
+/* rule 261 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_route_src = 0;
+  surfxml_route_src_isset = 0;
   AX_surfxml_route_dst = 0;
+  surfxml_route_dst_isset = 0;
   AX_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
+  surfxml_route_symmetrical_isset = 0;
   ENTER(AL_surfxml_route); pushbuffer(0);
   }
        YY_BREAK
 
-case 260:
-/* rule 260 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
-       YY_BREAK
-case 261:
-/* rule 261 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
-       YY_BREAK
 case 262:
 /* rule 262 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
+if (surfxml_route_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_route>");} surfxml_route_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
        YY_BREAK
 case 263:
 /* rule 263 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
+if (surfxml_route_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_route>");}  surfxml_route_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
        YY_BREAK
 case 264:
 /* rule 264 can match eol */
+YY_RULE_SETUP
+if (surfxml_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_route>");} surfxml_route_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
+       YY_BREAK
 case 265:
 /* rule 265 can match eol */
 YY_RULE_SETUP
-A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
+if (surfxml_route_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_route>");}  surfxml_route_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
        YY_BREAK
 case 266:
 /* rule 266 can match eol */
 case 267:
 /* rule 267 can match eol */
 YY_RULE_SETUP
-A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
+A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
        YY_BREAK
 case 268:
+/* rule 268 can match eol */
+case 269:
+/* rule 269 can match eol */
+YY_RULE_SETUP
+A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
+       YY_BREAK
+case 270:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
@@ -5729,7 +5896,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
  }
        YY_BREAK
-case 269:
+case 271:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
@@ -5740,11 +5907,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 270:
+case 272:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of route element.", surf_parse_text[0]);
        YY_BREAK
-case 271:
+case 273:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `route' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5752,8 +5919,8 @@ case YY_STATE_EOF(AL_surfxml_route):
 FAIL("EOF in attribute list of `route' element.");
        YY_BREAK
 
-case 272:
-/* rule 272 can match eol */
+case 274:
+/* rule 274 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5764,94 +5931,99 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 273:
-/* rule 273 can match eol */
+case 275:
+/* rule 275 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</route>' expected.",surf_parse_text);
        YY_BREAK
-case 274:
+case 276:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</route>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(S_surfxml_route):
 case YY_STATE_EOF(S_surfxml_route_2):
 case YY_STATE_EOF(E_surfxml_route):
-FAIL("Premature EOF: `</route>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</route>' expected.");
        YY_BREAK
 
-case 275:
-/* rule 275 can match eol */
+case 277:
+/* rule 277 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <ASroute> is not allowed here.");
        YY_BREAK
-case 276:
-/* rule 276 can match eol */
+case 278:
+/* rule 278 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_ASroute_src = 0;
+  surfxml_ASroute_src_isset = 0;
   AX_surfxml_ASroute_dst = 0;
+  surfxml_ASroute_dst_isset = 0;
   AX_surfxml_ASroute_gw_src = 0;
+  surfxml_ASroute_gw_src_isset = 0;
   AX_surfxml_ASroute_gw_dst = 0;
+  surfxml_ASroute_gw_dst_isset = 0;
   AX_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
+  surfxml_ASroute_symmetrical_isset = 0;
   ENTER(AL_surfxml_ASroute); pushbuffer(0);
   }
        YY_BREAK
 
-case 277:
-/* rule 277 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
-       YY_BREAK
-case 278:
-/* rule 278 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
-       YY_BREAK
 case 279:
 /* rule 279 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
+if (surfxml_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_ASroute>");} surfxml_ASroute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
        YY_BREAK
 case 280:
 /* rule 280 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
+if (surfxml_ASroute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_ASroute>");}  surfxml_ASroute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
        YY_BREAK
 case 281:
 /* rule 281 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
+if (surfxml_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_ASroute>");} surfxml_ASroute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
        YY_BREAK
 case 282:
 /* rule 282 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
+if (surfxml_ASroute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_ASroute>");}  surfxml_ASroute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
        YY_BREAK
 case 283:
 /* rule 283 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
+if (surfxml_ASroute_gw_src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_ASroute>");} surfxml_ASroute_gw_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
        YY_BREAK
 case 284:
 /* rule 284 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
+if (surfxml_ASroute_gw_src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_ASroute>");}  surfxml_ASroute_gw_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
        YY_BREAK
 case 285:
 /* rule 285 can match eol */
+YY_RULE_SETUP
+if (surfxml_ASroute_gw_dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_ASroute>");} surfxml_ASroute_gw_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
+       YY_BREAK
 case 286:
 /* rule 286 can match eol */
 YY_RULE_SETUP
-A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
+if (surfxml_ASroute_gw_dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_ASroute>");}  surfxml_ASroute_gw_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
        YY_BREAK
 case 287:
 /* rule 287 can match eol */
 case 288:
 /* rule 288 can match eol */
 YY_RULE_SETUP
-A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO;
+A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
        YY_BREAK
 case 289:
+/* rule 289 can match eol */
+case 290:
+/* rule 290 can match eol */
+YY_RULE_SETUP
+A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO;
+       YY_BREAK
+case 291:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
@@ -5861,7 +6033,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute);
  }
        YY_BREAK
-case 290:
+case 292:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
@@ -5874,11 +6046,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 291:
+case 293:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of ASroute element.", surf_parse_text[0]);
        YY_BREAK
-case 292:
+case 294:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `ASroute' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5886,8 +6058,8 @@ case YY_STATE_EOF(AL_surfxml_ASroute):
 FAIL("EOF in attribute list of `ASroute' element.");
        YY_BREAK
 
-case 293:
-/* rule 293 can match eol */
+case 295:
+/* rule 295 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -5898,75 +6070,77 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 294:
-/* rule 294 can match eol */
+case 296:
+/* rule 296 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</ASroute>' expected.",surf_parse_text);
        YY_BREAK
-case 295:
+case 297:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</ASroute>' expected.",surf_parse_text[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):
-FAIL("Premature EOF: `</ASroute>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</ASroute>' expected.");
        YY_BREAK
 
-case 296:
-/* rule 296 can match eol */
+case 298:
+/* rule 298 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <link_ctn> is not allowed here.");
        YY_BREAK
-case 297:
-/* rule 297 can match eol */
+case 299:
+/* rule 299 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_link_ctn_id = 0;
+  surfxml_link_ctn_id_isset = 0;
   AX_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
+  surfxml_link_ctn_direction_isset = 0;
   ENTER(AL_surfxml_link_ctn); pushbuffer(0);
   }
        YY_BREAK
 
-case 298:
-/* rule 298 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
-       YY_BREAK
-case 299:
-/* rule 299 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
-       YY_BREAK
 case 300:
 /* rule 300 can match eol */
+YY_RULE_SETUP
+if (surfxml_link_ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_link_ctn>");} surfxml_link_ctn_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
+       YY_BREAK
 case 301:
 /* rule 301 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
+if (surfxml_link_ctn_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_link_ctn>");}  surfxml_link_ctn_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
        YY_BREAK
 case 302:
 /* rule 302 can match eol */
 case 303:
 /* rule 303 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;
+A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
        YY_BREAK
 case 304:
 /* rule 304 can match eol */
 case 305:
 /* rule 305 can match eol */
 YY_RULE_SETUP
-A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
+A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;
        YY_BREAK
 case 306:
+/* rule 306 can match eol */
+case 307:
+/* rule 307 can match eol */
+YY_RULE_SETUP
+A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
+       YY_BREAK
+case 308:
 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);
  }
        YY_BREAK
-case 307:
+case 309:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_link_ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
@@ -5978,11 +6152,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 308:
+case 310:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of link_ctn element.", surf_parse_text[0]);
        YY_BREAK
-case 309:
+case 311:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `link_ctn' element start tag.",surf_parse_text);
        YY_BREAK
@@ -5990,8 +6164,8 @@ case YY_STATE_EOF(AL_surfxml_link_ctn):
 FAIL("EOF in attribute list of `link_ctn' element.");
        YY_BREAK
 
-case 310:
-/* rule 310 can match eol */
+case 312:
+/* rule 312 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6004,77 +6178,81 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 311:
-/* rule 311 can match eol */
+case 313:
+/* rule 313 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</link_ctn>' expected.",surf_parse_text);
        YY_BREAK
-case 312:
+case 314:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</link_ctn>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_link_ctn):
-FAIL("Premature EOF: `</link_ctn>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</link_ctn>' expected.");
        YY_BREAK
 
-case 313:
-/* rule 313 can match eol */
+case 315:
+/* rule 315 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <bypassRoute> is not allowed here.");
        YY_BREAK
-case 314:
-/* rule 314 can match eol */
+case 316:
+/* rule 316 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_bypassRoute_src = 0;
+  surfxml_bypassRoute_src_isset = 0;
   AX_surfxml_bypassRoute_dst = 0;
+  surfxml_bypassRoute_dst_isset = 0;
   AX_surfxml_bypassRoute_gw_src = 0;
+  surfxml_bypassRoute_gw_src_isset = 0;
   AX_surfxml_bypassRoute_gw_dst = 0;
+  surfxml_bypassRoute_gw_dst_isset = 0;
   ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
   }
        YY_BREAK
 
-case 315:
-/* rule 315 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
-       YY_BREAK
-case 316:
-/* rule 316 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
-       YY_BREAK
 case 317:
 /* rule 317 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
+if (surfxml_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_bypassRoute>");} surfxml_bypassRoute_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
        YY_BREAK
 case 318:
 /* rule 318 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
+if (surfxml_bypassRoute_src_isset != 0) {FAIL("Multiple definition of attribute src in <surfxml_bypassRoute>");}  surfxml_bypassRoute_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
        YY_BREAK
 case 319:
 /* rule 319 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
+if (surfxml_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_bypassRoute>");} surfxml_bypassRoute_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
        YY_BREAK
 case 320:
 /* rule 320 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
+if (surfxml_bypassRoute_dst_isset != 0) {FAIL("Multiple definition of attribute dst in <surfxml_bypassRoute>");}  surfxml_bypassRoute_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
        YY_BREAK
 case 321:
 /* rule 321 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
+if (surfxml_bypassRoute_gw_src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_bypassRoute>");} surfxml_bypassRoute_gw_src_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
        YY_BREAK
 case 322:
 /* rule 322 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
+if (surfxml_bypassRoute_gw_src_isset != 0) {FAIL("Multiple definition of attribute gw_src in <surfxml_bypassRoute>");}  surfxml_bypassRoute_gw_src_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
        YY_BREAK
 case 323:
+/* rule 323 can match eol */
+YY_RULE_SETUP
+if (surfxml_bypassRoute_gw_dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_bypassRoute>");} surfxml_bypassRoute_gw_dst_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
+       YY_BREAK
+case 324:
+/* rule 324 can match eol */
+YY_RULE_SETUP
+if (surfxml_bypassRoute_gw_dst_isset != 0) {FAIL("Multiple definition of attribute gw_dst in <surfxml_bypassRoute>");}  surfxml_bypassRoute_gw_dst_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
+       YY_BREAK
+case 325:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
@@ -6084,7 +6262,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute);
  }
        YY_BREAK
-case 324:
+case 326:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
@@ -6097,11 +6275,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 325:
+case 327:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of bypassRoute element.", surf_parse_text[0]);
        YY_BREAK
-case 326:
+case 328:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",surf_parse_text);
        YY_BREAK
@@ -6109,8 +6287,8 @@ case YY_STATE_EOF(AL_surfxml_bypassRoute):
 FAIL("EOF in attribute list of `bypassRoute' element.");
        YY_BREAK
 
-case 327:
-/* rule 327 can match eol */
+case 329:
+/* rule 329 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6121,79 +6299,83 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 328:
-/* rule 328 can match eol */
+case 330:
+/* rule 330 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</bypassRoute>' expected.",surf_parse_text);
        YY_BREAK
-case 329:
+case 331:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</bypassRoute>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(S_surfxml_bypassRoute):
 case YY_STATE_EOF(S_surfxml_bypassRoute_2):
 case YY_STATE_EOF(E_surfxml_bypassRoute):
-FAIL("Premature EOF: `</bypassRoute>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</bypassRoute>' expected.");
        YY_BREAK
 
-case 330:
-/* rule 330 can match eol */
+case 332:
+/* rule 332 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <process> is not allowed here.");
        YY_BREAK
-case 331:
-/* rule 331 can match eol */
+case 333:
+/* rule 333 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_process_host = 0;
+  surfxml_process_host_isset = 0;
   AX_surfxml_process_function = 0;
+  surfxml_process_function_isset = 0;
   AX_surfxml_process_start_time = 28;
+  surfxml_process_start_time_isset = 0;
   AX_surfxml_process_kill_time = 33;
+  surfxml_process_kill_time_isset = 0;
   ENTER(AL_surfxml_process); pushbuffer(0);
   }
        YY_BREAK
 
-case 332:
-/* rule 332 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
-       YY_BREAK
-case 333:
-/* rule 333 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
-       YY_BREAK
 case 334:
 /* rule 334 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
+if (surfxml_process_host_isset != 0) {FAIL("Multiple definition of attribute host in <surfxml_process>");} surfxml_process_host_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
        YY_BREAK
 case 335:
 /* rule 335 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
+if (surfxml_process_host_isset != 0) {FAIL("Multiple definition of attribute host in <surfxml_process>");}  surfxml_process_host_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
        YY_BREAK
 case 336:
 /* rule 336 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
+if (surfxml_process_function_isset != 0) {FAIL("Multiple definition of attribute function in <surfxml_process>");} surfxml_process_function_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
        YY_BREAK
 case 337:
 /* rule 337 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
+if (surfxml_process_function_isset != 0) {FAIL("Multiple definition of attribute function in <surfxml_process>");}  surfxml_process_function_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
        YY_BREAK
 case 338:
 /* rule 338 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
+if (surfxml_process_start_time_isset != 0) {FAIL("Multiple definition of attribute start_time in <surfxml_process>");} surfxml_process_start_time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
        YY_BREAK
 case 339:
 /* rule 339 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
+if (surfxml_process_start_time_isset != 0) {FAIL("Multiple definition of attribute start_time in <surfxml_process>");}  surfxml_process_start_time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
        YY_BREAK
 case 340:
+/* rule 340 can match eol */
+YY_RULE_SETUP
+if (surfxml_process_kill_time_isset != 0) {FAIL("Multiple definition of attribute kill_time in <surfxml_process>");} surfxml_process_kill_time_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
+       YY_BREAK
+case 341:
+/* rule 341 can match eol */
+YY_RULE_SETUP
+if (surfxml_process_kill_time_isset != 0) {FAIL("Multiple definition of attribute kill_time in <surfxml_process>");}  surfxml_process_kill_time_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
+       YY_BREAK
+case 342:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
@@ -6201,7 +6383,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
  }
        YY_BREAK
-case 341:
+case 343:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
@@ -6212,11 +6394,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 342:
+case 344:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of process element.", surf_parse_text[0]);
        YY_BREAK
-case 343:
+case 345:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `process' element start tag.",surf_parse_text);
        YY_BREAK
@@ -6224,8 +6406,8 @@ case YY_STATE_EOF(AL_surfxml_process):
 FAIL("EOF in attribute list of `process' element.");
        YY_BREAK
 
-case 344:
-/* rule 344 can match eol */
+case 346:
+/* rule 346 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6236,53 +6418,54 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 345:
-/* rule 345 can match eol */
+case 347:
+/* rule 347 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</process>' expected.",surf_parse_text);
        YY_BREAK
-case 346:
+case 348:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</process>' expected.",surf_parse_text[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):
-FAIL("Premature EOF: `</process>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</process>' expected.");
        YY_BREAK
 
-case 347:
-/* rule 347 can match eol */
+case 349:
+/* rule 349 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <argument> is not allowed here.");
        YY_BREAK
-case 348:
-/* rule 348 can match eol */
+case 350:
+/* rule 350 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_argument_value = 0;
+  surfxml_argument_value_isset = 0;
   ENTER(AL_surfxml_argument); pushbuffer(0);
   }
        YY_BREAK
 
-case 349:
-/* rule 349 can match eol */
+case 351:
+/* rule 351 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
+if (surfxml_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in <surfxml_argument>");} surfxml_argument_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
        YY_BREAK
-case 350:
-/* rule 350 can match eol */
+case 352:
+/* rule 352 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
+if (surfxml_argument_value_isset != 0) {FAIL("Multiple definition of attribute value in <surfxml_argument>");}  surfxml_argument_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
        YY_BREAK
-case 351:
+case 353:
 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);
  }
        YY_BREAK
-case 352:
+case 354:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
@@ -6292,11 +6475,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 353:
+case 355:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of argument element.", surf_parse_text[0]);
        YY_BREAK
-case 354:
+case 356:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `argument' element start tag.",surf_parse_text);
        YY_BREAK
@@ -6304,8 +6487,8 @@ case YY_STATE_EOF(AL_surfxml_argument):
 FAIL("EOF in attribute list of `argument' element.");
        YY_BREAK
 
-case 355:
-/* rule 355 can match eol */
+case 357:
+/* rule 357 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6316,50 +6499,51 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 356:
-/* rule 356 can match eol */
+case 358:
+/* rule 358 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</argument>' expected.",surf_parse_text);
        YY_BREAK
-case 357:
+case 359:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</argument>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_argument):
-FAIL("Premature EOF: `</argument>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</argument>' expected.");
        YY_BREAK
 
-case 358:
-/* rule 358 can match eol */
+case 360:
+/* rule 360 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <config> is not allowed here.");
        YY_BREAK
-case 359:
-/* rule 359 can match eol */
+case 361:
+/* rule 361 can match eol */
 YY_RULE_SETUP
 {
   AX_surfxml_config_id = 0;
+  surfxml_config_id_isset = 0;
   ENTER(AL_surfxml_config); pushbuffer(0);
   }
        YY_BREAK
 
-case 360:
-/* rule 360 can match eol */
+case 362:
+/* rule 362 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
+if (surfxml_config_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_config>");} surfxml_config_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
        YY_BREAK
-case 361:
-/* rule 361 can match eol */
+case 363:
+/* rule 363 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
+if (surfxml_config_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_config>");}  surfxml_config_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
        YY_BREAK
-case 362:
+case 364:
 YY_RULE_SETUP
 {
   LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config);
  }
        YY_BREAK
-case 363:
+case 365:
 YY_RULE_SETUP
 {
   LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
@@ -6368,11 +6552,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 364:
+case 366:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of config element.", surf_parse_text[0]);
        YY_BREAK
-case 365:
+case 367:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `config' element start tag.",surf_parse_text);
        YY_BREAK
@@ -6380,8 +6564,8 @@ case YY_STATE_EOF(AL_surfxml_config):
 FAIL("EOF in attribute list of `config' element.");
        YY_BREAK
 
-case 366:
-/* rule 366 can match eol */
+case 368:
+/* rule 368 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6392,59 +6576,61 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 367:
-/* rule 367 can match eol */
+case 369:
+/* rule 369 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</config>' expected.",surf_parse_text);
        YY_BREAK
-case 368:
+case 370:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</config>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(S_surfxml_config):
 case YY_STATE_EOF(S_surfxml_config_2):
 case YY_STATE_EOF(E_surfxml_config):
-FAIL("Premature EOF: `</config>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</config>' expected.");
        YY_BREAK
 
 /* <!-- <!ATTLIST prop key CDATA #REQUIRED> -->
   * <!-- <!ATTLIST prop key CDATA #REQUIRED> -->  */
-case 369:
-/* rule 369 can match eol */
+case 371:
+/* rule 371 can match eol */
 YY_RULE_SETUP
 FAIL("Starting tag <prop> is not allowed here.");
        YY_BREAK
-case 370:
-/* rule 370 can match eol */
+case 372:
+/* rule 372 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);
   }
        YY_BREAK
 
-case 371:
-/* rule 371 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
-       YY_BREAK
-case 372:
-/* rule 372 can match eol */
-YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
-       YY_BREAK
 case 373:
 /* rule 373 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
+if (surfxml_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_prop>");} surfxml_prop_id_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
        YY_BREAK
 case 374:
 /* rule 374 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
+if (surfxml_prop_id_isset != 0) {FAIL("Multiple definition of attribute id in <surfxml_prop>");}  surfxml_prop_id_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
        YY_BREAK
 case 375:
+/* rule 375 can match eol */
+YY_RULE_SETUP
+if (surfxml_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in <surfxml_prop>");} surfxml_prop_value_isset = 1; ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
+       YY_BREAK
+case 376:
+/* rule 376 can match eol */
+YY_RULE_SETUP
+if (surfxml_prop_value_isset != 0) {FAIL("Multiple definition of attribute value in <surfxml_prop>");}  surfxml_prop_value_isset = 1; ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
+       YY_BREAK
+case 377:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
@@ -6452,7 +6638,7 @@ YY_RULE_SETUP
   LEAVE; STag_surfxml_prop();surfxml_pcdata_ix = 0; ENTER(E_surfxml_prop);
  }
        YY_BREAK
-case 376:
+case 378:
 YY_RULE_SETUP
 {
   if (!AX_surfxml_prop_id) FAIL("Required attribute `id' not set for `prop' element.");
@@ -6467,11 +6653,11 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 377:
+case 379:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c' in attribute list of prop element.", surf_parse_text[0]);
        YY_BREAK
-case 378:
+case 380:
 YY_RULE_SETUP
 FAIL("Bad attribute `%s' in `prop' element start tag.",surf_parse_text);
        YY_BREAK
@@ -6479,8 +6665,8 @@ case YY_STATE_EOF(AL_surfxml_prop):
 FAIL("EOF in attribute list of `prop' element.");
        YY_BREAK
 
-case 379:
-/* rule 379 can match eol */
+case 381:
+/* rule 381 can match eol */
 YY_RULE_SETUP
 {
   LEAVE;
@@ -6495,22 +6681,22 @@ YY_RULE_SETUP
   }
  }
        YY_BREAK
-case 380:
-/* rule 380 can match eol */
+case 382:
+/* rule 382 can match eol */
 YY_RULE_SETUP
 FAIL("Unexpected end-tag `%s': `</prop>' expected.",surf_parse_text);
        YY_BREAK
-case 381:
+case 383:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</prop>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_prop):
-FAIL("Premature EOF: `</prop>' expected.");
+if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</prop>' expected.");
        YY_BREAK
 
 /* EPILOG: after the root element. */
 
-case 382:
+case 384:
 YY_RULE_SETUP
 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
        YY_BREAK
@@ -6521,58 +6707,58 @@ SUCCEED;
 /* CHARACTER DATA. */
 
 /* Non-defined standard entities... */
-case 383:
+case 385:
 YY_RULE_SETUP
 BUFFERPUTC('&');
        YY_BREAK
-case 384:
+case 386:
 YY_RULE_SETUP
 BUFFERPUTC('<');
        YY_BREAK
-case 385:
+case 387:
 YY_RULE_SETUP
 BUFFERPUTC('>');
        YY_BREAK
-case 386:
+case 388:
 YY_RULE_SETUP
 BUFFERPUTC('\'');
        YY_BREAK
-case 387:
+case 389:
 YY_RULE_SETUP
 BUFFERPUTC('"');
        YY_BREAK
 /* Character entities. */
-case 388:
+case 390:
 YY_RULE_SETUP
 BUFFERPUTC((unsigned char)atoi(surf_parse_text+2));
        YY_BREAK
-case 389:
+case 391:
 YY_RULE_SETUP
 BUFFERPUTC((unsigned char)strtol(surf_parse_text+3,NULL,16));
        YY_BREAK
 
-case 390:
-/* rule 390 can match eol */
-case 391:
-/* rule 391 can match eol */
 case 392:
 /* rule 392 can match eol */
 case 393:
 /* rule 393 can match eol */
+case 394:
+/* rule 394 can match eol */
+case 395:
+/* rule 395 can match eol */
 YY_RULE_SETUP
 BUFFERPUTC('\n');
        YY_BREAK
 
-case 394:
+case 396:
 YY_RULE_SETUP
 ENTER(CDATA);
        YY_BREAK
-case 395:
+case 397:
 YY_RULE_SETUP
 FAIL("Unexpected `]""]>' in character data.");
        YY_BREAK
 
-case 396:
+case 398:
 YY_RULE_SETUP
 BUFFERDONE; LEAVE;
        YY_BREAK
@@ -6580,7 +6766,7 @@ case YY_STATE_EOF(VALUE1):
 FAIL("EOF in literal (\"'\" expected).");
        YY_BREAK
 
-case 397:
+case 399:
 YY_RULE_SETUP
 BUFFERDONE; LEAVE;
        YY_BREAK
@@ -6588,22 +6774,22 @@ case YY_STATE_EOF(VALUE2):
 FAIL("EOF in literal (`\"' expected).");
        YY_BREAK
 
-case 398:
-/* rule 398 can match eol */
+case 400:
+/* rule 400 can match eol */
 YY_RULE_SETUP
 BUFFERPUTC(surf_parse_text[0]);
        YY_BREAK
-case 399:
+case 401:
 YY_RULE_SETUP
 FAIL("Spurious `%c' in character data.",surf_parse_text[0]);
        YY_BREAK
 
-case 400:
+case 402:
 YY_RULE_SETUP
 LEAVE;
        YY_BREAK
 /* "]""]"              BUFFERPUTC(surf_parse_text[0]); BUFFERPUTC(surf_parse_text[1]); */
-case 401:
+case 403:
 YY_RULE_SETUP
 BUFFERPUTC(surf_parse_text[0]);
        YY_BREAK
@@ -6615,13 +6801,13 @@ FAIL("EOF in CDATA section.");
 /* Ideally, this should be replaced by code in flexml.pl that
     generates just the states not covered by other rules. */
 
-case 402:
-/* rule 402 can match eol */
+case 404:
+/* rule 404 can match eol */
 YY_RULE_SETUP
 FAIL("Syntax error on character `%c'.", surf_parse_text[0]);
        YY_BREAK
 
-case 403:
+case 405:
 YY_RULE_SETUP
 ECHO;
        YY_BREAK
@@ -6934,7 +7120,7 @@ static int yy_get_next_buffer (void)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 2408 )
+                       if ( yy_current_state >= 2421 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -6962,11 +7148,11 @@ static int yy_get_next_buffer (void)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 2408 )
+               if ( yy_current_state >= 2421 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 2407);
+       yy_is_jam = (yy_current_state == 2420);
 
        return yy_is_jam ? 0 : yy_current_state;
 }
diff --git a/src/surf/simgrid_dtd.l b/src/surf/simgrid_dtd.l
deleted file mode 100644 (file)
index e684a0a..0000000
+++ /dev/null
@@ -1,1924 +0,0 @@
-/* Validating XML processor for src/surf/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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
- * 
- * 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-2006 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.
- * 
- */
-
-%{
-
-/* Version strings. */
-const char rcs_surfxml_flexml_skeleton[] =
- "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
-const char rcs_surfxml_flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
-
-/* ANSI headers. */
-#include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <ctype.h>
-     
-#if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
-# ifndef __STRICT_ANSI__
-#  include <io.h>
-#  include <process.h>
-# endif
-#else
-# include <unistd.h>
-#endif
-     
-#ifndef FLEXML_INDEXSTACKSIZE
-#define FLEXML_INDEXSTACKSIZE 1000
-#endif
-
-/* Generated definitions. */
-#define FLEXML_yylineno
-#ifndef FLEXML_BUFFERSTACKSIZE
-#define FLEXML_BUFFERSTACKSIZE 1000000
-#endif
-#define FLEXML_NEED_BUFFERLIT
-
-/* XML processor api. */
-/* FleXML-provided data. */
-int surfxml_pcdata_ix;
-extern char *surfxml_bufferstack;
-#define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
-AT_surfxml_random_generator AX_surfxml_random_generator;
-#define A_surfxml_random_generator AX_surfxml_random_generator
-AT_surfxml_ASroute_gw_dst AX_surfxml_ASroute_gw_dst;
-#define A_surfxml_ASroute_gw_dst (surfxml_bufferstack + AX_surfxml_ASroute_gw_dst)
-AT_surfxml_trace_connect_element AX_surfxml_trace_connect_element;
-#define A_surfxml_trace_connect_element (surfxml_bufferstack + AX_surfxml_trace_connect_element)
-AT_surfxml_prop_id AX_surfxml_prop_id;
-#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
-AT_surfxml_host_id AX_surfxml_host_id;
-#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
-AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
-#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
-AT_surfxml_peer_lat AX_surfxml_peer_lat;
-#define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
-AT_surfxml_link_latency_file AX_surfxml_link_latency_file;
-#define A_surfxml_link_latency_file (surfxml_bufferstack + AX_surfxml_link_latency_file)
-AT_surfxml_peer_availability_file AX_surfxml_peer_availability_file;
-#define A_surfxml_peer_availability_file (surfxml_bufferstack + AX_surfxml_peer_availability_file)
-AT_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction;
-#define A_surfxml_link_ctn_direction AX_surfxml_link_ctn_direction
-AT_surfxml_host_state AX_surfxml_host_state;
-#define A_surfxml_host_state AX_surfxml_host_state
-AT_surfxml_AS_id AX_surfxml_AS_id;
-#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
-AT_surfxml_host_power AX_surfxml_host_power;
-#define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
-AT_surfxml_router_id AX_surfxml_router_id;
-#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
-AT_surfxml_process_start_time AX_surfxml_process_start_time;
-#define A_surfxml_process_start_time (surfxml_bufferstack + AX_surfxml_process_start_time)
-AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
-#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
-AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
-#define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
-AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
-#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
-AT_surfxml_trace_file AX_surfxml_trace_file;
-#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
-AT_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy;
-#define A_surfxml_link_sharing_policy AX_surfxml_link_sharing_policy
-AT_surfxml_random_min AX_surfxml_random_min;
-#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
-AT_surfxml_link_ctn_id AX_surfxml_link_ctn_id;
-#define A_surfxml_link_ctn_id (surfxml_bufferstack + AX_surfxml_link_ctn_id)
-AT_surfxml_peer_bw_out AX_surfxml_peer_bw_out;
-#define A_surfxml_peer_bw_out (surfxml_bufferstack + AX_surfxml_peer_bw_out)
-AT_surfxml_cluster_availability_file AX_surfxml_cluster_availability_file;
-#define A_surfxml_cluster_availability_file (surfxml_bufferstack + AX_surfxml_cluster_availability_file)
-AT_surfxml_process_kill_time AX_surfxml_process_kill_time;
-#define A_surfxml_process_kill_time (surfxml_bufferstack + AX_surfxml_process_kill_time)
-AT_surfxml_cluster_bb_bw AX_surfxml_cluster_bb_bw;
-#define A_surfxml_cluster_bb_bw (surfxml_bufferstack + AX_surfxml_cluster_bb_bw)
-AT_surfxml_argument_value AX_surfxml_argument_value;
-#define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
-AT_surfxml_link_state AX_surfxml_link_state;
-#define A_surfxml_link_state AX_surfxml_link_state
-AT_surfxml_ASroute_gw_src AX_surfxml_ASroute_gw_src;
-#define A_surfxml_ASroute_gw_src (surfxml_bufferstack + AX_surfxml_ASroute_gw_src)
-AT_surfxml_AS_routing AX_surfxml_AS_routing;
-#define A_surfxml_AS_routing (surfxml_bufferstack + AX_surfxml_AS_routing)
-AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
-#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
-AT_surfxml_cluster_id AX_surfxml_cluster_id;
-#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
-AT_surfxml_peer_bw_in AX_surfxml_peer_bw_in;
-#define A_surfxml_peer_bw_in (surfxml_bufferstack + AX_surfxml_peer_bw_in)
-AT_surfxml_random_mean AX_surfxml_random_mean;
-#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
-AT_surfxml_cluster_bb_lat AX_surfxml_cluster_bb_lat;
-#define A_surfxml_cluster_bb_lat (surfxml_bufferstack + AX_surfxml_cluster_bb_lat)
-AT_surfxml_link_latency AX_surfxml_link_latency;
-#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
-AT_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind;
-#define A_surfxml_trace_connect_kind AX_surfxml_trace_connect_kind
-AT_surfxml_random_seed AX_surfxml_random_seed;
-#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
-AT_surfxml_cluster_state_file AX_surfxml_cluster_state_file;
-#define A_surfxml_cluster_state_file (surfxml_bufferstack + AX_surfxml_cluster_state_file)
-AT_surfxml_link_bandwidth_file AX_surfxml_link_bandwidth_file;
-#define A_surfxml_link_bandwidth_file (surfxml_bufferstack + AX_surfxml_link_bandwidth_file)
-AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
-#define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
-AT_surfxml_random_id AX_surfxml_random_id;
-#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
-AT_surfxml_random_max AX_surfxml_random_max;
-#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
-AT_surfxml_link_id AX_surfxml_link_id;
-#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
-AT_surfxml_process_host AX_surfxml_process_host;
-#define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
-AT_surfxml_host_availability_file AX_surfxml_host_availability_file;
-#define A_surfxml_host_availability_file (surfxml_bufferstack + AX_surfxml_host_availability_file)
-AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
-#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
-AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
-#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
-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
-AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
-#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
-AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
-#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
-AT_surfxml_peer_state_file AX_surfxml_peer_state_file;
-#define A_surfxml_peer_state_file (surfxml_bufferstack + AX_surfxml_peer_state_file)
-AT_surfxml_prop_value AX_surfxml_prop_value;
-#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
-AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
-#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
-AT_surfxml_random_radical AX_surfxml_random_radical;
-#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-AT_surfxml_link_state_file AX_surfxml_link_state_file;
-#define A_surfxml_link_state_file (surfxml_bufferstack + AX_surfxml_link_state_file)
-AT_surfxml_trace_connect_trace AX_surfxml_trace_connect_trace;
-#define A_surfxml_trace_connect_trace (surfxml_bufferstack + AX_surfxml_trace_connect_trace)
-AT_surfxml_cluster_power AX_surfxml_cluster_power;
-#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
-AT_surfxml_process_function AX_surfxml_process_function;
-#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
-AT_surfxml_peer_id AX_surfxml_peer_id;
-#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
-AT_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy;
-#define A_surfxml_cluster_sharing_policy AX_surfxml_cluster_sharing_policy
-AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
-#define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
-AT_surfxml_host_core AX_surfxml_host_core;
-#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
-AT_surfxml_host_availability AX_surfxml_host_availability;
-#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
-AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
-#define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
-AT_surfxml_route_src AX_surfxml_route_src;
-#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
-AT_surfxml_bypassRoute_gw_dst AX_surfxml_bypassRoute_gw_dst;
-#define A_surfxml_bypassRoute_gw_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_dst)
-AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
-#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
-AT_surfxml_trace_id AX_surfxml_trace_id;
-#define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
-AT_surfxml_peer_power AX_surfxml_peer_power;
-#define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
-AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
-#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
-AT_surfxml_config_id AX_surfxml_config_id;
-#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
-AT_surfxml_bypassRoute_gw_src AX_surfxml_bypassRoute_gw_src;
-#define A_surfxml_bypassRoute_gw_src (surfxml_bufferstack + AX_surfxml_bypassRoute_gw_src)
-AT_surfxml_cluster_core AX_surfxml_cluster_core;
-#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-AT_surfxml_include_file AX_surfxml_include_file;
-#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
-AT_surfxml_random_std_deviation AX_surfxml_random_std_deviation;
-#define A_surfxml_random_std_deviation (surfxml_bufferstack + AX_surfxml_random_std_deviation)
-AT_surfxml_host_state_file AX_surfxml_host_state_file;
-#define A_surfxml_host_state_file (surfxml_bufferstack + AX_surfxml_host_state_file)
-AT_surfxml_route_dst AX_surfxml_route_dst;
-#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
-AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
-#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
-AT_surfxml_platform_version AX_surfxml_platform_version;
-#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
-
-/* XML state. */
-#ifdef FLEX_DEBUG
-# define ENTER(state)  debug_enter(state,#state)
-# define LEAVE         debug_leave()
-# define SET(state)    debug_set(state,#state)
-  static void debug_enter(int, const char*);
-  static void debug_leave(void);
-  static void debug_set(int, const char*);
-#else
-# define ENTER(state)  (yy_push_state(state))
-# define LEAVE         (yy_pop_state())
-# define SET(state)    BEGIN(state)
-#endif
-
-/* Generic actions. */
-#define SKIP   /*skip*/
-#define SUCCEED        CLEANUP; return 0
-
-#define FAIL   return fail
-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()
-{
-    return flexml_err_msg;
-}
-static void reset_surfxml_parse_err_msg()
-{
-    flexml_err_msg[0] = '\0';
-}
-
-/* Cleanup */
-static void cleanup(void);
-#define CLEANUP  cleanup()
-
-/* Text buffer stack handling. */
-char *surfxml_bufferstack = NULL;
-static int blimit = FLEXML_BUFFERSTACKSIZE;
-static int bnext = 1;
-
-static int *indexstack = NULL;
-static int ilimit = FLEXML_INDEXSTACKSIZE;
-static int inext = 1;
-
-#define BUFFERSET(P)  (P = bnext)
-#define BUFFERPUTC(C) (ck_blimit(), surfxml_bufferstack[bnext++] = (C))
-#define BUFFERDONE    (BUFFERPUTC('\0'))
-
-#define BUFFERLITERAL(C, P) surfxml_bufferliteral(C, &(P), yytext)
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_blimit()
-{
-     if (bnext >= blimit) {
-        blimit += FLEXML_BUFFERSTACKSIZE + 2;
-        {
-            char *temp = (char *) realloc(surfxml_bufferstack, blimit);
-            assert(temp);
-            surfxml_bufferstack = temp;
-        }
-     }
-     return 0;
-}
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_ilimit()
-{
-     if (inext >= ilimit) {
-        ilimit += FLEXML_INDEXSTACKSIZE + 2;
-        {
-            int *temp = (int *) realloc(indexstack, ilimit);
-            assert(temp);
-            indexstack = temp;
-        }
-     }
-     return 0;
-}
-
-#ifdef FLEXML_NEED_BUFFERLIT
-static void surfxml_bufferliteral(char c, int* pp, const char* text)
-{
-  const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
-  assert(s <= e); BUFFERSET(*pp);
-  while (++s<e) {
-    if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
-    else BUFFERPUTC(*s);
-  }
-  BUFFERDONE;
-}
-#endif
-
-static void pushbuffer(int p)
-{
-    ck_ilimit();
-    indexstack[inext++] = p;
-    indexstack[inext++] = bnext;    
-}
-
-static int popbuffer(void)
-{
-    assert(inext >= 2);
-    bnext = indexstack[--inext];
-    return indexstack[--inext];
-}
-
-/* General internal entities are `unput' back onto the input stream... */
-#define ENTITYTEXT(T) \
-  { char *s = (T), *e = s+strlen(s);\
-    while (--e >= s) { unput(*e); }}
-
-
-%}
-
-/* Flex standard options. */
-%option stack
-%option noyy_top_state
-%option noinput
-%option noreject
-%option noyymore
-%option noyywrap
-
-/* Flex user-requested options. */
-%option yylineno
-%option nounput
-
-/* XML character classes (currently restricted to ASCII). */
-
-/* "Common syntactic structures." */
-S              [ \t\n\r\f]+
-s              [ \t\n\r\f]*
-
-/* "Names and Tokens." */
-NameChar       [A-Za-z0-9.:_-]
-Name           [A-Za-z_:]{NameChar}*
-Names          {Name}({S}{Name})*
-Nmtoken                ({NameChar})+
-Nmtokens       {Nmtoken}({S}{Nmtoken})*
-
-/* Miscellaneous. */
-VersionNum     [a-zA-Z0-9_.:-]+
-Eq             {s}"="{s}
-Literal                \'[^'']*\'|\"[^""]*\"
-
-/* Parser states (flex `exclusive start conditions'):
- *
- * PROLOG      the XML prolog of the document before <?xml...>
- * DOCTYPE     the XML prolog of the document after <?xml...>
- * EPILOG      after the root element
- * INCOMMENT   inside an XML comment <!--....-->
- * INPI                inside an XML PI <?...?>
- * VALUE1      inside a '...'-delimited literal
- * VALUE2      inside a "..."-delimited literal
- * CDATA       inside a <![CDATA[...] ]> section.
- * ROOT_<tag>  expect root element <tag>
- * AL_<tag>    inside the attribute list for <tag>
- * IN_<tag>    inside a <tag> with element contents (ready for end tag)
- * IMPOSSIBLE  dummy to permit disabling rules; must be last
- */
-%x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
-%x ROOT_surfxml_platform AL_surfxml_platform S_surfxml_platform S_surfxml_platform_1 S_surfxml_platform_2 S_surfxml_platform_3 S_surfxml_platform_4 S_surfxml_platform_5 S_surfxml_platform_6 S_surfxml_platform_7 S_surfxml_platform_8 E_surfxml_platform
-%x AL_surfxml_include E_surfxml_include
-%x AL_surfxml_trace IN_trace
-%x AL_surfxml_random S_surfxml_random S_surfxml_random_1 S_surfxml_random_2 E_surfxml_random
-%x AL_surfxml_trace_connect E_surfxml_trace_connect
-%x AL_surfxml_AS S_surfxml_AS S_surfxml_AS_1 S_surfxml_AS_2 S_surfxml_AS_3 S_surfxml_AS_4 S_surfxml_AS_5 S_surfxml_AS_6 S_surfxml_AS_7 S_surfxml_AS_8 S_surfxml_AS_9 S_surfxml_AS_10 S_surfxml_AS_11 S_surfxml_AS_12 S_surfxml_AS_13 E_surfxml_AS
-%x AL_surfxml_host S_surfxml_host S_surfxml_host_1 S_surfxml_host_2 E_surfxml_host
-%x AL_surfxml_cluster E_surfxml_cluster
-%x AL_surfxml_peer E_surfxml_peer
-%x AL_surfxml_router E_surfxml_router
-%x AL_surfxml_link S_surfxml_link S_surfxml_link_1 S_surfxml_link_2 E_surfxml_link
-%x AL_surfxml_route S_surfxml_route S_surfxml_route_1 S_surfxml_route_2 E_surfxml_route
-%x AL_surfxml_ASroute S_surfxml_ASroute S_surfxml_ASroute_1 S_surfxml_ASroute_2 E_surfxml_ASroute
-%x AL_surfxml_link_ctn E_surfxml_link_ctn
-%x AL_surfxml_bypassRoute S_surfxml_bypassRoute S_surfxml_bypassRoute_1 S_surfxml_bypassRoute_2 E_surfxml_bypassRoute
-%x AL_surfxml_process S_surfxml_process S_surfxml_process_1 S_surfxml_process_2 E_surfxml_process
-%x AL_surfxml_argument E_surfxml_argument
-%x AL_surfxml_config S_surfxml_config S_surfxml_config_1 S_surfxml_config_2 E_surfxml_config
-%x AL_surfxml_prop E_surfxml_prop
-%x IMPOSSIBLE
-
-%{
-/* State names. */
-const char* *surfxml_statenames=NULL;
-%}
-
-%%
-
- /* 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);
- #ifdef FLEX_DEBUG
- {
-     int i;
-     for (i = 0; i < blimit; i++) {
-         surfxml_bufferstack[i] = '\377';
-     }
- }
- #endif
- surfxml_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, "1");
-  surfxml_bufferliteral('\0', &bnext, "1.0");
-  surfxml_bufferliteral('\0', &bnext, "1");
-  surfxml_bufferliteral('\0', &bnext, "0.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[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_include] = NULL;
-  surfxml_statenames[E_surfxml_include] = "include";
-  surfxml_statenames[AL_surfxml_trace] = NULL;
-  surfxml_statenames[IN_trace] = "trace";
-  surfxml_statenames[AL_surfxml_random] = NULL;
-  surfxml_statenames[S_surfxml_random] = "random";
-  surfxml_statenames[S_surfxml_random_1] = "random";
-  surfxml_statenames[S_surfxml_random_2] = "random";
-  surfxml_statenames[E_surfxml_random] = "random";
-  surfxml_statenames[AL_surfxml_trace_connect] = NULL;
-  surfxml_statenames[E_surfxml_trace_connect] = "trace_connect";
-  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[E_surfxml_AS] = "AS";
-  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_cluster] = NULL;
-  surfxml_statenames[E_surfxml_cluster] = "cluster";
-  surfxml_statenames[AL_surfxml_peer] = NULL;
-  surfxml_statenames[E_surfxml_peer] = "peer";
-  surfxml_statenames[AL_surfxml_router] = NULL;
-  surfxml_statenames[E_surfxml_router] = "router";
-  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_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_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_link_ctn] = NULL;
-  surfxml_statenames[E_surfxml_link_ctn] = "link_ctn";
-  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_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_argument] = NULL;
-  surfxml_statenames[E_surfxml_argument] = "argument";
-  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_prop] = NULL;
-  surfxml_statenames[E_surfxml_prop] = "prop";
-  }
-
- /* COMMENTS and PIs: handled uniformly for efficiency. */
-
-<ROOT_surfxml_platform,AL_surfxml_platform,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform_4,S_surfxml_platform_5,S_surfxml_platform_6,S_surfxml_platform_7,S_surfxml_platform_8,E_surfxml_platform,AL_surfxml_include,E_surfxml_include,AL_surfxml_trace,IN_trace,AL_surfxml_random,S_surfxml_random,S_surfxml_random_1,S_surfxml_random_2,E_surfxml_random,AL_surfxml_trace_connect,E_surfxml_trace_connect,AL_surfxml_AS,S_surfxml_AS,S_surfxml_AS_1,S_surfxml_AS_2,S_surfxml_AS_3,S_surfxml_AS_4,S_surfxml_AS_5,S_surfxml_AS_6,S_surfxml_AS_7,S_surfxml_AS_8,S_surfxml_AS_9,S_surfxml_AS_10,S_surfxml_AS_11,S_surfxml_AS_12,S_surfxml_AS_13,E_surfxml_AS,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_peer,E_surfxml_peer,AL_surfxml_router,E_surfxml_router,AL_surfxml_link,S_surfxml_link,S_surfxml_link_1,S_surfxml_link_2,E_surfxml_link,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2,E_surfxml_ASroute,AL_surfxml_link_ctn,E_surfxml_link_ctn,AL_surfxml_bypassRoute,S_surfxml_bypassRoute,S_surfxml_bypassRoute_1,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,AL_surfxml_config,S_surfxml_config,S_surfxml_config_1,S_surfxml_config_2,E_surfxml_config,AL_surfxml_prop,E_surfxml_prop,PROLOG,DOCTYPE,EPILOG>{
- "<!--" ENTER(INCOMMENT);
- "<?" ENTER(INPI);
-}
-<INCOMMENT>{
- "-->"         LEAVE;
- "--"          |
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in comment.");
-}
-<INPI>{
- "?>"          LEAVE;
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in PI (processing instruction).");
-}
-
- /* SPACES: skipped uniformly */
-
-<ROOT_surfxml_platform,AL_surfxml_platform,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_platform_2,S_surfxml_platform_3,S_surfxml_platform_4,S_surfxml_platform_5,S_surfxml_platform_6,S_surfxml_platform_7,S_surfxml_platform_8,E_surfxml_platform,AL_surfxml_include,E_surfxml_include,AL_surfxml_trace,AL_surfxml_random,S_surfxml_random,S_surfxml_random_1,S_surfxml_random_2,E_surfxml_random,AL_surfxml_trace_connect,E_surfxml_trace_connect,AL_surfxml_AS,S_surfxml_AS,S_surfxml_AS_1,S_surfxml_AS_2,S_surfxml_AS_3,S_surfxml_AS_4,S_surfxml_AS_5,S_surfxml_AS_6,S_surfxml_AS_7,S_surfxml_AS_8,S_surfxml_AS_9,S_surfxml_AS_10,S_surfxml_AS_11,S_surfxml_AS_12,S_surfxml_AS_13,E_surfxml_AS,AL_surfxml_host,S_surfxml_host,S_surfxml_host_1,S_surfxml_host_2,E_surfxml_host,AL_surfxml_cluster,E_surfxml_cluster,AL_surfxml_peer,E_surfxml_peer,AL_surfxml_router,E_surfxml_router,AL_surfxml_link,S_surfxml_link,S_surfxml_link_1,S_surfxml_link_2,E_surfxml_link,AL_surfxml_route,S_surfxml_route,S_surfxml_route_1,S_surfxml_route_2,E_surfxml_route,AL_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2,E_surfxml_ASroute,AL_surfxml_link_ctn,E_surfxml_link_ctn,AL_surfxml_bypassRoute,S_surfxml_bypassRoute,S_surfxml_bypassRoute_1,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute,AL_surfxml_process,S_surfxml_process,S_surfxml_process_1,S_surfxml_process_2,E_surfxml_process,AL_surfxml_argument,E_surfxml_argument,AL_surfxml_config,S_surfxml_config,S_surfxml_config_1,S_surfxml_config_2,E_surfxml_config,AL_surfxml_prop,E_surfxml_prop,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
-
- /* PROLOG: determine root element and process it. */
-
-<PROLOG>{
- "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(DOCTYPE); 
- "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
-}
-
-<PROLOG,DOCTYPE>{
- "<!DOCTYPE"{S}"platform"{S}SYSTEM{S}("'http://simgrid.gforge.inria.fr/simgrid.dtd'"|"\"http://simgrid.gforge.inria.fr/simgrid.dtd\""){s}">" SET(ROOT_surfxml_platform);
- "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
- .             FAIL("Unexpected character `%c' in prolog.", yytext[0]);
- <<EOF>>       FAIL("EOF in prolog.");
-}
-
- /* RULES DERIVED FROM DTD. */
-
- /* <!-- Small DTD for SURF based tools. -->  */
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_AS_6,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<platform"{s} FAIL("Starting tag <platform> is not allowed here.");
-
-<ROOT_surfxml_platform>"<platform"{s} {
-  AX_surfxml_platform_version = 1;
-  ENTER(AL_surfxml_platform); pushbuffer(0);
-  }
-
-<AL_surfxml_platform>{
- "version"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_platform_version);
- "version"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_platform_version);
-
- ">" {
-  LEAVE; STag_surfxml_platform();surfxml_pcdata_ix = 0; ENTER(S_surfxml_platform);
- }
- "/>" {
-  LEAVE; STag_surfxml_platform(); surfxml_pcdata_ix = 0; ETag_surfxml_platform(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_surfxml_platform: SET(EPILOG); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of platform element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `platform' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `platform' element.");
-}
-
-<S_surfxml_platform_8,S_surfxml_platform_1,S_surfxml_platform_3,S_surfxml_platform,S_surfxml_platform_4,S_surfxml_platform_6,E_surfxml_platform>{
- "</platform"{s}">" {
-  LEAVE;
-  ETag_surfxml_platform();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_surfxml_platform: SET(EPILOG); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</platform>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</platform>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</platform>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,ROOT_surfxml_include,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<include"{s} FAIL("Starting tag <include> is not allowed here.");
-
-<S_surfxml_platform_5,S_surfxml_AS_2,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_6,S_surfxml_platform_8,S_surfxml_AS_3,S_surfxml_platform_7,S_surfxml_AS,S_surfxml_platform_3,S_surfxml_platform_4>"<include"{s} {
-  AX_surfxml_include_file = 0;
-  ENTER(AL_surfxml_include); pushbuffer(0);
-  }
-
-<AL_surfxml_include>{
- "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_include_file);
- "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_include_file);
-
- ">" {
-  if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
-  LEAVE; STag_surfxml_include();surfxml_pcdata_ix = 0; ENTER(E_surfxml_include);
- }
- "/>" {
-  if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
-  LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of include element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `include' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `include' element.");
-}
-
-<E_surfxml_include>{
- "</include"{s}">" {
-  LEAVE;
-  ETag_surfxml_include();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: case S_surfxml_platform_4: SET(S_surfxml_platform_8); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</include>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</include>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</include>' expected.");
-}
-
-<ROOT_surfxml_trace,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<trace"{s} FAIL("Starting tag <trace> is not allowed here.");
-
-<S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_platform_5,S_surfxml_AS_7,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_6,S_surfxml_AS_3,S_surfxml_platform_3>"<trace"{s} {
-  AX_surfxml_trace_id = 0;
-  AX_surfxml_trace_file = 0;
-  AX_surfxml_trace_periodicity = 0;
-  ENTER(AL_surfxml_trace); pushbuffer(0);
-  }
-
-<AL_surfxml_trace>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_id);
-
- "file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_file);
- "file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_file);
-
- "periodicity"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_periodicity);
- "periodicity"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_periodicity);
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of trace element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `trace' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `trace' element.");
-}
-
-<IN_trace>{
- "</trace"{s}">" {
-  LEAVE;
-  BUFFERDONE;
-  ETag_surfxml_trace();
-  surfxml_pcdata_ix = popbuffer();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace>' expected.",yytext);
- <<EOF>> FAIL("Premature EOF: `</trace>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,ROOT_surfxml_random,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<random"{s} FAIL("Starting tag <random> is not allowed here.");
-
-<S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<random"{s} {
-  AX_surfxml_random_id = 0;
-  AX_surfxml_random_min = 0;
-  AX_surfxml_random_max = 0;
-  AX_surfxml_random_mean = 0;
-  AX_surfxml_random_std_deviation = 0;
-  AX_surfxml_random_seed = 5;
-  AX_surfxml_random_radical = 0;
-  AX_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
-  ENTER(AL_surfxml_random); pushbuffer(0);
-  }
-
-<AL_surfxml_random>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_id);
-
- "min"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_min);
- "min"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_min);
-
- "max"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_max);
- "max"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_max);
-
- "mean"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_mean);
- "mean"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_mean);
-
- "std_deviation"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_std_deviation);
- "std_deviation"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_std_deviation);
-
- "seed"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_seed);
- "seed"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_seed);
-
- "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_random_radical);
- "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_random_radical);
-
- "generator"{Eq}"'DRAND48'" |
- "generator"{Eq}"\"DRAND48\"" A_surfxml_random_generator = A_surfxml_random_generator_DRAND48;
- "generator"{Eq}"'RAND'" |
- "generator"{Eq}"\"RAND\"" A_surfxml_random_generator = A_surfxml_random_generator_RAND;
- "generator"{Eq}"'RNGSTREAM'" |
- "generator"{Eq}"\"RNGSTREAM\"" A_surfxml_random_generator = A_surfxml_random_generator_RNGSTREAM;
- "generator"{Eq}"'NONE'" |
- "generator"{Eq}"\"NONE\"" A_surfxml_random_generator = A_surfxml_random_generator_NONE;
-
- ">" {
-  if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
-  if (!AX_surfxml_random_min) FAIL("Required attribute `min' 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_std_deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
-  LEAVE; STag_surfxml_random();surfxml_pcdata_ix = 0; ENTER(S_surfxml_random);
- }
- "/>" {
-  if (!AX_surfxml_random_id) FAIL("Required attribute `id' not set for `random' element.");
-  if (!AX_surfxml_random_min) FAIL("Required attribute `min' 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_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 */
-  switch (YY_START) {
-   case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of random element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `random' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `random' element.");
-}
-
-<S_surfxml_random_2,S_surfxml_random,E_surfxml_random>{
- "</random"{s}">" {
-  LEAVE;
-  ETag_surfxml_random();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</random>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</random>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</random>' expected.");
-}
-
-<S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,ROOT_surfxml_trace_connect,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_ASroute,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<trace_connect"{s} FAIL("Starting tag <trace_connect> is not allowed here.");
-
-<S_surfxml_AS_12,S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS_5,S_surfxml_AS_10,S_surfxml_AS_13,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_platform_5,S_surfxml_AS_7,S_surfxml_platform_1,S_surfxml_AS_6,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<trace_connect"{s} {
-  AX_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
-  AX_surfxml_trace_connect_trace = 0;
-  AX_surfxml_trace_connect_element = 0;
-  ENTER(AL_surfxml_trace_connect); pushbuffer(0);
-  }
-
-<AL_surfxml_trace_connect>{
- "kind"{Eq}"'HOST_AVAIL'" |
- "kind"{Eq}"\"HOST_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_HOST_AVAIL;
- "kind"{Eq}"'POWER'" |
- "kind"{Eq}"\"POWER\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_POWER;
- "kind"{Eq}"'LINK_AVAIL'" |
- "kind"{Eq}"\"LINK_AVAIL\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LINK_AVAIL;
- "kind"{Eq}"'BANDWIDTH'" |
- "kind"{Eq}"\"BANDWIDTH\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_BANDWIDTH;
- "kind"{Eq}"'LATENCY'" |
- "kind"{Eq}"\"LATENCY\"" A_surfxml_trace_connect_kind = A_surfxml_trace_connect_kind_LATENCY;
-
- "trace"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_trace);
- "trace"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_trace);
-
- "element"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_trace_connect_element);
- "element"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_trace_connect_element);
-
- ">" {
-  if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
-  if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
-  LEAVE; STag_surfxml_trace_connect();surfxml_pcdata_ix = 0; ENTER(E_surfxml_trace_connect);
- }
- "/>" {
-  if (!AX_surfxml_trace_connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
-  if (!AX_surfxml_trace_connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
-  LEAVE; STag_surfxml_trace_connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace_connect(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of trace_connect element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `trace_connect' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `trace_connect' element.");
-}
-
-<E_surfxml_trace_connect>{
- "</trace_connect"{s}">" {
-  LEAVE;
-  ETag_surfxml_trace_connect();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_13: SET(S_surfxml_AS_13); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</trace_connect>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</trace_connect>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</trace_connect>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,ROOT_surfxml_AS,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<AS"{s} FAIL("Starting tag <AS> is not allowed here.");
-
-<S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<AS"{s} {
-  AX_surfxml_AS_id = 0;
-  AX_surfxml_AS_routing = 0;
-  ENTER(AL_surfxml_AS); pushbuffer(0);
-  }
-
-<AL_surfxml_AS>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_id);
-
- "routing"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_AS_routing);
- "routing"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_AS_routing);
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of AS element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `AS' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `AS' element.");
-}
-
-<S_surfxml_AS_1,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_6,E_surfxml_AS,S_surfxml_AS_3,S_surfxml_AS_13,S_surfxml_AS_8,S_surfxml_AS,S_surfxml_AS_4>{
- "</AS"{s}">" {
-  LEAVE;
-  ETag_surfxml_AS();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</AS>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</AS>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</AS>' expected.");
-}
-
-<S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,ROOT_surfxml_host,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<host"{s} FAIL("Starting tag <host> is not allowed here.");
-
-<S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<host"{s} {
-  AX_surfxml_host_id = 0;
-  AX_surfxml_host_power = 0;
-  AX_surfxml_host_core = 16;
-  AX_surfxml_host_availability = 18;
-  AX_surfxml_host_availability_file = 0;
-  AX_surfxml_host_state = A_surfxml_host_state_ON;
-  AX_surfxml_host_state_file = 0;
-  AX_surfxml_host_coordinates = 0;
-  ENTER(AL_surfxml_host); pushbuffer(0);
-  }
-
-<AL_surfxml_host>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_id);
-
- "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_power);
- "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_power);
-
- "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_core);
- "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_core);
-
- "availability"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability);
- "availability"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability);
-
- "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_availability_file);
- "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_availability_file);
-
- "state"{Eq}"'ON'" |
- "state"{Eq}"\"ON\"" A_surfxml_host_state = A_surfxml_host_state_ON;
- "state"{Eq}"'OFF'" |
- "state"{Eq}"\"OFF\"" A_surfxml_host_state = A_surfxml_host_state_OFF;
-
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_state_file);
-
- "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_host_coordinates);
- "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_host_coordinates);
-
- ">" {
-  if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
-  if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
-  LEAVE; STag_surfxml_host();surfxml_pcdata_ix = 0; ENTER(S_surfxml_host);
- }
- "/>" {
-  if (!AX_surfxml_host_id) FAIL("Required attribute `id' not set for `host' element.");
-  if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
-  LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of host element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `host' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `host' element.");
-}
-
-<S_surfxml_host,E_surfxml_host,S_surfxml_host_2>{
- "</host"{s}">" {
-  LEAVE;
-  ETag_surfxml_host();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</host>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</host>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</host>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,ROOT_surfxml_cluster,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<cluster"{s} FAIL("Starting tag <cluster> is not allowed here.");
-
-<S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<cluster"{s} {
-  AX_surfxml_cluster_id = 0;
-  AX_surfxml_cluster_prefix = 0;
-  AX_surfxml_cluster_suffix = 0;
-  AX_surfxml_cluster_radical = 0;
-  AX_surfxml_cluster_power = 0;
-  AX_surfxml_cluster_core = 22;
-  AX_surfxml_cluster_bw = 0;
-  AX_surfxml_cluster_lat = 0;
-  AX_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
-  AX_surfxml_cluster_bb_bw = 0;
-  AX_surfxml_cluster_bb_lat = 0;
-  AX_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
-  AX_surfxml_cluster_availability_file = 0;
-  AX_surfxml_cluster_state_file = 0;
-  ENTER(AL_surfxml_cluster); pushbuffer(0);
-  }
-
-<AL_surfxml_cluster>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_id);
-
- "prefix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_prefix);
- "prefix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_prefix);
-
- "suffix"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_suffix);
- "suffix"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_suffix);
-
- "radical"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_radical);
- "radical"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_radical);
-
- "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_power);
- "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_power);
-
- "core"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_core);
- "core"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_core);
-
- "bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bw);
- "bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bw);
-
- "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_lat);
- "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_lat);
-
- "sharing_policy"{Eq}"'SHARED'" |
- "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_SHARED;
- "sharing_policy"{Eq}"'FULLDUPLEX'" |
- "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FULLDUPLEX;
- "sharing_policy"{Eq}"'FATPIPE'" |
- "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_sharing_policy = A_surfxml_cluster_sharing_policy_FATPIPE;
-
- "bb_bw"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_bw);
- "bb_bw"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_bw);
-
- "bb_lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_bb_lat);
- "bb_lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_bb_lat);
-
- "bb_sharing_policy"{Eq}"'SHARED'" |
- "bb_sharing_policy"{Eq}"\"SHARED\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_SHARED;
- "bb_sharing_policy"{Eq}"'FATPIPE'" |
- "bb_sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_cluster_bb_sharing_policy = A_surfxml_cluster_bb_sharing_policy_FATPIPE;
-
- "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_availability_file);
- "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_availability_file);
-
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_cluster_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_cluster_state_file);
-
- ">" {
-  if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
-  LEAVE; STag_surfxml_cluster();surfxml_pcdata_ix = 0; ENTER(E_surfxml_cluster);
- }
- "/>" {
-  if (!AX_surfxml_cluster_id) FAIL("Required attribute `id' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_prefix) FAIL("Required attribute `prefix' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_suffix) FAIL("Required attribute `suffix' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_radical) FAIL("Required attribute `radical' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_power) FAIL("Required attribute `power' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_bw) FAIL("Required attribute `bw' not set for `cluster' element.");
-  if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
-  LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of cluster element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `cluster' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `cluster' element.");
-}
-
-<E_surfxml_cluster>{
- "</cluster"{s}">" {
-  LEAVE;
-  ETag_surfxml_cluster();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</cluster>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</cluster>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</cluster>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_AS_5,ROOT_surfxml_peer,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<peer"{s} FAIL("Starting tag <peer> is not allowed here.");
-
-<S_surfxml_AS_2,S_surfxml_platform_6,S_surfxml_AS,S_surfxml_platform_5,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_AS_3,S_surfxml_platform_3>"<peer"{s} {
-  AX_surfxml_peer_id = 0;
-  AX_surfxml_peer_power = 0;
-  AX_surfxml_peer_bw_in = 0;
-  AX_surfxml_peer_bw_out = 0;
-  AX_surfxml_peer_lat = 0;
-  AX_surfxml_peer_coordinates = 0;
-  AX_surfxml_peer_availability_file = 0;
-  AX_surfxml_peer_state_file = 0;
-  ENTER(AL_surfxml_peer); pushbuffer(0);
-  }
-
-<AL_surfxml_peer>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_id);
-
- "power"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_power);
- "power"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_power);
-
- "bw_in"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_in);
- "bw_in"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_in);
-
- "bw_out"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_bw_out);
- "bw_out"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_bw_out);
-
- "lat"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_lat);
- "lat"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_lat);
-
- "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_coordinates);
- "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_coordinates);
-
- "availability_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_availability_file);
- "availability_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_availability_file);
-
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_peer_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_peer_state_file);
-
- ">" {
-  if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
-  if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
-  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_lat) FAIL("Required attribute `lat' not set for `peer' element.");
-  LEAVE; STag_surfxml_peer();surfxml_pcdata_ix = 0; ENTER(E_surfxml_peer);
- }
- "/>" {
-  if (!AX_surfxml_peer_id) FAIL("Required attribute `id' not set for `peer' element.");
-  if (!AX_surfxml_peer_power) FAIL("Required attribute `power' not set for `peer' element.");
-  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_lat) FAIL("Required attribute `lat' not set for `peer' element.");
-  LEAVE; STag_surfxml_peer(); surfxml_pcdata_ix = 0; ETag_surfxml_peer(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of peer element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `peer' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `peer' element.");
-}
-
-<E_surfxml_peer>{
- "</peer"{s}">" {
-  LEAVE;
-  ETag_surfxml_peer();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_2: case S_surfxml_AS: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</peer>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</peer>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</peer>' expected.");
-}
-
-<S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,ROOT_surfxml_router,S_surfxml_platform_7,E_surfxml_bypassRoute>"<router"{s} FAIL("Starting tag <router> is not allowed here.");
-
-<S_surfxml_AS_11,S_surfxml_AS_10,S_surfxml_AS>"<router"{s} {
-  AX_surfxml_router_id = 0;
-  AX_surfxml_router_coordinates = 0;
-  ENTER(AL_surfxml_router); pushbuffer(0);
-  }
-
-<AL_surfxml_router>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_id);
-
- "coordinates"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_router_coordinates);
- "coordinates"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_router_coordinates);
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of router element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `router' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `router' element.");
-}
-
-<E_surfxml_router>{
- "</router"{s}">" {
-  LEAVE;
-  ETag_surfxml_router();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</router>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</router>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</router>' expected.");
-}
-
-<S_surfxml_random,S_surfxml_ASroute_1,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,ROOT_surfxml_link,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<link"{s} FAIL("Starting tag <link> is not allowed here.");
-
-<S_surfxml_AS_11,S_surfxml_AS_2,S_surfxml_AS_10,S_surfxml_AS,S_surfxml_AS_3>"<link"{s} {
-  AX_surfxml_link_id = 0;
-  AX_surfxml_link_bandwidth = 0;
-  AX_surfxml_link_bandwidth_file = 0;
-  AX_surfxml_link_latency = 24;
-  AX_surfxml_link_latency_file = 0;
-  AX_surfxml_link_state = A_surfxml_link_state_ON;
-  AX_surfxml_link_state_file = 0;
-  AX_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-  ENTER(AL_surfxml_link); pushbuffer(0);
-  }
-
-<AL_surfxml_link>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_id);
-
- "bandwidth"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth);
- "bandwidth"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth);
-
- "bandwidth_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_bandwidth_file);
- "bandwidth_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_bandwidth_file);
-
- "latency"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency);
- "latency"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency);
-
- "latency_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_latency_file);
- "latency_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_latency_file);
-
- "state"{Eq}"'ON'" |
- "state"{Eq}"\"ON\"" A_surfxml_link_state = A_surfxml_link_state_ON;
- "state"{Eq}"'OFF'" |
- "state"{Eq}"\"OFF\"" A_surfxml_link_state = A_surfxml_link_state_OFF;
-
- "state_file"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_state_file);
- "state_file"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_state_file);
-
- "sharing_policy"{Eq}"'SHARED'" |
- "sharing_policy"{Eq}"\"SHARED\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
- "sharing_policy"{Eq}"'FATPIPE'" |
- "sharing_policy"{Eq}"\"FATPIPE\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;
- "sharing_policy"{Eq}"'FULLDUPLEX'" |
- "sharing_policy"{Eq}"\"FULLDUPLEX\"" A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FULLDUPLEX;
-
- ">" {
-  if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
-  if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
-  LEAVE; STag_surfxml_link();surfxml_pcdata_ix = 0; ENTER(S_surfxml_link);
- }
- "/>" {
-  if (!AX_surfxml_link_id) FAIL("Required attribute `id' not set for `link' element.");
-  if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
-  LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of link element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `link' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `link' element.");
-}
-
-<E_surfxml_link,S_surfxml_link_2,S_surfxml_link>{
- "</link"{s}">" {
-  LEAVE;
-  ETag_surfxml_link();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_11: case S_surfxml_AS_10: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
-   case S_surfxml_AS_2: case S_surfxml_AS_3: SET(S_surfxml_AS_3); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</link>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</link>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_link_1,ROOT_surfxml_route,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<route"{s} FAIL("Starting tag <route> is not allowed here.");
-
-<S_surfxml_AS_12,S_surfxml_AS_9,S_surfxml_AS_11,S_surfxml_AS_13,S_surfxml_AS>"<route"{s} {
-  AX_surfxml_route_src = 0;
-  AX_surfxml_route_dst = 0;
-  AX_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
-  ENTER(AL_surfxml_route); pushbuffer(0);
-  }
-
-<AL_surfxml_route>{
- "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_src);
- "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_src);
-
- "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_route_dst);
- "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_route_dst);
-
- "symmetrical"{Eq}"'YES'" |
- "symmetrical"{Eq}"\"YES\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_YES;
- "symmetrical"{Eq}"'NO'" |
- "symmetrical"{Eq}"\"NO\"" A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-
- ">" {
-  if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
-  if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
-  LEAVE; STag_surfxml_route();surfxml_pcdata_ix = 0; ENTER(S_surfxml_route);
- }
- "/>" {
-  if (!AX_surfxml_route_src) FAIL("Required attribute `src' not set for `route' element.");
-  if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
-  LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_13); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of route element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `route' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `route' element.");
-}
-
-<S_surfxml_route,S_surfxml_route_2,E_surfxml_route>{
- "</route"{s}">" {
-  LEAVE;
-  ETag_surfxml_route();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_12: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_13); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</route>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</route>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</route>' expected.");
-}
-
-<S_surfxml_AS_10,ROOT_surfxml_ASroute,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<ASroute"{s} FAIL("Starting tag <ASroute> is not allowed here.");
-
-<S_surfxml_AS_1,S_surfxml_AS_5,S_surfxml_AS,S_surfxml_AS_6,S_surfxml_AS_3>"<ASroute"{s} {
-  AX_surfxml_ASroute_src = 0;
-  AX_surfxml_ASroute_dst = 0;
-  AX_surfxml_ASroute_gw_src = 0;
-  AX_surfxml_ASroute_gw_dst = 0;
-  AX_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
-  ENTER(AL_surfxml_ASroute); pushbuffer(0);
-  }
-
-<AL_surfxml_ASroute>{
- "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_src);
- "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_src);
-
- "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_dst);
- "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_dst);
-
- "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_src);
- "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_src);
-
- "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_ASroute_gw_dst);
- "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_ASroute_gw_dst);
-
- "symmetrical"{Eq}"'YES'" |
- "symmetrical"{Eq}"\"YES\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_YES;
- "symmetrical"{Eq}"'NO'" |
- "symmetrical"{Eq}"\"NO\"" A_surfxml_ASroute_symmetrical = A_surfxml_ASroute_symmetrical_NO;
-
- ">" {
-  if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
-  if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `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_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
-  LEAVE; STag_surfxml_ASroute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_ASroute);
- }
- "/>" {
-  if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
-  if (!AX_surfxml_ASroute_dst) FAIL("Required attribute `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_gw_dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
-  LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of ASroute element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `ASroute' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `ASroute' element.");
-}
-
-<E_surfxml_ASroute,S_surfxml_ASroute,S_surfxml_ASroute_2>{
- "</ASroute"{s}">" {
-  LEAVE;
-  ETag_surfxml_ASroute();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</ASroute>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</ASroute>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</ASroute>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_link,E_surfxml_host,S_surfxml_config,ROOT_surfxml_link_ctn,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,E_surfxml_config,S_surfxml_host_1,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_platform_7,E_surfxml_bypassRoute>"<link_ctn"{s} FAIL("Starting tag <link_ctn> is not allowed here.");
-
-<S_surfxml_route_1,S_surfxml_bypassRoute,S_surfxml_route,S_surfxml_bypassRoute_2,S_surfxml_bypassRoute_1,S_surfxml_route_2,S_surfxml_ASroute,S_surfxml_ASroute_1,S_surfxml_ASroute_2>"<link_ctn"{s} {
-  AX_surfxml_link_ctn_id = 0;
-  AX_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  ENTER(AL_surfxml_link_ctn); pushbuffer(0);
-  }
-
-<AL_surfxml_link_ctn>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_link_ctn_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_link_ctn_id);
-
- "direction"{Eq}"'UP'" |
- "direction"{Eq}"\"UP\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;
- "direction"{Eq}"'DOWN'" |
- "direction"{Eq}"\"DOWN\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;
- "direction"{Eq}"'NONE'" |
- "direction"{Eq}"\"NONE\"" A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
-   case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
-   case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of link_ctn element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `link_ctn' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `link_ctn' element.");
-}
-
-<E_surfxml_link_ctn>{
- "</link_ctn"{s}">" {
-  LEAVE;
-  ETag_surfxml_link_ctn();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
-   case S_surfxml_route_1: case S_surfxml_route: case S_surfxml_route_2: SET(S_surfxml_route_2); break;
-   case S_surfxml_ASroute: case S_surfxml_ASroute_1: case S_surfxml_ASroute_2: SET(S_surfxml_ASroute_2); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</link_ctn>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</link_ctn>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</link_ctn>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,ROOT_surfxml_bypassRoute,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<bypassRoute"{s} FAIL("Starting tag <bypassRoute> is not allowed here.");
-
-<S_surfxml_AS_1,S_surfxml_AS,S_surfxml_AS_8,S_surfxml_AS_4,S_surfxml_AS_7,S_surfxml_AS_6,S_surfxml_AS_3>"<bypassRoute"{s} {
-  AX_surfxml_bypassRoute_src = 0;
-  AX_surfxml_bypassRoute_dst = 0;
-  AX_surfxml_bypassRoute_gw_src = 0;
-  AX_surfxml_bypassRoute_gw_dst = 0;
-  ENTER(AL_surfxml_bypassRoute); pushbuffer(0);
-  }
-
-<AL_surfxml_bypassRoute>{
- "src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_src);
- "src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_src);
-
- "dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_dst);
- "dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_dst);
-
- "gw_src"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
- "gw_src"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_src);
-
- "gw_dst"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
- "gw_dst"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_bypassRoute_gw_dst);
-
- ">" {
-  if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
-  LEAVE; STag_surfxml_bypassRoute();surfxml_pcdata_ix = 0; ENTER(S_surfxml_bypassRoute);
- }
- "/>" {
-  if (!AX_surfxml_bypassRoute_src) FAIL("Required attribute `src' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_gw_src) FAIL("Required attribute `gw_src' not set for `bypassRoute' element.");
-  if (!AX_surfxml_bypassRoute_gw_dst) FAIL("Required attribute `gw_dst' not set for `bypassRoute' element.");
-  LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of bypassRoute element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `bypassRoute' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `bypassRoute' element.");
-}
-
-<S_surfxml_bypassRoute,S_surfxml_bypassRoute_2,E_surfxml_bypassRoute>{
- "</bypassRoute"{s}">" {
-  LEAVE;
-  ETag_surfxml_bypassRoute();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_8); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</bypassRoute>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</bypassRoute>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</bypassRoute>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_process_2,E_surfxml_ASroute,ROOT_surfxml_process,S_surfxml_AS_6,E_surfxml_link,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,E_surfxml_bypassRoute>"<process"{s} FAIL("Starting tag <process> is not allowed here.");
-
-<S_surfxml_platform_6,S_surfxml_platform_4,S_surfxml_platform_1,S_surfxml_platform,S_surfxml_platform_8,S_surfxml_platform_7,S_surfxml_platform_3>"<process"{s} {
-  AX_surfxml_process_host = 0;
-  AX_surfxml_process_function = 0;
-  AX_surfxml_process_start_time = 28;
-  AX_surfxml_process_kill_time = 33;
-  ENTER(AL_surfxml_process); pushbuffer(0);
-  }
-
-<AL_surfxml_process>{
- "host"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_host);
- "host"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_host);
-
- "function"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_function);
- "function"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_function);
-
- "start_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_start_time);
- "start_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_start_time);
-
- "kill_time"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_process_kill_time);
- "kill_time"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_process_kill_time);
-
- ">" {
-  if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
-  if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
-  LEAVE; STag_surfxml_process();surfxml_pcdata_ix = 0; ENTER(S_surfxml_process);
- }
- "/>" {
-  if (!AX_surfxml_process_host) FAIL("Required attribute `host' not set for `process' element.");
-  if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
-  LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: SET(S_surfxml_platform_8); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of process element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `process' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `process' element.");
-}
-
-<E_surfxml_process,S_surfxml_process,S_surfxml_process_2>{
- "</process"{s}">" {
-  LEAVE;
-  ETag_surfxml_process();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_8: case S_surfxml_platform_7: case S_surfxml_platform_3: SET(S_surfxml_platform_8); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</process>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</process>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</process>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,ROOT_surfxml_argument,E_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_platform_2,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<argument"{s} FAIL("Starting tag <argument> is not allowed here.");
-
-<S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<argument"{s} {
-  AX_surfxml_argument_value = 0;
-  ENTER(AL_surfxml_argument); pushbuffer(0);
-  }
-
-<AL_surfxml_argument>{
- "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_argument_value);
- "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_argument_value);
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of argument element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `argument' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `argument' element.");
-}
-
-<E_surfxml_argument>{
- "</argument"{s}">" {
-  LEAVE;
-  ETag_surfxml_argument();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</argument>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</argument>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</argument>' expected.");
-}
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_random,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,S_surfxml_process,S_surfxml_link_2,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,S_surfxml_AS_9,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_link_1,S_surfxml_AS,S_surfxml_bypassRoute,S_surfxml_link,E_surfxml_host,S_surfxml_config,S_surfxml_ASroute_2,S_surfxml_random_2,S_surfxml_platform_6,S_surfxml_process_2,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_host_1,ROOT_surfxml_config,S_surfxml_route_2,E_surfxml_platform,S_surfxml_config_2,S_surfxml_random_1,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_host,S_surfxml_process_1,S_surfxml_host_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_config_1,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<config"{s} FAIL("Starting tag <config> is not allowed here.");
-
-<S_surfxml_platform_2,S_surfxml_platform,S_surfxml_platform_3>"<config"{s} {
-  AX_surfxml_config_id = 0;
-  ENTER(AL_surfxml_config); pushbuffer(0);
-  }
-
-<AL_surfxml_config>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_config_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_config_id);
-
- ">" {
-  LEAVE; STag_surfxml_config();surfxml_pcdata_ix = 0; ENTER(S_surfxml_config);
- }
- "/>" {
-  LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of config element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `config' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `config' element.");
-}
-
-<S_surfxml_config,S_surfxml_config_2,E_surfxml_config>{
- "</config"{s}">" {
-  LEAVE;
-  ETag_surfxml_config();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_platform_2: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_3); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</config>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</config>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</config>' expected.");
-}
-
- /* <!-- <!ATTLIST prop key CDATA #REQUIRED> -->
-  * <!-- <!ATTLIST prop key CDATA #REQUIRED> -->  */
-
-<S_surfxml_AS_10,S_surfxml_AS_3,S_surfxml_ASroute_1,S_surfxml_AS_2,E_surfxml_AS,S_surfxml_AS_12,E_surfxml_process,E_surfxml_random,S_surfxml_AS_8,S_surfxml_bypassRoute_2,E_surfxml_route,ROOT_surfxml_prop,S_surfxml_AS_9,S_surfxml_platform_3,S_surfxml_route_1,S_surfxml_AS_11,S_surfxml_AS,S_surfxml_bypassRoute,E_surfxml_host,S_surfxml_ASroute_2,S_surfxml_platform_6,E_surfxml_ASroute,S_surfxml_AS_6,E_surfxml_link,S_surfxml_platform,S_surfxml_platform_1,S_surfxml_bypassRoute_1,E_surfxml_config,S_surfxml_route_2,E_surfxml_platform,S_surfxml_platform_8,S_surfxml_platform_4,S_surfxml_AS_1,S_surfxml_platform_2,S_surfxml_AS_7,S_surfxml_AS_13,S_surfxml_ASroute,S_surfxml_platform_5,S_surfxml_AS_5,S_surfxml_AS_4,S_surfxml_route,S_surfxml_platform_7,E_surfxml_bypassRoute>"<prop"{s} FAIL("Starting tag <prop> is not allowed here.");
-
-<S_surfxml_config_1,S_surfxml_config,S_surfxml_random,S_surfxml_host_1,S_surfxml_host_2,S_surfxml_host,S_surfxml_link_1,S_surfxml_link_2,S_surfxml_config_2,S_surfxml_random_2,S_surfxml_link,S_surfxml_random_1,S_surfxml_process_1,S_surfxml_process,S_surfxml_process_2>"<prop"{s} {
-  AX_surfxml_prop_id = 0;
-  AX_surfxml_prop_value = 0;
-  ENTER(AL_surfxml_prop); pushbuffer(0);
-  }
-
-<AL_surfxml_prop>{
- "id"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_id);
- "id"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_id);
-
- "value"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_surfxml_prop_value);
- "value"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_surfxml_prop_value);
-
- ">" {
-  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_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 */
-  switch (YY_START) {
-   case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
-   case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
-   case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
-   case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
-   case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of prop element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `prop' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `prop' element.");
-}
-
-<E_surfxml_prop>{
- "</prop"{s}">" {
-  LEAVE;
-  ETag_surfxml_prop();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_surfxml_random: case S_surfxml_random_2: case S_surfxml_random_1: SET(S_surfxml_random_2); break;
-   case S_surfxml_config_1: case S_surfxml_config: case S_surfxml_config_2: SET(S_surfxml_config_2); break;
-   case S_surfxml_process_1: case S_surfxml_process: case S_surfxml_process_2: SET(S_surfxml_process_2); break;
-   case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
-   case S_surfxml_link_1: case S_surfxml_link_2: case S_surfxml_link: SET(S_surfxml_link_2); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</prop>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</prop>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</prop>' expected.");
-}
-
- /* EPILOG: after the root element. */
-
-<EPILOG>{
- . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
- <<EOF>>       SUCCEED;
-}
-
- /* CHARACTER DATA. */
-
-<IN_trace,VALUE1,VALUE2>{
- /* Non-defined standard entities... */
-"&amp;"  BUFFERPUTC('&');
-"&lt;"   BUFFERPUTC('<');
-"&gt;"   BUFFERPUTC('>');
-"&apos;" BUFFERPUTC('\'');
-"&quot;" BUFFERPUTC('"');
-
- /* Character entities. */
- "&#"[[:digit:]]+";"   BUFFERPUTC((unsigned char)atoi(yytext+2));
- "&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
-}
-
-<IN_trace,VALUE1,VALUE2,CDATA>{
- "\n"          |
- "\r"          |
- "\r\n"                |
- "\n\r"                BUFFERPUTC('\n');
-}
-
-<IN_trace>{
- "<![CDATA["   ENTER(CDATA);
- "]""]>"               FAIL("Unexpected `]""]>' in character data.");
-}
-
-<VALUE1>{
- \'            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (\"'\" expected).");
-}
-
-<VALUE2>{
- \"            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (`\"' expected).");
-}
-
-<IN_trace,VALUE1,VALUE2>{
- [^<&]         BUFFERPUTC(yytext[0]);
- [<&]          FAIL("Spurious `%c' in character data.",yytext[0]);
-}
-
-<CDATA>{
- "]""]>"               LEAVE;
- /* "]""]"             BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
- .             BUFFERPUTC(yytext[0]);
- <<EOF>>       FAIL("EOF in CDATA section.");
-}
-
- /* Impossible rules to avoid warnings from flex(1). */
- /* Ideally, this should be replaced by code in flexml.pl that
-    generates just the states not covered by other rules. */
-<*>{
- .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
-}
-
-%%
-
-/* Element context stack lookup. */
-int surfxml_element_context(int i)
-{
-  return (0<i && i<yy_start_stack_depth
-         ? yy_start_stack[yy_start_stack_ptr - i]
-         : 0);
-}
-
-#ifdef FLEX_DEBUG
-void print_yy_stack(char* fmt, ...)
-{
-  int i = 0; va_list ap; va_start(ap, fmt);
-  vfprintf(stderr, fmt, ap);
-  if (surfxml_statenames) {
-      for (i=1; i<yy_start_stack_ptr; i++) {
-          fprintf(stderr, "%s/", surfxml_statenames[yy_start_stack[i] ]);
-      }
-      fprintf(stderr,"%s\n", surfxml_statenames[YY_START]);
-  }
-  va_end(ap);
-}
-
-void print_surfxml_bufferstack()
-{
-    int i;
-    fputs("Buffer: ", stderr);
-    for (i = 0; i < blimit; i++) {
-       if ( surfxml_bufferstack[i] == '\377' ) break;
-         putc(surfxml_bufferstack[i], stderr);
-    }
-    putc('\n', stderr);
-}
-
-static void debug_enter(int state, const char* statename) {
-  yy_push_state(state);
-  if (yy_flex_debug) {
-       print_yy_stack("--ENTER(%s) : ",statename);
-       print_surfxml_bufferstack();
-  }
-}
-
-static void debug_leave(void) {
-    if (yy_flex_debug) {
-        print_yy_stack("--LEAVE : ");
-       print_surfxml_bufferstack();
-    }
-  yy_pop_state();
-}
-
-static void debug_set(int state, const char* statename) {
-  BEGIN(state);
-  if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
-}
-#endif
-
-
-static void cleanup(void)
-{
-    if (surfxml_statenames) {
-        free(surfxml_statenames);
-       surfxml_statenames = NULL;
-    }
-    free(surfxml_bufferstack);
-    surfxml_bufferstack = NULL;
-
-    free(indexstack);
-    indexstack = NULL;
-}
-
-
-static int fail(const char* fmt, ...)
-{
-    int chars_left, used;
-    va_list ap; va_start(ap, fmt);
-#ifdef FLEXML_yylineno
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (XML input line %d, state %d): ",
-                  yylineno, YY_START);
-#else
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (state %d): ",
-                  YY_START);
-#endif
-    chars_left = flexml_max_err_msg_size - used - 1;
-    vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
-    va_end(ap);
-
-#ifndef FLEXML_quiet_parser
-    /* print directly to sdterr */
-    fprintf(stderr, "%s\n", flexml_err_msg);
-    flexml_err_msg[0] = '\0';
-#endif
-
-    cleanup();
-
-    return 1;
-}
index bd46602..2fb0493 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,6 +9,7 @@
 #include "surf_private.h"
 #include "xbt/module.h"
 #include "mc/mc.h"
+#include "surf/surf_resource.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
                                 "Logging specific to SURF (kernel)");
@@ -112,73 +113,71 @@ xbt_dynar_t surf_path = NULL;
 
 /* Don't forget to update the option description in smx_config when you change this */
 s_surf_model_description_t surf_network_model_description[] = {
-  {"Constant",
-   "Simplistic network model where all communication take a constant time (one second)",
-   NULL, surf_network_model_init_Constant},
-  {"CM02",
-   "Realistic network model with lmm_solve and no correction factors",
-   NULL, surf_network_model_init_CM02},
   {"LV08",
-   "Realistic network model with lmm_solve and these correction factors: latency*=10.4, bandwidth*=.92, S=8775",
-   NULL, surf_network_model_init_LegrandVelho},
-   {"LV08_im",
-    "Realistic network model with IMPROVED ACTION MANAGEMENT and these correction factors: latency*=10.4, bandwidth*=.92, S=8775",
-    NULL, im_surf_network_model_init_LegrandVelho},
+   "Realistic network analytic model (slow-start modeled by multiplying latency by 10.4, bandwidth by .92; bottleneck sharing uses a payload of S=8775 for evaluating RTT). ",
+   surf_network_model_init_LegrandVelho},
+  {"Constant",
+   "Simplistic network model where all communication take a constant time (one second). This model provides the lowest realism, but is (marginally) faster.",
+   surf_network_model_init_Constant},
   {"SMPI",
-   "Realistic network model with lmm_solve and correction factors on three intervals (< 1KiB, < 64 KiB, >= 64 KiB)",
-   NULL, surf_network_model_init_SMPI},
+   "Realistic network model specifically tailored for HPC settings (accurate modeling of slow start with correction factors on three intervals: < 1KiB, < 64 KiB, >= 64 KiB)",
+   surf_network_model_init_SMPI},
+  {"CM02",
+   "Legacy network analytic model (Very similar to LV08, but without corrective factors. The timings of small messages are thus poorly modeled).",
+   surf_network_model_init_CM02},
 #ifdef HAVE_GTNETS
   {"GTNets",
-   "Network Pseudo-model using the GTNets simulator instead of an analytic model",
-   NULL, surf_network_model_init_GTNETS},
+   "Network pseudo-model using the GTNets simulator instead of an analytic model",
+   surf_network_model_init_GTNETS},
 #endif
 #ifdef HAVE_NS3
   {"NS3",
-   "TODO",
-   NULL, surf_network_model_init_NS3},
+   "Network pseudo-model using the NS3 tcp model instead of an analytic model",
+       surf_network_model_init_NS3},
 #endif
   {"Reno",
-   "Model using lagrange_solve instead of lmm_solve (experts only)", NULL,
+   "Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).",
    surf_network_model_init_Reno},
   {"Reno2",
-   "Model using lagrange_solve instead of lmm_solve (experts only)", NULL,
+   "Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).",
    surf_network_model_init_Reno2},
   {"Vegas",
-   "Model using lagrange_solve instead of lmm_solve (experts only)", NULL,
+   "Model from Steven H. Low using lagrange_solve instead of lmm_solve (experts only; check the code for more info).",
    surf_network_model_init_Vegas},
-  {NULL, NULL, NULL, NULL}      /* this array must be NULL terminated */
+  {NULL, NULL, NULL}      /* this array must be NULL terminated */
 };
 
 s_surf_model_description_t surf_cpu_model_description[] = {
-  {"Cas01_fullupdate", "CPU classical model time=size/power", NULL,
-   surf_cpu_model_init_Cas01},
   {"Cas01",
-   "Variation of Cas01_fullupdate with partial invalidation optimization of lmm system. Should produce the same values, only faster",
-   NULL, surf_cpu_model_init_Cas01_im},
-  {"CpuTI",
-   "Variation of Cas01 with also trace integration. Should produce the same values, only faster if you use availability traces",
-   NULL, surf_cpu_model_init_ti},
-  {NULL, NULL, NULL, NULL}      /* this array must be NULL terminated */
+   "Simplistic CPU model (time=size/power).",
+   surf_cpu_model_init_Cas01},
+  {NULL, NULL,  NULL}      /* this array must be NULL terminated */
 };
 
 s_surf_model_description_t surf_workstation_model_description[] = {
-  {"CLM03",
-   "Default workstation model, using LV08 and CM02 as network and CPU",
-   NULL, surf_workstation_model_init_CLM03, create_workstations},
+  {"default",
+   "Default workstation model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)",
+   surf_workstation_model_init_current_default},
   {"compound",
-   "Workstation model allowing you to use other network and CPU models",
-   NULL, surf_workstation_model_init_compound, create_workstations},
-  {"ptask_L07", "Workstation model with better parallel task modeling",
-   NULL, surf_workstation_model_init_ptask_L07, NULL},
-  {NULL, NULL, NULL, NULL}      /* this array must be NULL terminated */
+   "Workstation model that is automatically chosen if you change the network and CPU models",
+   surf_workstation_model_init_compound},
+  {"ptask_L07", "Workstation model somehow similar to Cas01+CM02 but allowing parallel tasks",
+   surf_workstation_model_init_ptask_L07},
+  {NULL, NULL, NULL}      /* this array must be NULL terminated */
 };
 
-void update_model_description(s_surf_model_description_t * table,
-                              const char *name, surf_model_t model)
-{
-  int i = find_model_description(table, name);
-  table[i].model = model;
-}
+s_surf_model_description_t surf_optimization_mode_description[] = {
+  {"Lazy",
+   "Lazy action management (partial invalidation in lmm + heap in action remaining).",
+   NULL},
+  {"TI",
+   "Trace integration. Highly optimized mode when using availability traces (only available for the Cas01 CPU model for now).",
+    NULL},
+  {"Full",
+   "Full update of remaining and variables. Slow but may be useful when debugging.",
+   NULL},
+  {NULL, NULL, NULL}      /* this array must be NULL terminated */
+};
 
 /** Displays the long description of all registered models, and quit */
 void model_help(const char *category, s_surf_model_description_t * table)
@@ -204,7 +203,7 @@ int find_model_description(s_surf_model_description_t * table,
   for (i = 1; table[i].name; i++) {
     name_list =
         xbt_realloc(name_list,
-                    strlen(name_list) + strlen(table[i].name) + 2);
+                    strlen(name_list) + strlen(table[i].name) + 3);
     strcat(name_list, ", ");
     strcat(name_list, table[i].name);
   }
@@ -222,7 +221,6 @@ double generic_maxmin_share_resources(xbt_swag_t running_actions,
   double value = -1;
 #define VARIABLE(action) (*((lmm_variable_t*)(((char *) (action)) + (offset))))
 
-  xbt_assert(solve, "Give me a real solver function!");
   solve(sys);
 
   xbt_swag_foreach(action, running_actions) {
@@ -373,6 +371,7 @@ void surf_exit(void)
   xbt_dynar_foreach(model_list, iter, model)
       model->model_private->finalize();
   xbt_dynar_free(&model_list);
+  routing_exit();
 
   if (maxmin_system) {
     lmm_system_free(maxmin_system);
@@ -384,13 +383,13 @@ void surf_exit(void)
   }
   surf_action_exit();
 
-  if (surf_path)
-    xbt_dynar_free(&surf_path);
+  xbt_dynar_free(&surf_path);
 
   xbt_lib_free(&host_lib);
   xbt_lib_free(&link_lib);
   xbt_lib_free(&as_router_lib);
 
+
   tmgr_finalize();
   surf_parse_lex_destroy();
   surf_parse_free_callbacks();
@@ -440,23 +439,48 @@ double surf_solve(double max_date)
     min = max_date - NOW;
   }
 
-  XBT_DEBUG("Looking for next action end");
+  XBT_DEBUG("Looking for next action end for all models except NS3");
   xbt_dynar_foreach(model_list, iter, model) {
-    XBT_DEBUG("Running for Resource [%s]", model->name);
-    model_next_action_end = model->model_private->share_resources(NOW);
-    XBT_DEBUG("Resource [%s] : next action end = %f",
-           model->name, model_next_action_end);
-    if (((min < 0.0) || (model_next_action_end < min))
-        && (model_next_action_end >= 0.0))
-      min = model_next_action_end;
+    if(strcmp(model->name,"network NS3") ){
+      XBT_DEBUG("Running for Resource [%s]", model->name);
+      model_next_action_end = model->model_private->share_resources(NOW);
+      XBT_DEBUG("Resource [%s] : next action end = %f",
+          model->name, model_next_action_end);
+      if (((min < 0.0) || (model_next_action_end < min))
+          && (model_next_action_end >= 0.0))
+        min = model_next_action_end;
+    }
   }
-  XBT_DEBUG("Next action end : %f", min);
 
-  XBT_DEBUG("Looking for next event");
-  while ((next_event_date = tmgr_history_next_date(history)) != -1.0) {
+  XBT_DEBUG("Min for resources (except NS3) : %f", min);
+
+  XBT_DEBUG("Looking for next trace event");
+
+  do {
     XBT_DEBUG("Next TRACE event : %f", next_event_date);
-    if ((min != -1.0) && (next_event_date > NOW + min))
-      break;
+
+    next_event_date = tmgr_history_next_date(history);
+
+    if(surf_network_model->name && !strcmp(surf_network_model->name,"network NS3")){
+      if(next_event_date!=-1.0 && min!=-1.0) {
+        min = MIN(next_event_date - NOW, min);
+      } else{
+        min = MAX(next_event_date - NOW, min);
+      }
+
+      XBT_DEBUG("Run for NS3 at most %f", min);
+      // run until min or next flow
+      model_next_action_end = surf_network_model->model_private->share_resources(min);
+
+      XBT_DEBUG("Min for NS3 : %f", model_next_action_end);
+      if(model_next_action_end>=0.0)
+        min = model_next_action_end;
+    }
+
+    if (next_event_date == -1.0) break;
+
+    if ((min != -1.0) && (next_event_date > NOW + min)) break;
+
     XBT_DEBUG("Updating models");
     while ((event =
             tmgr_history_get_next_event_leq(history, next_event_date,
@@ -476,8 +500,7 @@ double surf_solve(double max_date)
                                                             event, value,
                                                             NOW + min);
     }
-  }
-
+  } while (1);
 
   /* FIXME: Moved this test to here to avoid stoping simulation if there are actions running on cpus and all cpus are with availability = 0. 
    * This may cause an infinite loop if one cpu has a trace with periodicity = 0 and the other a trace with periodicity > 0.
index ea4317b..49a22ff 100644 (file)
@@ -27,7 +27,7 @@ const char *surf_action_state_names[6] = {
 static xbt_mallocator_t action_mallocator = NULL;
 static int action_mallocator_allocated_size = 0;
 static void* surf_action_mallocator_new_f(void);
-static void surf_action_mallocator_free_f(void* action);
+#define surf_action_mallocator_free_f xbt_free_f
 static void surf_action_mallocator_reset_f(void* action);
 
 /**
@@ -55,10 +55,6 @@ static void* surf_action_mallocator_new_f(void) {
   return xbt_malloc(action_mallocator_allocated_size);
 }
 
-static void surf_action_mallocator_free_f(void* action) {
-  xbt_free(action);
-}
-
 static void surf_action_mallocator_reset_f(void* action) {
   memset(action, 0, action_mallocator_allocated_size);
 }
index fbbfc7a..0005033 100644 (file)
@@ -37,24 +37,24 @@ static void surf_config_cmd_line(int *argc, char **argv)
       printf
           ("Description of the configuration accepted by this simulator:\n");
       xbt_cfg_help(_surf_cfg_set);
-      printf
-          ("\nYou can also use --help-models to see the details of all models known by this simulator.\n");
+      printf("\nYou can also use --help-models to see the details of all models known by this simulator.\n");
 #ifdef HAVE_TRACING
-      printf
-          ("\nYou can also use --help-tracing to see the details of all tracing options known by this simulator.\n");
+      printf("\nYou can also use --help-tracing to see the details of all tracing options known by this simulator.\n");
 #endif
       exit(0);
-    } else
-        if (!strncmp
-            (argv[i], "--help-models", strlen("--help-models") + 1)) {
+    } else if (!strncmp(argv[i], "--help-models", strlen("--help-models") + 1)) {
       model_help("workstation", surf_workstation_model_description);
+      printf("\n");
       model_help("CPU", surf_cpu_model_description);
+      printf("\n");
       model_help("network", surf_network_model_description);
+      printf("\nLong description of all optimization levels accepted by the models of this simulator:\n");
+      for (i = 0; surf_optimization_mode_description[i].name; i++)
+        printf("  %s: %s\n", surf_optimization_mode_description[i].name, surf_optimization_mode_description[i].description);
+      printf("Both network and CPU models have 'Lazy' as default optimization level\n");
       exit(0);
 #ifdef HAVE_TRACING
-    }else
-        if (!strncmp
-            (argv[i], "--help-tracing", strlen("--help-tracing") + 1)) {
+    } else if (!strncmp(argv[i], "--help-tracing", strlen("--help-tracing") + 1)) {
       TRACE_help (1);
       exit(0);
 #endif
@@ -114,6 +114,25 @@ static void _surf_cfg_cb__cpu_model(const char *name, int pos)
   find_model_description(surf_cpu_model_description, val);
 }
 
+/* callback of the cpu/model variable */
+static void _surf_cfg_cb__optimization_mode(const char *name, int pos)
+{
+  char *val;
+
+  xbt_assert(_surf_init_status < 2,
+              "Cannot change the model after the initialization");
+
+  val = xbt_cfg_get_string(_surf_cfg_set, name);
+
+  if (!strcmp(val, "help")) {
+    model_help("optimization", surf_optimization_mode_description);
+    exit(0);
+  }
+
+  /* New Module missing */
+  find_model_description(surf_optimization_mode_description, val);
+}
+
 /* callback of the workstation_model variable */
 static void _surf_cfg_cb__network_model(const char *name, int pos)
 {
@@ -165,12 +184,6 @@ static void _surf_cfg_cb__weight_S(const char *name, int pos)
   sg_weight_S_parameter = xbt_cfg_get_double(_surf_cfg_set, name);
 }
 
-static void _surf_cfg_cb__surf_maxmin_selective_update(const char *name,
-                                                       int pos)
-{
-  sg_maxmin_selective_update = xbt_cfg_get_int(_surf_cfg_set, name);
-}
-
 /* callback of the inclusion path */
 static void _surf_cfg_cb__surf_path(const char *name, int pos)
 {
@@ -221,6 +234,24 @@ static void _surf_cfg_cb_contexts_parallel_threshold(const char *name, int pos)
   SIMIX_context_set_parallel_threshold(xbt_cfg_get_int(_surf_cfg_set, name));
 }
 
+static void _surf_cfg_cb_contexts_parallel_mode(const char *name, int pos)
+{
+  const char* mode_name = xbt_cfg_get_string(_surf_cfg_set, name);
+  if (!strcmp(mode_name, "posix")) {
+    SIMIX_context_set_parallel_mode(XBT_PARMAP_POSIX);
+  }
+  else if (!strcmp(mode_name, "futex")) {
+    SIMIX_context_set_parallel_mode(XBT_PARMAP_FUTEX);
+  }
+  else if (!strcmp(mode_name, "busy_wait")) {
+    SIMIX_context_set_parallel_mode(XBT_PARMAP_BUSY_WAIT);
+  }
+  else {
+    XBT_WARN("Command line setting of the parallel synchronization mode should "
+        "be one of \"posix\", \"futex\" or \"busy_wait\"");
+  }
+}
+
 static void _surf_cfg_cb__surf_network_coordinates(const char *name,
                                                    int pos)
 {
@@ -232,16 +263,16 @@ static void _surf_cfg_cb__surf_network_coordinates(const char *name,
     }
   } else if (!strcmp(val, "no")) {
     if (COORD_HOST_LEVEL)
-      XBT_WARN("Cannot disable CMD prop coordinates, once set.");
+      xbt_die("Setting of whether to use coordinate cannot be disabled once set.");
   } else {
-    XBT_WARN("Setting CMD prop coordinates must be \"yes\" or \"no\"");
+    xbt_die("Command line setting of whether to use coordinates must be either \"yes\" or \"no\"");
   }
 }
 
-static void _surf_cfg_cb__surf_network_fullduplex(const char *name,
+static void _surf_cfg_cb__surf_network_crosstraffic(const char *name,
                                                   int pos)
 {
-  sg_network_fullduplex = xbt_cfg_get_int(_surf_cfg_set, name);
+  sg_network_crosstraffic = xbt_cfg_get_int(_surf_cfg_set, name);
 }
 
 #ifdef HAVE_GTNETS
@@ -279,10 +310,22 @@ void surf_config_init(int *argc, char **argv)
     sprintf(p,
             ".\n       (use 'help' as a value to see the long description of each model)");
     default_value = xbt_strdup("Cas01");
-    xbt_cfg_register(&_surf_cfg_set,
-                     "cpu/model", description, xbt_cfgelm_string,
+    xbt_cfg_register(&_surf_cfg_set, "cpu/model", description, xbt_cfgelm_string,
                      &default_value, 1, 1, &_surf_cfg_cb__cpu_model, NULL);
 
+    sprintf(description,
+            "The optimization modes to use for the CPU. Possible values: ");
+    p = description;
+    while (*(++p) != '\0');
+    for (i = 0; surf_optimization_mode_description[i].name; i++)
+      p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
+                   surf_optimization_mode_description[i].name);
+    sprintf(p,
+            ".\n       (use 'help' as a value to see the long description of each optimization mode)");
+    default_value = xbt_strdup("Lazy");
+    xbt_cfg_register(&_surf_cfg_set, "cpu/optim", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_surf_cfg_cb__optimization_mode, NULL);
+
     sprintf(description,
             "The model to use for the network. Possible values: ");
     p = description;
@@ -293,11 +336,23 @@ void surf_config_init(int *argc, char **argv)
     sprintf(p,
             ".\n       (use 'help' as a value to see the long description of each model)");
     default_value = xbt_strdup("LV08");
-    xbt_cfg_register(&_surf_cfg_set,
-                     "network/model", description, xbt_cfgelm_string,
+    xbt_cfg_register(&_surf_cfg_set, "network/model", description, xbt_cfgelm_string,
                      &default_value, 1, 1, &_surf_cfg_cb__network_model,
                      NULL);
 
+    sprintf(description,
+            "The optimization modes to use for the network. Possible values: ");
+    p = description;
+    while (*(++p) != '\0');
+    for (i = 0; surf_optimization_mode_description[i].name; i++)
+      p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
+                   surf_optimization_mode_description[i].name);
+    sprintf(p,
+            ".\n       (use 'help' as a value to see the long description of each optimization mode)");
+    default_value = xbt_strdup("Lazy");
+    xbt_cfg_register(&_surf_cfg_set, "network/optim", description, xbt_cfgelm_string,
+                     &default_value, 1, 1, &_surf_cfg_cb__optimization_mode, NULL);
+
     sprintf(description,
             "The model to use for the workstation. Possible values: ");
     p = description;
@@ -307,27 +362,21 @@ void surf_config_init(int *argc, char **argv)
                    surf_workstation_model_description[i].name);
     sprintf(p,
             ".\n       (use 'help' as a value to see the long description of each model)");
-    default_value = xbt_strdup("CLM03");
-    xbt_cfg_register(&_surf_cfg_set,
-                     "workstation/model", description, xbt_cfgelm_string,
+    default_value = xbt_strdup("default");
+    xbt_cfg_register(&_surf_cfg_set, "workstation/model", description, xbt_cfgelm_string,
                      &default_value, 1, 1,
                      &_surf_cfg_cb__workstation_model, NULL);
 
     xbt_free(description);
 
-    default_value = xbt_strdup("Full");
-    xbt_cfg_register(&_surf_cfg_set, "routing",
-                     "Model to use to store the routing information",
-                     xbt_cfgelm_string, &default_value, 1, 1, NULL, NULL);
-
-    xbt_cfg_register(&_surf_cfg_set, "TCP_gamma",
+    xbt_cfg_register(&_surf_cfg_set, "network/TCP_gamma",
                      "Size of the biggest TCP window (cat /proc/sys/net/ipv4/tcp_[rw]mem for recv/send window; Use the last given value, which is the max window size)",
                      xbt_cfgelm_double, NULL, 1, 1,
                      _surf_cfg_cb__tcp_gamma, NULL);
-    xbt_cfg_setdefault_double(_surf_cfg_set, "TCP_gamma", 20000.0);
+    xbt_cfg_setdefault_double(_surf_cfg_set, "network/TCP_gamma", 20000.0);
 
     xbt_cfg_register(&_surf_cfg_set, "maxmin/precision",
-                     "Minimum retained action value when updating simulation",
+                     "Numerical precision used when updating simulation models (epsilon in double comparisons)",
                      xbt_cfgelm_double, NULL, 1, 1, _surf_cfg_cb__maxmin_precision, NULL);
     xbt_cfg_setdefault_double(_surf_cfg_set, "maxmin/precision", 0.00001); // FIXME use setdefault everywhere here!
 
@@ -362,10 +411,15 @@ void surf_config_init(int *argc, char **argv)
                      _surf_cfg_cb__surf_path, NULL);
 
     default_value_int = 0;
-    xbt_cfg_register(&_surf_cfg_set, "maxmin_selective_update",
-                     "Update the constraint set propagating recursively to others constraints",
+    xbt_cfg_register(&_surf_cfg_set, "cpu/maxmin_selective_update",
+                     "Update the constraint set propagating recursively to others constraints (1 by default when optim is set to lazy)",
+                     xbt_cfgelm_int, &default_value_int, 0, 1,
+                     NULL, NULL);
+    default_value_int = 0;
+    xbt_cfg_register(&_surf_cfg_set, "network/maxmin_selective_update",
+                     "Update the constraint set propagating recursively to others constraints (1 by default when optim is set to lazy)",
                      xbt_cfgelm_int, &default_value_int, 0, 1,
-                     _surf_cfg_cb__surf_maxmin_selective_update, NULL);
+                     NULL, NULL);
 
     /* do model-check */
     default_value_int = 0;
@@ -381,7 +435,7 @@ void surf_config_init(int *argc, char **argv)
        xbt_cfg_set_int(_surf_cfg_set, "model-check", default_value_int); */
 
     /* do verbose-exit */
-    default_value_int = 0;
+    default_value_int = 1;
     xbt_cfg_register(&_surf_cfg_set, "verbose-exit",
                      "Activate the \"do nothing\" mode in Ctrl-C",
                      xbt_cfgelm_int, &default_value_int, 0, 1,
@@ -397,52 +451,65 @@ void surf_config_init(int *argc, char **argv)
     /* stack size of contexts in Ko */
     default_value_int = 128;
     xbt_cfg_register(&_surf_cfg_set, "contexts/stack_size",
-                     "Stack size of contexts in Ko (ucontext or raw only)",
+                     "Stack size of contexts in Kib (ucontext or raw only)",
                      xbt_cfgelm_int, &default_value_int, 1, 1,
                      _surf_cfg_cb_context_stack_size, NULL);
 
     /* number of parallel threads for user processes */
     default_value_int = 1;
     xbt_cfg_register(&_surf_cfg_set, "contexts/nthreads",
-                     "Number of parallel threads for user contexts (EXPERIMENTAL)",
+                     "Number of parallel threads used to execute user contexts",
                      xbt_cfgelm_int, &default_value_int, 1, 1,
                      _surf_cfg_cb_contexts_nthreads, NULL);
 
     /* minimal number of user contexts to be run in parallel */
-    default_value_int = 1;
+    default_value_int = 2;
     xbt_cfg_register(&_surf_cfg_set, "contexts/parallel_threshold",
-        "Minimal number of user contexts to be run in parallel",
+        "Minimal number of user contexts to be run in parallel (raw contexts only)",
         xbt_cfgelm_int, &default_value_int, 1, 1,
         _surf_cfg_cb_contexts_parallel_threshold, NULL);
 
+    /* minimal number of user contexts to be run in parallel */
+    default_value = xbt_strdup("futex");
+    xbt_cfg_register(&_surf_cfg_set, "contexts/synchro",
+        "Synchronization mode to use when running contexts in parallel (either futex, posix or busy_wait)",
+        xbt_cfgelm_string, &default_value, 1, 1,
+        _surf_cfg_cb_contexts_parallel_mode, NULL);
+
     default_value = xbt_strdup("no");
-    xbt_cfg_register(&_surf_cfg_set, "coordinates",
-                     "\"yes\" or \"no\" (FIXME: document)",
+    xbt_cfg_register(&_surf_cfg_set, "network/coordinates",
+                     "\"yes\" or \"no\", specifying whether we use a coordinate-based routing (as Vivaldi)",
                      xbt_cfgelm_string, &default_value, 1, 1,
                      _surf_cfg_cb__surf_network_coordinates, NULL);
-    xbt_cfg_setdefault_string(_surf_cfg_set, "coordinates", default_value);
+    xbt_cfg_setdefault_string(_surf_cfg_set, "network/coordinates", default_value);
 
     default_value_int = 0;
-    xbt_cfg_register(&_surf_cfg_set, "fullduplex",
-                     "Activate the interferences between uploads and downloads for fluid max-min models (LV08, CM03)",
+    xbt_cfg_register(&_surf_cfg_set, "network/crosstraffic",
+                     "Activate the interferences between uploads and downloads for fluid max-min models (LV08, CM02)",
                      xbt_cfgelm_int, &default_value_int, 0, 1,
-                     _surf_cfg_cb__surf_network_fullduplex, NULL);
-    xbt_cfg_setdefault_int(_surf_cfg_set, "fullduplex", default_value_int);
+                     _surf_cfg_cb__surf_network_crosstraffic, NULL);
+    xbt_cfg_setdefault_int(_surf_cfg_set, "network/crosstraffic", default_value_int);
 
 #ifdef HAVE_GTNETS
-    xbt_cfg_register(&_surf_cfg_set, "gtnets_jitter",
+    xbt_cfg_register(&_surf_cfg_set, "gtnets/jitter",
                      "Double value to oscillate the link latency, uniformly in random interval [-latency*gtnets_jitter,latency*gtnets_jitter)",
                      xbt_cfgelm_double, NULL, 1, 1,
                      _surf_cfg_cb__gtnets_jitter, NULL);
     xbt_cfg_setdefault_double(_surf_cfg_set, "gtnets_jitter", 0.0);
 
     default_value_int = 10;
-    xbt_cfg_register(&_surf_cfg_set, "gtnets_jitter_seed",
+    xbt_cfg_register(&_surf_cfg_set, "gtnets/jitter_seed",
                      "Use a positive seed to reproduce jitted results, value must be in [1,1e8], default is 10",
                      xbt_cfgelm_int, &default_value_int, 0, 1,
                      _surf_cfg_cb__gtnets_jitter_seed, NULL);
 #endif
-
+#ifdef HAVE_NS3
+    xbt_cfg_register(&_surf_cfg_set, "ns3/TcpModel",
+                     "The ns3 tcp model can be : NewReno or Reno or Tahoe",
+                     xbt_cfgelm_string, NULL, 1, 1,
+                     NULL, NULL);
+    xbt_cfg_setdefault_string(_surf_cfg_set, "ns3/TcpModel", "default");
+#endif
     if (!surf_path) {
       /* retrieves the current directory of the        current process */
       const char *initial_path = __surf_get_initial_path();
@@ -469,7 +536,8 @@ void surf_config_finalize(void)
   _surf_init_status = 0;
 }
 
-void surf_config_models_setup(const char *platform_file)
+/* Pick the right models for CPU, net and workstation, and call their model_init_preparse */
+void surf_config_models_setup()
 {
   char *workstation_model_name;
   int workstation_id = -1;
@@ -517,25 +585,10 @@ void surf_config_models_setup(const char *platform_file)
     cpu_id =
         find_model_description(surf_cpu_model_description, cpu_model_name);
 
-    surf_cpu_model_description[cpu_id].model_init_preparse(platform_file);
-    surf_network_model_description[network_id].model_init_preparse
-        (platform_file);
+    surf_cpu_model_description[cpu_id].model_init_preparse();
+    surf_network_model_description[network_id].model_init_preparse();
   }
 
   XBT_DEBUG("Call workstation_model_init");
-  surf_workstation_model_description[workstation_id].model_init_preparse
-      (platform_file);
-}
-
-void surf_config_models_create_elms(void)
-{
-  char *workstation_model_name =
-      xbt_cfg_get_string(_surf_cfg_set, "workstation/model");
-  int workstation_id =
-      find_model_description(surf_workstation_model_description,
-                             workstation_model_name);
-  if (surf_workstation_model_description
-      [workstation_id].model_init_postparse != NULL)
-    surf_workstation_model_description[workstation_id].model_init_postparse
-        ();
+  surf_workstation_model_description[workstation_id].model_init_preparse();
 }
index 028b732..3b7a960 100644 (file)
@@ -16,6 +16,7 @@ static void void_die_impossible_paction(surf_action_t action)
 static int int_die_impossible_paction(surf_action_t action)
 {
   DIE_IMPOSSIBLE;
+  return -1;
 }
 
 /** @brief initialize common datastructures to all models */
index 2ff3793..25731a2 100644 (file)
 #include "surf/maxmin.h"
 #include "surf/trace_mgr.h"
 #include "xbt/log.h"
-#include "surf/surfxml_parse_private.h"
+#include "surf/surfxml_parse.h"
 #include "surf/random_mgr.h"
 #include "instr/instr_private.h"
+#include "surf/surfxml_parse_values.h"
 
 #define NO_MAX_DURATION -1.0
 
+typedef enum {
+  UM_FULL,
+  UM_LAZY,
+  UM_UNDEFINED,
+} e_UM_t;
+
 /* user-visible parameters */
 extern double sg_tcp_gamma;
 extern double sg_sender_gap;
@@ -23,7 +30,7 @@ extern double sg_latency_factor;
 extern double sg_bandwidth_factor;
 extern double sg_weight_S_parameter;
 extern int sg_maxmin_selective_update;
-extern int sg_network_fullduplex;
+extern int sg_network_crosstraffic;
 #ifdef HAVE_GTNETS
 extern double sg_gtnets_jitter;
 extern int sg_gtnets_jitter_seed;
@@ -89,7 +96,7 @@ const char *__surf_get_initial_path(void);
 int __surf_is_absolute_file_path(const char *file_path);
 
 /*
- * One link routing list
+ * Link of lenght 1, alongside with its source and destination. This is mainly usefull in the bindings to gtnets and ns3
  */
 typedef struct s_onelink {
   char *src;
@@ -100,107 +107,87 @@ typedef struct s_onelink {
 /**
  * Routing logic
  */
+typedef struct s_as *AS_t;
 
 typedef struct s_model_type {
   const char *name;
   const char *desc;
-  void *(*create) ();
-  void (*load) ();
-  void (*unload) ();
-  void (*end) ();
-} s_model_type_t, *model_type_t;
+  AS_t (*create) ();
+  void (*end) (AS_t as);
+} s_routing_model_description_t, *routing_model_description_t;
 
 typedef struct s_route {
   xbt_dynar_t link_list;
-} s_route_t, *route_t;
-
-typedef struct s_name_route {
-  xbt_dynar_t link_name_list;
-} s_name_route_t, *name_route_t;
-
-typedef struct s_name_route_extended {
-  s_route_t generic_route;
-  char *src_gateway;
-  char *dst_gateway;
-} s_name_route_extended_t, *name_route_extended_t;
-
-typedef struct s_route_limits {
-  char *src_gateway;
-  char *dst_gateway;
-} s_route_limits_t, *route_limits_t;
-
-typedef struct s_route_extended {
-  s_route_t generic_route;
   char *src_gateway;
   char *dst_gateway;
-} s_route_extended_t, *route_extended_t;
+} s_route_t, *route_t;
 
 /* This enum used in the routing structure helps knowing in which situation we are. */
 typedef enum {
-  SURF_ROUTING_NULL = 0,   /**< Indefined type                                   */
+  SURF_ROUTING_NULL = 0,   /**< Undefined type                                   */
   SURF_ROUTING_BASE,       /**< Base case: use simple link lists for routing     */
   SURF_ROUTING_RECURSIVE   /**< Recursive case: also return gateway informations */
 } e_surf_routing_hierarchy_t;
 
-typedef struct s_routing_component *routing_component_t;
-typedef struct s_routing_component {
+typedef struct s_as {
   xbt_dict_t to_index;                 /* char* -> network_element_t */
   xbt_dict_t bypassRoutes;             /* store bypass routes */
-  model_type_t routing;
+  routing_model_description_t model_desc;
   e_surf_routing_hierarchy_t hierarchy;
   char *name;
-  struct s_routing_component *routing_father;
+  struct s_as *routing_father;
   xbt_dict_t routing_sons;
-   route_extended_t(*get_route) (routing_component_t rc, const char *src,
-                                 const char *dst);
-   double(*get_latency) (routing_component_t rc, const char *src,
-                                 const char *dst, route_extended_t e_route);
-   xbt_dynar_t(*get_onelink_routes) (routing_component_t rc);
-   e_surf_network_element_type_t(*get_network_element_type) (const char
-                                                             *name);
-   route_extended_t(*get_bypass_route) (routing_component_t rc,
-                                        const char *src, const char *dst);
-  void (*finalize) (routing_component_t rc);
-  void (*set_processing_unit) (routing_component_t rc, const char *name);
-  void (*set_autonomous_system) (routing_component_t rc, const char *name);
-  void (*set_route) (routing_component_t rc, const char *src,
-                     const char *dst, name_route_extended_t route);
-  void (*set_ASroute) (routing_component_t rc, const char *src,
-                       const char *dst, name_route_extended_t route);
-  void (*set_bypassroute) (routing_component_t rc, const char *src,
-                           const char *dst, route_extended_t e_route);
-} s_routing_component_t;
+
+  void (*get_route_and_latency) (AS_t as, const char *src, const char *dst, route_t into, double *latency);
+
+  xbt_dynar_t(*get_onelink_routes) (AS_t as);
+  route_t(*get_bypass_route) (AS_t as, const char *src, const char *dst);
+  void (*finalize) (AS_t as);
+
+
+  /* The parser calls the following functions to inform the routing models
+   * that a new element is added to the AS currently built.
+   *
+   * Of course, only the routing model of this AS is informed, not every ones */
+  void (*parse_PU) (AS_t as, const char *name); /* A host or a router, whatever */
+  void (*parse_AS) (AS_t as, const char *name);
+  void (*parse_route) (AS_t as, const char *src,
+                     const char *dst, route_t route);
+  void (*parse_ASroute) (AS_t as, const char *src,
+                       const char *dst, route_t route);
+  void (*parse_bypassroute) (AS_t as, const char *src,
+                           const char *dst, route_t e_route);
+} s_as_t;
 
 typedef struct s_network_element_info {
-  routing_component_t rc_component;
+  AS_t rc_component;
   e_surf_network_element_type_t rc_type;
 } s_network_element_info_t, *network_element_info_t;
 
 typedef int *network_element_t;
 
 struct s_routing_global {
-  routing_component_t root;
+  AS_t root;
   void *loopback;
   size_t size_of_link;
-  xbt_dynar_t(*get_route) (const char *src, const char *dst);
-  xbt_dynar_t(*get_route_no_cleanup) (const char *src, const char *dst);
-  xbt_dynar_t(*get_onelink_routes) (void);
-  double (*get_latency) (const char *src, const char *dst);
-  void (*get_route_latency)(const char *src, const char *dst,
-                            xbt_dynar_t *route, double *latency, int cleanup);
-  e_surf_network_element_type_t(*get_network_element_type) (const char *name);
-  void (*finalize) (void);
   xbt_dynar_t last_route;
+  xbt_dynar_t(*get_onelink_routes) (void);
 };
 
-XBT_PUBLIC(void) routing_model_create(size_t size_of_link, void *loopback, double_f_cpvoid_t get_link_latency_fun);
+XBT_PUBLIC(void) routing_model_create(size_t size_of_link, void *loopback);
+XBT_PUBLIC(void) routing_exit(void);
+XBT_PUBLIC(void) routing_register_callbacks(void);
+XBT_PUBLIC(void) generic_free_route(route_t route); // FIXME rename to routing_route_free
+ // FIXME: make previous function private to routing again?
+
 
-XBT_PUBLIC(void) routing_parse_Scluster(void);       /* cluster bypass */
+XBT_PUBLIC(void) routing_get_route_and_latency(const char *src, const char *dst,
+                              xbt_dynar_t * route, double *latency);
 
 /**
  * Resource protected methods
  */
-xbt_dict_t surf_resource_properties(const void *resource);
+static XBT_INLINE xbt_dict_t surf_resource_properties(const void *resource);
 
 XBT_PUBLIC(void) surfxml_bufferstack_push(int new);
 XBT_PUBLIC(void) surfxml_bufferstack_pop(int new);
index 2f2c375..1d11084 100644 (file)
@@ -1,62 +1,56 @@
-/* Copyright (c) 2009, 2010. The SimGrid Team. 
+/* Copyright (c) 2009, 2010, 2011. 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. */
 
-#ifdef HAVE_PCRE_LIB
 #include <pcre.h>               /* regular expression library */
-#endif
+
+#include "simgrid/platf_interface.h"    // platform creation API internal interface
+
 #include "surf_routing_private.h"
 #include "surf/surf_routing.h"
+#include "surf/surfxml_parse_values.h"
 
 xbt_lib_t host_lib;
-int ROUTING_HOST_LEVEL; //Routing level
-int    SURF_CPU_LEVEL;         //Surf cpu level
-int SURF_WKS_LEVEL;            //Surf workstation level
-int SIMIX_HOST_LEVEL;  //Simix level
-int    MSG_HOST_LEVEL;         //Msg level
-int    SD_HOST_LEVEL;          //Simdag level
-int    COORD_HOST_LEVEL;       //Coordinates level
-int NS3_HOST_LEVEL;            //host node for ns3
+int ROUTING_HOST_LEVEL;         //Routing level
+int SURF_CPU_LEVEL;             //Surf cpu level
+int SURF_WKS_LEVEL;             //Surf workstation level
+int SIMIX_HOST_LEVEL;           //Simix level
+int MSG_HOST_LEVEL;             //Msg level
+int SD_HOST_LEVEL;              //Simdag level
+int COORD_HOST_LEVEL=0;         //Coordinates level
+int NS3_HOST_LEVEL;             //host node for ns3
 
 xbt_lib_t link_lib;
-int SD_LINK_LEVEL;             //Simdag level
-int SURF_LINK_LEVEL;   //Surf level
-int NS3_LINK_LEVEL;            //link for ns3
+int SD_LINK_LEVEL;              //Simdag level
+int SURF_LINK_LEVEL;            //Surf level
+int NS3_LINK_LEVEL;             //link for ns3
 
 xbt_lib_t as_router_lib;
-int ROUTING_ASR_LEVEL; //Routing level
-int COORD_ASR_LEVEL;   //Coordinates level
-int NS3_ASR_LEVEL;             //host node for ns3
+int ROUTING_ASR_LEVEL;          //Routing level
+int COORD_ASR_LEVEL;            //Coordinates level
+int NS3_ASR_LEVEL;              //host node for ns3
 
-static xbt_dict_t patterns = NULL;
 static xbt_dict_t random_value = NULL;
 
 /* Global vars */
 routing_global_t global_routing = NULL;
-routing_component_t current_routing = NULL;
-model_type_t current_routing_model = NULL;
+AS_t current_routing = NULL;
 
 /* global parse functions */
-xbt_dynar_t link_list = NULL;    /* temporary store of current list link of a route */
-static const char *src = NULL;        /* temporary store the source name of a route */
-static const char *dst = NULL;        /* temporary store the destination name of a route */
+xbt_dynar_t parsed_link_list = NULL;   /* temporary store of current list link of a route */
+static const char *src = NULL;  /* temporary store the source name of a route */
+static const char *dst = NULL;  /* temporary store the destination name of a route */
 static char *gw_src = NULL;     /* temporary store the gateway source name of a route */
 static char *gw_dst = NULL;     /* temporary store the gateway destination name of a route */
-static double_f_cpvoid_t get_link_latency = NULL;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 
-static void routing_parse_Speer(void);          /* peer bypass */
+static void routing_parse_peer(sg_platf_peer_cbarg_t peer);     /* peer bypass */
 static void routing_parse_Srandom(void);        /* random bypass */
-static void routing_parse_Erandom(void);        /* random bypass */
-
-static void routing_parse_Sconfig(void);        /* config Tag */
-static void routing_parse_Econfig(void);        /* config Tag */
 
-static char* replace_random_parameter(char * chaine);
-static void clean_dict_random(void);
+static void routing_parse_postparse(void);
 
 /* this lines are only for replace use like index in the model table */
 typedef enum {
@@ -65,230 +59,132 @@ typedef enum {
   SURF_MODEL_DIJKSTRA,
   SURF_MODEL_DIJKSTRACACHE,
   SURF_MODEL_NONE,
-#ifdef HAVE_PCRE_LIB
-  SURF_MODEL_RULEBASED
-#endif
+  SURF_MODEL_RULEBASED,
+  SURF_MODEL_VIVALDI,
+  SURF_MODEL_CLUSTER
 } e_routing_types;
 
-struct s_model_type routing_models[] = { {"Full",
-                                          "Full routing data (fast, large memory requirements, fully expressive)",
-                                          model_full_create,
-                                          model_full_load,
-                                          model_full_unload,
-                                          model_full_end},
-{"Floyd",
- "Floyd routing data (slow initialization, fast lookup, lesser memory requirements, shortest path routing only)",
- model_floyd_create, model_floyd_load, model_floyd_unload,
- model_floyd_end},
-{"Dijkstra",
- "Dijkstra routing data (fast initialization, slow lookup, small memory requirements, shortest path routing only)",
- model_dijkstra_create, model_dijkstra_both_load,
- model_dijkstra_both_unload, model_dijkstra_both_end},
-{"DijkstraCache",
- "Dijkstra routing data (fast initialization, fast lookup, small memory requirements, shortest path routing only)",
- model_dijkstracache_create, model_dijkstra_both_load,
- model_dijkstra_both_unload, model_dijkstra_both_end},
-{"none", "No routing (usable with Constant network only)",
- model_none_create, model_none_load, model_none_unload, model_none_end},
-#ifdef HAVE_PCRE_LIB
-{"RuleBased", "Rule-Based routing data (...)", model_rulebased_create,
- model_rulebased_load, model_rulebased_unload, model_rulebased_end},
-{"Vivaldi", "Vivaldi routing", model_rulebased_create,
-  model_rulebased_load, model_rulebased_unload, model_rulebased_end},
-#endif
-{NULL, NULL, NULL, NULL, NULL, NULL}
+struct s_model_type routing_models[] = {
+  {"Full",
+   "Full routing data (fast, large memory requirements, fully expressive)",
+   model_full_create, model_full_end},
+  {"Floyd",
+   "Floyd routing data (slow initialization, fast lookup, lesser memory requirements, shortest path routing only)",
+   model_floyd_create, model_floyd_end},
+  {"Dijkstra",
+   "Dijkstra routing data (fast initialization, slow lookup, small memory requirements, shortest path routing only)",
+   model_dijkstra_create, model_dijkstra_both_end},
+  {"DijkstraCache",
+   "Dijkstra routing data (fast initialization, fast lookup, small memory requirements, shortest path routing only)",
+   model_dijkstracache_create, model_dijkstra_both_end},
+  {"none", "No routing (usable with Constant network only)",
+   model_none_create,  NULL},
+  {"RuleBased", "Rule-Based routing data (...)",
+   model_rulebased_create, NULL},
+  {"Vivaldi", "Vivaldi routing",
+   model_vivaldi_create, NULL},
+  {"Cluster", "Cluster routing",
+   model_cluster_create, NULL},
+  {NULL, NULL, NULL, NULL}
 };
 
-static double euclidean_dist_comp(int index, xbt_dynar_t src, xbt_dynar_t dst)
-{
-       double src_coord, dst_coord;
-
-       src_coord = atof(xbt_dynar_get_as(src, index, char *));
-       dst_coord = atof(xbt_dynar_get_as(dst, index, char *));
-
-       return (src_coord-dst_coord)*(src_coord-dst_coord);
-
-}
-
-static double base_vivaldi_get_latency (const char *src, const char *dst)
-{
-  double euclidean_dist;
-  xbt_dynar_t src_ctn, dst_ctn;
-  src_ctn = xbt_lib_get_or_null(host_lib, src, COORD_HOST_LEVEL);
-  if(!src_ctn) src_ctn = xbt_lib_get_or_null(as_router_lib, src, COORD_ASR_LEVEL);
-  dst_ctn = xbt_lib_get_or_null(host_lib, dst, COORD_HOST_LEVEL);
-  if(!dst_ctn) dst_ctn = xbt_lib_get_or_null(as_router_lib, dst, COORD_ASR_LEVEL);
-
-  if(dst_ctn == NULL || src_ctn == NULL)
-  xbt_die("Coord src '%s' :%p   dst '%s' :%p",src,src_ctn,dst,dst_ctn);
-
-  euclidean_dist = sqrt (euclidean_dist_comp(0,src_ctn,dst_ctn)+euclidean_dist_comp(1,src_ctn,dst_ctn))
-                                + fabs(atof(xbt_dynar_get_as(src_ctn, 2, char *)))+fabs(atof(xbt_dynar_get_as(dst_ctn, 2, char *)));
-
-  xbt_assert(euclidean_dist>=0, "Euclidean Dist is less than 0\"%s\" and \"%.2f\"", src, euclidean_dist);
-
-  //From .ms to .s
-  return euclidean_dist / 1000;
-}
-
-static double vivaldi_get_link_latency (routing_component_t rc,const char *src, const char *dst, route_extended_t e_route)
-{
-  if(get_network_element_type(src) == SURF_NETWORK_ELEMENT_AS) {
-         int need_to_clean = e_route?0:1;
-         double latency;
-         e_route = e_route?e_route:(*(rc->get_route)) (rc, src, dst);
-         latency = base_vivaldi_get_latency(e_route->src_gateway,e_route->dst_gateway);
-         if(need_to_clean) generic_free_extended_route(e_route);
-         return latency;
-  } else {
-         return base_vivaldi_get_latency(src,dst);
-  }
-}
-
 /**
  * \brief Add a "host" to the network element list
  */
-static void parse_S_host(const char *host_id, const char* coord)
+static void parse_S_host(sg_platf_host_cbarg_t host)
 {
   network_element_info_t info = NULL;
   if (current_routing->hierarchy == SURF_ROUTING_NULL)
     current_routing->hierarchy = SURF_ROUTING_BASE;
-  xbt_assert(!xbt_lib_get_or_null(host_lib, host_id,ROUTING_HOST_LEVEL),
-              "Reading a host, processing unit \"%s\" already exists",
-              host_id);
-  xbt_assert(current_routing->set_processing_unit,
-              "no defined method \"set_processing_unit\" in \"%s\"",
-              current_routing->name);
-  (*(current_routing->set_processing_unit)) (current_routing, host_id);
+  xbt_assert(!xbt_lib_get_or_null(host_lib, host->id, ROUTING_HOST_LEVEL),
+             "Reading a host, processing unit \"%s\" already exists", host->id);
+
+  current_routing->parse_PU(current_routing, host->id);
   info = xbt_new0(s_network_element_info_t, 1);
   info->rc_component = current_routing;
   info->rc_type = SURF_NETWORK_ELEMENT_HOST;
-  xbt_lib_set(host_lib,host_id,ROUTING_HOST_LEVEL,(void *) info);
-  if (strcmp(coord,"")) {
-       if(!COORD_HOST_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
-    xbt_dynar_t ctn = xbt_str_split_str(coord, " ");
+  xbt_lib_set(host_lib, host->id, ROUTING_HOST_LEVEL, (void *) info);
+  if (host->coord && strcmp(host->coord, "")) {
+    unsigned int cursor;
+    char*str;
+
+    if (!COORD_HOST_LEVEL)
+      xbt_die ("To use host coordinates, please add --cfg=coordinates:yes to your command line");
+
+    /* Pre-parse the host coordinates -- FIXME factorize with routers by overloading the routing->parse_PU function*/
+    xbt_dynar_t ctn_str = xbt_str_split_str(host->coord, " ");
+    xbt_dynar_t ctn = xbt_dynar_new(sizeof(double),NULL);
+    xbt_dynar_foreach(ctn_str,cursor, str) {
+      double val = atof(str);
+      xbt_dynar_push(ctn,&val);
+    }
     xbt_dynar_shrink(ctn, 0);
-    xbt_lib_set(host_lib,host_id,COORD_HOST_LEVEL,(void *) ctn);
+    xbt_dynar_free(&ctn_str);
+    xbt_lib_set(host_lib, host->id, COORD_HOST_LEVEL, (void *) ctn);
   }
 }
 
-static void parse_E_host(void)
-{
-        xbt_dict_cursor_t cursor = NULL;
-         char *key;
-         char *elem;
-
-         xbt_dict_foreach(current_property_set, cursor, key, elem) {
-                 XBT_DEBUG("property : %s = %s",key,elem);
-               }
-}
-
-/*
- * \brief Add a host to the network element list from XML
- */
-static void parse_S_host_XML(void)
-{
-       parse_S_host(A_surfxml_host_id, A_surfxml_host_coordinates);
-}
-static void parse_E_host_XML(void)
-{
-       parse_E_host();
-}
-
-/*
- * \brief Add a host to the network element list from lua script
- */
-static void parse_S_host_lua(const char *host_id, const char *coord)
-{
-  parse_S_host(host_id, coord);
-}
-
-
 /**
  * \brief Add a "router" to the network element list
  */
-static void parse_S_router(const char *router_id)
+static void parse_S_router(sg_platf_router_cbarg_t router)
 {
   network_element_info_t info = NULL;
-
   if (current_routing->hierarchy == SURF_ROUTING_NULL)
     current_routing->hierarchy = SURF_ROUTING_BASE;
-  xbt_assert(!xbt_lib_get_or_null(as_router_lib,A_surfxml_router_id, ROUTING_ASR_LEVEL),
-              "Reading a router, processing unit \"%s\" already exists",
-              router_id);
-  xbt_assert(current_routing->set_processing_unit,
-              "no defined method \"set_processing_unit\" in \"%s\"",
-              current_routing->name);
-  (*(current_routing->set_processing_unit)) (current_routing,
-                                             router_id);
+  xbt_assert(!xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL),
+             "Reading a router, processing unit \"%s\" already exists",
+             router->id);
+
+  current_routing->parse_PU(current_routing, router->id);
   info = xbt_new0(s_network_element_info_t, 1);
   info->rc_component = current_routing;
   info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
 
-  xbt_lib_set(as_router_lib,router_id,ROUTING_ASR_LEVEL,(void *) info);
-  if (strcmp(A_surfxml_router_coordinates,"")) {
-       if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
-    xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
+  xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, (void *) info);
+  if (strcmp(router->coord, "")) {
+    unsigned int cursor;
+    char*str;
+
+    if (!COORD_ASR_LEVEL)
+      xbt_die ("To use host coordinates, please add --cfg=coordinates:yes to your command line");
+
+    /* Pre-parse the host coordinates */
+    xbt_dynar_t ctn_str = xbt_str_split_str(router->coord, " ");
+    xbt_dynar_t ctn = xbt_dynar_new(sizeof(double),NULL);
+    xbt_dynar_foreach(ctn_str,cursor, str) {
+      double val = atof(str);
+      xbt_dynar_push(ctn,&val);
+    }
     xbt_dynar_shrink(ctn, 0);
-    xbt_lib_set(as_router_lib,router_id,COORD_ASR_LEVEL,(void *) ctn);
+    xbt_dynar_free(&ctn_str);
+    xbt_lib_set(as_router_lib, router->id, COORD_ASR_LEVEL, (void *) ctn);
   }
 }
 
-/**
- * brief Add a "router" to the network element list from XML description
- */
-static void parse_S_router_XML(void)
-{
-       return parse_S_router(A_surfxml_router_id);
-}
-
-/**
- * brief Add a "router" to the network element list from XML description
- */
-static void parse_S_router_lua(const char* router_id)
-{
-       return parse_S_router(router_id);
-}
 
 /**
- * \brief Set the endponints for a route
+ * \brief Set the end points for a route
  */
-static void parse_S_route_new_and_endpoints(const char *src_id, const char *dst_id)
+static void routing_parse_S_route(void)
 {
-  if (src != NULL && dst != NULL && link_list != NULL)
+  if (src != NULL && dst != NULL && parsed_link_list != NULL)
     THROWF(arg_error, 0, "Route between %s to %s can not be defined",
-           src_id, dst_id);
-  src = src_id;
-  dst = dst_id;
+           A_surfxml_route_src, A_surfxml_route_dst);
+  src = A_surfxml_route_src;
+  dst = A_surfxml_route_dst;
   xbt_assert(strlen(src) > 0 || strlen(dst) > 0,
-              "Some limits are null in the route between \"%s\" and \"%s\"",
-              src, dst);
-  link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-
-/**
- * \brief Set the endpoints for a route from XML
- */
-static void parse_S_route_new_and_endpoints_XML(void)
-{
-  parse_S_route_new_and_endpoints(A_surfxml_route_src,
-                                  A_surfxml_route_dst);
+             "Some limits are null in the route between \"%s\" and \"%s\"",
+             src, dst);
+  parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
 /**
- * \brief Set the endpoints for a route from lua
+ * \brief Set the end points and gateways for a ASroute
  */
-static void parse_S_route_new_and_endpoints_lua(const char *id_src, const char *id_dst)
+static void routing_parse_S_ASroute(void)
 {
-  parse_S_route_new_and_endpoints(id_src, id_dst);
-}
-
-/**
- * \brief Set the endponints and gateways for a ASroute
- */
-static void parse_S_ASroute_new_and_endpoints(void)
-{
-  if (src != NULL && dst != NULL && link_list != NULL)
+  if (src != NULL && dst != NULL && parsed_link_list != NULL)
     THROWF(arg_error, 0, "Route between %s to %s can not be defined",
            A_surfxml_ASroute_src, A_surfxml_ASroute_dst);
   src = A_surfxml_ASroute_src;
@@ -296,18 +192,18 @@ static void parse_S_ASroute_new_and_endpoints(void)
   gw_src = A_surfxml_ASroute_gw_src;
   gw_dst = A_surfxml_ASroute_gw_dst;
   xbt_assert(strlen(src) > 0 || strlen(dst) > 0 || strlen(gw_src) > 0
-              || strlen(gw_dst) > 0,
-              "Some limits are null in the route between \"%s\" and \"%s\"",
-              src, dst);
-  link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
+             || strlen(gw_dst) > 0,
+             "Some limits are null in the route between \"%s\" and \"%s\"",
+             src, dst);
+  parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
 /**
- * \brief Set the endponints for a bypassRoute
+ * \brief Set the end points for a bypassRoute
  */
-static void parse_S_bypassRoute_new_and_endpoints(void)
+static void routing_parse_S_bypassRoute(void)
 {
-  if (src != NULL && dst != NULL && link_list != NULL)
+  if (src != NULL && dst != NULL && parsed_link_list != NULL)
     THROWF(arg_error, 0,
            "Bypass Route between %s to %s can not be defined",
            A_surfxml_bypassRoute_src, A_surfxml_bypassRoute_dst);
@@ -316,62 +212,47 @@ static void parse_S_bypassRoute_new_and_endpoints(void)
   gw_src = A_surfxml_bypassRoute_gw_src;
   gw_dst = A_surfxml_bypassRoute_gw_dst;
   xbt_assert(strlen(src) > 0 || strlen(dst) > 0 || strlen(gw_src) > 0
-              || strlen(gw_dst) > 0,
-              "Some limits are null in the route between \"%s\" and \"%s\"",
-              src, dst);
-  link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-
-/**
- * \brief Set a new link on the actual list of link for a route or ASroute
- */
-static void parse_E_link_ctn_new_elem(const char *link_id)
-{
-  char *val;
-  val = xbt_strdup(link_id);
-  xbt_dynar_push(link_list, &val);
+             || strlen(gw_dst) > 0,
+             "Some limits are null in the route between \"%s\" and \"%s\"",
+             src, dst);
+  parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 }
 
 /**
  * \brief Set a new link on the actual list of link for a route or ASroute from XML
  */
 
-static void parse_E_link_ctn_new_elem_XML(void)
-{
-  if (A_surfxml_link_ctn_direction == A_surfxml_link_ctn_direction_NONE)
-    parse_E_link_ctn_new_elem(A_surfxml_link_ctn_id);
-  if (A_surfxml_link_ctn_direction == A_surfxml_link_ctn_direction_UP) {
-    char *link_id = bprintf("%s_UP", A_surfxml_link_ctn_id);
-    parse_E_link_ctn_new_elem(link_id);
-    free(link_id);
-  }
-  if (A_surfxml_link_ctn_direction == A_surfxml_link_ctn_direction_DOWN) {
-    char *link_id = bprintf("%s_DOWN", A_surfxml_link_ctn_id);
-    parse_E_link_ctn_new_elem(link_id);
-    free(link_id);
+static void routing_parse_link_ctn(void)
+{
+  char *link_id;
+  switch (A_surfxml_link_ctn_direction) {
+  case AU_surfxml_link_ctn_direction:
+  case A_surfxml_link_ctn_direction_NONE:
+    link_id = xbt_strdup(A_surfxml_link_ctn_id);
+    break;
+  case A_surfxml_link_ctn_direction_UP:
+    link_id = bprintf("%s_UP", A_surfxml_link_ctn_id);
+    break;
+  case A_surfxml_link_ctn_direction_DOWN:
+    link_id = bprintf("%s_DOWN", A_surfxml_link_ctn_id);
+    break;
   }
-}
-
-/**
- * \brief Set a new link on the actual list of link for a route or ASroute from lua
- */
-static void parse_E_link_c_ctn_new_elem_lua(const char *link_id)
-{
-  parse_E_link_ctn_new_elem(link_id);
+  xbt_dynar_push(parsed_link_list, &link_id);
 }
 
 /**
  * \brief Store the route by calling the set_route function of the current routing component
  */
-static void parse_E_route_store_route(void)
-{
-  name_route_extended_t route = xbt_new0(s_name_route_extended_t, 1);
-  route->generic_route.link_list = link_list;
-  xbt_assert(current_routing->set_route,
-              "no defined method \"set_route\" in \"%s\"",
-              current_routing->name);
-  (*(current_routing->set_route)) (current_routing, src, dst, route);
-  link_list = NULL;
+static void routing_parse_E_route(void)
+{
+  route_t route = xbt_new0(s_route_t, 1);
+  route->link_list = parsed_link_list;
+  xbt_assert(current_routing->parse_route,
+             "no defined method \"set_route\" in \"%s\"",
+             current_routing->name);
+  current_routing->parse_route(current_routing, src, dst, route);
+  generic_free_route(route);
+  parsed_link_list = NULL;
   src = NULL;
   dst = NULL;
 }
@@ -379,17 +260,18 @@ static void parse_E_route_store_route(void)
 /**
  * \brief Store the ASroute by calling the set_ASroute function of the current routing component
  */
-static void parse_E_ASroute_store_route(void)
+static void routing_parse_E_ASroute(void)
 {
-  name_route_extended_t e_route = xbt_new0(s_name_route_extended_t, 1);
-  e_route->generic_route.link_list = link_list;
+  route_t e_route = xbt_new0(s_route_t, 1);
+  e_route->link_list = parsed_link_list;
   e_route->src_gateway = xbt_strdup(gw_src);
   e_route->dst_gateway = xbt_strdup(gw_dst);
-  xbt_assert(current_routing->set_ASroute,
-              "no defined method \"set_ASroute\" in \"%s\"",
-              current_routing->name);
-  (*(current_routing->set_ASroute)) (current_routing, src, dst, e_route);
-  link_list = NULL;
+  xbt_assert(current_routing->parse_ASroute,
+             "no defined method \"set_ASroute\" in \"%s\"",
+             current_routing->name);
+  current_routing->parse_ASroute(current_routing, src, dst, e_route);
+  generic_free_route(e_route);
+  parsed_link_list = NULL;
   src = NULL;
   dst = NULL;
   gw_src = NULL;
@@ -399,18 +281,17 @@ static void parse_E_ASroute_store_route(void)
 /**
  * \brief Store the bypass route by calling the set_bypassroute function of the current routing component
  */
-static void parse_E_bypassRoute_store_route(void)
+static void routing_parse_E_bypassRoute(void)
 {
-  route_extended_t e_route = xbt_new0(s_route_extended_t, 1);
-  e_route->generic_route.link_list = link_list;
+  route_t e_route = xbt_new0(s_route_t, 1);
+  e_route->link_list = parsed_link_list;
   e_route->src_gateway = xbt_strdup(gw_src);
   e_route->dst_gateway = xbt_strdup(gw_dst);
-  xbt_assert(current_routing->set_bypassroute,
-              "no defined method \"set_bypassroute\" in \"%s\"",
-              current_routing->name);
-  (*(current_routing->set_bypassroute)) (current_routing, src, dst,
-                                         e_route);
-  link_list = NULL;
+  xbt_assert(current_routing->parse_bypassroute,
+             "Bypassing mechanism not implemented by routing '%s'",
+             current_routing->name);
+  current_routing->parse_bypassroute(current_routing, src, dst, e_route);
+  parsed_link_list = NULL;
   src = NULL;
   dst = NULL;
   gw_src = NULL;
@@ -418,156 +299,107 @@ static void parse_E_bypassRoute_store_route(void)
 }
 
 /**
- * \brief Make a new routing component
+ * \brief Make a new routing component to the platform
+ *
+ * Add a new autonomous system to the platform. Any elements (such as host,
+ * router or sub-AS) added after this call and before the corresponding call
+ * to sg_platf_new_AS_close() will be added to this AS.
+ *
+ * Once this function was called, the configuration concerning the used
+ * models cannot be changed anymore.
  *
- * make the new structure and
- * set the parsing functions to allows parsing the part of the routing tree
+ * @param AS_id name of this autonomous system. Must be unique in the platform
+ * @param wanted_routing_type one of Full, Floyd, Dijkstra or similar. Full list in the variable routing_models, in src/surf/surf_routing.c
  */
-static void parse_S_AS(char *AS_id, char *AS_routing)
+void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
 {
-  routing_component_t new_routing;
-  model_type_t model = NULL;
-  char *wanted = AS_routing;
+  AS_t new_as;
+  routing_model_description_t model = NULL;
   int cpt;
-  /* seach the routing model */
+
+  /* search the routing model */
   for (cpt = 0; routing_models[cpt].name; cpt++)
-    if (!strcmp(wanted, routing_models[cpt].name))
+    if (!strcmp(wanted_routing_type, routing_models[cpt].name))
       model = &routing_models[cpt];
   /* if its not exist, error */
   if (model == NULL) {
     fprintf(stderr, "Routing model %s not found. Existing models:\n",
-            wanted);
+            wanted_routing_type);
     for (cpt = 0; routing_models[cpt].name; cpt++)
-      if (!strcmp(wanted, routing_models[cpt].name))
-        fprintf(stderr, "   %s: %s\n", routing_models[cpt].name,
-                routing_models[cpt].desc);
+      fprintf(stderr, "   %s: %s\n", routing_models[cpt].name,
+              routing_models[cpt].desc);
     xbt_die(NULL);
   }
 
   /* make a new routing component */
-  new_routing = (routing_component_t) (*(model->create)) ();
-  new_routing->routing = model;
-  new_routing->hierarchy = SURF_ROUTING_NULL;
-  new_routing->name = xbt_strdup(AS_id);
-  new_routing->routing_sons = xbt_dict_new();
-
-  /* Hack for Vivaldi */
-  if(!strcmp(model->name,"Vivaldi"))
-       new_routing->get_latency = vivaldi_get_link_latency;
+  new_as = (AS_t) model->create();
+  new_as->model_desc = model;
+  new_as->hierarchy = SURF_ROUTING_NULL;
+  new_as->name = xbt_strdup(AS_id);
 
   if (current_routing == NULL && global_routing->root == NULL) {
 
     /* it is the first one */
-    new_routing->routing_father = NULL;
-    global_routing->root = new_routing;
+    new_as->routing_father = NULL;
+    global_routing->root = new_as;
 
   } else if (current_routing != NULL && global_routing->root != NULL) {
 
     xbt_assert(!xbt_dict_get_or_null
-                (current_routing->routing_sons, AS_id),
-                "The AS \"%s\" already exists", AS_id);
+               (current_routing->routing_sons, AS_id),
+               "The AS \"%s\" already exists", AS_id);
     /* it is a part of the tree */
-    new_routing->routing_father = current_routing;
+    new_as->routing_father = current_routing;
     /* set the father behavior */
     if (current_routing->hierarchy == SURF_ROUTING_NULL)
       current_routing->hierarchy = SURF_ROUTING_RECURSIVE;
     /* add to the sons dictionary */
     xbt_dict_set(current_routing->routing_sons, AS_id,
-                 (void *) new_routing, NULL);
+                 (void *) new_as, NULL);
     /* add to the father element list */
-    (*(current_routing->set_autonomous_system)) (current_routing, AS_id);
-    /* unload the prev parse rules */
-    (*(current_routing->routing->unload)) ();
-
+    current_routing->parse_AS(current_routing, AS_id);
   } else {
     THROWF(arg_error, 0, "All defined components must be belong to a AS");
   }
-  /* set the new parse rules */
-  (*(new_routing->routing->load)) ();
   /* set the new current component of the tree */
-  current_routing = new_routing;
-}
-
-/*
- * Detect the routing model type of the routing component from XML platforms
- */
-static void parse_S_AS_XML(void)
-{
-  parse_S_AS(A_surfxml_AS_id, A_surfxml_AS_routing);
-}
-
-/*
- * define the routing model type of routing component from lua script
- */
-static void parse_S_AS_lua(char *id, char *mode)
-{
-  parse_S_AS(id, mode);
+  current_routing = new_as;
 }
 
-
 /**
- * \brief Finish the creation of a new routing component
+ * \brief Specify that the current description of AS is finished
+ *
+ * Once you've declared all the content of your AS, you have to close
+ * it with this call. Your AS is not usable until you call this function.
+ *
+ * @fixme: this call is not as robust as wanted: bad things WILL happen
+ * if you call it twice for the same AS, or if you forget calling it, or
+ * even if you add stuff to a closed AS
  *
- * When you finish to read the routing component, other structures must be created. 
- * the "end" method allow to do that for any routing model type
  */
-static void parse_E_AS(const char *AS_id)
+void routing_AS_end()
 {
 
   if (current_routing == NULL) {
-    THROWF(arg_error, 0, "Close AS(%s), that never open", AS_id);
+    THROWF(arg_error, 0, "Close an AS, but none was under construction");
   } else {
     network_element_info_t info = NULL;
-    xbt_assert(!xbt_lib_get_or_null(as_router_lib,current_routing->name, ROUTING_ASR_LEVEL),
-               "The AS \"%s\" already exists",current_routing->name);
+    xbt_assert(!xbt_lib_get_or_null
+               (as_router_lib, current_routing->name, ROUTING_ASR_LEVEL),
+               "The AS \"%s\" already exists", current_routing->name);
     info = xbt_new0(s_network_element_info_t, 1);
     info->rc_component = current_routing->routing_father;
     info->rc_type = SURF_NETWORK_ELEMENT_AS;
-    xbt_lib_set(as_router_lib,current_routing->name,ROUTING_ASR_LEVEL,(void *) info);
+    xbt_lib_set(as_router_lib, current_routing->name, ROUTING_ASR_LEVEL,
+                (void *) info);
 
-    (*(current_routing->routing->unload)) ();
-    (*(current_routing->routing->end)) ();
+    if (current_routing->model_desc->end)
+      current_routing->model_desc->end(current_routing);
     current_routing = current_routing->routing_father;
-    if (current_routing != NULL)
-      (*(current_routing->routing->load)) ();
   }
 }
 
-/*
- * \brief Finish the creation of a new routing component from XML
- */
-static void parse_E_AS_XML(void)
-{
-  parse_E_AS(A_surfxml_AS_id);
-}
-
-/*
- * \brief Finish the creation of a new routing component from lua
- */
-static void parse_E_AS_lua(const char *id)
-{
-  parse_E_AS(id);
-}
-
 /* Aux Business methods */
 
-/**
- * \brief Get the AS name of the element
- *
- * \param name the host name
- *
- */
-static char* elements_As_name(const char *name)
-{
-  routing_component_t as_comp;
-
-  /* (1) find the as where the host is located */
-  as_comp = ((network_element_info_t)
-            xbt_lib_get_or_null(host_lib,name, ROUTING_HOST_LEVEL))->rc_component;
-  return as_comp->name;
-}
-
-
 /**
  * \brief Get the AS father and the first elements of the chain
  *
@@ -578,21 +410,21 @@ static char* elements_As_name(const char *name)
  * father in the chain
  */
 static void elements_father(const char *src, const char *dst,
-                            routing_component_t *res_father,
-                            routing_component_t *res_src,
-                            routing_component_t *res_dst)
+                            AS_t * res_father,
+                            AS_t * res_src,
+                            AS_t * res_dst)
 {
   xbt_assert(src && dst, "bad parameters for \"elements_father\" method");
-#define ELEMENTS_FATHER_MAXDEPTH 16 /* increase if it is not enough */
-  routing_component_t src_as, dst_as;
-  routing_component_t path_src[ELEMENTS_FATHER_MAXDEPTH];
-  routing_component_t path_dst[ELEMENTS_FATHER_MAXDEPTH];
+#define ELEMENTS_FATHER_MAXDEPTH 16     /* increase if it is not enough */
+  AS_t src_as, dst_as;
+  AS_t path_src[ELEMENTS_FATHER_MAXDEPTH];
+  AS_t path_dst[ELEMENTS_FATHER_MAXDEPTH];
   int index_src = 0;
   int index_dst = 0;
-  routing_component_t current;
-  routing_component_t current_src;
-  routing_component_t current_dst;
-  routing_component_t father;
+  AS_t current;
+  AS_t current_src;
+  AS_t current_dst;
+  AS_t father;
 
   /* (1) find the as where the src and dst are located */
   network_element_info_t src_data = xbt_lib_get_or_null(host_lib, src,
@@ -610,12 +442,12 @@ static void elements_father(const char *src, const char *dst,
              "Ask for route \"from\"(%s) or \"to\"(%s) no found", src, dst);
 
   /* (2) find the path to the root routing component */
-  for (current = src_as ; current != NULL ; current = current->routing_father) {
+  for (current = src_as; current != NULL; current = current->routing_father) {
     if (index_src >= ELEMENTS_FATHER_MAXDEPTH)
       xbt_die("ELEMENTS_FATHER_MAXDEPTH should be increased for path_src");
     path_src[index_src++] = current;
   }
-  for (current = dst_as ; current != NULL ; current = current->routing_father) {
+  for (current = dst_as; current != NULL; current = current->routing_father) {
     if (index_dst >= ELEMENTS_FATHER_MAXDEPTH)
       xbt_die("ELEMENTS_FATHER_MAXDEPTH should be increased for path_dst");
     path_dst[index_dst++] = current;
@@ -648,236 +480,126 @@ static void elements_father(const char *src, const char *dst,
  *
  * \param src the source host name 
  * \param dst the destination host name
- * \param *e_route the route where the links are stored
+ * \param *route the route where the links are stored. It is either NULL or a ready to use dynar
  * \param *latency the latency, if needed
  * 
  * This function is called by "get_route" and "get_latency". It allows to walk
- * recursively through the routing components tree.
+ * recursively through the ASes tree.
  */
-static void _get_route_latency(const char *src, const char *dst,
-                               xbt_dynar_t *route, double *latency)
+static void _get_route_and_latency(const char *src, const char *dst,
+                                   xbt_dynar_t * links, double *latency)
 {
+  void *link;
+  unsigned int cpt;
+  s_route_t route;
+  memset(&route,0,sizeof(route));
+
   XBT_DEBUG("Solve route/latency  \"%s\" to \"%s\"", src, dst);
   xbt_assert(src && dst, "bad parameters for \"_get_route_latency\" method");
 
-  routing_component_t common_father;
-  routing_component_t src_father;
-  routing_component_t dst_father;
+  /* Find how src and dst are interconnected */
+  AS_t common_father, src_father, dst_father;
   elements_father(src, dst, &common_father, &src_father, &dst_father);
 
-  if (src_father == dst_father) { /* SURF_ROUTING_BASE */
-
-    route_extended_t e_route = NULL;
-    if (route) {
-      e_route = common_father->get_route(common_father, src, dst);
-      xbt_assert(e_route, "no route between \"%s\" and \"%s\"", src, dst);
-      *route = e_route->generic_route.link_list;
-    }
-    if (latency) {
-      *latency = common_father->get_latency(common_father, src, dst, e_route);
-      xbt_assert(*latency >= 0.0,
-                 "latency error on route between \"%s\" and \"%s\"", src, dst);
-    }
-    if (e_route) {
-      xbt_free(e_route->src_gateway);
-      xbt_free(e_route->dst_gateway);
-      xbt_free(e_route);
-    }
+  /* If src and dst are in the same AS, life is good */
+  if (src_father == dst_father) {       /* SURF_ROUTING_BASE */
 
-  } else {                      /* SURF_ROUTING_RECURSIVE */
+    route.link_list = *links;
 
-    route_extended_t e_route_bypass = NULL;
-    if (common_father->get_bypass_route)
-      e_route_bypass = common_father->get_bypass_route(common_father, src, dst);
+    common_father->get_route_and_latency(common_father, src, dst, &route,latency);
 
-    xbt_assert(!latency || !e_route_bypass,
-               "Bypass cannot work yet with get_latency");
+    xbt_free(route.src_gateway);
+    xbt_free(route.dst_gateway);
+    return;
+  }
 
-    route_extended_t e_route_cnt = e_route_bypass
-      ? e_route_bypass
-      : common_father->get_route(common_father,
-                               src_father->name, dst_father->name);
+  /* If we are here, src and dst are not in the same AS; check whether a direct bypass is defined */
 
-    xbt_assert(e_route_cnt, "no route between \"%s\" and \"%s\"",
-               src_father->name, dst_father->name);
+  route_t e_route_bypass = NULL;
+  if (common_father->get_bypass_route)
+    e_route_bypass = common_father->get_bypass_route(common_father, src, dst);
 
-    xbt_assert((e_route_cnt->src_gateway == NULL) ==
-               (e_route_cnt->dst_gateway == NULL),
-               "bad gateway for route between \"%s\" and \"%s\"", src, dst);
+  if (e_route_bypass) { /* Common ancestor is kind enough to declare a bypass route from src to dst -- use it and bail out */
+    if (latency)
+      xbt_die("Bypass cannot work yet with get_latency"); // FIXME: get_bypass_route should update the latency itself, just like get_route
 
-    if (route) {
-      *route = xbt_dynar_new(global_routing->size_of_link, NULL);
-    }
-    if (latency) {
-      *latency = common_father->get_latency(common_father,
-                                            src_father->name, dst_father->name,
-                                            e_route_cnt);
-      xbt_assert(*latency >= 0.0,
-                 "latency error on route between \"%s\" and \"%s\"",
-                 src_father->name, dst_father->name);
+//    // FIXME this path is never tested. I need examples to check the bypass mechanism...
+//    THROW_UNIMPLEMENTED; // let's warn the users of the problem
+    xbt_dynar_foreach(e_route_bypass->link_list, cpt, link) {
+      xbt_dynar_push(*links, &link);
     }
 
-    void *link;
-    unsigned int cpt;
-
-    if (strcmp(src, e_route_cnt->src_gateway)) {
-      double latency_src;
-      xbt_dynar_t route_src;
-
-      _get_route_latency(src, e_route_cnt->src_gateway,
-                         (route ? &route_src : NULL),
-                         (latency ? &latency_src : NULL));
-      if (route) {
-        xbt_assert(route_src, "no route between \"%s\" and \"%s\"",
-                   src, e_route_cnt->src_gateway);
-        xbt_dynar_foreach(route_src, cpt, link) {
-          xbt_dynar_push(*route, &link);
-        }
-        xbt_dynar_free(&route_src);
-      }
-      if (latency) {
-        xbt_assert(latency_src >= 0.0,
-                   "latency error on route between \"%s\" and \"%s\"",
-                   src, e_route_cnt->src_gateway);
-        *latency += latency_src;
-      }
-    }
+    generic_free_route(e_route_bypass);
+    return;
+  }
 
-    if (route) {
-      xbt_dynar_foreach(e_route_cnt->generic_route.link_list, cpt, link) {
-        xbt_dynar_push(*route, &link);
-      }
-    }
 
-    if (strcmp(e_route_cnt->dst_gateway, dst)) {
-      double latency_dst;
-      xbt_dynar_t route_dst;
-
-      _get_route_latency(e_route_cnt->dst_gateway, dst,
-                         (route ? &route_dst : NULL),
-                         (latency ? &latency_dst : NULL));
-      if (route) {
-        xbt_assert(route_dst, "no route between \"%s\" and \"%s\"",
-                   e_route_cnt->dst_gateway, dst);
-        xbt_dynar_foreach(route_dst, cpt, link) {
-          xbt_dynar_push(*route, &link);
-        }
-        xbt_dynar_free(&route_dst);
-      }
-      if (latency) {
-        xbt_assert(latency_dst >= 0.0,
-                   "latency error on route between \"%s\" and \"%s\"",
-                   e_route_cnt->dst_gateway, dst);
-        *latency += latency_dst;
-      }
-    }
+  /* Not in the same AS, no bypass. We'll have to find our path between the ASes recursively*/
+
+  route.link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+  common_father->get_route_and_latency(common_father, src_father->name, dst_father->name, &route,latency);
+
+  xbt_assert((route.src_gateway != NULL) && (route.dst_gateway != NULL),
+      "bad gateways for route from \"%s\" to \"%s\"", src, dst);
+
+  char*src_gateway = route.src_gateway;
+  char*dst_gateway = route.dst_gateway;
+
+  /* If source gateway is not our source, we have to recursively find our way up to this point */
+  if (strcmp(src, src_gateway))
+    _get_route_and_latency(src, src_gateway, links, latency);
 
-    generic_free_extended_route(e_route_cnt);
+  xbt_dynar_foreach(route.link_list, cpt, link) {
+    xbt_dynar_push(*links, &link);
   }
-}
 
-/**
- * \brief Generic function for get_route, get_route_no_cleanup, and get_latency
- */
-static void get_route_latency(const char *src, const char *dst,
-                              xbt_dynar_t *route, double *latency, int cleanup)
-{
-  _get_route_latency(src, dst, route, latency);
-  xbt_assert(!route || *route, "no route between \"%s\" and \"%s\"", src, dst);
-  xbt_assert(!latency || *latency >= 0.0,
-             "latency error on route between \"%s\" and \"%s\"", src, dst);
-  if (route) {
-    xbt_dynar_free(&global_routing->last_route);
-    global_routing->last_route = cleanup ? *route : NULL;
+  /* If dest gateway is not our destination, we have to recursively find our way from this point */
+  // FIXME why can't I factorize it the same way than [src;src_gw] without breaking the examples??
+  if (strcmp(dst_gateway, dst)) {
+    xbt_dynar_t route_dst = xbt_dynar_new(global_routing->size_of_link,NULL);
+
+    _get_route_and_latency(dst_gateway, dst, &route_dst, latency);
+
+    xbt_dynar_foreach(route_dst, cpt, link) {
+      xbt_dynar_push(*links, &link);
+    }
+    xbt_dynar_free(&route_dst);
   }
-}
 
-/**
- * \brief Generic method: find a route between hosts
- *
- * \param src the source host name 
- * \param dst the destination host name
- * 
- * walk through the routing components tree and find a route between hosts
- * by calling the differents "get_route" functions in each routing component.
- * No need to free the returned dynar. It will be freed at the next call.
- */
-static xbt_dynar_t get_route(const char *src, const char *dst)
-{
-  xbt_dynar_t route = NULL;
-  get_route_latency(src, dst, &route, NULL, 1);
-  return route;
+  xbt_free(src_gateway);
+  xbt_free_f(dst_gateway);
+  xbt_dynar_free(&route.link_list);
 }
 
 /**
- * \brief Generic method: find a route between hosts
+ * \brief Find a route between hosts
  *
  * \param src the source host name
  * \param dst the destination host name
+ * \param route where to store the list of links.
+ *              If *route=NULL, create a short lived dynar. Else, fill the provided dynar
+ * \param latency where to store the latency experienced on the path (or NULL if not interested)
+ *                It is the caller responsability to initialize latency to 0 (we add to provided route)
+ * \pre route!=NULL
  *
  * walk through the routing components tree and find a route between hosts
  * by calling the differents "get_route" functions in each routing component.
- * Leaves the caller the responsability to clean the returned dynar.
- */
-static xbt_dynar_t get_route_no_cleanup(const char *src, const char *dst)
-{
-  xbt_dynar_t route = NULL;
-  get_route_latency(src, dst, &route, NULL, 0);
-  return route;
-}
-
-/*Get Latency*/
-static double get_latency(const char *src, const char *dst)
-{
-  double latency = -1.0;
-  get_route_latency(src, dst, NULL, &latency, 0);
-  return latency;
-}
-
-/**
- * \brief Recursive function for finalize
- *
- * \param rc the source host name 
- * 
- * This fuction is call by "finalize". It allow to finalize the 
- * AS or routing components. It delete all the structures.
  */
-static void _finalize(routing_component_t rc)
+void routing_get_route_and_latency(const char *src, const char *dst,
+                                   xbt_dynar_t * route, double *latency)
 {
-  if (rc) {
-    xbt_dict_cursor_t cursor = NULL;
-    char *key;
-    routing_component_t elem;
-    xbt_dict_foreach(rc->routing_sons, cursor, key, elem) {
-      _finalize(elem);
-    }
-    xbt_dict_t tmp_sons = rc->routing_sons;
-    char *tmp_name = rc->name;
-    xbt_dict_free(&tmp_sons);
-    xbt_free(tmp_name);
-    xbt_assert(rc->finalize, "no defined method \"finalize\" in \"%s\"",
-                current_routing->name);
-    (*(rc->finalize)) (rc);
+  if (!*route) {
+    xbt_dynar_reset(global_routing->last_route);
+    *route = global_routing->last_route;
   }
-}
 
-/**
- * \brief Generic method: delete all the routing structures
- * 
- * walk through the routing components tree and delete the structures
- * by calling the differents "finalize" functions in each routing component
- */
-static void finalize(void)
-{
-  /* delete recursibly all the tree */
-  _finalize(global_routing->root);
-  /* delete last_route */
-  xbt_dynar_free(&(global_routing->last_route));
-  /* delete global routing structure */
-  xbt_free(global_routing);
+  _get_route_and_latency(src, dst, route, latency);
+
+  xbt_assert(!latency || *latency >= 0.0,
+             "negative latency on route between \"%s\" and \"%s\"", src, dst);
 }
 
-static xbt_dynar_t recursive_get_onelink_routes(routing_component_t rc)
+static xbt_dynar_t recursive_get_onelink_routes(AS_t rc)
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
 
@@ -893,7 +615,7 @@ static xbt_dynar_t recursive_get_onelink_routes(routing_component_t rc)
   //recursing
   char *key;
   xbt_dict_cursor_t cursor = NULL;
-  routing_component_t rc_child;
+  AS_t rc_child;
   xbt_dict_foreach(rc->routing_sons, cursor, key, rc_child) {
     xbt_dynar_t onelink_child = recursive_get_onelink_routes(rc_child);
     if (onelink_child) {
@@ -910,16 +632,17 @@ static xbt_dynar_t get_onelink_routes(void)
   return recursive_get_onelink_routes(global_routing->root);
 }
 
-e_surf_network_element_type_t get_network_element_type(const char
-                                                              *name)
+e_surf_network_element_type_t routing_get_network_element_type(const char *name)
 {
   network_element_info_t rc = NULL;
 
   rc = xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL);
-  if(rc) return rc->rc_type;
+  if (rc)
+    return rc->rc_type;
 
   rc = xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
-  if(rc) return rc->rc_type;
+  if (rc)
+    return rc->rc_type;
 
   return SURF_NETWORK_ELEMENT_NULL;
 }
@@ -929,80 +652,19 @@ e_surf_network_element_type_t get_network_element_type(const char
  * 
  * Make a global routing structure and set all the parsing functions.
  */
-void routing_model_create(size_t size_of_links, void *loopback, double_f_cpvoid_t get_link_latency_fun)
+void routing_model_create(size_t size_of_links, void *loopback)
 {
   /* config the uniq global routing */
   global_routing = xbt_new0(s_routing_global_t, 1);
   global_routing->root = NULL;
-  global_routing->get_route = get_route;
-  global_routing->get_latency = get_latency;
-  global_routing->get_route_no_cleanup = get_route_no_cleanup;
   global_routing->get_onelink_routes = get_onelink_routes;
-  global_routing->get_route_latency = get_route_latency;
-  global_routing->get_network_element_type = get_network_element_type;
-  global_routing->finalize = finalize;
   global_routing->loopback = loopback;
   global_routing->size_of_link = size_of_links;
-  global_routing->last_route = NULL;
-  get_link_latency = get_link_latency_fun;
+  global_routing->last_route = xbt_dynar_new(global_routing->size_of_link,NULL);
   /* no current routing at moment */
   current_routing = NULL;
-
-  /* parse generic elements */
-  surfxml_add_callback(STag_surfxml_host_cb_list, &parse_S_host_XML);
-  surfxml_add_callback(ETag_surfxml_host_cb_list, &parse_E_host_XML);
-  surfxml_add_callback(STag_surfxml_router_cb_list, &parse_S_router_XML);
-
-  surfxml_add_callback(STag_surfxml_route_cb_list,
-                       &parse_S_route_new_and_endpoints_XML);
-  surfxml_add_callback(STag_surfxml_ASroute_cb_list,
-                       &parse_S_ASroute_new_and_endpoints);
-  surfxml_add_callback(STag_surfxml_bypassRoute_cb_list,
-                       &parse_S_bypassRoute_new_and_endpoints);
-
-  surfxml_add_callback(ETag_surfxml_link_ctn_cb_list,
-                       &parse_E_link_ctn_new_elem_XML);
-
-  surfxml_add_callback(ETag_surfxml_route_cb_list,
-                       &parse_E_route_store_route);
-  surfxml_add_callback(ETag_surfxml_ASroute_cb_list,
-                       &parse_E_ASroute_store_route);
-  surfxml_add_callback(ETag_surfxml_bypassRoute_cb_list,
-                       &parse_E_bypassRoute_store_route);
-
-  surfxml_add_callback(STag_surfxml_AS_cb_list, &parse_S_AS_XML);
-  surfxml_add_callback(ETag_surfxml_AS_cb_list, &parse_E_AS_XML);
-
-  surfxml_add_callback(STag_surfxml_cluster_cb_list,
-                       &routing_parse_Scluster);
-
-  surfxml_add_callback(STag_surfxml_peer_cb_list,
-                         &routing_parse_Speer);
-
-  surfxml_add_callback(ETag_surfxml_platform_cb_list,
-                                                 &clean_dict_random);
-
-#ifdef HAVE_TRACING
-  instr_routing_define_callbacks();
-#endif
 }
 
-void surf_parse_add_callback_config(void)
-{
-       surfxml_add_callback(STag_surfxml_config_cb_list, &routing_parse_Sconfig);
-       surfxml_add_callback(ETag_surfxml_config_cb_list, &routing_parse_Econfig);
-       surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties_XML);
-       surfxml_add_callback(STag_surfxml_AS_cb_list, &surf_parse_models_setup);
-       surfxml_add_callback(STag_surfxml_random_cb_list, &routing_parse_Srandom);
-}
-
-void surf_parse_models_setup()
-{
-       routing_parse_Erandom();
-       surfxml_del_callback(STag_surfxml_AS_cb_list, surf_parse_models_setup);
-       surf_config_models_setup(platform_filename);
-       free(platform_filename);
-}
 
 /* ************************************************** */
 /* ********** PATERN FOR NEW ROUTING **************** */
@@ -1050,930 +712,171 @@ void surf_parse_models_setup()
 /* ************************************************************************** */
 /* ************************* GENERIC PARSE FUNCTIONS ************************ */
 
-void generic_set_processing_unit(routing_component_t rc,
-                                        const char *name)
-{
-  XBT_DEBUG("Load process unit \"%s\"", name);
-  int *id = xbt_new0(int, 1);
-  xbt_dict_t _to_index;
-  _to_index = current_routing->to_index;
-  *id = xbt_dict_length(_to_index);
-  xbt_dict_set(_to_index, name, id, xbt_free);
-}
-
-void generic_set_autonomous_system(routing_component_t rc,
-                                          const char *name)
-{
-  XBT_DEBUG("Load Autonomous system \"%s\"", name);
-  int *id = xbt_new0(int, 1);
-  xbt_dict_t _to_index;
-  _to_index = current_routing->to_index;
-  *id = xbt_dict_length(_to_index);
-  xbt_dict_set(_to_index, name, id, xbt_free);
-}
-
-int surf_pointer_resource_cmp(const void *a, const void *b)
-{
-  return a != b;
-}
-
-int surf_link_resource_cmp(const void *a, const void *b)
-{
-  return !!memcmp(a,b,global_routing->size_of_link);
-}
-
-void generic_set_bypassroute(routing_component_t rc,
-                                    const char *src, const char *dst,
-                                    route_extended_t e_route)
-{
-  XBT_DEBUG("Load bypassRoute from \"%s\" to \"%s\"", src, dst);
-  xbt_dict_t dict_bypassRoutes = rc->bypassRoutes;
-  char *route_name;
-
-  route_name = bprintf("%s#%s", src, dst);
-  xbt_assert(xbt_dynar_length(e_route->generic_route.link_list) > 0,
-              "Invalid count of links, must be greater than zero (%s,%s)",
-              src, dst);
-  xbt_assert(!xbt_dict_get_or_null(dict_bypassRoutes, route_name),
-              "The bypass route between \"%s\"(\"%s\") and \"%s\"(\"%s\") already exists",
-              src, e_route->src_gateway, dst, e_route->dst_gateway);
-
-  route_extended_t new_e_route =
-      generic_new_extended_route(SURF_ROUTING_RECURSIVE, e_route, 0);
-  xbt_dynar_free(&(e_route->generic_route.link_list));
-  xbt_free(e_route);
-
-  xbt_dict_set(dict_bypassRoutes, route_name, new_e_route,
-               (void (*)(void *)) generic_free_extended_route);
-  xbt_free(route_name);
-}
-
-/* ************************************************************************** */
-/* *********************** GENERIC BUSINESS METHODS ************************* */
-
-double generic_get_link_latency(routing_component_t rc,
-                                       const char *src, const char *dst,
-                                       route_extended_t route)
-{
-       int need_to_clean = route?0:1;
-       void * link;
-       unsigned int i;
-       double latency = 0.0;
-
-       route = route?route:rc->get_route(rc,src,dst);
-
-       xbt_dynar_foreach(route->generic_route.link_list,i,link) {
-               latency += get_link_latency(link);
-       }
-       if(need_to_clean) generic_free_extended_route(route);
-  return latency;
-}
-
-xbt_dynar_t generic_get_onelink_routes(routing_component_t rc)
-{
-  xbt_die("\"generic_get_onelink_routes\" not implemented yet");
-}
-
-route_extended_t generic_get_bypassroute(routing_component_t rc,
-                                                const char *src,
-                                                const char *dst)
-{
-  xbt_dict_t dict_bypassRoutes = rc->bypassRoutes;
-  routing_component_t src_as, dst_as;
-  int index_src, index_dst;
-  xbt_dynar_t path_src = NULL;
-  xbt_dynar_t path_dst = NULL;
-  routing_component_t current = NULL;
-  routing_component_t *current_src = NULL;
-  routing_component_t *current_dst = NULL;
-
-  /* (1) find the as where the src and dst are located */
-  void * src_data = xbt_lib_get_or_null(host_lib,src, ROUTING_HOST_LEVEL);
-  void * dst_data = xbt_lib_get_or_null(host_lib,dst, ROUTING_HOST_LEVEL);
-  if(!src_data) src_data = xbt_lib_get_or_null(as_router_lib,src, ROUTING_ASR_LEVEL);
-  if(!dst_data) dst_data = xbt_lib_get_or_null(as_router_lib,dst, ROUTING_ASR_LEVEL);
-
-  if(src_data == NULL || dst_data == NULL)
-         xbt_die("Ask for route \"from\"(%s) or \"to\"(%s) no found at AS \"%s\"",
-                    src, dst, rc->name);
-
-  src_as = ((network_element_info_t)src_data)->rc_component;
-  dst_as = ((network_element_info_t)dst_data)->rc_component;
-
-  /* (2) find the path to the root routing component */
-  path_src = xbt_dynar_new(sizeof(routing_component_t), NULL);
-  current = src_as;
-  while (current != NULL) {
-    xbt_dynar_push(path_src, &current);
-    current = current->routing_father;
-  }
-  path_dst = xbt_dynar_new(sizeof(routing_component_t), NULL);
-  current = dst_as;
-  while (current != NULL) {
-    xbt_dynar_push(path_dst, &current);
-    current = current->routing_father;
-  }
-
-  /* (3) find the common father */
-  index_src = path_src->used - 1;
-  index_dst = path_dst->used - 1;
-  current_src = xbt_dynar_get_ptr(path_src, index_src);
-  current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
-  while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
-    xbt_dynar_pop_ptr(path_src);
-    xbt_dynar_pop_ptr(path_dst);
-    index_src--;
-    index_dst--;
-    current_src = xbt_dynar_get_ptr(path_src, index_src);
-    current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
-  }
-
-  int max_index_src = path_src->used - 1;
-  int max_index_dst = path_dst->used - 1;
-
-  int max_index = max(max_index_src, max_index_dst);
-  int i, max;
-
-  route_extended_t e_route_bypass = NULL;
-
-  for (max = 0; max <= max_index; max++) {
-    for (i = 0; i < max; i++) {
-      if (i <= max_index_src && max <= max_index_dst) {
-        char *route_name = bprintf("%s#%s",
-                                   (*(routing_component_t *)
-                                    (xbt_dynar_get_ptr
-                                     (path_src, i)))->name,
-                                   (*(routing_component_t *)
-                                    (xbt_dynar_get_ptr
-                                     (path_dst, max)))->name);
-        e_route_bypass =
-            xbt_dict_get_or_null(dict_bypassRoutes, route_name);
-        xbt_free(route_name);
-      }
-      if (e_route_bypass)
-        break;
-      if (max <= max_index_src && i <= max_index_dst) {
-        char *route_name = bprintf("%s#%s",
-                                   (*(routing_component_t *)
-                                    (xbt_dynar_get_ptr
-                                     (path_src, max)))->name,
-                                   (*(routing_component_t *)
-                                    (xbt_dynar_get_ptr
-                                     (path_dst, i)))->name);
-        e_route_bypass =
-            xbt_dict_get_or_null(dict_bypassRoutes, route_name);
-        xbt_free(route_name);
-      }
-      if (e_route_bypass)
-        break;
-    }
-
-    if (e_route_bypass)
-      break;
-
-    if (max <= max_index_src && max <= max_index_dst) {
-      char *route_name = bprintf("%s#%s",
-                                 (*(routing_component_t *)
-                                  (xbt_dynar_get_ptr
-                                   (path_src, max)))->name,
-                                 (*(routing_component_t *)
-                                  (xbt_dynar_get_ptr
-                                   (path_dst, max)))->name);
-      e_route_bypass = xbt_dict_get_or_null(dict_bypassRoutes, route_name);
-      xbt_free(route_name);
-    }
-    if (e_route_bypass)
-      break;
-  }
-
-  xbt_dynar_free(&path_src);
-  xbt_dynar_free(&path_dst);
-
-  route_extended_t new_e_route = NULL;
-
-  if (e_route_bypass) {
-    void *link;
-    unsigned int cpt = 0;
-    new_e_route = xbt_new0(s_route_extended_t, 1);
-    new_e_route->src_gateway = xbt_strdup(e_route_bypass->src_gateway);
-    new_e_route->dst_gateway = xbt_strdup(e_route_bypass->dst_gateway);
-    new_e_route->generic_route.link_list =
-        xbt_dynar_new(global_routing->size_of_link, NULL);
-    xbt_dynar_foreach(e_route_bypass->generic_route.link_list, cpt, link) {
-      xbt_dynar_push(new_e_route->generic_route.link_list, &link);
-    }
-  }
-
-  return new_e_route;
-}
-
-/* ************************************************************************** */
-/* ************************* GENERIC AUX FUNCTIONS ************************** */
-
-route_t
-generic_new_route(e_surf_routing_hierarchy_t hierarchy,
-                           void *data, int order)
-{
-
-  char *link_name;
-  route_t new_route;
-  unsigned int cpt;
-  xbt_dynar_t links = NULL, links_id = NULL;
-
-  new_route = xbt_new0(s_route_t, 1);
-  new_route->link_list =
-      xbt_dynar_new(global_routing->size_of_link, NULL);
-
-  xbt_assert(hierarchy == SURF_ROUTING_BASE,
-              "the hierarchy type is not SURF_ROUTING_BASE");
-
-  links = ((route_t) data)->link_list;
 
-
-  links_id = new_route->link_list;
-
-  xbt_dynar_foreach(links, cpt, link_name) {
-
-    void *link =
-               xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
-    if (link) {
-      if (order)
-        xbt_dynar_push(links_id, &link);
-      else
-        xbt_dynar_unshift(links_id, &link);
-    } else
-      THROWF(mismatch_error, 0, "Link %s not found", link_name);
-  }
-
-  return new_route;
-}
-
-route_extended_t
-generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy,
-                           void *data, int order)
-{
-
-  char *link_name;
-  route_extended_t e_route, new_e_route;
-  route_t route;
-  unsigned int cpt;
-  xbt_dynar_t links = NULL, links_id = NULL;
-
-  new_e_route = xbt_new0(s_route_extended_t, 1);
-  new_e_route->generic_route.link_list =
-      xbt_dynar_new(global_routing->size_of_link, NULL);
-  new_e_route->src_gateway = NULL;
-  new_e_route->dst_gateway = NULL;
-
-  xbt_assert(hierarchy == SURF_ROUTING_BASE
-              || hierarchy == SURF_ROUTING_RECURSIVE,
-              "the hierarchy type is not defined");
-
-  if (hierarchy == SURF_ROUTING_BASE) {
-
-    route = (route_t) data;
-    links = route->link_list;
-
-  } else if (hierarchy == SURF_ROUTING_RECURSIVE) {
-
-    e_route = (route_extended_t) data;
-    xbt_assert(e_route->src_gateway
-                && e_route->dst_gateway, "bad gateway, is null");
-    links = e_route->generic_route.link_list;
-
-    /* remeber not erase the gateway names */
-    new_e_route->src_gateway = strdup(e_route->src_gateway);
-    new_e_route->dst_gateway = strdup(e_route->dst_gateway);
-  }
-
-  links_id = new_e_route->generic_route.link_list;
-
-  xbt_dynar_foreach(links, cpt, link_name) {
-
-    void *link =
-               xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
-    if (link) {
-      if (order)
-        xbt_dynar_push(links_id, &link);
-      else
-        xbt_dynar_unshift(links_id, &link);
-    } else
-      THROWF(mismatch_error, 0, "Link %s not found", link_name);
-  }
-
-  return new_e_route;
-}
-
-void generic_free_route(route_t route)
-{
-  if (route) {
-    xbt_dynar_free(&(route->link_list));
-    xbt_free(route);
-  }
-}
-
-void generic_free_extended_route(route_extended_t e_route)
-{
-  if (e_route) {
-    xbt_dynar_free(&(e_route->generic_route.link_list));
-    if (e_route->src_gateway)
-      xbt_free(e_route->src_gateway);
-    if (e_route->dst_gateway)
-      xbt_free(e_route->dst_gateway);
-    xbt_free(e_route);
-  }
-}
-
-static routing_component_t generic_as_exist(routing_component_t find_from,
-                                            routing_component_t to_find)
-{
-  //return to_find; // FIXME: BYPASSERROR OF FOREACH WITH BREAK
-  xbt_dict_cursor_t cursor = NULL;
-  char *key;
-  int found = 0;
-  routing_component_t elem;
-  xbt_dict_foreach(find_from->routing_sons, cursor, key, elem) {
-    if (to_find == elem || generic_as_exist(elem, to_find)) {
-      found = 1;
-      break;
-    }
-  }
-  if (found)
-    return to_find;
-  return NULL;
-}
-
-routing_component_t
-generic_autonomous_system_exist(routing_component_t rc, char *element)
-{
-  //return rc; // FIXME: BYPASSERROR OF FOREACH WITH BREAK
-  routing_component_t element_as, result, elem;
-  xbt_dict_cursor_t cursor = NULL;
-  char *key;
-  element_as = ((network_element_info_t)
-                xbt_lib_get_or_null(as_router_lib, element, ROUTING_ASR_LEVEL))->rc_component;
-  result = ((routing_component_t) - 1);
-  if (element_as != rc)
-    result = generic_as_exist(rc, element_as);
-
-  int found = 0;
-  if (result) {
-    xbt_dict_foreach(element_as->routing_sons, cursor, key, elem) {
-      found = !strcmp(elem->name, element);
-      if (found)
-        break;
-    }
-    if (found)
-      return element_as;
-  }
-  return NULL;
-}
-
-routing_component_t
-generic_processing_units_exist(routing_component_t rc, char *element)
-{
-  routing_component_t element_as;
-  element_as = ((network_element_info_t)
-                xbt_lib_get_or_null(host_lib,
-                 element, ROUTING_HOST_LEVEL))->rc_component;
-  if (element_as == rc)
-    return element_as;
-  return generic_as_exist(rc, element_as);
-}
-
-void generic_src_dst_check(routing_component_t rc, const char *src,
-                                  const char *dst)
-{
-
-  void * src_data = xbt_lib_get_or_null(host_lib,src, ROUTING_HOST_LEVEL);
-  void * dst_data = xbt_lib_get_or_null(host_lib,dst, ROUTING_HOST_LEVEL);
-  if(!src_data) src_data = xbt_lib_get_or_null(as_router_lib,src, ROUTING_ASR_LEVEL);
-  if(!dst_data) dst_data = xbt_lib_get_or_null(as_router_lib,dst, ROUTING_ASR_LEVEL);
-
-  if(src_data == NULL || dst_data == NULL)
-         xbt_die("Ask for route \"from\"(%s) or \"to\"(%s) no found at AS \"%s\"",
-                    src, dst, rc->name);
-
-  routing_component_t src_as = ((network_element_info_t)src_data)->rc_component;
-  routing_component_t dst_as = ((network_element_info_t)dst_data)->rc_component;
-
-  if(src_as != dst_as)
-         xbt_die("The src(%s in %s) and dst(%s in %s) are in differents AS",
-              src, src_as->name, dst, dst_as->name);
-  if(rc != dst_as)
-        xbt_die("The routing component of src'%s' and dst'%s' is not the same as the network elements belong (%s?=%s?=%s)",
-     src,dst,src_as->name, dst_as->name,rc->name);
-}
-
-static void routing_parse_Sconfig(void)
-{
-  XBT_DEBUG("START configuration name = %s",A_surfxml_config_id);
-}
-
-static void routing_parse_Econfig(void)
+static void routing_parse_cluster(sg_platf_cluster_cbarg_t cluster)
 {
-  xbt_dict_cursor_t cursor = NULL;
-  char *key;
-  char *elem;
-  char *cfg;
-  xbt_dict_foreach(current_property_set, cursor, key, elem) {
-         cfg = bprintf("%s:%s",key,elem);
-         if(xbt_cfg_is_default_value(_surf_cfg_set, key))
-                 xbt_cfg_set_parse(_surf_cfg_set, cfg);
-         else
-                 XBT_INFO("The custom configuration '%s' is already define by user!",key);
-         free(cfg);
-  }
-  XBT_DEBUG("End configuration name = %s",A_surfxml_config_id);
-}
-
-void routing_parse_Scluster(void)
-{
-  static int AX_ptr = 0;
-
-  char *cluster_id = A_surfxml_cluster_id;
-  char *cluster_prefix = A_surfxml_cluster_prefix;
-  char *cluster_suffix = A_surfxml_cluster_suffix;
-  char *cluster_radical = A_surfxml_cluster_radical;
-  char *cluster_power = A_surfxml_cluster_power;
-  char *cluster_core = A_surfxml_cluster_core;
-  char *cluster_bw = A_surfxml_cluster_bw;
-  char *cluster_lat = A_surfxml_cluster_lat;
-  char *temp_cluster_bw = NULL;
-  char *temp_cluster_lat = NULL;
-  char *temp_cluster_power = NULL;
-  char *cluster_bb_bw = A_surfxml_cluster_bb_bw;
-  char *cluster_bb_lat = A_surfxml_cluster_bb_lat;
-  char *cluster_availability_file = A_surfxml_cluster_availability_file;
-  char *cluster_state_file = A_surfxml_cluster_state_file;
   char *host_id, *groups, *link_id = NULL;
-  char *router_id;
-  char *availability_file = xbt_strdup(cluster_availability_file);
-  char *state_file = xbt_strdup(cluster_state_file);
+  xbt_dict_t patterns = NULL;
 
-  if(xbt_dict_size(patterns)==0)
-         patterns = xbt_dict_new();
+  s_sg_platf_host_cbarg_t host;
+  s_sg_platf_link_cbarg_t link;
 
-  xbt_dict_set(patterns,"id",cluster_id,NULL);
-  xbt_dict_set(patterns,"prefix",cluster_prefix,NULL);
-  xbt_dict_set(patterns,"suffix",cluster_suffix,NULL);
-
-#ifdef HAVE_PCRE_LIB
-  char *route_src_dst;
-#endif
   unsigned int iter;
   int start, end, i;
   xbt_dynar_t radical_elements;
   xbt_dynar_t radical_ends;
-  int cluster_sharing_policy = AX_surfxml_cluster_sharing_policy;
-  int cluster_bb_sharing_policy = AX_surfxml_cluster_bb_sharing_policy;
 
-#ifndef HAVE_PCRE_LIB
-  xbt_dynar_t tab_elements_num = xbt_dynar_new(sizeof(int), NULL);
-  char *route_src, *route_dst;
-  int j;
-#endif
-
-  static unsigned int surfxml_buffer_stack_stack_ptr = 1;
-  static unsigned int surfxml_buffer_stack_stack[1024];
-
-  surfxml_buffer_stack_stack[0] = 0;
+  if (strcmp(cluster->availability_trace, "")
+      || strcmp(cluster->state_trace, "")) {
+    patterns = xbt_dict_new_homogeneous(xbt_free_f);
+    xbt_dict_set(patterns, "id", xbt_strdup(cluster->id), NULL);
+    xbt_dict_set(patterns, "prefix", xbt_strdup(cluster->prefix), NULL);
+    xbt_dict_set(patterns, "suffix", xbt_strdup(cluster->suffix), NULL);
+  }
 
-  surfxml_bufferstack_push(1);
 
-  SURFXML_BUFFER_SET(AS_id, cluster_id);
-#ifdef HAVE_PCRE_LIB
-  SURFXML_BUFFER_SET(AS_routing, "RuleBased");
-  XBT_DEBUG("<AS id=\"%s\"\trouting=\"RuleBased\">", cluster_id);
-#else
-  SURFXML_BUFFER_SET(AS_routing, "Full");
-  XBT_DEBUG("<AS id=\"%s\"\trouting=\"Full\">", cluster_id);
-#endif
-  SURFXML_START_TAG(AS);
+  XBT_DEBUG("<AS id=\"%s\"\trouting=\"Cluster\">", cluster->id);
+  sg_platf_new_AS_begin(cluster->id, "Cluster");
 
-  radical_elements = xbt_str_split(cluster_radical, ",");
+  //Make all hosts
+  radical_elements = xbt_str_split(cluster->radical, ",");
   xbt_dynar_foreach(radical_elements, iter, groups) {
+
     radical_ends = xbt_str_split(groups, "-");
+    start = surf_parse_get_int(xbt_dynar_get_as(radical_ends, 0, char *));
+
     switch (xbt_dynar_length(radical_ends)) {
     case 1:
-      surf_parse_get_int(&start,
-                         xbt_dynar_get_as(radical_ends, 0, char *));
-      host_id = bprintf("%s%d%s", cluster_prefix, start, cluster_suffix);
-#ifndef HAVE_PCRE_LIB
-      xbt_dynar_push_as(tab_elements_num, int, start);
-#endif
-      link_id = bprintf("%s_link_%d", cluster_id, start);
-
-      xbt_dict_set(patterns, "radical", bprintf("%d", start), xbt_free);
-      temp_cluster_power = xbt_strdup(cluster_power);
-      temp_cluster_power = replace_random_parameter(temp_cluster_power);
-      XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%s\">", host_id, temp_cluster_power);
-      A_surfxml_host_state = A_surfxml_host_state_ON;
-      SURFXML_BUFFER_SET(host_id, host_id);
-      SURFXML_BUFFER_SET(host_power, temp_cluster_power);
-      SURFXML_BUFFER_SET(host_core, cluster_core);
-      SURFXML_BUFFER_SET(host_availability, "1.0");
-      SURFXML_BUFFER_SET(host_coordinates, "");
-      xbt_free(availability_file);
-      availability_file = xbt_strdup(cluster_availability_file);
-      xbt_free(state_file);
-      state_file = xbt_strdup(cluster_state_file);
-      XBT_DEBUG("\tavailability_file=\"%s\"",xbt_str_varsubst(availability_file,patterns));
-      XBT_DEBUG("\tstate_file=\"%s\"",xbt_str_varsubst(state_file,patterns));
-      SURFXML_BUFFER_SET(host_availability_file, xbt_str_varsubst(availability_file,patterns));
-      SURFXML_BUFFER_SET(host_state_file, xbt_str_varsubst(state_file,patterns));
-      XBT_DEBUG("</host>");
-      SURFXML_START_TAG(host);
-      SURFXML_END_TAG(host);
-
-
-      temp_cluster_bw = xbt_strdup(cluster_bw);
-      temp_cluster_bw = replace_random_parameter(temp_cluster_bw);
-      temp_cluster_lat = xbt_strdup(cluster_lat);
-      temp_cluster_lat = replace_random_parameter(temp_cluster_lat);
-      XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id,temp_cluster_bw, cluster_lat);
-      A_surfxml_link_state = A_surfxml_link_state_ON;
-      A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-      if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-         {A_surfxml_link_sharing_policy =  A_surfxml_link_sharing_policy_FULLDUPLEX;}
-      if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FATPIPE)
-         {A_surfxml_link_sharing_policy =  A_surfxml_link_sharing_policy_FATPIPE;}
-      SURFXML_BUFFER_SET(link_id, link_id);
-      SURFXML_BUFFER_SET(link_bandwidth, temp_cluster_bw);
-      SURFXML_BUFFER_SET(link_latency, temp_cluster_lat);
-      SURFXML_BUFFER_SET(link_bandwidth_file, "");
-      SURFXML_BUFFER_SET(link_latency_file, "");
-      SURFXML_BUFFER_SET(link_state_file, "");
-      SURFXML_START_TAG(link);
-      SURFXML_END_TAG(link);
-
-      xbt_free(temp_cluster_bw);
-      xbt_free(temp_cluster_lat);
-      xbt_free(temp_cluster_power);
-      free(link_id);
-      free(host_id);
+      end = start;
       break;
-
     case 2:
-
-      surf_parse_get_int(&start,
-                         xbt_dynar_get_as(radical_ends, 0, char *));
-      surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char *));
-      for (i = start; i <= end; i++) {
-        host_id = bprintf("%s%d%s", cluster_prefix, i, cluster_suffix);
-#ifndef HAVE_PCRE_LIB
-        xbt_dynar_push_as(tab_elements_num, int, i);
-#endif
-        link_id = bprintf("%s_link_%d", cluster_id, i);
-
-        xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free);
-        temp_cluster_power = xbt_strdup(cluster_power);
-        temp_cluster_power = replace_random_parameter(temp_cluster_power);
-        XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%s\">", host_id, temp_cluster_power);
-        A_surfxml_host_state = A_surfxml_host_state_ON;
-        SURFXML_BUFFER_SET(host_id, host_id);
-        SURFXML_BUFFER_SET(host_power, temp_cluster_power);
-        SURFXML_BUFFER_SET(host_core, cluster_core);
-        SURFXML_BUFFER_SET(host_availability, "1.0");
-        SURFXML_BUFFER_SET(host_coordinates, "");
-        xbt_free(availability_file);
-        availability_file = xbt_strdup(cluster_availability_file);
-        xbt_free(state_file);
-        state_file = xbt_strdup(cluster_state_file);
-        XBT_DEBUG("\tavailability_file=\"%s\"",xbt_str_varsubst(availability_file,patterns));
-        XBT_DEBUG("\tstate_file=\"%s\"",xbt_str_varsubst(state_file,patterns));
-        SURFXML_BUFFER_SET(host_availability_file, xbt_str_varsubst(availability_file,patterns));
-        SURFXML_BUFFER_SET(host_state_file, xbt_str_varsubst(state_file,patterns));
-        XBT_DEBUG("</host>");
-        SURFXML_START_TAG(host);
-        SURFXML_END_TAG(host);
-
-        xbt_free(temp_cluster_power);
-
-        temp_cluster_bw = xbt_strdup(cluster_bw);
-        temp_cluster_bw = replace_random_parameter(temp_cluster_bw);
-        temp_cluster_lat = xbt_strdup(cluster_lat);
-        temp_cluster_lat = replace_random_parameter(temp_cluster_lat);
-        XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id,temp_cluster_bw, cluster_lat);
-        A_surfxml_link_state = A_surfxml_link_state_ON;
-        A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-        if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-           {A_surfxml_link_sharing_policy =  A_surfxml_link_sharing_policy_FULLDUPLEX;}
-        if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FATPIPE)
-           {A_surfxml_link_sharing_policy =  A_surfxml_link_sharing_policy_FATPIPE;}
-        SURFXML_BUFFER_SET(link_id, link_id);
-        SURFXML_BUFFER_SET(link_bandwidth, temp_cluster_bw);
-        SURFXML_BUFFER_SET(link_latency, temp_cluster_lat);
-        SURFXML_BUFFER_SET(link_bandwidth_file, "");
-        SURFXML_BUFFER_SET(link_latency_file, "");
-        SURFXML_BUFFER_SET(link_state_file, "");
-        SURFXML_START_TAG(link);
-        SURFXML_END_TAG(link);
-
-        xbt_free(temp_cluster_bw);
-        xbt_free(temp_cluster_lat);
-        free(link_id);
-        free(host_id);
-      }
+      end = surf_parse_get_int(xbt_dynar_get_as(radical_ends, 1, char *));
       break;
-
     default:
-      XBT_DEBUG("Malformed radical");
-    }
-
-    xbt_dynar_free(&radical_ends);
-  }
-  xbt_dynar_free(&radical_elements);
-
-  XBT_DEBUG(" ");
-  router_id =
-      bprintf("%s%s_router%s", cluster_prefix, cluster_id,
-              cluster_suffix);
-
-  XBT_DEBUG("<router id=\"%s\"/>", router_id);
-  SURFXML_BUFFER_SET(router_id, router_id);
-  SURFXML_BUFFER_SET(router_coordinates, "");
-  SURFXML_START_TAG(router);
-  SURFXML_END_TAG(router);
-
-  if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-  char *link_backbone = bprintf("%s_backbone", cluster_id);
-  XBT_DEBUG("<link\tid=\"%s\" bw=\"%s\" lat=\"%s\"/>", link_backbone,cluster_bb_bw, cluster_bb_lat);
-  A_surfxml_link_state = A_surfxml_link_state_ON;
-  A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-  if(cluster_bb_sharing_policy == A_surfxml_cluster_bb_sharing_policy_FATPIPE)
-  {A_surfxml_link_sharing_policy =  A_surfxml_link_sharing_policy_FATPIPE;}
-  SURFXML_BUFFER_SET(link_id, link_backbone);
-  SURFXML_BUFFER_SET(link_bandwidth, cluster_bb_bw);
-  SURFXML_BUFFER_SET(link_latency, cluster_bb_lat);
-  SURFXML_BUFFER_SET(link_bandwidth_file, "");
-  SURFXML_BUFFER_SET(link_latency_file, "");
-  SURFXML_BUFFER_SET(link_state_file, "");
-  SURFXML_START_TAG(link);
-  SURFXML_END_TAG(link);
-  free(link_backbone);
-  }
-
-  XBT_DEBUG(" ");
-
-#ifdef HAVE_PCRE_LIB
-  char *new_suffix = xbt_strdup("");
-
-  radical_elements = xbt_str_split(cluster_suffix, ".");
-  xbt_dynar_foreach(radical_elements, iter, groups) {
-    if (strcmp(groups, "")) {
-      char *old_suffix = new_suffix;
-      new_suffix = bprintf("%s\\.%s", old_suffix, groups);
-      free(old_suffix);
+      surf_parse_error("Malformed radical");
+      break;
     }
-  }
-  route_src_dst = bprintf("%s(.*)%s", cluster_prefix, new_suffix);
-  xbt_dynar_free(&radical_elements);
-  free(new_suffix);
-
-  char *pcre_link_src = bprintf("%s_link_$1src", cluster_id);
-  char *pcre_link_backbone = bprintf("%s_backbone", cluster_id);
-  char *pcre_link_dst = bprintf("%s_link_$1dst", cluster_id);
-
-  //from router to router
-  XBT_DEBUG("<route\tsrc=\"%s\"\tdst=\"%s\"", router_id, router_id);
-  XBT_DEBUG("symmetrical=\"NO\">");
-  SURFXML_BUFFER_SET(route_src, router_id);
-  SURFXML_BUFFER_SET(route_dst, router_id);
-  A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-  SURFXML_START_TAG(route);
-
-  if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_backbone);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_backbone);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-  }
-
-  XBT_DEBUG("</route>");
-  SURFXML_END_TAG(route);
-
-  //from host to router
-  XBT_DEBUG("<route\tsrc=\"%s\"\tdst=\"%s\"", route_src_dst, router_id);
-  XBT_DEBUG("symmetrical=\"NO\">");
-  SURFXML_BUFFER_SET(route_src, route_src_dst);
-  SURFXML_BUFFER_SET(route_dst, router_id);
-  A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-  SURFXML_START_TAG(route);
-
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_src);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_src);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-  {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;}
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-
-  if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_backbone);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_backbone);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-  }
-
-  XBT_DEBUG("</route>");
-  SURFXML_END_TAG(route);
-
-  //from router to host
-  XBT_DEBUG("<route\tsrc=\"%s\"\tdst=\"%s\"", router_id, route_src_dst);
-  XBT_DEBUG("symmetrical=\"NO\">");
-  SURFXML_BUFFER_SET(route_src, router_id);
-  SURFXML_BUFFER_SET(route_dst, route_src_dst);
-  A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-  SURFXML_START_TAG(route);
-
-  if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_backbone);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_backbone);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-  }
-
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_dst);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_dst);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-  {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;}
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-
-  XBT_DEBUG("</route>");
-  SURFXML_END_TAG(route);
-
-  //from host to host
-  XBT_DEBUG("<route\tsrc=\"%s\"\tdst=\"%s\"", route_src_dst, route_src_dst);
-  XBT_DEBUG("symmetrical=\"NO\">");
-  SURFXML_BUFFER_SET(route_src, route_src_dst);
-  SURFXML_BUFFER_SET(route_dst, route_src_dst);
-  A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-  SURFXML_START_TAG(route);
-
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_src);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_src);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-  {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;}
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-
-  if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_backbone);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_backbone);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-  }
-
-  XBT_DEBUG("<link_ctn\tid=\"%s\"/>", pcre_link_dst);
-  SURFXML_BUFFER_SET(link_ctn_id, pcre_link_dst);
-  A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-  if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-  {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;}
-  SURFXML_START_TAG(link_ctn);
-  SURFXML_END_TAG(link_ctn);
-
-  XBT_DEBUG("</route>");
-  SURFXML_END_TAG(route);
-
-  free(pcre_link_dst);
-  free(pcre_link_backbone);
-  free(pcre_link_src);
-  free(route_src_dst);
-
-#else
-  for (i = 0; i <= xbt_dynar_length(tab_elements_num); i++) {
-    for (j = 0; j <= xbt_dynar_length(tab_elements_num); j++) {
-      if (i == xbt_dynar_length(tab_elements_num)) {
-        route_src = router_id;
+    for (i = start; i <= end; i++) {
+      host_id =
+          bprintf("%s%d%s", cluster->prefix, i, cluster->suffix);
+      link_id = bprintf("%s_link_%d", cluster->id, i);
+
+      XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%f\">", host_id, cluster->power);
+
+      memset(&host, 0, sizeof(host));
+      host.id = host_id;
+      if (strcmp(cluster->availability_trace, "")) {
+        xbt_dict_set(patterns, "radical", bprintf("%d", i), NULL);
+        char *avail_file = xbt_str_varsubst(cluster->availability_trace, patterns);
+        XBT_DEBUG("\tavailability_file=\"%s\"", avail_file);
+        host.power_trace = tmgr_trace_new(avail_file);
+        xbt_free(avail_file);
       } else {
-        route_src =
-            bprintf("%s%d%s", cluster_prefix,
-                    xbt_dynar_get_as(tab_elements_num, i, int),
-                    cluster_suffix);
+        XBT_DEBUG("\tavailability_file=\"\"");
       }
 
-      if (j == xbt_dynar_length(tab_elements_num)) {
-        route_dst = router_id;
+      if (strcmp(cluster->state_trace, "")) {
+        char *avail_file = xbt_str_varsubst(cluster->state_trace, patterns);
+        XBT_DEBUG("\tstate_file=\"%s\"", avail_file);
+        host.state_trace = tmgr_trace_new(avail_file);
+        xbt_free(avail_file);
       } else {
-        route_dst =
-            bprintf("%s%d%s", cluster_prefix,
-                    xbt_dynar_get_as(tab_elements_num, j, int),
-                    cluster_suffix);
-      }
-
-      XBT_DEBUG("<route\tsrc=\"%s\"\tdst=\"%s\"", route_src, route_dst);
-      XBT_DEBUG("symmetrical=\"NO\">");
-      SURFXML_BUFFER_SET(route_src, route_src);
-      SURFXML_BUFFER_SET(route_dst, route_dst);
-      A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
-      SURFXML_START_TAG(route);
-
-      if (i != xbt_dynar_length(tab_elements_num)){
-          route_src =
-                bprintf("%s_link_%d", cluster_id,
-                        xbt_dynar_get_as(tab_elements_num, i, int));
-                 XBT_DEBUG("<link_ctn\tid=\"%s\"/>", route_src);
-                 SURFXML_BUFFER_SET(link_ctn_id, route_src);
-                 A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-                 if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-                 {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_UP;}
-                 SURFXML_START_TAG(link_ctn);
-                 SURFXML_END_TAG(link_ctn);
-                 free(route_src);
+        XBT_DEBUG("\tstate_file=\"\"");
       }
 
-      if(strcmp(cluster_bb_bw,"") && strcmp(cluster_bb_lat,"")){
-      XBT_DEBUG("<link_ctn\tid=\"%s_backbone\"/>", cluster_id);
-      SURFXML_BUFFER_SET(link_ctn_id, bprintf("%s_backbone", cluster_id));
-      A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-      SURFXML_START_TAG(link_ctn);
-      SURFXML_END_TAG(link_ctn);
-      }
+      host.power_peak = cluster->power;
+      host.power_scale = 1.0;
+      host.core_amount = cluster->core_amount;
+      host.initial_state = SURF_RESOURCE_ON;
+      host.coord = "";
+      sg_platf_new_host(&host);
+      XBT_DEBUG("</host>");
 
-      if (j != xbt_dynar_length(tab_elements_num)) {
-          route_dst =
-                bprintf("%s_link_%d", cluster_id,
-                        xbt_dynar_get_as(tab_elements_num, j, int));
-                 XBT_DEBUG("<link_ctn\tid=\"%s\"/>", route_dst);
-                 SURFXML_BUFFER_SET(link_ctn_id, route_dst);
-                 A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
-                 if(cluster_sharing_policy == A_surfxml_cluster_sharing_policy_FULLDUPLEX)
-                 {A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_DOWN;}
-                 SURFXML_START_TAG(link_ctn);
-                 SURFXML_END_TAG(link_ctn);
-                 free(route_dst);
+      XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%f\"\tlat=\"%f\"/>", link_id,
+                cluster->bw, cluster->lat);
+
+      memset(&link, 0, sizeof(link));
+      link.id = link_id;
+      link.bandwidth = cluster->bw;
+      link.latency = cluster->lat;
+      link.state = SURF_RESOURCE_ON;
+      link.policy = cluster->sharing_policy;
+      sg_platf_new_link(&link);
+
+      surf_parsing_link_up_down_t info =
+          xbt_new0(s_surf_parsing_link_up_down_t, 1);
+      if (link.policy == SURF_LINK_FULLDUPLEX) {
+        char *tmp_link = bprintf("%s_UP", link_id);
+        info->link_up =
+            xbt_lib_get_or_null(link_lib, tmp_link, SURF_LINK_LEVEL);
+        free(tmp_link);
+        tmp_link = bprintf("%s_DOWN", link_id);
+        info->link_down =
+            xbt_lib_get_or_null(link_lib, tmp_link, SURF_LINK_LEVEL);
+        free(tmp_link);
+      } else {
+        info->link_up = xbt_lib_get_or_null(link_lib, link_id, SURF_LINK_LEVEL);
+        info->link_down = info->link_up;
       }
+      surf_routing_cluster_add_link(host_id, info);
 
-      XBT_DEBUG("</route>");
-      SURFXML_END_TAG(route);
+      xbt_free(link_id);
+      xbt_free(host_id);
     }
-  }
-  xbt_dynar_free(&tab_elements_num);
 
-#endif
+    xbt_dynar_free(&radical_ends);
+  }
+  xbt_dynar_free(&radical_elements);
 
-  free(router_id);
-  xbt_dict_free(&patterns);
-  free(availability_file);
-  free(state_file);
+  // Add a router. It is magically used thanks to the way in which surf_routing_cluster is written,
+  // and it's very useful to connect clusters together
+  XBT_DEBUG(" ");
+  XBT_DEBUG("<router id=\"%s\"/>", cluster->router_id);
+  char *newid = NULL;
+  s_sg_platf_router_cbarg_t router;
+  memset(&router, 0, sizeof(router));
+  router.id = cluster->router_id;
+  router.coord = "";
+  if (!router.id || !strcmp(router.id, ""))
+    router.id = newid =
+        bprintf("%s%s_router%s", cluster->prefix, cluster->id,
+                cluster->suffix);
+  sg_platf_new_router(&router);
+  free(newid);
+
+  //Make the backbone
+  if ((cluster->bb_bw != 0) && (cluster->bb_lat != 0)) {
+    char *link_backbone = bprintf("%s_backbone", cluster->id);
+    XBT_DEBUG("<link\tid=\"%s\" bw=\"%f\" lat=\"%f\"/>", link_backbone,
+              cluster->bb_bw, cluster->bb_lat);
+
+    memset(&link, 0, sizeof(link));
+    link.id = link_backbone;
+    link.bandwidth = cluster->bb_bw;
+    link.latency = cluster->bb_lat;
+    link.state = SURF_RESOURCE_ON;
+    link.policy = cluster->bb_sharing_policy;
+
+    sg_platf_new_link(&link);
+
+    surf_routing_cluster_add_backbone(current_routing, xbt_lib_get_or_null(link_lib, link_backbone, SURF_LINK_LEVEL));
+
+    free(link_backbone);
+  }
 
   XBT_DEBUG("</AS>");
-  SURFXML_END_TAG(AS);
+  sg_platf_new_AS_end();
   XBT_DEBUG(" ");
-
-  surfxml_bufferstack_pop(1);
-}
-/*
- * This function take a string and replace parameters from patterns dict.
- * It returns the new value.
- */
-static char* replace_random_parameter(char * string)
-{
-  char *test_string = NULL;
-
-  if(xbt_dict_size(random_value)==0)
-    return string;
-
-  string = xbt_str_varsubst(string, patterns); // for patterns of cluster
-  test_string = bprintf("${%s}", string);
-  test_string = xbt_str_varsubst(test_string,random_value); //Add ${xxxxx} for random Generator
-
-  if (strcmp(test_string,"")) { //if not empty, keep this value.
-    xbt_free(string);
-    string = test_string;
-  } //In other case take old value (without ${})
-  else
-       free(test_string);
-  return string;
+  xbt_dict_free(&patterns); // no op if it were never set
 }
 
-static void clean_dict_random(void)
-{
-       xbt_dict_free(&random_value);
-       xbt_dict_free(&patterns);
+static void routing_parse_postparse(void) {
+  xbt_dict_free(&random_value);
 }
 
-static void routing_parse_Speer(void)
+static void routing_parse_peer(sg_platf_peer_cbarg_t peer)
 {
   static int AX_ptr = 0;
-
-  char *peer_id = A_surfxml_peer_id;
-  char *peer_power = A_surfxml_peer_power;
-  char *peer_bw_in = A_surfxml_peer_bw_in;
-  char *peer_bw_out = A_surfxml_peer_bw_out;
-  char *peer_lat = A_surfxml_peer_lat;
-  char *peer_coord = A_surfxml_peer_coordinates;
-  char *peer_state_file = A_surfxml_peer_state_file;
-  char *peer_availability_file = A_surfxml_peer_availability_file;
-
   char *host_id = NULL;
   char *router_id, *link_router, *link_backbone, *link_id_up, *link_id_down;
 
@@ -1984,62 +887,56 @@ static void routing_parse_Speer(void)
 
   surfxml_bufferstack_push(1);
 
-  SURFXML_BUFFER_SET(AS_id, peer_id);
-
-  SURFXML_BUFFER_SET(AS_routing, "Full");
-  XBT_DEBUG("<AS id=\"%s\"\trouting=\"Full\">", peer_id);
-
-  SURFXML_START_TAG(AS);
+  XBT_DEBUG("<AS id=\"%s\"\trouting=\"Full\">", peer->id);
+  sg_platf_new_AS_begin(peer->id, "Full");
 
   XBT_DEBUG(" ");
-  host_id = bprintf("peer_%s", peer_id);
-  router_id = bprintf("router_%s", peer_id);
-  link_id_up = bprintf("link_%s_up", peer_id);
-  link_id_down = bprintf("link_%s_down", peer_id);
-
-  link_router = bprintf("%s_link_router", peer_id);
-  link_backbone = bprintf("%s_backbone", peer_id);
-
-  XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%s\"/>", host_id, peer_power);
-  A_surfxml_host_state = A_surfxml_host_state_ON;
-  SURFXML_BUFFER_SET(host_id, host_id);
-  SURFXML_BUFFER_SET(host_power, peer_power);
-  SURFXML_BUFFER_SET(host_availability, "1.0");
-  SURFXML_BUFFER_SET(host_availability_file, peer_availability_file);
-  SURFXML_BUFFER_SET(host_state_file, peer_state_file);
-  SURFXML_BUFFER_SET(host_coordinates, "");
-  SURFXML_START_TAG(host);
-  SURFXML_END_TAG(host);
-
-  XBT_DEBUG("<router id=\"%s\"\tcoordinates=\"%s\"/>", router_id, peer_coord);
-  SURFXML_BUFFER_SET(router_id, router_id);
-  SURFXML_BUFFER_SET(router_coordinates, peer_coord);
-  SURFXML_START_TAG(router);
-  SURFXML_END_TAG(router);
-
-  XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_up, peer_bw_in, peer_lat);
-  A_surfxml_link_state = A_surfxml_link_state_ON;
-  A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-  SURFXML_BUFFER_SET(link_id, link_id_up);
-  SURFXML_BUFFER_SET(link_bandwidth, peer_bw_in);
-  SURFXML_BUFFER_SET(link_latency, peer_lat);
-  SURFXML_BUFFER_SET(link_bandwidth_file, "");
-  SURFXML_BUFFER_SET(link_latency_file, "");
-  SURFXML_BUFFER_SET(link_state_file, "");
-  SURFXML_START_TAG(link);
-  SURFXML_END_TAG(link);
-
-  XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_down, peer_bw_out, peer_lat);
-  A_surfxml_link_state = A_surfxml_link_state_ON;
-  A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
-  SURFXML_BUFFER_SET(link_id, link_id_down);
-  SURFXML_BUFFER_SET(link_bandwidth, peer_bw_out);
-  SURFXML_BUFFER_SET(link_latency, peer_lat);
-  SURFXML_BUFFER_SET(link_bandwidth_file, "");
-  SURFXML_BUFFER_SET(link_latency_file, "");
-  SURFXML_BUFFER_SET(link_state_file, "");
-  SURFXML_START_TAG(link);
-  SURFXML_END_TAG(link);
+  host_id = HOST_PEER(peer->id);
+  router_id = ROUTER_PEER(peer->id);
+  link_id_up = LINK_UP_PEER(peer->id);
+  link_id_down = LINK_DOWN_PEER(peer->id);
+
+  link_router = bprintf("%s_link_router", peer->id);
+  link_backbone = bprintf("%s_backbone", peer->id);
+
+  XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%f\"/>", host_id, peer->power);
+  s_sg_platf_host_cbarg_t host;
+  memset(&host, 0, sizeof(host));
+  host.initial_state = SURF_RESOURCE_ON;
+  host.id = host_id;
+  host.power_peak = peer->power;
+  host.power_scale = 1.0;
+  host.power_trace = peer->availability_trace;
+  host.state_trace = peer->state_trace;
+  host.core_amount = 1;
+  host.coord = peer->coord;
+  sg_platf_new_host(&host);
+
+
+  XBT_DEBUG("<router id=\"%s\"\tcoordinates=\"%s\"/>", router_id, peer->coord);
+  s_sg_platf_router_cbarg_t router;
+  memset(&router, 0, sizeof(router));
+  router.id = router_id;
+  router.coord = peer->coord;
+  sg_platf_new_router(&router);
+
+  XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%f\"\tlat=\"%f\"/>", link_id_up,
+            peer->bw_in, peer->lat);
+  s_sg_platf_link_cbarg_t link;
+  memset(&link, 0, sizeof(link));
+  link.state = SURF_RESOURCE_ON;
+  link.policy = SURF_LINK_SHARED;
+  link.id = link_id_up;
+  link.bandwidth = peer->bw_in;
+  link.latency = peer->lat;
+  sg_platf_new_link(&link);
+
+  // FIXME: dealing with full duplex is not the role of this piece of code, I'd say [Mt]
+  // Instead, it should be created fullduplex, and the models will do what's needed in this case
+  XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%f\"\tlat=\"%f\"/>", link_id_down,
+            peer->bw_out, peer->lat);
+  link.id = link_id_down;
+  sg_platf_new_link(&link);
 
   XBT_DEBUG(" ");
 
@@ -2078,187 +975,176 @@ static void routing_parse_Speer(void)
   SURFXML_END_TAG(route);
 
   XBT_DEBUG("</AS>");
-  SURFXML_END_TAG(AS);
+  sg_platf_new_AS_end();
   XBT_DEBUG(" ");
 
   //xbt_dynar_free(&tab_elements_num);
-       free(host_id);
-       free(router_id);
-       free(link_router);
-       free(link_backbone);
-       free(link_id_up);
-       free(link_id_down);
+  free(host_id);
+  free(router_id);
+  free(link_router);
+  free(link_backbone);
+  free(link_id_up);
+  free(link_id_down);
   surfxml_bufferstack_pop(1);
 }
 
 static void routing_parse_Srandom(void)
 {
-         double mean, std, min, max, seed;
-         char *random_id = A_surfxml_random_id;
-         char *random_radical = A_surfxml_random_radical;
-         char *rd_name = NULL;
-         char *rd_value;
-         surf_parse_get_double(&mean,A_surfxml_random_mean);
-         surf_parse_get_double(&std,A_surfxml_random_std_deviation);
-         surf_parse_get_double(&min,A_surfxml_random_min);
-         surf_parse_get_double(&max,A_surfxml_random_max);
-         surf_parse_get_double(&seed,A_surfxml_random_seed);
-
-         double res = 0;
-         int i = 0;
-         random_data_t random = xbt_new0(s_random_data_t, 1);
-          char *tmpbuf;
-
-         xbt_dynar_t radical_elements;
-         unsigned int iter;
-         char *groups;
-         int start, end;
-         xbt_dynar_t radical_ends;
-
-         random->generator = A_surfxml_random_generator;
-         random->seed = seed;
-         random->min = min;
-         random->max = max;
-
-         /* Check user stupidities */
-         if (max < min)
-           THROWF(arg_error, 0, "random->max < random->min (%f < %f)", max, min);
-         if (mean < min)
-           THROWF(arg_error, 0, "random->mean < random->min (%f < %f)", mean,
-                  min);
-         if (mean > max)
-           THROWF(arg_error, 0, "random->mean > random->max (%f > %f)", mean,
-                  max);
-
-         /* normalize the mean and standard deviation before storing */
-         random->mean = (mean - min) / (max - min);
-         random->std = std / (max - min);
-
-         if (random->mean * (1 - random->mean) < random->std * random->std)
-           THROWF(arg_error, 0, "Invalid mean and standard deviation (%f and %f)",
-                  random->mean, random->std);
-
-         XBT_DEBUG("id = '%s' min = '%f' max = '%f' mean = '%f' std_deviatinon = '%f' generator = '%d' seed = '%ld' radical = '%s'",
-         random_id,
-         random->min,
-         random->max,
-         random->mean,
-         random->std,
-         random->generator,
-         random->seed,
-         random_radical);
-
-         if(xbt_dict_size(random_value)==0)
-                 random_value = xbt_dict_new();
-
-         if(!strcmp(random_radical,""))
-         {
-                 res = random_generate(random);
-                 rd_value = bprintf("%f",res);
-                 xbt_dict_set(random_value, random_id, rd_value, free);
-         }
-         else
-         {
-                 radical_elements = xbt_str_split(random_radical, ",");
-                 xbt_dynar_foreach(radical_elements, iter, groups) {
-                       radical_ends = xbt_str_split(groups, "-");
-                       switch (xbt_dynar_length(radical_ends)) {
-                       case 1:
-                                         xbt_assert(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",random_id);
-                                         res = random_generate(random);
-                                          tmpbuf = bprintf("%s%d",random_id,atoi(xbt_dynar_getfirst_as(radical_ends,char *)));
-                                          xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);
-                                          xbt_free(tmpbuf);
-                                         break;
-
-                       case 2:   surf_parse_get_int(&start,
-                                                                                xbt_dynar_get_as(radical_ends, 0, char *));
-                                         surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char *));
-                                         for (i = start; i <= end; i++) {
-                                                 xbt_assert(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",bprintf("%s%d",random_id,i));
-                                                 res = random_generate(random);
-                          tmpbuf = bprintf("%s%d",random_id,i);
-                                                 xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);
-                          xbt_free(tmpbuf);
-                                         }
-                                         break;
-                       default:
-                               XBT_INFO("Malformed radical");
-                       }
-                       res = random_generate(random);
-                       rd_name  = bprintf("%s_router",random_id);
-                       rd_value = bprintf("%f",res);
-                       xbt_dict_set(random_value, rd_name, rd_value, free);
-
-                       xbt_dynar_free(&radical_ends);
-                 }
-                 free(rd_name);
-                 xbt_dynar_free(&radical_elements);
-         }
-}
+  double mean, std, min, max, seed;
+  char *random_id = A_surfxml_random_id;
+  char *random_radical = A_surfxml_random_radical;
+  char *rd_name = NULL;
+  char *rd_value;
+  mean = surf_parse_get_double(A_surfxml_random_mean);
+  std = surf_parse_get_double(A_surfxml_random_std_deviation);
+  min = surf_parse_get_double(A_surfxml_random_min);
+  max = surf_parse_get_double(A_surfxml_random_max);
+  seed = surf_parse_get_double(A_surfxml_random_seed);
+
+  double res = 0;
+  int i = 0;
+  random_data_t random = xbt_new0(s_random_data_t, 1);
+  char *tmpbuf;
 
-static void routing_parse_Erandom(void)
-{
-       xbt_dict_cursor_t cursor = NULL;
-       char *key;
-       char *elem;
+  xbt_dynar_t radical_elements;
+  unsigned int iter;
+  char *groups;
+  int start, end;
+  xbt_dynar_t radical_ends;
+
+  random->generator = A_surfxml_random_generator;
+  random->seed = seed;
+  random->min = min;
+  random->max = max;
+
+  /* Check user stupidities */
+  if (max < min)
+    THROWF(arg_error, 0, "random->max < random->min (%f < %f)", max, min);
+  if (mean < min)
+    THROWF(arg_error, 0, "random->mean < random->min (%f < %f)", mean, min);
+  if (mean > max)
+    THROWF(arg_error, 0, "random->mean > random->max (%f > %f)", mean, max);
+
+  /* normalize the mean and standard deviation before storing */
+  random->mean = (mean - min) / (max - min);
+  random->std = std / (max - min);
+
+  if (random->mean * (1 - random->mean) < random->std * random->std)
+    THROWF(arg_error, 0, "Invalid mean and standard deviation (%f and %f)",
+           random->mean, random->std);
+
+  XBT_DEBUG
+      ("id = '%s' min = '%f' max = '%f' mean = '%f' std_deviatinon = '%f' generator = '%d' seed = '%ld' radical = '%s'",
+       random_id, random->min, random->max, random->mean, random->std,
+       random->generator, random->seed, random_radical);
+
+  if (!random_value)
+    random_value = xbt_dict_new_homogeneous(free);
+
+  if (!strcmp(random_radical, "")) {
+    res = random_generate(random);
+    rd_value = bprintf("%f", res);
+    xbt_dict_set(random_value, random_id, rd_value, NULL);
+  } else {
+    radical_elements = xbt_str_split(random_radical, ",");
+    xbt_dynar_foreach(radical_elements, iter, groups) {
+      radical_ends = xbt_str_split(groups, "-");
+      switch (xbt_dynar_length(radical_ends)) {
+      case 1:
+        xbt_assert(!xbt_dict_get_or_null(random_value, random_id),
+                   "Custom Random '%s' already exists !", random_id);
+        res = random_generate(random);
+        tmpbuf =
+            bprintf("%s%d", random_id,
+                    atoi(xbt_dynar_getfirst_as(radical_ends, char *)));
+        xbt_dict_set(random_value, tmpbuf, bprintf("%f", res), NULL);
+        xbt_free(tmpbuf);
+        break;
 
-       xbt_dict_foreach(random_value, cursor, key, elem) {
-         XBT_DEBUG("%s = %s",key,elem);
-       }
+      case 2:
+        start = surf_parse_get_int(xbt_dynar_get_as(radical_ends, 0, char *));
+        end = surf_parse_get_int(xbt_dynar_get_as(radical_ends, 1, char *));
+        for (i = start; i <= end; i++) {
+          xbt_assert(!xbt_dict_get_or_null(random_value, random_id),
+                     "Custom Random '%s' already exists !", bprintf("%s%d",
+                                                                    random_id,
+                                                                    i));
+          res = random_generate(random);
+          tmpbuf = bprintf("%s%d", random_id, i);
+          xbt_dict_set(random_value, tmpbuf, bprintf("%f", res), NULL);
+          xbt_free(tmpbuf);
+        }
+        break;
+      default:
+        XBT_CRITICAL("Malformed radical");
+        break;
+      }
+      res = random_generate(random);
+      rd_name = bprintf("%s_router", random_id);
+      rd_value = bprintf("%f", res);
+      xbt_dict_set(random_value, rd_name, rd_value, NULL);
 
+      xbt_dynar_free(&radical_ends);
+    }
+    free(rd_name);
+    xbt_dynar_free(&radical_elements);
+  }
 }
 
+void routing_register_callbacks()
+{
+  sg_platf_host_add_cb(parse_S_host);
+  sg_platf_router_add_cb(parse_S_router);
 
-/*
- * New methods to init the routing model component from the lua script
- */
+  surfxml_add_callback(STag_surfxml_random_cb_list, &routing_parse_Srandom);
 
-/*
- * calling parse_S_AS_lua with lua values
- */
-void routing_AS_init(const char *AS_id, const char *AS_routing)
-{
-  parse_S_AS_lua((char *) AS_id, (char *) AS_routing);
-}
+  surfxml_add_callback(STag_surfxml_route_cb_list, &routing_parse_S_route);
+  surfxml_add_callback(STag_surfxml_ASroute_cb_list, &routing_parse_S_ASroute);
+  surfxml_add_callback(STag_surfxml_bypassRoute_cb_list,
+                       &routing_parse_S_bypassRoute);
 
-/*
- * calling parse_E_AS_lua to fisnish the creation of routing component
- */
-void routing_AS_end(const char *AS_id)
-{
-  parse_E_AS_lua((char *) AS_id);
-}
+  surfxml_add_callback(ETag_surfxml_link_ctn_cb_list, &routing_parse_link_ctn);
 
-/*
- * add a host to the network element list
- */
+  surfxml_add_callback(ETag_surfxml_route_cb_list, &routing_parse_E_route);
+  surfxml_add_callback(ETag_surfxml_ASroute_cb_list, &routing_parse_E_ASroute);
+  surfxml_add_callback(ETag_surfxml_bypassRoute_cb_list,
+                       &routing_parse_E_bypassRoute);
 
-void routing_add_host(const char *host_id)
-{
-  parse_S_host_lua((char *) host_id, (char*)""); // FIXME propagate coordinate system to lua
-}
+  sg_platf_cluster_add_cb(routing_parse_cluster);
 
-/*
- * Set a new link on the actual list of link for a route or ASroute
- */
-void routing_add_link(const char *link_id)
-{
-  parse_E_link_c_ctn_new_elem_lua((char *) link_id);
+  sg_platf_peer_add_cb(routing_parse_peer);
+  sg_platf_postparse_add_cb(routing_parse_postparse);
+
+#ifdef HAVE_TRACING
+  instr_routing_define_callbacks();
+#endif
 }
 
-/*
- *Set the endpoints for a route
+/**
+ * \brief Recursive function for finalize
+ *
+ * \param rc the source host name
+ *
+ * This fuction is call by "finalize". It allow to finalize the
+ * AS or routing components. It delete all the structures.
  */
-void routing_set_route(const char *src_id, const char *dst_id)
-{
-  parse_S_route_new_and_endpoints_lua(src_id, dst_id);
+static void finalize_rec(AS_t as) {
+  xbt_dict_cursor_t cursor = NULL;
+  char *key;
+  AS_t elem;
+
+  xbt_dict_foreach(as->routing_sons, cursor, key, elem) {
+    finalize_rec(elem);
+  }
+
+  as->finalize(as);
 }
 
-/*
- * Store the route by calling parse_E_route_store_route
- */
-void routing_store_route(void)
-{
-  parse_E_route_store_route();
+/** \brief Frees all memory allocated by the routing module */
+void routing_exit(void) {
+  if (!global_routing)
+    return;
+  xbt_dynar_free(&global_routing->last_route);
+  finalize_rec(global_routing->root);
+  xbt_free(global_routing);
 }
diff --git a/src/surf/surf_routing_cluster.c b/src/surf/surf_routing_cluster.c
new file mode 100644 (file)
index 0000000..8400159
--- /dev/null
@@ -0,0 +1,75 @@
+/* Copyright (c) 2009, 2010, 2011. 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 "surf_routing_private.h"
+
+/* Global vars */
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf");
+
+/* This routing is specifically setup to represent clusters, aka homogeneous sets of machines
+ * Note that a router is created, easing the interconnexion with the rest of the world.
+ */
+
+typedef struct {
+  s_as_t generic_routing;
+  void *backbone;
+} s_as_cluster_t, *as_cluster_t;
+
+
+static xbt_dict_t cluster_host_link = NULL;
+
+/* Business methods */
+static void cluster_get_route_and_latency(AS_t as,
+                                          const char *src, const char *dst,
+                                          route_t route, double *lat) {
+
+         surf_parsing_link_up_down_t info;
+
+         info = xbt_dict_get_or_null(cluster_host_link,src);
+         if(info) { // link up
+           xbt_dynar_push_as(route->link_list,void*,info->link_up);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(info->link_up);
+         }
+
+         if ( ((as_cluster_t)as)->backbone ) {
+           xbt_dynar_push_as(route->link_list,void*, ((as_cluster_t)as)->backbone) ;
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(((as_cluster_t)as)->backbone);
+         }
+
+         info = xbt_dict_get_or_null(cluster_host_link,dst);
+         if(info) { // link down
+           xbt_dynar_push_as(route->link_list,void*,info->link_down);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(info->link_down);
+         }
+}
+
+static void model_cluster_finalize(AS_t as) {
+  xbt_dict_free(&cluster_host_link);
+  model_none_finalize(as);
+}
+/* Creation routing model functions */
+AS_t model_cluster_create(void)
+{
+  AS_t result = model_none_create_sized(sizeof(s_as_cluster_t));
+  result->get_route_and_latency = cluster_get_route_and_latency;
+  result->finalize = model_cluster_finalize;
+
+  return (AS_t) result;
+}
+
+void surf_routing_cluster_add_link(const char* host_id,surf_parsing_link_up_down_t info) {
+  if(!cluster_host_link)
+    cluster_host_link = xbt_dict_new_homogeneous(xbt_free);
+
+ xbt_dict_set(cluster_host_link,host_id,info,NULL);
+}
+
+void surf_routing_cluster_add_backbone(AS_t as, void* bb) {
+  ((as_cluster_t)as)->backbone = bb;
+}
index 6a89c34..52d4926 100644 (file)
@@ -8,18 +8,16 @@
 
 /* Global vars */
 extern routing_global_t global_routing;
-extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
 
 typedef struct {
-  s_routing_component_t generic_routing;
+  s_as_t generic_routing;
   xbt_graph_t route_graph;      /* xbt_graph */
   xbt_dict_t graph_node_map;    /* map */
   xbt_dict_t route_cache;       /* use in cache mode */
   int cached;
-} s_routing_component_dijkstra_t, *routing_component_dijkstra_t;
+} s_as_dijkstra_t, *as_dijkstra_t;
 
 
 typedef struct graph_node_data {
@@ -50,30 +48,25 @@ static void route_cache_elem_free(void *e)
 static void graph_node_map_elem_free(void *e)
 {
   graph_node_map_element_t elm = (graph_node_map_element_t) e;
-  if (elm) {
-    xbt_free(elm);
-  }
+  xbt_free(elm);
 }
 
-static void graph_edge_data_free(void *e)
+static void graph_edge_data_free(void *e) // FIXME: useless code dupplication
 {
-  route_extended_t e_route = (route_extended_t) e;
+  route_t e_route = (route_t) e;
   if (e_route) {
-    xbt_dynar_free(&(e_route->generic_route.link_list));
-    if (e_route->src_gateway)
-      xbt_free(e_route->src_gateway);
-    if (e_route->dst_gateway)
-      xbt_free(e_route->dst_gateway);
+    xbt_dynar_free(&(e_route->link_list));
+    xbt_free(e_route->src_gateway);
+    xbt_free(e_route->dst_gateway);
     xbt_free(e_route);
   }
 }
 
 /* Utility functions */
 
-static xbt_node_t route_graph_new_node(routing_component_dijkstra_t rc,
+static xbt_node_t route_graph_new_node(as_dijkstra_t as,
                                        int id, int graph_id)
 {
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
   xbt_node_t node = NULL;
   graph_node_data_t data = NULL;
   graph_node_map_element_t elm = NULL;
@@ -81,22 +74,21 @@ static xbt_node_t route_graph_new_node(routing_component_dijkstra_t rc,
   data = xbt_new0(struct graph_node_data, 1);
   data->id = id;
   data->graph_id = graph_id;
-  node = xbt_graph_new_node(routing->route_graph, data);
+  node = xbt_graph_new_node(as->route_graph, data);
 
   elm = xbt_new0(struct graph_node_map_element, 1);
   elm->node = node;
-  xbt_dict_set_ext(routing->graph_node_map, (char *) (&id), sizeof(int),
-                   (xbt_set_elm_t) elm, &graph_node_map_elem_free);
+  xbt_dict_set_ext(as->graph_node_map, (char *) (&id), sizeof(int),
+                   (xbt_set_elm_t) elm, NULL);
 
   return node;
 }
 
 static graph_node_map_element_t
-graph_node_map_search(routing_component_dijkstra_t rc, int id)
+graph_node_map_search(as_dijkstra_t as, int id)
 {
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
   graph_node_map_element_t elm = (graph_node_map_element_t)
-      xbt_dict_get_or_null_ext(routing->graph_node_map,
+      xbt_dict_get_or_null_ext(as->graph_node_map,
                                (char *) (&id),
                                sizeof(int));
   return elm;
@@ -104,20 +96,19 @@ graph_node_map_search(routing_component_dijkstra_t rc, int id)
 
 /* Parsing */
 
-static void route_new_dijkstra(routing_component_dijkstra_t rc, int src_id,
-                               int dst_id, route_extended_t e_route)
+static void route_new_dijkstra(as_dijkstra_t as, int src_id,
+                               int dst_id, route_t e_route)
 {
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
   XBT_DEBUG("Load Route from \"%d\" to \"%d\"", src_id, dst_id);
   xbt_node_t src = NULL;
   xbt_node_t dst = NULL;
 
   graph_node_map_element_t src_elm = (graph_node_map_element_t)
-      xbt_dict_get_or_null_ext(routing->graph_node_map,
+      xbt_dict_get_or_null_ext(as->graph_node_map,
                                (char *) (&src_id),
                                sizeof(int));
   graph_node_map_element_t dst_elm = (graph_node_map_element_t)
-      xbt_dict_get_or_null_ext(routing->graph_node_map,
+      xbt_dict_get_or_null_ext(as->graph_node_map,
                                (char *) (&dst_id),
                                sizeof(int));
 
@@ -130,26 +121,23 @@ static void route_new_dijkstra(routing_component_dijkstra_t rc, int src_id,
 
   /* add nodes if they don't exist in the graph */
   if (src_id == dst_id && src == NULL && dst == NULL) {
-    src = route_graph_new_node(rc, src_id, -1);
+    src = route_graph_new_node(as, src_id, -1);
     dst = src;
   } else {
     if (src == NULL) {
-      src = route_graph_new_node(rc, src_id, -1);
+      src = route_graph_new_node(as, src_id, -1);
     }
     if (dst == NULL) {
-      dst = route_graph_new_node(rc, dst_id, -1);
+      dst = route_graph_new_node(as, dst_id, -1);
     }
   }
 
   /* add link as edge to graph */
-  xbt_graph_new_edge(routing->route_graph, src, dst, e_route);
+  xbt_graph_new_edge(as->route_graph, src, dst, e_route);
 }
 
-static void add_loopback_dijkstra(routing_component_dijkstra_t rc)
-{
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
-
-  xbt_dynar_t nodes = xbt_graph_get_nodes(routing->route_graph);
+static void add_loopback_dijkstra(as_dijkstra_t as) {
+  xbt_dynar_t nodes = xbt_graph_get_nodes(as->route_graph);
 
   xbt_node_t node = NULL;
   unsigned int cursor2;
@@ -168,135 +156,115 @@ static void add_loopback_dijkstra(routing_component_dijkstra_t rc)
     }
 
     if (!found) {
-      route_extended_t e_route = xbt_new0(s_route_extended_t, 1);
-      e_route->src_gateway = NULL;
-      e_route->dst_gateway = NULL;
-      e_route->generic_route.link_list =
-          xbt_dynar_new(global_routing->size_of_link, NULL);
-      xbt_dynar_push(e_route->generic_route.link_list,
+      route_t e_route = xbt_new0(s_route_t, 1);
+      e_route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+      xbt_dynar_push(e_route->link_list,
                      &global_routing->loopback);
-      xbt_graph_new_edge(routing->route_graph, node, node, e_route);
+      xbt_graph_new_edge(as->route_graph, node, node, e_route);
     }
   }
 }
 
-static route_extended_t dijkstra_get_route(routing_component_t rc,
-        const char *src,
-        const char *dst);
+static void dijkstra_get_route_and_latency(AS_t as_generic,
+        const char *src, const char *dst, route_t route, double *lat);
 
-static xbt_dynar_t dijkstra_get_onelink_routes(routing_component_t rc)
+static xbt_dynar_t dijkstra_get_onelink_routes(AS_t as)
 {
- // xbt_die("\"dijkstra_get_onelink_routes\" function not implemented yet");
          xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
 
-         routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
          //size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
          xbt_dict_cursor_t c1 = NULL, c2 = NULL;
          char *k1, *d1, *k2, *d2;
-         xbt_dict_foreach(routing->generic_routing.to_index, c1, k1, d1) {
-           xbt_dict_foreach(routing->generic_routing.to_index, c2, k2, d2) {
-             route_extended_t route = dijkstra_get_route(rc, k1, k2);
-             if (route) {
-               if (xbt_dynar_length(route->generic_route.link_list) == 1) {
-                 void *link =
-                     *(void **) xbt_dynar_get_ptr(route->generic_route.link_list,
-                                                  0);
-                 onelink_t onelink = xbt_new0(s_onelink_t, 1);
-                 onelink->link_ptr = link;
-                 if (routing->generic_routing.hierarchy == SURF_ROUTING_BASE) {
-                   onelink->src = xbt_strdup(k1);
-                   onelink->dst = xbt_strdup(k2);
-                 } else if (routing->generic_routing.hierarchy ==
-                            SURF_ROUTING_RECURSIVE) {
-                   onelink->src = xbt_strdup(route->src_gateway);
-                   onelink->dst = xbt_strdup(route->dst_gateway);
-                 }
-                 xbt_dynar_push(ret, &onelink);
+         xbt_dict_foreach(as->to_index, c1, k1, d1) {
+           xbt_dict_foreach(as->to_index, c2, k2, d2) {
+             route_t route = xbt_new0(s_route_t,1);
+             route->link_list = xbt_dynar_new(global_routing->size_of_link,NULL);
+             dijkstra_get_route_and_latency(as, k1, k2,route, NULL);
+
+             if (xbt_dynar_length(route->link_list) == 1) {
+               void *link =
+                   *(void **) xbt_dynar_get_ptr(route->link_list, 0);
+               onelink_t onelink = xbt_new0(s_onelink_t, 1);
+               onelink->link_ptr = link;
+               if (as->hierarchy == SURF_ROUTING_BASE) {
+                 onelink->src = xbt_strdup(k1);
+                 onelink->dst = xbt_strdup(k2);
+               } else if (as->hierarchy ==
+                   SURF_ROUTING_RECURSIVE) {
+                 onelink->src = xbt_strdup(route->src_gateway);
+                 onelink->dst = xbt_strdup(route->dst_gateway);
                }
+               xbt_dynar_push(ret, &onelink);
              }
            }
          }
          return ret;
 }
 
-static route_extended_t dijkstra_get_route(routing_component_t rc,
-                                           const char *src,
-                                           const char *dst)
+static void dijkstra_get_route_and_latency(AS_t asg,
+                               const char *src, const char *dst,
+                               route_t route, double *lat)
 {
-  xbt_assert(rc && src
-              && dst,
-              "Invalid params for \"get_route\" function at AS \"%s\"",
-              rc->name);
 
   /* set utils vars */
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
-
-  generic_src_dst_check(rc, src, dst);
-  int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
-  int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
-  xbt_assert(src_id
-              && dst_id,
-              "Ask for route \"from\"(%s)  or \"to\"(%s) no found in the local table",
-              src, dst);
-
-  /* create a result route */
-  route_extended_t new_e_route = xbt_new0(s_route_extended_t, 1);
-  new_e_route->generic_route.link_list =
-      xbt_dynar_new(global_routing->size_of_link, NULL);
-  new_e_route->src_gateway = NULL;
-  new_e_route->dst_gateway = NULL;
+  as_dijkstra_t as = (as_dijkstra_t) asg;
+
+  generic_src_dst_check(asg, src, dst);
+  int *src_id = xbt_dict_get_or_null(asg->to_index, src);
+  int *dst_id = xbt_dict_get_or_null(asg->to_index, dst);
+  if (!src_id || !dst_id)
+    THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
   int *pred_arr = NULL;
   int src_node_id = 0;
   int dst_node_id = 0;
   int *nodeid = NULL;
   int v;
-  route_extended_t e_route;
+  route_t e_route;
   int size = 0;
   unsigned int cpt;
   void *link;
   xbt_dynar_t links = NULL;
   route_cache_element_t elm = NULL;
-  xbt_dynar_t nodes = xbt_graph_get_nodes(routing->route_graph);
+  xbt_dynar_t nodes = xbt_graph_get_nodes(as->route_graph);
 
   /* Use the graph_node id mapping set to quickly find the nodes */
   graph_node_map_element_t src_elm =
-      graph_node_map_search(routing, *src_id);
+      graph_node_map_search(as, *src_id);
   graph_node_map_element_t dst_elm =
-      graph_node_map_search(routing, *dst_id);
-  xbt_assert(src_elm != NULL
-              && dst_elm != NULL, "src %d or dst %d does not exist",
-              *src_id, *dst_id);
+      graph_node_map_search(as, *dst_id);
+
   src_node_id = ((graph_node_data_t)
                  xbt_graph_node_get_data(src_elm->node))->graph_id;
   dst_node_id = ((graph_node_data_t)
                  xbt_graph_node_get_data(dst_elm->node))->graph_id;
 
-  /* if the src and dst are the same *//* fixed, missing in the previous version */
+  /* if the src and dst are the same */
   if (src_node_id == dst_node_id) {
 
     xbt_node_t node_s_v = xbt_dynar_get_as(nodes, src_node_id, xbt_node_t);
     xbt_node_t node_e_v = xbt_dynar_get_as(nodes, dst_node_id, xbt_node_t);
     xbt_edge_t edge =
-        xbt_graph_get_edge(routing->route_graph, node_s_v, node_e_v);
+        xbt_graph_get_edge(as->route_graph, node_s_v, node_e_v);
 
-    xbt_assert(edge != NULL, "no route between host %d and %d", *src_id,
-                *dst_id);
+    if (edge == NULL)
+      THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
-    e_route = (route_extended_t) xbt_graph_edge_get_data(edge);
+    e_route = (route_t) xbt_graph_edge_get_data(edge);
 
-    links = e_route->generic_route.link_list;
+    links = e_route->link_list;
     xbt_dynar_foreach(links, cpt, link) {
-      xbt_dynar_unshift(new_e_route->generic_route.link_list, &link);
+      xbt_dynar_unshift(route->link_list, &link);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(link);
     }
 
-    return new_e_route;
   }
 
-  if (routing->cached) {
+  if (as->cached) {
     /*check if there is a cached predecessor list avail */
     elm = (route_cache_element_t)
-        xbt_dict_get_or_null_ext(routing->route_cache, (char *) (&src_id),
+        xbt_dict_get_or_null_ext(as->route_cache, (char *) (&src_id),
                                  sizeof(int));
   }
 
@@ -341,9 +309,8 @@ static route_extended_t dijkstra_get_route(routing_component_t rc,
         xbt_node_t u_node = xbt_graph_edge_get_target(edge);
         graph_node_data_t data = xbt_graph_node_get_data(u_node);
         int u_id = data->graph_id;
-        route_extended_t tmp_e_route =
-            (route_extended_t) xbt_graph_edge_get_data(edge);
-        int cost_v_u = (tmp_e_route->generic_route.link_list)->used;    /* count of links, old model assume 1 */
+        route_t tmp_e_route = (route_t) xbt_graph_edge_get_data(edge);
+        int cost_v_u = (tmp_e_route->link_list)->used;    /* count of links, old model assume 1 */
 
         if (cost_v_u + cost_arr[*v_id] < cost_arr[u_id]) {
           pred_arr[u_id] = *v_id;
@@ -370,152 +337,127 @@ static route_extended_t dijkstra_get_route(routing_component_t rc,
         xbt_dynar_get_as(nodes, pred_arr[v], xbt_node_t);
     xbt_node_t node_v = xbt_dynar_get_as(nodes, v, xbt_node_t);
     xbt_edge_t edge =
-        xbt_graph_get_edge(routing->route_graph, node_pred_v, node_v);
+        xbt_graph_get_edge(as->route_graph, node_pred_v, node_v);
 
-    xbt_assert(edge != NULL, "no route between host %d and %d", *src_id,
-                *dst_id);
+    if (edge == NULL)
+      THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
     prev_gw_src = gw_src;
 
-    e_route = (route_extended_t) xbt_graph_edge_get_data(edge);
+    e_route = (route_t) xbt_graph_edge_get_data(edge);
     gw_src = e_route->src_gateway;
     gw_dst = e_route->dst_gateway;
 
     if (v == dst_node_id)
       first_gw = gw_dst;
 
-    if (rc->hierarchy == SURF_ROUTING_RECURSIVE && v != dst_node_id
+    if (asg->hierarchy == SURF_ROUTING_RECURSIVE && v != dst_node_id
         && strcmp(gw_dst, prev_gw_src)) {
-      xbt_dynar_t e_route_as_to_as =
-          (*(global_routing->get_route)) (gw_dst, prev_gw_src);
-      xbt_assert(e_route_as_to_as, "no route between \"%s\" and \"%s\"",
-                  gw_dst, prev_gw_src);
+      xbt_dynar_t e_route_as_to_as=NULL;
+      routing_get_route_and_latency(gw_dst, prev_gw_src,&e_route_as_to_as,NULL);
+      if (edge == NULL)
+        THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
       links = e_route_as_to_as;
       int pos = 0;
       xbt_dynar_foreach(links, cpt, link) {
-        xbt_dynar_insert_at(new_e_route->generic_route.link_list, pos,
-                            &link);
+        xbt_dynar_insert_at(route->link_list, pos, &link);
+        if (lat)
+          *lat += surf_network_model->extension.network.get_link_latency(link);
         pos++;
       }
     }
 
-    links = e_route->generic_route.link_list;
+    links = e_route->link_list;
     xbt_dynar_foreach(links, cpt, link) {
-      xbt_dynar_unshift(new_e_route->generic_route.link_list, &link);
+      xbt_dynar_unshift(route->link_list, &link);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(link);
     }
     size++;
   }
 
-  if (rc->hierarchy == SURF_ROUTING_RECURSIVE) {
-    new_e_route->src_gateway = xbt_strdup(gw_src);
-    new_e_route->dst_gateway = xbt_strdup(first_gw);
+  if (asg->hierarchy == SURF_ROUTING_RECURSIVE) {
+    route->src_gateway = xbt_strdup(gw_src);
+    route->dst_gateway = xbt_strdup(first_gw);
   }
 
-  if (routing->cached && elm == NULL) {
+  if (as->cached && elm == NULL) {
     /* add to predecessor list of the current src-host to cache */
     elm = xbt_new0(struct route_cache_element, 1);
     elm->pred_arr = pred_arr;
     elm->size = size;
-    xbt_dict_set_ext(routing->route_cache, (char *) (&src_id), sizeof(int),
-                     (xbt_set_elm_t) elm, &route_cache_elem_free);
+    xbt_dict_set_ext(as->route_cache, (char *) (&src_id), sizeof(int),
+                     (xbt_set_elm_t) elm, NULL);
   }
 
-  if (!routing->cached)
+  if (!as->cached)
     xbt_free(pred_arr);
-
-  return new_e_route;
 }
 
-static void dijkstra_finalize(routing_component_t rc)
+static void dijkstra_finalize(AS_t asg)
 {
-  routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
-
-  if (routing) {
-    xbt_graph_free_graph(routing->route_graph, &xbt_free,
-                         &graph_edge_data_free, &xbt_free);
-    xbt_dict_free(&routing->graph_node_map);
-    if (routing->cached)
-      xbt_dict_free(&routing->route_cache);
-    /* Delete bypass dict */
-    xbt_dict_free(&routing->generic_routing.bypassRoutes);
-    /* Delete index dict */
-    xbt_dict_free(&(routing->generic_routing.to_index));
-    /* Delete structure */
-    xbt_free(routing);
-  }
+  as_dijkstra_t as = (as_dijkstra_t) asg;
+
+  xbt_graph_free_graph(as->route_graph, &xbt_free,
+      &graph_edge_data_free, &xbt_free);
+  xbt_dict_free(&as->graph_node_map);
+  if (as->cached)
+    xbt_dict_free(&as->route_cache);
+
+  model_generic_finalize(asg);
 }
 
 /* Creation routing model functions */
 
-void *model_dijkstra_both_create(int cached)
+AS_t model_dijkstra_both_create(int cached)
 {
-  routing_component_dijkstra_t new_component =
-      xbt_new0(s_routing_component_dijkstra_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      generic_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      generic_set_autonomous_system;
-  new_component->generic_routing.set_route = model_dijkstra_both_set_route;
-  new_component->generic_routing.set_ASroute = model_dijkstra_both_set_route;
-  new_component->generic_routing.set_bypassroute = generic_set_bypassroute;
-  new_component->generic_routing.get_route = dijkstra_get_route;
-  new_component->generic_routing.get_latency = generic_get_link_latency;
+  as_dijkstra_t new_component = (as_dijkstra_t)
+      model_generic_create_sized(sizeof(s_as_dijkstra_t));
+
+  new_component->generic_routing.parse_route = model_dijkstra_both_parse_route;
+  new_component->generic_routing.parse_ASroute = model_dijkstra_both_parse_route;
+  new_component->generic_routing.get_route_and_latency = dijkstra_get_route_and_latency;
   new_component->generic_routing.get_onelink_routes =
       dijkstra_get_onelink_routes;
-  new_component->generic_routing.get_bypass_route =
-      generic_get_bypassroute;
   new_component->generic_routing.finalize = dijkstra_finalize;
   new_component->cached = cached;
-  new_component->generic_routing.to_index = xbt_dict_new();
-  new_component->generic_routing.bypassRoutes = xbt_dict_new();
-  new_component->generic_routing.get_network_element_type = get_network_element_type;
-  return new_component;
+
+  return (AS_t)new_component;
 }
 
-void *model_dijkstra_create(void)
+AS_t model_dijkstra_create(void)
 {
   return model_dijkstra_both_create(0);
 }
 
-void *model_dijkstracache_create(void)
+AS_t model_dijkstracache_create(void)
 {
   return model_dijkstra_both_create(1);
 }
 
-void model_dijkstra_both_load(void)
-{
-  /* use "surfxml_add_callback" to add a parse function call */
-}
-
-void model_dijkstra_both_unload(void)
-{
-  /* use "surfxml_del_callback" to remove a parse function call */
-}
-
-void model_dijkstra_both_end(void)
+void model_dijkstra_both_end(AS_t as)
 {
-  routing_component_dijkstra_t routing =
-      (routing_component_dijkstra_t) current_routing;
+  as_dijkstra_t THIS_AS = (as_dijkstra_t) as;
 
   xbt_node_t node = NULL;
   unsigned int cursor2;
   xbt_dynar_t nodes = NULL;
 
   /* Create the topology graph */
-  if(!routing->route_graph)
-  routing->route_graph = xbt_graph_new_graph(1, NULL);
-  if(!routing->graph_node_map)
-  routing->graph_node_map = xbt_dict_new();
+  if(!THIS_AS->route_graph)
+  THIS_AS->route_graph = xbt_graph_new_graph(1, NULL);
+  if(!THIS_AS->graph_node_map)
+  THIS_AS->graph_node_map = xbt_dict_new_homogeneous(&graph_node_map_elem_free);
 
-  if (routing->cached && !routing->route_cache)
-  routing->route_cache = xbt_dict_new();
+  if (THIS_AS->cached && !THIS_AS->route_cache)
+  THIS_AS->route_cache = xbt_dict_new_homogeneous(&route_cache_elem_free);
 
   /* Add the loopback if needed */
-  if (current_routing->hierarchy == SURF_ROUTING_BASE)
-    add_loopback_dijkstra(routing);
+  if (as->hierarchy == SURF_ROUTING_BASE)
+    add_loopback_dijkstra(THIS_AS);
 
   /* initialize graph indexes in nodes after graph has been built */
-  nodes = xbt_graph_get_nodes(routing->route_graph);
+  nodes = xbt_graph_get_nodes(THIS_AS->route_graph);
 
   xbt_dynar_foreach(nodes, cursor2, node) {
     graph_node_data_t data = xbt_graph_node_get_data(node);
@@ -523,25 +465,25 @@ void model_dijkstra_both_end(void)
   }
 
 }
-void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
-                     const char *dst, name_route_extended_t route)
+void model_dijkstra_both_parse_route (AS_t asg, const char *src,
+                     const char *dst, route_t route)
 {
-       routing_component_dijkstra_t routing = (routing_component_dijkstra_t) rc;
+       as_dijkstra_t as = (as_dijkstra_t) asg;
        int *src_id, *dst_id;
-       src_id = xbt_dict_get_or_null(rc->to_index, src);
-       dst_id = xbt_dict_get_or_null(rc->to_index, dst);
+       src_id = xbt_dict_get_or_null(asg->to_index, src);
+       dst_id = xbt_dict_get_or_null(asg->to_index, dst);
 
        xbt_assert(src_id, "Network elements %s not found", src);
        xbt_assert(dst_id, "Network elements %s not found", dst);
 
     /* Create the topology graph */
-       if(!routing->route_graph)
-       routing->route_graph = xbt_graph_new_graph(1, NULL);
-       if(!routing->graph_node_map)
-       routing->graph_node_map = xbt_dict_new();
+       if(!as->route_graph)
+       as->route_graph = xbt_graph_new_graph(1, NULL);
+       if(!as->graph_node_map)
+       as->graph_node_map = xbt_dict_new_homogeneous(&graph_node_map_elem_free);
 
-       if (routing->cached && !routing->route_cache)
-       routing->route_cache = xbt_dict_new();
+       if (as->cached && !as->route_cache)
+       as->route_cache = xbt_dict_new_homogeneous(&route_cache_elem_free);
 
        if( A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES
                || A_surfxml_ASroute_symmetrical == A_surfxml_ASroute_symmetrical_YES )
@@ -552,13 +494,12 @@ void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
        else{
          XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", src,
                         route->src_gateway, dst, route->dst_gateway);
-         if(global_routing->get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
+         if(routing_get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
                  xbt_die("The dst_gateway '%s' does not exist!",route->dst_gateway);
-         if(global_routing->get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
+         if(routing_get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
                  xbt_die("The src_gateway '%s' does not exist!",route->src_gateway);
        }
 
-       route_extended_t e_route =
-               generic_new_extended_route(current_routing->hierarchy, route, 1);
-       route_new_dijkstra(routing, *src_id, *dst_id, e_route);
+       route_t e_route = generic_new_extended_route(asg->hierarchy, route, 1);
+       route_new_dijkstra(as, *src_id, *dst_id, e_route);
 }
index e744b86..ea030ea 100644 (file)
@@ -8,89 +8,73 @@
 
 /* Global vars */
 extern routing_global_t global_routing;
-extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
 
-#define TO_FLOYD_COST(i,j) (routing->cost_table)[(i)+(j)*table_size]
-#define TO_FLOYD_PRED(i,j) (routing->predecessor_table)[(i)+(j)*table_size]
-#define TO_FLOYD_LINK(i,j) (routing->link_table)[(i)+(j)*table_size]
+#define TO_FLOYD_COST(i,j) (as->cost_table)[(i)+(j)*table_size]
+#define TO_FLOYD_PRED(i,j) (as->predecessor_table)[(i)+(j)*table_size]
+#define TO_FLOYD_LINK(i,j) (as->link_table)[(i)+(j)*table_size]
 
 /* Routing model structure */
 
 typedef struct {
-  s_routing_component_t generic_routing;
+  s_as_t generic_routing;
   /* vars for calculate the floyd algorith. */
   int *predecessor_table;
   double *cost_table;
-  route_extended_t *link_table; /* char* -> int* */
-} s_routing_component_floyd_t, *routing_component_floyd_t;
+  route_t *link_table;
+} s_as_floyd_t, *as_floyd_t;
 
-static route_extended_t floyd_get_route(routing_component_t rc,
-                                        const char *src, const char *dst);
+static void floyd_get_route_and_latency(AS_t asg, const char *src, const char *dst,
+    route_t res, double *lat);
 
 /* Business methods */
-static xbt_dynar_t floyd_get_onelink_routes(routing_component_t rc)
+static xbt_dynar_t floyd_get_onelink_routes(AS_t asg)
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
 
-  routing_component_floyd_t routing = (routing_component_floyd_t) rc;
-  //size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
+  route_t route =   xbt_new0(s_route_t, 1);
+  route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+
   xbt_dict_cursor_t c1 = NULL, c2 = NULL;
   char *k1, *d1, *k2, *d2;
-  xbt_dict_foreach(routing->generic_routing.to_index, c1, k1, d1) {
-    xbt_dict_foreach(routing->generic_routing.to_index, c2, k2, d2) {
-      route_extended_t route = floyd_get_route(rc, k1, k2);
-      if (route) {
-        if (xbt_dynar_length(route->generic_route.link_list) == 1) {
-          void *link =
-              *(void **) xbt_dynar_get_ptr(route->generic_route.link_list,
-                                           0);
-          onelink_t onelink = xbt_new0(s_onelink_t, 1);
-          onelink->link_ptr = link;
-          if (routing->generic_routing.hierarchy == SURF_ROUTING_BASE) {
-            onelink->src = xbt_strdup(k1);
-            onelink->dst = xbt_strdup(k2);
-          } else if (routing->generic_routing.hierarchy ==
-                     SURF_ROUTING_RECURSIVE) {
-            onelink->src = xbt_strdup(route->src_gateway);
-            onelink->dst = xbt_strdup(route->dst_gateway);
-          }
-          xbt_dynar_push(ret, &onelink);
+  xbt_dict_foreach(asg->to_index, c1, k1, d1) {
+    xbt_dict_foreach(asg->to_index, c2, k2, d2) {
+      xbt_dynar_reset(route->link_list);
+      floyd_get_route_and_latency(asg, k1, k2, route, NULL);
+      if (xbt_dynar_length(route->link_list) == 1) {
+        void *link = *(void **) xbt_dynar_get_ptr(route->link_list, 0);
+        onelink_t onelink = xbt_new0(s_onelink_t, 1);
+        onelink->link_ptr = link;
+        if (asg->hierarchy == SURF_ROUTING_BASE) {
+          onelink->src = xbt_strdup(k1);
+          onelink->dst = xbt_strdup(k2);
+        } else if (asg->hierarchy == SURF_ROUTING_RECURSIVE) {
+          onelink->src = xbt_strdup(route->src_gateway);
+          onelink->dst = xbt_strdup(route->dst_gateway);
         }
+        xbt_dynar_push(ret, &onelink);
       }
     }
   }
   return ret;
 }
 
-static route_extended_t floyd_get_route(routing_component_t rc,
-                                        const char *src, const char *dst)
+static void floyd_get_route_and_latency(AS_t asg, const char *src, const char *dst,
+    route_t res, double *lat)
 {
-  xbt_assert(rc && src
-              && dst,
-              "Invalid params for \"get_route\" function at AS \"%s\"",
-              rc->name);
 
   /* set utils vars */
-  routing_component_floyd_t routing = (routing_component_floyd_t) rc;
-  size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
+  as_floyd_t as = (as_floyd_t)asg;
+  size_t table_size = xbt_dict_length(asg->to_index);
 
-  generic_src_dst_check(rc, src, dst);
-  int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
-  int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
-  xbt_assert(src_id
-              && dst_id,
-              "Ask for route \"from\"(%s)  or \"to\"(%s) no found in the local table",
-              src, dst);
+  generic_src_dst_check(asg, src, dst);
+  int *src_id = xbt_dict_get_or_null(asg->to_index, src);
+  int *dst_id = xbt_dict_get_or_null(asg->to_index, dst);
+  if (src_id == NULL || dst_id == NULL)
+    THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
   /* create a result route */
-  route_extended_t new_e_route = xbt_new0(s_route_extended_t, 1);
-  new_e_route->generic_route.link_list =
-      xbt_dynar_new(global_routing->size_of_link, NULL);
-  new_e_route->src_gateway = NULL;
-  new_e_route->dst_gateway = NULL;
 
   int first = 1;
   int pred = *dst_id;
@@ -111,120 +95,100 @@ static route_extended_t floyd_get_route(routing_component_t rc,
 
     prev_gw_src = gw_src;
 
-    route_extended_t e_route = TO_FLOYD_LINK(pred, prev_pred);
+    route_t e_route = TO_FLOYD_LINK(pred, prev_pred);
     gw_src = e_route->src_gateway;
     gw_dst = e_route->dst_gateway;
 
     if (first)
       first_gw = gw_dst;
 
-    if (rc->hierarchy == SURF_ROUTING_RECURSIVE && !first
+    if (asg->hierarchy == SURF_ROUTING_RECURSIVE && !first
         && strcmp(gw_dst, prev_gw_src)) {
-      xbt_dynar_t e_route_as_to_as =
-          (*(global_routing->get_route)) (gw_dst, prev_gw_src);
-      xbt_assert(e_route_as_to_as, "no route between \"%s\" and \"%s\"",
-                  gw_dst, prev_gw_src);
+      xbt_dynar_t e_route_as_to_as;
+      e_route_as_to_as = xbt_dynar_new(global_routing->size_of_link, NULL);
+      routing_get_route_and_latency(gw_dst, prev_gw_src,&e_route_as_to_as,NULL);
       links = e_route_as_to_as;
       int pos = 0;
       xbt_dynar_foreach(links, cpt, link) {
-        xbt_dynar_insert_at(new_e_route->generic_route.link_list, pos,
-                            &link);
+        xbt_dynar_insert_at(res->link_list, pos, &link);
+        if (lat)
+          *lat += surf_network_model->extension.network.get_link_latency(link);
         pos++;
       }
+      xbt_dynar_free(&e_route_as_to_as);
     }
 
-    links = e_route->generic_route.link_list;
+    links = e_route->link_list;
     xbt_dynar_foreach(links, cpt, link) {
-      xbt_dynar_unshift(new_e_route->generic_route.link_list, &link);
+      xbt_dynar_unshift(res->link_list, &link);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(link);
     }
     first = 0;
 
   } while (pred != *src_id);
-  xbt_assert(pred != -1, "no route from host %d to %d (\"%s\" to \"%s\")",
-              *src_id, *dst_id, src, dst);
+  if (pred == -1)
+    THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
-  if (rc->hierarchy == SURF_ROUTING_RECURSIVE) {
-    new_e_route->src_gateway = xbt_strdup(gw_src);
-    new_e_route->dst_gateway = xbt_strdup(first_gw);
+  if (asg->hierarchy == SURF_ROUTING_RECURSIVE) {
+    res->src_gateway = xbt_strdup(gw_src);
+    res->dst_gateway = xbt_strdup(first_gw);
   }
-
-  return new_e_route;
 }
 
-static void floyd_finalize(routing_component_t rc)
+static void floyd_finalize(AS_t rc)
 {
-  routing_component_floyd_t routing = (routing_component_floyd_t) rc;
+  as_floyd_t as = (as_floyd_t) rc;
   int i, j;
   size_t table_size;
-  if (routing) {
-    table_size = xbt_dict_length(routing->generic_routing.to_index);
+  if (as) {
+    table_size = xbt_dict_length(as->generic_routing.to_index);
     /* Delete link_table */
     for (i = 0; i < table_size; i++)
       for (j = 0; j < table_size; j++)
-        generic_free_extended_route(TO_FLOYD_LINK(i, j));
-    xbt_free(routing->link_table);
+        generic_free_route(TO_FLOYD_LINK(i, j));
+    xbt_free(as->link_table);
     /* Delete bypass dict */
-    xbt_dict_free(&routing->generic_routing.bypassRoutes);
+    xbt_dict_free(&as->generic_routing.bypassRoutes);
     /* Delete index dict */
-    xbt_dict_free(&(routing->generic_routing.to_index));
-    /* Delete dictionary index dict, predecessor and links table */
-    xbt_free(routing->predecessor_table);
-    /* Delete structure */
-    xbt_free(rc);
+    xbt_dict_free(&(as->generic_routing.to_index));
+    /* Delete predecessor and cost table */
+    xbt_free(as->predecessor_table);
+    xbt_free(as->cost_table);
+
+    model_generic_finalize(rc);
   }
 }
 
-void *model_floyd_create(void)
+AS_t model_floyd_create(void)
 {
-  routing_component_floyd_t new_component =
-      xbt_new0(s_routing_component_floyd_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      generic_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      generic_set_autonomous_system;
-  new_component->generic_routing.set_route = model_floyd_set_route;
-  new_component->generic_routing.set_ASroute = model_floyd_set_route;
-  new_component->generic_routing.set_bypassroute = generic_set_bypassroute;
-  new_component->generic_routing.get_route = floyd_get_route;
-  new_component->generic_routing.get_latency = generic_get_link_latency;
+  as_floyd_t new_component = (as_floyd_t)model_generic_create_sized(sizeof(s_as_floyd_t));
+  new_component->generic_routing.parse_route = model_floyd_parse_route;
+  new_component->generic_routing.parse_ASroute = model_floyd_parse_route;
+  new_component->generic_routing.get_route_and_latency = floyd_get_route_and_latency;
   new_component->generic_routing.get_onelink_routes =
       floyd_get_onelink_routes;
-  new_component->generic_routing.get_bypass_route =
-      generic_get_bypassroute;
   new_component->generic_routing.finalize = floyd_finalize;
-  new_component->generic_routing.to_index = xbt_dict_new();
-  new_component->generic_routing.bypassRoutes = xbt_dict_new();
-  new_component->generic_routing.get_network_element_type = get_network_element_type;
-  return new_component;
-}
-
-void model_floyd_load(void)
-{
-  /* use "surfxml_add_callback" to add a parse function call */
+  return (AS_t)new_component;
 }
 
-void model_floyd_unload(void)
-{
-  /* use "surfxml_del_callback" to remove a parse function call */
-}
-
-void model_floyd_end(void)
+void model_floyd_end(AS_t current_routing)
 {
 
-       routing_component_floyd_t routing =
-         ((routing_component_floyd_t) current_routing);
+       as_floyd_t as =
+         ((as_floyd_t) current_routing);
 
        unsigned int i, j, a, b, c;
 
        /* set the size of table routing */
-       size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
+       size_t table_size = xbt_dict_length(as->generic_routing.to_index);
 
-       if(!routing->link_table)
+       if(!as->link_table)
        {
                /* Create Cost, Predecessor and Link tables */
-               routing->cost_table = xbt_new0(double, table_size * table_size);       /* link cost from host to host */
-               routing->predecessor_table = xbt_new0(int, table_size * table_size);  /* predecessor host numbers */
-               routing->link_table = xbt_new0(route_extended_t, table_size * table_size);    /* actual link between src and dst */
+               as->cost_table = xbt_new0(double, table_size * table_size);       /* link cost from host to host */
+               as->predecessor_table = xbt_new0(int, table_size * table_size);  /* predecessor host numbers */
+               as->link_table = xbt_new0(route_t, table_size * table_size);    /* actual link between src and dst */
 
                /* Initialize costs and predecessors */
                for (i = 0; i < table_size; i++)
@@ -238,15 +202,14 @@ void model_floyd_end(void)
        /* Add the loopback if needed */
        if (current_routing->hierarchy == SURF_ROUTING_BASE) {
                for (i = 0; i < table_size; i++) {
-                 route_extended_t e_route = TO_FLOYD_LINK(i, i);
+                 route_t e_route = TO_FLOYD_LINK(i, i);
                  if (!e_route) {
-                       e_route = xbt_new0(s_route_extended_t, 1);
+                       e_route = xbt_new0(s_route_t, 1);
                        e_route->src_gateway = NULL;
                        e_route->dst_gateway = NULL;
-                       e_route->generic_route.link_list =
+                       e_route->link_list =
                                xbt_dynar_new(global_routing->size_of_link, NULL);
-                       xbt_dynar_push(e_route->generic_route.link_list,
-                                                  &global_routing->loopback);
+                       xbt_dynar_push(e_route->link_list, &global_routing->loopback);
                        TO_FLOYD_LINK(i, i) = e_route;
                        TO_FLOYD_PRED(i, i) = i;
                        TO_FLOYD_COST(i, i) = 1;
@@ -271,10 +234,16 @@ void model_floyd_end(void)
        }
 }
 
-void model_floyd_set_route(routing_component_t rc, const char *src,
-        const char *dst, name_route_extended_t route)
+static int floyd_pointer_resource_cmp(const void *a, const void *b) {
+  return a != b;
+}
+
+//FIXME: kill dupplicates in next function with full routing
+
+void model_floyd_parse_route(AS_t rc, const char *src,
+        const char *dst, route_t route)
 {
-       routing_component_floyd_t routing = (routing_component_floyd_t) rc;
+       as_floyd_t as = (as_floyd_t) rc;
 
        /* set the size of table routing */
        size_t table_size = xbt_dict_length(rc->to_index);
@@ -287,12 +256,12 @@ void model_floyd_set_route(routing_component_t rc, const char *src,
        xbt_assert(src_id, "Network elements %s not found", src);
        xbt_assert(dst_id, "Network elements %s not found", dst);
 
-       if(!routing->link_table)
+       if(!as->link_table)
        {
                /* Create Cost, Predecessor and Link tables */
-               routing->cost_table = xbt_new0(double, table_size * table_size);       /* link cost from host to host */
-               routing->predecessor_table = xbt_new0(int, table_size * table_size);  /* predecessor host numbers */
-               routing->link_table = xbt_new0(route_extended_t, table_size * table_size);    /* actual link between src and dst */
+               as->cost_table = xbt_new0(double, table_size * table_size);       /* link cost from host to host */
+               as->predecessor_table = xbt_new0(int, table_size * table_size);  /* predecessor host numbers */
+               as->link_table = xbt_new0(route_t, table_size * table_size);    /* actual link between src and dst */
 
                /* Initialize costs and predecessors */
                for (i = 0; i < table_size; i++)
@@ -313,16 +282,16 @@ void model_floyd_set_route(routing_component_t rc, const char *src,
                char * link_name;
                unsigned int cpt;
                xbt_dynar_t link_route_to_test = xbt_dynar_new(global_routing->size_of_link, NULL);
-               xbt_dynar_foreach(route->generic_route.link_list,cpt,link_name)
+               xbt_dynar_foreach(route->link_list,cpt,link_name)
                {
                        void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
                        xbt_assert(link,"Link : '%s' doesn't exists.",link_name);
                        xbt_dynar_push(link_route_to_test,&link);
                }
                xbt_assert(!xbt_dynar_compare(
-                         (void*)TO_FLOYD_LINK(*src_id, *dst_id)->generic_route.link_list,
+                         (void*)TO_FLOYD_LINK(*src_id, *dst_id)->link_list,
                          (void*)link_route_to_test,
-                         (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+                         (int_f_cpvoid_cpvoid_t) floyd_pointer_resource_cmp),
                          "The route between \"%s\" and \"%s\" already exists", src,dst);
        }
        else
@@ -332,16 +301,16 @@ void model_floyd_set_route(routing_component_t rc, const char *src,
                else{
                        XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", src,
                                 route->src_gateway, dst, route->dst_gateway);
-                       if(global_routing->get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
+                       if(routing_get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
                                xbt_die("The dst_gateway '%s' does not exist!",route->dst_gateway);
-                       if(global_routing->get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
+                       if(routing_get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
                                xbt_die("The src_gateway '%s' does not exist!",route->src_gateway);
                }
            TO_FLOYD_LINK(*src_id, *dst_id) =
                        generic_new_extended_route(rc->hierarchy, route, 1);
            TO_FLOYD_PRED(*src_id, *dst_id) = *src_id;
            TO_FLOYD_COST(*src_id, *dst_id) =
-                       ((TO_FLOYD_LINK(*src_id, *dst_id))->generic_route.link_list)->used;   /* count of links, old model assume 1 */
+                       ((TO_FLOYD_LINK(*src_id, *dst_id))->link_list)->used;   /* count of links, old model assume 1 */
        }
 
        if( A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES
@@ -357,25 +326,25 @@ void model_floyd_set_route(routing_component_t rc, const char *src,
                        char * link_name;
                        unsigned int i;
                        xbt_dynar_t link_route_to_test = xbt_dynar_new(global_routing->size_of_link, NULL);
-                       for(i=xbt_dynar_length(route->generic_route.link_list) ;i>0 ;i--)
+                       for(i=xbt_dynar_length(route->link_list) ;i>0 ;i--)
                        {
-                               link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
+                               link_name = xbt_dynar_get_as(route->link_list,i-1,void *);
                                void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
                                xbt_assert(link,"Link : '%s' doesn't exists.",link_name);
                                xbt_dynar_push(link_route_to_test,&link);
                        }
                        xbt_assert(!xbt_dynar_compare(
-                                 (void*)TO_FLOYD_LINK(*dst_id, *src_id)->generic_route.link_list,
+                                 (void*)TO_FLOYD_LINK(*dst_id, *src_id)->link_list,
                              (void*)link_route_to_test,
-                                 (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+                                 (int_f_cpvoid_cpvoid_t) floyd_pointer_resource_cmp),
                                  "The route between \"%s\" and \"%s\" already exists", src,dst);
                }
                else
                {
                        if(route->dst_gateway && route->src_gateway)
                        {
-                          char *gw_src = xbt_strdup(route->src_gateway);
-                          char *gw_dst = xbt_strdup(route->dst_gateway);
+                          char *gw_src = route->src_gateway;
+                          char *gw_dst = route->dst_gateway;
                           route->src_gateway = gw_dst;
                           route->dst_gateway = gw_src;
                        }
@@ -390,7 +359,7 @@ void model_floyd_set_route(routing_component_t rc, const char *src,
                                generic_new_extended_route(rc->hierarchy, route, 0);
                    TO_FLOYD_PRED(*dst_id, *src_id) = *dst_id;
                    TO_FLOYD_COST(*dst_id, *src_id) =
-                               ((TO_FLOYD_LINK(*dst_id, *src_id))->generic_route.link_list)->used;   /* count of links, old model assume 1 */
+                               ((TO_FLOYD_LINK(*dst_id, *src_id))->link_list)->used;   /* count of links, old model assume 1 */
                }
        }
 }
index be6166c..cc9c541 100644 (file)
@@ -8,8 +8,6 @@
 
 /* Global vars */
 extern routing_global_t global_routing;
-extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 
@@ -17,13 +15,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 
 /* Routing model structure */
 
-typedef struct {
-  s_routing_component_t generic_routing;
-  route_extended_t *routing_table;
+typedef struct s_routing_component_full {
+  s_as_t generic_routing;
+  route_t *routing_table;
 } s_routing_component_full_t, *routing_component_full_t;
 
 /* Business methods */
-static xbt_dynar_t full_get_onelink_routes(routing_component_t rc)
+static xbt_dynar_t full_get_onelink_routes(AS_t rc)
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
 
@@ -39,11 +37,11 @@ static xbt_dynar_t full_get_onelink_routes(routing_component_t rc)
                   && dst_id,
                   "Ask for route \"from\"(%s)  or \"to\"(%s) no found in the local table",
                   k1, k2);
-      route_extended_t route = TO_ROUTE_FULL(*src_id, *dst_id);
+      route_t route = TO_ROUTE_FULL(*src_id, *dst_id);
       if (route) {
-        if (xbt_dynar_length(route->generic_route.link_list) == 1) {
+        if (xbt_dynar_length(route->link_list) == 1) {
           void *link =
-              *(void **) xbt_dynar_get_ptr(route->generic_route.link_list,
+              *(void **) xbt_dynar_get_ptr(route->link_list,
                                            0);
           onelink_t onelink = xbt_new0(s_onelink_t, 1);
           onelink->link_ptr = link;
@@ -63,13 +61,10 @@ static xbt_dynar_t full_get_onelink_routes(routing_component_t rc)
   return ret;
 }
 
-static route_extended_t full_get_route(routing_component_t rc,
-                                       const char *src, const char *dst)
+static void full_get_route_and_latency(AS_t rc,
+                           const char *src, const char *dst,
+                           route_t res,double *lat)
 {
-  xbt_assert(rc && src
-              && dst,
-              "Invalid params for \"get_route\" function at AS \"%s\"",
-              rc->name);
 
   /* set utils vars */
   routing_component_full_t routing = (routing_component_full_t) rc;
@@ -77,32 +72,28 @@ static route_extended_t full_get_route(routing_component_t rc,
 
   int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
   int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
-  xbt_assert(src_id
-              && dst_id,
-              "Ask for route \"from\"(%s)  or \"to\"(%s) no found in the local table",
-              src, dst);
 
-  route_extended_t e_route = NULL;
-  route_extended_t new_e_route = NULL;
+  if (!src_id || !dst_id)
+    THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
+
+  route_t e_route = NULL;
   void *link;
   unsigned int cpt = 0;
 
   e_route = TO_ROUTE_FULL(*src_id, *dst_id);
 
   if (e_route) {
-    new_e_route = xbt_new0(s_route_extended_t, 1);
-    new_e_route->src_gateway = xbt_strdup(e_route->src_gateway);
-    new_e_route->dst_gateway = xbt_strdup(e_route->dst_gateway);
-    new_e_route->generic_route.link_list =
-        xbt_dynar_new(global_routing->size_of_link, NULL);
-    xbt_dynar_foreach(e_route->generic_route.link_list, cpt, link) {
-      xbt_dynar_push(new_e_route->generic_route.link_list, &link);
+    res->src_gateway = xbt_strdup(e_route->src_gateway);
+    res->dst_gateway = xbt_strdup(e_route->dst_gateway);
+    xbt_dynar_foreach(e_route->link_list, cpt, link) {
+      xbt_dynar_push(res->link_list, &link);
+      if (lat)
+        *lat += surf_network_model->extension.network.get_link_latency(link);
     }
   }
-  return new_e_route;
 }
 
-static void full_finalize(routing_component_t rc)
+static void full_finalize(AS_t rc)
 {
   routing_component_full_t routing = (routing_component_full_t) rc;
   size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
@@ -111,57 +102,33 @@ static void full_finalize(routing_component_t rc)
     /* Delete routing table */
     for (i = 0; i < table_size; i++)
       for (j = 0; j < table_size; j++)
-        generic_free_extended_route(TO_ROUTE_FULL(i, j));
+        generic_free_route(TO_ROUTE_FULL(i, j));
     xbt_free(routing->routing_table);
-    /* Delete bypass dict */
-    xbt_dict_free(&rc->bypassRoutes);
-    /* Delete index dict */
-    xbt_dict_free(&rc->to_index);
-    /* Delete structure */
-    xbt_free(rc);
+    model_generic_finalize(rc);
   }
 }
 
 /* Creation routing model functions */
 
-void *model_full_create(void)
+AS_t model_full_create(void)
 {
-  routing_component_full_t new_component =
-      xbt_new0(s_routing_component_full_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      generic_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      generic_set_autonomous_system;
-  new_component->generic_routing.set_route = model_full_set_route;
-  new_component->generic_routing.set_ASroute = model_full_set_route;
-  new_component->generic_routing.set_bypassroute = generic_set_bypassroute;
-  new_component->generic_routing.get_route = full_get_route;
-  new_component->generic_routing.get_latency = generic_get_link_latency;
+  routing_component_full_t new_component = (routing_component_full_t)
+      model_generic_create_sized(sizeof(s_routing_component_full_t));
+
+  new_component->generic_routing.parse_route = model_full_set_route;
+  new_component->generic_routing.parse_ASroute = model_full_set_route;
+  new_component->generic_routing.get_route_and_latency = full_get_route_and_latency;
   new_component->generic_routing.get_onelink_routes =
       full_get_onelink_routes;
-  new_component->generic_routing.get_bypass_route =
-      generic_get_bypassroute;
   new_component->generic_routing.finalize = full_finalize;
-  new_component->generic_routing.to_index = xbt_dict_new();
-  new_component->generic_routing.bypassRoutes = xbt_dict_new();
-  new_component->generic_routing.get_network_element_type = get_network_element_type;
-  return new_component;
-}
-
-void model_full_load(void)
-{
-  /* use "surfxml_add_callback" to add a parse function call */
-}
 
-void model_full_unload(void)
-{
-  /* use "surfxml_del_callback" to remove a parse function call */
+  return (AS_t) new_component;
 }
 
-void model_full_end(void)
+void model_full_end(AS_t current_routing)
 {
   unsigned int i;
-  route_extended_t e_route;
+  route_t e_route;
 
   /* set utils vars */
   routing_component_full_t routing =
@@ -170,19 +137,18 @@ void model_full_end(void)
 
   /* Create table if necessary */
   if(!routing->routing_table)
-         routing->routing_table = xbt_new0(route_extended_t, table_size * table_size);
+         routing->routing_table = xbt_new0(route_t, table_size * table_size);
 
   /* Add the loopback if needed */
   if (current_routing->hierarchy == SURF_ROUTING_BASE) {
     for (i = 0; i < table_size; i++) {
       e_route = TO_ROUTE_FULL(i, i);
       if (!e_route) {
-        e_route = xbt_new0(s_route_extended_t, 1);
+        e_route = xbt_new0(s_route_t, 1);
         e_route->src_gateway = NULL;
         e_route->dst_gateway = NULL;
-        e_route->generic_route.link_list =
-            xbt_dynar_new(global_routing->size_of_link, NULL);
-        xbt_dynar_push(e_route->generic_route.link_list,
+        e_route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+        xbt_dynar_push(e_route->link_list,
                        &global_routing->loopback);
         TO_ROUTE_FULL(i, i) = e_route;
       }
@@ -190,8 +156,12 @@ void model_full_end(void)
   }
 }
 
-void model_full_set_route(routing_component_t rc, const char *src,
-               const char *dst, name_route_extended_t route)
+static int full_pointer_resource_cmp(const void *a, const void *b) {
+  return a != b;
+}
+
+void model_full_set_route(AS_t rc, const char *src,
+               const char *dst, route_t route)
 {
        int *src_id, *dst_id;
        src_id = xbt_dict_get_or_null(rc->to_index, src);
@@ -202,28 +172,28 @@ void model_full_set_route(routing_component_t rc, const char *src,
        xbt_assert(src_id, "Network elements %s not found", src);
        xbt_assert(dst_id, "Network elements %s not found", dst);
 
-       xbt_assert(xbt_dynar_length(route->generic_route.link_list) > 0,
+       xbt_assert(!xbt_dynar_is_empty(route->link_list),
                          "Invalid count of links, must be greater than zero (%s,%s)",
                          src, dst);
 
        if(!routing->routing_table)
-               routing->routing_table = xbt_new0(route_extended_t, table_size * table_size);
+               routing->routing_table = xbt_new0(route_t, table_size * table_size);
 
        if(TO_ROUTE_FULL(*src_id, *dst_id))
        {
                char * link_name;
                unsigned int i;
                xbt_dynar_t link_route_to_test = xbt_dynar_new(global_routing->size_of_link, NULL);
-               xbt_dynar_foreach(route->generic_route.link_list,i,link_name)
+               xbt_dynar_foreach(route->link_list,i,link_name)
                {
                        void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
                        xbt_assert(link,"Link : '%s' doesn't exists.",link_name);
                        xbt_dynar_push(link_route_to_test,&link);
                }
                xbt_assert(!xbt_dynar_compare(
-                         (void*)TO_ROUTE_FULL(*src_id, *dst_id)->generic_route.link_list,
+                         (void*)TO_ROUTE_FULL(*src_id, *dst_id)->link_list,
                          (void*)link_route_to_test,
-                         (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+                         (int_f_cpvoid_cpvoid_t) full_pointer_resource_cmp),
                          "The route between \"%s\" and \"%s\" already exists. If you are trying to define a reverse route, you must set the symmetrical=no attribute to your routes tags.", src,dst);
        }
        else
@@ -233,13 +203,13 @@ void model_full_set_route(routing_component_t rc, const char *src,
                  else{
                          XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", src,
                                 route->src_gateway, dst, route->dst_gateway);
-                         if(global_routing->get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
+                         if(routing_get_network_element_type((const char*)route->dst_gateway) == SURF_NETWORK_ELEMENT_NULL)
                                  xbt_die("The dst_gateway '%s' does not exist!",route->dst_gateway);
-                         if(global_routing->get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
+                         if(routing_get_network_element_type((const char*)route->src_gateway) == SURF_NETWORK_ELEMENT_NULL)
                                  xbt_die("The src_gateway '%s' does not exist!",route->src_gateway);
                  }
              TO_ROUTE_FULL(*src_id, *dst_id) = generic_new_extended_route(rc->hierarchy,route,1);
-             xbt_dynar_shrink(TO_ROUTE_FULL(*src_id, *dst_id)->generic_route.link_list, 0);
+             xbt_dynar_shrink(TO_ROUTE_FULL(*src_id, *dst_id)->link_list, 0);
        }
 
        if( A_surfxml_route_symmetrical == A_surfxml_route_symmetrical_YES
@@ -257,17 +227,17 @@ void model_full_set_route(routing_component_t rc, const char *src,
                        char * link_name;
                        unsigned int i;
                        xbt_dynar_t link_route_to_test = xbt_dynar_new(global_routing->size_of_link, NULL);
-                       for(i=xbt_dynar_length(route->generic_route.link_list) ;i>0 ;i--)
+                       for(i=xbt_dynar_length(route->link_list) ;i>0 ;i--)
                        {
-                               link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
+                               link_name = xbt_dynar_get_as(route->link_list,i-1,void *);
                                void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
                                xbt_assert(link,"Link : '%s' doesn't exists.",link_name);
                                xbt_dynar_push(link_route_to_test,&link);
                        }
                        xbt_assert(!xbt_dynar_compare(
-                                 (void*)TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list,
+                                 (void*)TO_ROUTE_FULL(*dst_id, *src_id)->link_list,
                              (void*)link_route_to_test,
-                                 (int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
+                                 (int_f_cpvoid_cpvoid_t) full_pointer_resource_cmp),
                                  "The route between \"%s\" and \"%s\" already exists", src,dst);
                }
                else
@@ -278,10 +248,7 @@ void model_full_set_route(routing_component_t rc, const char *src,
                                  XBT_DEBUG("Load ASroute from \"%s(%s)\" to \"%s(%s)\"", dst,
                                         route->src_gateway, src, route->dst_gateway);
                      TO_ROUTE_FULL(*dst_id, *src_id) = generic_new_extended_route(rc->hierarchy,route,0);
-                     xbt_dynar_shrink(TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list, 0);
+                     xbt_dynar_shrink(TO_ROUTE_FULL(*dst_id, *src_id)->link_list, 0);
                }
        }
-
-       if (rc->hierarchy == SURF_ROUTING_BASE) generic_free_route((route_t)route) ;
-       else generic_free_extended_route((route_extended_t)route);
 }
diff --git a/src/surf/surf_routing_generic.c b/src/surf/surf_routing_generic.c
new file mode 100644 (file)
index 0000000..bfb16f9
--- /dev/null
@@ -0,0 +1,405 @@
+/* Copyright (c) 2009, 2010, 2011. 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 <pcre.h>               /* regular expression library */
+
+#include "simgrid/platf_interface.h"    // platform creation API internal interface
+
+#include "surf_routing_private.h"
+#include "surf/surf_routing.h"
+#include "surf/surfxml_parse_values.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing");
+
+AS_t model_generic_create_sized(size_t childsize) {
+  AS_t new_component = model_none_create_sized(childsize);
+
+  new_component->parse_PU = generic_parse_PU;
+  new_component->parse_AS = generic_parse_AS;
+  new_component->parse_route = NULL;
+  new_component->parse_ASroute = NULL;
+  new_component->parse_bypassroute = generic_parse_bypassroute;
+  new_component->get_route_and_latency = NULL;
+  new_component->get_onelink_routes = NULL;
+  new_component->get_bypass_route =
+      generic_get_bypassroute;
+  new_component->finalize = model_generic_finalize;
+
+  new_component->to_index = xbt_dict_new_homogeneous(xbt_free);
+  new_component->bypassRoutes = xbt_dict_new_homogeneous((void (*)(void *)) generic_free_route);
+
+  return new_component;
+}
+void model_generic_finalize(AS_t as) {
+  xbt_dict_free(&as->to_index);
+  xbt_dict_free(&as->bypassRoutes);
+  model_none_finalize(as);
+}
+
+void generic_parse_PU(AS_t as, const char *name)
+{
+  XBT_DEBUG("Load process unit \"%s\"", name);
+  int *id = xbt_new0(int, 1);
+  xbt_dict_t _to_index;
+  _to_index = as->to_index;
+  *id = xbt_dict_length(_to_index);
+  xbt_dict_set(_to_index, name, id, NULL);
+}
+
+void generic_parse_AS(AS_t as, const char *name)
+{
+  XBT_DEBUG("Load Autonomous system \"%s\"", name);
+  int *id = xbt_new0(int, 1);
+  xbt_dict_t _to_index;
+  _to_index = as->to_index;
+  *id = xbt_dict_length(_to_index);
+  xbt_dict_set(_to_index, name, id, NULL);
+}
+
+void generic_parse_bypassroute(AS_t rc,
+                             const char *src, const char *dst,
+                             route_t e_route)
+{
+  XBT_DEBUG("Load bypassRoute from \"%s\" to \"%s\"", src, dst);
+  xbt_dict_t dict_bypassRoutes = rc->bypassRoutes;
+  char *route_name;
+
+  route_name = bprintf("%s#%s", src, dst);
+  xbt_assert(!xbt_dynar_is_empty(e_route->link_list),
+             "Invalid count of links, must be greater than zero (%s,%s)",
+             src, dst);
+  xbt_assert(!xbt_dict_get_or_null(dict_bypassRoutes, route_name),
+             "The bypass route between \"%s\"(\"%s\") and \"%s\"(\"%s\") already exists",
+             src, e_route->src_gateway, dst, e_route->dst_gateway);
+
+  route_t new_e_route =
+      generic_new_extended_route(SURF_ROUTING_RECURSIVE, e_route, 0);
+  xbt_dynar_free(&(e_route->link_list));
+  xbt_free(e_route);
+
+  xbt_dict_set(dict_bypassRoutes, route_name, new_e_route, NULL);
+  xbt_free(route_name);
+}
+
+/* ************************************************************************** */
+/* *********************** GENERIC BUSINESS METHODS ************************* */
+
+xbt_dynar_t generic_get_onelink_routes(AS_t rc) { // FIXME: kill that stub
+  xbt_die("\"generic_get_onelink_routes\" not implemented yet");
+  return NULL;
+}
+
+route_t generic_get_bypassroute(AS_t rc, const char *src, const char *dst)
+{
+  xbt_dict_t dict_bypassRoutes = rc->bypassRoutes;
+  AS_t src_as, dst_as;
+  int index_src, index_dst;
+  xbt_dynar_t path_src = NULL;
+  xbt_dynar_t path_dst = NULL;
+  AS_t current = NULL;
+  AS_t *current_src = NULL;
+  AS_t *current_dst = NULL;
+
+  /* (1) find the as where the src and dst are located */
+  void *src_data = xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL);
+  void *dst_data = xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL);
+  if (!src_data)
+    src_data = xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL);
+  if (!dst_data)
+    dst_data = xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL);
+
+  if (src_data == NULL || dst_data == NULL)
+    xbt_die("Ask for route \"from\"(%s) or \"to\"(%s) no found at AS \"%s\"",
+            src, dst, rc->name);
+
+  src_as = ((network_element_info_t) src_data)->rc_component;
+  dst_as = ((network_element_info_t) dst_data)->rc_component;
+
+  /* (2) find the path to the root routing component */
+  path_src = xbt_dynar_new(sizeof(AS_t), NULL);
+  current = src_as;
+  while (current != NULL) {
+    xbt_dynar_push(path_src, &current);
+    current = current->routing_father;
+  }
+  path_dst = xbt_dynar_new(sizeof(AS_t), NULL);
+  current = dst_as;
+  while (current != NULL) {
+    xbt_dynar_push(path_dst, &current);
+    current = current->routing_father;
+  }
+
+  /* (3) find the common father */
+  index_src = path_src->used - 1;
+  index_dst = path_dst->used - 1;
+  current_src = xbt_dynar_get_ptr(path_src, index_src);
+  current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
+  while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
+    xbt_dynar_pop_ptr(path_src);
+    xbt_dynar_pop_ptr(path_dst);
+    index_src--;
+    index_dst--;
+    current_src = xbt_dynar_get_ptr(path_src, index_src);
+    current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
+  }
+
+  int max_index_src = path_src->used - 1;
+  int max_index_dst = path_dst->used - 1;
+
+  int max_index = max(max_index_src, max_index_dst);
+  int i, max;
+
+  route_t e_route_bypass = NULL;
+
+  for (max = 0; max <= max_index; max++) {
+    for (i = 0; i < max; i++) {
+      if (i <= max_index_src && max <= max_index_dst) {
+        char *route_name = bprintf("%s#%s",
+                                   (*(AS_t *)
+                                    (xbt_dynar_get_ptr(path_src, i)))->name,
+                                   (*(AS_t *)
+                                    (xbt_dynar_get_ptr(path_dst, max)))->name);
+        e_route_bypass = xbt_dict_get_or_null(dict_bypassRoutes, route_name);
+        xbt_free(route_name);
+      }
+      if (e_route_bypass)
+        break;
+      if (max <= max_index_src && i <= max_index_dst) {
+        char *route_name = bprintf("%s#%s",
+                                   (*(AS_t *)
+                                    (xbt_dynar_get_ptr(path_src, max)))->name,
+                                   (*(AS_t *)
+                                    (xbt_dynar_get_ptr(path_dst, i)))->name);
+        e_route_bypass = xbt_dict_get_or_null(dict_bypassRoutes, route_name);
+        xbt_free(route_name);
+      }
+      if (e_route_bypass)
+        break;
+    }
+
+    if (e_route_bypass)
+      break;
+
+    if (max <= max_index_src && max <= max_index_dst) {
+      char *route_name = bprintf("%s#%s",
+                                 (*(AS_t *)
+                                  (xbt_dynar_get_ptr(path_src, max)))->name,
+                                 (*(AS_t *)
+                                  (xbt_dynar_get_ptr(path_dst, max)))->name);
+      e_route_bypass = xbt_dict_get_or_null(dict_bypassRoutes, route_name);
+      xbt_free(route_name);
+    }
+    if (e_route_bypass)
+      break;
+  }
+
+  xbt_dynar_free(&path_src);
+  xbt_dynar_free(&path_dst);
+
+  route_t new_e_route = NULL;
+
+  if (e_route_bypass) {
+    void *link;
+    unsigned int cpt = 0;
+    new_e_route = xbt_new0(s_route_t, 1);
+    new_e_route->src_gateway = xbt_strdup(e_route_bypass->src_gateway);
+    new_e_route->dst_gateway = xbt_strdup(e_route_bypass->dst_gateway);
+    new_e_route->link_list =
+        xbt_dynar_new(global_routing->size_of_link, NULL);
+    xbt_dynar_foreach(e_route_bypass->link_list, cpt, link) {
+      xbt_dynar_push(new_e_route->link_list, &link);
+    }
+  }
+
+  return new_e_route;
+}
+
+/* ************************************************************************** */
+/* ************************* GENERIC AUX FUNCTIONS ************************** */
+
+route_t
+generic_new_route(e_surf_routing_hierarchy_t hierarchy, void *data, int order)
+{
+
+  char *link_name;
+  route_t new_route;
+  unsigned int cpt;
+  xbt_dynar_t links = NULL, links_id = NULL;
+
+  new_route = xbt_new0(s_route_t, 1);
+  new_route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+
+  xbt_assert(hierarchy == SURF_ROUTING_BASE,
+             "the hierarchy type is not SURF_ROUTING_BASE");
+
+  links = ((route_t) data)->link_list;
+
+
+  links_id = new_route->link_list;
+
+  xbt_dynar_foreach(links, cpt, link_name) {
+
+    void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
+    if (link) {
+      if (order)
+        xbt_dynar_push(links_id, &link);
+      else
+        xbt_dynar_unshift(links_id, &link);
+    } else
+      THROWF(mismatch_error, 0, "Link %s not found", link_name);
+  }
+
+  return new_route;
+}
+
+route_t
+generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy,
+                           void *data, int order)
+{
+
+  char *link_name;
+  route_t e_route, new_e_route;
+  route_t route;
+  unsigned int cpt;
+  xbt_dynar_t links = NULL, links_id = NULL;
+
+  new_e_route = xbt_new0(s_route_t, 1);
+  new_e_route->link_list = xbt_dynar_new(global_routing->size_of_link, NULL);
+
+  xbt_assert(hierarchy == SURF_ROUTING_BASE
+             || hierarchy == SURF_ROUTING_RECURSIVE,
+             "the hierarchy type is not defined");
+
+  if (hierarchy == SURF_ROUTING_BASE) {
+
+    route = (route_t) data;
+    links = route->link_list;
+
+  } else if (hierarchy == SURF_ROUTING_RECURSIVE) {
+
+    e_route = (route_t) data;
+    xbt_assert(e_route->src_gateway
+               && e_route->dst_gateway, "bad gateway, is null");
+    links = e_route->link_list;
+
+    /* remeber not erase the gateway names */
+    new_e_route->src_gateway = strdup(e_route->src_gateway);
+    new_e_route->dst_gateway = strdup(e_route->dst_gateway);
+  }
+
+  links_id = new_e_route->link_list;
+
+  xbt_dynar_foreach(links, cpt, link_name) {
+
+    void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
+    if (link) {
+      if (order)
+        xbt_dynar_push(links_id, &link);
+      else
+        xbt_dynar_unshift(links_id, &link);
+    } else
+      THROWF(mismatch_error, 0, "Link %s not found", link_name);
+  }
+
+  return new_e_route;
+}
+
+void generic_free_route(route_t route)
+{
+  if (route) {
+    xbt_dynar_free(&route->link_list);
+    xbt_free(route->src_gateway);
+    xbt_free(route->dst_gateway);
+    xbt_free(route);
+  }
+}
+
+static AS_t generic_as_exist(AS_t find_from,
+                                            AS_t to_find)
+{
+  //return to_find; // FIXME: BYPASSERROR OF FOREACH WITH BREAK
+  xbt_dict_cursor_t cursor = NULL;
+  char *key;
+  int found = 0;
+  AS_t elem;
+  xbt_dict_foreach(find_from->routing_sons, cursor, key, elem) {
+    if (to_find == elem || generic_as_exist(elem, to_find)) {
+      found = 1;
+      break;
+    }
+  }
+  if (found)
+    return to_find;
+  return NULL;
+}
+
+AS_t
+generic_autonomous_system_exist(AS_t rc, char *element)
+{
+  //return rc; // FIXME: BYPASSERROR OF FOREACH WITH BREAK
+  AS_t element_as, result, elem;
+  xbt_dict_cursor_t cursor = NULL;
+  char *key;
+  element_as = ((network_element_info_t)
+                xbt_lib_get_or_null(as_router_lib, element,
+                                    ROUTING_ASR_LEVEL))->rc_component;
+  result = ((AS_t) - 1);
+  if (element_as != rc)
+    result = generic_as_exist(rc, element_as);
+
+  int found = 0;
+  if (result) {
+    xbt_dict_foreach(element_as->routing_sons, cursor, key, elem) {
+      found = !strcmp(elem->name, element);
+      if (found)
+        break;
+    }
+    if (found)
+      return element_as;
+  }
+  return NULL;
+}
+
+AS_t
+generic_processing_units_exist(AS_t rc, char *element)
+{
+  AS_t element_as;
+  element_as = ((network_element_info_t)
+                xbt_lib_get_or_null(host_lib,
+                                    element, ROUTING_HOST_LEVEL))->rc_component;
+  if (element_as == rc)
+    return element_as;
+  return generic_as_exist(rc, element_as);
+}
+
+void generic_src_dst_check(AS_t rc, const char *src,
+                           const char *dst)
+{
+
+  void *src_data = xbt_lib_get_or_null(host_lib, src, ROUTING_HOST_LEVEL);
+  void *dst_data = xbt_lib_get_or_null(host_lib, dst, ROUTING_HOST_LEVEL);
+  if (!src_data)
+    src_data = xbt_lib_get_or_null(as_router_lib, src, ROUTING_ASR_LEVEL);
+  if (!dst_data)
+    dst_data = xbt_lib_get_or_null(as_router_lib, dst, ROUTING_ASR_LEVEL);
+
+  if (src_data == NULL || dst_data == NULL)
+    xbt_die("Ask for route \"from\"(%s) or \"to\"(%s) no found at AS \"%s\"",
+            src, dst, rc->name);
+
+  AS_t src_as =
+      ((network_element_info_t) src_data)->rc_component;
+  AS_t dst_as =
+      ((network_element_info_t) dst_data)->rc_component;
+
+  if (src_as != dst_as)
+    xbt_die("The src(%s in %s) and dst(%s in %s) are in differents AS",
+            src, src_as->name, dst, dst_as->name);
+  if (rc != dst_as)
+    xbt_die
+        ("The routing component of src'%s' and dst'%s' is not the same as the network elements belong (%s?=%s?=%s)",
+         src, dst, src_as->name, dst_as->name, rc->name);
+}
index 43b347b..f605009 100644 (file)
@@ -6,80 +6,55 @@
 
 #include "surf_routing_private.h"
 
-/* Global vars */
-extern routing_global_t global_routing;
-extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
 
-/* Routing model structure */
-typedef struct {
-  s_routing_component_t generic_routing;
-} s_routing_component_none_t, *routing_component_none_t;
-
-/* Business methods */
-static xbt_dynar_t none_get_onelink_routes(routing_component_t rc)
-{
+static xbt_dynar_t none_get_onelink_routes(AS_t rc) {
   return NULL;
 }
 
-static route_extended_t none_get_route(routing_component_t rc,
-                                       const char *src, const char *dst)
+static void none_get_route_and_latency(AS_t rc, const char *src, const char *dst,
+                                       route_t res,double *lat)
 {
-  return NULL;
 }
 
-static route_extended_t none_get_bypass_route(routing_component_t rc,
+static route_t none_get_bypass_route(AS_t rc,
                                               const char *src,
-                                              const char *dst)
-{
+                                              const char *dst) {
   return NULL;
 }
 
-static void none_finalize(routing_component_t rc)
-{
-  xbt_free(rc);
-}
-
-static void none_set_processing_unit(routing_component_t rc,
-                                     const char *name)
-{
+static void none_parse_PU(AS_t rc, const char *name) {
+  /* don't care about PUs */
 }
 
-static void none_set_autonomous_system(routing_component_t rc,
-                                       const char *name)
-{
+static void none_parse_AS(AS_t rc, const char *name) {
+  /* even don't care about sub-ASes -- I'm as nihilist as an old punk*/
 }
 
 /* Creation routing model functions */
-void *model_none_create(void)
-{
-  routing_component_none_t new_component =
-      xbt_new0(s_routing_component_none_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      none_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      none_set_autonomous_system;
-  new_component->generic_routing.set_route = NULL;
-  new_component->generic_routing.set_ASroute = NULL;
-  new_component->generic_routing.set_bypassroute = NULL;
-  new_component->generic_routing.get_route = none_get_route;
-  new_component->generic_routing.get_onelink_routes =
-      none_get_onelink_routes;
-  new_component->generic_routing.get_bypass_route = none_get_bypass_route;
-  new_component->generic_routing.finalize = none_finalize;
-  return new_component;
-}
+AS_t model_none_create() {
+  return model_none_create_sized(sizeof(s_as_t));
+}
+AS_t model_none_create_sized(size_t childsize) {
+  AS_t new_component = xbt_malloc0(childsize);
+  new_component->parse_PU = none_parse_PU;
+  new_component->parse_AS = none_parse_AS;
+  new_component->parse_route = NULL;
+  new_component->parse_ASroute = NULL;
+  new_component->parse_bypassroute = NULL;
+  new_component->get_route_and_latency = none_get_route_and_latency;
+  new_component->get_onelink_routes = none_get_onelink_routes;
+  new_component->get_bypass_route = none_get_bypass_route;
+  new_component->finalize = model_none_finalize;
+
+  new_component->routing_sons = xbt_dict_new_homogeneous(NULL);
 
-void model_none_load(void)
-{
+  return new_component;
 }
 
-void model_none_unload(void)
-{
+void model_none_finalize(AS_t as) {
+  xbt_dict_free(&as->routing_sons);
+  xbt_free(as->name);
+  xbt_free(as);
 }
 
-void model_none_end(void)
-{
-}
index 7b90eb8..6f2fd75 100644 (file)
@@ -1,9 +1,8 @@
-/*
- * surf_routing_private.h
- *
- *  Created on: 14 avr. 2011
- *      Author: navarrop
- */
+/* Copyright (c) 2009, 2010, 2011. 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_SURF_ROUTING_PRIVATE_H
 #define _SURF_SURF_ROUTING_PRIVATE_H
 #include "xbt/set.h"
 #include "surf/surfxml_parse.h"
 
+/* ************************************************************************** */
+/* ******************************* NO ROUTING ******************************* */
+/* Only save the AS tree, and forward calls to child ASes */
+AS_t model_none_create(void);
+AS_t model_none_create_sized(size_t childsize);
+void model_none_finalize(AS_t as);
 /* ************************************************************************** */
 /* ***************** GENERIC PARSE FUNCTIONS (declarations) ***************** */
+AS_t model_generic_create_sized(size_t childsize);
+void model_generic_finalize(AS_t as);
 
-void generic_set_processing_unit(routing_component_t rc,
-                                        const char *name);
-void generic_set_autonomous_system(routing_component_t rc,
-                                          const char *name);
-void generic_set_bypassroute(routing_component_t rc,
-                                    const char *src, const char *dst,
-                                    route_extended_t e_route);
-
-int surf_link_resource_cmp(const void *a, const void *b);
-int surf_pointer_resource_cmp(const void *a, const void *b);
+void generic_parse_PU(AS_t rc, const char *name);
+void generic_parse_AS(AS_t rc, const char *name);
+void generic_parse_bypassroute(AS_t rc, const char *src, const char *dst,
+                               route_t e_route);
 
 /* ************************************************************************** */
 /* *************** GENERIC BUSINESS METHODS (declarations) ****************** */
 
-double generic_get_link_latency(routing_component_t rc, const char *src, const char *dst,
-                                                                               route_extended_t e_route);
-xbt_dynar_t generic_get_onelink_routes(routing_component_t rc);
-route_extended_t generic_get_bypassroute(routing_component_t rc,
+xbt_dynar_t generic_get_onelink_routes(AS_t rc);
+route_t generic_get_bypassroute(AS_t rc,
                                                 const char *src,
                                                 const char *dst);
 
 /* ************************************************************************** */
 /* ****************** GENERIC AUX FUNCTIONS (declarations) ****************** */
 
-route_extended_t
+route_t
 generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy,
                            void *data, int order);
 route_t
 generic_new_route(e_surf_routing_hierarchy_t hierarchy,
                            void *data, int order);
-void generic_free_route(route_t route);
-void generic_free_extended_route(route_extended_t e_route);
-routing_component_t
-generic_autonomous_system_exist(routing_component_t rc, char *element);
-routing_component_t
-generic_processing_units_exist(routing_component_t rc, char *element);
-void generic_src_dst_check(routing_component_t rc, const char *src,
+AS_t
+generic_autonomous_system_exist(AS_t rc, char *element);
+AS_t
+generic_processing_units_exist(AS_t rc, char *element);
+void generic_src_dst_check(AS_t rc, const char *src,
                                   const char *dst);
 
 
 /* ************************************************************************** */
 /* *************************** FLOYD ROUTING ******************************** */
-void *model_floyd_create(void);  /* create structures for floyd routing model */
-void model_floyd_load(void);     /* load parse functions for floyd routing model */
-void model_floyd_unload(void);   /* unload parse functions for floyd routing model */
-void model_floyd_end(void);      /* finalize the creation of floyd routing model */
-void model_floyd_set_route(routing_component_t rc, const char *src,
-        const char *dst, name_route_extended_t route);
-
+AS_t model_floyd_create(void);  /* create structures for floyd routing model */
+void model_floyd_end(AS_t as);      /* finalize the creation of floyd routing model */
+void model_floyd_parse_route(AS_t rc, const char *src,
+        const char *dst, route_t route);
 
-#ifdef HAVE_PCRE_LIB
 /* ************************************************** */
 /* ************** RULE-BASED ROUTING **************** */
-void *model_rulebased_create(void);      /* create structures for rulebased routing model */
-void model_rulebased_load(void);         /* load parse functions for rulebased routing model */
-void model_rulebased_unload(void);       /* unload parse functions for rulebased routing model */
-void model_rulebased_end(void);          /* finalize the creation of rulebased routing model */
-#endif
+AS_t model_rulebased_create(void);      /* create structures for rulebased routing model */
+
+/* ************************************************** */
+/* **************  Cluster ROUTING   **************** */
+AS_t model_cluster_create(void);      /* create structures for cluster routing model */
+
+/* Pass info from the cluster parser to the cluster routing */
+void surf_routing_cluster_add_link(const char* host_id,surf_parsing_link_up_down_t info);
+void surf_routing_cluster_add_backbone(AS_t as, void* bb);
+
+/* ************************************************** */
+/* **************  Vivaldi ROUTING   **************** */
+AS_t model_vivaldi_create(void);      /* create structures for vivaldi routing model */
+#define HOST_PEER(peername) bprintf("peer_%s", peername)
+#define ROUTER_PEER(peername) bprintf("router_%s", peername)
+#define LINK_UP_PEER(peername) bprintf("link_%s_up", peername)
+#define LINK_DOWN_PEER(peername) bprintf("link_%s_down", peername)
 
 /* ************************************************************************** */
 /* ********** Dijkstra & Dijkstra Cached ROUTING **************************** */
-void *model_dijkstra_both_create(int cached);    /* create by calling dijkstra or dijkstracache */
-void *model_dijkstra_create(void);       /* create structures for dijkstra routing model */
-void *model_dijkstracache_create(void);  /* create structures for dijkstracache routing model */
-void model_dijkstra_both_load(void);     /* load parse functions for dijkstra routing model */
-void model_dijkstra_both_unload(void);   /* unload parse functions for dijkstra routing model */
-void model_dijkstra_both_end(void);      /* finalize the creation of dijkstra routing model */
-void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
-                     const char *dst, name_route_extended_t route);
+AS_t model_dijkstra_both_create(int cached);    /* create by calling dijkstra or dijkstracache */
+AS_t model_dijkstra_create(void);       /* create structures for dijkstra routing model */
+AS_t model_dijkstracache_create(void);  /* create structures for dijkstracache routing model */
+void model_dijkstra_both_end(AS_t as);      /* finalize the creation of dijkstra routing model */
+void model_dijkstra_both_parse_route (AS_t rc, const char *src,
+                     const char *dst, route_t route);
 
 /* ************************************************************************** */
 /* *************************** FULL ROUTING ********************************* */
-void *model_full_create(void);   /* create structures for full routing model */
-void model_full_load(void);      /* load parse functions for full routing model */
-void model_full_unload(void);    /* unload parse functions for full routing model */
-void model_full_end(void);       /* finalize the creation of full routing model */
+AS_t model_full_create(void);   /* create structures for full routing model */
+void model_full_end(AS_t as);       /* finalize the creation of full routing model */
 void model_full_set_route(     /* Set the route and ASroute between src and dst */
-               routing_component_t rc, const char *src, const char *dst, name_route_extended_t route);
+               AS_t rc, const char *src, const char *dst, route_t route);
 
-/* ************************************************************************** */
-/* ******************************* NO ROUTING ******************************* */
-void *model_none_create(void);           /* none routing model */
-void model_none_load(void);              /* none routing model */
-void model_none_unload(void);            /* none routing model */
-void model_none_end(void);               /* none routing model */
 
 #endif                          /* _SURF_SURF_ROUTING_PRIVATE_H */
index fad6426..b4f3765 100644 (file)
@@ -4,27 +4,22 @@
 /* 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 "surf_routing_private.h"
-
-#ifdef HAVE_PCRE_LIB
 #include <pcre.h>               /* regular expression library */
 
 /* Global vars */
 extern routing_global_t global_routing;
-extern routing_component_t current_routing;
-extern model_type_t current_routing_model;
-extern xbt_dynar_t link_list;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_rulebased, surf, "Routing part of surf");
 
 /* Routing model structure */
 
 typedef struct {
-  s_routing_component_t generic_routing;
+  s_as_t generic_routing;
   xbt_dict_t dict_processing_units;
   xbt_dict_t dict_autonomous_systems;
   xbt_dynar_t list_route;
   xbt_dynar_t list_ASroute;
-} s_routing_component_rulebased_t, *routing_component_rulebased_t;
+} s_AS_rulebased_t, *AS_rulebased_t;
 
 typedef struct s_rule_route s_rule_route_t, *rule_route_t;
 typedef struct s_rule_route_extended s_rule_route_extended_t,
@@ -69,35 +64,29 @@ static void rule_route_extended_free(void *e)
 
 /* Parse routing model functions */
 
-static void model_rulebased_set_processing_unit(routing_component_t rc,
-                                                const char *name)
+static void model_rulebased_parse_PU(AS_t rc, const char *name)
 {
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
+  AS_rulebased_t routing = (AS_rulebased_t) rc;
   xbt_dict_set(routing->dict_processing_units, name, (void *) (-1), NULL);
 }
 
-static void model_rulebased_set_autonomous_system(routing_component_t rc,
-                                                  const char *name)
+static void model_rulebased_parse_AS(AS_t rc, const char *name)
 {
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
-  xbt_dict_set(routing->dict_autonomous_systems, name, (void *) (-1),
-               NULL);
+  AS_rulebased_t routing = (AS_rulebased_t) rc;
+  xbt_dict_set(routing->dict_autonomous_systems, name, (void *) (-1), NULL);
 }
 
-static void model_rulebased_set_route(routing_component_t rc,
+static void model_rulebased_parse_route(AS_t rc,
                                       const char *src, const char *dst,
-                                      name_route_extended_t route)
+                                      route_t route)
 {
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
+  AS_rulebased_t routing = (AS_rulebased_t) rc;
   rule_route_t ruleroute = xbt_new0(s_rule_route_t, 1);
   const char *error;
   int erroffset;
 
-  if(!strcmp(rc->routing->name,"Vivaldi")){
-         if(xbt_dynar_length(route->generic_route.link_list) != 0)
+  if(!strcmp(rc->model_desc->name,"Vivaldi")){
+         if(!xbt_dynar_is_empty(route->link_list))
                  xbt_die("You can't have link_ctn with Model Vivaldi.");
   }
 
@@ -109,23 +98,24 @@ static void model_rulebased_set_route(routing_component_t rc,
   xbt_assert(ruleroute->re_src,
               "PCRE compilation failed at offset %d (\"%s\"): %s\n",
               erroffset, dst, error);
-  ruleroute->re_str_link = route->generic_route.link_list;
+
+  ruleroute->re_str_link = route->link_list;
+  route->link_list = NULL; // Don't free it twice in each container
+
   xbt_dynar_push(routing->list_route, &ruleroute);
-  xbt_free(route);
 }
 
-static void model_rulebased_set_ASroute(routing_component_t rc,
+static void model_rulebased_parse_ASroute(AS_t rc,
                                         const char *src, const char *dst,
-                                        name_route_extended_t route)
+                                        route_t route)
 {
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
+  AS_rulebased_t routing = (AS_rulebased_t) rc;
   rule_route_extended_t ruleroute_e = xbt_new0(s_rule_route_extended_t, 1);
   const char *error;
   int erroffset;
 
-  if(!strcmp(rc->routing->name,"Vivaldi")){
-         if(xbt_dynar_length(route->generic_route.link_list) != 0)
+  if(!strcmp(rc->model_desc->name,"Vivaldi")){
+         if(!xbt_dynar_is_empty(route->link_list))
                  xbt_die("You can't have link_ctn with Model Vivaldi.");
   }
 
@@ -140,19 +130,20 @@ static void model_rulebased_set_ASroute(routing_component_t rc,
               "PCRE compilation failed at offset %d (\"%s\"): %s\n",
               erroffset, dst, error);
   ruleroute_e->generic_rule_route.re_str_link =
-      route->generic_route.link_list;
+      route->link_list;
   ruleroute_e->re_src_gateway = route->src_gateway;
   ruleroute_e->re_dst_gateway = route->dst_gateway;
   xbt_dynar_push(routing->list_ASroute, &ruleroute_e);
-//  xbt_free(route->src_gateway);
-//  xbt_free(route->dst_gateway);
-  xbt_free(route);
+
+  /* make sure that they don't get freed */
+  route->link_list = NULL;
+  route->src_gateway = route->dst_gateway = NULL;
 }
 
-static void model_rulebased_set_bypassroute(routing_component_t rc,
+static void model_rulebased_parse_bypassroute(AS_t rc,
                                             const char *src,
                                             const char *dst,
-                                            route_extended_t e_route)
+                                            route_t e_route)
 {
   xbt_die("bypass routing not supported for Route-Based model");
 }
@@ -181,7 +172,7 @@ static char *remplace(char *value, const char **src_list, int src_size,
 
       /* solve the indication */
       const char **param_list;
-      int param_size;
+      _XBT_GNUC_UNUSED int param_size;
       if (value[i] == 's' && value[i + 1] == 'r' && value[i + 2] == 'c') {
         param_list = src_list;
         param_size = src_size;
@@ -215,10 +206,10 @@ static char *remplace(char *value, const char **src_list, int src_size,
   return memcpy(res, result, i_res);
 }
 
-static route_extended_t rulebased_get_route(routing_component_t rc,
-                                            const char *src,
-                                            const char *dst);
-static xbt_dynar_t rulebased_get_onelink_routes(routing_component_t rc)
+static void rulebased_get_route_and_latency(AS_t rc,
+                                const char *src, const char *dst,
+                                route_t res,double*lat);
+static xbt_dynar_t rulebased_get_onelink_routes(AS_t rc)
 {
   xbt_dynar_t ret = xbt_dynar_new (sizeof(onelink_t), xbt_free);
 
@@ -226,7 +217,7 @@ static xbt_dynar_t rulebased_get_onelink_routes(routing_component_t rc)
   if(!strcmp(surf_network_model->name,"network NS3"))
        return ret;
 
-  routing_component_rulebased_t routing = (routing_component_rulebased_t)rc;
+  AS_rulebased_t routing = (AS_rulebased_t)rc;
 
   xbt_dict_cursor_t c1 = NULL;
   char *k1, *d1;
@@ -234,19 +225,21 @@ static xbt_dynar_t rulebased_get_onelink_routes(routing_component_t rc)
   //find router
   char *router = NULL;
   xbt_dict_foreach(routing->dict_processing_units, c1, k1, d1) {
-    if (rc->get_network_element_type(k1) == SURF_NETWORK_ELEMENT_ROUTER){
+    if (routing_get_network_element_type(k1) == SURF_NETWORK_ELEMENT_ROUTER){
       router = k1;
+      break;
     }
   }
 
-  if (!router){
+  if (!router)
     xbt_die ("rulebased_get_onelink_routes works only if the AS is a cluster, sorry.");
-  }
 
   xbt_dict_foreach(routing->dict_processing_units, c1, k1, d1) {
-    route_extended_t route = rulebased_get_route (rc, router, k1);
+    route_t route = xbt_new0(s_route_t,1);
+    route->link_list = xbt_dynar_new(global_routing->size_of_link,NULL);
+    rulebased_get_route_and_latency (rc, router, k1, route,NULL);
 
-    int number_of_links = xbt_dynar_length(route->generic_route.link_list);
+    int number_of_links = xbt_dynar_length(route->link_list);
 
     if(number_of_links == 1) {
                //loopback
@@ -257,7 +250,7 @@ static xbt_dynar_t rulebased_get_onelink_routes(routing_component_t rc)
                }
 
                void *link_ptr;
-               xbt_dynar_get_cpy (route->generic_route.link_list, 1, &link_ptr);
+               xbt_dynar_get_cpy (route->link_list, 1, &link_ptr);
                onelink_t onelink = xbt_new0 (s_onelink_t, 1);
                onelink->src = xbt_strdup (k1);
                onelink->dst = xbt_strdup (router);
@@ -269,9 +262,9 @@ static xbt_dynar_t rulebased_get_onelink_routes(routing_component_t rc)
 }
 
 /* Business methods */
-static route_extended_t rulebased_get_route(routing_component_t rc,
-                                            const char *src,
-                                            const char *dst)
+static void rulebased_get_route_and_latency(AS_t rc,
+                                const char *src, const char *dst,
+                                route_t route, double *lat)
 {
   xbt_assert(rc && src
               && dst,
@@ -279,8 +272,7 @@ static route_extended_t rulebased_get_route(routing_component_t rc,
               rc->name);
 
   /* set utils vars */
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
+  AS_rulebased_t routing = (AS_rulebased_t) rc;
 
   int are_processing_units=0;
   xbt_dynar_t rule_list;
@@ -294,24 +286,20 @@ static route_extended_t rulebased_get_route(routing_component_t rc,
     are_processing_units = 0;
     rule_list = routing->list_ASroute;
   } else
-    xbt_die("Ask for route \"from\"(%s)  or \"to\"(%s) no found in "
-            "the local table", src, dst);
+    THROWF(arg_error,0,"No route from '%s' to '%s'",src,dst);
 
   int rc_src = -1;
   int rc_dst = -1;
   int src_length = (int) strlen(src);
   int dst_length = (int) strlen(dst);
 
-  xbt_dynar_t links_list =
-      xbt_dynar_new(global_routing->size_of_link, NULL);
-
   rule_route_t ruleroute;
   unsigned int cpt;
   int ovector_src[OVECCOUNT];
   int ovector_dst[OVECCOUNT];
   const char **list_src = NULL;
   const char **list_dst = NULL;
-  int res;
+  _XBT_GNUC_UNUSED int res;
   xbt_dynar_foreach(rule_list, cpt, ruleroute) {
     rc_src =
         pcre_exec(ruleroute->re_src, NULL, src, src_length, 0, 0,
@@ -331,9 +319,11 @@ static route_extended_t rulebased_get_route(routing_component_t rc,
               remplace(link_name, list_src, rc_src, list_dst, rc_dst);
           void *link =
                          xbt_lib_get_or_null(link_lib, new_link_name, SURF_LINK_LEVEL);
-          if (link)
-            xbt_dynar_push(links_list, &link);
-          else
+          if (link) {
+            xbt_dynar_push(route->link_list, &link);
+            if (lat)
+              *lat += surf_network_model->extension.network.get_link_latency(link);
+          } else
             THROWF(mismatch_error, 0, "Link %s not found", new_link_name);
           xbt_free(new_link_name);
         }
@@ -343,25 +333,24 @@ static route_extended_t rulebased_get_route(routing_component_t rc,
       break;
   }
 
-  route_extended_t new_e_route = NULL;
   if (rc_src >= 0 && rc_dst >= 0) {
-    new_e_route = xbt_new0(s_route_extended_t, 1);
-    new_e_route->generic_route.link_list = links_list;
+    /* matched src and dest, nothing more to do (?) */
   } else if (!strcmp(src, dst) && are_processing_units) {
-    new_e_route = xbt_new0(s_route_extended_t, 1);
-    xbt_dynar_push(links_list, &(global_routing->loopback));
-    new_e_route->generic_route.link_list = links_list;
+    xbt_dynar_push(route->link_list, &(global_routing->loopback));
+    if (lat)
+      *lat += surf_network_model->extension.network.get_link_latency(global_routing->loopback);
   } else {
-    xbt_dynar_free(&link_list);
+    THROWF(arg_error,0,"No route from '%s' to '%s'??",src,dst);
+    //xbt_dynar_reset(route->link_list);
   }
 
-  if (!are_processing_units && new_e_route) {
+  if (!are_processing_units && !xbt_dynar_is_empty(route->link_list)) {
     rule_route_extended_t ruleroute_extended =
         (rule_route_extended_t) ruleroute;
-    new_e_route->src_gateway =
+    route->src_gateway =
         remplace(ruleroute_extended->re_src_gateway, list_src, rc_src,
                  list_dst, rc_dst);
-    new_e_route->dst_gateway =
+    route->dst_gateway =
         remplace(ruleroute_extended->re_dst_gateway, list_src, rc_src,
                  list_dst, rc_dst);
   }
@@ -370,71 +359,48 @@ static route_extended_t rulebased_get_route(routing_component_t rc,
     pcre_free_substring_list(list_src);
   if (list_dst)
     pcre_free_substring_list(list_dst);
-
-  return new_e_route;
 }
 
-static route_extended_t rulebased_get_bypass_route(routing_component_t rc,
-                                                   const char *src,
-                                                   const char *dst)
-{
+static route_t rulebased_get_bypass_route(AS_t rc, const char *src, const char *dst) {
   return NULL;
 }
 
-static void rulebased_finalize(routing_component_t rc)
+static void rulebased_finalize(AS_t rc)
 {
-  routing_component_rulebased_t routing =
-      (routing_component_rulebased_t) rc;
+  AS_rulebased_t routing =
+      (AS_rulebased_t) rc;
   if (routing) {
     xbt_dict_free(&routing->dict_processing_units);
     xbt_dict_free(&routing->dict_autonomous_systems);
     xbt_dynar_free(&routing->list_route);
     xbt_dynar_free(&routing->list_ASroute);
-    /* Delete structure */
-    xbt_free(routing);
+
+    model_generic_finalize(rc);
   }
 }
 
 /* Creation routing model functions */
-void *model_rulebased_create(void)
-{
-  routing_component_rulebased_t new_component =
-      xbt_new0(s_routing_component_rulebased_t, 1);
-  new_component->generic_routing.set_processing_unit =
-      model_rulebased_set_processing_unit;
-  new_component->generic_routing.set_autonomous_system =
-      model_rulebased_set_autonomous_system;
-  new_component->generic_routing.set_route = model_rulebased_set_route;
-  new_component->generic_routing.set_ASroute = model_rulebased_set_ASroute;
-  new_component->generic_routing.set_bypassroute = model_rulebased_set_bypassroute;
+AS_t model_rulebased_create(void) {
+
+  AS_rulebased_t new_component = (AS_rulebased_t)
+      model_generic_create_sized(sizeof(s_AS_rulebased_t));
+
+  new_component->generic_routing.parse_PU = model_rulebased_parse_PU;
+  new_component->generic_routing.parse_AS = model_rulebased_parse_AS;
+  new_component->generic_routing.parse_route = model_rulebased_parse_route;
+  new_component->generic_routing.parse_ASroute = model_rulebased_parse_ASroute;
+  new_component->generic_routing.parse_bypassroute = model_rulebased_parse_bypassroute;
   new_component->generic_routing.get_onelink_routes = rulebased_get_onelink_routes;
-  new_component->generic_routing.get_route = rulebased_get_route;
-  new_component->generic_routing.get_latency = generic_get_link_latency;
+  new_component->generic_routing.get_route_and_latency = rulebased_get_route_and_latency;
   new_component->generic_routing.get_bypass_route = rulebased_get_bypass_route;
   new_component->generic_routing.finalize = rulebased_finalize;
-  new_component->generic_routing.get_network_element_type = get_network_element_type;
   /* initialization of internal structures */
-  new_component->dict_processing_units = xbt_dict_new();
-  new_component->dict_autonomous_systems = xbt_dict_new();
+  new_component->dict_processing_units = xbt_dict_new_homogeneous(NULL);
+  new_component->dict_autonomous_systems = xbt_dict_new_homogeneous(NULL);
   new_component->list_route = xbt_dynar_new(sizeof(rule_route_t), &rule_route_free);
   new_component->list_ASroute =
       xbt_dynar_new(sizeof(rule_route_extended_t),
                     &rule_route_extended_free);
-  return new_component;
-}
-
-void model_rulebased_load(void)
-{
-  /* use "surfxml_add_callback" to add a parse function call */
-}
-
-void model_rulebased_unload(void)
-{
-  /* use "surfxml_del_callback" to remove a parse function call */
-}
 
-void model_rulebased_end(void)
-{
+  return (AS_t) new_component;
 }
-
-#endif                          /* HAVE_PCRE_LIB */
diff --git a/src/surf/surf_routing_vivaldi.c b/src/surf/surf_routing_vivaldi.c
new file mode 100644 (file)
index 0000000..6ba2ebe
--- /dev/null
@@ -0,0 +1,56 @@
+/* Copyright (c) 2009, 2010, 2011. 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 "surf_routing_private.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf");
+
+static XBT_INLINE double euclidean_dist_comp(int index, xbt_dynar_t src, xbt_dynar_t dst) {
+  double src_coord, dst_coord;
+
+  src_coord = xbt_dynar_get_as(src, index, double);
+  dst_coord = xbt_dynar_get_as(dst, index, double);
+
+  return (src_coord-dst_coord)*(src_coord-dst_coord);
+}
+
+static void vivaldi_get_route_and_latency(
+    AS_t rc, const char *src_p, const char *dst_p,
+    route_t route, double *lat)
+{
+  char *src = (char*)src_p;
+  char *dst = (char*)dst_p;
+
+  if(routing_get_network_element_type(src) == SURF_NETWORK_ELEMENT_AS) {
+    src = route->src_gateway = ROUTER_PEER(src);
+    dst = route->dst_gateway = ROUTER_PEER(dst);
+  }
+
+  double euclidean_dist;
+  xbt_dynar_t src_ctn, dst_ctn;
+  src_ctn = xbt_lib_get_or_null(host_lib, src, COORD_HOST_LEVEL);
+  if(!src_ctn) src_ctn = xbt_lib_get_or_null(as_router_lib, src, COORD_ASR_LEVEL);
+  dst_ctn = xbt_lib_get_or_null(host_lib, dst, COORD_HOST_LEVEL);
+  if(!dst_ctn) dst_ctn = xbt_lib_get_or_null(as_router_lib, dst, COORD_ASR_LEVEL);
+
+  xbt_assert(src_ctn,"No coordinate found for element '%s'",src);
+  xbt_assert(dst_ctn,"No coordinate found for element '%s'",dst);
+
+  euclidean_dist = sqrt (euclidean_dist_comp(0,src_ctn,dst_ctn)+euclidean_dist_comp(1,src_ctn,dst_ctn))
+                      + fabs(xbt_dynar_get_as(src_ctn, 2, double))+fabs(xbt_dynar_get_as(dst_ctn, 2, double));
+
+  if (lat)
+    *lat += euclidean_dist / 1000; //From .ms to .s
+
+}
+
+
+/* Creation routing model functions */
+AS_t model_vivaldi_create(void)
+{
+         AS_t new_component = model_rulebased_create();
+         new_component->get_route_and_latency = vivaldi_get_route_and_latency;
+         return new_component;
+}
index 9244f2d..0187aa5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,64 +8,46 @@
 #include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/dict.h"
-#include "surf/surfxml_parse_private.h"
+#include "surf/surfxml_parse.h"
 #include "surf/surf_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
                                 "Logging specific to the SURF parsing module");
 #undef CLEANUP
-#include "simgrid_dtd.c"
-
-char *platform_filename;
-
-/* Initialize the parsing globals */
-xbt_dict_t traces_set_list = NULL;
-xbt_dict_t trace_connect_list_host_avail = NULL;
-xbt_dict_t trace_connect_list_power = NULL;
-xbt_dict_t trace_connect_list_link_avail = NULL;
-xbt_dict_t trace_connect_list_bandwidth = NULL;
-xbt_dict_t trace_connect_list_latency = NULL;
-
-/* This buffer is used to store the original buffer before substituting it by out own buffer. Useful for the foreach tag */
-static xbt_dynar_t surfxml_bufferstack_stack = NULL;
-int surfxml_bufferstack_size = 2048;
+int ETag_surfxml_include_state(void);
 
-static char *old_buff = NULL;
-static void surf_parse_error(char *msg);
-
-unsigned int surfxml_buffer_stack_stack_ptr;
-unsigned int surfxml_buffer_stack_stack[1024];
+#include "simgrid_dtd.c"
 
+/*
+ * Helping functions
+ */
+void surf_parse_error(const char *msg) {
+  xbt_die("Parse error on line %d: %s\n", surf_parse_lineno, msg);
+}
 
-void surfxml_bufferstack_push(int new)
-{
-  if (!new)
-    old_buff = surfxml_bufferstack;
-  else {
-    xbt_dynar_push(surfxml_bufferstack_stack, &surfxml_bufferstack);
-    surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
-  }
+double surf_parse_get_double(const char *string) {
+  double res;
+  int ret = sscanf(string, "%lg", &res);
+  if (ret != 1)
+    surf_parse_error(bprintf("%s is not a double", string));
+  return res;
 }
 
-void surfxml_bufferstack_pop(int new)
-{
-  if (!new)
-    surfxml_bufferstack = old_buff;
-  else {
-    free(surfxml_bufferstack);
-    xbt_dynar_pop(surfxml_bufferstack_stack, &surfxml_bufferstack);
-  }
+int surf_parse_get_int(const char *string) {
+  int res;
+  int ret = sscanf(string, "%d", &res);
+  if (ret != 1)
+    surf_parse_error(bprintf("%s is not an integer", string));
+  return res;
 }
 
-/* make sure these symbols are defined as strong ones in this file so that the linked can resolve them */
-xbt_dynar_t STag_surfxml_platform_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_platform_cb_list = NULL;
-xbt_dynar_t STag_surfxml_host_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_host_cb_list = NULL;
-xbt_dynar_t STag_surfxml_router_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_router_cb_list = NULL;
-xbt_dynar_t STag_surfxml_link_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_link_cb_list = NULL;
+
+/*
+ * All the callback lists that can be overiden 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 */
 xbt_dynar_t STag_surfxml_route_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_route_cb_list = NULL;
 xbt_dynar_t STag_surfxml_link_ctn_cb_list = NULL;
@@ -76,8 +58,6 @@ xbt_dynar_t STag_surfxml_argument_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_argument_cb_list = NULL;
 xbt_dynar_t STag_surfxml_prop_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_prop_cb_list = NULL;
-xbt_dynar_t STag_surfxml_cluster_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_cluster_cb_list = NULL;
 xbt_dynar_t STag_surfxml_peer_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_peer_cb_list = NULL;
 xbt_dynar_t STag_surfxml_trace_cb_list = NULL;
@@ -86,118 +66,82 @@ xbt_dynar_t STag_surfxml_trace_connect_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_trace_connect_cb_list = NULL;
 xbt_dynar_t STag_surfxml_random_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_random_cb_list = NULL;
-xbt_dynar_t STag_surfxml_AS_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_AS_cb_list = NULL;
 xbt_dynar_t STag_surfxml_ASroute_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_ASroute_cb_list = NULL;
 xbt_dynar_t STag_surfxml_bypassRoute_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_bypassRoute_cb_list = NULL;
-xbt_dynar_t STag_surfxml_config_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_config_cb_list = NULL;
 xbt_dynar_t STag_surfxml_include_cb_list = NULL;
 xbt_dynar_t ETag_surfxml_include_cb_list = NULL;
 
-/* store the current property set for any tag */
+/* The default current property receiver. Setup in the corresponding opening callbacks. */
 xbt_dict_t current_property_set = NULL;
 /* dictionary of random generator data */
 xbt_dict_t random_data_list = NULL;
 
+/* Call all the callbacks of a specific SAX event */
 static XBT_INLINE void surfxml_call_cb_functions(xbt_dynar_t);
 
 YY_BUFFER_STATE surf_input_buffer;
 FILE *surf_file_to_parse = NULL;
 
-static void surf_parse_error(char *msg);
-
-static void parse_Stag_trace(void);
-static void parse_Etag_trace(void);
-static void parse_Stag_trace_connect(void);
-
 static void init_randomness(void);
 static void add_randomness(void);
 
+/*
+ * Stuff relative to the <include> tag
+ */
+
 static xbt_dynar_t surf_input_buffer_stack = NULL;
 static xbt_dynar_t surf_file_to_parse_stack = NULL;
 
 void STag_surfxml_include(void)
 {
   XBT_INFO("STag_surfxml_include '%s'",A_surfxml_include_file);
-  xbt_dynar_push(surf_file_to_parse_stack, &surf_file_to_parse);
+  xbt_dynar_push(surf_file_to_parse_stack, &surf_file_to_parse); //save old filename
 
-  surf_file_to_parse = surf_fopen(A_surfxml_include_file, "r");
+  surf_file_to_parse = surf_fopen(A_surfxml_include_file, "r"); // read new filename
   xbt_assert((surf_file_to_parse), "Unable to open \"%s\"\n",
               A_surfxml_include_file);
+  xbt_dynar_push(surf_input_buffer_stack,&surf_input_buffer);
   surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
   surf_parse_push_buffer_state(surf_input_buffer);
   fflush(NULL);
 }
 
-void ETag_surfxml_include(void)
+void ETag_surfxml_include(void) {
+/* Nothing to do when done with reading the include tag.
+ * Instead, the handling should be deferred until the EOF of current buffer -- see below */
+}
+
+/** @brief When reaching EOF, check whether we are in an include tag, and behave accordingly if yes
+ *
+ * This function is called automatically by sedding the parser in buildtools/Cmake/MaintainerMode.cmake
+ * Every FAIL on "Premature EOF" is preceded by a call to this function, which role is to restore the
+ * previous buffer if we reached the EOF /of an include file/. Its return code is used to avoid the
+ * error message in that case.
+ *
+ * Yeah, that's terribly hackish, but it works. A better solution should be dealed with in flexml
+ * directly: a command line flag could instruct it to do the correct thing when #include is encountered
+ * on a line.
+ */
+int ETag_surfxml_include_state(void)
 {
   fflush(NULL);
+  XBT_INFO("ETag_surfxml_include_state '%s'",A_surfxml_include_file);
+  if(!xbt_dynar_is_empty(surf_input_buffer_stack))
+         return 1;
   fclose(surf_file_to_parse);
   xbt_dynar_pop(surf_file_to_parse_stack, &surf_file_to_parse);
   surf_parse_pop_buffer_state();
-  XBT_INFO("ETag_surfxml_include '%s'",A_surfxml_include_file);
+  xbt_dynar_pop(surf_input_buffer_stack,surf_input_buffer);
+  return 0;
 }
 
-/*
- * This function return 0 or 1 if callbacks are empty or not.
- */
-int surf_parse_no_callbacks(void)
-{
-       return  xbt_dynar_is_empty(STag_surfxml_platform_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_platform_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_host_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_host_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_router_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_router_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_link_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_link_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_route_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_route_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_link_ctn_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_link_ctn_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_process_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_process_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_argument_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_argument_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_prop_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_prop_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_trace_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_trace_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_trace_connect_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_trace_connect_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_random_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_random_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_AS_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_AS_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_ASroute_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_ASroute_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_bypassRoute_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_bypassRoute_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_cluster_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_cluster_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_peer_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_peer_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_config_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_config_cb_list) &&
-         xbt_dynar_is_empty(STag_surfxml_include_cb_list) &&
-         xbt_dynar_is_empty(ETag_surfxml_include_cb_list);
-}
 
 void surf_parse_init_callbacks(void)
 {
-         STag_surfxml_platform_cb_list =
-             xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_platform_cb_list =
-             xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_host_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_host_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_router_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_router_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_link_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_link_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
+         sg_platf_init(); // FIXME: move to a proper place?
+
          STag_surfxml_route_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_route_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
          STag_surfxml_link_ctn_cb_list =
@@ -222,8 +166,6 @@ void surf_parse_init_callbacks(void)
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
          STag_surfxml_random_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_random_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_AS_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_AS_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
          STag_surfxml_ASroute_cb_list =
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_ASroute_cb_list =
@@ -232,18 +174,10 @@ void surf_parse_init_callbacks(void)
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_bypassRoute_cb_list =
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_cluster_cb_list =
-             xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_cluster_cb_list =
-             xbt_dynar_new(sizeof(void_f_void_t), NULL);
          STag_surfxml_peer_cb_list =
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_peer_cb_list =
              xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         STag_surfxml_config_cb_list =
-                         xbt_dynar_new(sizeof(void_f_void_t), NULL);
-         ETag_surfxml_config_cb_list =
-                         xbt_dynar_new(sizeof(void_f_void_t), NULL);
          STag_surfxml_include_cb_list =
                          xbt_dynar_new(sizeof(void_f_void_t), NULL);
          ETag_surfxml_include_cb_list =
@@ -258,14 +192,8 @@ void surf_parse_reset_callbacks(void)
 
 void surf_parse_free_callbacks(void)
 {
-  xbt_dynar_free(&STag_surfxml_platform_cb_list);
-  xbt_dynar_free(&ETag_surfxml_platform_cb_list);
-  xbt_dynar_free(&STag_surfxml_host_cb_list);
-  xbt_dynar_free(&ETag_surfxml_host_cb_list);
-  xbt_dynar_free(&STag_surfxml_router_cb_list);
-  xbt_dynar_free(&ETag_surfxml_router_cb_list);
-  xbt_dynar_free(&STag_surfxml_link_cb_list);
-  xbt_dynar_free(&ETag_surfxml_link_cb_list);
+  sg_platf_exit(); // FIXME: better place?
+
   xbt_dynar_free(&STag_surfxml_route_cb_list);
   xbt_dynar_free(&ETag_surfxml_route_cb_list);
   xbt_dynar_free(&STag_surfxml_link_ctn_cb_list);
@@ -282,29 +210,21 @@ void surf_parse_free_callbacks(void)
   xbt_dynar_free(&ETag_surfxml_trace_connect_cb_list);
   xbt_dynar_free(&STag_surfxml_random_cb_list);
   xbt_dynar_free(&ETag_surfxml_random_cb_list);
-  xbt_dynar_free(&STag_surfxml_AS_cb_list);
-  xbt_dynar_free(&ETag_surfxml_AS_cb_list);
   xbt_dynar_free(&STag_surfxml_ASroute_cb_list);
   xbt_dynar_free(&ETag_surfxml_ASroute_cb_list);
   xbt_dynar_free(&STag_surfxml_bypassRoute_cb_list);
   xbt_dynar_free(&ETag_surfxml_bypassRoute_cb_list);
-  xbt_dynar_free(&STag_surfxml_cluster_cb_list);
-  xbt_dynar_free(&ETag_surfxml_cluster_cb_list);
   xbt_dynar_free(&STag_surfxml_peer_cb_list);
   xbt_dynar_free(&ETag_surfxml_peer_cb_list);
-  xbt_dynar_free(&STag_surfxml_config_cb_list);
-  xbt_dynar_free(&ETag_surfxml_config_cb_list);
   xbt_dynar_free(&STag_surfxml_include_cb_list);
   xbt_dynar_free(&ETag_surfxml_include_cb_list);
 }
 
 /* Stag and Etag parse functions */
+void ETag_surfxml_router(void)  { /* ignored -- do not add content here */ }
 
-void STag_surfxml_platform(void)
-{
-  double version = 0.0;
-
-  sscanf(A_surfxml_platform_version, "%lg", &version);
+void STag_surfxml_platform(void) {
+  _XBT_GNUC_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
 
   xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
       "You're using an ancient XML file.\n"
@@ -326,49 +246,241 @@ void STag_surfxml_platform(void)
       "This program is installed automatically with SimGrid, or "
       "available in the tools/ directory of the source archive.");
 
-  surfxml_call_cb_functions(STag_surfxml_platform_cb_list);
+  sg_platf_begin();
+}
+void ETag_surfxml_platform(void){
+  sg_platf_end();
+}
 
+void STag_surfxml_host(void){
+  xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
+}
+
+void ETag_surfxml_host(void)    {
+  s_sg_platf_host_cbarg_t host;
+  memset(&host,0,sizeof(host));
+
+  host.properties = current_property_set;
+
+  host.id = A_surfxml_host_id;
+  host.power_peak = get_cpu_power(A_surfxml_host_power);
+  host.power_scale = surf_parse_get_double( A_surfxml_host_availability);
+  host.core_amount = surf_parse_get_int(A_surfxml_host_core);
+  host.power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
+  host.state_trace = tmgr_trace_new(A_surfxml_host_state_file);
+  xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) ||
+        (A_surfxml_host_state == A_surfxml_host_state_OFF), "Invalid state");
+  if (A_surfxml_host_state == A_surfxml_host_state_ON)
+    host.initial_state = SURF_RESOURCE_ON;
+  if (A_surfxml_host_state == A_surfxml_host_state_OFF)
+    host.initial_state = SURF_RESOURCE_OFF;
+  host.coord = A_surfxml_host_coordinates;
+
+  sg_platf_new_host(&host);
+  current_property_set = NULL;
+}
+
+void STag_surfxml_router(void){
+  s_sg_platf_router_cbarg_t router;
+  memset(&router, 0, sizeof(router));
+
+       router.id = A_surfxml_router_id;
+       router.coord = A_surfxml_router_coordinates;
+
+       sg_platf_new_router(&router);
+}
+
+void STag_surfxml_cluster(void){
+  s_sg_platf_cluster_cbarg_t cluster;
+  memset(&cluster,0,sizeof(cluster));
+       cluster.id = A_surfxml_cluster_id;
+       cluster.prefix = A_surfxml_cluster_prefix;
+       cluster.suffix = A_surfxml_cluster_suffix;
+       cluster.radical = A_surfxml_cluster_radical;
+       cluster.power= surf_parse_get_double(A_surfxml_cluster_power);
+       cluster.core_amount = surf_parse_get_int(A_surfxml_cluster_core);
+       cluster.bw =   surf_parse_get_double(A_surfxml_cluster_bw);
+       cluster.lat =  surf_parse_get_double(A_surfxml_cluster_lat);
+       if(strcmp(A_surfxml_cluster_bb_bw,""))
+         cluster.bb_bw = surf_parse_get_double(A_surfxml_cluster_bb_bw);
+       if(strcmp(A_surfxml_cluster_bb_lat,""))
+         cluster.bb_lat = surf_parse_get_double(A_surfxml_cluster_bb_lat);
+       cluster.router_id = A_surfxml_cluster_router_id;
+
+  switch (AX_surfxml_cluster_sharing_policy) {
+  case A_surfxml_cluster_sharing_policy_SHARED:
+    cluster.sharing_policy = SURF_LINK_SHARED;
+    break;
+  case A_surfxml_cluster_sharing_policy_FULLDUPLEX:
+    cluster.sharing_policy = SURF_LINK_FULLDUPLEX;
+    break;
+  case A_surfxml_cluster_sharing_policy_FATPIPE:
+    cluster.sharing_policy = SURF_LINK_FATPIPE;
+    break;
+  default:
+    surf_parse_error(bprintf
+                     ("Invalid cluster sharing policy for cluster %s",
+                      cluster.id));
+    break;
+  }
+  switch (AX_surfxml_cluster_bb_sharing_policy) {
+  case A_surfxml_cluster_bb_sharing_policy_FATPIPE:
+    cluster.bb_sharing_policy = SURF_LINK_FATPIPE;
+    break;
+  case A_surfxml_cluster_bb_sharing_policy_SHARED:
+    cluster.bb_sharing_policy = SURF_LINK_SHARED;
+    break;
+  default:
+    surf_parse_error(bprintf
+                     ("Invalid bb sharing policy in cluster %s",
+                      cluster.id));
+    break;
+  }
+
+       cluster.availability_trace = A_surfxml_cluster_availability_file;
+       cluster.state_trace = A_surfxml_cluster_state_file;
+       sg_platf_new_cluster(&cluster);
+}
+void ETag_surfxml_cluster(void){
+  /* nothing I can think of */
+}
+
+void STag_surfxml_peer(void){
+  s_sg_platf_peer_cbarg_t peer;
+  memset(&peer,0,sizeof(peer));
+       peer.id = A_surfxml_peer_id;
+       peer.power = surf_parse_get_double(A_surfxml_peer_power);
+       peer.bw_in = surf_parse_get_double(A_surfxml_peer_bw_in);
+       peer.bw_out = surf_parse_get_double(A_surfxml_peer_bw_out);
+       peer.lat = surf_parse_get_double(A_surfxml_peer_lat);
+       peer.coord = A_surfxml_peer_coordinates;
+       peer.availability_trace = tmgr_trace_new(A_surfxml_peer_availability_file);
+       peer.state_trace = tmgr_trace_new(A_surfxml_peer_state_file);
+
+       surfxml_call_cb_functions(STag_surfxml_peer_cb_list);
+       sg_platf_new_peer(&peer);
+}
+void ETag_surfxml_peer(void){
+  /* nothing to do here */
+}
+void STag_surfxml_link(void){
+  xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
+}
+void ETag_surfxml_link(void){
+  s_sg_platf_link_cbarg_t link;
+  memset(&link,0,sizeof(link));
+
+  link.properties = current_property_set;
+
+  link.id = A_surfxml_link_id;
+  link.bandwidth = surf_parse_get_double(A_surfxml_link_bandwidth);
+  link.bandwidth_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
+  link.latency = surf_parse_get_double(A_surfxml_link_latency);
+  link.latency_trace = tmgr_trace_new(A_surfxml_link_latency_file);
+
+  switch (A_surfxml_link_state) {
+  case A_surfxml_link_state_ON:
+    link.state = SURF_RESOURCE_ON;
+    break;
+  case A_surfxml_link_state_OFF:
+    link.state = SURF_RESOURCE_OFF;
+    break;
+  default:
+    surf_parse_error(bprintf("invalid state for link %s",link.id));
+    break;
+  }
+  link.state_trace = tmgr_trace_new(A_surfxml_link_state_file);
+
+  switch (A_surfxml_link_sharing_policy) {
+  case A_surfxml_link_sharing_policy_SHARED:
+    link.policy = SURF_LINK_SHARED;
+    break;
+  case A_surfxml_link_sharing_policy_FATPIPE:
+     link.policy = SURF_LINK_FATPIPE;
+     break;
+  case A_surfxml_link_sharing_policy_FULLDUPLEX:
+     link.policy = SURF_LINK_FULLDUPLEX;
+     break;
+  default:
+    surf_parse_error(bprintf("Invalid sharing policy in link %s",link.id));
+    break;
+  }
+
+  sg_platf_new_link(&link);
+
+  current_property_set = NULL;
+}
+
+void STag_surfxml_route(void){
+       surfxml_call_cb_functions(STag_surfxml_route_cb_list);
+}
+void STag_surfxml_link_ctn(void){
+       surfxml_call_cb_functions(STag_surfxml_link_ctn_cb_list);
+}
+void STag_surfxml_process(void){
+       surfxml_call_cb_functions(STag_surfxml_process_cb_list);
+}
+void STag_surfxml_argument(void){
+       surfxml_call_cb_functions(STag_surfxml_argument_cb_list);
+}
+void STag_surfxml_prop(void){
+       surfxml_call_cb_functions(STag_surfxml_prop_cb_list);
+}
+void STag_surfxml_trace(void){
+       surfxml_call_cb_functions(STag_surfxml_trace_cb_list);
+}
+void STag_surfxml_trace_connect(void){
+       surfxml_call_cb_functions(STag_surfxml_trace_connect_cb_list);
+}
+void STag_surfxml_AS(void){
+  sg_platf_new_AS_begin(A_surfxml_AS_id,A_surfxml_AS_routing);
+}
+void ETag_surfxml_AS(void){
+  sg_platf_new_AS_end();
+}
+void STag_surfxml_ASroute(void){
+       surfxml_call_cb_functions(STag_surfxml_ASroute_cb_list);
+}
+void STag_surfxml_bypassRoute(void){
+       surfxml_call_cb_functions(STag_surfxml_bypassRoute_cb_list);
+}
+void STag_surfxml_config(void){
+  XBT_DEBUG("START configuration name = %s",A_surfxml_config_id);
+  xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)");
+}
+void ETag_surfxml_config(void){
+  xbt_dict_cursor_t cursor = NULL;
+  char *key;
+  char *elem;
+  char *cfg;
+  xbt_dict_foreach(current_property_set, cursor, key, elem) {
+    cfg = bprintf("%s:%s",key,elem);
+    if(xbt_cfg_is_default_value(_surf_cfg_set, key))
+      xbt_cfg_set_parse(_surf_cfg_set, cfg);
+    else
+      XBT_INFO("The custom configuration '%s' is already defined by user!",key);
+    free(cfg);
+  }
+  XBT_DEBUG("End configuration name = %s",A_surfxml_config_id);
+  xbt_dict_free(&current_property_set);
+}
+void STag_surfxml_random(void){
+       surfxml_call_cb_functions(STag_surfxml_random_cb_list);
 }
 
 #define parse_method(type,name) \
 void type##Tag_surfxml_##name(void) \
 { surfxml_call_cb_functions(type##Tag_surfxml_##name##_cb_list); }
-
-parse_method(E, platform);
-parse_method(S, host);
-parse_method(E, host);
-parse_method(S, router);
-parse_method(E, router);
-parse_method(S, link);
-parse_method(E, link);
-parse_method(S, route);
 parse_method(E, route);
-parse_method(S, link_ctn);
 parse_method(E, link_ctn);
-parse_method(S, process);
 parse_method(E, process);
-parse_method(S, argument);
 parse_method(E, argument);
-parse_method(S, prop);
 parse_method(E, prop);
-parse_method(S, trace);
 parse_method(E, trace);
-parse_method(S, trace_connect);
 parse_method(E, trace_connect);
-parse_method(S, random);
 parse_method(E, random);
-parse_method(S, AS);
-parse_method(E, AS);
-parse_method(S, ASroute);
 parse_method(E, ASroute);
-parse_method(S, bypassRoute);
 parse_method(E, bypassRoute);
-parse_method(S, cluster);
-parse_method(E, cluster);
-parse_method(S, peer);
-parse_method(E, peer);
-parse_method(S, config);
-parse_method(E, config);
 
 /* Open and Close parse file */
 
@@ -378,16 +490,17 @@ void surf_parse_open(const char *file)
   if (!file) {
     if (!warned) {
       XBT_WARN
-          ("Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.");
+          ("Bypassing the XML parser since surf_parse_open received a NULL pointer. "
+              "If it is not what you want, go fix your code.");
       warned = 1;
     }
     return;
   }
 
   if (!surf_input_buffer_stack)
-       surf_input_buffer_stack = xbt_dynar_new(sizeof(YY_BUFFER_STATE), NULL);
+    surf_input_buffer_stack = xbt_dynar_new(sizeof(YY_BUFFER_STATE), NULL);
   if (!surf_file_to_parse_stack)
-       surf_file_to_parse_stack = xbt_dynar_new(sizeof(FILE *), NULL);
+    surf_file_to_parse_stack = xbt_dynar_new(sizeof(FILE *), NULL);
 
   surf_file_to_parse = surf_fopen(file, "r");
   xbt_assert((surf_file_to_parse), "Unable to open \"%s\"\n", file);
@@ -398,10 +511,8 @@ void surf_parse_open(const char *file)
 
 void surf_parse_close(void)
 {
-  if (surf_input_buffer_stack)
-       xbt_dynar_free(&surf_input_buffer_stack);
-  if (surf_file_to_parse_stack)
-       xbt_dynar_free(&surf_file_to_parse_stack);
+  xbt_dynar_free(&surf_input_buffer_stack);
+  xbt_dynar_free(&surf_file_to_parse_stack);
 
   if (surf_file_to_parse) {
     surf_parse__delete_buffer(surf_input_buffer);
@@ -410,36 +521,13 @@ void surf_parse_close(void)
   }
 }
 
-/* Parse Function */
+/* Call the lexer to parse the currently opened file. This pointer to function enables bypassing of the parser */
 
-static int _surf_parse(void)
-{
+static int _surf_parse(void) {
   return surf_parse_lex();
 }
-
 int_f_void_t surf_parse = _surf_parse;
 
-void surf_parse_error(char *msg)
-{
-  fprintf(stderr, "Parse error on line %d: %s\n", surf_parse_lineno, msg);
-  abort();
-}
-
-void surf_parse_get_double(double *value, const char *string)
-{
-  int ret = 0;
-  ret = sscanf(string, "%lg", value);
-  if (ret != 1)
-    surf_parse_error(bprintf("%s is not a double", string));
-}
-
-void surf_parse_get_int(int *value, const char *string)
-{
-  int ret = 0;
-  ret = sscanf(string, "%d", value);
-  if (ret != 1)
-    surf_parse_error(bprintf("%s is not an integer", string));
-}
 
 /* Aux parse functions */
 
@@ -473,167 +561,24 @@ static XBT_INLINE void surfxml_call_cb_functions(xbt_dynar_t cb_list)
   unsigned int iterator;
   void_f_void_t fun;
   xbt_dynar_foreach(cb_list, iterator, fun) {
-    if (fun) (*fun) ();
+    if (fun) fun();
   }
 }
 
-/* Init and free parse data */
-
-static void init_data(void)
-{
-  if (!surfxml_bufferstack_stack)
-    surfxml_bufferstack_stack = xbt_dynar_new(sizeof(char *), NULL);
-
-  traces_set_list = xbt_dict_new();
-  trace_connect_list_host_avail = xbt_dict_new();
-  trace_connect_list_power = xbt_dict_new();
-  trace_connect_list_link_avail = xbt_dict_new();
-  trace_connect_list_bandwidth = xbt_dict_new();
-  trace_connect_list_latency = xbt_dict_new();
-
-  surfxml_add_callback(STag_surfxml_trace_cb_list, &parse_Stag_trace);
-  surfxml_add_callback(ETag_surfxml_trace_cb_list, &parse_Etag_trace);
-  surfxml_add_callback(STag_surfxml_trace_connect_cb_list,
-                                          &parse_Stag_trace_connect);
-}
-
-static void free_data(void)
-{
-  xbt_dict_free(&trace_connect_list_host_avail);
-  xbt_dict_free(&trace_connect_list_power);
-  xbt_dict_free(&trace_connect_list_link_avail);
-  xbt_dict_free(&trace_connect_list_bandwidth);
-  xbt_dict_free(&trace_connect_list_latency);
-  xbt_dict_free(&traces_set_list);
-  xbt_dict_free(&random_data_list);
-  xbt_dynar_free(&surfxml_bufferstack_stack);
-}
-
-/* Here start parse */
-void parse_platform_file(const char *file)
-{
-  int parse_status;
-
-  surfxml_buffer_stack_stack_ptr = 1;
-  surfxml_buffer_stack_stack[0] = 0;
-
-  surf_parse_open(file);
-  init_data();
-  parse_status = surf_parse();
-  free_data();
-  surf_parse_close();
-  xbt_assert(!parse_status, "Parse error in %s", file);
-}
 
 /* Prop tag functions */
 
-void parse_properties(const char* prop_id, const char* prop_value)
-{
-    char *value = NULL;
-       if (!current_property_set)
-           current_property_set = xbt_dict_new();      // Maybe, it should be make a error
-       if(!strcmp(prop_id,"coordinates")){
-               if(!strcmp(prop_value,"yes") && !COORD_HOST_LEVEL)
-                 {
-                           XBT_INFO("Configuration change: Set '%s' to '%s'", prop_id, prop_value);
-                               COORD_HOST_LEVEL = xbt_lib_add_level(host_lib,xbt_dynar_free_voidp);
-                               COORD_ASR_LEVEL  = xbt_lib_add_level(as_router_lib,xbt_dynar_free_voidp);
-                 }
-               if(strcmp(A_surfxml_prop_value,"yes"))
-                         xbt_die("Setting XML prop coordinates must be \"yes\"");
-         }
-       else{
-                 value = xbt_strdup(prop_value);
-                 xbt_dict_set(current_property_set, prop_id, value, free);
-        }
-}
-
 /**
  * With XML parser
  */
-void parse_properties_XML(void)
-{
-  parse_properties(A_surfxml_prop_id, A_surfxml_prop_value);
-}
-
-/*
- * With lua console
- */
-void parse_properties_lua(const char* prop_id, const char* prop_value)
+void parse_properties(void)
 {
-        parse_properties(prop_id, prop_value);
-}
-
-/* Trace management functions */
-
-static double trace_periodicity = -1.0;
-static char *trace_file = NULL;
-static char *trace_id = NULL;
+  if (!current_property_set)
+    current_property_set = xbt_dict_new_homogeneous(xbt_free_f); // Maybe, it should raise an error
 
-static void parse_Stag_trace(void)
-{
-  trace_id = xbt_strdup(A_surfxml_trace_id);
-  trace_file = xbt_strdup(A_surfxml_trace_file);
-  surf_parse_get_double(&trace_periodicity, A_surfxml_trace_periodicity);
+  xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), NULL);
 }
 
-static void parse_Etag_trace(void)
-{
-  tmgr_trace_t trace;
-  if (!trace_file || strcmp(trace_file, "") != 0) {
-    trace = tmgr_trace_new(trace_file);
-  } else {
-    if (strcmp(surfxml_pcdata, "") == 0)
-      trace = NULL;
-    else
-      trace =
-          tmgr_trace_new_from_string(trace_id, surfxml_pcdata,
-                                     trace_periodicity);
-  }
-  xbt_dict_set(traces_set_list, trace_id, (void *) trace, NULL);
-  xbt_free(trace_file);
-  trace_file = NULL;
-  xbt_free(trace_id);
-  trace_id = NULL;
-}
-
-static void parse_Stag_trace_connect(void)
-{
-  xbt_assert(xbt_dict_get_or_null
-              (traces_set_list, A_surfxml_trace_connect_trace),
-              "Cannot connect trace %s to %s: trace unknown",
-              A_surfxml_trace_connect_trace,
-              A_surfxml_trace_connect_element);
-
-  switch (A_surfxml_trace_connect_kind) {
-  case A_surfxml_trace_connect_kind_HOST_AVAIL:
-    xbt_dict_set(trace_connect_list_host_avail,
-                 A_surfxml_trace_connect_trace,
-                 xbt_strdup(A_surfxml_trace_connect_element), free);
-    break;
-  case A_surfxml_trace_connect_kind_POWER:
-    xbt_dict_set(trace_connect_list_power, A_surfxml_trace_connect_trace,
-                 xbt_strdup(A_surfxml_trace_connect_element), free);
-    break;
-  case A_surfxml_trace_connect_kind_LINK_AVAIL:
-    xbt_dict_set(trace_connect_list_link_avail,
-                 A_surfxml_trace_connect_trace,
-                 xbt_strdup(A_surfxml_trace_connect_element), free);
-    break;
-  case A_surfxml_trace_connect_kind_BANDWIDTH:
-    xbt_dict_set(trace_connect_list_bandwidth,
-                 A_surfxml_trace_connect_trace,
-                 xbt_strdup(A_surfxml_trace_connect_element), free);
-    break;
-  case A_surfxml_trace_connect_kind_LATENCY:
-    xbt_dict_set(trace_connect_list_latency, A_surfxml_trace_connect_trace,
-                 xbt_strdup(A_surfxml_trace_connect_element), free);
-    break;
-  default:
-    xbt_die("Cannot connect trace %s to %s: kind of trace unknown",
-            A_surfxml_trace_connect_trace, A_surfxml_trace_connect_element);
-  }
-}
 
 /* Random tag functions */
 
@@ -655,7 +600,7 @@ double get_cpu_power(const char *power)
       power_scale = random_generate(random);
     }
   } else {
-    surf_parse_get_double(&power_scale, power);
+    power_scale = surf_parse_get_double(power);
   }
   return power_scale;
 }
@@ -667,11 +612,10 @@ char *random_id;
 static void init_randomness(void)
 {
   random_id = A_surfxml_random_id;
-  surf_parse_get_double(&random_min, A_surfxml_random_min);
-  surf_parse_get_double(&random_max, A_surfxml_random_max);
-  surf_parse_get_double(&random_mean, A_surfxml_random_mean);
-  surf_parse_get_double(&random_std_deviation,
-                        A_surfxml_random_std_deviation);
+  random_min = surf_parse_get_double(A_surfxml_random_min);
+  random_max = surf_parse_get_double(A_surfxml_random_max);
+  random_mean = surf_parse_get_double(A_surfxml_random_mean);
+  random_std_deviation = surf_parse_get_double(A_surfxml_random_std_deviation);
   random_generator = A_surfxml_random_generator;
 }
 
@@ -685,145 +629,3 @@ static void add_randomness(void)
                &xbt_free_ref);
 }
 
-/**
- * create CPU resource via CPU Model
- */
-void surf_host_create_resource(char *name, double power_peak,
-                               double power_scale,
-                               tmgr_trace_t power_trace, int core,
-                               e_surf_resource_state_t state_initial,
-                               tmgr_trace_t state_trace,
-                               xbt_dict_t cpu_properties)
-{
-  return surf_cpu_model->extension.cpu.create_resource(name, power_peak,
-                                                       power_scale,
-                                                       power_trace,
-                                                       core,
-                                                       state_initial,
-                                                       state_trace,
-                                                       cpu_properties);
-}
-
-/**
- * create CPU resource via worsktation_ptask_L07 model
- */
-
-void surf_wsL07_host_create_resource(char *name, double power_peak,
-                                     double power_scale,
-                                     tmgr_trace_t power_trace,
-                                     e_surf_resource_state_t state_initial,
-                                     tmgr_trace_t state_trace,
-                                     xbt_dict_t cpu_properties)
-{
-  surf_workstation_model->extension.workstation.cpu_create_resource(name,
-                                                                    power_peak,
-                                                                    power_scale,
-                                                                    power_trace,
-                                                                    state_initial,
-                                                                    state_trace,
-                                                                    cpu_properties);
-}
-
-/**
- * create link resource via network Model
- */
-void surf_link_create_resource(char *name,
-                               double bw_initial,
-                               tmgr_trace_t bw_trace,
-                               double lat_initial,
-                               tmgr_trace_t lat_trace,
-                               e_surf_resource_state_t
-                               state_initial,
-                               tmgr_trace_t state_trace,
-                               e_surf_link_sharing_policy_t policy,
-                               xbt_dict_t properties)
-{
-  return surf_network_model->extension.network.create_resource(name,
-                                                               bw_initial,
-                                                               bw_trace,
-                                                               lat_initial,
-                                                               lat_trace,
-                                                               state_initial,
-                                                               state_trace,
-                                                               policy,
-                                                               properties);
-}
-
-/**
- * create link resource via workstation_ptask_L07 model
- */
-
-void surf_wsL07_link_create_resource(char *name,
-                                     double bw_initial,
-                                     tmgr_trace_t bw_trace,
-                                     double lat_initial,
-                                     tmgr_trace_t lat_trace,
-                                     e_surf_resource_state_t
-                                     state_initial,
-                                     tmgr_trace_t state_trace,
-                                     e_surf_link_sharing_policy_t
-                                     policy, xbt_dict_t properties)
-{
-  return surf_workstation_model->extension.workstation.
-      link_create_resource(name, bw_initial, bw_trace, lat_initial,
-                           lat_trace, state_initial, state_trace, policy,
-                           properties);
-}
-
-/**
- *
- *init new routing model component
- */
-
-void surf_AS_new(const char *AS_id, const char *AS_mode)
-{
-  routing_AS_init(AS_id, AS_mode);
-}
-
-void surf_AS_finalize(const char *AS_id)
-{
-  routing_AS_end(AS_id);
-}
-
-/*
- * add host to the network element list
- */
-void surf_route_add_host(const char *host_id)
-{
-  routing_add_host(host_id);
-}
-
-/**
- * set route
- */
-void surf_routing_add_route(const char *src_id, const char *dst_id,
-                            xbt_dynar_t links_id)
-{
-  unsigned int i;
-  const char *link_id;
-  routing_set_route(src_id, dst_id);
-  xbt_dynar_foreach(links_id, i, link_id) {
-    routing_add_link(link_id);
-  }
-
-  //store the route
-  routing_store_route();
-}
-
-/**
- * Add Traces
- */
-void surf_add_host_traces(void)
-{
-  return surf_cpu_model->extension.cpu.add_traces();
-}
-
-void surf_add_link_traces(void)
-{
-  return surf_network_model->extension.network.add_traces();
-}
-
-void surf_wsL07_add_traces(void)
-{
-  return surf_workstation_model->extension.workstation.add_traces();
-}
diff --git a/src/surf/surfxml_parseplatf.c b/src/surf/surfxml_parseplatf.c
new file mode 100644 (file)
index 0000000..57a766a
--- /dev/null
@@ -0,0 +1,188 @@
+/* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011. 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 "xbt/misc.h"
+#include "xbt/log.h"
+#include "xbt/str.h"
+#include "xbt/dict.h"
+#include "simgrid/platf.h"
+#include "surf/surfxml_parse.h"
+#include "surf/surf_private.h"
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
+
+/*
+ *  Allow the cluster tag to mess with the parsing buffer.
+ * (this will probably become obsolete once the cluster tag do not mess with the parsing callbacks directly)
+ */
+
+/* This buffer is used to store the original buffer before substituting it by out own buffer. Useful for the cluster tag */
+static xbt_dynar_t surfxml_bufferstack_stack = NULL;
+int surfxml_bufferstack_size = 2048;
+
+static char *old_buff = NULL;
+
+unsigned int surfxml_buffer_stack_stack_ptr;
+unsigned int surfxml_buffer_stack_stack[1024];
+
+
+void surfxml_bufferstack_push(int new)
+{
+  if (!new)
+    old_buff = surfxml_bufferstack;
+  else {
+    xbt_dynar_push(surfxml_bufferstack_stack, &surfxml_bufferstack);
+    surfxml_bufferstack = xbt_new0(char, surfxml_bufferstack_size);
+  }
+}
+
+void surfxml_bufferstack_pop(int new)
+{
+  if (!new)
+    surfxml_bufferstack = old_buff;
+  else {
+    free(surfxml_bufferstack);
+    xbt_dynar_pop(surfxml_bufferstack_stack, &surfxml_bufferstack);
+  }
+}
+
+/*
+ * Trace related stuff
+ */
+
+xbt_dict_t traces_set_list = NULL;
+xbt_dict_t trace_connect_list_host_avail = NULL;
+xbt_dict_t trace_connect_list_power = NULL;
+xbt_dict_t trace_connect_list_link_avail = NULL;
+xbt_dict_t trace_connect_list_bandwidth = NULL;
+xbt_dict_t trace_connect_list_latency = NULL;
+
+static double trace_periodicity = -1.0;
+static char *trace_file = NULL;
+static char *trace_id = NULL;
+
+static void parse_Stag_trace(void)
+{
+  trace_id = xbt_strdup(A_surfxml_trace_id);
+  trace_file = xbt_strdup(A_surfxml_trace_file);
+  trace_periodicity = surf_parse_get_double(A_surfxml_trace_periodicity);
+}
+
+static void parse_Etag_trace(void)
+{
+  tmgr_trace_t trace;
+  if (!trace_file || strcmp(trace_file, "") != 0) {
+    trace = tmgr_trace_new(trace_file);
+  } else if (strcmp(surfxml_pcdata, "") == 0) {
+      trace = NULL;
+  } else {
+      trace =
+          tmgr_trace_new_from_string(trace_id, surfxml_pcdata,
+                                     trace_periodicity);
+  }
+  xbt_dict_set(traces_set_list, trace_id, (void *) trace, NULL);
+  xbt_free(trace_file);
+  trace_file = NULL;
+  xbt_free(trace_id);
+  trace_id = NULL;
+}
+
+static void parse_Stag_trace_connect(void)
+{
+  xbt_assert(xbt_dict_get_or_null
+              (traces_set_list, A_surfxml_trace_connect_trace),
+              "Cannot connect trace %s to %s: trace unknown",
+              A_surfxml_trace_connect_trace,
+              A_surfxml_trace_connect_element);
+
+  switch (A_surfxml_trace_connect_kind) {
+  case A_surfxml_trace_connect_kind_HOST_AVAIL:
+    xbt_dict_set(trace_connect_list_host_avail,
+                 A_surfxml_trace_connect_trace,
+                 xbt_strdup(A_surfxml_trace_connect_element), NULL);
+    break;
+  case A_surfxml_trace_connect_kind_POWER:
+    xbt_dict_set(trace_connect_list_power, A_surfxml_trace_connect_trace,
+                 xbt_strdup(A_surfxml_trace_connect_element), NULL);
+    break;
+  case A_surfxml_trace_connect_kind_LINK_AVAIL:
+    xbt_dict_set(trace_connect_list_link_avail,
+                 A_surfxml_trace_connect_trace,
+                 xbt_strdup(A_surfxml_trace_connect_element), NULL);
+    break;
+  case A_surfxml_trace_connect_kind_BANDWIDTH:
+    xbt_dict_set(trace_connect_list_bandwidth,
+                 A_surfxml_trace_connect_trace,
+                 xbt_strdup(A_surfxml_trace_connect_element), NULL);
+    break;
+  case A_surfxml_trace_connect_kind_LATENCY:
+    xbt_dict_set(trace_connect_list_latency, A_surfxml_trace_connect_trace,
+                 xbt_strdup(A_surfxml_trace_connect_element), NULL);
+    break;
+  default:
+    xbt_die("Cannot connect trace %s to %s: kind of trace unknown",
+            A_surfxml_trace_connect_trace, A_surfxml_trace_connect_element);
+    break;
+  }
+}
+
+/* This function acts as a main in the parsing area. */
+void parse_platform_file(const char *file)
+{
+  int parse_status;
+
+  surf_parse_reset_callbacks();
+
+  /* Register classical callbacks */
+  surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
+  routing_register_callbacks();
+
+  /* init the flex parser */
+  surfxml_buffer_stack_stack_ptr = 1;
+  surfxml_buffer_stack_stack[0] = 0;
+
+  surf_parse_open(file);
+
+  /* Init my data */
+  if (!surfxml_bufferstack_stack)
+    surfxml_bufferstack_stack = xbt_dynar_new(sizeof(char *), NULL);
+
+  traces_set_list = xbt_dict_new_homogeneous(NULL);
+  trace_connect_list_host_avail = xbt_dict_new_homogeneous(free);
+  trace_connect_list_power = xbt_dict_new_homogeneous(free);
+  trace_connect_list_link_avail = xbt_dict_new_homogeneous(free);
+  trace_connect_list_bandwidth = xbt_dict_new_homogeneous(free);
+  trace_connect_list_latency = xbt_dict_new_homogeneous(free);
+
+  surfxml_add_callback(STag_surfxml_trace_cb_list, &parse_Stag_trace);
+  surfxml_add_callback(ETag_surfxml_trace_cb_list, &parse_Etag_trace);
+  surfxml_add_callback(STag_surfxml_trace_connect_cb_list,
+             &parse_Stag_trace_connect);
+
+  /* we care about the ASes while parsing the platf. Incredible, isnt it? */
+  sg_platf_AS_end_add_cb(routing_AS_end);
+  sg_platf_AS_begin_add_cb(routing_AS_begin);
+
+
+  /* Do the actual parsing */
+  parse_status = surf_parse();
+
+  /* Free my data */
+  xbt_dict_free(&trace_connect_list_host_avail);
+  xbt_dict_free(&trace_connect_list_power);
+  xbt_dict_free(&trace_connect_list_link_avail);
+  xbt_dict_free(&trace_connect_list_bandwidth);
+  xbt_dict_free(&trace_connect_list_latency);
+  xbt_dict_free(&traces_set_list);
+  xbt_dict_free(&random_data_list);
+  xbt_dynar_free(&surfxml_bufferstack_stack);
+
+  /* Stop the flex parser */
+  surf_parse_close();
+  if (parse_status)
+    xbt_die("Parse error in %s", file);
+}
+
index ea18e1a..c49bd7c 100644 (file)
@@ -88,10 +88,9 @@ tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
     last_event->delta = periodicity;
 
   if (!trace_list)
-    trace_list = xbt_dict_new();
+    trace_list = xbt_dict_new_homogeneous((void (*)(void *)) tmgr_trace_free);
 
-  xbt_dict_set(trace_list, id, (void *) trace,
-               (void (*)(void *)) tmgr_trace_free);
+  xbt_dict_set(trace_list, id, (void *) trace, NULL);
 
   xbt_dynar_free(&list);
   return trace;
index 9aa3304..424c1b3 100644 (file)
@@ -8,6 +8,9 @@
 #include "xbt/dict.h"
 #include "portable.h"
 #include "surf_private.h"
+#include "surf/surf_resource.h"
+
+
 
 typedef struct workstation_CLM03 {
   s_surf_resource_t generic_resource;   /* Must remain first to add this to a trace */
@@ -47,6 +50,7 @@ void create_workstations(void)
 static int ws_resource_used(void *resource_id)
 {
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
+  return -1;
 }
 
 static void ws_parallel_action_cancel(surf_action_t action)
@@ -57,6 +61,7 @@ static void ws_parallel_action_cancel(surf_action_t action)
 static int ws_parallel_action_free(surf_action_t action)
 {
   THROW_UNIMPLEMENTED;          /* This model does not implement parallel tasks */
+  return -1;
 }
 
 static int ws_action_unref(surf_action_t action)
@@ -155,6 +160,7 @@ static int ws_action_is_suspended(surf_action_t action)
   if (action->model_type == surf_cpu_model)
     return surf_cpu_model->is_suspended(action);
   DIE_IMPOSSIBLE;
+  return -1;
 }
 
 static void ws_action_set_max_duration(surf_action_t action,
@@ -207,6 +213,7 @@ static double ws_action_get_remains(surf_action_t action)
   if (action->model_type == surf_cpu_model)
     return surf_cpu_model->get_remains(action);
   DIE_IMPOSSIBLE;
+  return -1.0;
 }
 
 static surf_action_t ws_communicate(void *workstation_src,
@@ -246,6 +253,7 @@ static surf_action_t ws_execute_parallel_task(int workstation_nb,
                                               double amount, double rate)
 {
   THROW_UNIMPLEMENTED;          /* This model does not implement parallel tasks */
+  return NULL;
 }
 
 
@@ -253,7 +261,7 @@ static surf_action_t ws_execute_parallel_task(int workstation_nb,
 static xbt_dynar_t ws_get_route(void *src, void *dst)
 {
   return surf_network_model->extension.
-      network.get_route(surf_resource_name(src), surf_resource_name(src));
+      network.get_route(surf_resource_name(src), surf_resource_name(dst));
 }
 
 static double ws_get_link_bandwidth(const void *link)
@@ -336,36 +344,23 @@ static void surf_workstation_model_init_internal(void)
 
 }
 
-/********************************************************************/
-/* The model used in MSG and presented at CCGrid03                  */
-/********************************************************************/
-/* @InProceedings{Casanova.CLM_03, */
-/*   author = {Henri Casanova and Arnaud Legrand and Loris Marchal}, */
-/*   title = {Scheduling Distributed Applications: the SimGrid Simulation Framework}, */
-/*   booktitle = {Proceedings of the third IEEE International Symposium on Cluster Computing and the Grid (CCGrid'03)}, */
-/*   publisher = {"IEEE Computer Society Press"}, */
-/*   month = {may}, */
-/*   year = {2003} */
-/* } */
-void surf_workstation_model_init_CLM03(const char *filename)
+void surf_workstation_model_init_current_default(void)
 {
   surf_workstation_model_init_internal();
-  surf_cpu_model_init_Cas01_im(filename);
-  surf_network_model_init_LegrandVelho(filename);
-  update_model_description(surf_workstation_model_description,
-                           "CLM03", surf_workstation_model);
+  //xbt_cfg_setdefault_int(_surf_cfg_set, "network/crosstraffic", 1);
+  surf_cpu_model_init_Cas01();
+  surf_network_model_init_LegrandVelho();
+
   xbt_dynar_push(model_list, &surf_workstation_model);
+  sg_platf_postparse_add_cb(create_workstations);
 }
 
-void surf_workstation_model_init_compound(const char *filename)
+void surf_workstation_model_init_compound()
 {
 
   xbt_assert(surf_cpu_model, "No CPU model defined yet!");
   xbt_assert(surf_network_model, "No network model defined yet!");
   surf_workstation_model_init_internal();
-
-  update_model_description(surf_workstation_model_description,
-                           "compound", surf_workstation_model);
-
   xbt_dynar_push(model_list, &surf_workstation_model);
+  sg_platf_postparse_add_cb(create_workstations);
 }
index 772221a..861e404 100644 (file)
@@ -8,6 +8,8 @@
 #include "xbt/str.h"
 #include "xbt/dict.h"
 #include "surf_private.h"
+#include "surf/surf_resource.h"
+//#include "surf/surf_resource_lmm.h"
 
 typedef enum {
   SURF_WORKSTATION_RESOURCE_CPU,
@@ -24,8 +26,8 @@ typedef struct cpu_L07 {
   double power_scale;
   double power_current;
   tmgr_trace_event_t power_event;
-  e_surf_resource_state_t state_current;
   tmgr_trace_event_t state_event;
+  e_surf_resource_state_t state_current;
   int id;                       /* cpu and network card are a single object... */
 } s_cpu_L07_t, *cpu_L07_t;
 
@@ -79,13 +81,13 @@ static void ptask_update_action_bound(surf_action_workstation_L07_t action)
 
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
-      xbt_dynar_t route =
-          global_routing->get_route(surf_resource_name
-                                    (action->workstation_list[i]),
-                                    surf_resource_name(action->
-                                                       workstation_list
-                                                       [j]));
+      xbt_dynar_t route=NULL;
+      routing_get_route_and_latency(surf_resource_name
+          (action->workstation_list[i]),
+          surf_resource_name(action->workstation_list[j]),
+          &route, NULL);
 
+      // FIXME do we really need to recompute the latency here?
       double lat = 0.0;
 
       if (action->communication_amount[i * workstation_nb + j] > 0) {
@@ -193,8 +195,8 @@ static void ptask_action_set_priority(surf_action_t action,
 static double ptask_action_get_remains(surf_action_t action)
 {
   XBT_IN("(%p)", action);
-  return action->remains;
   XBT_OUT();
+  return action->remains;
 }
 
 /**************************************/
@@ -402,14 +404,12 @@ static void ptask_update_resource_state(void *id,
 
 static void ptask_finalize(void)
 {
-  if (ptask_parallel_task_link_set != NULL)
-    xbt_dict_free(&ptask_parallel_task_link_set);
+  xbt_dict_free(&ptask_parallel_task_link_set);
 
   surf_model_exit(surf_workstation_model);
   surf_workstation_model = NULL;
   surf_model_exit(surf_network_model);
   surf_network_model = NULL;
-  global_routing->finalize();
 
   ptask_host_count = 0;
 
@@ -454,7 +454,7 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb,
   double latency = 0.0;
 
   if (ptask_parallel_task_link_set == NULL)
-    ptask_parallel_task_link_set = xbt_dict_new();
+    ptask_parallel_task_link_set = xbt_dict_new_homogeneous(NULL);
 
   xbt_dict_reset(ptask_parallel_task_link_set);
 
@@ -462,11 +462,11 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb,
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
       link_L07_t link;
-      xbt_dynar_t route =
-          global_routing->get_route(surf_resource_name
-                                    (workstation_list[i]),
-                                    surf_resource_name(workstation_list
-                                                       [j]));
+      xbt_dynar_t route=NULL;
+      routing_get_route_and_latency(
+          surf_resource_name(workstation_list[i]),
+          surf_resource_name(workstation_list[j]),
+          &route,NULL); // FIXME: do we want to recompute the latency?
       double lat = 0.0;
 
       if (communication_amount[i * workstation_nb + j] > 0)
@@ -516,11 +516,11 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb,
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
       link_L07_t link;
-      xbt_dynar_t route =
-          global_routing->get_route(surf_resource_name
-                                    (workstation_list[i]),
-                                    surf_resource_name(workstation_list
-                                                       [j]));
+      xbt_dynar_t route=NULL;
+      routing_get_route_and_latency(
+          surf_resource_name(workstation_list[i]),
+          surf_resource_name(workstation_list[j]),
+          &route,NULL);
 
       if (communication_amount[i * workstation_nb + j] == 0.0)
         continue;
@@ -589,10 +589,13 @@ static surf_action_t ptask_action_sleep(void *cpu, double duration)
   return (surf_action_t) action;
 }
 
-static xbt_dynar_t ptask_get_route(void *src, void *dst)
+static xbt_dynar_t ptask_get_route(void *src, void *dst) // FIXME: kill that callback kind?
 {
-  return global_routing->get_route(surf_resource_name(src),
-                                   surf_resource_name(dst));
+  xbt_dynar_t route=NULL;
+  routing_get_route_and_latency(
+      surf_resource_name(src), surf_resource_name(dst),
+      &route,NULL);
+  return route;
 }
 
 static double ptask_get_link_bandwidth(const void *link)
@@ -614,22 +617,22 @@ static int ptask_link_shared(const void *link)
 /*** Resource Creation & Destruction **/
 /**************************************/
 
-static cpu_L07_t ptask_cpu_new(const char *name, double power_scale,
+static void* ptask_cpu_create_resource(const char *name, double power_scale,
                                double power_initial,
                                tmgr_trace_t power_trace,
                                e_surf_resource_state_t state_initial,
                                tmgr_trace_t state_trace,
                                xbt_dict_t cpu_properties)
 {
-  cpu_L07_t cpu = xbt_new0(s_cpu_L07_t, 1);
+  cpu_L07_t cpu = NULL;
   xbt_assert(!surf_workstation_resource_by_name(name),
               "Host '%s' declared several times in the platform file.",
               name);
 
-  cpu->generic_resource.model = surf_workstation_model;
+  cpu = (cpu_L07_t) surf_resource_new(sizeof(s_cpu_L07_t),
+          surf_workstation_model, name,cpu_properties);
+
   cpu->type = SURF_WORKSTATION_RESOURCE_CPU;
-  cpu->generic_resource.name = xbt_strdup(name);
-  cpu->generic_resource.properties = cpu_properties;
   cpu->id = ptask_host_count++;
 
   cpu->power_scale = power_scale;
@@ -654,45 +657,19 @@ static cpu_L07_t ptask_cpu_new(const char *name, double power_scale,
   return cpu;
 }
 
-static void ptask_parse_cpu_init(void)
-{
-  double power_scale = 0.0;
-  double power_initial = 0.0;
-  tmgr_trace_t power_trace = NULL;
-  e_surf_resource_state_t state_initial = SURF_RESOURCE_OFF;
-  tmgr_trace_t state_trace = NULL;
-
-  power_scale = get_cpu_power(A_surfxml_host_power);
-  surf_parse_get_double(&power_initial, A_surfxml_host_availability);
-  power_trace = tmgr_trace_new(A_surfxml_host_availability_file);
-
-  xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) ||
-              (A_surfxml_host_state == A_surfxml_host_state_OFF),
-              "Invalid state");
-  if (A_surfxml_host_state == A_surfxml_host_state_ON)
-    state_initial = SURF_RESOURCE_ON;
-  if (A_surfxml_host_state == A_surfxml_host_state_OFF)
-    state_initial = SURF_RESOURCE_OFF;
-  state_trace = tmgr_trace_new(A_surfxml_host_state_file);
-
-  ptask_cpu_new(A_surfxml_host_id, power_scale, power_initial, power_trace,
-                state_initial, state_trace, current_property_set);
-  current_property_set=NULL;
-}
-
-static void ptask_cpu_create_resource(char *name, double power_peak,
-                                      double power_scale,
-                                      tmgr_trace_t power_trace,
-                                      e_surf_resource_state_t
-                                      state_initial,
-                                      tmgr_trace_t state_trace,
-                                      xbt_dict_t cpu_properties)
+static void ptask_parse_cpu_init(sg_platf_host_cbarg_t host)
 {
-  ptask_cpu_new(xbt_strdup(name), power_peak, power_scale, power_trace,
-                state_initial, state_trace, cpu_properties);
+  ptask_cpu_create_resource(
+                 host->id,
+                 host->power_peak,
+                 host->power_scale,
+                 host->power_trace,
+                 host->initial_state,
+                 host->state_trace,
+                 host->properties);
 }
 
-static link_L07_t ptask_link_new(char *name,
+static void* ptask_link_create_resource(const char *name,
                                  double bw_initial,
                                  tmgr_trace_t bw_trace,
                                  double lat_initial,
@@ -710,7 +687,7 @@ static link_L07_t ptask_link_new(char *name,
 
   nw_link->generic_resource.model = surf_workstation_model;
   nw_link->generic_resource.properties = properties;
-  nw_link->generic_resource.name = name;
+  nw_link->generic_resource.name = xbt_strdup(name);
   nw_link->type = SURF_WORKSTATION_RESOURCE_LINK;
   nw_link->bw_current = bw_initial;
   if (bw_trace)
@@ -736,83 +713,49 @@ static link_L07_t ptask_link_new(char *name,
   return nw_link;
 }
 
-static void ptask_parse_link_init(void)
-{
-  double bw_initial;
-  tmgr_trace_t bw_trace;
-  double lat_initial;
-  tmgr_trace_t lat_trace;
-  e_surf_resource_state_t state_initial_link = SURF_RESOURCE_ON;
-  e_surf_link_sharing_policy_t policy_initial_link = SURF_LINK_SHARED;
-  tmgr_trace_t state_trace;
-  char *name_link_up = NULL;
-  char *name_link_down = NULL;
-  char *name_link = NULL;
-
-  if(A_surfxml_link_sharing_policy ==
-     A_surfxml_link_sharing_policy_FULLDUPLEX) {
-    name_link_up = bprintf("%s_UP", A_surfxml_link_id);
-    name_link_down = bprintf("%s_DOWN", A_surfxml_link_id);
+static void ptask_parse_link_init(sg_platf_link_cbarg_t link)
+{
+  if (link->policy == SURF_LINK_FULLDUPLEX) {
+    char *link_id;
+    link_id = bprintf("%s_UP", link->id);
+    ptask_link_create_resource(link_id,
+                               link->bandwidth,
+                               link->bandwidth_trace,
+                               link->latency,
+                               link->latency_trace,
+                               link->state,
+                               link->state_trace,
+                               link->policy,
+                               link->properties);
+    xbt_free(link_id);
+    link_id = bprintf("%s_DOWN", link->id);
+    ptask_link_create_resource(link_id,
+                               link->bandwidth,
+                               link->bandwidth_trace,
+                               link->latency,
+                               link->latency_trace,
+                               link->state,
+                               link->state_trace,
+                               link->policy,
+                               NULL); /* FIXME: We need to deep copy the
+                                       * properties or we won't be able to free
+                                       * it */
+    xbt_free(link_id);
   } else {
-    name_link = xbt_strdup(A_surfxml_link_id);
-  }
-  surf_parse_get_double(&bw_initial, A_surfxml_link_bandwidth);
-  bw_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file);
-  surf_parse_get_double(&lat_initial, A_surfxml_link_latency);
-  lat_trace = tmgr_trace_new(A_surfxml_link_latency_file);
-
-  xbt_assert((A_surfxml_link_state == A_surfxml_link_state_ON)
-              || (A_surfxml_link_state ==
-                  A_surfxml_link_state_OFF), "Invalid state");
-  if (A_surfxml_link_state == A_surfxml_link_state_ON)
-    state_initial_link = SURF_RESOURCE_ON;
-  else if (A_surfxml_link_state == A_surfxml_link_state_OFF)
-    state_initial_link = SURF_RESOURCE_OFF;
-
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_SHARED)
-    policy_initial_link = SURF_LINK_SHARED;
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FATPIPE)
-       policy_initial_link = SURF_LINK_FATPIPE;
-  if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX)
-       policy_initial_link = SURF_LINK_FULLDUPLEX;
-
-  state_trace = tmgr_trace_new(A_surfxml_link_state_file);
-
-  if(policy_initial_link == SURF_LINK_FULLDUPLEX)
-  {
-         ptask_link_new(name_link_up, bw_initial, bw_trace, lat_initial, lat_trace,
-                        state_initial_link, state_trace, policy_initial_link,
-                        current_property_set);
-         ptask_link_new(name_link_down, bw_initial, bw_trace, lat_initial, lat_trace,
-                        state_initial_link, state_trace, policy_initial_link,
-                        current_property_set);
+    ptask_link_create_resource(link->id,
+                               link->bandwidth,
+                               link->bandwidth_trace,
+                               link->latency,
+                               link->latency_trace,
+                               link->state,
+                               link->state_trace,
+                               link->policy,
+                               link->properties);
   }
-  else
-  {
-         ptask_link_new(name_link, bw_initial, bw_trace, lat_initial, lat_trace,
-                                        state_initial_link, state_trace, policy_initial_link,
-                                        current_property_set);
-  }
-  current_property_set = NULL;
-}
 
-static void ptask_link_create_resource(char *name,
-                                       double bw_initial,
-                                       tmgr_trace_t bw_trace,
-                                       double lat_initial,
-                                       tmgr_trace_t lat_trace,
-                                       e_surf_resource_state_t
-                                       state_initial,
-                                       tmgr_trace_t state_trace,
-                                       e_surf_link_sharing_policy_t
-                                       policy, xbt_dict_t properties)
-{
-  ptask_link_new(name, bw_initial, bw_trace,
-                 lat_initial, lat_trace, state_initial, state_trace,
-                 policy, properties);
+  current_property_set = NULL;
 }
 
-
 static void ptask_add_traces(void)
 {
   xbt_dict_cursor_t cursor = NULL;
@@ -880,12 +823,11 @@ static void ptask_add_traces(void)
   }
 }
 
-static void ptask_define_callbacks(const char *file)
+static void ptask_define_callbacks()
 {
-  /* Adding callback functions */
-  surfxml_add_callback(ETag_surfxml_host_cb_list, &ptask_parse_cpu_init);
-  surfxml_add_callback(ETag_surfxml_link_cb_list, &ptask_parse_link_init);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &ptask_add_traces);
+  sg_platf_host_add_cb(ptask_parse_cpu_init);
+  sg_platf_link_add_cb(ptask_parse_link_init);
+  sg_platf_postparse_add_cb(ptask_add_traces);
 }
 
 /**************************************/
@@ -948,30 +890,27 @@ static void ptask_model_init_internal(void)
       ptask_add_traces;
 
   if (!ptask_maxmin_system)
-    ptask_maxmin_system = lmm_system_new();
+    ptask_maxmin_system = lmm_system_new(1);
 
   routing_model_create(sizeof(link_L07_t),
-                       ptask_link_new(xbt_strdup("__loopback__"),
-                                      498000000, NULL, 0.000015, NULL,
-                                      SURF_RESOURCE_ON, NULL,
-                                      SURF_LINK_FATPIPE, NULL),
-                       ptask_get_link_latency);
+                       ptask_link_create_resource("__loopback__",
+                                                  498000000, NULL,
+                                                  0.000015, NULL,
+                                                  SURF_RESOURCE_ON, NULL,
+                                                  SURF_LINK_FATPIPE, NULL));
 
 }
 
 /**************************************/
 /*************** Generic **************/
 /**************************************/
-void surf_workstation_model_init_ptask_L07(const char *filename)
+void surf_workstation_model_init_ptask_L07(void)
 {
   XBT_INFO("surf_workstation_model_init_ptask_L07");
   xbt_assert(!surf_cpu_model, "CPU model type already defined");
   xbt_assert(!surf_network_model, "network model type already defined");
   surf_network_model = surf_model_init();
-  ptask_define_callbacks(filename);
+  ptask_define_callbacks();
   ptask_model_init_internal();
-
-  update_model_description(surf_workstation_model_description,
-                           "ptask_L07", surf_workstation_model);
   xbt_dynar_push(model_list, &surf_workstation_model);
 }
index 6873353..f10eb04 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: ex_interface.h 3782 2007-07-14 09:11:06Z mquinson $ */
-
 /* backtrace_dummy -- stubs of this module for non-supported archs          */
 
 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
index e57e486..966070a 100644 (file)
@@ -28,6 +28,12 @@ void xbt_backtrace_postexit(void)
 void xbt_backtrace_current(xbt_ex_t * e)
 {
   e->used = backtrace((void **) e->bt, XBT_BACKTRACE_SIZE);
+  if (e->used == 0) {
+    fprintf(stderr, "The backtrace() function failed, which probably means that the memory is exhausted. Here is a crude dump of the exception that I was trying to build:");
+    fprintf(stderr, "%s:%s(%d) [%s:%d] %s", e->host,e->procname,e->pid, e->file,e->line,e->msg);
+    fprintf(stderr, "Bailing out now since there is nothing I can do without a decent amount of memory. Please go fix the memleaks\n");
+    exit(1);
+  }
 }
 
 
@@ -86,8 +92,7 @@ void xbt_ex_setup_backtrace(xbt_ex_t * e)
         char *data;
 
         xbt_dynar_foreach(path, cpt, data) {
-          if (binary_name)
-            free(binary_name);
+          free(binary_name);
           binary_name = bprintf("%s/%s", data, xbt_binary_name);
           if (!stat(binary_name, &stat_buf)) {
             /* Found. */
index fea72db..0b2167c 100644 (file)
@@ -123,10 +123,10 @@ void xbt_backtrace_preinit(void)
     return;
   }
 
-  (*fun_set_options) ((*fun_get_options) () |
+  fun_set_options(fun_get_options() |
                       SYMOPT_LOAD_LINES | SYMOPT_DEFERRED_LOADS);
 
-  if (!(*fun_initialize) (process_handle, 0, 1)) {
+  if (!fun_initialize(process_handle, 0, 1)) {
     FreeLibrary(hlp_dbg_instance);
     hlp_dbg_instance = NULL;
   }
@@ -137,7 +137,7 @@ void xbt_backtrace_postexit(void)
   if (!hlp_dbg_instance)
     return;
 
-  if ((*fun_cleanup) (process_handle))
+  if (fun_cleanup(process_handle))
     FreeLibrary(hlp_dbg_instance);
 
   hlp_dbg_instance = NULL;
@@ -318,9 +318,9 @@ char **backtrace_symbols(void *const *buffer, int size)
 
     if (NULL != stack_frame) {
 
-      if ((*fun_get_sym_from_addr)
+      if (fun_get_sym_from_addr
           (process_handle, stack_frame->AddrPC.Offset, &offset, pSym)) {
-        if ((*fun_get_line_from_addr)
+        if (fun_get_line_from_addr
             (process_handle, stack_frame->AddrPC.Offset, &offset,
              &line_info)) {
           strings[pos] =
index a9071df..39b4262 100644 (file)
@@ -64,7 +64,7 @@ static xbt_cfgelm_t xbt_cfgelm_get(xbt_cfg_t cfg, const char *name,
 
 xbt_cfg_t xbt_cfg_new(void)
 {
-  return (xbt_cfg_t) xbt_dict_new();
+  return (xbt_cfg_t) xbt_dict_new_homogeneous(&xbt_cfgelm_free);
 }
 
 /** \brief Copy an existing configuration set
@@ -263,7 +263,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
     XBT_ERROR("%d is an invalide type code", type);
   }
 
-  xbt_dict_set((xbt_dict_t) * cfg, name, res, &xbt_cfgelm_free);
+  xbt_dict_set((xbt_dict_t) * cfg, name, res, NULL);
 }
 
 /** @brief Unregister an element from a config set.
@@ -589,7 +589,7 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options)
   double d;
   char *str;
 
-  xbt_cfgelm_t variable = NULL;
+  volatile xbt_cfgelm_t variable = NULL;
   char *optionlist_cpy;
   char *option, *name, *val;
 
@@ -660,10 +660,17 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options)
     CATCH(e) {
       if (e.category == not_found_error) {
         xbt_ex_free(e);
-        name = xbt_strdup(name);
-        free(optionlist_cpy);
-        THROWF(not_found_error, 0,
-               "No registered variable corresponding to '%s'.", name);
+        TRY {
+          THROWF(not_found_error, 0,
+                 "No registered variable corresponding to '%s'.", name);
+        }
+        TRY_CLEANUP {
+          /* name points into optionlist_cpy, it cannot be freed before */
+          free(optionlist_cpy);
+        }
+        CATCH_ANONYMOUS {
+          RETHROW;
+        }
       }
       free(optionlist_cpy);
       RETHROW;
@@ -821,8 +828,8 @@ void xbt_cfg_set_int(xbt_cfg_t cfg, const char *name, int val)
   variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_int);
 
   if (variable->max == 1) {
-    if (variable->cb_rm && xbt_dynar_length(variable->content))
-      (*variable->cb_rm) (name, 0);
+    if (variable->cb_rm && !xbt_dynar_is_empty(variable->content))
+      variable->cb_rm(name, 0);
 
     xbt_dynar_set(variable->content, 0, &val);
   } else {
@@ -837,7 +844,7 @@ void xbt_cfg_set_int(xbt_cfg_t cfg, const char *name, int val)
   }
 
   if (variable->cb_set)
-    (*variable->cb_set) (name, xbt_dynar_length(variable->content) - 1);
+    variable->cb_set(name, xbt_dynar_length(variable->content) - 1);
   variable->isdefault = 0;
 }
 
@@ -856,8 +863,8 @@ void xbt_cfg_set_double(xbt_cfg_t cfg, const char *name, double val)
   variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_double);
 
   if (variable->max == 1) {
-    if (variable->cb_rm && xbt_dynar_length(variable->content))
-      (*variable->cb_rm) (name, 0);
+    if (variable->cb_rm && !xbt_dynar_is_empty(variable->content))
+      variable->cb_rm(name, 0);
 
     xbt_dynar_set(variable->content, 0, &val);
   } else {
@@ -871,7 +878,7 @@ void xbt_cfg_set_double(xbt_cfg_t cfg, const char *name, double val)
   }
 
   if (variable->cb_set)
-    (*variable->cb_set) (name, xbt_dynar_length(variable->content) - 1);
+    variable->cb_set(name, xbt_dynar_length(variable->content) - 1);
   variable->isdefault = 0;
 }
 
@@ -895,9 +902,9 @@ void xbt_cfg_set_string(xbt_cfg_t cfg, const char *name, const char *val)
          xbt_cfgelm_type_name[variable->type], variable->type, variable);
 
   if (variable->max == 1) {
-    if (xbt_dynar_length(variable->content)) {
+    if (!xbt_dynar_is_empty(variable->content)) {
       if (variable->cb_rm)
-        (*variable->cb_rm) (name, 0);
+        variable->cb_rm(name, 0);
       else if (variable->type == xbt_cfgelm_string) {
         char *sval = xbt_dynar_get_as(variable->content, 0, char *);
         free(sval);
@@ -916,7 +923,7 @@ void xbt_cfg_set_string(xbt_cfg_t cfg, const char *name, const char *val)
   }
 
   if (variable->cb_set)
-    (*variable->cb_set) (name, xbt_dynar_length(variable->content) - 1);
+    variable->cb_set(name, xbt_dynar_length(variable->content) - 1);
   variable->isdefault = 0;
 }
 
@@ -942,8 +949,8 @@ xbt_cfg_set_peer(xbt_cfg_t cfg, const char *name, const char *peer,
   variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_peer);
 
   if (variable->max == 1) {
-    if (variable->cb_rm && xbt_dynar_length(variable->content))
-      (*variable->cb_rm) (name, 0);
+    if (variable->cb_rm && !xbt_dynar_is_empty(variable->content))
+      variable->cb_rm(name, 0);
 
     xbt_dynar_set(variable->content, 0, &val);
   } else {
@@ -957,7 +964,7 @@ xbt_cfg_set_peer(xbt_cfg_t cfg, const char *name, const char *peer,
   }
 
   if (variable->cb_set)
-    (*variable->cb_set) (name, xbt_dynar_length(variable->content) - 1);
+    variable->cb_set(name, xbt_dynar_length(variable->content) - 1);
   variable->isdefault = 0;
 }
 
@@ -986,7 +993,7 @@ void xbt_cfg_rm_int(xbt_cfg_t cfg, const char *name, int val)
   xbt_dynar_foreach(variable->content, cpt, seen) {
     if (seen == val) {
       if (variable->cb_rm)
-        (*variable->cb_rm) (name, cpt);
+        variable->cb_rm(name, cpt);
       xbt_dynar_cursor_rm(variable->content, &cpt);
       return;
     }
@@ -1021,7 +1028,7 @@ void xbt_cfg_rm_double(xbt_cfg_t cfg, const char *name, double val)
     if (seen == val) {
       xbt_dynar_cursor_rm(variable->content, &cpt);
       if (variable->cb_rm)
-        (*variable->cb_rm) (name, cpt);
+        variable->cb_rm(name, cpt);
       return;
     }
   }
@@ -1053,7 +1060,7 @@ void xbt_cfg_rm_string(xbt_cfg_t cfg, const char *name, const char *val)
   xbt_dynar_foreach(variable->content, cpt, seen) {
     if (!strcpy(seen, val)) {
       if (variable->cb_rm)
-        (*variable->cb_rm) (name, cpt);
+        variable->cb_rm(name, cpt);
       xbt_dynar_cursor_rm(variable->content, &cpt);
       return;
     }
@@ -1090,7 +1097,7 @@ xbt_cfg_rm_peer(xbt_cfg_t cfg, const char *name, const char *peer,
   xbt_dynar_foreach(variable->content, cpt, seen) {
     if (!strcpy(seen->name, peer) && seen->port == port) {
       if (variable->cb_rm)
-        (*variable->cb_rm) (name, cpt);
+        variable->cb_rm(name, cpt);
       xbt_dynar_cursor_rm(variable->content, &cpt);
       return;
     }
@@ -1116,7 +1123,7 @@ void xbt_cfg_rm_at(xbt_cfg_t cfg, const char *name, int pos)
            pos, name, variable->min);
 
   if (variable->cb_rm)
-    (*variable->cb_rm) (name, pos);
+    variable->cb_rm(name, pos);
   xbt_dynar_remove_at(variable->content, pos, NULL);
 }
 
@@ -1149,7 +1156,7 @@ void xbt_cfg_empty(xbt_cfg_t cfg, const char *name)
       unsigned int cpt;
       void *ignored;
       xbt_dynar_foreach(variable->content, cpt, ignored) {
-        (*variable->cb_rm) (name, cpt);
+        variable->cb_rm(name, cpt);
       }
     }
     xbt_dynar_reset(variable->content);
@@ -1238,7 +1245,7 @@ char *xbt_cfg_get_string(xbt_cfg_t cfg, const char *name)
     XBT_WARN
         ("You asked for the first value of the config element '%s', but there is %lu values\n",
          name, xbt_dynar_length(variable->content));
-  } else if (xbt_dynar_length(variable->content) == 0) {
+  } else if (xbt_dynar_is_empty(variable->content)) {
     return NULL;
   }
 
index d432000..e079770 100644 (file)
@@ -1,6 +1,6 @@
 /* dict - a generic dictionary, variation over hash table                   */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt,
                                 "Dictionaries provide the same functionalities than hash tables");
-/*####[ Private prototypes ]#################################################*/
-
-static xbt_mallocator_t dict_mallocator = NULL;
-static void *dict_mallocator_new_f(void);
-static void dict_mallocator_free_f(void *dict);
-static void dict_mallocator_reset_f(void *dict);
 
+/**
+ * \brief Constructor
+ * \return pointer to the destination
+ * \see xbt_dict_free()
+ *
+ * Creates and initialize a new dictionary with a default hashtable size.
+ * The dictionary is heterogeneous: each element can have a different free
+ * function.
+ */
+xbt_dict_t xbt_dict_new(void)
+{
+  xbt_dict_t dict = xbt_dict_new_homogeneous(NULL);
+  dict->homogeneous = 0;
 
-/*####[ Code ]###############################################################*/
+  return dict;
+}
 
 /**
  * \brief Constructor
+ * \param free_ctn function to call with (\a data as argument) when
+ *        \a data is removed from the dictionary
  * \return pointer to the destination
- * \see xbt_dict_new_ext(), xbt_dict_free()
+ * \see xbt_dict_new(), xbt_dict_free()
  *
  * Creates and initialize a new dictionary with a default hashtable size.
+ * The dictionary is homogeneous: each element share the same free function.
  */
-xbt_dict_t xbt_dict_new(void)
+xbt_dict_t xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn)
 {
   xbt_dict_t dict;
 
-  dict = xbt_mallocator_get(dict_mallocator);
+  dict = xbt_new(s_xbt_dict_t, 1);
+  dict->free_f = free_ctn;
   dict->table_size = 127;
   dict->table = xbt_new0(xbt_dictelm_t, dict->table_size + 1);
   dict->count = 0;
   dict->fill = 0;
+  dict->homogeneous = 1;
 
   return dict;
 }
@@ -74,12 +87,12 @@ void xbt_dict_free(xbt_dict_t * dict)
       while (current != NULL) {
         previous = current;
         current = current->next;
-        xbt_dictelm_free(previous);
+        xbt_dictelm_free(*dict, previous);
         (*dict)->count--;
       }
     }
     xbt_free(table);
-    xbt_mallocator_release(dict_mallocator, *dict);
+    xbt_free(*dict);
     *dict = NULL;
   }
 }
@@ -251,7 +264,7 @@ XBT_INLINE void xbt_dict_set_ext(xbt_dict_t dict,
 
   if (current == NULL) {
     /* this key doesn't exist yet */
-    current = xbt_dictelm_new(key, key_len, hash_code, data, free_ctn);
+    current = xbt_dictelm_new(dict, key, key_len, hash_code, data, free_ctn);
     dict->count++;
     if (previous == NULL) {
       dict->table[hash_code & dict->table_size] = current;
@@ -262,16 +275,11 @@ XBT_INLINE void xbt_dict_set_ext(xbt_dict_t dict,
       previous->next = current;
     }
   } else {
-
     XBT_DEBUG("Replace %.*s by %.*s under key %.*s",
            key_len, (char *) current->content,
            key_len, (char *) data, key_len, (char *) key);
     /* there is already an element with the same key: overwrite it */
-    if (current->content != NULL && current->free_f != NULL) {
-      current->free_f(current->content);
-    }
-    current->content = data;
-    current->free_f = free_ctn;
+    xbt_dictelm_set_data(dict, current, data, free_ctn);
   }
 }
 
@@ -468,7 +476,7 @@ XBT_INLINE void xbt_dict_remove_ext(xbt_dict_t dict, const char *key,
   if (!dict->table[hash_code & dict->table_size])
     dict->fill--;
 
-  xbt_dictelm_free(current);
+  xbt_dictelm_free(dict, current);
   dict->count--;
 }
 
@@ -499,45 +507,7 @@ XBT_INLINE void xbt_dict_remove(xbt_dict_t dict, const char *key)
 XBT_INLINE void xbt_dicti_set(xbt_dict_t dict,
                               uintptr_t key, uintptr_t data)
 {
-
-  unsigned int hash_code =
-      xbt_dict_hash_ext((void *) &key, sizeof(uintptr_t));
-
-  xbt_dictelm_t current, previous = NULL;
-  xbt_assert(dict);
-
-  XBT_DEBUG("ADD %zu->%zu; hash = %d, size = %d, & = %d", key, data,
-         hash_code, dict->table_size, hash_code & dict->table_size);
-  current = dict->table[hash_code & dict->table_size];
-  while (current != NULL &&
-         (hash_code != current->hash_code
-          || sizeof(uintptr_t) != current->key_len
-          || (((uintptr_t) key) != ((uintptr_t) current->key)))) {
-    previous = current;
-    current = current->next;
-  }
-
-  if (current == NULL) {
-    /* this key doesn't exist yet */
-    current = xbt_dictielm_new(key, hash_code, data);
-    dict->count++;
-    if (previous == NULL) {
-      dict->table[hash_code & dict->table_size] = current;
-      dict->fill++;
-      if ((dict->fill * 100) / (dict->table_size + 1) > MAX_FILL_PERCENT)
-        xbt_dict_rehash(dict);
-    } else {
-      previous->next = current;
-    }
-  } else {
-
-    /* there is already an element with the same key: overwrite it */
-    if (current->content != NULL && current->free_f != NULL) {
-      current->free_f(current->content);
-    }
-    current->content = (void *) data;
-    current->free_f = NULL;
-  }
+  xbt_dict_set_ext(dict, (void *)&key, sizeof key, (void*)data, NULL);
 }
 
 /**
@@ -551,59 +521,13 @@ XBT_INLINE void xbt_dicti_set(xbt_dict_t dict,
  */
 XBT_INLINE uintptr_t xbt_dicti_get(xbt_dict_t dict, uintptr_t key)
 {
-
-  unsigned int hash_code =
-      xbt_dict_hash_ext(((void *) &key), sizeof(uintptr_t));
-  xbt_dictelm_t current;
-
-  xbt_assert(dict);
-
-  current = dict->table[hash_code & dict->table_size];
-  while (current != NULL &&
-         (hash_code != current->hash_code
-          || sizeof(uintptr_t) != current->key_len
-          || (((uintptr_t) key) != ((uintptr_t) current->key)))) {
-    current = current->next;
-  }
-
-  if (current == NULL)
-    return 0;
-
-  return (uintptr_t) (current->content);
+  return (uintptr_t)xbt_dict_get_or_null_ext(dict, (void *)&key, sizeof key);
 }
 
 /** Remove a uintptr_t key from the dict */
 XBT_INLINE void xbt_dicti_remove(xbt_dict_t dict, uintptr_t key)
 {
-
-  unsigned int hash_code =
-      xbt_dict_hash_ext(((void *) &key), sizeof(uintptr_t));
-  xbt_dictelm_t current, previous = NULL;
-
-
-  current = dict->table[hash_code & dict->table_size];
-  while (current != NULL &&
-         (hash_code != current->hash_code
-          || sizeof(uintptr_t) != current->key_len
-          || (((uintptr_t) key) != ((uintptr_t) current->key)))) {
-    previous = current;         /* save the previous node */
-    current = current->next;
-  }
-
-  if (current == NULL)
-    THROWF(not_found_error, 0, "key %zu not found", key);
-
-  if (previous != NULL) {
-    previous->next = current->next;
-  } else {
-    dict->table[hash_code & dict->table_size] = current->next;
-  }
-
-  if (!dict->table[hash_code & dict->table_size])
-    dict->fill--;
-
-  xbt_dictelm_free(current);
-  dict->count--;
+  xbt_dict_remove_ext(dict, (void *)&key, sizeof key);
 }
 
 
@@ -627,7 +551,7 @@ void xbt_dict_reset(xbt_dict_t dict)
     while (current != NULL) {
       previous = current;
       current = current->next;
-      xbt_dictelm_free(previous);
+      xbt_dictelm_free(dict, previous);
     }
     dict->table[i] = NULL;
   }
@@ -658,7 +582,7 @@ void xbt_dict_dump_output_string(void *s)
  */
 XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
 {
-  return (xbt_dict_size(dict) == 0);
+  return !dict || (xbt_dict_length(dict) == 0);
 }
 
 /**
@@ -684,7 +608,7 @@ void xbt_dict_dump(xbt_dict_t dict, void_f_pvoid_t output)
         while (element != NULL) {
           printf(" %s -> '", element->key);
           if (output != NULL) {
-            (*output) (element->content);
+            output(element->content);
           }
           printf("'\n");
           element = element->next;
@@ -764,20 +688,20 @@ void xbt_dict_dump_sizes(xbt_dict_t dict)
  */
 void xbt_dict_preinit(void)
 {
-  if (dict_mallocator != NULL) {
+  if (dict_elm_mallocator != NULL) {
     /* Already created. I guess we want to switch to MC mode, so kill the previously created mallocator */
-    xbt_mallocator_free(dict_mallocator);
     xbt_mallocator_free(dict_elm_mallocator);
+    xbt_mallocator_free(dict_het_elm_mallocator);
   }
 
-  dict_mallocator = xbt_mallocator_new(256,
-                                       dict_mallocator_new_f,
-                                       dict_mallocator_free_f,
-                                       dict_mallocator_reset_f);
   dict_elm_mallocator = xbt_mallocator_new(256,
                                            dict_elm_mallocator_new_f,
                                            dict_elm_mallocator_free_f,
                                            dict_elm_mallocator_reset_f);
+  dict_het_elm_mallocator = xbt_mallocator_new(256,
+                                               dict_het_elm_mallocator_new_f,
+                                               dict_het_elm_mallocator_free_f,
+                                               dict_het_elm_mallocator_reset_f);
 }
 
 /**
@@ -786,11 +710,11 @@ void xbt_dict_preinit(void)
  */
 void xbt_dict_postexit(void)
 {
-  if (dict_mallocator != NULL) {
-    xbt_mallocator_free(dict_mallocator);
-    dict_mallocator = NULL;
+  if (dict_elm_mallocator != NULL) {
     xbt_mallocator_free(dict_elm_mallocator);
     dict_elm_mallocator = NULL;
+    xbt_mallocator_free(dict_het_elm_mallocator);
+    dict_het_elm_mallocator = NULL;
   }
   if (all_sizes) {
     unsigned int count;
@@ -811,23 +735,6 @@ void xbt_dict_postexit(void)
   }
 }
 
-static void *dict_mallocator_new_f(void)
-{
-  return xbt_new(s_xbt_dict_t, 1);
-}
-
-static void dict_mallocator_free_f(void *dict)
-{
-  xbt_free(dict);
-}
-
-static void dict_mallocator_reset_f(void *dict)
-{
-  /* nothing to do because all fields are
-   * initialized in xbt_dict_new
-   */
-}
-
 #ifdef SIMGRID_TEST
 #include "xbt.h"
 #include "xbt/ex.h"
@@ -844,39 +751,41 @@ static void print_str(void *str)
 }
 
 static void debuged_add_ext(xbt_dict_t head, const char *key,
-                            const char *data_to_fill)
+                            const char *data_to_fill, void_f_pvoid_t free_f)
 {
   char *data = xbt_strdup(data_to_fill);
 
   xbt_test_log("Add %s under %s", PRINTF_STR(data_to_fill),
                 PRINTF_STR(key));
 
-  xbt_dict_set(head, key, data, &free);
+  xbt_dict_set(head, key, data, free_f);
   if (XBT_LOG_ISENABLED(xbt_dict, xbt_log_priority_debug)) {
     xbt_dict_dump(head, (void (*)(void *)) &printf);
     fflush(stdout);
   }
 }
 
-static void debuged_add(xbt_dict_t head, const char *key)
+static void debuged_add(xbt_dict_t head, const char *key, void_f_pvoid_t free_f)
 {
-  debuged_add_ext(head, key, key);
+  debuged_add_ext(head, key, key, free_f);
 }
 
-static void fill(xbt_dict_t * head)
+static void fill(xbt_dict_t * head, int homogeneous)
 {
+  void_f_pvoid_t free_f = homogeneous ? NULL : &free;
+
   xbt_test_add("Fill in the dictionnary");
 
-  *head = xbt_dict_new();
-  debuged_add(*head, "12");
-  debuged_add(*head, "12a");
-  debuged_add(*head, "12b");
-  debuged_add(*head, "123");
-  debuged_add(*head, "123456");
+  *head = homogeneous ? xbt_dict_new_homogeneous(&free) : xbt_dict_new();
+  debuged_add(*head, "12", free_f);
+  debuged_add(*head, "12a", free_f);
+  debuged_add(*head, "12b", free_f);
+  debuged_add(*head, "123", free_f);
+  debuged_add(*head, "123456", free_f);
   /* Child becomes child of what to add */
-  debuged_add(*head, "1234");
+  debuged_add(*head, "1234", free_f);
   /* Need of common ancestor */
-  debuged_add(*head, "123457");
+  debuged_add(*head, "123457", free_f);
 }
 
 
@@ -975,7 +884,8 @@ static void count(xbt_dict_t dict, int length)
 static void count_check_get_key(xbt_dict_t dict, int length)
 {
   xbt_dict_cursor_t cursor;
-  char *key, *key2;
+  char *key;
+  _XBT_GNUC_UNUSED char *key2;
   void *data;
   int effective = 0;
 
@@ -1004,14 +914,15 @@ xbt_ex_t e;
 xbt_dict_t head = NULL;
 char *data;
 
-
-XBT_TEST_UNIT("basic", test_dict_basic, "Basic usage: change, retrieve, traverse")
+static void basic_test(int homogeneous)
 {
+  void_f_pvoid_t free_f;
+
   xbt_test_add("Traversal the null dictionary");
   traverse(head);
 
   xbt_test_add("Traversal and search the empty dictionary");
-  head = xbt_dict_new();
+  head = homogeneous ? xbt_dict_new_homogeneous(&free) : xbt_dict_new();
   traverse(head);
   TRY {
     debuged_remove(head, "12346");
@@ -1023,11 +934,13 @@ XBT_TEST_UNIT("basic", test_dict_basic, "Basic usage: change, retrieve, traverse
   }
   xbt_dict_free(&head);
 
+  free_f = homogeneous ? NULL : &free;
+
   xbt_test_add("Traverse the full dictionary");
-  fill(&head);
+  fill(&head, homogeneous);
   count_check_get_key(head, 7);
 
-  debuged_add_ext(head, "toto", "tutu");
+  debuged_add_ext(head, "toto", "tutu", free_f);
   search_ext(head, "toto", "tutu");
   debuged_remove(head, "toto");
 
@@ -1039,22 +952,22 @@ XBT_TEST_UNIT("basic", test_dict_basic, "Basic usage: change, retrieve, traverse
   xbt_dict_free(&head);
 
   /* CHANGING */
-  fill(&head);
+  fill(&head, homogeneous);
   count_check_get_key(head, 7);
   xbt_test_add("Change 123 to 'Changed 123'");
-  xbt_dict_set(head, "123", strdup("Changed 123"), &free);
+  xbt_dict_set(head, "123", strdup("Changed 123"), free_f);
   count_check_get_key(head, 7);
 
   xbt_test_add("Change 123 back to '123'");
-  xbt_dict_set(head, "123", strdup("123"), &free);
+  xbt_dict_set(head, "123", strdup("123"), free_f);
   count_check_get_key(head, 7);
 
   xbt_test_add("Change 12a to 'Dummy 12a'");
-  xbt_dict_set(head, "12a", strdup("Dummy 12a"), &free);
+  xbt_dict_set(head, "12a", strdup("Dummy 12a"), free_f);
   count_check_get_key(head, 7);
 
   xbt_test_add("Change 12a to '12a'");
-  xbt_dict_set(head, "12a", strdup("12a"), &free);
+  xbt_dict_set(head, "12a", strdup("12a"), free_f);
   count_check_get_key(head, 7);
 
   xbt_test_add("Traverse the resulting dictionary");
@@ -1090,9 +1003,19 @@ XBT_TEST_UNIT("basic", test_dict_basic, "Basic usage: change, retrieve, traverse
   traverse(head);
 }
 
-XBT_TEST_UNIT("remove", test_dict_remove, "Removing some values")
+XBT_TEST_UNIT("basic (heterogeneous)", test_dict_basic_heterogeneous, "Basic usage: change, retrieve, traverse: heterogeneous dictionary")
+{
+  basic_test(0);
+}
+
+XBT_TEST_UNIT("basic (homogeneous)", test_dict_basic_homogeneous, "Basic usage: change, retrieve, traverse: homogeneous dictionary")
+{
+  basic_test(1);
+}
+
+static void remove_test(int homogeneous)
 {
-  fill(&head);
+  fill(&head, homogeneous);
   count(head, 7);
   xbt_test_add("Remove non existing data");
   TRY {
@@ -1109,7 +1032,7 @@ XBT_TEST_UNIT("remove", test_dict_remove, "Removing some values")
 
   xbt_test_add
       ("Remove each data manually (traversing the resulting dictionary each time)");
-  fill(&head);
+  fill(&head, homogeneous);
   debuged_remove(head, "12a");
   traverse(head);
   count(head, 6);
@@ -1150,7 +1073,7 @@ XBT_TEST_UNIT("remove", test_dict_remove, "Removing some values")
   xbt_test_add
       ("Free dict, create new fresh one, and then reset the dict");
   xbt_dict_free(&head);
-  fill(&head);
+  fill(&head, homogeneous);
   xbt_dict_reset(head);
   count(head, 0);
   traverse(head);
@@ -1160,9 +1083,19 @@ XBT_TEST_UNIT("remove", test_dict_remove, "Removing some values")
   xbt_dict_free(&head);
 }
 
+XBT_TEST_UNIT("remove (heterogeneous)", test_dict_remove_heterogeneous, "Removing some values: heterogeneous dictionary")
+{
+  remove_test(0);
+}
+
+XBT_TEST_UNIT("remove (homogeneous)", test_dict_remove_homogeneous, "Removing some values: homogeneous dictionary")
+{
+  remove_test(1);
+}
+
 XBT_TEST_UNIT("nulldata", test_dict_nulldata, "NULL data management")
 {
-  fill(&head);
+  fill(&head, 1);
 
   xbt_test_add("Store NULL under 'null'");
   xbt_dict_set(head, "null", NULL, NULL);
index 44f9f56..a83c005 100644 (file)
@@ -1,6 +1,6 @@
 /* dict_cursor - iterators over dictionnaries                               */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict_cursor, xbt_dict,
 /* To traverse (simple) dicts                                               */
 /* Don't add or remove entries to the dict while traversing !!!             */
 /*###########################################################################*/
-struct xbt_dict_cursor_ {
+struct s_xbt_dict_cursor {
   xbt_dictelm_t current;
   int line;
   xbt_dict_t dict;
@@ -51,10 +51,8 @@ XBT_INLINE xbt_dict_cursor_t xbt_dict_cursor_new(const xbt_dict_t dict)
  */
 XBT_INLINE void xbt_dict_cursor_free(xbt_dict_cursor_t * cursor)
 {
-  if (*cursor) {
-    xbt_free(*cursor);
-    *cursor = NULL;
-  }
+  xbt_free(*cursor);
+  *cursor = NULL;
 }
 
 /*
@@ -199,10 +197,5 @@ XBT_INLINE void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor,
                                          void_f_pvoid_t free_ctn)
 {
   __cursor_not_null(cursor);
-  if (cursor->current->free_f)
-    cursor->current->free_f(cursor->current->content);
-
-  cursor->current->content = data;
-  cursor->current->free_f = free_ctn;
-  return;
+  xbt_dictelm_set_data(cursor->dict, cursor->current, data, free_ctn);
 }
index 4129989..1d5084e 100644 (file)
@@ -1,6 +1,6 @@
-/* dict - a generic dictionary, variation over the B-tree concept           */
+/* dict - a generic dictionary, variation over hash table                   */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -12,69 +12,76 @@ XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict_elm, xbt_dict,
                                 "Dictionaries internals");
 
-XBT_LOG_NEW_SUBCATEGORY(xbt_dict_add, xbt_dict,
-                        "Dictionaries internals: elements addition");
-XBT_LOG_NEW_SUBCATEGORY(xbt_dict_search, xbt_dict,
-                        "Dictionaries internals: searching");
-XBT_LOG_NEW_SUBCATEGORY(xbt_dict_remove, xbt_dict,
-                        "Dictionaries internals: elements removal");
-XBT_LOG_NEW_SUBCATEGORY(xbt_dict_collapse, xbt_dict,
-                        "Dictionaries internals: post-removal cleanup");
-
 xbt_mallocator_t dict_elm_mallocator = NULL;
+xbt_mallocator_t dict_het_elm_mallocator = NULL;
 
-xbt_dictelm_t xbt_dictelm_new(const char *key,
-                              int key_len,
-                              unsigned int hash_code,
-                              void *content, void_f_pvoid_t free_f)
+xbt_dictelm_t xbt_dictelm_new(xbt_dict_t dict, const char *key, int key_len,
+                              unsigned int hash_code, void *content,
+                              void_f_pvoid_t free_f)
 {
-  xbt_dictelm_t element = xbt_mallocator_get(dict_elm_mallocator);
-
-  element->dictielem = 0;       /* please free the key on free */
+  xbt_dictelm_t element;
+
+  if (dict->homogeneous) {
+    xbt_assert(!free_f,
+               "Cannot set an individual free function in homogeneous dicts.");
+    element = xbt_mallocator_get(dict_elm_mallocator);
+  } else {
+    xbt_het_dictelm_t het_element = xbt_mallocator_get(dict_het_elm_mallocator);
+    het_element->free_f = free_f;
+    element = &het_element->element;
+  }
   element->key = xbt_new(char, key_len + 1);
-  memcpy((void *) element->key, (void *) key, key_len);
+  memcpy(element->key, key, key_len);
   element->key[key_len] = '\0';
 
   element->key_len = key_len;
   element->hash_code = hash_code;
 
   element->content = content;
-  element->free_f = free_f;
   element->next = NULL;
 
   return element;
 }
 
-xbt_dictelm_t xbt_dictielm_new(uintptr_t key, unsigned int hash_code,
-                               uintptr_t content)
+void xbt_dictelm_free(xbt_dict_t dict, xbt_dictelm_t element)
 {
-  xbt_dictelm_t element = xbt_mallocator_get(dict_elm_mallocator);
-
-  element->key = (void *) key;
-
-  element->dictielem = 1;       /* please DONT free the key on free */
-  element->key_len = sizeof(uintptr_t);
-  element->hash_code = hash_code;
-
-  element->content = (void *) content;
-  element->free_f = NULL;
-  element->next = NULL;
+  if (element) {
+    char *key = element->key;
+    void *content = element->content;
+    void_f_pvoid_t free_f;
+    if (dict->homogeneous) {
+      free_f = dict->free_f;
+      xbt_mallocator_release(dict_elm_mallocator, element);
+    } else {
+      xbt_het_dictelm_t het_element = (xbt_het_dictelm_t)element;
+      free_f = het_element->free_f;
+      xbt_mallocator_release(dict_het_elm_mallocator, het_element);
+    }
 
-  return element;
+    xbt_free(key);
+    if (free_f && content)
+      free_f(content);
+  }
 }
 
-void xbt_dictelm_free(xbt_dictelm_t element)
+void xbt_dictelm_set_data(xbt_dict_t dict, xbt_dictelm_t element,
+                          void *data, void_f_pvoid_t free_ctn)
 {
-  if (element != NULL) {
-    if (!element->dictielem)
-      xbt_free(element->key);
+  void_f_pvoid_t free_f;
+  if (dict->homogeneous) {
+    free_f = dict->free_f;
+    xbt_assert(!free_ctn,
+               "Cannot set an individual free function in homogeneous dicts.");
+  } else {
+    xbt_het_dictelm_t het_element = (xbt_het_dictelm_t)element;
+    free_f  = het_element->free_f;
+    het_element->free_f = free_ctn;
+  }
 
-    if (element->free_f != NULL && element->content != NULL) {
-      element->free_f(element->content);
-    }
+  if (free_f && element->content)
+    free_f(element->content);
 
-    xbt_mallocator_release(dict_elm_mallocator, element);
-  }
+  element->content = data;
 }
 
 void *dict_elm_mallocator_new_f(void)
@@ -82,12 +89,7 @@ void *dict_elm_mallocator_new_f(void)
   return xbt_new(s_xbt_dictelm_t, 1);
 }
 
-void dict_elm_mallocator_free_f(void *elem)
+void *dict_het_elm_mallocator_new_f(void)
 {
-  xbt_free(elem);
-}
-
-void dict_elm_mallocator_reset_f(void *elem)
-{
-
+  return xbt_new(s_xbt_het_dictelm_t, 1);
 }
index 6dc05e0..0c2e692 100644 (file)
@@ -125,7 +125,7 @@ void *xbt_multidict_get_ext(xbt_dict_t mdict,
   int keys_len = xbt_dynar_length(keys);
 
   xbt_assert(xbt_dynar_length(keys) == xbt_dynar_length(lens));
-  xbt_assert(xbt_dynar_length(keys) >= 1,
+  xbt_assert(!xbt_dynar_is_empty(keys),
               "Can't get a zero-long key set in a multidict");
 
   XBT_DEBUG("xbt_multidict_get(%p, %ld)", mdict, xbt_dynar_length(keys));
@@ -183,8 +183,9 @@ void
 xbt_multidict_remove_ext(xbt_dict_t mdict, xbt_dynar_t keys,
                          xbt_dynar_t lens)
 {
-  xbt_dict_t thislevel, nextlevel = NULL;
-  int i;
+  volatile xbt_dict_t thislevel;
+  volatile xbt_dict_t nextlevel = NULL;
+  volatile int i;
   xbt_ex_t e;
 
   unsigned long int thislen;
index c1b6402..490fe38 100644 (file)
@@ -1,7 +1,7 @@
 /* dict_elm - elements of generic dictionnaries                             */
 /* This file is not to be loaded from anywhere but dict.c                   */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include "xbt/dict.h"
 #include "xbt/mallocator.h"
 
-typedef struct xbt_dictelm_ *xbt_dictelm_t;
+typedef struct s_xbt_dictelm *xbt_dictelm_t;
 
 #define MAX_FILL_PERCENT 80
 
-typedef struct xbt_dictelm_ {
-  int dictielem:1;
+typedef struct s_xbt_dictelm {
   char *key;
   int key_len;
   unsigned int hash_code;
 
   void *content;
-  void_f_pvoid_t free_f;
 
   xbt_dictelm_t next;
 } s_xbt_dictelm_t;
 
-typedef struct xbt_dict_ {
+typedef struct s_xbt_het_dictelm {
+  s_xbt_dictelm_t element;
+  void_f_pvoid_t free_f;
+} s_xbt_het_dictelm_t, *xbt_het_dictelm_t;
+
+typedef struct s_xbt_dict {
+  void_f_pvoid_t free_f;
   xbt_dictelm_t *table;
   int table_size;
   int count;
   int fill;
+  int homogeneous;
 } s_xbt_dict_t;
 
-typedef struct xbt_dict_cursor_ s_xbt_dict_cursor_t;
+typedef struct s_xbt_dict_cursor s_xbt_dict_cursor_t;
 
 extern xbt_mallocator_t dict_elm_mallocator;
 extern void *dict_elm_mallocator_new_f(void);
-extern void dict_elm_mallocator_free_f(void *elem);
-extern void dict_elm_mallocator_reset_f(void *elem);
+#define dict_elm_mallocator_free_f xbt_free_f
+#define dict_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
+
+extern xbt_mallocator_t dict_het_elm_mallocator;
+extern void *dict_het_elm_mallocator_new_f(void);
+#define dict_het_elm_mallocator_free_f xbt_free_f
+#define dict_het_elm_mallocator_reset_f ((void_f_pvoid_t)NULL)
 
 /*####[ Function prototypes ]################################################*/
-xbt_dictelm_t xbt_dictelm_new(const char *key, int key_len,
+xbt_dictelm_t xbt_dictelm_new(xbt_dict_t dict, const char *key, int key_len,
                               unsigned int hash_code, void *content,
                               void_f_pvoid_t free_f);
-xbt_dictelm_t xbt_dictielm_new(uintptr_t key, unsigned int hash_code,
-                               uintptr_t content);
-void xbt_dictelm_free(xbt_dictelm_t element);
-void xbt_dict_add_element(xbt_dict_t dict, xbt_dictelm_t element);
+void xbt_dictelm_free(xbt_dict_t dict, xbt_dictelm_t element);
+void xbt_dictelm_set_data(xbt_dict_t dict, xbt_dictelm_t element,
+                          void *data, void_f_pvoid_t free_ctn);
 
 #endif                          /* _XBT_DICT_PRIVATE_H_ */
index b5468e3..3e9cb2c 100644 (file)
@@ -6,7 +6,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 "portable.h"           /* SIZEOF_MAX */
 #include "xbt/misc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
@@ -75,9 +74,12 @@ static XBT_INLINE void _check_populated_dynar(xbt_dynar_t dynar)
 static void _dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op);
 
 static XBT_INLINE
-    void _xbt_clear_mem(void *const ptr, const unsigned long length)
+void _xbt_dynar_resize(xbt_dynar_t dynar, unsigned long new_size)
 {
-  memset(ptr, 0, length);
+  if (new_size != dynar->size) {
+    dynar->size = new_size;
+    dynar->data = xbt_realloc(dynar->data, new_size * dynar->elmsize);
+  }
 }
 
 static XBT_INLINE
@@ -86,21 +88,10 @@ static XBT_INLINE
   const unsigned long old_size = dynar->size;
 
   if (nb > old_size) {
-    void *const old_data = dynar->data;
-    const unsigned long elmsize = dynar->elmsize;
-    const unsigned long old_length = old_size * elmsize;
-
     const unsigned long expand = 2 * (old_size + 1);
-    const unsigned long new_size = (nb > expand ? nb : expand);
-    const unsigned long new_length = new_size * elmsize;
-    void *const new_data = xbt_realloc(old_data, new_length);
-
-    XBT_DEBUG("expand %p from %lu to %lu elements", dynar, old_size, new_size);
-
-    _xbt_clear_mem((char *)new_data + old_length, new_length - old_length);
-
-    dynar->size = new_size;
-    dynar->data = new_data;
+    _xbt_dynar_resize(dynar, (nb > expand ? nb : expand));
+    XBT_DEBUG("expand %p from %lu to %lu elements",
+              dynar, old_size, dynar->size);
   }
 }
 
@@ -149,16 +140,7 @@ _xbt_dynar_remove_at(xbt_dynar_t const dynar,
   if (object) {
     _xbt_dynar_get_elm(object, dynar, idx);
   } else if (dynar->free_f) {
-    if (dynar->elmsize <= SIZEOF_MAX) {
-      char elm[SIZEOF_MAX];
-      _xbt_dynar_get_elm(elm, dynar, idx);
-      (*dynar->free_f) (elm);
-    } else {
-      char *elm = malloc(dynar->elmsize);
-      _xbt_dynar_get_elm(elm, dynar, idx);
-      (*dynar->free_f) (elm);
-      free(elm);
-    }
+    dynar->free_f(_xbt_dynar_elm(dynar, idx));
   }
 
   nb_shift = dynar->used - 1 - idx;
@@ -228,18 +210,11 @@ xbt_dynar_new_sync(const unsigned long elmsize,
 void xbt_dynar_free_container(xbt_dynar_t * dynar)
 {
   if (dynar && *dynar) {
-
-    if ((*dynar)->data) {
-      _xbt_clear_mem((*dynar)->data, (*dynar)->size);
-      free((*dynar)->data);
-    }
-
-    if ((*dynar)->mutex)
-      xbt_mutex_destroy((*dynar)->mutex);
-
-    _xbt_clear_mem(*dynar, sizeof(s_xbt_dynar_t));
-
-    free(*dynar);
+    xbt_dynar_t d = *dynar;
+    free(d->data);
+    if (d->mutex)
+      xbt_mutex_destroy(d->mutex);
+    free(d);
     *dynar = NULL;
   }
 }
@@ -258,17 +233,9 @@ XBT_INLINE void xbt_dynar_reset(xbt_dynar_t const dynar)
   if (dynar->free_f) {
     _dynar_map(dynar, dynar->free_f);
   }
-  /*
-     if (dynar->data)
-     free(dynar->data);
-
-     dynar->size = 0;
-   */
   dynar->used = 0;
 
   _dynar_unlock(dynar);
-
-  /*  dynar->data = NULL; */
 }
 
 /**
@@ -288,15 +255,8 @@ XBT_INLINE void xbt_dynar_reset(xbt_dynar_t const dynar)
  */
 void xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots_wanted)
 {
-  unsigned long size_wanted;
-
   _dynar_lock(dynar);
-
-  size_wanted = dynar->used + empty_slots_wanted;
-  if (size_wanted != dynar->size) {
-    dynar->size = size_wanted;
-    dynar->data = xbt_realloc(dynar->data, dynar->elmsize * dynar->size);
-  }
+  _xbt_dynar_resize(dynar, dynar->used + empty_slots_wanted);
   _dynar_unlock(dynar);
 }
 
@@ -382,26 +342,30 @@ XBT_INLINE void *xbt_dynar_get_ptr(const xbt_dynar_t dynar,
   return res;
 }
 
-XBT_INLINE void *xbt_dynar_set_at_ptr(const xbt_dynar_t dynar,
-                                      const unsigned long idx)
+/* not synchronized */
+static XBT_INLINE void *_xbt_dynar_set_at_ptr(const xbt_dynar_t dynar,
+                                              const unsigned long idx)
 {
-
-  void *res;
-  _dynar_lock(dynar);
   _sanity_check_dynar(dynar);
 
-  _xbt_dynar_expand(dynar, idx + 1);
-
   if (idx >= dynar->used) {
-    _xbt_clear_mem(((char * const)dynar->data) + dynar->used * dynar->elmsize,
-                   (idx + 1 - dynar->used)*dynar->elmsize);
+    _xbt_dynar_expand(dynar, idx + 1);
+    if (idx > dynar->used) {
+      memset(_xbt_dynar_elm(dynar, dynar->used), 0,
+             (idx - dynar->used) * dynar->elmsize);
+    }
     dynar->used = idx + 1;
   }
-  
-  _dynar_unlock(dynar);
-
-  res = _xbt_dynar_elm(dynar, idx);
+  return _xbt_dynar_elm(dynar, idx);
+}
 
+XBT_INLINE void *xbt_dynar_set_at_ptr(const xbt_dynar_t dynar,
+                                      const unsigned long idx)
+{
+  void *res;
+  _dynar_lock(dynar);
+  res = _xbt_dynar_set_at_ptr(dynar, idx);
+  _dynar_unlock(dynar);
   return res;
 }
 
@@ -409,18 +373,7 @@ static void XBT_INLINE          /* not synchronized */
 _xbt_dynar_set(xbt_dynar_t dynar,
                const unsigned long idx, const void *const src)
 {
-
-  _sanity_check_dynar(dynar);
-
-  _xbt_dynar_expand(dynar, idx + 1);
-
-  if (idx >= dynar->used) {
-    _xbt_clear_mem(((char * const)dynar->data) + dynar->used * dynar->elmsize,
-                   (idx + 1 - dynar->used)*dynar->elmsize);
-    dynar->used = idx + 1;
-  }
-
-  _xbt_dynar_put_elm(dynar, idx, src);
+  memcpy(_xbt_dynar_set_at_ptr(dynar, idx), src, dynar->elmsize);
 }
 
 /** @brief Set the Nth element of a dynar (expanded if needed). Previous value at this position is NOT freed
@@ -460,7 +413,7 @@ xbt_dynar_replace(xbt_dynar_t dynar,
   if (idx < dynar->used && dynar->free_f) {
     void *const old_object = _xbt_dynar_elm(dynar, idx);
 
-    (*(dynar->free_f)) (old_object);
+    dynar->free_f(old_object);
   }
 
   _xbt_dynar_set(dynar, idx, object);
@@ -675,7 +628,7 @@ static void _dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op)
 
   for (i = 0; i < used; i++) {
     char* elm = (char*) data + i * elmsize;
-    (*op) (elm);
+    op(elm);
   }
 }
 
@@ -751,13 +704,14 @@ XBT_INLINE void xbt_dynar_sort(xbt_dynar_t dynar,
  */
 XBT_INLINE void * xbt_dynar_to_array (xbt_dynar_t dynar)
 {
-  void * res;
-       void * last = xbt_new0(char,dynar->elmsize);
-       xbt_dynar_push(dynar, last);
-       free(last);
-       res = dynar->data;
-       free(dynar);
-       return res;
+  void *res;
+  xbt_dynar_shrink(dynar, 1);
+  memset(xbt_dynar_push_ptr(dynar), 0, dynar->elmsize);
+  res = dynar->data;
+  if (dynar->mutex)
+    xbt_mutex_destroy(dynar->mutex);
+  free(dynar);
+  return res;
 }
 
 /*
@@ -1003,7 +957,7 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
                      "The retrieved value is not the same than the injected one (%d!=%d)",
                      cursor, cpt);
   }
-  xbt_test_assert(xbt_dynar_length(d) == 0,
+  xbt_test_assert(xbt_dynar_is_empty(d),
                    "There is still %lu elements in the dynar after removing everything",
                    xbt_dynar_length(d));
   xbt_dynar_free(&d);
@@ -1031,7 +985,7 @@ XBT_TEST_UNIT("insert",test_dynar_insert,"Using the xbt_dynar_insert and xbt_dyn
                      "The retrieved value is not the same than the injected one (%d!=%d)",
                      cursor, cpt);
   }
-  xbt_test_assert(xbt_dynar_length(d) == 0,
+  xbt_test_assert(xbt_dynar_is_empty(d),
                    "There is still %lu elements in the dynar after removing everything",
                    xbt_dynar_length(d));
   xbt_dynar_free(&d);
@@ -1324,7 +1278,7 @@ static void pusher_f(void *a)
 static void poper_f(void *a)
 {
   xbt_dynar_t d = (xbt_dynar_t) a;
-  int i;
+  volatile int i;
   int data;
   xbt_ex_t e;
 
index b2052e1..9768d5e 100644 (file)
@@ -98,7 +98,7 @@ void xbt_backtrace_display(xbt_ex_t * e)
 
     fprintf(stderr, "Backtrace (displayed in thread %p):\n",
             (void *) xbt_thread_self());
-    for (i = 1; i < e->used; i++)       /* no need to display "xbt_display_backtrace" */
+    for (i = 1; i < e->used; i++)       /* no need to display "xbt_backtrace_display" */
       fprintf(stderr, "---> %s\n", e->bt_strings[i] + 4);
   }
 
@@ -140,7 +140,7 @@ void xbt_ex_display(xbt_ex_t * e)
           "** SimGrid: UNCAUGHT EXCEPTION received on %s(%d): category: %s; value: %d\n"
           "** %s\n"
           "** Thrown by %s()%s\n",
-          gras_os_myname(), (*xbt_getpid) (),
+          gras_os_myname(), xbt_getpid(),
           xbt_ex_catname(e->category), e->value, e->msg,
           e->procname, thrower ? thrower : " in this process");
   XBT_CRITICAL("%s", e->msg);
@@ -187,8 +187,7 @@ void xbt_ex_free(xbt_ex_t e)
 {
   int i;
 
-  if (e.msg)
-    free(e.msg);
+  free(e.msg);
   if (e.remote) {
     free(e.procname);
     free(e.file);
@@ -198,8 +197,8 @@ void xbt_ex_free(xbt_ex_t e)
 
   if (e.bt_strings) {
     for (i = 0; i < e.used; i++)
-      free((char *) e.bt_strings[i]);
-    free((char **) e.bt_strings);
+      free(e.bt_strings[i]);
+    free(e.bt_strings);
   }
   /* memset(e,0,sizeof(xbt_ex_t)); */
 }
@@ -393,12 +392,9 @@ static void bad_example(void)
     strcpy(cp2, "bar");
   }
   TRY_CLEANUP {
-    if (cp3 != NULL)
-      free(cp3);
-    if (cp2 != NULL)
-      free(cp2);
-    if (cp1 != NULL)
-      free(cp1);
+    free(cp3);
+    free(cp2);
+    free(cp1);
   }
   CATCH_ANONYMOUS {
     printf("cp3=%s", cp3);
@@ -431,10 +427,8 @@ static void good_example(void)
     }
     TRY_CLEANUP {               /*04 */
       printf("cp3=%s", cp3 == NULL /*02 */ ? "" : cp3);
-      if (cp3 != NULL)
-        free(cp3);
-      if (cp2 != NULL)
-        free(cp2);
+      free(cp3);
+      free(cp2);
       /*05 cp1 was given away */
     }
     CATCH_ANONYMOUS {
index 89ab25f..57e0912 100644 (file)
@@ -13,7 +13,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_fifo, xbt, "FIFO");
 
 static void *fifo_item_mallocator_new_f(void);
-static void fifo_item_mallocator_free_f(void *item);
+#define fifo_item_mallocator_free_f xbt_free_f
 static void fifo_item_mallocator_reset_f(void *item);
 
 static xbt_mallocator_t item_mallocator = NULL;
@@ -375,11 +375,6 @@ static void *fifo_item_mallocator_new_f(void)
   return xbt_new(s_xbt_fifo_item_t, 1);
 }
 
-static void fifo_item_mallocator_free_f(void *item)
-{
-  xbt_free(item);
-}
-
 static void fifo_item_mallocator_reset_f(void *item)
 {
   /* memset to zero like calloc */
index 14ed08d..e56e413 100644 (file)
@@ -144,12 +144,12 @@ void xbt_graph_free_graph(xbt_graph_t g,
     xbt_dynar_free(&(node->out));
     xbt_dynar_free(&(node->in));
     if (node_free_function)
-      (*node_free_function) (node->data);
+      node_free_function(node->data);
   }
 
   xbt_dynar_foreach(g->edges, cursor, edge) {
     if (edge_free_function)
-      (*edge_free_function) (edge->data);
+      edge_free_function(edge->data);
   }
 
   xbt_dynar_foreach(g->nodes, cursor, node)
@@ -160,7 +160,7 @@ void xbt_graph_free_graph(xbt_graph_t g,
       free(edge);
   xbt_dynar_free(&(g->edges));
   if (graph_free_function)
-    (*graph_free_function) (g->data);
+    graph_free_function(g->data);
   free(g);
   xbt_graph_parse_lex_destroy();
   return;
@@ -190,7 +190,7 @@ void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
   }
 
   if ((node_free_function) && (n->data))
-    (*node_free_function) (n->data);
+    node_free_function(n->data);
 
   cursor = 0;
   xbt_dynar_foreach(g->nodes, cursor, node)
@@ -214,7 +214,7 @@ void xbt_graph_free_edge(xbt_graph_t g, xbt_edge_t e,
   xbt_edge_t edge = NULL;
 
   if ((free_function) && (e->data))
-    (*free_function) (e->data);
+    free_function(e->data);
 
   xbt_dynar_foreach(g->edges, cursor, edge) {
     if (edge == e) {
@@ -561,7 +561,7 @@ static void __parse_graph_begin(void)
   else
     parsed_graph = xbt_graph_new_graph(0, NULL);
 
-  parsed_nodes = xbt_dict_new();
+  parsed_nodes = xbt_dict_new_homogeneous(NULL);
 }
 
 static void __parse_graph_end(void)
@@ -578,10 +578,8 @@ static void __parse_node(void)
   if (__parse_node_label_and_data)
     node->data = __parse_node_label_and_data(node, A_graphxml_node_label,
                                              A_graphxml_node_data);
-  xbt_graph_parse_get_double(&(node->position_x),
-                             A_graphxml_node_position_x);
-  xbt_graph_parse_get_double(&(node->position_y),
-                             A_graphxml_node_position_y);
+  node->position_x = xbt_graph_parse_get_double(A_graphxml_node_position_x);
+  node->position_y = xbt_graph_parse_get_double(A_graphxml_node_position_y);
 
   xbt_dict_set(parsed_nodes, A_graphxml_node_name, (void *) node, NULL);
 }
@@ -599,7 +597,7 @@ static void __parse_edge(void)
     edge->data = __parse_edge_label_and_data(edge, A_graphxml_edge_label,
                                              A_graphxml_edge_data);
 
-  xbt_graph_parse_get_double(&(edge->length), A_graphxml_edge_length);
+  edge->length = xbt_graph_parse_get_double(A_graphxml_edge_length);
 
   XBT_DEBUG("<edge  source=\"%s\" target=\"%s\" length=\"%f\"/>",
          (char *) (edge->src)->data,
@@ -629,8 +627,8 @@ xbt_graph_t xbt_graph_read(const char *filename,
   ETag_graphxml_edge_fun = __parse_edge;
 
   xbt_graph_parse_open(filename);
-  int res;
-  res = (*xbt_graph_parse) ();
+  _XBT_GNUC_UNUSED int res;
+  res = xbt_graph_parse();
   xbt_assert(!res, "Parse error in %s", filename);
   xbt_graph_parse_close();
 
@@ -737,7 +735,7 @@ xbt_graph_t xbt_graph_load (const char *filename)
   file = fopen (filename, "r");
   xbt_assert(file, "Failed to open %s \n", filename);
 
-  xbt_dict_t nodes_dict = xbt_dict_new ();
+  xbt_dict_t nodes_dict = xbt_dict_new_homogeneous(NULL);
   xbt_graph_t ret = xbt_graph_new_graph (0, NULL);
 
   //read the number of nodes
index 59d9895..c3353c3 100644 (file)
@@ -1057,8 +1057,8 @@ char *xbt_graph_parse_text;
  *
  * 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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
+ * FleXML is Copyright (C) 2003-2011 Martin Quinson.  All rights reserved.
+ * (Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp).
  * 
  * There are two, intertwined parts to this program, part A and part B.
  *
@@ -1067,7 +1067,7 @@ char *xbt_graph_parse_text;
  * 
  * 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-2006 Martin Quinson. All rights reserved.
+ * and Copyright (C) 2003-2011 Martin Quinson. All rights reserved.
  *
  * You can redistribute, use, perform, display and/or modify "Part A"
  * provided the following two conditions hold:
@@ -1103,7 +1103,7 @@ char *xbt_graph_parse_text;
 const char rcs_graphxml_flexml_skeleton[] =
  "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
 const char rcs_graphxml_flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
+ "$" "Id: flexml.pl,v 1.67 2011/11/01 20:49:21 mquinson Exp $";
 
 /* ANSI headers. */
 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
@@ -1140,28 +1140,40 @@ extern char *graphxml_bufferstack;
 #define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
 AT_graphxml_node_name AX_graphxml_node_name;
 #define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
+short int graphxml_node_name_isset;
 AT_graphxml_edge_source AX_graphxml_edge_source;
 #define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
+short int graphxml_edge_source_isset;
 AT_graphxml_node_position_y AX_graphxml_node_position_y;
 #define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
+short int graphxml_node_position_y_isset;
 AT_graphxml_node_position_x AX_graphxml_node_position_x;
 #define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
+short int graphxml_node_position_x_isset;
 AT_graphxml_edge_data AX_graphxml_edge_data;
 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
+short int graphxml_edge_data_isset;
 AT_graphxml_edge_target AX_graphxml_edge_target;
 #define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
+short int graphxml_edge_target_isset;
 AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
 #define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
+short int graphxml_graph_isDirected_isset;
 AT_graphxml_node_label AX_graphxml_node_label;
 #define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
+short int graphxml_node_label_isset;
 AT_graphxml_node_data AX_graphxml_node_data;
 #define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
+short int graphxml_node_data_isset;
 AT_graphxml_edge_label AX_graphxml_edge_label;
 #define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
+short int graphxml_edge_label_isset;
 AT_graphxml_edge_length AX_graphxml_edge_length;
 #define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
+short int graphxml_edge_length_isset;
 AT_graphxml_edge_name AX_graphxml_edge_name;
 #define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
+short int graphxml_edge_name_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -1764,6 +1776,7 @@ case 19:
 YY_RULE_SETUP
 {
   AX_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
+  graphxml_graph_isDirected_isset = 0;
   ENTER(AL_graphxml_graph); pushbuffer(0);
   }
        YY_BREAK
@@ -1854,10 +1867,15 @@ case 32:
 YY_RULE_SETUP
 {
   AX_graphxml_node_label = 0;
+  graphxml_node_label_isset = 0;
   AX_graphxml_node_name = 0;
+  graphxml_node_name_isset = 0;
   AX_graphxml_node_data = 0;
+  graphxml_node_data_isset = 0;
   AX_graphxml_node_position_x = 1;
+  graphxml_node_position_x_isset = 0;
   AX_graphxml_node_position_y = 6;
+  graphxml_node_position_y_isset = 0;
   ENTER(AL_graphxml_node); pushbuffer(0);
   }
        YY_BREAK
@@ -1865,52 +1883,52 @@ YY_RULE_SETUP
 case 33:
 /* rule 33 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_node_label);
+if (graphxml_node_label_isset != 0) {FAIL("Multiple definition of attribute label in <graphxml_node>");} graphxml_node_label_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_label);
        YY_BREAK
 case 34:
 /* rule 34 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_node_label);
+if (graphxml_node_label_isset != 0) {FAIL("Multiple definition of attribute label in <graphxml_node>");}  graphxml_node_label_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_label);
        YY_BREAK
 case 35:
 /* rule 35 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_node_name);
+if (graphxml_node_name_isset != 0) {FAIL("Multiple definition of attribute name in <graphxml_node>");} graphxml_node_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_name);
        YY_BREAK
 case 36:
 /* rule 36 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_node_name);
+if (graphxml_node_name_isset != 0) {FAIL("Multiple definition of attribute name in <graphxml_node>");}  graphxml_node_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_name);
        YY_BREAK
 case 37:
 /* rule 37 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_node_data);
+if (graphxml_node_data_isset != 0) {FAIL("Multiple definition of attribute data in <graphxml_node>");} graphxml_node_data_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_data);
        YY_BREAK
 case 38:
 /* rule 38 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_node_data);
+if (graphxml_node_data_isset != 0) {FAIL("Multiple definition of attribute data in <graphxml_node>");}  graphxml_node_data_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_data);
        YY_BREAK
 case 39:
 /* rule 39 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
+if (graphxml_node_position_x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");} graphxml_node_position_x_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
        YY_BREAK
 case 40:
 /* rule 40 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
+if (graphxml_node_position_x_isset != 0) {FAIL("Multiple definition of attribute position_x in <graphxml_node>");}  graphxml_node_position_x_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
        YY_BREAK
 case 41:
 /* rule 41 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
+if (graphxml_node_position_y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");} graphxml_node_position_y_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
        YY_BREAK
 case 42:
 /* rule 42 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
+if (graphxml_node_position_y_isset != 0) {FAIL("Multiple definition of attribute position_y in <graphxml_node>");}  graphxml_node_position_y_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
        YY_BREAK
 case 43:
 YY_RULE_SETUP
@@ -1985,11 +2003,17 @@ case 51:
 YY_RULE_SETUP
 {
   AX_graphxml_edge_label = 0;
+  graphxml_edge_label_isset = 0;
   AX_graphxml_edge_name = 0;
+  graphxml_edge_name_isset = 0;
   AX_graphxml_edge_source = 0;
+  graphxml_edge_source_isset = 0;
   AX_graphxml_edge_target = 0;
+  graphxml_edge_target_isset = 0;
   AX_graphxml_edge_length = 11;
+  graphxml_edge_length_isset = 0;
   AX_graphxml_edge_data = 0;
+  graphxml_edge_data_isset = 0;
   ENTER(AL_graphxml_edge); pushbuffer(0);
   }
        YY_BREAK
@@ -1997,62 +2021,62 @@ YY_RULE_SETUP
 case 52:
 /* rule 52 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_label);
+if (graphxml_edge_label_isset != 0) {FAIL("Multiple definition of attribute label in <graphxml_edge>");} graphxml_edge_label_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_label);
        YY_BREAK
 case 53:
 /* rule 53 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_label);
+if (graphxml_edge_label_isset != 0) {FAIL("Multiple definition of attribute label in <graphxml_edge>");}  graphxml_edge_label_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_label);
        YY_BREAK
 case 54:
 /* rule 54 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_name);
+if (graphxml_edge_name_isset != 0) {FAIL("Multiple definition of attribute name in <graphxml_edge>");} graphxml_edge_name_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_name);
        YY_BREAK
 case 55:
 /* rule 55 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_name);
+if (graphxml_edge_name_isset != 0) {FAIL("Multiple definition of attribute name in <graphxml_edge>");}  graphxml_edge_name_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_name);
        YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_source);
+if (graphxml_edge_source_isset != 0) {FAIL("Multiple definition of attribute source in <graphxml_edge>");} graphxml_edge_source_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_source);
        YY_BREAK
 case 57:
 /* rule 57 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_source);
+if (graphxml_edge_source_isset != 0) {FAIL("Multiple definition of attribute source in <graphxml_edge>");}  graphxml_edge_source_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_source);
        YY_BREAK
 case 58:
 /* rule 58 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_target);
+if (graphxml_edge_target_isset != 0) {FAIL("Multiple definition of attribute target in <graphxml_edge>");} graphxml_edge_target_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_target);
        YY_BREAK
 case 59:
 /* rule 59 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_target);
+if (graphxml_edge_target_isset != 0) {FAIL("Multiple definition of attribute target in <graphxml_edge>");}  graphxml_edge_target_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_target);
        YY_BREAK
 case 60:
 /* rule 60 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_length);
+if (graphxml_edge_length_isset != 0) {FAIL("Multiple definition of attribute length in <graphxml_edge>");} graphxml_edge_length_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_length);
        YY_BREAK
 case 61:
 /* rule 61 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_length);
+if (graphxml_edge_length_isset != 0) {FAIL("Multiple definition of attribute length in <graphxml_edge>");}  graphxml_edge_length_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_length);
        YY_BREAK
 case 62:
 /* rule 62 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_data);
+if (graphxml_edge_data_isset != 0) {FAIL("Multiple definition of attribute data in <graphxml_edge>");} graphxml_edge_data_isset = 1; ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_data);
        YY_BREAK
 case 63:
 /* rule 63 can match eol */
 YY_RULE_SETUP
-ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_data);
+if (graphxml_edge_data_isset != 0) {FAIL("Multiple definition of attribute data in <graphxml_edge>");}  graphxml_edge_data_isset = 1; ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_data);
        YY_BREAK
 case 64:
 YY_RULE_SETUP
diff --git a/src/xbt/graphxml.l b/src/xbt/graphxml.l
deleted file mode 100644 (file)
index d51f926..0000000
+++ /dev/null
@@ -1,722 +0,0 @@
-/* Validating XML processor for src/xbt/graphxml.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-2006 Martin Quinson.  All rights reserved.
- * (Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp).
- * 
- * 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-2006 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.
- * 
- */
-
-%{
-
-/* Version strings. */
-const char rcs_graphxml_flexml_skeleton[] =
- "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
-const char rcs_graphxml_flexml[] =
- "$" "Id: flexml.pl,v 1.62 2007/10/11 10:00:14 mquinson Exp $";
-
-/* ANSI headers. */
-#include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <ctype.h>
-     
-#if defined(_XBT_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
-# ifndef __STRICT_ANSI__
-#  include <io.h>
-#  include <process.h>
-# endif
-#else
-# include <unistd.h>
-#endif
-     
-#ifndef FLEXML_INDEXSTACKSIZE
-#define FLEXML_INDEXSTACKSIZE 1000
-#endif
-
-/* Generated definitions. */
-#define FLEXML_yylineno
-#ifndef FLEXML_BUFFERSTACKSIZE
-#define FLEXML_BUFFERSTACKSIZE 1000000
-#endif
-#define FLEXML_NEED_BUFFERLIT
-
-/* XML processor api. */
-/* FleXML-provided data. */
-int graphxml_pcdata_ix;
-extern char *graphxml_bufferstack;
-#define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
-AT_graphxml_node_name AX_graphxml_node_name;
-#define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
-AT_graphxml_edge_source AX_graphxml_edge_source;
-#define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
-AT_graphxml_node_position_y AX_graphxml_node_position_y;
-#define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
-AT_graphxml_node_position_x AX_graphxml_node_position_x;
-#define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
-AT_graphxml_edge_data AX_graphxml_edge_data;
-#define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
-AT_graphxml_edge_target AX_graphxml_edge_target;
-#define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
-AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
-#define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
-AT_graphxml_node_label AX_graphxml_node_label;
-#define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
-AT_graphxml_node_data AX_graphxml_node_data;
-#define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
-AT_graphxml_edge_label AX_graphxml_edge_label;
-#define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
-AT_graphxml_edge_length AX_graphxml_edge_length;
-#define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
-AT_graphxml_edge_name AX_graphxml_edge_name;
-#define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
-
-/* XML state. */
-#ifdef FLEX_DEBUG
-# define ENTER(state)  debug_enter(state,#state)
-# define LEAVE         debug_leave()
-# define SET(state)    debug_set(state,#state)
-  static void debug_enter(int, const char*);
-  static void debug_leave(void);
-  static void debug_set(int, const char*);
-#else
-# define ENTER(state)  (yy_push_state(state))
-# define LEAVE         (yy_pop_state())
-# define SET(state)    BEGIN(state)
-#endif
-
-/* Generic actions. */
-#define SKIP   /*skip*/
-#define SUCCEED        CLEANUP; return 0
-
-#define FAIL   return fail
-static int fail(const char*, ...);
-
-enum {flexml_max_err_msg_size = 512};
-static char flexml_err_msg[flexml_max_err_msg_size];
-const char * graphxml_parse_err_msg()
-{
-    return flexml_err_msg;
-}
-static void reset_graphxml_parse_err_msg()
-{
-    flexml_err_msg[0] = '\0';
-}
-
-/* Cleanup */
-static void cleanup(void);
-#define CLEANUP  cleanup()
-
-/* Text buffer stack handling. */
-char *graphxml_bufferstack = NULL;
-static int blimit = FLEXML_BUFFERSTACKSIZE;
-static int bnext = 1;
-
-static int *indexstack = NULL;
-static int ilimit = FLEXML_INDEXSTACKSIZE;
-static int inext = 1;
-
-#define BUFFERSET(P)  (P = bnext)
-#define BUFFERPUTC(C) (ck_blimit(), graphxml_bufferstack[bnext++] = (C))
-#define BUFFERDONE    (BUFFERPUTC('\0'))
-
-#define BUFFERLITERAL(C, P) graphxml_bufferliteral(C, &(P), yytext)
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_blimit()
-{
-     if (bnext >= blimit) {
-        blimit += FLEXML_BUFFERSTACKSIZE + 2;
-        {
-            char *temp = (char *) realloc(graphxml_bufferstack, blimit);
-            assert(temp);
-            graphxml_bufferstack = temp;
-        }
-     }
-     return 0;
-}
-
-/* after this is called, there are at least 2 slots left in the stack */
-static int ck_ilimit()
-{
-     if (inext >= ilimit) {
-        ilimit += FLEXML_INDEXSTACKSIZE + 2;
-        {
-            int *temp = (int *) realloc(indexstack, ilimit);
-            assert(temp);
-            indexstack = temp;
-        }
-     }
-     return 0;
-}
-
-#ifdef FLEXML_NEED_BUFFERLIT
-static void graphxml_bufferliteral(char c, int* pp, const char* text)
-{
-  const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
-  assert(s <= e); BUFFERSET(*pp);
-  while (++s<e) {
-    if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
-    else BUFFERPUTC(*s);
-  }
-  BUFFERDONE;
-}
-#endif
-
-static void pushbuffer(int p)
-{
-    ck_ilimit();
-    indexstack[inext++] = p;
-    indexstack[inext++] = bnext;    
-}
-
-static int popbuffer(void)
-{
-    assert(inext >= 2);
-    bnext = indexstack[--inext];
-    return indexstack[--inext];
-}
-
-/* General internal entities are `unput' back onto the input stream... */
-#define ENTITYTEXT(T) \
-  { char *s = (T), *e = s+strlen(s);\
-    while (--e >= s) { unput(*e); }}
-
-
-%}
-
-/* Flex standard options. */
-%option stack
-%option noyy_top_state
-%option noinput
-%option noreject
-%option noyymore
-%option noyywrap
-
-/* Flex user-requested options. */
-%option yylineno
-%option nounput
-
-/* XML character classes (currently restricted to ASCII). */
-
-/* "Common syntactic structures." */
-S              [ \t\n\r\f]+
-s              [ \t\n\r\f]*
-
-/* "Names and Tokens." */
-NameChar       [A-Za-z0-9.:_-]
-Name           [A-Za-z_:]{NameChar}*
-Names          {Name}({S}{Name})*
-Nmtoken                ({NameChar})+
-Nmtokens       {Nmtoken}({S}{Nmtoken})*
-
-/* Miscellaneous. */
-VersionNum     [a-zA-Z0-9_.:-]+
-Eq             {s}"="{s}
-Literal                \'[^'']*\'|\"[^""]*\"
-
-/* Parser states (flex `exclusive start conditions'):
- *
- * PROLOG      the XML prolog of the document before <?xml...>
- * DOCTYPE     the XML prolog of the document after <?xml...>
- * EPILOG      after the root element
- * INCOMMENT   inside an XML comment <!--....-->
- * INPI                inside an XML PI <?...?>
- * VALUE1      inside a '...'-delimited literal
- * VALUE2      inside a "..."-delimited literal
- * CDATA       inside a <![CDATA[...] ]> section.
- * ROOT_<tag>  expect root element <tag>
- * AL_<tag>    inside the attribute list for <tag>
- * IN_<tag>    inside a <tag> with element contents (ready for end tag)
- * IMPOSSIBLE  dummy to permit disabling rules; must be last
- */
-%x PROLOG DOCTYPE EPILOG INCOMMENT INPI VALUE1 VALUE2 CDATA
-%x ROOT_graphxml_graph AL_graphxml_graph S_graphxml_graph S_graphxml_graph_1 S_graphxml_graph_2 S_graphxml_graph_3 S_graphxml_graph_4 S_graphxml_graph_5 E_graphxml_graph
-%x ROOT_graphxml_node AL_graphxml_node E_graphxml_node
-%x ROOT_graphxml_edge AL_graphxml_edge E_graphxml_edge
-%x IMPOSSIBLE
-
-%{
-/* State names. */
-const char* *graphxml_statenames=NULL;
-%}
-
-%%
-
- /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
- SET(PROLOG);
- reset_graphxml_parse_err_msg();
- graphxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
- assert(graphxml_bufferstack);
- #ifdef FLEX_DEBUG
- {
-     int i;
-     for (i = 0; i < blimit; i++) {
-         graphxml_bufferstack[i] = '\377';
-     }
- }
- #endif
- graphxml_bufferstack[0] = '\0';
- indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
- assert(indexstack);
- indexstack[0] = 0;
-
-  /* FleXML_init */
-  bnext = inext = 1;
-  graphxml_bufferliteral('\0', &bnext, "-1.0");
-  graphxml_bufferliteral('\0', &bnext, "-1.0");
-  graphxml_bufferliteral('\0', &bnext, "-1.0");
-  if(!graphxml_statenames) {graphxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
-  graphxml_statenames[PROLOG] = NULL;
-  graphxml_statenames[DOCTYPE] = NULL;
-  graphxml_statenames[EPILOG] = NULL;
-  graphxml_statenames[INCOMMENT] = NULL;
-  graphxml_statenames[INPI] = NULL;
-  graphxml_statenames[VALUE1] = NULL;
-  graphxml_statenames[VALUE2] = NULL;
-  graphxml_statenames[CDATA] = NULL;
-  graphxml_statenames[ROOT_graphxml_graph] = NULL;
-  graphxml_statenames[AL_graphxml_graph] = NULL;
-  graphxml_statenames[S_graphxml_graph] = "graph";
-  graphxml_statenames[S_graphxml_graph_1] = "graph";
-  graphxml_statenames[S_graphxml_graph_2] = "graph";
-  graphxml_statenames[S_graphxml_graph_3] = "graph";
-  graphxml_statenames[S_graphxml_graph_4] = "graph";
-  graphxml_statenames[S_graphxml_graph_5] = "graph";
-  graphxml_statenames[E_graphxml_graph] = "graph";
-  graphxml_statenames[ROOT_graphxml_node] = NULL;
-  graphxml_statenames[AL_graphxml_node] = NULL;
-  graphxml_statenames[E_graphxml_node] = "node";
-  graphxml_statenames[ROOT_graphxml_edge] = NULL;
-  graphxml_statenames[AL_graphxml_edge] = NULL;
-  graphxml_statenames[E_graphxml_edge] = "edge";
-  }
-
- /* COMMENTS and PIs: handled uniformly for efficiency. */
-
-<ROOT_graphxml_graph,AL_graphxml_graph,S_graphxml_graph,S_graphxml_graph_1,S_graphxml_graph_2,S_graphxml_graph_3,S_graphxml_graph_4,S_graphxml_graph_5,E_graphxml_graph,ROOT_graphxml_node,AL_graphxml_node,E_graphxml_node,ROOT_graphxml_edge,AL_graphxml_edge,E_graphxml_edge,PROLOG,DOCTYPE,EPILOG>{
- "<!--" ENTER(INCOMMENT);
- "<?" ENTER(INPI);
-}
-<INCOMMENT>{
- "-->"         LEAVE;
- "--"          |
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in comment.");
-}
-<INPI>{
- "?>"          LEAVE;
- .             |
- \n            SKIP;
- <<EOF>>       FAIL("EOF in PI (processing instruction).");
-}
-
- /* SPACES: skipped uniformly */
-
-<ROOT_graphxml_graph,AL_graphxml_graph,S_graphxml_graph,S_graphxml_graph_1,S_graphxml_graph_2,S_graphxml_graph_3,S_graphxml_graph_4,S_graphxml_graph_5,E_graphxml_graph,ROOT_graphxml_node,AL_graphxml_node,E_graphxml_node,ROOT_graphxml_edge,AL_graphxml_edge,E_graphxml_edge,PROLOG,DOCTYPE,EPILOG>{S} SKIP;
-
- /* PROLOG: determine root element and process it. */
-
-<PROLOG>{
- "<?xml"({S}version{Eq}(\'{VersionNum}\'|\"{VersionNum}\"))?({S}encoding{Eq}(\'[^']*\'|\"[^"]*\"))?"?>" SET(DOCTYPE); 
- "<?xml"[^>]*">" FAIL("Bad declaration %s.",yytext);
-}
-
-<PROLOG,DOCTYPE>{
- "<!DOCTYPE"{S}"edge"{S}SYSTEM{S}("'graphxml.dtd'"|"\"graphxml.dtd\""){s}">" SET(ROOT_graphxml_edge);
- "<!DOCTYPE"{S}"node"{S}SYSTEM{S}("'graphxml.dtd'"|"\"graphxml.dtd\""){s}">" SET(ROOT_graphxml_node);
- "<!DOCTYPE"{S}"graph"{S}SYSTEM{S}("'graphxml.dtd'"|"\"graphxml.dtd\""){s}">" SET(ROOT_graphxml_graph);
- "<!"[^>-][^>]*">" FAIL("Bad declaration %s.",yytext);
- .             FAIL("Unexpected character `%c' in prolog.", yytext[0]);
- <<EOF>>       FAIL("EOF in prolog.");
-}
-
- /* RULES DERIVED FROM DTD. */
-
- /* <!-- Small DTD for xbt graphs. -->  */
-
- /*     isDirected (true|false) "true"
-  * >  */
-
-<S_graphxml_graph,S_graphxml_graph_3,S_graphxml_graph_1,S_graphxml_graph_5,S_graphxml_graph_2,S_graphxml_graph_4,E_graphxml_graph>"<graph"{s} FAIL("Starting tag <graph> is not allowed here.");
-
-<ROOT_graphxml_graph>"<graph"{s} {
-  AX_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
-  ENTER(AL_graphxml_graph); pushbuffer(0);
-  }
-
-<AL_graphxml_graph>{
- "isDirected"{Eq}"'true'" |
- "isDirected"{Eq}"\"true\"" A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
- "isDirected"{Eq}"'false'" |
- "isDirected"{Eq}"\"false\"" A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_false;
-
- ">" {
-  LEAVE; STag_graphxml_graph();graphxml_pcdata_ix = 0; ENTER(S_graphxml_graph);
- }
- "/>" {
-  LEAVE; STag_graphxml_graph(); graphxml_pcdata_ix = 0; ETag_graphxml_graph(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_graphxml_graph: SET(EPILOG); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of graph element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `graph' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `graph' element.");
-}
-
-<S_graphxml_graph_1,E_graphxml_graph,S_graphxml_graph_3,S_graphxml_graph_5,S_graphxml_graph>{
- "</graph"{s}">" {
-  LEAVE;
-  ETag_graphxml_graph();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case ROOT_graphxml_graph: SET(EPILOG); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</graph>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</graph>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</graph>' expected.");
-}
-
- /*     label           CDATA                ""
-  *     name            CDATA                #REQUIRED
-  *     data            CDATA                ""
-  *     position_x         CDATA                "-1.0"
-  *     position_y         CDATA                "-1.0"
-  * >  */
-
-<S_graphxml_graph_1,S_graphxml_graph_5,S_graphxml_graph_4,E_graphxml_graph>"<node"{s} FAIL("Starting tag <node> is not allowed here.");
-
-<ROOT_graphxml_node,S_graphxml_graph_2,S_graphxml_graph_3,S_graphxml_graph>"<node"{s} {
-  AX_graphxml_node_label = 0;
-  AX_graphxml_node_name = 0;
-  AX_graphxml_node_data = 0;
-  AX_graphxml_node_position_x = 1;
-  AX_graphxml_node_position_y = 6;
-  ENTER(AL_graphxml_node); pushbuffer(0);
-  }
-
-<AL_graphxml_node>{
- "label"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_node_label);
- "label"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_node_label);
-
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_node_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_node_name);
-
- "data"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_node_data);
- "data"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_node_data);
-
- "position_x"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
- "position_x"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
-
- "position_y"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
- "position_y"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
-
- ">" {
-  if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
-  LEAVE; STag_graphxml_node();graphxml_pcdata_ix = 0; ENTER(E_graphxml_node);
- }
- "/>" {
-  if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
-  LEAVE; STag_graphxml_node(); graphxml_pcdata_ix = 0; ETag_graphxml_node(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
-   case ROOT_graphxml_node: SET(EPILOG); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of node element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `node' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `node' element.");
-}
-
-<E_graphxml_node>{
- "</node"{s}">" {
-  LEAVE;
-  ETag_graphxml_node();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
-   case ROOT_graphxml_node: SET(EPILOG); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</node>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</node>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</node>' expected.");
-}
-
- /*     label           CDATA                ""
-  *     name            CDATA               #IMPLIED
-  *     source          CDATA               #REQUIRED
-  *     target          CDATA               #REQUIRED
-  *     length          CDATA               "-1.0"
-  *     data            CDATA               ""
-  * >  */
-
-<E_graphxml_graph,S_graphxml_graph_2>"<edge"{s} FAIL("Starting tag <edge> is not allowed here.");
-
-<ROOT_graphxml_edge,S_graphxml_graph_1,S_graphxml_graph_3,S_graphxml_graph_5,S_graphxml_graph_4,S_graphxml_graph>"<edge"{s} {
-  AX_graphxml_edge_label = 0;
-  AX_graphxml_edge_name = 0;
-  AX_graphxml_edge_source = 0;
-  AX_graphxml_edge_target = 0;
-  AX_graphxml_edge_length = 11;
-  AX_graphxml_edge_data = 0;
-  ENTER(AL_graphxml_edge); pushbuffer(0);
-  }
-
-<AL_graphxml_edge>{
- "label"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_label);
- "label"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_label);
-
- "name"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_name);
- "name"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_name);
-
- "source"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_source);
- "source"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_source);
-
- "target"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_target);
- "target"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_target);
-
- "length"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_length);
- "length"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_length);
-
- "data"{Eq}\' ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_data);
- "data"{Eq}\" ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_data);
-
- ">" {
-  if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
-  if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
-  LEAVE; STag_graphxml_edge();graphxml_pcdata_ix = 0; ENTER(E_graphxml_edge);
- }
- "/>" {
-  if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
-  if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
-  LEAVE; STag_graphxml_edge(); graphxml_pcdata_ix = 0; ETag_graphxml_edge(); popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
-   case ROOT_graphxml_edge: SET(EPILOG); break;
-  }
- }
- .       FAIL("Unexpected character `%c' in attribute list of edge element.", yytext[0]);
- {Name} FAIL("Bad attribute `%s' in `edge' element start tag.",yytext);
- <<EOF>> FAIL("EOF in attribute list of `edge' element.");
-}
-
-<E_graphxml_edge>{
- "</edge"{s}">" {
-  LEAVE;
-  ETag_graphxml_edge();
-  popbuffer(); /* attribute */
-  switch (YY_START) {
-   case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
-   case ROOT_graphxml_edge: SET(EPILOG); break;
-  }
- }
- "</"{Name}{s}">" FAIL("Unexpected end-tag `%s': `</edge>' expected.",yytext);
- .       FAIL("Unexpected character `%c': `</edge>' expected.",yytext[0]);
- <<EOF>> FAIL("Premature EOF: `</edge>' expected.");
-}
-
- /* EPILOG: after the root element. */
-
-<EPILOG>{
- . {SET(PROLOG); yyless(0); CLEANUP; return -1;}
- <<EOF>>       SUCCEED;
-}
-
- /* CHARACTER DATA. */
-
-<IMPOSSIBLE,VALUE1,VALUE2>{
- /* Non-defined standard entities... */
-"&amp;"  BUFFERPUTC('&');
-"&lt;"   BUFFERPUTC('<');
-"&gt;"   BUFFERPUTC('>');
-"&apos;" BUFFERPUTC('\'');
-"&quot;" BUFFERPUTC('"');
-
- /* Character entities. */
- "&#"[[:digit:]]+";"   BUFFERPUTC((unsigned char)atoi(yytext+2));
- "&#x"[[:xdigit:]]+";" BUFFERPUTC((unsigned char)strtol(yytext+3,NULL,16));
-}
-
-<IMPOSSIBLE,VALUE1,VALUE2,CDATA>{
- "\n"          |
- "\r"          |
- "\r\n"                |
- "\n\r"                BUFFERPUTC('\n');
-}
-
-<IMPOSSIBLE>{
- "<![CDATA["   ENTER(CDATA);
- "]""]>"               FAIL("Unexpected `]""]>' in character data.");
-}
-
-<VALUE1>{
- \'            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (\"'\" expected).");
-}
-
-<VALUE2>{
- \"            BUFFERDONE; LEAVE;
- <<EOF>>       FAIL("EOF in literal (`\"' expected).");
-}
-
-<IMPOSSIBLE,VALUE1,VALUE2>{
- [^<&]         BUFFERPUTC(yytext[0]);
- [<&]          FAIL("Spurious `%c' in character data.",yytext[0]);
-}
-
-<CDATA>{
- "]""]>"               LEAVE;
- /* "]""]"             BUFFERPUTC(yytext[0]); BUFFERPUTC(yytext[1]); */
- .             BUFFERPUTC(yytext[0]);
- <<EOF>>       FAIL("EOF in CDATA section.");
-}
-
- /* Impossible rules to avoid warnings from flex(1). */
- /* Ideally, this should be replaced by code in flexml.pl that
-    generates just the states not covered by other rules. */
-<*>{
- .|[\n] FAIL("Syntax error on character `%c'.", yytext[0]);
-}
-
-%%
-
-/* Element context stack lookup. */
-int graphxml_element_context(int i)
-{
-  return (0<i && i<yy_start_stack_depth
-         ? yy_start_stack[yy_start_stack_ptr - i]
-         : 0);
-}
-
-#ifdef FLEX_DEBUG
-void print_yy_stack(char* fmt, ...)
-{
-  int i = 0; va_list ap; va_start(ap, fmt);
-  vfprintf(stderr, fmt, ap);
-  if (graphxml_statenames) {
-      for (i=1; i<yy_start_stack_ptr; i++) {
-          fprintf(stderr, "%s/", graphxml_statenames[yy_start_stack[i] ]);
-      }
-      fprintf(stderr,"%s\n", graphxml_statenames[YY_START]);
-  }
-  va_end(ap);
-}
-
-void print_graphxml_bufferstack()
-{
-    int i;
-    fputs("Buffer: ", stderr);
-    for (i = 0; i < blimit; i++) {
-       if ( graphxml_bufferstack[i] == '\377' ) break;
-         putc(graphxml_bufferstack[i], stderr);
-    }
-    putc('\n', stderr);
-}
-
-static void debug_enter(int state, const char* statename) {
-  yy_push_state(state);
-  if (yy_flex_debug) {
-       print_yy_stack("--ENTER(%s) : ",statename);
-       print_graphxml_bufferstack();
-  }
-}
-
-static void debug_leave(void) {
-    if (yy_flex_debug) {
-        print_yy_stack("--LEAVE : ");
-       print_graphxml_bufferstack();
-    }
-  yy_pop_state();
-}
-
-static void debug_set(int state, const char* statename) {
-  BEGIN(state);
-  if (yy_flex_debug) print_yy_stack("--SET(%s) : ",statename);
-}
-#endif
-
-
-static void cleanup(void)
-{
-    if (graphxml_statenames) {
-        free(graphxml_statenames);
-       graphxml_statenames = NULL;
-    }
-    free(graphxml_bufferstack);
-    graphxml_bufferstack = NULL;
-
-    free(indexstack);
-    indexstack = NULL;
-}
-
-
-static int fail(const char* fmt, ...)
-{
-    int chars_left, used;
-    va_list ap; va_start(ap, fmt);
-#ifdef FLEXML_yylineno
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (XML input line %d, state %d): ",
-                  yylineno, YY_START);
-#else
-    used = sprintf(flexml_err_msg,
-                  "Invalid XML (state %d): ",
-                  YY_START);
-#endif
-    chars_left = flexml_max_err_msg_size - used - 1;
-    vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
-    va_end(ap);
-
-#ifndef FLEXML_quiet_parser
-    /* print directly to sdterr */
-    fprintf(stderr, "%s\n", flexml_err_msg);
-    flexml_err_msg[0] = '\0';
-#endif
-
-    cleanup();
-
-    return 1;
-}
index 34ada6c..3edfa48 100644 (file)
@@ -48,34 +48,34 @@ void xbt_graph_parse_reset_parser(void)
 
 void STag_graphxml_graph(void)
 {
-  (*STag_graphxml_graph_fun) ();
+  STag_graphxml_graph_fun();
 }
 
 void ETag_graphxml_graph(void)
 {
-  (*ETag_graphxml_graph_fun) ();
+  ETag_graphxml_graph_fun();
 }
 
 
 void STag_graphxml_node(void)
 {
-  (*STag_graphxml_node_fun) ();
+  STag_graphxml_node_fun();
 }
 
 void ETag_graphxml_node(void)
 {
-  (*ETag_graphxml_node_fun) ();
+  ETag_graphxml_node_fun();
 }
 
 
 void STag_graphxml_edge(void)
 {
-  (*STag_graphxml_edge_fun) ();
+  STag_graphxml_edge_fun();
 }
 
 void ETag_graphxml_edge(void)
 {
-  (*ETag_graphxml_edge_fun) ();
+  ETag_graphxml_edge_fun();
 }
 
 
@@ -103,10 +103,8 @@ void xbt_graph_parse_open(const char *file)
 
 void xbt_graph_parse_close(void)
 {
-  if (xbt_graph_input_buffer_stack)
-    xbt_dynar_free(&xbt_graph_input_buffer_stack);
-  if (xbt_graph_file_to_parse_stack)
-    xbt_dynar_free(&xbt_graph_file_to_parse_stack);
+  xbt_dynar_free(&xbt_graph_input_buffer_stack);
+  xbt_dynar_free(&xbt_graph_file_to_parse_stack);
 
   if (xbt_graph_file_to_parse) {
     xbt_graph_parse__delete_buffer(xbt_graph_input_buffer);
@@ -122,11 +120,13 @@ static int _xbt_graph_parse(void)
 
 int_f_void_t xbt_graph_parse = _xbt_graph_parse;
 
-void xbt_graph_parse_get_double(double *value, const char *string)
+double xbt_graph_parse_get_double(const char *string)
 {
-  int ret = 0;
+  double result;
+  _XBT_GNUC_UNUSED int ret = 0;
 
-  ret = sscanf(string, "%lg", value);
+  ret = sscanf(string, "%lg", &result);
   xbt_assert((ret == 1), "Parse error line %d : %s not a number",
               xbt_graph_parse_lineno, string);
+  return result;
 }
index 71a87a0..a91e006 100644 (file)
@@ -61,7 +61,7 @@ void xbt_heap_free(xbt_heap_t H)
   int i;
   if (H->free)
     for (i = 0; i < H->count; i++)
-      (*(H->free)) (H->items[i].content);
+      H->free(H->items[i].content);
   free(H->items);
   free(H);
   return;
index c0330c7..cd2b6a8 100644 (file)
@@ -18,7 +18,7 @@ typedef struct xbt_heap_item {
 typedef struct xbt_heap {
   int size;
   int count;
-  xbt_heap_item_t items;
+  s_xbt_heap_item_t* items; /* array of structs */
   void_f_pvoid_t free;
   void (*update_callback) (void *, int);
 } s_xbt_heap_t;
index 66dc889..163c0de 100644 (file)
-/*
- * lib.c
- *
- *  Created on: 16 mars 2011
- *      Author: navarrop
- */
+/* lib - a generic library, variation over dictionary                    */
 
-#include <string.h>
-#include <stdio.h>
-#include "xbt/misc.h"           /* SG_BEGIN_DECL */
-#include "xbt/mallocator.h"
-#include "xbt/ex.h"
-#include "xbt/log.h"
-#include "xbt_modinter.h"
-#include "xbt/lib.h"
+/* Copyright (c) 2011. The SimGrid Team.
+ * All rights reserved.                                                     */
 
-#define DJB2_HASH_FUNCTION
-//#define FNV_HASH_FUNCTION
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_lib, xbt,
-                                "Libraries provide the same functionalities than hash tables");
-
-/*####[ Private prototypes ]#################################################*/
-static void *lib_mallocator_new_f(void);
-static void lib_mallocator_free_f(void *dict);
-static void lib_mallocator_reset_f(void *dict);
-
-static void xbt_lib_set_ext(xbt_lib_t lib,const char *key,
-                            int key_len, int level, void *data);
-
-static unsigned int xbt_lib_hash_ext(const char *str,
-                                                 int str_len);
-static unsigned int xbt_lib_hash(const char *str);
-static void xbt_lib_rehash(xbt_lib_t lib);
+/* 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 <xbt/sysdep.h>
+#include <xbt/log.h>
+#include <xbt/lib.h>
 
-static xbt_lib_cursor_t xbt_lib_cursor_new(const xbt_lib_t lib);
-static void xbt_lib_cursor_rewind(xbt_lib_cursor_t cursor);
-static void xbt_lib_cursor_free(xbt_lib_cursor_t * cursor);
-
-/*####[ Code ]###############################################################*/
-
-unsigned int xbt_lib_size(xbt_lib_t lib)
-{
-  return (lib ? (unsigned int) lib->count : (unsigned int) 0);
-}
-
-static xbt_libelm_t xbt_libelm_new(const char *key,
-                              int key_len,
-                              unsigned int hash_code,
-                              void *content,int level, int level_numbers)
-{
-  xbt_libelm_t element = xbt_malloc0(sizeof (s_xbt_libelm_t) + sizeof(void *)*(level_numbers-1));
-
-  element->key = xbt_new(char, key_len + 1);
-  memcpy((void *) element->key, (void *) key, key_len);
-  element->key[key_len] = '\0';
-
-  element->key_len = key_len;
-  element->hash_code = hash_code;
-
-  (&(element->content))[level] = content;
-  element->next = NULL;
-
-  return element;
-}
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_lib, xbt,
+                                "A dict with keys of type (name, level)");
 
 xbt_lib_t xbt_lib_new(void)
 {
   xbt_lib_t lib;
-  lib = xbt_new0(s_xbt_lib_t, 1);
-  lib->table_size = 127;
-  lib->table = xbt_new0(xbt_libelm_t, lib->table_size + 1);
-  lib->count = 0;
-  lib->fill = 0;
+  lib = xbt_new(s_xbt_lib_t, 1);
+  lib->dict = xbt_dict_new_homogeneous(xbt_free);
   lib->levels = 0;
   lib->free_f = NULL;
-
   return lib;
 }
 
-void xbt_lib_free(xbt_lib_t * lib)
+void xbt_lib_free(xbt_lib_t *plib)
 {
-  int i,j;
-  xbt_libelm_t current, previous;
-  int table_size;
-  xbt_libelm_t *table;
-  xbt_lib_t l = *lib;
-
-  if (l) {
-    table_size = l->table_size;
-    table = l->table;
-
-    for (i = 0; l->count && i <= table_size; i++) {
-      current = table[i];
-      while (current != NULL) {
-                       previous = current;
-                       current = current->next;
-                       xbt_free(previous->key);
-                       for(j=0; j< l->levels; j++)
-                         if((&(previous->content))[j])
-                                 l->free_f[j]( (&(previous->content))[j]);
-               xbt_free(previous);
-                       l->count--;
-      }
+  xbt_lib_t lib = *plib;
+  if (lib) {
+    xbt_dict_cursor_t cursor;
+    char *key;
+    void **elts;
+    xbt_dict_foreach (lib->dict, cursor, key, elts) {
+      int i;
+      for (i = 0 ; i < lib->levels ; i++)
+        if (elts[i])
+          lib->free_f[i](elts[i]);
     }
-    xbt_free(table);
-    xbt_free(l->free_f);
-    xbt_free(l);
-    l = NULL;
+    xbt_dict_free(&lib->dict);
+    xbt_free(lib->free_f);
+    xbt_free(lib);
+    *plib = NULL;
   }
 }
 
 int xbt_lib_add_level(xbt_lib_t lib, void_f_pvoid_t free_f)
 {
-       XBT_DEBUG("xbt_lib_add_level");
-
-       lib->free_f = realloc(lib->free_f,sizeof(void_f_pvoid_t)*(lib->levels+1));
-       lib->free_f[lib->levels]=free_f;
-       return lib->levels++;
-}
-
-void xbt_lib_set(xbt_lib_t lib, const char *name, int level, void *obj)
-{
-       XBT_DEBUG("xbt_lib_set key '%s' with object '%p'",name,obj);
-       xbt_lib_set_ext(lib, name, strlen(name),level, obj);
-}
-
-void *xbt_lib_get_or_null(xbt_lib_t lib, const char *key, int level)
-{
-       unsigned int hash_code = xbt_lib_hash(key);
-       xbt_libelm_t current;
-
-       if(!lib) xbt_die("Lib is NULL!");
-
-       current = lib->table[hash_code & lib->table_size];
-       while (current != NULL &&
-                (hash_code != current->hash_code || strcmp(key, current->key)))
-       current = current->next;
-
-       if (current == NULL)
-       return NULL;
-
-       return (&(current->content))[level];
+  XBT_DEBUG("xbt_lib_add_level");
+  xbt_assert(xbt_dict_is_empty(lib->dict),
+             "Lib is not empty, cannot add a level");
+  lib->free_f = xbt_realloc(lib->free_f,
+                            sizeof(void_f_pvoid_t) * (lib->levels + 1));
+  lib->free_f[lib->levels] = free_f;
+  return lib->levels++;
 }
 
-static void *lib_mallocator_new_f(void)
+void xbt_lib_set(xbt_lib_t lib, const char *key, int level, void *obj)
 {
-  return xbt_new(s_xbt_lib_t, 1);
-}
-
-static void lib_mallocator_free_f(void *lib)
-{
-  xbt_free(lib);
-}
-
-static void lib_mallocator_reset_f(void *lib)
-{
-  /* nothing to do because all fields are
-   * initialized in xbt_dict_new
-   */
-}
-
-void xbt_lib_reset(xbt_lib_t *lib)
-{
-  XBT_DEBUG("xbt_lib_reset");
-  int i,j;
-  xbt_libelm_t current, next;
-  xbt_lib_t l = *lib;
-  int levels = l->levels;
-  if(!l) xbt_die("Lib is NULL!");
-
-  if (l->count == 0)
-    return;
-
-  for (i = 0; i <= l->table_size; i++) {
-    current = l->table[i];
-    while (current) {
-       next = current->next;
-       xbt_free(current->key);
-       for(j=0; j< levels; j++)
-               if((&(current->content))[j] && (l->free_f[j]))
-                       l->free_f[j]((&(current->content))[j]);
-       xbt_free(current);
-       current = next;
-    }
-    l->table[i] = NULL;
-  }
-  xbt_free(l->free_f);
-  l->count = 0;
-  l->fill = 0;
-  l->levels = 0;
-  l->free_f = NULL;
-}
-
-int xbt_lib_length(xbt_lib_t lib)
-{
-  if(!lib) xbt_die("Lib is NULL!");
-  return lib->count;
-}
-
-static void xbt_lib_set_ext(xbt_lib_t lib,
-                            const char *key,
-                            int key_len,
-                            int level,
-                            void *data)
-{
-
-  unsigned int hash_code = xbt_lib_hash_ext(key, key_len);
-
-  xbt_libelm_t current, previous = NULL;
-  if(!lib) xbt_die("Lib is NULL!");
-
-  XBT_DEBUG("ADD '%.*s' hash = '%d', size = '%d', & = '%d' to level : %d",
-                 key_len,
-                 key,
-                 hash_code,
-          lib->table_size,
-          hash_code & lib->table_size,
-          level);
-
-  current = lib->table[hash_code & lib->table_size];
-  while (current != NULL &&
-         (hash_code != current->hash_code || key_len != current->key_len
-          || memcmp(key, current->key, key_len))) {
-    previous = current;
-    current = current->next;
+  XBT_DEBUG("xbt_lib_set key '%s:%d' with object %p", key, level, obj);
+  void **elts = xbt_dict_get_or_null(lib->dict, key);
+  if (!elts) {
+    elts = xbt_new0(void *, lib->levels);
+    xbt_dict_set(lib->dict, key, elts, NULL);
   }
-
-  if (current == NULL) {/* this key doesn't exist yet */
-               current = xbt_libelm_new(key, key_len, hash_code, data,level,lib->levels);
-               lib->count++;
-               if (previous == NULL) {
-               lib->table[hash_code & lib->table_size] = current;
-               lib->fill++;
-               if ((lib->fill * 100) / (lib->table_size + 1) > MAX_FILL_PERCENT)
-                 xbt_lib_rehash(lib);
-               } else {
-               previous->next = current;
-               }
+  if (elts[level]) {
+    XBT_DEBUG("Replace %p by %p element under key '%s:%d'",
+              elts[level], obj, key, level);
+    lib->free_f[level](elts[level]);
   }
-  else
-         if( (&(current->content))[level] == NULL )/* this key exist but level is empty */
-         {
-                 (&(current->content))[level] = data;
-         }
-         else
-         {/* there is already an element with the same key: overwrite it */
-                       XBT_DEBUG("Replace %.*s by %.*s under key %.*s",
-                                  key_len, (char *) (&(current->content))[level],
-                                  key_len, (char *) data, key_len, (char *) key);
-                       if (current->content != NULL) {
-                         free((&(current->content))[level]);
-                       }
-                       (&(current->content))[level] = data;
-         }
+  elts[level] = obj;
 }
 
-/**
- * Returns the hash code of a string.
- */
-static unsigned int xbt_lib_hash_ext(const char *str,
-                                                 int str_len)
-{
-
-
-#ifdef DJB2_HASH_FUNCTION
-  /* fast implementation of djb2 algorithm */
-  int c;
-  register unsigned int hash = 5381;
-
-  while (str_len--) {
-    c = *str++;
-    hash = ((hash << 5) + hash) + c;    /* hash * 33 + c */
-  }
-# elif defined(FNV_HASH_FUNCTION)
-  register unsigned int hash = 0x811c9dc5;
-  unsigned char *bp = (unsigned char *) str;    /* start of buffer */
-  unsigned char *be = bp + str_len;     /* beyond end of buffer */
-
-  while (bp < be) {
-    /* multiply by the 32 bit FNV magic prime mod 2^32 */
-    hash +=
-        (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) +
-        (hash << 24);
-
-    /* xor the bottom with the current octet */
-    hash ^= (unsigned int) *bp++;
-  }
-
-# else
-  register unsigned int hash = 0;
-
-  while (str_len--) {
-    hash += (*str) * (*str);
-    str++;
-  }
-#endif
-
-  return hash;
-}
-
-static unsigned int xbt_lib_hash(const char *str)
-{
-#ifdef DJB2_HASH_FUNCTION
-  /* fast implementation of djb2 algorithm */
-  int c;
-  register unsigned int hash = 5381;
-
-  while ((c = *str++)) {
-    hash = ((hash << 5) + hash) + c;    /* hash * 33 + c */
-  }
-
-# elif defined(FNV_HASH_FUNCTION)
-  register unsigned int hash = 0x811c9dc5;
-
-  while (*str) {
-    /* multiply by the 32 bit FNV magic prime mod 2^32 */
-    hash +=
-        (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) +
-        (hash << 24);
-
-    /* xor the bottom with the current byte */
-    hash ^= (unsigned int) *str++;
-  }
-
-# else
-  register unsigned int hash = 0;
-
-  while (*str) {
-    hash += (*str) * (*str);
-    str++;
-  }
-#endif
-  return hash;
-}
-
-static void xbt_lib_rehash(xbt_lib_t lib)
-{
-       const int oldsize = lib->table_size + 1;
-       register int newsize = oldsize * 2;
-       register int i;
-       register xbt_libelm_t *currcell;
-       register xbt_libelm_t *twincell;
-       register xbt_libelm_t bucklet;
-       register xbt_libelm_t *pprev;
-
-       currcell =
-         (xbt_libelm_t *) xbt_realloc((char *) lib->table,
-                                                                       newsize * (sizeof(xbt_libelm_t) + sizeof(void*)*(lib->levels - 1)));
-       memset(&currcell[oldsize], 0, oldsize * (sizeof(xbt_libelm_t) + sizeof(void*)*(lib->levels - 1)));       /* zero second half */
-       lib->table_size = --newsize;
-       lib->table = currcell;
-       XBT_DEBUG("REHASH (%d->%d)", oldsize, newsize);
-
-       for (i = 0; i < oldsize; i++, currcell++) {
-       if (!*currcell)             /* empty cell */
-         continue;
-       twincell = currcell + oldsize;
-       for (pprev = currcell, bucklet = *currcell; bucklet; bucklet = *pprev) {
-         /* Since we use "& size" instead of "%size" and since the size was doubled,
-                each bucklet of this cell must either :
-                - stay  in  cell i (ie, currcell)
-                - go to the cell i+oldsize (ie, twincell) */
-         if ((bucklet->hash_code & newsize) != i) {        /* Move to b */
-               *pprev = bucklet->next;
-               bucklet->next = *twincell;
-               if (!*twincell)
-                 lib->fill++;
-               *twincell = bucklet;
-               continue;
-         } else {
-               pprev = &bucklet->next;
-         }
-
-       }
-
-       if (!*currcell)             /* everything moved */
-         lib->fill--;
-       }
-
-}
-
-void xbt_lib_cursor_first(const xbt_lib_t lib,
-                                      xbt_lib_cursor_t * cursor)
-{
-  XBT_DEBUG("xbt_lib_cursor_first");
-  if (!*cursor) {
-    XBT_DEBUG("Create the cursor on first use");
-    *cursor = xbt_lib_cursor_new(lib);
-  } else {
-    xbt_lib_cursor_rewind(*cursor);
-  }
-  if (lib != NULL && (*cursor)->current == NULL) {
-    xbt_lib_cursor_step(*cursor);      /* find the first element */
-  }
-}
-
-static xbt_lib_cursor_t xbt_lib_cursor_new(const xbt_lib_t lib)
-{
-  xbt_lib_cursor_t res = NULL;
-
-  res = xbt_new(s_xbt_lib_cursor_t, 1);
-  res->lib = lib;
-
-  xbt_lib_cursor_rewind(res);
-
-  return res;
-}
-
-static void xbt_lib_cursor_rewind(xbt_lib_cursor_t cursor)
-{
-  XBT_DEBUG("xbt_lib_cursor_rewind");
-  xbt_assert(cursor);
-
-  cursor->line = 0;
-  if (cursor->lib != NULL) {
-    cursor->current = cursor->lib->table[0];
-  } else {
-    cursor->current = NULL;
-  }
-}
-
-int xbt_lib_cursor_get_or_free(xbt_lib_cursor_t * cursor,
-                                           char **key, void **data)
-{
-
-  xbt_libelm_t current;
-
-  XBT_DEBUG("xbt_lib_get_or_free");
-
-  if (!cursor || !(*cursor))
-    return FALSE;
-
-  current = (*cursor)->current;
-  if (current == NULL) {        /* no data left */
-    xbt_lib_cursor_free(cursor);
-    return FALSE;
-  }
-
-  *key = current->key;
-  *data = &(current->content);
-  return TRUE;
-}
-
-static void xbt_lib_cursor_free(xbt_lib_cursor_t * cursor)
-{
-  if (*cursor) {
-    xbt_free(*cursor);
-    *cursor = NULL;
-  }
-}
-
-void xbt_lib_cursor_step(xbt_lib_cursor_t cursor)
+void *xbt_lib_get_or_null(xbt_lib_t lib, const char *key, int level)
 {
-  xbt_libelm_t current;
-  int line;
-
-  XBT_DEBUG("xbt_lib_cursor_step");
-  xbt_assert(cursor);
-
-  current = cursor->current;
-  line = cursor->line;
-
-  if (cursor->lib != NULL) {
-
-    if (current != NULL) {
-      XBT_DEBUG("current is not null, take the next element");
-      current = current->next;
-      XBT_DEBUG("next element: %p", current);
-    }
-
-    while (current == NULL && ++line <= cursor->lib->table_size) {
-      XBT_DEBUG("current is NULL, take the next line");
-      current = cursor->lib->table[line];
-      XBT_DEBUG("element in the next line: %p", current);
-    }
-    XBT_DEBUG("search finished, current = %p, line = %d", current, line);
-
-    cursor->current = current;
-    cursor->line = line;
-  }
+  void **elts = xbt_dict_get_or_null(lib->dict, key);
+  return elts ? elts[level] : NULL;
 }
index e4030ef..4bed85f 100644 (file)
@@ -1,6 +1,6 @@
 /* log - a generic logging facility in the spirit of log4j                  */
 
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -473,8 +473,8 @@ xbt_log_layout_t xbt_log_default_layout = NULL; /* set in log_init */
 
 typedef struct {
   char *catname;
-  e_xbt_log_priority_t thresh;
   char *fmt;
+  e_xbt_log_priority_t thresh;
   int additivity;
   xbt_log_appender_t appender;
 } s_xbt_log_setting_t, *xbt_log_setting_t;
@@ -486,8 +486,7 @@ static void _free_setting(void *s)
   xbt_log_setting_t set = *(xbt_log_setting_t *) s;
   if (set) {
     free(set->catname);
-    if (set->fmt)
-      free(set->fmt);
+    free(set->fmt);
     free(set);
   }
 }
@@ -604,34 +603,68 @@ void xbt_log_postexit(void)
   log_cat_exit(&_XBT_LOGV(XBT_LOG_ROOT_CAT));
 }
 
+ /* Size of the static string in which we  build the log string */
+#define XBT_LOG_STATIC_BUFFER_SIZE 2048
+/* Minimum size of the dynamic string in which we build the log string
+   (should be greater than XBT_LOG_STATIC_BUFFER_SIZE) */
+#define XBT_LOG_DYNAMIC_BUFFER_SIZE 4096
+
 void _xbt_log_event_log(xbt_log_event_t ev, const char *fmt, ...)
 {
-
   xbt_log_category_t cat = ev->cat;
 
-  va_start(ev->ap, fmt);
-  va_start(ev->ap_copy, fmt);
-  while (1) {
+  xbt_assert(ev->priority >= 0,
+             "Negative logging priority naturally forbidden");
+  xbt_assert(ev->priority < sizeof(xbt_log_priority_names),
+             "Priority %d is greater than the biggest allowed value",
+             ev->priority);
+
+  do {
     xbt_log_appender_t appender = cat->appender;
-    if (appender != NULL) {
-      xbt_assert(cat->layout,
-                  "No valid layout for the appender of category %s",
-                  cat->name);
-      cat->layout->do_layout(cat->layout, ev, fmt, appender);
+
+    if (!appender)
+      continue;                 /* No appender, try next */
+
+    xbt_assert(cat->layout,
+               "No valid layout for the appender of category %s", cat->name);
+
+    /* First, try with a static buffer */
+    if (XBT_LOG_STATIC_BUFFER_SIZE) {
+      char buff[XBT_LOG_STATIC_BUFFER_SIZE];
+      int done;
+      ev->buffer = buff;
+      ev->buffer_size = sizeof buff;
+      va_start(ev->ap, fmt);
+      done = cat->layout->do_layout(cat->layout, ev, fmt);
+      va_end(ev->ap);
+      if (done) {
+        appender->do_append(appender, buff);
+        continue;               /* Ok, that worked: go next */
+      }
     }
-    if (!cat->additivity)
-      break;
 
-    cat = cat->parent;
-  }
-  va_end(ev->ap);
-  va_end(ev->ap_copy);
+    /* The static buffer was too small, use a dynamically expanded one */
+    ev->buffer_size = XBT_LOG_DYNAMIC_BUFFER_SIZE;
+    ev->buffer = xbt_malloc(ev->buffer_size);
+    while (1) {
+      int done;
+      va_start(ev->ap, fmt);
+      done = cat->layout->do_layout(cat->layout, ev, fmt);
+      va_end(ev->ap);
+      if (done)
+        break;                  /* Got it */
+      ev->buffer_size *= 2;
+      ev->buffer = xbt_realloc(ev->buffer, ev->buffer_size);
+    }
+    appender->do_append(appender, ev->buffer);
+    xbt_free(ev->buffer);
 
-#ifdef _XBT_WIN32
-  free(ev->buffer);
-#endif
+  } while (cat->additivity && (cat = cat->parent, 1));
 }
 
+#undef XBT_LOG_DYNAMIC_BUFFER_SIZE
+#undef XBT_LOG_STATIC_BUFFER_SIZE
+
 /* NOTE:
  *
  * The standard logging macros use _XBT_LOG_ISENABLED, which calls
@@ -1027,7 +1060,7 @@ void xbt_log_control_set(const char *control_string)
   /* split the string, and remove empty entries */
   set_strings = xbt_str_split_quoted(control_string);
 
-  if (xbt_dynar_length(set_strings) == 0) {     /* vicious user! */
+  if (xbt_dynar_is_empty(set_strings)) {     /* vicious user! */
     xbt_dynar_free(&set_strings);
     return;
   }
index 5ae1d5a..56692e6 100644 (file)
@@ -1,6 +1,4 @@
-/* $Id: log.c 4794 2007-10-10 12:38:37Z mquinson $ */
-
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,14 +15,12 @@ struct xbt_log_appender_s {
 };
 
 struct xbt_log_layout_s {
-  void (*do_layout) (xbt_log_layout_t l,
-                     xbt_log_event_t event, const char *fmt,
-                     xbt_log_appender_t appender);
+  int (*do_layout) (xbt_log_layout_t l,
+                    xbt_log_event_t event, const char *fmt);
   void (*free_) (xbt_log_layout_t l);
   void *data;
 };
 
-
 /**
  * \ingroup XBT_log_implem
  * \param cat the category (not only its name, but the variable)
index 1b0a3ce..ed415a5 100644 (file)
@@ -1,6 +1,6 @@
 /* mallocator - recycle objects to avoid malloc() / free()                  */
 
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_mallocator, xbt, "Mallocators");
 
+
+/* Change to 0 to completely disable mallocators. */
+#define MALLOCATOR_IS_WANTED 1
+
+/* Mallocators and memory mess introduced by model-checking do not mix well
+ * together: the mallocator will give standard memory when we are using raw
+ * memory (so these blocks are killed on restore) and the contrary (so these
+ * blocks will leak accross restores).
+ */
+#define MALLOCATOR_IS_ENABLED (MALLOCATOR_IS_WANTED && !MC_IS_ENABLED)
+
 /**
  * \brief Constructor
  * \param size size of the internal stack: number of objects the mallocator
@@ -24,7 +35,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_mallocator, xbt, "Mallocators");
  * in \a xbt_mallocator_release() when the stack is full, and when
  * the mallocator is freed.
  * \param reset_f function to reinitialise an object of your datatype, called
- * when you extract an object from the mallocator
+ * when you extract an object from the mallocator (can be NULL)
  *
  * Create and initialize a new mallocator for a given datatype.
  *
@@ -36,35 +47,28 @@ xbt_mallocator_t xbt_mallocator_new(int size,
                                     void_f_pvoid_t free_f,
                                     void_f_pvoid_t reset_f)
 {
-
-
   xbt_mallocator_t m;
 
   xbt_assert(size > 0, "size must be positive");
-  xbt_assert(new_f != NULL && free_f != NULL
-              && reset_f != NULL, "invalid parameter");
-
-  /* Let's force 0 size mallocator! (Dirty hack, blame Martin :) ) */
-
-  /* mallocators and memory mess introduced by model-checking do not mix well together:
-   *   The mallocator will give standard memory when we are using raw memory (so these blocks are killed on restore)
-   *   and the contrary (so these blocks will leak accross restores)
-   */
-  if (MC_IS_ENABLED)
-    size = 0;
+  xbt_assert(new_f != NULL && free_f != NULL, "invalid parameter");
 
   m = xbt_new0(s_xbt_mallocator_t, 1);
   XBT_VERB("Create mallocator %p", m);
-  if (XBT_LOG_ISENABLED(xbt_mallocator, xbt_log_priority_verbose))
-    xbt_backtrace_display_current();
-
-  m->objects = xbt_new0(void *, MC_IS_ENABLED ? 1 : size);
-  m->max_size = size;
   m->current_size = 0;
   m->new_f = new_f;
   m->free_f = free_f;
   m->reset_f = reset_f;
 
+  if (MALLOCATOR_IS_ENABLED) {
+    m->objects = xbt_new0(void *, size);
+    m->max_size = size;
+  } else {
+    if (!MALLOCATOR_IS_WANTED) /* Warn to avoid to commit debugging settings */
+      XBT_WARN("Mallocator is disabled!");
+    m->objects = NULL;
+    m->max_size = 0;
+  }
+
   return m;
 }
 
@@ -85,7 +89,7 @@ void xbt_mallocator_free(xbt_mallocator_t m)
   XBT_VERB("Frees mallocator %p (size:%d/%d)", m, m->current_size,
         m->max_size);
   for (i = 0; i < m->current_size; i++) {
-    (*(m->free_f)) (m->objects[i]);
+    m->free_f(m->objects[i]);
   }
   xbt_free(m->objects);
   xbt_free(m);
@@ -103,7 +107,7 @@ void xbt_mallocator_free(xbt_mallocator_t m)
  * If the mallocator is empty, a new object is created,
  * by calling the function new_f().
  *
- * In both cases, the function reset_f() is called on the object.
+ * In both cases, the function reset_f() (if defined) is called on the object.
  *
  * \see xbt_mallocator_release()
  */
@@ -111,28 +115,30 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
 {
   void *object;
 
-  if (m->current_size <= 0) {
-    /* No object is ready yet. Create a bunch of them to try to group the mallocs
-     *  on the same memory pages (to help the cache lines) */
-
-    /* XBT_DEBUG("Create a new object for mallocator %p (size:%d/%d)", m,
-           m->current_size, m->max_size); */
-    int i;
-    int amount=MIN( (m->max_size) /2,1000);
-    for (i=0;i<amount;i++)
-      m->objects[i] = (*(m->new_f)) ();
-    m->current_size=amount;
-  }
-
-  /* there is at least an available object, now */
-  /* XBT_DEBUG("Reuse an old object for mallocator %p (size:%d/%d)", m,
-           m->current_size, m->max_size); */
-  if (MC_IS_ENABLED) /* no mallocator with MC */
-    object = (*(m->new_f)) ();
-  else
+  if (MALLOCATOR_IS_ENABLED) {
+    if (m->current_size <= 0) {
+      /* No object is ready yet. Create a bunch of them to try to group the
+       * mallocs on the same memory pages (to help the cache lines) */
+
+      /* XBT_DEBUG("Create a new object for mallocator %p (size:%d/%d)", */
+      /*           m, m->current_size, m->max_size); */
+      int i;
+      int amount = MIN(m->max_size / 2, 1000);
+      for (i = 0; i < amount; i++)
+        m->objects[i] = m->new_f();
+      m->current_size = amount;
+    }
+
+    /* there is at least an available object, now */
+    /* XBT_DEBUG("Reuse an old object for mallocator %p (size:%d/%d)", */
+    /*           m, m->current_size, m->max_size); */
     object = m->objects[--m->current_size];
+  } else {
+    object = m->new_f();
+  }
 
-  (*(m->reset_f)) (object);
+  if (m->reset_f)
+    m->reset_f(object);
   return object;
 }
 
@@ -161,6 +167,6 @@ void xbt_mallocator_release(xbt_mallocator_t m, void *object)
     /* otherwise we don't have a choice, we must free the object */
     /* XBT_DEBUG("Free deleted object: mallocator %p is full (size:%d/%d)", m,
            m->current_size, m->max_size); */
-    (*(m->free_f)) (object);
+    m->free_f(object);
   }
 }
index 928b3e5..8748245 100644 (file)
@@ -10,8 +10,8 @@
 #define _XBT_MALLOCATOR_PRIVATE_H__
 
 typedef struct s_xbt_mallocator {
-  int current_size;             /* number of objects currently stored */
   void **objects;               /* objects stored by the mallocator and available for the user */
+  int current_size;             /* number of objects currently stored */
   int max_size;                 /* maximum number of objects */
   pvoid_f_void_t new_f;         /* function to call when we are running out of objects */
   void_f_pvoid_t free_f;        /* function to call when we have got too many objects */
index 86b7505..e9e7210 100644 (file)
@@ -187,7 +187,7 @@ void mfree(void *md, void *ptr)
       }
     }
     if (mdp->mfree_hook != NULL) {
-      (*mdp->mfree_hook) (mdp, ptr);
+      mdp->mfree_hook(mdp, ptr);
     } else {
       __mmalloc_free(mdp, ptr);
     }
index 2bced98..a780f13 100644 (file)
@@ -71,8 +71,7 @@ void *realloc(void *p, size_t s)
     else
       ret = mmalloc(mdp, s);
   } else {
-    if (p)
-      mfree(mdp, p);
+    mfree(mdp, p);
   }
   UNLOCK(mdp);
 
index 1c36aa8..ab198a9 100644 (file)
@@ -118,7 +118,7 @@ void *mmalloc(void *md, size_t size)
 //  printf("(%s) Mallocing %d bytes on %p (default: %p)...",xbt_thread_self_name(),size,mdp,__mmalloc_default_mdp);fflush(stdout);
 
   if (mdp->mmalloc_hook != NULL) {
-    return (*mdp->mmalloc_hook) (md, size);
+    return mdp->mmalloc_hook(md, size);
   }
 
   if (!(mdp->flags & MMALLOC_INITIALIZED)) {
index 46b48a6..8e0dc54 100644 (file)
@@ -50,7 +50,7 @@ static void checkhdr(struct mdesc *mdp, const struct hdr *hdr)
 {
   if (hdr->magic != MAGICWORD ||
       ((char *) &hdr[1])[hdr->size] != MAGICBYTE) {
-    (*mdp->abortfunc) ();
+    mdp->abortfunc();
   }
 }
 
index 14230a5..aeb358a 100644 (file)
@@ -46,7 +46,7 @@ void *mrealloc(void *md, void *ptr, size_t size)
   }
 
   if (mdp->mrealloc_hook != NULL) {
-    return ((*mdp->mrealloc_hook) (md, ptr, size));
+    return mdp->mrealloc_hook(md, ptr, size);
   }
 
   block = BLOCK(ptr);
index c88a26b..44f010e 100644 (file)
@@ -5,27 +5,81 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 #include "gras_config.h"
 #include <unistd.h>
+
 #ifndef _XBT_WIN32
 #include <sys/syscall.h>
 #endif
 
 #ifdef HAVE_FUTEX_H
-       #include <linux/futex.h>
-#else
-       #include "xbt/xbt_os_thread.h"
+#include <linux/futex.h>
 #endif
-#include <errno.h>
-#include "parmap_private.h"
+
+#include "xbt/parmap.h"
+#include "xbt/log.h"
+#include "xbt/function_types.h"
+#include "xbt/dynar.h"
+#include "xbt/xbt_os_thread.h"
+#include "xbt/sysdep.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_parmap, xbt, "parmap: parallel map");
 XBT_LOG_NEW_SUBCATEGORY(xbt_parmap_unit, xbt_parmap, "parmap unit testing");
 
-static void *_xbt_parmap_worker_main(void *parmap);
+typedef enum {
+  XBT_PARMAP_WORK = 0,
+  XBT_PARMAP_DESTROY
+} e_xbt_parmap_flag_t;
+
+static void xbt_parmap_set_mode(xbt_parmap_t parmap, e_xbt_parmap_mode_t mode);
+static void *xbt_parmap_worker_main(void *parmap);
+
+static void xbt_parmap_posix_start(xbt_parmap_t parmap);
+static void xbt_parmap_posix_end(xbt_parmap_t parmap);
+static void xbt_parmap_posix_signal(xbt_parmap_t parmap);
+static void xbt_parmap_posix_wait(xbt_parmap_t parmap);
+
 #ifdef HAVE_FUTEX_H
-       static void futex_wait(int *uaddr, int val);
-       static void futex_wake(int *uaddr, int val);
+static void xbt_parmap_futex_start(xbt_parmap_t parmap);
+static void xbt_parmap_futex_end(xbt_parmap_t parmap);
+static void xbt_parmap_futex_signal(xbt_parmap_t parmap);
+static void xbt_parmap_futex_wait(xbt_parmap_t parmap);
+static void futex_wait(int *uaddr, int val);
+static void futex_wake(int *uaddr, int val);
 #endif
-xbt_parmap_t xbt_parmap_new(unsigned int num_workers)
+
+static void xbt_parmap_busy_start(xbt_parmap_t parmap);
+static void xbt_parmap_busy_end(xbt_parmap_t parmap);
+static void xbt_parmap_busy_signal(xbt_parmap_t parmap);
+static void xbt_parmap_busy_wait(xbt_parmap_t parmap);
+
+
+/**
+ * \brief Parallel map structure
+ */
+typedef struct s_xbt_parmap {
+  e_xbt_parmap_flag_t status;      /**< is the parmap active or being destroyed? */
+  int work;                        /**< index of the current round (1 is the first) */
+  int done;                        /**< number of rounds already done (futexes only) */
+  unsigned int thread_counter;     /**< number of threads currently working */
+  unsigned int num_workers;        /**< total number of worker threads including the controller */
+  void_f_pvoid_t fun;              /**< function to run in parallel on each element of data */
+  xbt_dynar_t data;                /**< parameters to pass to fun in parallel */
+  unsigned int index;              /**< index of the next element of data to pick */
+
+  /* fields that depend on the synchronization mode */
+  e_xbt_parmap_mode_t mode;        /**< synchronization mode */
+  void (*start_f)(xbt_parmap_t);   /**< initializes the worker threads */
+  void (*end_f)(xbt_parmap_t);     /**< finalizes the worker threads */
+  void (*signal_f)(xbt_parmap_t);  /**< wakes the workers threads to process tasks */
+  void (*wait_f)(xbt_parmap_t);    /**< waits for more work */
+} s_xbt_parmap_t;
+
+/**
+ * \brief Creates a parallel map object
+ * \param num_workers number of worker threads to create
+ * \param mode how to synchronize the worker threads
+ * \return the parmap created
+ */
+xbt_parmap_t xbt_parmap_new(unsigned int num_workers, e_xbt_parmap_mode_t mode)
 {
   unsigned int i;
   xbt_os_thread_t worker = NULL;
@@ -34,84 +88,126 @@ xbt_parmap_t xbt_parmap_new(unsigned int num_workers)
 
   /* Initialize the thread pool data structure */
   xbt_parmap_t parmap = xbt_new0(s_xbt_parmap_t, 1);
-#ifdef HAVE_FUTEX_H
-  parmap->sync_event = xbt_new0(s_xbt_event_t, 1);
-#endif
+
   parmap->num_workers = num_workers;
-  parmap->status = PARMAP_WORK;
-#ifdef HAVE_FUTEX_H
-  parmap->sync_event->threads_to_wait = num_workers;
-#endif
+  parmap->status = XBT_PARMAP_WORK;
+  xbt_parmap_set_mode(parmap, mode);
+
   /* Create the pool of worker threads */
-  for(i=0; i < num_workers; i++){
-    worker = xbt_os_thread_create(NULL, _xbt_parmap_worker_main, parmap, NULL);
+  for (i = 0; i < num_workers - 1; i++) {
+    worker = xbt_os_thread_create(NULL, xbt_parmap_worker_main, parmap, NULL);
     xbt_os_thread_detach(worker);
   }
-#ifdef HAVE_FUTEX_H
-  xbt_event_init(parmap->sync_event);
-#endif
+  parmap->start_f(parmap);
   return parmap;
 }
 
+/**
+ * \brief Destroys a parmap
+ * \param parmap the parmap to destroy
+ */
 void xbt_parmap_destroy(xbt_parmap_t parmap)
-{ 
-  XBT_DEBUG("Destroy parmap %p", parmap);
-  parmap->status = PARMAP_DESTROY;
-#ifdef HAVE_FUTEX_H
-  xbt_event_signal(parmap->sync_event);
-  xbt_free(parmap->sync_event);
-#endif
+{
+  parmap->status = XBT_PARMAP_DESTROY;
+  parmap->signal_f(parmap);
   xbt_free(parmap);
 }
 
- void xbt_parmap_apply(xbt_parmap_t parmap, void_f_pvoid_t fun, xbt_dynar_t data)
+/**
+ * \brief Sets the synchronization mode of a parmap.
+ * \param parmap a parallel map object
+ * \param mode the synchronization mode
+ */
+static void xbt_parmap_set_mode(xbt_parmap_t parmap, e_xbt_parmap_mode_t mode)
 {
-  /* Assign resources to worker threads*/
+  parmap->mode = mode;
+
+  switch (mode) {
+
+    case XBT_PARMAP_POSIX:
+      parmap->start_f = xbt_parmap_posix_start;
+      parmap->end_f = xbt_parmap_posix_end;
+      parmap->signal_f = xbt_parmap_posix_signal;
+      parmap->wait_f = xbt_parmap_posix_wait;
+      break;
+
+    case XBT_PARMAP_FUTEX:
+      parmap->start_f = xbt_parmap_futex_start;
+      parmap->end_f = xbt_parmap_futex_end;
+      parmap->signal_f = xbt_parmap_futex_signal;
+      parmap->wait_f = xbt_parmap_futex_wait;
+      break;
+
+    case XBT_PARMAP_BUSY_WAIT:
+      parmap->start_f = xbt_parmap_busy_start;
+      parmap->end_f = xbt_parmap_busy_end;
+      parmap->signal_f = xbt_parmap_busy_signal;
+      parmap->wait_f = xbt_parmap_busy_wait;
+      break;
+  }
+}
+
+/**
+ * \brief Applies a list of tasks in parallel.
+ * \param parmap a parallel map object
+ * \param fun the function to call in parallel
+ * \param data each element of this dynar will be passed as an argument to fun
+ */
+void xbt_parmap_apply(xbt_parmap_t parmap, void_f_pvoid_t fun, xbt_dynar_t data)
+{
+  /* Assign resources to worker threads */
   parmap->fun = fun;
   parmap->data = data;
   parmap->index = 0;
-#ifdef HAVE_FUTEX_H
-  xbt_event_signal(parmap->sync_event);
-#endif
+  parmap->signal_f(parmap);
   XBT_DEBUG("Job done");
 }
 
-static void *_xbt_parmap_worker_main(void *arg)
+/**
+ * \brief Returns a next task to process.
+ *
+ * Worker threads call this function to get more work.
+ *
+ * \return the next task to process, or NULL if there is no more work
+ */
+void* xbt_parmap_next(xbt_parmap_t parmap)
 {
-  unsigned int worker_id;
-  xbt_parmap_t parmap = (xbt_parmap_t)arg;
+  unsigned int index = __sync_fetch_and_add(&parmap->index, 1);
+  if (index < xbt_dynar_length(parmap->data)) {
+    return xbt_dynar_get_as(parmap->data, index, void*);
+  }
+  return NULL;
+}
+
+/**
+ * \brief Main function of a worker thread.
+ * \param arg the parmap
+ */
+static void *xbt_parmap_worker_main(void *arg)
+{
+  xbt_parmap_t parmap = (xbt_parmap_t) arg;
 
-  /* Fetch a worker id */
-  worker_id = __sync_fetch_and_add(&parmap->workers_max_id, 1);
-  xbt_os_thread_set_extra_data((void *)(unsigned long)worker_id);
+  XBT_DEBUG("New worker thread created");
 
-  XBT_DEBUG("New worker thread created (%u)", worker_id);
-  
   /* Worker's main loop */
-  while(1){
-#ifdef HAVE_FUTEX_H
-    xbt_event_wait(parmap->sync_event);
-#endif
-    if(parmap->status == PARMAP_WORK){
-      unsigned int i;
-      unsigned int n = 0;
+  while (1) {
+    parmap->wait_f(parmap);
+    if (parmap->status == XBT_PARMAP_WORK) {
 
-      XBT_DEBUG("Worker %u got a job", worker_id);
+      XBT_DEBUG("Worker got a job");
 
-      while ((i = __sync_fetch_and_add(&parmap->index, 1))
-             < xbt_dynar_length(parmap->data)) {
-        parmap->fun(xbt_dynar_get_as(parmap->data, i, void*));
-        n++;
+      void* work = xbt_parmap_next(parmap);
+      while (work != NULL) {
+        parmap->fun(work);
+        work = xbt_parmap_next(parmap);
       }
 
-      XBT_DEBUG("Worker %u processed %u tasks", worker_id, n);
+      XBT_DEBUG("Worker has finished");
 
     /* We are destroying the parmap */
-    }else{
-#ifdef HAVE_FUTEX_H
-      xbt_event_end(parmap->sync_event);
-#endif
-      XBT_DEBUG("Shutting down worker %u", worker_id);
+    } else {
+      parmap->end_f(parmap);
+      XBT_DEBUG("Shutting down worker");
       return NULL;
     }
   }
@@ -129,50 +225,198 @@ static void futex_wake(int *uaddr, int val)
   XBT_VERB("Waking futex %p", uaddr);
   syscall(SYS_futex, uaddr, FUTEX_WAKE_PRIVATE, val, NULL, NULL, 0);
 }
+#endif
 
-void xbt_event_init(xbt_event_t event)
+static void xbt_parmap_posix_start(xbt_parmap_t parmap)
 {
-  int myflag = event->done;
-  if(event->thread_counter < event->threads_to_wait)
-    futex_wait(&event->done, myflag);
+  THROW_UNIMPLEMENTED;
 }
 
-void xbt_event_signal(xbt_event_t event)
+static void xbt_parmap_posix_end(xbt_parmap_t parmap)
 {
-  int myflag = event->done;
-  event->thread_counter = 0;
-  event->work++;
-  futex_wake(&event->work, event->threads_to_wait);
-  futex_wait(&event->done, myflag);
+  THROW_UNIMPLEMENTED;
 }
 
-void xbt_event_wait(xbt_event_t event)
+static void xbt_parmap_posix_signal(xbt_parmap_t parmap)
+{
+  THROW_UNIMPLEMENTED;
+}
+
+static void xbt_parmap_posix_wait(xbt_parmap_t parmap)
+{
+  THROW_UNIMPLEMENTED;
+}
+
+#ifdef HAVE_FUTEX_H
+/**
+ * \brief Starts the parmap: waits for all workers to be ready and returns.
+ *
+ * This function is called by the controller thread.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_futex_start(xbt_parmap_t parmap)
+{
+  int myflag = parmap->done;
+  __sync_fetch_and_add(&parmap->thread_counter, 1);
+  if (parmap->thread_counter < parmap->num_workers) {
+    /* wait for all workers to be ready */
+    futex_wait(&parmap->done, myflag);
+  }
+}
+
+/**
+ * \brief Ends the parmap: wakes the controller thread when all workers terminate.
+ *
+ * This function is called by all worker threads when they end (not including
+ * the controller).
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_futex_end(xbt_parmap_t parmap)
 {
-  int myflag;
   unsigned int mycount;
 
-  myflag = event->work;
-  mycount = __sync_add_and_fetch(&event->thread_counter, 1);
-  if(mycount == event->threads_to_wait){
-    event->done++;
-    futex_wake(&event->done, 1);
+  mycount = __sync_add_and_fetch(&parmap->thread_counter, 1);
+  if (mycount == parmap->num_workers) {
+    /* all workers have finished, wake the controller */
+    parmap->done++;
+    futex_wake(&parmap->done, 1);
   }
+}
 
-  futex_wait(&event->work, myflag);
+/**
+ * \brief Wakes all workers and waits for them to finish the tasks.
+ *
+ * This function is called by the controller thread.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_futex_signal(xbt_parmap_t parmap)
+{
+  int myflag = parmap->done;
+  parmap->thread_counter = 0;
+  parmap->work++;
+
+  /* wake all workers */
+  futex_wake(&parmap->work, parmap->num_workers);
+
+  if (parmap->status == XBT_PARMAP_WORK) {
+    /* also work myself */
+    void* work = xbt_parmap_next(parmap);
+    while (work != NULL) {
+      parmap->fun(work);
+      work = xbt_parmap_next(parmap);
+    }
+  }
+
+  unsigned int mycount = __sync_add_and_fetch(&parmap->thread_counter, 1);
+  if (mycount < parmap->num_workers) {
+    /* some workers have not finished yet */
+    futex_wait(&parmap->done, myflag);
+  }
 }
 
-void xbt_event_end(xbt_event_t event)
+/**
+ * \brief Waits for some work to process.
+ *
+ * This function is called by each worker thread (not including the controller)
+ * when it has no more work to do.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_futex_wait(xbt_parmap_t parmap)
 {
+  int myflag;
   unsigned int mycount;
 
-  mycount = __sync_add_and_fetch(&event->thread_counter, 1);
-  if(mycount == event->threads_to_wait){
-    event->done++;
-    futex_wake(&event->done, 1);
+  myflag = parmap->work;
+  mycount = __sync_add_and_fetch(&parmap->thread_counter, 1);
+  if (mycount == parmap->num_workers) {
+    /* all workers have finished, wake the controller */
+    parmap->done++;
+    futex_wake(&parmap->done, 1);
   }
+
+  /* wait for more work */
+  futex_wait(&parmap->work, myflag);
 }
 #endif
 
+/**
+ * \brief Starts the parmap: waits for all workers to be ready and returns.
+ *
+ * This function is called by the controller thread.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_busy_start(xbt_parmap_t parmap)
+{
+  __sync_fetch_and_add(&parmap->thread_counter, 1);
+  while (parmap->thread_counter < parmap->num_workers) {
+    xbt_os_thread_yield();
+  }
+}
+
+/**
+ * \brief Ends the parmap: wakes the controller thread when all workers terminate.
+ *
+ * This function is called by all worker threads when they end.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_busy_end(xbt_parmap_t parmap)
+{
+  __sync_add_and_fetch(&parmap->thread_counter, 1);
+}
+
+/**
+ * \brief Wakes all workers and waits for them to finish the tasks.
+ *
+ * This function is called by the controller thread.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_busy_signal(xbt_parmap_t parmap)
+{
+  parmap->thread_counter = 0;
+  parmap->work++;
+
+  if (parmap->status == XBT_PARMAP_WORK) {
+    /* also work myself */
+    void* work = xbt_parmap_next(parmap);
+    while (work != NULL) {
+      parmap->fun(work);
+      work = xbt_parmap_next(parmap);
+    }
+  }
+
+  /* I have finished, wait for the others */
+  __sync_add_and_fetch(&parmap->thread_counter, 1);
+  while (parmap->thread_counter < parmap->num_workers) {
+    xbt_os_thread_yield();
+  }
+}
+
+/**
+ * \brief Waits for some work to process.
+ *
+ * This function is called by each worker thread (not including the controller)
+ * when it has no more work to do.
+ *
+ * \param parmap a parmap
+ */
+static void xbt_parmap_busy_wait(xbt_parmap_t parmap)
+{
+  int work = parmap->work;
+  __sync_add_and_fetch(&parmap->thread_counter, 1);
+
+  /* wait for more work */
+  while (parmap->work == work) {
+    xbt_os_thread_yield();
+  }
+}
+
 #ifdef SIMGRID_TEST
 #include "xbt.h"
 #include "xbt/ex.h"
@@ -180,8 +424,6 @@ void xbt_event_end(xbt_event_t event)
 XBT_TEST_SUITE("parmap", "Parallel Map");
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_parmap_unit);
 
-
-
 xbt_parmap_t parmap;
 
 void fun(void *arg);
@@ -195,18 +437,19 @@ XBT_TEST_UNIT("basic", test_parmap_basic, "Basic usage")
 {
   xbt_test_add("Create the parmap");
 
-  unsigned long i,j;
+  unsigned long i, j;
   xbt_dynar_t data = xbt_dynar_new(sizeof(void *), NULL);
 
   /* Create the parallel map */
-  parmap = xbt_parmap_new(10);
+  parmap = xbt_parmap_new(10, XBT_PARMAP_FUTEX);
 
-  for(j=0; j < 100; j++){
+  for (j = 0; j < 100; j++) {
     xbt_dynar_push_as(data, void *, (void *)j);
   }
 
-  for(i=0; i < 5; i++)
+  for (i = 0; i < 5; i++) {
     xbt_parmap_apply(parmap, fun, data);
+  }
 
   /* Destroy the parmap */
   xbt_parmap_destroy(parmap);
diff --git a/src/xbt/parmap_private.h b/src/xbt/parmap_private.h
deleted file mode 100644 (file)
index 8b6c1bb..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) 2004, 2005, 2007, 2009, 2010. 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 _XBT_THREADPOOL_PRIVATE_H
-#define _XBT_THREADPOOL_PRIVATE_H
-
-#include "xbt/parmap.h"
-#include "xbt/xbt_os_thread.h"
-#include "xbt/sysdep.h"
-#include "xbt/dynar.h"
-#include "xbt/log.h"
-#include "xbt/xbt_os_time.h"
-
-typedef enum{
-  PARMAP_WORK = 0,
-  PARMAP_DESTROY
-} e_xbt_parmap_flag_t;
-
-#ifdef HAVE_FUTEX_H
-typedef struct s_xbt_event{
-  int work;
-  int done;
-  unsigned int thread_counter;
-  unsigned int threads_to_wait;
-}s_xbt_event_t, *xbt_event_t;
-
-void xbt_event_init(xbt_event_t event);
-void xbt_event_signal(xbt_event_t event);
-void xbt_event_wait(xbt_event_t event);
-void xbt_event_end(xbt_event_t event);
-#endif
-
-typedef struct s_xbt_parmap {
-  e_xbt_parmap_flag_t status;
-#ifdef HAVE_FUTEX_H
-  xbt_event_t sync_event;
-#endif
-  unsigned int num_workers;
-  unsigned int workers_max_id;
-  void_f_pvoid_t fun;
-  xbt_dynar_t data;
-  unsigned int index;
-} s_xbt_parmap_t;
-
-#endif
index 8b3efbf..9158305 100644 (file)
@@ -57,7 +57,7 @@ void xbt_set_free(xbt_set_t * set)
 static int _xbt_set_get_id(xbt_set_t set)
 {
   int id;
-  if (xbt_dynar_length(set->available_ids) > 0) {
+  if (!xbt_dynar_is_empty(set->available_ids)) {
     /* if there are some available ids */
     xbt_dynar_pop(set->available_ids, &id);
   } else {
@@ -71,7 +71,7 @@ static int _xbt_set_get_id(xbt_set_t set)
  *
  * \param set set to populate
  * \param elm element to add.
- * \param free_func How to add the data
+ * \param free_func how to free the data
  *
  * elm->name must be set;
  * if elm->name_len <= 0, it is recomputed. If >0, it's used as is;
index d64067f..70a8f08 100644 (file)
@@ -65,21 +65,21 @@ XBT_INLINE void xbt_swag_init(xbt_swag_t swag, size_t offset)
  */
 XBT_INLINE void xbt_swag_insert_at_head(void *obj, xbt_swag_t swag)
 {
+  xbt_assert(!xbt_swag_belongs(obj, swag) || swag->tail,
+      "This object belongs to an empty swag! Did you correctly initialize the object's hookup?");
 
-  if (xbt_swag_belongs(obj, swag))
-    return;
-
-  (swag->count)++;
-  if (swag->head == NULL) {
+  if (!swag->head) {
     xbt_assert(!(swag->tail), "Inconsistent swag.");
     swag->head = obj;
     swag->tail = obj;
-    return;
+    swag->count++;
+  }
+  else if (obj != swag->head && !xbt_swag_getPrev(obj, swag->offset)) {
+    xbt_swag_getNext(obj, swag->offset) = swag->head;
+    xbt_swag_getPrev(swag->head, swag->offset) = obj;
+    swag->head = obj;
+    swag->count++;
   }
-
-  xbt_swag_getNext(obj, swag->offset) = swag->head;
-  xbt_swag_getPrev(swag->head, swag->offset) = obj;
-  swag->head = obj;
 }
 
 /**
@@ -91,21 +91,21 @@ XBT_INLINE void xbt_swag_insert_at_head(void *obj, xbt_swag_t swag)
  */
 XBT_INLINE void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
 {
+  xbt_assert(!xbt_swag_belongs(obj, swag) || swag->tail,
+      "This object belongs to an empty swag! Did you correctly initialize the object's hookup?");
 
-  if (xbt_swag_belongs(obj, swag))
-    return;
-
-  (swag->count)++;
-  if (swag->head == NULL) {
+  if (!swag->head) {
     xbt_assert(!(swag->tail), "Inconsistent swag.");
     swag->head = obj;
     swag->tail = obj;
-    return;
+    swag->count++;
+  }
+  else if (obj != swag->head && !xbt_swag_getPrev(obj, swag->offset)) {
+    xbt_swag_getPrev(obj, swag->offset) = swag->tail;
+    xbt_swag_getNext(swag->tail, swag->offset) = obj;
+    swag->tail = obj;
+    swag->count++;
   }
-
-  xbt_swag_getPrev(obj, swag->offset) = swag->tail;
-  xbt_swag_getNext(swag->tail, swag->offset) = obj;
-  swag->tail = obj;
 }
 
 /**
@@ -117,36 +117,36 @@ XBT_INLINE void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
  */
 XBT_INLINE void *xbt_swag_remove(void *obj, xbt_swag_t swag)
 {
-  size_t offset = swag->offset;
-
-  if ((!obj) || (!swag))
-    return NULL;
-  if (!xbt_swag_belongs(obj, swag))     /* Trying to remove an object that
-                                           was not in this swag */
+  if (!obj)
     return NULL;
 
-  if (swag->head == swag->tail) {       /* special case */
-    if (swag->head != obj)      /* Trying to remove an object that was not in this swag */
-      return NULL;
-    swag->head = NULL;
-    swag->tail = NULL;
-    xbt_swag_getNext(obj, offset) = xbt_swag_getPrev(obj, offset) = NULL;
-  } else if (obj == swag->head) {       /* It's the head */
-    swag->head = xbt_swag_getNext(obj, offset);
-    xbt_swag_getPrev(swag->head, offset) = NULL;
-    xbt_swag_getNext(obj, offset) = NULL;
-  } else if (obj == swag->tail) {       /* It's the tail */
-    swag->tail = xbt_swag_getPrev(obj, offset);
-    xbt_swag_getNext(swag->tail, offset) = NULL;
+  size_t offset = swag->offset;
+  void* prev = xbt_swag_getPrev(obj, offset);
+  void* next = xbt_swag_getNext(obj, offset);
+
+  if (prev) {
+    xbt_swag_getNext(prev, offset) = next;
     xbt_swag_getPrev(obj, offset) = NULL;
-  } else {                      /* It's in the middle */
-    xbt_swag_getNext(xbt_swag_getPrev(obj, offset), offset) =
-        xbt_swag_getNext(obj, offset);
-    xbt_swag_getPrev(xbt_swag_getNext(obj, offset), offset) =
-        xbt_swag_getPrev(obj, offset);
-    xbt_swag_getPrev(obj, offset) = xbt_swag_getNext(obj, offset) = NULL;
+    if (next) {
+      xbt_swag_getPrev(next, offset) = prev;
+      xbt_swag_getNext(obj, offset) = NULL;
+    }
+    else {
+      swag->tail = prev;
+    }
+    swag->count--;
   }
-  (swag->count)--;
+  else if (next) {
+    xbt_swag_getPrev(next, offset) = NULL;
+    xbt_swag_getNext(obj, offset) = NULL;
+    swag->head = next;
+    swag->count--;
+  }
+  else if (obj == swag->head) {
+    swag->head = swag->tail = NULL;
+    swag->count--;
+  }
+
   return obj;
 }
 
@@ -156,17 +156,14 @@ XBT_INLINE void *xbt_swag_remove(void *obj, xbt_swag_t swag)
  */
 void *xbt_swag_extract(xbt_swag_t swag)
 {
-  size_t offset = swag->offset;
-  void *obj = NULL;
-
-  if ((!swag) || (!(swag->head)))
+  if (!swag->head)
     return NULL;
 
-  obj = swag->head;
+  size_t offset = swag->offset;
+  void* obj = swag->head;
 
-  if (swag->head == swag->tail) {       /* special case */
+  if (obj == swag->tail) {       /* special case */
     swag->head = swag->tail = NULL;
-    xbt_swag_getPrev(obj, offset) = xbt_swag_getNext(obj, offset) = NULL;
   } else {
     swag->head = xbt_swag_getNext(obj, offset);
     xbt_swag_getPrev(swag->head, offset) = NULL;
index 757eb43..c91c39e 100644 (file)
@@ -21,6 +21,7 @@
  */  \r
     \r
 #include "win32_ucontext.h"\r
+\r
 int getcontext(ucontext_t * ucp) \r
 {\r
   int ret;\r
@@ -45,12 +46,12 @@ int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
   int i;\r
   va_list ap;\r
   char *sp;\r
-  \r
-      /* Stack grows down */ \r
+\r
+   /* Stack grows down */\r
       sp = (char *) (size_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size;\r
   \r
       /* Reserve stack space for the arguments (maximum possible: argc*(8 bytes per argument)) */ \r
-      sp -= argc * 8;\r
+      sp -= argc * sizeof(void*);\r
   if (sp < (char *) ucp->uc_stack.ss_sp) {\r
     \r
         /* errno = ENOMEM; */ \r
@@ -59,15 +60,15 @@ int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
   \r
       /* Set the instruction and the stack pointer */\r
   #ifdef I_X86_\r
-  ucp->uc_mcontext.Eip = (unsigned long) func;\r
-  ucp->uc_mcontext.Esp = (unsigned long) sp - 4;\r
+  ucp->uc_mcontext.Eip = (DWORD) func;\r
+  ucp->uc_mcontext.Esp = (DWORD) sp - sizeof(void*);\r
   #endif\r
   #ifdef _IA64_\r
   #  error "_IA64_"\r
   #endif\r
   #ifdef _AMD64_\r
-  ucp->uc_mcontext.Rip = (unsigned long long) func;\r
-  ucp->uc_mcontext.Rsp = (unsigned long long) sp - 8;\r
+  ucp->uc_mcontext.Rip = (DWORD64) func;\r
+  ucp->uc_mcontext.Rsp = (DWORD64) sp - sizeof(void*);\r
   #endif\r
 \r
       /* Save/Restore the full machine context */ \r
@@ -76,9 +77,9 @@ int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
       /* Copy the arguments */ \r
       va_start(ap, argc);\r
   for (i = 0; i < argc; i++) {\r
-    memcpy(sp, ap, 8);\r
-    ap += 8;\r
-    sp += 8;\r
+    memcpy(sp, ap, sizeof(void*));\r
+    ap += sizeof(void*);\r
+    sp += sizeof(void*);\r
   }\r
   va_end(ap);\r
   return 0;\r
index d27db25..57038c1 100644 (file)
@@ -1,6 +1,6 @@
 /* file_appender - a dumb log appender which simply prints to stdout        */
 
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@ extern const char *xbt_log_priority_names[8];
 
 static void append_file(xbt_log_appender_t this_appender, char *str)
 {
-  fprintf((FILE *) (this_appender->data), "%s", str);
+  fputs(str, (FILE *) (this_appender->data));
 }
 
 static void free_(xbt_log_appender_t this_)
index f7ca02d..d09a2fe 100644 (file)
@@ -1,12 +1,13 @@
 /* layout_simple - a dumb log layout                                        */
 
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2011. 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 "portable.h"           /* execinfo when available */
+#include "xbt/ex_interface.h"
 #include "xbt/sysdep.h"
 #include "xbt/strbuff.h"
 #include "xbt/log_private.h"
@@ -18,264 +19,87 @@ extern const char *xbt_log_priority_names[8];
 
 static double format_begin_of_time = -1;
 
-#define append(data,letter) \
-  do { \
-    if (precision == -1 && length == -1) { \
-      tmp = bprintf("%" letter, data); \
-    } else if (precision == -1) { \
-      sprintf(tmpfmt,"%%%d" letter,length); \
-      tmp = bprintf(tmpfmt, data); \
-      length = -1; \
-    } else if (length == -1) { \
-      tmp = bprintf("%.*" letter, precision, data);\
-      precision = -1; \
-    } else { \
-      sprintf(tmpfmt,"%%%d.*" letter,length); \
-      tmp = bprintf(tmpfmt, precision, data); \
-      length = precision = -1; \
-    } \
-    xbt_strbuff_append(buff,tmp);\
-    free(tmp); \
-  } while (0)
-
-#define append_string(data) append(data, "s")
-#define append_int(data)    append(data, "d")
-#define append_double(data) append(data, "f")
-
-#define append2(fmt,elm,elm2)                                         \
-  do {                                                               \
-    xbt_strbuff_append(buff, tmp=bprintf(fmt,elm,elm2));          \
-    free(tmp);                                                    \
-    precision = -1;                                               \
-  } while (0)
-
-#define ERRMSG "Unknown %%%c sequence in layout format (%s).\nKnown sequences:\n"                       \
-  "  what:        %%m: user message  %%c: log category  %%p: log priority\n"                      \
-  "  where:\n"                                                                                    \
+#define ERRMSG                                                          \
+  "Unknown %%%c sequence in layout format (%s).\n"                      \
+  "Known sequences:\n"                                                  \
+  "  what:        %%m: user message  %%c: log category  %%p: log priority\n" \
+  "  where:\n"                                                          \
   "    source:    %%F: file          %%L: line          %%M: function  %%l: location (%%F:%%L)\n" \
-  "    runtime:   %%h: hostname      %%t: thread        %%P: process   %%i: PID\n"                \
-  "    backtrace: %%b: full          %%B: short\n"                                                \
-  "  when:        %%d: date          %%r: app. age\n"                                             \
+  "    runtime:   %%h: hostname      %%t: thread        %%P: process   %%i: PID\n" \
+  "    backtrace: %%b: full          %%B: short\n"                      \
+  "  when:        %%d: date          %%r: app. age\n"                   \
   "  other:       %%%%: %%             %%n: new line      %%e: plain space\n"
 
-
-static void xbt_log_layout_format_dynamic(xbt_log_layout_t l,
-                                          xbt_log_event_t ev,
-                                          const char *fmt,
-                                          xbt_log_appender_t app)
-{
-  xbt_strbuff_t buff = xbt_strbuff_new();
-  char tmpfmt[50];
-  int precision = -1;
-  int length = -1;
-  char *q = l->data;
-  char *tmp;
-  char *tmp2;
-
-  while (*q != '\0') {
-    if (*q == '%') {
-      q++;
-    handle_modifier:
-      switch (*q) {
-      case '\0':
-        fprintf(stderr, "Layout format (%s) ending with %%\n",
-                (char *) l->data);
-        abort();
-      case '%':
-        xbt_strbuff_append(buff, "%");
-        break;
-      case 'n':                /* platform-dependant line separator (LOG4J compliant) */
-        xbt_strbuff_append(buff, "\n");
-        break;
-      case 'e':                /* plain space (SimGrid extension) */
-        xbt_strbuff_append(buff, " ");
-        break;
-
-      case '.':                /* precision specifyier */
-        q++;
-        sscanf(q, "%d", &precision);
-        q += (precision>9?2:1);
-        goto handle_modifier;
-
-      case '0':
-      case '1':
-      case '2':
-      case '3':
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-      case '8':
-      case '9': /* length modifier */
-        sscanf(q, "%d", &length);
-        q += (length>9?2:1);
-        goto handle_modifier;
-
-      case 'c':                /* category name; LOG4J compliant
-                                   should accept a precision postfix to show the hierarchy */
-        append_string(ev->cat->name);
-        break;
-      case 'p':                /* priority name; LOG4J compliant */
-        append_string(xbt_log_priority_names[ev->priority]);
-        break;
-
-      case 'h':                /* host name; SimGrid extension */
-        append_string(gras_os_myname());
-        break;
-      case 't':                /* thread name; LOG4J compliant */
-        append_string(xbt_thread_self_name());
-        break;
-      case 'P':                /* process name; SimGrid extension */
-        append_string(xbt_procname());
-        break;
-      case 'i':                /* process PID name; SimGrid extension */
-        append_int((*xbt_getpid) ());
-        break;
-
-      case 'F':                /* file name; LOG4J compliant */
-        append_string(ev->fileName);
-        break;
-      case 'l':                /* location; LOG4J compliant */
-        append2("%s:%d", ev->fileName, ev->lineNum);
-        precision = -1;         /* Ignored */
-        break;
-      case 'L':                /* line number; LOG4J compliant */
-        append_int(ev->lineNum);
-        break;
-      case 'M':                /* method (ie, function) name; LOG4J compliant */
-        append_string(ev->functionName);
-        break;
-      case 'b':                /* backtrace; called %throwable in LOG4J */
-      case 'B':                /* short backtrace; called %throwable{short} in LOG4J */
-#if defined(HAVE_EXECINFO_H) && defined(HAVE_POPEN) && defined(ADDR2LINE)
-        {
-          xbt_ex_t e;
-          int i;
-
-          e.used = backtrace((void **) e.bt, XBT_BACKTRACE_SIZE);
-          e.bt_strings = NULL;
-          e.msg = NULL;
-          e.remote = 0;
-          xbt_backtrace_current(&e);
-          if (*q == 'B') {
-            append_string(e.bt_strings[2] + 8);
-          } else {
-            for (i = 2; i < e.used; i++) {
-              append_string(e.bt_strings[i] + 8);
-              xbt_strbuff_append(buff, "\n");
-            }
-          }
-
-          xbt_ex_free(e);
-        }
-#else
-        append_string("(no backtrace on this arch)");
-#endif
-        break;
-
-      case 'd':                /* date; LOG4J compliant */
-        append_double(gras_os_time());
-        break;
-      case 'r':                /* application age; LOG4J compliant */
-        append_double(gras_os_time() - format_begin_of_time);
-        break;
-
-      case 'm':                /* user-provided message; LOG4J compliant */
-        tmp2 = bvprintf(fmt, ev->ap_copy);
-        append_string(tmp2);
-        free(tmp2);
-        break;
-
-      default:
-        fprintf(stderr, ERRMSG, *q, (char *) l->data);
-        abort();
-      }
-      q++;
-    } else {
-      char tmp2[2];
-      tmp2[0] = *(q++);
-      tmp2[1] = '\0';
-      xbt_strbuff_append(buff, tmp2);
-    }
-  }
-  app->do_append(app, buff->data);
-  xbt_strbuff_free(buff);
-}
-
-#undef check_overflow
-#define check_overflow \
-  if (p-ev->buffer > XBT_LOG_BUFF_SIZE) { /* buffer overflow */ \
-  xbt_log_layout_format_dynamic(l,ev,msg_fmt,app); \
-  return;\
-  }
-
-#define show_it(data,letter) \
-  do { \
-    if (precision == -1 && length == -1) { \
-      p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%" letter, data); \
-    } else if (precision == -1) { \
-      sprintf(tmpfmt,"%%%d" letter,length); \
-      p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), tmpfmt, data); \
-      length = -1; \
-    } else if (length == -1) { \
-      p += sprintf(p, "%.*" letter, \
-                   (int) MIN(XBT_LOG_BUFF_SIZE - (p - ev->buffer), precision), \
-                   data);\
-      precision = -1; \
-    } else { \
-      sprintf(tmpfmt,"%%%d.%d" letter,length, \
-          (int) MIN(XBT_LOG_BUFF_SIZE - (p - ev->buffer), precision));\
-      p += sprintf(p, tmpfmt, data);\
-      length = precision = -1; \
-    } \
-    check_overflow; \
-  } while (0)
+#define check_overflow(len)                                             \
+  if ((rem_size -= (len)) > 0) {                                        \
+    p += (len);                                                         \
+  } else                                                                \
+    return 0
+
+#define set_sz_from_precision()                                         \
+  if (1) {                                                              \
+    sz = rem_size;                                                      \
+    if (precision != -1) {                                              \
+      if (precision < sz)                                               \
+        sz = precision + 1;     /* +1 for the final '\0' */             \
+      precision = -1;                                                   \
+    }                                                                   \
+  } else (void)0
+
+#define show_it(data, letter)                                           \
+  if (1) {                                                              \
+    int len, wd;                                                        \
+    if (length == -1) {                                                 \
+      wd = 0;                                                           \
+    } else {                                                            \
+      wd = length;                                                      \
+      length = -1;                                                      \
+    }                                                                   \
+    if (precision == -1) {                                              \
+      len = snprintf(p, rem_size, "%*" letter, wd, data);               \
+    } else {                                                            \
+      len = snprintf(p, rem_size, "%*.*" letter, wd, precision, data);  \
+      precision = -1;                                                   \
+    }                                                                   \
+    check_overflow(len);                                                \
+  } else (void)0
 
 #define show_string(data) show_it(data, "s")
 #define show_int(data)    show_it(data, "d")
 #define show_double(data) show_it(data, "f")
 
-static void xbt_log_layout_format_doit(xbt_log_layout_t l,
-                                       xbt_log_event_t ev,
-                                       const char *msg_fmt,
-                                       xbt_log_appender_t app)
+static int xbt_log_layout_format_doit(xbt_log_layout_t l,
+                                      xbt_log_event_t ev,
+                                      const char *msg_fmt)
 {
-  char *p, *q;
-  char tmpfmt[50];
+  char *p = ev->buffer;
+  int rem_size = ev->buffer_size;
   int precision = -1;
   int length = -1;
+  char *q;
 
-
-  p = ev->buffer;
-  q = l->data;
-
-  while (*q != '\0') {
+  for (q = l->data ; *q != '\0' ; q++) {
     if (*q == '%') {
       q++;
     handle_modifier:
       switch (*q) {
       case '\0':
-        fprintf(stderr, "Layout format (%s) ending with %%\n",
-                (char *) l->data);
-        abort();
+        xbt_die("Layout format (%s) ending with %%\n", (char *)l->data);
       case '%':
-        *p++ = '%';
+        *p = '%';
+        check_overflow(1);
         break;
-      case 'n':                /* platform-dependant line separator (LOG4J compliant) */
-        p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "\n");
-        check_overflow;
+      case 'n':         /* platform-dependant line separator; LOG4J compliant */
+        *p = '\n';
+        check_overflow(1);
         break;
-      case 'e':                /* plain space (SimGrid extension) */
-        p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), " ");
-        check_overflow;
+      case 'e':                 /* plain space; SimGrid extension */
+        *p = ' ';
+        check_overflow(1);
         break;
-
-      case '.':                /* precision specifyier */
-        q++;
-        sscanf(q, "%d", &precision);
-        q += (precision>9?2:1);
+      case '.':                 /* precision specifier */
+        precision = strtol(q + 1, &q, 10);
         goto handle_modifier;
-
       case '0':
       case '1':
       case '2':
@@ -285,127 +109,99 @@ static void xbt_log_layout_format_doit(xbt_log_layout_t l,
       case '6':
       case '7':
       case '8':
-      case '9': /* length modifier */
-        sscanf(q, "%d", &length);
-        q += (length>9?2:1);
+      case '9':                 /* length modifier */
+        length = strtol(q, &q, 10);
         goto handle_modifier;
-
-      case 'c':                /* category name; LOG4J compliant
-                                   should accept a precision postfix to show the hierarchy */
+      case 'c':                 /* category name; LOG4J compliant
+                                   should accept a precision postfix to show the
+                                   hierarchy */
         show_string(ev->cat->name);
         break;
-      case 'p':                /* priority name; LOG4J compliant */
+      case 'p':                 /* priority name; LOG4J compliant */
         show_string(xbt_log_priority_names[ev->priority]);
         break;
-
-      case 'h':                /* host name; SimGrid extension */
+      case 'h':                 /* host name; SimGrid extension */
         show_string(gras_os_myname());
         break;
-      case 't':                /* thread name; LOG4J compliant */
+      case 't':                 /* thread name; LOG4J compliant */
         show_string(xbt_thread_self_name());
         break;
-      case 'P':                /* process name; SimGrid extension */
+      case 'P':                 /* process name; SimGrid extension */
         show_string(xbt_procname());
         break;
-      case 'i':                /* process PID name; SimGrid extension */
-        show_int((*xbt_getpid) ());
+      case 'i':                 /* process PID name; SimGrid extension */
+        show_int(xbt_getpid());
         break;
-
-      case 'F':                /* file name; LOG4J compliant */
+      case 'F':                 /* file name; LOG4J compliant */
         show_string(ev->fileName);
         break;
-      case 'l':                /* location; LOG4J compliant */
-        if (precision == -1) {
-          p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%d",
-                        ev->fileName, ev->lineNum);
-          check_overflow;
-        } else {
-          p += snprintf(p,
-                        (int) MIN(XBT_LOG_BUFF_SIZE - (p - ev->buffer),
-                                  precision), "%s:%d", ev->fileName,
-                        ev->lineNum);
-          check_overflow;
-          precision = -1;
-        }
+      case 'l': {               /* location; LOG4J compliant */
+        int len, sz;
+        set_sz_from_precision();
+        len = snprintf(p, sz, "%s:%d", ev->fileName, ev->lineNum);
+        check_overflow(MIN(sz, len));
         break;
-      case 'L':                /* line number; LOG4J compliant */
+      }
+      case 'L':                 /* line number; LOG4J compliant */
         show_int(ev->lineNum);
         break;
       case 'M':                /* method (ie, function) name; LOG4J compliant */
         show_string(ev->functionName);
         break;
-      case 'b':                /* backtrace; called %throwable in LOG4J */
-      case 'B':                /* short backtrace; called %throwable{short} in LOG4J */
+      case 'b':                 /* backtrace; called %throwable in LOG4J */
+      case 'B':         /* short backtrace; called %throwable{short} in LOG4J */
 #if defined(HAVE_EXECINFO_H) && defined(HAVE_POPEN) && defined(ADDR2LINE)
         {
           xbt_ex_t e;
-          int i;
 
           e.used = backtrace((void **) e.bt, XBT_BACKTRACE_SIZE);
           e.bt_strings = NULL;
           e.msg = NULL;
           e.remote = 0;
-          xbt_backtrace_current(&e);
+          xbt_ex_setup_backtrace(&e);
           if (*q == 'B') {
-            show_string(e.bt_strings[2] + 8);
+            show_string(e.bt_strings[1] + 8);
           } else {
-            for (i = 2; i < e.used; i++)
-              if (precision == -1) {
-                p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer),
-                              "%s\n", e.bt_strings[i] + 8);
-                check_overflow;
-              } else {
-                p += sprintf(p, "%.*s\n",
-                             (int) MIN(XBT_LOG_BUFF_SIZE -
-                                       (p - ev->buffer), precision),
-                             e.bt_strings[i] + 8);
-                check_overflow;
-                precision = -1;
-              }
+            xbt_strbuff_t buff = xbt_strbuff_new();
+            int i;
+            xbt_strbuff_append(buff, e.bt_strings[1] + 8);
+            for (i = 2; i < e.used; i++) {
+              xbt_strbuff_append(buff, "\n");
+              xbt_strbuff_append(buff, e.bt_strings[i] + 8);
+            }
+            show_string(buff->data);
+            xbt_strbuff_free(buff);
           }
-
           xbt_ex_free(e);
         }
 #else
-        p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer),
-                      "(no backtrace on this arch)");
-        check_overflow;
+        show_string("(no backtrace on this arch)");
 #endif
         break;
-
-      case 'd':                /* date; LOG4J compliant */
+      case 'd':                 /* date; LOG4J compliant */
         show_double(gras_os_time());
         break;
-      case 'r':                /* application age; LOG4J compliant */
+      case 'r':                 /* application age; LOG4J compliant */
         show_double(gras_os_time() - format_begin_of_time);
         break;
-
-      case 'm':                /* user-provided message; LOG4J compliant */
-        if (precision == -1) {
-          p += vsnprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), msg_fmt,
-                         ev->ap);
-          check_overflow;
-        } else {
-          p += vsnprintf(p,
-                         (int) MIN(XBT_LOG_BUFF_SIZE - (p - ev->buffer),
-                                   precision), msg_fmt, ev->ap);
-          check_overflow;
-          precision = -1;
-        }
+      case 'm': {               /* user-provided message; LOG4J compliant */
+        int len, sz;
+        set_sz_from_precision();
+        len = vsnprintf(p, sz, msg_fmt, ev->ap);
+        check_overflow(MIN(sz, len));
         break;
-
+      }
       default:
-        fprintf(stderr, ERRMSG, *q, (char *) l->data);
-        abort();
+        xbt_die(ERRMSG, *q, (char *)l->data);
       }
-      q++;
     } else {
-      *(p++) = *(q++);
-      check_overflow;
+      *p = *q;
+      check_overflow(1);
     }
   }
   *p = '\0';
-  app->do_append(app, ev->buffer);
+
+  return 1;
 }
 
 static void xbt_log_layout_format_free(xbt_log_layout_t lay)
index f6a09be..30108d4 100644 (file)
@@ -1,6 +1,6 @@
 /* layout_simple - a dumb log layout                                        */
 
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -20,97 +20,59 @@ extern int xbt_log_no_loc;
 
 static double simple_begin_of_time = -1;
 
-static void xbt_log_layout_simple_dynamic(xbt_log_layout_t l,
-                                          xbt_log_event_t ev,
-                                          const char *fmt,
-                                          xbt_log_appender_t app)
-{
-  xbt_strbuff_t buff = xbt_strbuff_new();
-  char loc_buff[256];
-  char *p;
-
-  /* Put every static information in a static buffer, and copy them in the dyn one */
-  p = loc_buff;
-  p += snprintf(p, 256 - (p - loc_buff), "[");
-
-  if (strlen(xbt_procname()))
-    p += snprintf(p, 256 - (p - loc_buff), "%s:%s:(%d) ",
-                  gras_os_myname(), xbt_procname(), (*xbt_getpid) ());
-  p += snprintf(p, 256 - (p - loc_buff), "%f] ",
-                gras_os_time() - simple_begin_of_time);
-  if (ev->priority != xbt_log_priority_info && xbt_log_no_loc == 0)
-    p += snprintf(p, 256 - (p - loc_buff), "%s:%d: ", ev->fileName,
-                  ev->lineNum);
-  p += snprintf(p, 256 - (p - loc_buff), "[%s/%s] ", ev->cat->name,
-                xbt_log_priority_names[ev->priority]);
-
-  xbt_strbuff_append(buff, loc_buff);
-
-  p = bvprintf(fmt, ev->ap_copy);
-  xbt_strbuff_append(buff, p);
-  free(p);
-
-  xbt_strbuff_append(buff, "\n");
-
-  app->do_append(app, buff->data);
-  xbt_strbuff_free(buff);
-}
-
-/* only used after the format using: we suppose that the buffer is big enough to display our data */
-#undef check_overflow
-#define check_overflow \
-  if (p-ev->buffer > XBT_LOG_BUFF_SIZE) { /* buffer overflow */ \
-  xbt_log_layout_simple_dynamic(l,ev,fmt,app); \
-  return; \
-  }
+#define check_overflow(len)                                             \
+  if ((rem_size -= (len)) > 0) {                                        \
+    p += (len);                                                         \
+  } else                                                                \
+    return 0
 
-static void xbt_log_layout_simple_doit(xbt_log_layout_t l,
-                                       xbt_log_event_t ev,
-                                       const char *fmt,
-                                       xbt_log_appender_t app)
+static int xbt_log_layout_simple_doit(xbt_log_layout_t l,
+                                      xbt_log_event_t ev,
+                                      const char *fmt)
 {
-  char *p;
-  const char *procname = NULL;
-  xbt_assert(ev->priority >= 0,
-              "Negative logging priority naturally forbidden");
-  xbt_assert(ev->priority < sizeof(xbt_log_priority_names),
-              "Priority %d is greater than the biggest allowed value",
-              ev->priority);
-
-  p = ev->buffer;
-  p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "[");
-  check_overflow;
+  char *p = ev->buffer;
+  int rem_size = ev->buffer_size;
+  const char *procname;
+  int len;
+
+  *p = '[';
+  check_overflow(1);
 
   /* Display the proc info if available */
   procname = xbt_procname();
-  if (strlen(procname)) {
-    p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%s:(%d) ",
-                  gras_os_myname(), procname, (*xbt_getpid) ());
-    check_overflow;
+  if (*procname) {
+    len = snprintf(p, rem_size, "%s:%s:(%d) ",
+                   gras_os_myname(), procname, xbt_getpid());
+    check_overflow(len);
   }
 
   /* Display the date */
-  p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%f] ",
-                gras_os_time() - simple_begin_of_time);
-  check_overflow;
+  len = snprintf(p, rem_size, "%f] ",
+                 gras_os_time() - simple_begin_of_time);
+  check_overflow(len);
 
   /* Display file position if not INFO */
-  if (ev->priority != xbt_log_priority_info && !xbt_log_no_loc)
-    p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "%s:%d: ",
-                  ev->fileName, ev->lineNum);
+  if (ev->priority != xbt_log_priority_info && !xbt_log_no_loc) {
+    len = snprintf(p, rem_size, "%s:%d: ",
+                   ev->fileName, ev->lineNum);
+    check_overflow(len);
+  }
 
   /* Display category name */
-  p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "[%s/%s] ",
-                ev->cat->name, xbt_log_priority_names[ev->priority]);
+  len = snprintf(p, rem_size, "[%s/%s] ",
+                 ev->cat->name, xbt_log_priority_names[ev->priority]);
+  check_overflow(len);
 
   /* Display user-provided message */
-  p += vsnprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), fmt, ev->ap);
-  check_overflow;
+  len = vsnprintf(p, rem_size, fmt, ev->ap);
+  check_overflow(len);
 
   /* End it */
-  p += snprintf(p, XBT_LOG_BUFF_SIZE - (p - ev->buffer), "\n");
-  check_overflow;
-  app->do_append(app, ev->buffer);
+  *p = '\n';
+  check_overflow(1);
+  *p = '\0';
+
+  return 1;
 }
 
 xbt_log_layout_t xbt_log_layout_simple_new(char *arg)
index c0cac04..db5e33e 100644 (file)
@@ -31,13 +31,9 @@ XBT_LOG_EXTERNAL_CATEGORY(peer);
 XBT_LOG_EXTERNAL_CATEGORY(strbuff);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
-XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_add);
-XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_collapse);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_cursor);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_elm);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_multi);
-XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_remove);
-XBT_LOG_EXTERNAL_CATEGORY(xbt_dict_search);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_dyn);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_ex);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_fifo);
@@ -105,13 +101,9 @@ static void xbt_preinit(void)
   XBT_LOG_CONNECT(strbuff, xbt);
   XBT_LOG_CONNECT(xbt_cfg, xbt);
   XBT_LOG_CONNECT(xbt_dict, xbt);
-  XBT_LOG_CONNECT(xbt_dict_add, xbt_dict);
-  XBT_LOG_CONNECT(xbt_dict_collapse, xbt_dict);
   XBT_LOG_CONNECT(xbt_dict_cursor, xbt_dict);
   XBT_LOG_CONNECT(xbt_dict_elm, xbt_dict);
   XBT_LOG_CONNECT(xbt_dict_multi, xbt_dict);
-  XBT_LOG_CONNECT(xbt_dict_remove, xbt_dict);
-  XBT_LOG_CONNECT(xbt_dict_search, xbt_dict);
   XBT_LOG_CONNECT(xbt_dyn, xbt);
   XBT_LOG_CONNECT(xbt_ex, xbt);
   XBT_LOG_CONNECT(xbt_fifo, xbt);
index 80e60d3..d5f0417 100644 (file)
@@ -47,7 +47,7 @@ void xbt_matrix_free(xbt_matrix_t mat)
   if (mat) {
     if (mat->free_f) {
       for (i = 0; i < (mat->lines * mat->rows); i++) {
-        (*(mat->free_f)) ((void *) &(mat->data[i * mat->elmsize]));
+        mat->free_f((void *) &(mat->data[i * mat->elmsize]));
       }
     }
     free(mat->data);
@@ -78,7 +78,7 @@ void xbt_matrix_dump(xbt_matrix_t matrix, const char *name, int coords,
         fprintf(stderr, " (%d,%d)=", i, j);
       else
         fprintf(stderr, " ");
-      (*display_fun) (xbt_matrix_get_ptr(matrix, i, j));
+      display_fun(xbt_matrix_get_ptr(matrix, i, j));
     }
     fprintf(stderr, "\n");
   }
@@ -128,7 +128,7 @@ void xbt_matrix_copy_values(xbt_matrix_t dst, xbt_matrix_t src,
     if (cpy_f) {
       for (j = 0; j < lsize; j++)
         xbt_matrix_get_as(dst, j + lpos_dst, i + rpos_dst, void *) =
-            (*cpy_f) (xbt_matrix_get_ptr(src, j + rpos_src, i + lpos_src));
+            cpy_f(xbt_matrix_get_ptr(src, j + rpos_src, i + lpos_src));
     } else {
       memcpy(xbt_matrix_get_ptr(dst, lpos_dst, i + rpos_dst),
              xbt_matrix_get_ptr(src, lpos_src, i + rpos_src),
index b2be4c7..a53dfc9 100644 (file)
@@ -149,7 +149,7 @@ static void *wrapper_start_routine(void *s)
     THROWF(system_error, errcode,
            "pthread_setspecific failed for xbt_self_thread_key");
 
-  void *res = (*(t->start_routine)) (t->param);
+  void *res = t->start_routine(t->param);
   if (t->detached)
     xbt_os_thread_free_thread_data(t);
   return res;
@@ -729,8 +729,7 @@ void xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return)
 
   CloseHandle(thread->handle);
 
-  if (thread->name)
-    free(thread->name);
+  free(thread->name);
 
   free(thread);
 }
index 23d7ca4..80dae08 100644 (file)
@@ -48,8 +48,7 @@ xbt_peer_t xbt_peer_from_string(const char *peerport)
 void xbt_peer_free(xbt_peer_t peer)
 {
   if (peer) {
-    if (peer->name)
-      free(peer->name);
+    free(peer->name);
     free(peer);
   }
 }
index 7a38199..76a828c 100644 (file)
@@ -100,7 +100,7 @@ void xbt_queue_push(xbt_queue_t queue, const void *src)
 void xbt_queue_pop(xbt_queue_t queue, void *const dst)
 {
   xbt_mutex_acquire(queue->mutex);
-  while (xbt_dynar_length(queue->data) == 0) {
+  while (xbt_dynar_is_empty(queue->data)) {
     XBT_DEBUG("Queue %p empty. Waiting", queue);
     xbt_cond_wait(queue->not_empty, queue->mutex);
   }
@@ -140,7 +140,7 @@ void xbt_queue_unshift(xbt_queue_t queue, const void *src)
 void xbt_queue_shift(xbt_queue_t queue, void *const dst)
 {
   xbt_mutex_acquire(queue->mutex);
-  while (xbt_dynar_length(queue->data) == 0) {
+  while (xbt_dynar_is_empty(queue->data)) {
     XBT_DEBUG("Queue %p empty. Waiting", queue);
     xbt_cond_wait(queue->not_empty, queue->mutex);
   }
@@ -207,12 +207,12 @@ void xbt_queue_pop_timed(xbt_queue_t queue, void *const dst, double delay)
   xbt_mutex_acquire(queue->mutex);
 
   if (delay == 0) {
-    if (xbt_dynar_length(queue->data) == 0) {
+    if (xbt_dynar_is_empty(queue->data)) {
       xbt_mutex_release(queue->mutex);
       THROWF(timeout_error, 0, "Delay = 0, and queue is empty");
     }
   } else {
-    while ((xbt_dynar_length(queue->data) == 0) &&
+    while ((xbt_dynar_is_empty(queue->data)) &&
            (delay < 0 || (xbt_time() - begin) <= delay)) {
       XBT_DEBUG("Queue %p empty. Waiting", queue);
       TRY {
@@ -288,12 +288,12 @@ void xbt_queue_shift_timed(xbt_queue_t queue, void *const dst,
   xbt_mutex_acquire(queue->mutex);
 
   if (delay == 0) {
-    if (xbt_dynar_length(queue->data) == 0) {
+    if (xbt_dynar_is_empty(queue->data)) {
       xbt_mutex_release(queue->mutex);
       THROWF(timeout_error, 0, "Delay = 0, and queue is empty");
     }
   } else {
-    while ((xbt_dynar_length(queue->data) == 0) &&
+    while ((xbt_dynar_is_empty(queue->data)) &&
            (delay < 0 || (xbt_time() - begin) <= delay)) {
       XBT_DEBUG("Queue %p empty. Waiting", queue);
       TRY {
@@ -307,7 +307,7 @@ void xbt_queue_shift_timed(xbt_queue_t queue, void *const dst,
     }
   }
 
-  if (xbt_dynar_length(queue->data) == 0) {
+  if (xbt_dynar_is_empty(queue->data)) {
     xbt_mutex_release(queue->mutex);
     THROWF(timeout_error, 0, "Timeout (%f) elapsed, but queue still empty",
            delay);
index 0c02352..1d34538 100644 (file)
@@ -34,8 +34,7 @@ xbt_replay_trace_reader_t xbt_replay_trace_reader_new(const char *filename)
 
 const char *xbt_replay_trace_reader_position(xbt_replay_trace_reader_t reader)
 {
-  if (reader->position)
-    free(reader->position);
+  free(reader->position);
   reader->position = bprintf("%s:%d",reader->filename,reader->linenum);
   return reader->position;
 }
@@ -57,7 +56,7 @@ const char **xbt_replay_trace_reader_get(xbt_replay_trace_reader_t reader)
     return xbt_replay_trace_reader_get(reader); /* Get next line */
 
   d=xbt_str_split_quoted_in_place(reader->line);
-  if (xbt_dynar_length(d)==0) {
+  if (xbt_dynar_is_empty(d)) {
     xbt_dynar_free(&d);
     return xbt_replay_trace_reader_get(reader); /* Get next line */
   }
@@ -67,8 +66,7 @@ const char **xbt_replay_trace_reader_get(xbt_replay_trace_reader_t reader)
 void xbt_replay_trace_reader_free(xbt_replay_trace_reader_t *reader)
 {
   free((*reader)->filename);
-  if ((*reader)->position)
-    free((*reader)->position);
+  free((*reader)->position);
   fclose((*reader)->fp);
   free((*reader)->line);
   free(*reader);
index 3ae9acb..a0a855b 100644 (file)
@@ -31,7 +31,7 @@ static void *xbt_thread_create_wrapper(void *p)
 {
   xbt_thread_t t = (xbt_thread_t) p;
   XBT_DEBUG("I'm thread %p", p);
-  (*t->code) (t->userparam);
+  t->code(t->userparam);
   return NULL;
 }
 
index 34d2244..df45b81 100644 (file)
@@ -36,10 +36,11 @@ typedef struct s_xbt_thread_ {
 
 static int xbt_thread_create_wrapper(int argc, char *argv[])
 {
+  smx_process_t self = SIMIX_process_self();
   xbt_thread_t t =
-      (xbt_thread_t) SIMIX_process_self_get_data();
-  SIMIX_req_process_set_data(SIMIX_process_self(), t->father_data);
-  (*t->code) (t->userparam);
+      (xbt_thread_t) SIMIX_process_self_get_data(self);
+  SIMIX_req_process_set_data(self, t->father_data);
+  t->code(t->userparam);
   if (t->joinable) {
     t->done = 1;
     xbt_mutex_acquire(t->mutex);
@@ -61,7 +62,7 @@ xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
   res->name = xbt_strdup(name);
   res->userparam = param;
   res->code = code;
-  res->father_data = SIMIX_process_self_get_data();
+  res->father_data = SIMIX_process_self_get_data(SIMIX_process_self());
   /*   char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
   SIMIX_req_process_create(&res->s_process, name,
                            xbt_thread_create_wrapper, res,
@@ -118,12 +119,12 @@ void xbt_thread_exit()
 
 xbt_thread_t xbt_thread_self(void)
 {
-  return SIMIX_process_self_get_data();
+  return SIMIX_process_self_get_data(SIMIX_process_self());
 }
 
 void xbt_thread_yield(void)
 {
-  SIMIX_process_yield();
+  SIMIX_process_yield(SIMIX_process_self());
 }
 
 /****** mutex related functions ******/
index 12b674a..6438d43 100644 (file)
@@ -191,14 +191,21 @@ void xbt_str_subst(char *str, char from, char to, int occurence)
 
 /** @brief Replaces a set of variables by their values
  *
- * @param str where to apply the change
- * @param patterns what to change
+ * @param str The input of the replacement process
+ * @param patterns The changes to apply
  * @return The string modified
  *
- * Check xbt_strbuff_varsubst() for more details, and remember that the string may be reallocated (moved) in the process.
+ * Both '$toto' and '${toto}' are valid (and the two writing are equivalent).
+ *
+ * If the variable name contains spaces, use the brace version (ie, ${toto tutu})
+ *
+ * You can provide a default value to use if the variable is not set in the dict by using
+ * '${var:=default}' or '${var:-default}'. These two forms are equivalent, even if they
+ * shouldn't to respect the shell standard (:= form should set the value in the dict,
+ * but does not) (BUG).
  */
 
-char *xbt_str_varsubst(char *str, xbt_dict_t patterns)
+char *xbt_str_varsubst(const char *str, xbt_dict_t patterns)
 {
   xbt_strbuff_t buff = xbt_strbuff_new_from(str);
   char *res;
index 6f470ed..688b4d9 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: buff.c 3483 2007-05-07 11:18:56Z mquinson $ */
-
 /* strbuff -- string buffers                                                */
 
 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
@@ -26,8 +24,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(strbuff, xbt, "String buffers");
 XBT_INLINE void xbt_strbuff_empty(xbt_strbuff_t b)
 {
   b->used = 0;
-  b->data[0] = '\n';
-  b->data[1] = '\0';
+  b->data[0] = '\0';
 }
 
 xbt_strbuff_t xbt_strbuff_new(void)
@@ -41,12 +38,12 @@ xbt_strbuff_t xbt_strbuff_new(void)
 
 /** @brief creates a new string buffer containing the provided string
  *
- * Beware, we store the ctn directly, not a copy of it
+ * Beware, the ctn is copied, you want to free it afterward, anyhow
  */
-XBT_INLINE xbt_strbuff_t xbt_strbuff_new_from(char *ctn)
+XBT_INLINE xbt_strbuff_t xbt_strbuff_new_from(const char *ctn)
 {
   xbt_strbuff_t res = malloc(sizeof(s_xbt_strbuff_t));
-  res->data = ctn;
+  res->data = xbt_strdup(ctn);
   res->used = res->size = strlen(ctn);
   return res;
 }
@@ -61,8 +58,7 @@ XBT_INLINE void xbt_strbuff_free_container(xbt_strbuff_t b)
 XBT_INLINE void xbt_strbuff_free(xbt_strbuff_t b)
 {
   if (b) {
-    if (b->data)
-      free(b->data);
+    free(b->data);
     free(b);
   }
 }
@@ -79,9 +75,8 @@ void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
   needed_space = b->used + addlen + 1;
 
   if (needed_space > b->size) {
-    b->data =
-        realloc(b->data, MAX(minimal_increment + b->used, needed_space));
     b->size = MAX(minimal_increment + b->used, needed_space);
+    b->data = realloc(b->data, b->size);
   }
   strcpy(b->data + b->used, toadd);
   b->used += addlen;
@@ -89,10 +84,9 @@ void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
 
 XBT_INLINE void xbt_strbuff_chomp(xbt_strbuff_t b)
 {
-  while (b->data[b->used] == '\n') {
+  while (b->used && b->data[b->used - 1] == '\n') {
+    b->used--;
     b->data[b->used] = '\0';
-    if (b->used)
-      b->used--;
   }
 }
 
@@ -275,8 +269,7 @@ void xbt_strbuff_varsubst(xbt_strbuff_t b, xbt_dict_t patterns)
         }
         free(value);
 
-        if (default_value)
-          free(default_value);
+        free(default_value);
 
         end--;                  /* compensate the next end++ */
       }
@@ -314,14 +307,14 @@ static void mytest(const char *input, const char *patterns,
   char *str;                    /*foreach */
   xbt_strbuff_t sb;             /* what we test */
 
-  p = xbt_dict_new();
+  p = xbt_dict_new_homogeneous(free);
   dyn_patterns = xbt_str_split(patterns, " ");
   xbt_dynar_foreach(dyn_patterns, cpt, str) {
     xbt_dynar_t keyvals = xbt_str_split(str, "=");
     char *key = xbt_dynar_get_as(keyvals, 0, char *);
     char *val = xbt_dynar_get_as(keyvals, 1, char *);
     xbt_str_subst(key, '_', ' ', 0);    // to put space in names without breaking the enclosing dynar_foreach
-    xbt_dict_set(p, key, xbt_strdup(val), free);
+    xbt_dict_set(p, key, xbt_strdup(val), NULL);
     xbt_dynar_free(&keyvals);
   }
   xbt_dynar_free(&dyn_patterns);
index 5b78e0a..e76bb4e 100644 (file)
@@ -29,7 +29,7 @@ static void worker_wait_n_free(void *w)
 static void worker_wrapper(void *w)
 {
   worker_data_t me = (worker_data_t) w;
-  (*me->function) (me->rank, xbt_dynar_get_ptr(me->data, me->rank));
+  me->function(me->rank, xbt_dynar_get_ptr(me->data, me->rank));
 }
 
 void xbt_dynar_dopar(xbt_dynar_t datas, void_f_int_pvoid_t function)
@@ -38,11 +38,11 @@ void xbt_dynar_dopar(xbt_dynar_t datas, void_f_int_pvoid_t function)
       xbt_dynar_new(sizeof(worker_data_t), worker_wait_n_free);
   unsigned int cursor;
   void *data;
-  if (xbt_dynar_length(datas) == 0)
+  if (xbt_dynar_is_empty(datas))
     return;                     /* nothing to do */
   if (xbt_dynar_length(datas) == 1) {
     /* don't start any new thread, do it directly */
-    (*function) (0, xbt_dynar_get_ptr(datas, 0));
+    function(0, xbt_dynar_get_ptr(datas, 0));
     return;
   }
   /* Start all workers */
index 10a5e8b..9327d3c 100644 (file)
@@ -147,7 +147,7 @@ static void test_dynar_empty(gras_socket_t sock, int direction)
   write_read("xbt_dynar_of_int", &i, &j, sock, direction);
   /*  xbt_dynar_dump(j); */
   if (direction == READ || direction == COPY) {
-    xbt_assert(xbt_dynar_length(j) == 0);
+    xbt_assert(xbt_dynar_is_empty(j));
     xbt_dynar_free(&j);
   }
   xbt_dynar_free(&i);
@@ -475,12 +475,11 @@ static void test_pbio(gras_socket_t sock, int direction)
 {
   int cpt;
   int cpt2;
-  gras_datadesc_type_t pbio_type;
   pbio_t i, j;
 
   XBT_INFO
       ("---- Test on the PBIO IEEE struct (also tests GRAS DEFINE TYPE) ----");
-  pbio_type = gras_datadesc_by_symbol(s_pbio);
+  gras_datadesc_by_symbol(s_pbio); 
 
   /* Fill in that damn struct */
   i.Cnstatv = 325115;
index f2a9d00..83e6d5c 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: gras.c 3859 2007-07-18 12:29:51Z donassbr $ */
-
 /* empty_main.c -- check what happens when the processes do nothing         */
 /* Thanks to Loris Marshal for reporting a problem in that case             */
 
index 08f00ce..6943fdb 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: mmrpc.c 3399 2007-04-11 19:34:43Z cherierm $ */
-
 /* msg_handle - ensures the semantic of gras_msg_handle(i) for i<0,=0 or >0 */
 
 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
@@ -25,13 +23,13 @@ static int server_cb_hello_handler(gras_msg_cb_ctx_t ctx,
 
 int server(int argc, char *argv[])
 {
-  gras_socket_t me = NULL, pal = NULL;
+  volatile gras_socket_t me = NULL, pal = NULL;
   int myport;
   char *palstr;
 
   xbt_ex_t e;
-  int got_expected;
-  double now;
+  _XBT_GNUC_UNUSED int got_expected;
+  _XBT_GNUC_UNUSED double now;
 
 
   gras_init(&argc, argv);
@@ -116,7 +114,7 @@ int server(int argc, char *argv[])
 
 int client(int argc, char *argv[])
 {
-  gras_socket_t me = NULL, pal = NULL;
+  volatile gras_socket_t me = NULL, pal = NULL;
   int myport;
   char *palstr;
 
index 622565e..e5fd687 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: gras.c 3859 2007-07-18 12:29:51Z donassbr $ */
-
 /* small_sleep.c -- check what happens when the processes do sleeps very shortly*/
 
 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
diff --git a/teshsuite/simdag/.gitignore b/teshsuite/simdag/.gitignore
deleted file mode 100644 (file)
index 9cdc1c8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-basic0
-basic1
-basic2
-basic3
-basic4
-basic5
-basic6
index 454725e..f48f761 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "simdag/simdag.h"
+#include "xbt/asserts.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic6, sd, "SimDag test basic6");
@@ -32,6 +33,8 @@ int main(int argc, char **argv)
                    comm_cost, -1.0);
 
   ret = SD_simulate(-1.0);
+  xbt_assert(xbt_dynar_length(ret) == 2,
+      "I was expecting the terminaison of 2 tasks, but I got %lu instead", xbt_dynar_length(ret));
   xbt_dynar_free(&ret);
   SD_task_destroy(taskA);
   SD_task_destroy(taskB);
diff --git a/teshsuite/simdag/network/.gitignore b/teshsuite/simdag/network/.gitignore
deleted file mode 100644 (file)
index e954405..0000000
+++ /dev/null
@@ -1 +0,0 @@
-test_reinit_costs
diff --git a/teshsuite/simdag/network/mxn/.gitignore b/teshsuite/simdag/network/mxn/.gitignore
deleted file mode 100644 (file)
index fa1ef1e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-test_intra_all2all
-test_intra_independent_comm
-test_intra_scatter
diff --git a/teshsuite/simdag/network/p2p/.gitignore b/teshsuite/simdag/network/p2p/.gitignore
deleted file mode 100644 (file)
index 037da5f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-test_latency1
-test_latency2
-test_latency3
-test_latency_bound
diff --git a/teshsuite/simdag/partask/.gitignore b/teshsuite/simdag/partask/.gitignore
deleted file mode 100644 (file)
index 9b843b4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-test_comp_only_par
-test_comp_only_seq
index c145246..a96cf63 100644 (file)
@@ -5,20 +5,23 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 add_executable(basic_parsing_test basic_parsing_test.c)
 add_executable(is_router_test is_router_test.c)
 add_executable(flatifier flatifier.c)
-if(NOT WIN32 AND NOT APPLE)
 add_executable(evaluate_parse_time Evaluate_parse_time.c)
 add_executable(evaluate_get_route_time Evaluate_get_route_time.c)
-endif(NOT WIN32 AND NOT APPLE)
+add_executable(basic_tracing basic_tracing.c)
 
 ### Add definitions for compile
-if(NOT WIN32 AND NOT APPLE)
+if(NOT WIN32)
 target_link_libraries(evaluate_get_route_time simgrid m)
 target_link_libraries(evaluate_parse_time simgrid m)
 target_link_libraries(basic_parsing_test simgrid m)
 target_link_libraries(is_router_test simgrid m)
 target_link_libraries(flatifier simgrid m)
-else(NOT WIN32 AND NOT APPLE)
+target_link_libraries(basic_tracing simgrid m)
+else(NOT WIN32)
+target_link_libraries(evaluate_parse_time simgrid)
+target_link_libraries(evaluate_get_route_time simgrid)
 target_link_libraries(basic_parsing_test simgrid)
 target_link_libraries(is_router_test simgrid)
 target_link_libraries(flatifier simgrid)
-endif(NOT WIN32 AND NOT APPLE)
\ No newline at end of file
+target_link_libraries(basic_tracing simgrid)
+endif(NOT WIN32)
\ No newline at end of file
index 828b4ca..02720c5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2008, 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "simdag/simdag.h"
 #include "surf/surf_private.h"
-#include <time.h>
+#include "xbt/xbt_os_time.h"
 
 #define BILLION  1000000000L;
 extern routing_global_t global_routing;
@@ -22,8 +22,7 @@ int main(int argc, char **argv)
        const SD_workstation_t *workstations;
        int i, j;
        int list_size;
-       struct timespec start, stop;
-       double accum;
+       xbt_os_timer_t timer = xbt_os_timer_new();
 
        /* initialisation of SD */
        SD_init(&argc, argv);
@@ -34,12 +33,8 @@ int main(int argc, char **argv)
        workstations = SD_workstation_get_list();
        list_size = SD_workstation_get_number();
 
-       unsigned int seed;
-       struct timespec time;
-       clock_gettime( CLOCK_REALTIME, &time);
-       seed = time.tv_nsec;
-
-       srand(seed);
+       /* Random number initialization */
+       srand( (int) (xbt_os_time()*1000) );
 
        do{
                i = rand()%list_size;
@@ -50,22 +45,11 @@ int main(int argc, char **argv)
        w2 = workstations[j];
        printf("%d\tand\t%d\t\t",i,j);
 
-       if( clock_gettime( CLOCK_REALTIME, &start) == -1 ) {
-       perror( "clock gettime" );
-       return EXIT_FAILURE;
-       }
-
+       xbt_os_timer_start(timer);
        SD_route_get_list(w1, w2);
+  xbt_os_timer_stop(timer);
 
-       if( clock_gettime( CLOCK_REALTIME, &stop) == -1 ) {
-       perror( "clock gettime" );
-       return EXIT_FAILURE;
-       }
-
-       accum = ( stop.tv_sec - start.tv_sec )
-          + (double)( stop.tv_nsec - start.tv_nsec )
-                / (double)BILLION;
-       printf("%lf\n", accum);
+       printf("%lf\n", xbt_os_timer_elapsed(timer) );
 
        SD_exit();
 
index 11ffd3d..42f2f62 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2008, 2009, 2010, 2011. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <stdlib.h>
 #include "simdag/simdag.h"
 #include "surf/surf_private.h"
-#include <time.h>
+#include "xbt/xbt_os_time.h"
 
-#define BILLION  1000000000L;
 extern routing_global_t global_routing;
 
 int main(int argc, char **argv)
 {
-       struct timespec start, stop;
-       double accum;
+  xbt_os_timer_t timer = xbt_os_timer_new();
 
-       /* initialisation of SD */
+       /* initialization of SD */
        SD_init(&argc, argv);
 
-       if( clock_gettime( CLOCK_REALTIME, &start) == -1 ) {
-       perror( "clock gettime" );
-       return EXIT_FAILURE;
-       }
-
-       /* creation of the environment */
+       /* creation of the environment, timed */
+       xbt_os_timer_start(timer);
        SD_create_environment(argv[1]);
-
-       if( clock_gettime( CLOCK_REALTIME, &stop) == -1 ) {
-       perror( "clock gettime" );
-       return EXIT_FAILURE;
+  xbt_os_timer_stop(timer);
+
+  /* Display the result and exit after cleanup */
+       printf( "%lf\n", xbt_os_timer_elapsed(timer) );
+         printf("Workstation number: %d, link number: %d\n",
+                SD_workstation_get_number(), SD_link_get_number());
+       if(argv[2]){
+               printf("Wait for %ss\n",argv[2]);
+               sleep(atoi(argv[2]));
        }
 
-       accum = ( stop.tv_sec - start.tv_sec )
-                  + (double)( stop.tv_nsec - start.tv_nsec )
-                        / (double)BILLION;
-
-       printf( "%lf\n", accum );
-
-       sleep(20);
-
        SD_exit();
 
+       free(timer);
        return 0;
 }
diff --git a/teshsuite/simdag/platforms/Two_clusters_rulebased.xml b/teshsuite/simdag/platforms/Two_clusters_rulebased.xml
new file mode 100644 (file)
index 0000000..7096f75
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+
+<platform version="3">
+<AS  id="AS0"  routing="RuleBased">
+  <cluster id="my_cluster_1" prefix="c-" suffix=".me"
+        radical="0-1" power="1000000000"    bw="125000000"     lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>
+        
+  <cluster id="my_cluster_2" prefix="c-" suffix=".me"
+        radical="2-3" power="1000000000"    bw="125000000"  lat="5E-5"
+        bb_bw="2250000000" bb_lat="5E-4"/>  
+       
+     <link id="backbone" bandwidth="1250000000" latency="5E-4"/>  
+    
+     <ASroute src="my_cluster_(.*)" dst="my_cluster_(.*)" 
+     gw_src="c-my_cluster_$1src_router.me" 
+     gw_dst="c-my_cluster_$1dst_router.me">
+        <link_ctn id="backbone"/>
+     </ASroute>   
+</AS>
+</platform>
index 9b9a5be..2d841f3 100644 (file)
@@ -23,6 +23,8 @@ int main(int argc, char **argv)
   int route_size, i, j, k;
   int list_size;
 
+  setvbuf(stdout, NULL, _IOLBF, 0);
+
   SD_init(&argc, argv);
 
   /* creation of the environment */
@@ -31,9 +33,7 @@ int main(int argc, char **argv)
          SD_workstation_get_number(), SD_link_get_number());
 
   if (argc >= 3) {
-  for(i=1;i<argc;i++)
-  {
-               if (!strcmp(argv[i], "ONE_LINK")) {
+               if (!strcmp(argv[2], "ONE_LINK")) {
                  workstations = SD_workstation_get_list();
                  w1 = workstations[0];
                  w2 = workstations[1];
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
                  route_size = SD_route_get_size(w1, w2);
                  printf("Route size %d\n", route_size);
                  for (i = 0; i < route_size; i++) {
-                       printf("   Link %s: latency = %f, bandwidth = %f\n",
+                       printf("  Link %s: latency = %f, bandwidth = %f\n",
                                   SD_link_get_name(route[i]),
                                   SD_link_get_current_latency(route[i]),
                                   SD_link_get_current_bandwidth(route[i]));
@@ -53,37 +53,33 @@ int main(int argc, char **argv)
                  printf("Route latency = %f, route bandwidth = %f\n",
                                 SD_route_get_current_latency(w1, w2),
                                 SD_route_get_current_bandwidth(w1, w2));
-                 i=argc;
-               }else{
-                       if (!strcmp(argv[i], "FULL_LINK")) {
-                         workstations = SD_workstation_get_list();
-                         list_size = SD_workstation_get_number();
-                         for (i = 0; i < list_size; i++) {
-                               w1 = workstations[i];
-                               name1 = SD_workstation_get_name(w1);
-                               for (j = 0; j < list_size; j++) {
-                                 w2 = workstations[j];
-                                 name2 = SD_workstation_get_name(w2);
-                                 printf("Route between %s and %s\n", name1, name2);
-                                 route = SD_route_get_list(w1, w2);
-                                 route_size = SD_route_get_size(w1, w2);
-                                 printf("\tRoute size %d\n", route_size);
-                                 for (k = 0; k < route_size; k++) {
-                                       printf("\tLink %s: latency = %f, bandwidth = %f\n",
-                                                  SD_link_get_name(route[k]),
-                                                  SD_link_get_current_latency(route[k]),
-                                                  SD_link_get_current_bandwidth(route[k]));
-                                 }
-                                 printf("\tRoute latency = %f, route bandwidth = %f\n",
-                                                SD_route_get_current_latency(w1, w2),
-                                                SD_route_get_current_bandwidth(w1, w2));
-                               }
+               }
+               if (!strcmp(argv[2], "FULL_LINK")) {
+                 workstations = SD_workstation_get_list();
+                 list_size = SD_workstation_get_number();
+                 for (i = 0; i < list_size; i++) {
+                       w1 = workstations[i];
+                       name1 = SD_workstation_get_name(w1);
+                       for (j = 0; j < list_size; j++) {
+                         w2 = workstations[j];
+                         name2 = SD_workstation_get_name(w2);
+                         printf("Route between %s and %s\n", name1, name2);
+                         route = SD_route_get_list(w1, w2);
+                         route_size = SD_route_get_size(w1, w2);
+                         printf("  Route size %d\n", route_size);
+                         for (k = 0; k < route_size; k++) {
+                               printf("  Link %s: latency = %f, bandwidth = %f\n",
+                                          SD_link_get_name(route[k]),
+                                          SD_link_get_current_latency(route[k]),
+                                          SD_link_get_current_bandwidth(route[k]));
                          }
-                         i=argc;
+                         printf("  Route latency = %f, route bandwidth = %f\n",
+                                        SD_route_get_current_latency(w1, w2),
+                                        SD_route_get_current_bandwidth(w1, w2));
                        }
+                 }
                }
   }
-  }
 
   SD_exit();
   return 0;
index b81c47e..6561fbb 100644 (file)
@@ -75,17 +75,17 @@ $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd_bis.xml
 > Workstation number: 5, link number: 7
 
 $ ${bindir:=.}/basic_parsing_test ./properties.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'CpuTI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'Vegas'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'path' to '~/'
 > Workstation number: 1, link number: 1
 
-$ ${bindir:=.}/basic_parsing_test ./properties.xml --cfg=cpu/model:CpuTI
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'CpuTI'
+$ ${bindir:=.}/basic_parsing_test ./properties.xml --cfg=cpu/optim:TI
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
+> [0.000000] [surf_parse/INFO] The custom configuration 'cpu/optim' is already defined by user!
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> [0.000000] [surf_route/INFO] The custom configuration 'cpu/model' is already define by user!
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'Vegas'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'path' to '~/'
@@ -119,3 +119,15 @@ $ ${bindir:=.}/is_router_test ./test_of_is_router.xml
 >    - Seen: "AS3" is type : 3
 >    - Seen: "AS4" is type : 3
 >    - Seen: "AS" is type : 3
+
+$ ${bindir:=.}/basic_parsing_test ./Two_clusters_rulebased.xml ONE_LINK
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> Workstation number: 4, link number: 8
+> Route between c-0.me and c-3.me
+> Route size 5
+>   Link my_cluster_1_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link my_cluster_1_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_2_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link my_cluster_2_link_3: latency = 0.000050, bandwidth = 125000000.000000
+> Route latency = 0.001600, route bandwidth = 125000000.000000
\ No newline at end of file
diff --git a/teshsuite/simdag/platforms/basic_parsing_test_bypass.tesh b/teshsuite/simdag/platforms/basic_parsing_test_bypass.tesh
new file mode 100644 (file)
index 0000000..3226af8
--- /dev/null
@@ -0,0 +1,57 @@
+$ ${bindir:=.}/basic_parsing_test ./three_clusters_bypass.xml FULL_LINK
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> Workstation number: 3, link number: 8
+> Route between 1 and 1
+>   Route size 2
+>   Link my_cluster_1_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link my_cluster_1_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
+> Route between 1 and 2
+>   Route size 1
+>   Link link_tmp: latency = 0.000500, bandwidth = 1250000000.000000
+>   Route latency = 0.000500, route bandwidth = 1250000000.000000
+> Route between 1 and 3
+>   Route size 4
+>   Link my_cluster_1_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link1: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link link3: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001100, route bandwidth = 125000000.000000
+> Route between 2 and 1
+>   Route size 4
+>   Link my_cluster_2_link_2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link link1: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_1_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001100, route bandwidth = 125000000.000000
+> Route between 2 and 2
+>   Route size 2
+>   Link my_cluster_2_link_2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link my_cluster_2_link_2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
+> Route between 2 and 3
+>   Route size 4
+>   Link my_cluster_2_link_2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link link3: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001100, route bandwidth = 125000000.000000
+> Route between 3 and 1
+>   Route size 4
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link3: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link link1: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_1_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001100, route bandwidth = 125000000.000000
+> Route between 3 and 2
+>   Route size 4
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link3: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link link2: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link my_cluster_2_link_2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001100, route bandwidth = 125000000.000000
+> Route between 3 and 3
+>   Route size 2
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link my_cluster_3_link_3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
\ No newline at end of file
index e52e9ad..fa2352d 100644 (file)
@@ -3,334 +3,334 @@ $ ${bindir:=.}/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=ro
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > Workstation number: 5, link number: 12
 > Route between bob3.hamburger.edu and bob3.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob3.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob3.hamburger.edu and bob2.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob3.hamburger.edu and bob4.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob3.hamburger.edu and bob6.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_3_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob3.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob2.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob4.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob6.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob2.hamburger.edu and bob3.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob2.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob2.hamburger.edu and bob2.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob2.hamburger.edu and bob4.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob2.hamburger.edu and bob6.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_2_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob4.hamburger.edu and bob3.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob4.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob4.hamburger.edu and bob2.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob4.hamburger.edu and bob4.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob4.hamburger.edu and bob6.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_4_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob6.hamburger.edu and bob3.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_3_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob6.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob6.hamburger.edu and bob2.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_2_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob6.hamburger.edu and bob4.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_4_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob6.hamburger.edu and bob6.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_6_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_6_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > Workstation number: 4, link number: 8
 > Route between bob1.hamburger.edu and bob1.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob1.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob1.hamburger.edu and alice0.crepe.fr
->      Route size 5
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between bob1.hamburger.edu and alice1.crepe.fr
->      Route size 5
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob1.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and bob0.hamburger.edu
->      Route size 3
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and alice0.crepe.fr
->      Route size 5
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between bob0.hamburger.edu and alice1.crepe.fr
->      Route size 5
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between alice0.crepe.fr and bob1.hamburger.edu
->      Route size 5
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between alice0.crepe.fr and bob0.hamburger.edu
->      Route size 5
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between alice0.crepe.fr and alice0.crepe.fr
->      Route size 3
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between alice0.crepe.fr and alice1.crepe.fr
->      Route size 3
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between alice1.crepe.fr and bob1.hamburger.edu
->      Route size 5
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between alice1.crepe.fr and bob0.hamburger.edu
->      Route size 5
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
->      Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.001600, route bandwidth = 125000000.000000
+>   Route size 5
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link backbone: latency = 0.000500, bandwidth = 1250000000.000000
+>   Link bob_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link bob_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.001600, route bandwidth = 125000000.000000
 > Route between alice1.crepe.fr and alice0.crepe.fr
->      Route size 3
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_0: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 > Route between alice1.crepe.fr and alice1.crepe.fr
->      Route size 3
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
->      Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000600, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link alice_cluster_backbone: latency = 0.000500, bandwidth = 2250000000.000000
+>   Link alice_cluster_link_1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > Workstation number: 2, link number: 4
 > Route between alice and alice
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between alice and bob
->      Route size 3
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000150, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000150, route bandwidth = 125000000.000000
 > Route between bob and alice
->      Route size 3
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000150, route bandwidth = 125000000.000000
+>   Route size 3
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000150, route bandwidth = 125000000.000000
 > Route between bob and bob
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > Workstation number: 2, link number: 3
 > Route between alice and alice
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between alice and bob
->      Route size 1
->      Link link1_UP: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1_UP: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between bob and alice
->      Route size 1
->      Link link1_DOWN: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1_DOWN: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between bob and bob
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 
-$ ${bindir:=.}/basic_parsing_test Dijkstra.xml FULL_LINK --log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n
+$ ${bindir:=.}/basic_parsing_test Dijkstra.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
 > Workstation number: 2, link number: 6
 > Route between NODO01 and NODO01
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between NODO01 and NODO02
->      Route size 2
->      Link 1: latency = 0.001000, bandwidth = 1000000.000000
->      Link 2: latency = 0.001000, bandwidth = 1000000.000000
->      Route latency = 0.002000, route bandwidth = 1000000.000000
+>   Route size 2
+>   Link 1: latency = 0.001000, bandwidth = 1000000.000000
+>   Link 2: latency = 0.001000, bandwidth = 1000000.000000
+>   Route latency = 0.002000, route bandwidth = 1000000.000000
 > Route between NODO02 and NODO01
->      Route size 2
->      Link 2: latency = 0.001000, bandwidth = 1000000.000000
->      Link 1: latency = 0.001000, bandwidth = 1000000.000000
->      Route latency = 0.002000, route bandwidth = 1000000.000000
+>   Route size 2
+>   Link 2: latency = 0.001000, bandwidth = 1000000.000000
+>   Link 1: latency = 0.001000, bandwidth = 1000000.000000
+>   Route latency = 0.002000, route bandwidth = 1000000.000000
 > Route between NODO02 and NODO02
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
diff --git a/teshsuite/simdag/platforms/basic_tracing.c b/teshsuite/simdag/platforms/basic_tracing.c
new file mode 100644 (file)
index 0000000..10bb847
--- /dev/null
@@ -0,0 +1,38 @@
+/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "msg/msg.h"
+#include "surf/surf_private.h"
+
+int host(int argc, char *argv[]);
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(basic_tracing,"Messages specific for this example");
+
+int host(int argc, char *argv[])
+{
+  XBT_INFO("Sleep for 1s");
+  MSG_process_sleep(1);
+  return 0;
+}
+
+int main(int argc, char **argv)
+{
+  int res;
+  MSG_global_init(&argc, argv);
+  MSG_create_environment(argv[1]);
+  MSG_function_register("host", host);
+  MSG_process_create( "host", host, NULL, MSG_get_host_table()[0] );
+
+  res = MSG_main();
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+  MSG_clean();
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}
index 8b5fb69..5695df8 100644 (file)
@@ -59,6 +59,8 @@ int main(int argc, char **argv)
   const SD_workstation_t *hosts;
   const SD_link_t *links;
 
+  setvbuf(stdout, NULL, _IOLBF, 0);
+
   SD_init(&argc, argv);
 
   platformFile = argv[1];
@@ -86,7 +88,7 @@ int main(int argc, char **argv)
            SD_workstation_get_name(hosts[i]),
            SD_workstation_get_power(hosts[i]));
     props = SD_workstation_get_properties(hosts[i]);
-    if (props && xbt_dict_length(props) > 0) {
+    if (props && !xbt_dict_is_empty(props)) {
       printf(">\n");
       xbt_dict_foreach(props, cursor, key, data) {
         printf("    <prop id=\"%s\" value=\"%s\"/>\n", key, data);
@@ -131,10 +133,11 @@ int main(int argc, char **argv)
   {
                  xbt_lib_foreach(host_lib, cursor_dst, dst, value) //to host
                  {
-                               printf("  <route src=\"%s\" dst=\"%s\">\n       "
+                               printf("  <route src=\"%s\" dst=\"%s\">\n  "
                                          ,src
                                          ,dst);
-                               xbt_dynar_t route = global_routing->get_route(src,dst);
+                               xbt_dynar_t route=NULL;
+                               routing_get_route_and_latency(src,dst,&route,NULL);
                                for(i=0;i<xbt_dynar_length(route) ;i++)
                                {
                                        void *link = xbt_dynar_get_as(route,i,void *);
@@ -147,11 +150,12 @@ int main(int argc, char **argv)
                  }
                  xbt_lib_foreach(as_router_lib, cursor_dst, dst, value) //to router
                  {
-                           if(get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){
-                               printf("  <route src=\"%s\" dst=\"%s\">\n       "
+                           if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){
+                               printf("  <route src=\"%s\" dst=\"%s\">\n  "
                                          ,src
                                          ,dst);
-                               xbt_dynar_t route = global_routing->get_route(src,dst);
+                               xbt_dynar_t route=NULL;
+                               routing_get_route_and_latency(src,dst,&route,NULL);
                                for(i=0;i<xbt_dynar_length(route) ;i++)
                                {
                                        void *link = xbt_dynar_get_as(route,i,void *);
@@ -167,14 +171,15 @@ int main(int argc, char **argv)
 
   xbt_lib_foreach(as_router_lib, cursor_src, src, value) // Routes from router
   {
-         if(get_network_element_type(src) == SURF_NETWORK_ELEMENT_ROUTER){
+         if(routing_get_network_element_type(src) == SURF_NETWORK_ELEMENT_ROUTER){
                  xbt_lib_foreach(as_router_lib, cursor_dst, dst, value) //to router
                  {
-                               if(get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){
-                               printf("  <route src=\"%s\" dst=\"%s\">\n       "
+                               if(routing_get_network_element_type(dst) == SURF_NETWORK_ELEMENT_ROUTER){
+                               printf("  <route src=\"%s\" dst=\"%s\">\n  "
                                          ,src
                                          ,dst);
-                               xbt_dynar_t route = global_routing->get_route(src,dst);
+                               xbt_dynar_t route=NULL;
+                               routing_get_route_and_latency(src,dst,&route,NULL);
                                for(i=0;i<xbt_dynar_length(route) ;i++)
                                {
                                        void *link = xbt_dynar_get_as(route,i,void *);
@@ -188,10 +193,10 @@ int main(int argc, char **argv)
                  }
                  xbt_lib_foreach(host_lib, cursor_dst, dst, value) //to host
                  {
-                               printf("  <route src=\"%s\" dst=\"%s\">\n       "
-                                         ,src
-                                         ,dst);
-                               xbt_dynar_t route = global_routing->get_route(src,dst);
+                               printf("  <route src=\"%s\" dst=\"%s\">\n  "
+                                         ,src, dst);
+                               xbt_dynar_t route=NULL;
+                               routing_get_route_and_latency(src,dst,&route, NULL);
                                for(i=0;i<xbt_dynar_length(route) ;i++)
                                {
                                        void *link = xbt_dynar_get_as(route,i,void *);
index 29386e3..bc0ac38 100644 (file)
@@ -20,112 +20,112 @@ $ ${bindir:=.}/flatifier$EXEEXT one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P
 >   <link id="bob_cluster_link_4" bandwidth="125000000" latency="0.000050000"/>
 >   <link id="bob_cluster_link_6" bandwidth="125000000" latency="0.000050000"/>
 >   <route src="bob3.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 >   <route src="bob6.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_6"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob6.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_6"/>
 >   </route>
 > </AS>
 > </platform>
@@ -140,7 +140,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_availability.xml "--log=root.fmt:[%10.6
 >   <host id="bob" power="500000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -158,7 +158,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_properties.xml "--log=root.fmt:[%10.6r]
 >   </host>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -172,7 +172,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_file.xml "--log=root.fmt:[%10.6r]
 >   <host id="bob" power="500000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -186,7 +186,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_off.xml "--log=root.fmt:[%10.6r]%
 >   <host id="bob" power="500000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -200,7 +200,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_on.xml "--log=root.fmt:[%10.6r]%e
 >   <host id="bob" power="500000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -214,7 +214,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_file.xml "--log=root.fmt:[%10.6r]
 >   <host id="bob" power="1000000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -228,7 +228,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_inside.xml "--log=root.fmt:[%10.6
 >   <host id="bob" power="1000000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -242,7 +242,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h
 >   <host id="bob" power="500000000"/>
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -257,7 +257,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_availability.xml "--log=root.fmt:[%10.6
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <link id="link1" bandwidth="80000000" latency="0.000100000"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -272,7 +272,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <link id="link1" bandwidth="125000000" latency="0.000050000" sharing_policy="FATPIPE"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -287,7 +287,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <link id="link1" bandwidth="125000000" latency="0.000050000"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -302,7 +302,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_state_file.xml "--log=root.fmt:[%10.6r]
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <link id="link1" bandwidth="80000000" latency="0.000100000"/>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -321,31 +321,31 @@ $ ${bindir:=.}/flatifier$EXEEXT three_hosts_non_symmetric_route.xml "--log=root.
 >   <link id="link2" bandwidth="125000000" latency="0.000050000"/>
 >   <link id="link3" bandwidth="125000000" latency="0.000050000"/>
 >   <route src="alice" dst="alice">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 >   <route src="alice" dst="trudy">
->      <link_ctn id="link3"/>
+>   <link_ctn id="link3"/>
 >   </route>
 >   <route src="alice" dst="bob">
->      <link_ctn id="link2"/><link_ctn id="link3"/>
+>   <link_ctn id="link2"/><link_ctn id="link3"/>
 >   </route>
 >   <route src="trudy" dst="alice">
->      <link_ctn id="link3"/>
+>   <link_ctn id="link3"/>
 >   </route>
 >   <route src="trudy" dst="trudy">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 >   <route src="trudy" dst="bob">
->      <link_ctn id="link2"/>
+>   <link_ctn id="link2"/>
 >   </route>
 >   <route src="bob" dst="alice">
->      <link_ctn id="link1"/>
+>   <link_ctn id="link1"/>
 >   </route>
 >   <route src="bob" dst="trudy">
->      <link_ctn id="link2"/>
+>   <link_ctn id="link2"/>
 >   </route>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -383,436 +383,436 @@ $ ${bindir:=.}/flatifier$EXEEXT two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%
 >   <link id="bob_cluster_link_3" bandwidth="125000000" latency="0.000050000"/>
 >   <link id="bob_cluster_link_4" bandwidth="125000000" latency="0.000050000"/>
 >   <route src="bob1.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob1.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="bob_cluster_link_1"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob3.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="bob_cluster_link_3"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice2.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_link_2"/><link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice3.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_link_3"/><link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob0.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="bob_cluster_link_0"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob2.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="bob_cluster_link_2"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bob4.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="bob_cluster_link_4"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice0.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_link_0"/><link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice4.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_link_4"/><link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="backbone"/>
 >   </route>
 >   <route src="alice1.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_link_1"/><link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/>
+>   <link_ctn id="bob_cluster_backbone"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="backbone"/>
+>   <link_ctn id="backbone"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob1.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob3.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alice2.crepe.fr">
->      <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alice3.crepe.fr">
->      <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob0.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob2.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="bob4.hamburger.edu">
->      <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alice0.crepe.fr">
->      <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alice4.crepe.fr">
->      <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="bobbob_cluster_router.hamburger.edu" dst="alice1.crepe.fr">
->      <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="backbone"/><link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bobbob_cluster_router.hamburger.edu">
->      <link_ctn id="backbone"/>
+>   <link_ctn id="backbone"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alicealice_cluster_router.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/>
+>   <link_ctn id="alice_cluster_backbone"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bob1.hamburger.edu">
->      <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
+>   <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_1"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bob3.hamburger.edu">
->      <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
+>   <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_3"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alice2.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
+>   <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_2"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alice3.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
+>   <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_3"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bob0.hamburger.edu">
->      <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
+>   <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_0"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bob2.hamburger.edu">
->      <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
+>   <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_2"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="bob4.hamburger.edu">
->      <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
+>   <link_ctn id="backbone"/><link_ctn id="bob_cluster_backbone"/><link_ctn id="bob_cluster_link_4"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alice0.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
+>   <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_0"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alice4.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
+>   <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_4"/>
 >   </route>
 >   <route src="alicealice_cluster_router.crepe.fr" dst="alice1.crepe.fr">
->      <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
+>   <link_ctn id="alice_cluster_backbone"/><link_ctn id="alice_cluster_link_1"/>
 >   </route>
 > </AS>
 > </platform>
@@ -831,16 +831,16 @@ $ ${bindir:=.}/flatifier$EXEEXT two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]
 >   <link id="link_bob" bandwidth="125000000" latency="0.000050000"/>
 >   <link id="switch" bandwidth="125000000" latency="0.000050000" sharing_policy="FATPIPE"/>
 >   <route src="alice" dst="alice">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 >   <route src="alice" dst="bob">
->      <link_ctn id="link_alice"/><link_ctn id="switch"/><link_ctn id="link_bob"/>
+>   <link_ctn id="link_alice"/><link_ctn id="switch"/><link_ctn id="link_bob"/>
 >   </route>
 >   <route src="bob" dst="alice">
->      <link_ctn id="link_bob"/><link_ctn id="switch"/><link_ctn id="link_alice"/>
+>   <link_ctn id="link_bob"/><link_ctn id="switch"/><link_ctn id="link_alice"/>
 >   </route>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
@@ -856,16 +856,147 @@ $ ${bindir:=.}/flatifier$EXEEXT two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%
 >   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
 >   <link id="link1" bandwidth="125000000" latency="0.000050000"/>
 >   <route src="alice" dst="alice">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 >   <route src="alice" dst="bob">
->      <link_ctn id="link1"/>
+>   <link_ctn id="link1"/>
 >   </route>
 >   <route src="bob" dst="alice">
->      <link_ctn id="link1"/>
+>   <link_ctn id="link1"/>
 >   </route>
 >   <route src="bob" dst="bob">
->      <link_ctn id="__loopback__"/>
+>   <link_ctn id="__loopback__"/>
 >   </route>
 > </AS>
 > </platform>
+
+$ ${bindir:=.}/flatifier$EXEEXT three_clusters_bypass.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
+> [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
+> <?xml version='1.0'?>
+> <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+> <platform version="3">
+> <AS id="AS0" routing="Full">
+>   <host id="1" power="1000000000"/>
+>   <host id="2" power="1000000000"/>
+>   <host id="3" power="1000000000"/>
+>   <router id="my_cluster_2_router"/>
+>   <router id="my_cluster_1_router"/>
+>   <router id="my_cluster_3_router"/>
+>   <link id="__loopback__" bandwidth="498000000" latency="0.000015000" sharing_policy="FATPIPE"/>
+>   <link id="link1" bandwidth="1250000000" latency="0.000500000"/>
+>   <link id="link2" bandwidth="1250000000" latency="0.000500000"/>
+>   <link id="link3" bandwidth="1250000000" latency="0.000500000"/>
+>   <link id="link_tmp" bandwidth="1250000000" latency="0.000500000"/>
+>   <link id="my_cluster_1_link_1" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="my_cluster_2_link_2" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="my_cluster_3_link_3" bandwidth="125000000" latency="0.000050000"/>
+>   <route src="1" dst="1">
+>   <link_ctn id="my_cluster_1_link_1"/><link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="1" dst="2">
+>   <link_ctn id="link_tmp"/>
+>   </route>
+>   <route src="1" dst="3">
+>   <link_ctn id="my_cluster_1_link_1"/><link_ctn id="link1"/><link_ctn id="link3"/><link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="1" dst="my_cluster_2_router">
+>   <link_ctn id="link_tmp"/>
+>   </route>
+>   <route src="1" dst="my_cluster_1_router">
+>   <link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="1" dst="my_cluster_3_router">
+>   <link_ctn id="my_cluster_1_link_1"/><link_ctn id="link1"/><link_ctn id="link3"/>
+>   </route>
+>   <route src="2" dst="1">
+>   <link_ctn id="my_cluster_2_link_2"/><link_ctn id="link2"/><link_ctn id="link1"/><link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="2" dst="2">
+>   <link_ctn id="my_cluster_2_link_2"/><link_ctn id="my_cluster_2_link_2"/>
+>   </route>
+>   <route src="2" dst="3">
+>   <link_ctn id="my_cluster_2_link_2"/><link_ctn id="link2"/><link_ctn id="link3"/><link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="2" dst="my_cluster_2_router">
+>   <link_ctn id="my_cluster_2_link_2"/>
+>   </route>
+>   <route src="2" dst="my_cluster_1_router">
+>   <link_ctn id="my_cluster_2_link_2"/><link_ctn id="link2"/><link_ctn id="link1"/>
+>   </route>
+>   <route src="2" dst="my_cluster_3_router">
+>   <link_ctn id="my_cluster_2_link_2"/><link_ctn id="link2"/><link_ctn id="link3"/>
+>   </route>
+>   <route src="3" dst="1">
+>   <link_ctn id="my_cluster_3_link_3"/><link_ctn id="link3"/><link_ctn id="link1"/><link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="3" dst="2">
+>   <link_ctn id="my_cluster_3_link_3"/><link_ctn id="link3"/><link_ctn id="link2"/><link_ctn id="my_cluster_2_link_2"/>
+>   </route>
+>   <route src="3" dst="3">
+>   <link_ctn id="my_cluster_3_link_3"/><link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="3" dst="my_cluster_2_router">
+>   <link_ctn id="my_cluster_3_link_3"/><link_ctn id="link3"/><link_ctn id="link2"/>
+>   </route>
+>   <route src="3" dst="my_cluster_1_router">
+>   <link_ctn id="my_cluster_3_link_3"/><link_ctn id="link3"/><link_ctn id="link1"/>
+>   </route>
+>   <route src="3" dst="my_cluster_3_router">
+>   <link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="my_cluster_2_router" dst="my_cluster_2_router">
+>   
+>   </route>
+>   <route src="my_cluster_2_router" dst="my_cluster_1_router">
+>   <link_ctn id="link2"/><link_ctn id="link1"/>
+>   </route>
+>   <route src="my_cluster_2_router" dst="my_cluster_3_router">
+>   <link_ctn id="link2"/><link_ctn id="link3"/>
+>   </route>
+>   <route src="my_cluster_2_router" dst="1">
+>   <link_ctn id="link2"/><link_ctn id="link1"/><link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="my_cluster_2_router" dst="2">
+>   <link_ctn id="my_cluster_2_link_2"/>
+>   </route>
+>   <route src="my_cluster_2_router" dst="3">
+>   <link_ctn id="link2"/><link_ctn id="link3"/><link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="my_cluster_1_router" dst="my_cluster_2_router">
+>   <link_ctn id="link_tmp"/>
+>   </route>
+>   <route src="my_cluster_1_router" dst="my_cluster_1_router">
+>   
+>   </route>
+>   <route src="my_cluster_1_router" dst="my_cluster_3_router">
+>   <link_ctn id="link1"/><link_ctn id="link3"/>
+>   </route>
+>   <route src="my_cluster_1_router" dst="1">
+>   <link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="my_cluster_1_router" dst="2">
+>   <link_ctn id="link_tmp"/>
+>   </route>
+>   <route src="my_cluster_1_router" dst="3">
+>   <link_ctn id="link1"/><link_ctn id="link3"/><link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+>   <route src="my_cluster_3_router" dst="my_cluster_2_router">
+>   <link_ctn id="link3"/><link_ctn id="link2"/>
+>   </route>
+>   <route src="my_cluster_3_router" dst="my_cluster_1_router">
+>   <link_ctn id="link3"/><link_ctn id="link1"/>
+>   </route>
+>   <route src="my_cluster_3_router" dst="my_cluster_3_router">
+>   
+>   </route>
+>   <route src="my_cluster_3_router" dst="1">
+>   <link_ctn id="link3"/><link_ctn id="link1"/><link_ctn id="my_cluster_1_link_1"/>
+>   </route>
+>   <route src="my_cluster_3_router" dst="2">
+>   <link_ctn id="link3"/><link_ctn id="link2"/><link_ctn id="my_cluster_2_link_2"/>
+>   </route>
+>   <route src="my_cluster_3_router" dst="3">
+>   <link_ctn id="my_cluster_3_link_3"/>
+>   </route>
+> </AS>
+> </platform>
\ No newline at end of file
index a1f2716..440c6ff 100644 (file)
@@ -4,73 +4,73 @@ $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 > Workstation number: 4, link number: 5
 > Route between host1 and host1
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host1 and host2
->      Route size 1
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host1 and host3
->      Route size 1
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host1 and host4
->      Route size 2
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host2 and host1
->      Route size 1
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host2 and host2
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host2 and host3
->      Route size 1
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host2 and host4
->      Route size 2
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host3 and host1
->      Route size 1
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host2
->      Route size 1
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host3
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host3 and host4
->      Route size 1
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host4 and host1
->      Route size 2
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host4 and host2
->      Route size 2
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host4 and host3
->      Route size 1
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host4 and host4
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 
 
 
@@ -78,110 +78,110 @@ $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK
 > [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
 > Workstation number: 5, link number: 7
 > Route between host1 and host1
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host1 and host2
->      Route size 1
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host1 and host3
->      Route size 1
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host1 and host4
->      Route size 2
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host1 and host5
->      Route size 2
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Link link5: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link5: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host2 and host1
->      Route size 1
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host2 and host2
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host2 and host3
->      Route size 1
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host2 and host4
->      Route size 2
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host2 and host5
->      Route size 1
->      Link link5: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link5: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host1
->      Route size 1
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host2
->      Route size 1
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host3
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host3 and host4
->      Route size 1
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host3 and host5
->      Route size 1
->      Link link6: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link6: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host4 and host1
->      Route size 2
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Link link2: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link2: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host4 and host2
->      Route size 2
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Link link3: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link3: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host4 and host3
->      Route size 1
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host4 and host4
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
 > Route between host4 and host5
->      Route size 2
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Link link6: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link6: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host5 and host1
->      Route size 2
->      Link link5: latency = 0.000050, bandwidth = 125000000.000000
->      Link link1: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link5: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link1: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host5 and host2
->      Route size 1
->      Link link5: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link5: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host5 and host3
->      Route size 1
->      Link link6: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000050, route bandwidth = 125000000.000000
+>   Route size 1
+>   Link link6: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000050, route bandwidth = 125000000.000000
 > Route between host5 and host4
->      Route size 2
->      Link link6: latency = 0.000050, bandwidth = 125000000.000000
->      Link link4: latency = 0.000050, bandwidth = 125000000.000000
->      Route latency = 0.000100, route bandwidth = 125000000.000000
+>   Route size 2
+>   Link link6: latency = 0.000050, bandwidth = 125000000.000000
+>   Link link4: latency = 0.000050, bandwidth = 125000000.000000
+>   Route latency = 0.000100, route bandwidth = 125000000.000000
 > Route between host5 and host5
->      Route size 1
->      Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
->      Route latency = 0.000015, route bandwidth = 498000000.000000
\ No newline at end of file
+>   Route size 1
+>   Link __loopback__: latency = 0.000015, bandwidth = 498000000.000000
+>   Route latency = 0.000015, route bandwidth = 498000000.000000
\ No newline at end of file
index df14488..d9dcd42 100644 (file)
@@ -22,19 +22,19 @@ int main(int argc, char **argv)
   /* creation of the environment */
   SD_create_environment(argv[1]);
 
-  size = xbt_lib_size(host_lib) + xbt_lib_size(as_router_lib);
+  size = xbt_lib_length(host_lib) + xbt_lib_length(as_router_lib);
 
   printf("Workstation number: %d, link number: %d, elmts number: %d\n",
          SD_workstation_get_number(), SD_link_get_number(), size);
 
   xbt_lib_foreach(host_lib, cursor, key, data) {
     printf("   - Seen: \"%s\" is type : %d\n", key,
-           (int) global_routing->get_network_element_type(key));
+           (int) routing_get_network_element_type(key));
   }
 
   xbt_lib_foreach(as_router_lib, cursor, key, data) {
     printf("   - Seen: \"%s\" is type : %d\n", key,
-           (int) global_routing->get_network_element_type(key));
+           (int) routing_get_network_element_type(key));
   }
 
   SD_exit();
diff --git a/teshsuite/simdag/platforms/one_cluster_router_id.xml b/teshsuite/simdag/platforms/one_cluster_router_id.xml
new file mode 100644 (file)
index 0000000..269186b
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS id="AS0" routing="Full">
+  <cluster id="bob_cluster" prefix="bob" suffix=".hamburger.edu"
+   radical="0,2-4,6" power="1000000000.00" bw="125000000.00" lat="5e-5"
+   bb_bw="2250000000.00" bb_lat="5e-4" router_id="bob_cluster_router"/>
+</AS>
+</platform>
index 0fc194d..8cd04da 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 <platform version="3">
        <AS id="main" routing="Full">
-               <include file="/home/navarrop/Developments/simgrid-git/teshsuite/simdag/platforms/clusterA.xml"/>
-               <include file="/home/navarrop/Developments/simgrid-git/teshsuite/simdag/platforms/clusterB.xml"/>
+               <include file="clusterA.xml"/>
+               <include file="clusterB.xml"/>
        </AS>
 </platform>
index abee297..d2ba4b3 100644 (file)
@@ -4,7 +4,7 @@
        
 <config id="General">
        <prop id="maxmin/precision" value="0.000010"></prop>
-       <prop id="cpu/model" value="CpuTI"></prop>
+       <prop id="cpu/optim" value="TI"></prop>
        <prop id="workstation/model" value="compound"></prop>
        <prop id="network/model" value="Vegas"></prop>
        <prop id="path" value="~/"></prop>
diff --git a/teshsuite/simdag/platforms/three_clusters_bypass.xml b/teshsuite/simdag/platforms/three_clusters_bypass.xml
new file mode 100644 (file)
index 0000000..dc3a16b
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+<AS  id="AS0"  routing="Full">
+  <cluster id="my_cluster_1" prefix="" suffix=""
+               radical="1"     power="1000000000"    bw="125000000"     lat="5E-5"/>
+               
+  <cluster id="my_cluster_2" prefix="" suffix=""
+           radical="2" power="1000000000"      bw="125000000"  lat="5E-5"/>  
+           
+  <cluster id="my_cluster_3" prefix="" suffix=""
+        radical="3" power="1000000000"    bw="125000000"  lat="5E-5"/>  
+       
+     <link id="link1" bandwidth="1250000000" latency="5E-4"/>  
+        <link id="link2" bandwidth="1250000000" latency="5E-4"/>
+        <link id="link3" bandwidth="1250000000" latency="5E-4"/>
+        <link id="link_tmp"  bandwidth="1250000000" latency="5E-4"/>
+       
+     <ASroute src="my_cluster_1" dst="my_cluster_2" 
+        gw_src="my_cluster_1_router" 
+        gw_dst="my_cluster_2_router">
+               <link_ctn id="link1"/>
+               <link_ctn id="link2"/>
+     </ASroute>
+     
+     <ASroute src="my_cluster_1" dst="my_cluster_3" 
+     gw_src="my_cluster_1_router" 
+     gw_dst="my_cluster_3_router">
+        <link_ctn id="link1"/>
+        <link_ctn id="link3"/>
+     </ASroute>
+     
+     <ASroute src="my_cluster_2" dst="my_cluster_3" 
+     gw_src="my_cluster_2_router" 
+     gw_dst="my_cluster_3_router">
+        <link_ctn id="link2"/>
+        <link_ctn id="link3"/>
+     </ASroute>
+     
+     <bypassRoute src="my_cluster_1" dst="my_cluster_2"
+     gw_src="my_cluster_$1src_router" 
+     gw_dst="my_cluster_$1dst_router">
+        <link_ctn id="link_tmp"/>  
+     </bypassRoute>
+</AS>
+</platform>
diff --git a/teshsuite/simdag/platforms/two_clusters_router_id.xml b/teshsuite/simdag/platforms/two_clusters_router_id.xml
new file mode 100644 (file)
index 0000000..cc8b09d
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+       
+ <AS  id="AS0"  routing="Full">
+       
+     <cluster id="bob_cluster" prefix="bob" suffix=".hamburger.edu"
+           radical="0-4" power="1000000000" bw="125000000" lat="5E-5"
+           bb_bw="2250000000" bb_lat="5E-4" router_id="bob_cluster_router"/>
+   
+     <cluster id="alice_cluster" prefix="alice" suffix=".crepe.fr"
+           radical="0-4" power="1000000000" bw="125000000" lat="5E-5"
+           bb_bw="2250000000" bb_lat="5E-4" router_id="alice_cluster_router"/>  
+       
+     <link id="backbone" bandwidth="1250000000" latency="5E-4"/>  
+       
+     <ASroute src="bob_cluster" dst="alice_cluster" 
+        gw_src="bob_cluster_router" 
+        gw_dst="alice_cluster_router">
+               <link_ctn id="backbone"/>
+     </ASroute>
+        
+     <ASroute src="alice_cluster" dst="bob_cluster" 
+        gw_src="alice_cluster_router" 
+        gw_dst="bob_cluster_router">
+               <link_ctn id="backbone"/>
+     </ASroute>   
+     
+ </AS>
+ </platform>
diff --git a/teshsuite/xbt/.gitignore b/teshsuite/xbt/.gitignore
deleted file mode 100644 (file)
index f39c736..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-log_large_test
-parallel_log_crashtest
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
deleted file mode 100644 (file)
index 934c8cd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-run_tests
\ No newline at end of file
diff --git a/testsuite/surf/.gitignore b/testsuite/surf/.gitignore
deleted file mode 100644 (file)
index 9dbe523..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-lmm_usage
-maxmin_bench
-surf_usage
-trace_usage
index c331b29..61b3ad7 100644 (file)
@@ -122,7 +122,7 @@ void test1(method_t method)
     lmm_set_default_protocol_function(func_reno_f, func_reno_fpi,
                                       func_reno_fpi);
 
-  Sys = lmm_system_new();
+  Sys = lmm_system_new(1);
   L1 = lmm_constraint_new(Sys, (void *) "L1", a);
   L2 = lmm_constraint_new(Sys, (void *) "L2", b);
   L3 = lmm_constraint_new(Sys, (void *) "L3", a);
@@ -254,7 +254,7 @@ void test2(method_t method)
     lmm_set_default_protocol_function(func_reno_f, func_reno_fp,
                                       func_reno_fpi);
 
-  Sys = lmm_system_new();
+  Sys = lmm_system_new(1);
   CPU1 = lmm_constraint_new(Sys, (void *) "CPU1", 200.0);
   CPU2 = lmm_constraint_new(Sys, (void *) "CPU2", 100.0);
 
@@ -403,7 +403,7 @@ void test3(method_t method)
     lmm_set_default_protocol_function(func_reno_f, func_reno_fp,
                                       func_reno_fpi);
 
-  Sys = lmm_system_new();
+  Sys = lmm_system_new(1);
 
 
 
index 149f273..c599596 100644 (file)
@@ -40,7 +40,7 @@ void test(int nb_cnst, int nb_var, int nb_elem)
   int *used = xbt_new0(int, nb_cnst);
   int i, j, k;
 
-  Sys = lmm_system_new();
+  Sys = lmm_system_new(1);
 
   for (i = 0; i < nb_cnst; i++) {
     cnst[i] = lmm_constraint_new(Sys, NULL, float_random(10.0));
index a3dc2ca..db55b75 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <stdio.h>
 #include "surf/surf.h"
+#include "surf/surf_resource.h"
 #include "surf/surfxml_parse.h" // for reset callback
 
 #include "xbt/log.h"
@@ -51,9 +52,8 @@ void test(char *platform)
   e_surf_action_state_t stateActionB;
   e_surf_action_state_t stateActionC;
   double now = -1.0;
-  surf_parse_reset_callbacks();
-  surf_cpu_model_init_Cas01(platform);  /* Now it is possible to use CPUs */
-  surf_network_model_init_CM02(platform);       /* Now it is possible to use eth0 */
+  xbt_cfg_set_parse(_surf_cfg_set, "cpu/model:Cas01");
+  xbt_cfg_set_parse(_surf_cfg_set, "network/model:CM02");
   parse_platform_file(platform);
 
   /*********************** CPU ***********************************/
index 3dcab96..a30f0e4 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <stdio.h>
 #include "surf/surf.h"
+#include "surf/surf_resource.h"
 #include "surf/surfxml_parse.h" // for reset callback
 
 #include "xbt/log.h"
@@ -45,16 +46,9 @@ void test(char *platform)
   double now = -1.0;
   int running;
 
-  int workstation_id =
-      find_model_description(surf_workstation_model_description, "CLM03");
-  surf_parse_reset_callbacks();
-  surf_workstation_model_description[workstation_id].
-      model_init_preparse(platform);
+  xbt_cfg_set_parse(_surf_cfg_set, "network/model:CM02");
+  xbt_cfg_set_parse(_surf_cfg_set, "cpu/model:Cas01");
   parse_platform_file(platform);
-  if (surf_workstation_model_description[workstation_id].
-      model_init_postparse)
-    surf_workstation_model_description[workstation_id].
-        model_init_postparse();
 
   /*********************** WORKSTATION ***********************************/
   workstationA =
diff --git a/testsuite/xbt/.gitignore b/testsuite/xbt/.gitignore
deleted file mode 100644 (file)
index 16d7158..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-context_usage
-graphxml_usage
-heap_bench
-log_usage
index e3927e2..0b505b5 100644 (file)
@@ -129,7 +129,7 @@ void test(char *graph_file)
     XBT_INFO("Before Node deletion: %lu nodes, %lu edges",
           xbt_dynar_length(nodes), xbt_dynar_length(edges));
 
-    while (xbt_dynar_length(nodes))
+    while (!xbt_dynar_is_empty(nodes))
       xbt_graph_free_node(graph,
                           *((xbt_node_t *) xbt_dynar_get_ptr(nodes, 0)),
                           free_label, NULL);
@@ -144,7 +144,7 @@ void test(char *graph_file)
     XBT_INFO("Before Edge deletion: %lu nodes, %lu edges",
           xbt_dynar_length(nodes), xbt_dynar_length(edges));
 
-    while (xbt_dynar_length(edges))
+    while (!xbt_dynar_is_empty(edges))
       xbt_graph_free_edge(graph,
                           *((xbt_edge_t *) xbt_dynar_get_ptr(edges, 0)),
                           NULL);
diff --git a/tools/.gitignore b/tools/.gitignore
deleted file mode 100644 (file)
index 95b00a8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-graspe-slave
index ff05f06..bd15975 100755 (executable)
@@ -3,10 +3,10 @@
 use strict;
 
 # Add here the pages of the documentation generated by a @page doxygen macro
-my @extra_files = qw(html/index.html html/faq.html html/history.html html/contrib.html html/people.html
-                     html/publis.html html/publis_core.html html/publis_extern.html html/publis_intra.html
-                     html/pages.html html/modules.html html/annotated.html html/functions.html html/functions_vars.html index.php 
-                     html/GRAS_tut.html);
+my @extra_files = qw(html/index.html html/pages.html html/modules.html html/annotated.html html/functions.html 
+                                        html/functions_vars.html index.php 
+                     html/GRAS_tut.html html/tracing.html html/installSimgrid.html html/bindings.html
+                     html/options.html html/use.html html/pls.html);
 
 # GRAS tutorial
 map {push @extra_files, "html/GRAS_tut_$_.html"} qw (intro 
@@ -251,8 +251,9 @@ sub handle_page {
       print TO "$_";
       last if ((m|</div>|)&&($found_div_tabs));
     }
-      
+    
     print TO "\n<!-- POST-PROCESSED TABS -->\n";
+             
     foreach (@tabs) {
 #      print "TAB: $_";
       print TO "$_";
@@ -339,7 +340,6 @@ add_tabs_to_module_html;
 ###
 map {push @allfiles,$_} @extra_files;
 print "All files: ".(join(", ",@allfiles))."\n" if $debug{'parse'};
-
 my $tabs;
 
 foreach my $file (@allfiles) {
@@ -381,38 +381,88 @@ foreach my $file (@allfiles) {
       }
       if( $_ =~ /<\/ul>/ && $tabs){
                my $tmp_buff="";
-               $tmp_buff .= '     <li><a href="publis.html"><span>Publications</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="people.html"><span>People</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="history.html"><span>History</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="contrib.html"><span>Contrib</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="faq.html"><span>FAQ&#160;Page</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="http://gforge.inria.fr/projects/simgrid"><span>Simgrid&#160;Forge</span></a></li>'."\n";
-               $tmp_buff .= '      <li><a href="http://simgrid.gforge.inria.fr/"><span>Home</span></a></li>'."\n";
+               $tmp_buff .= '      <li><a href="use.html"><span>Using SimGrid</span></a></li>'."\n";
+               $tmp_buff .= '      <li><a href="http://gforge.inria.fr/projects/simgrid"><span>Forge</span></a></li>'."\n";
+               $tmp_buff .= '      <li><a href="http://simgrid.gforge.inria.fr/"><span>Website</span></a></li>'."\n";
+               $tmp_buff .= '      <li><a href="pages.html"><span>Documentation&nbsp;index</span></a></li>'."\n";
                $tmp_buff .= $_;
                $tabs = 0;
+
+             # Rework the navbar and add menu for use.html
+             # Fix the current "button" of buggy Doxygen tabs  
+             if($file =~ /^html\/use.*/
+             || $file =~ /^html\/installSimgrid.*/
+             || $file =~ /^html\/options.*/
+             || $file =~ /^html\/tracing.*/ 
+             || $file =~ /^html\/bindings.*/
+             || $file =~ /^html\/pls.*/
+             || $file =~ /^html\/modules.*/
+             || $file =~ /^html\/annotated.*/
+             || $file =~ /^html\/group__.*/
+             || $file =~ /^html\/functions.*/)
+             {
+                               $tmp_buff .= '      <div class="tabs_group_use">'."\n";
+                               $tmp_buff .= '          <ul class="tablist">'."\n";
+                               $tmp_buff .= '          <li><a href="installSimgrid.html"><span>Install SimGrid</span></a></li>'."\n";
+                               $tmp_buff .= '          <li><a href="modules.html"><span>Modules&#160;API</span></a></li>'."\n";
+                       $tmp_buff .= '          <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>'."\n";
+                               $tmp_buff .= '          <li><a href="options.html"><span>Options & configurations</span></a></li>'."\n";
+                               $tmp_buff .= '          <li><a href="tracing.html"><span>Tracing Simulations</span></a></li>'."\n";
+                               $tmp_buff .= '          <li><a href="bindings.html"><span>Bindings</span></a></li>'."\n";
+                               $tmp_buff .= '          <li><a href="pls.html"><span>Packet level simulation</span></a></li>'."\n";
+                               $tmp_buff .= '          </ul></div>'."\n";
+                               $tmp_buff .= '      </div>'."\n";
+                               
+                               my $filename = $file;
+                       $filename =~ s/html\///g;
+                       $filename =~ s/\.html//g;
+                       $filename =~ s/publis_.*/publis/g;
+                       $tmp_buff =~ s/<li class="current">/<li>/g;
+                       $tmp_buff =~ s/<li><a href="$filename.html">/<li class="current"><a href="$filename.html">/g;
+                       $tmp_buff =~ s/<li><a href="use.html">/<li class="current"><a href="use.html">/g; 
+                               
+             }
        
              # Rework the navbar
              # Fix the current "button" of buggy Doxygen tabs   
-             if($file =~ /^html\/faq.*/ 
-             || $file =~ /^html\/publis.*/ 
-             || $file =~ /^html\/people.*/ 
-             || $file =~ /^html\/history.*/ 
-             || $file =~ /^html\/contrib.*/)
+             if($file =~ /^html\/pages.*/)
              {
                      my $filename = $file;
                      $filename =~ s/html\///g;
                      $filename =~ s/\.html//g;
-                     $filename =~ s/publis_.*/publis/g;
                      $tmp_buff =~ s/<li class="current">/<li>/g;
-                     $tmp_buff =~ s/<li><a href="$filename.html">/<li class="current"><a href="$filename.html">/g;           
+                     $tmp_buff =~ s/<li><a href="$filename.html">/<li class="current"><a href="$filename.html">/g;     
+             }
+             if($file =~ /^html\/group__.*/)
+             {
+               $tmp_buff =~ s/<li><a href="modules.html">/<li class="current"><a href="modules.html">/g;
+             }
+             if($file =~ /^html\/functions.*/)
+             {
+               $tmp_buff =~ s/<li><a href="annotated.html">/<li class="current"><a href="annotated.html">/g;
              }
-             print TO $tmp_buff;
+             
+
+             print TO $tmp_buff;             
              next;
     }
-      
-      s|<span>Modules</span>|<span>Modules API</span>|g;
-      s|<span>Related&nbsp;Pages</span>|<span>Site&nbsp;Plan</span>|g;
-                                                                                                 
+      s|<span>Modules</span>|<span>Modules&#160;API</span>|g;
+      s|<li.*><a href="pages.html"><span>Related&#160;Pages</span></a></li>\n||g;
+      s|<li class="current"><a href="modules.html"><span>Modules&#160;API</span></a></li>\n||g;
+      s|<li class="current"><a href="modules.html"><span>Modules&nbsp;API</span></a></li>\n||g;
+      if($file =~ /^html\/group__.*/)
+      {
+       s|<li><a href="use.html">|<li class="current"><a href="use.html">|g;
+       s|<li><a href="modules.html"><span>Modules&#160;API</span></a></li>\n|<li class="current"><a href="modules.html"><span>Modules&#160;API</span></a></li>\n|g;
+      }
+      else
+      {
+       s|<li><a href="modules.html"><span>Modules&#160;API</span></a></li>\n||g;
+      }
+      s|<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>\n||g;    
+      s|<li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>\n||g;
+      s|Related Pages<|Documentation&nbsp;index<|g;
+                                                                                           
       print TO $_;
     }
     close FROM;
diff --git a/tools/gras/.gitignore b/tools/gras/.gitignore
deleted file mode 100644 (file)
index d115769..0000000
+++ /dev/null
@@ -1 +0,0 @@
-gras_stub_generator
index e50590f..8fa5f45 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* gras_stub_generator - creates the main() to use a GRAS program           */
 
 /* Copyright (c) 2003-2007 Martin Quinson, Arnaud Legrand, Malek Cherier.   */
index dfe760c..c8cda70 100644 (file)
@@ -56,8 +56,7 @@ static s_process_t process;
 
 static void parse_process_init(void)
 {
-  xbt_dict_set(process_function_set, A_surfxml_process_function, NULL,
-               NULL);
+  xbt_dict_set(process_function_set, A_surfxml_process_function, NULL, NULL);
   xbt_dict_set(machine_set, A_surfxml_process_host, NULL, NULL);
   process.argc = 1;
   process.argv = xbt_new(char *, 1);
@@ -96,9 +95,9 @@ int main(int argc, char *argv[])
   int i;
 
   surf_init(&argc, argv);
-  process_function_set = xbt_dict_new();
+  process_function_set = xbt_dict_new_homogeneous(NULL);
   process_list = xbt_dynar_new(sizeof(s_process_t), s_process_free);
-  machine_set = xbt_dict_new();
+  machine_set = xbt_dict_new_homogeneous(NULL);
 
   for (i = 1; i < argc; i++) {
     int need_removal = 0;
@@ -169,8 +168,7 @@ int main(int argc, char *argv[])
   generate_simulation_dsp_file(project_name);
   generate_real_live_dsp_file(project_name);
 
-  if (__gras_path)
-    xbt_free(__gras_path);
+  xbt_free(__gras_path);
 #endif
 
   free(warning);
index 42aabfc..87c087a 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* gras_stub_generator - creates the main() to use a GRAS program           */
 
 /* Copyright (c) 2003-2007 Martin Quinson, Arnaud Legrand, Malek Cherier.   */
index 77a9fe9..ddb4299 100644 (file)
@@ -1,5 +1,3 @@
-/*     $Id$     */
-
 /* gras_stub_generator - creates the main() to use a GRAS program           */
 
 /* Copyright (c) 2003-2007 Martin Quinson, Arnaud Legrand, Malek Cherier.   */
diff --git a/tools/indent b/tools/indent
new file mode 100755 (executable)
index 0000000..8e37750
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+declare -a OPTIONS
+OPTIONS=(
+    -kr         # Use Kernighan & Ritchie coding style. 
+    -l80        # Set maximum line length for non-comment lines to 80.
+    -nut        # Use spaces instead of tabs.
+    -i2         # Set indentation level to 2 spaces.
+    -lps        # Leave space between ‘#’ and preprocessor directive.
+    -npcs       # Do not put space after the function in function calls.
+    -br         # Put braces on line with if, etc.
+    -brs        # Put braces on struct declaration line.
+    -ce         # Cuddle else and preceding ‘}’.
+    -cdw        # Cuddle while of do {} while; and preceding ‘}’.
+    -bbo        # Prefer to break long lines before boolean operators.
+    -npsl       # Put the type of a procedure on the same line as its name.
+)
+
+exec indent "${OPTIONS[@]}" "$@"
diff --git a/tools/tesh/.gitignore b/tools/tesh/.gitignore
deleted file mode 100644 (file)
index c1dc715..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tesh
index 14db63d..7948316 100644 (file)
@@ -5,53 +5,59 @@ p Order: in, out, cmd
 < < TOTO
 < > TOTO
 < $ cat
+> Enable coverage
 > Test suite from stdin
 > [(stdin):3] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 p Order: out, in, cmd
 < > TOTO
 < < TOTO
 < $ cat
+> Enable coverage
 > Test suite from stdin
 > [(stdin):3] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 p Order: out, cmd, in
 < > TOTO
 < $ cat
 < < TOTO
+> Enable coverage
 > Test suite from stdin
 > [(stdin):2] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 p Order: in, cmd, out
 < < TOTO
 < $ cat
 < > TOTO
+> Enable coverage
 > Test suite from stdin
 > [(stdin):2] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 p Order: cmd, out, in
 < $ cat
 < > TOTO
 < < TOTO
+> Enable coverage
 > Test suite from stdin
 > [(stdin):1] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 p Order: cmd, in, out
 < $ cat
 < < TOTO
 < > TOTO
+> Enable coverage
 > Test suite from stdin
 > [(stdin):1] cat
 > Test suite from stdin OK
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
index fd7de37..d8c8f68 100644 (file)
@@ -29,3 +29,23 @@ $ wc -l tmp_fich
 > 4 tmp_fich
 
 $ rm tmp_fich
+
+$ ${bindir:=.}/tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n' basic2.tesh
+> Enable coverage
+> Test suite `basic2'
+> [basic2:3] Test sorting and filtering of output
+> [basic2:5] true
+> [basic2:8] true
+> [basic2:10] printf 'profiling: foo\\n'
+> [basic2:12] printf 'profiling: foo'
+> [basic2:15] printf 'profiling: foo\\n'
+> [basic2:18] printf 'profiling: foo'
+> [basic2:20] printf 'a\\nb\\nc\\nd\\n'
+> [basic2:26] printf 'a\\nb\\nc\\nd'
+> [basic2:33] printf 'c\\nd\\nb\\na\\n'
+> [basic2:40] printf 'c\\nd\\nb\\na'
+> [basic2:46] printf 'a\\nprofiling: foo\\nprofiling: bar\\nb\\nc\\nd\\nprofiling: baz\\n'
+> [basic2:52] printf 'a\\nprofiling: foo\\nprofiling: bar\\nb\\nc\\nd\\nprofiling: baz'
+> [basic2:59] printf 'c\\nprofiling: foo\\nprofiling: bar\\nd\\nb\\na\\nprofiling: baz\\n'
+> [basic2:66] printf 'c\\nprofiling: foo\\nprofiling: bar\\nd\\nb\\na\\nprofiling: baz'
+> Test suite `basic2' OK
diff --git a/tools/tesh/basic2.tesh b/tools/tesh/basic2.tesh
new file mode 100644 (file)
index 0000000..b95065e
--- /dev/null
@@ -0,0 +1,70 @@
+#! ./tesh
+
+p Test sorting and filtering of output
+
+$ true
+
+! output sort
+$ true
+
+$ printf 'profiling: foo\\n'
+
+$ printf 'profiling: foo'
+
+! output sort
+$ printf 'profiling: foo\\n'
+
+! output sort
+$ printf 'profiling: foo'
+
+$ printf 'a\\nb\\nc\\nd\\n'
+> a
+> b
+> c
+> d
+
+$ printf 'a\\nb\\nc\\nd'
+> a
+> b
+> c
+> d
+
+! output sort
+$ printf 'c\\nd\\nb\\na\\n'
+> a
+> b
+> c
+> d
+
+! output sort
+$ printf 'c\\nd\\nb\\na'
+> a
+> b
+> c
+> d
+
+$ printf 'a\\nprofiling: foo\\nprofiling: bar\\nb\\nc\\nd\\nprofiling: baz\\n'
+> a
+> b
+> c
+> d
+
+$ printf 'a\\nprofiling: foo\\nprofiling: bar\\nb\\nc\\nd\\nprofiling: baz'
+> a
+> b
+> c
+> d
+
+! output sort
+$ printf 'c\\nprofiling: foo\\nprofiling: bar\\nd\\nb\\na\\nprofiling: baz\\n'
+> a
+> b
+> c
+> d
+
+! output sort
+$ printf 'c\\nprofiling: foo\\nprofiling: bar\\nd\\nb\\na\\nprofiling: baz'
+> a
+> b
+> c
+> d
index b7d39c5..94bf5c8 100644 (file)
@@ -16,7 +16,8 @@ $ gcc -o return1 return1.c
 
 ! expect return 41
 < $ ./return1
-$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ../tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
+> Enable coverage
 > Test suite from stdin
 > [(stdin):1] ./return1
 > Test suite `(stdin)': NOK (<(stdin):1> returned code 1)
index 2b0436f..7cde981 100644 (file)
@@ -17,7 +17,8 @@ $ gcc -o segfault segfault.c
 
 ! expect return 15
 < $ ./segfault
-$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ../tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
+> Enable coverage
 > Test suite from stdin
 > [(stdin):1] ./segfault
 > Test suite `(stdin)': NOK (<(stdin):1> got signal SIGSEGV)
index ebab52a..d9daf92 100644 (file)
@@ -6,9 +6,10 @@
 ! expect return 3
 < ! timeout 1
 < $ sleep 6
+> Enable coverage
 > Test suite from stdin
 > [(stdin):2] sleep 6
 > <(stdin):2> timeouted. Kill the process.
 > <(stdin):2> No output before timeout
 > Test suite `(stdin)': NOK (<(stdin):2> timeout after 1 sec)
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
index 135ae4c..bfb2adb 100644 (file)
@@ -6,7 +6,8 @@ p This tests whether TESH detects wrong outputs
 < > TOTO
 < < TUTU
 < $ cat
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
+> Enable coverage
 > Test suite from stdin
 > [(stdin):3] cat
 > Output of <(stdin):3> mismatch:
index 221ea43..8070864 100644 (file)
@@ -12,10 +12,11 @@ $ ls
 # Check that tesh detects properly cd to non-existing directories
 ! expect return 4
 < $ cd toto
+> Enable coverage
 > Test suite from stdin
 > Chdir to toto failed: No such file or directory
 > Test suite `(stdin)': NOK (system error)
-$ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ../tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
 
 # The next command checks that there is a testdir_temp-cd in the upper directory, 
 # ie that mkdir and cd both worked.
index 60b38bf..2622126 100644 (file)
@@ -115,7 +115,7 @@ void rctx_wait_bg(void)
 {
   /* Do not use xbt_dynar_free or it will lock the dynar, preventing armageddon
    * from working */
-  while (xbt_dynar_length(bg_jobs)) {
+  while (!xbt_dynar_is_empty(bg_jobs)) {
     rctx_t rctx = xbt_dynar_getlast_as(bg_jobs, rctx_t);
     wait_it(rctx);
     xbt_dynar_pop(bg_jobs, &rctx);
@@ -189,14 +189,12 @@ void rctx_empty(rctx_t rc)
   char **env_it;
   void *filepos;
 
-  if (rc->cmd)
-    free(rc->cmd);
+  free(rc->cmd);
   rc->cmd = NULL;
   /* avoid race with rctx_armageddon log messages */
   filepos = rc->filepos;
   rc->filepos = NULL;
-  if (filepos)
-    free(filepos);
+  free(filepos);
   for (i = 0, env_it = environ; *env_it; i++, env_it++);
   if (rc->env) {
     for (env_it = rctx->env + i; *env_it; env_it++)
@@ -241,10 +239,8 @@ void rctx_free(rctx_t rctx)
   if (!rctx)
     return;
 
-  if (rctx->cmd)
-    free(rctx->cmd);
-  if (rctx->filepos)
-    free(rctx->filepos);
+  free(rctx->cmd);
+  free(rctx->filepos);
   if (rctx->env) {
     int i;
     char **env_it;
@@ -302,8 +298,10 @@ void rctx_pushline(const char *filepos, char kind, char *line)
 
     rctx->cmd = xbt_strdup(line);
     rctx->filepos = xbt_strdup(filepos);
-    if(option){
-       rctx->cmd = bprintf("%s %s",rctx->cmd,option);
+    if (option){
+      char *newcmd = bprintf("%s %s", rctx->cmd, option);
+      free(rctx->cmd);
+      rctx->cmd = newcmd;
     }
     XBT_INFO("[%s] %s%s", filepos, rctx->cmd,
           ((rctx->is_background) ? " (background command)" : ""));
@@ -363,7 +361,7 @@ void rctx_pushline(const char *filepos, char kind, char *line)
       int len = strlen("setenv ");
       char *eq = strchr(line + len, '=');
       char *key = bprintf("%.*s", (int) (eq - line - len), line + len);
-      xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f);
+      xbt_dict_set(env, key, xbt_strdup(eq + 1), NULL);
       free(key);
 
       rctx->env = realloc(rctx->env, ++(rctx->env_size) * sizeof(char *));
@@ -526,8 +524,7 @@ static void start_command(rctx_t rctx)
         xbt_dynar_t path = xbt_str_split(environ[i] + 5, ":");
 
         xbt_dynar_foreach(path, it, str) {
-          if (binary_name)
-            free(binary_name);
+          free(binary_name);
           binary_name = bprintf("%s/%s", str, args[0]);
           if (!stat(binary_name, &stat_buf)) {
             /* Found. */
@@ -565,7 +562,9 @@ void rctx_start(void)
   int child_out[2];
 
   XBT_DEBUG("Cmd before rewriting %s", rctx->cmd);
-  rctx->cmd = xbt_str_varsubst(rctx->cmd, env);
+  char *newcmd = xbt_str_varsubst(rctx->cmd, env);
+  free(rctx->cmd);
+  rctx->cmd = newcmd;
   XBT_VERB("Start %s %s", rctx->cmd,
         (rctx->is_background ? "(background job)" : ""));
   xbt_os_mutex_acquire(armageddon_mutex);
@@ -648,20 +647,35 @@ void rctx_start(void)
 
 /* Helper function to sort the output */
 static int cmpstringp(const void *p1, const void *p2) {
-  /* Sort only using the 19 first chars (date+pid)
-   * If the dates are the same, then, sort using pointer address (be stable wrt output of each process)
+  /* Sort only using the sort_len first chars
+   * If they are the same, then, sort using pointer address
+   * (be stable wrt output of each process)
    */
-  const char *s1 = *((const char**) p1);
-  const char *s2 = *((const char**) p2);
+  const char **s1 = *(const char***)p1;
+  const char **s2 = *(const char***)p2;
 
-  XBT_DEBUG("Compare strings '%s' and '%s'", s1, s2);
+  XBT_DEBUG("Compare strings '%s' and '%s'", *s1, *s2);
 
-  int res = strncmp(s1, s2, sort_len);
+  int res = strncmp(*s1, *s2, sort_len);
   if (res == 0)
-    return p1>p2;
+    res = s1 > s2 ? 1 : (s1 < s2 ? -1 : 0);
   return res;
 }
 
+static void stable_sort(xbt_dynar_t a)
+{
+  unsigned long len = xbt_dynar_length(a);
+  void **b = xbt_new(void*, len);
+  unsigned long i;
+  for (i = 0 ; i < len ; i++)   /* fill the array b with pointers to strings */
+    b[i] = xbt_dynar_get_ptr(a, i);
+  qsort(b, len, sizeof *b, cmpstringp); /* sort it */
+  for (i = 0 ; i < len ; i++) /* dereference the pointers to get the strings */
+    b[i] = *(char**)b[i];
+  for (i = 0 ; i < len ; i++)   /* put everything in place */
+    xbt_dynar_set_as(a, i, char*, b[i]);
+  xbt_free(b);
+}
 
 /* Waits for the child to end (or to timeout), and check its
    ending conditions. This is launched from rctx_start but either in main
@@ -707,6 +721,41 @@ void *rctx_wait(void *r)
      return NULL;
      xbt_os_mutex_acquire(rctx->interruption); */
 
+  {
+    xbt_dynar_t a = xbt_str_split(rctx->output_got->data, "\n");
+    xbt_dynar_t b = xbt_dynar_new(sizeof(char *), NULL);
+    unsigned cpt;
+    char *str;
+    xbt_dynar_foreach(a, cpt, str) {
+      if (strncmp(str, "TESH_ERROR ", (sizeof "TESH_ERROR ") - 1) == 0) {
+        XBT_CRITICAL("%s", str);
+        errcode = 1;
+      } else if (coverage &&
+                 strncmp(str, "profiling:", (sizeof "profiling:") - 1) == 0) {
+        XBT_DEBUG("Remove line [%u]: '%s'", cpt, str);
+      } else {
+        xbt_dynar_push_as(b, char *, str);
+      }
+    }
+
+    if (rctx->output_sort) {
+      stable_sort(b);
+      /* If empty lines moved in first position, remove them */
+      while (!xbt_dynar_is_empty(b) && *xbt_dynar_getfirst_as(b, char*) == '\0')
+        xbt_dynar_shift(b, NULL);
+    }
+
+    if (rctx->output_sort || xbt_dynar_length(b) != xbt_dynar_length(a)) {
+      char *newbuf = xbt_str_join(b, "\n");
+      strcpy(rctx->output_got->data, newbuf);
+      rctx->output_got->used = strlen(newbuf);
+      xbt_free(newbuf);
+    }
+
+    xbt_dynar_free(&b);
+    xbt_dynar_free(&a);
+  }
+
   xbt_strbuff_chomp(rctx->output_got);
   xbt_strbuff_chomp(rctx->output_wanted);
   xbt_strbuff_trim(rctx->output_got);
@@ -776,39 +825,10 @@ void *rctx_wait(void *r)
     }
     rctx->expected_return = 0;
 
-    if (rctx->expected_signal) {
-      free(rctx->expected_signal);
-      rctx->expected_signal = NULL;
-    }
-  }
-  while (rctx->output_got->used
-         && !strncmp(rctx->output_got->data, "TESH_ERROR ",
-                     strlen("TESH_ERROR "))) {
-    int marklen = strlen("TESH_ERROR ");
-    char *endline = strchr(rctx->output_got->data, '\n');
-
-    XBT_CRITICAL("%.*s", (int) (endline - rctx->output_got->data - marklen),
-              rctx->output_got->data + marklen);
-    memmove(rctx->output_got->data, rctx->output_got->data + marklen,
-            rctx->output_got->used - marklen);
-    rctx->output_got->used -= endline - rctx->output_got->data + 1;
-    rctx->output_got->data[rctx->output_got->used] = '\0';
-    errcode = 1;
+    free(rctx->expected_signal);
+    rctx->expected_signal = NULL;
   }
 
-  if (rctx->output_sort) {
-    xbt_dynar_t a = xbt_str_split(rctx->output_got->data, "\n");
-    xbt_dynar_sort(a,cmpstringp);
-    char *sorted_output = xbt_str_join(a, "\n");
-    strcpy(rctx->output_got->data, sorted_output);
-    xbt_free(sorted_output);
-    xbt_dynar_free(&a);
-    /* If an empty line moved in first position, move it back to the end */
-    if (rctx->output_got->data[0]=='\n') {
-      memmove(rctx->output_got->data,rctx->output_got->data+1,rctx->output_got->used-1);
-      rctx->output_got->data[rctx->output_got->used-1] = '\n';
-    }
-  }
   if ((errcode && errcode != 1) || rctx->interrupted) {
     /* checking output, and matching */
     xbt_dynar_t a = xbt_str_split(rctx->output_got->data, "\n");
index af80e58..1fba401 100644 (file)
@@ -6,7 +6,8 @@ p This tests whether TESH accepts to ignore command output
 < > TOTO
 < < TUTU
 < $ cat
-$ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
+$ ./tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
+> Enable coverage
 > Test suite from stdin
 > [(stdin):4] cat
 > (ignoring the output of <(stdin):4> as requested)
index 34c92b1..f865e45 100644 (file)
@@ -22,6 +22,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(tesh, "TEst SHell utility");
 int timeout_value = 5;          /* child timeout value */
 int sort_len = 19;              /* length of the prefix to sort */
 char *option;
+int coverage = 0;                              /* whether the code coverage is enable */
 
 rctx_t rctx;
 const char *testsuite_name;
@@ -171,8 +172,7 @@ static void handle_suite(const char *filename, FILE * IN)
   rctx_free(rctx);
 
   /* Clear buffers */
-  if (line)
-    free(line);
+  free(line);
   xbt_strbuff_free(buff);
 
 }
@@ -183,12 +183,12 @@ static void parse_environ()
   int i;
   char *eq = NULL;
   char *key = NULL;
-  env = xbt_dict_new();
+  env = xbt_dict_new_homogeneous(xbt_free_f);
   for (i = 0; environ[i]; i++) {
     p = environ[i];
     eq = strchr(p, '=');
     key = bprintf("%.*s", (int) (eq - p), p);
-    xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f);
+    xbt_dict_set(env, key, xbt_strdup(eq + 1), NULL);
     free(key);
   }
 }
@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
       char *eq = strchr(argv[i+1], '=');
       xbt_assert(eq,"The argument of --setenv must contain a '=' (got %s instead)",argv[i+1]);
       char *key = bprintf("%.*s", (int) (eq - argv[i+1]), argv[i+1]);
-      xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f);
+      xbt_dict_set(env, key, xbt_strdup(eq + 1), NULL);
       XBT_INFO("setting environment variable '%s' to '%s'", key, eq+1);
       free(key);
       memmove(argv + i, argv + i + 2, (argc - i - 1) * sizeof(char *));
@@ -245,16 +245,25 @@ int main(int argc, char *argv[])
             XBT_ERROR("--cfg argument requires an argument");
             exit(1);
       }
-      if(!option){ //if option is NULL
+      if (!option){ //if option is NULL
        option = bprintf("--cfg=%s",argv[i+1]);
-      }else{
-       option = bprintf("%s --cfg=%s",option,argv[i+1]);
+      } else {
+        char *newoption = bprintf("%s --cfg=%s", option, argv[i+1]);
+        free(option);
+        option = newoption;
       }
       XBT_INFO("Add option \'--cfg=%s\' to command line",argv[i+1]);
       memmove(argv + i, argv + i + 2, (argc - i - 1) * sizeof(char *));
       argc -= 2;
       i -= 2;
     }
+    else if (!strcmp(argv[i], "--enable-coverage" )){
+       coverage = 1;
+       XBT_INFO("Enable coverage");
+       memmove(argv + i, argv + i + 1, (argc - i - 1) * sizeof(char *));
+       argc -= 1;
+       i -= 1;
+    }
   }
 
   /* Find the description file */
@@ -293,6 +302,6 @@ int main(int argc, char *argv[])
 
   rctx_exit();
   xbt_dict_free(&env);
-  xbt_free_f(option);
+  free(option);
   return 0;
 }
index 0dfd22b..4029614 100644 (file)
@@ -26,6 +26,7 @@ extern int timeout_value;       /* child timeout value */
 extern int sort_len;            /* length of the prefix to sort */
 extern char* option;            /* cfg for command line */
 #define SORT_LEN_DEFAULT 19
+extern int coverage;       /* coverage */
 
 extern rctx_t rctx;
 extern const char *testsuite_name;
index 787b3f9..cd41e18 100644 (file)
@@ -100,11 +100,9 @@ void Buffer_free(Buffer_t buffer)
   if (NULL == buffer)
     return;
 
-  if (NULL != buffer->data)
-    free(buffer->data);
+  free(buffer->data);
 
-  if (NULL != buffer)
-    free(buffer);
+  free(buffer);
 }
 
 /* 
index d2517ff..da18135 100644 (file)
@@ -209,8 +209,7 @@ void Stream_free(Stream_t ptr)
   if ((NULL != ptr->file) && (stdin != ptr->file))
     fclose(ptr->file);
 
-  if (NULL != ptr->line)
-    free(ptr->line);
+  free(ptr->line);
 
   DeleteCriticalSection(&cs);
 
@@ -483,8 +482,7 @@ void Stream_printLine(Stream_t stream, line_type_t line_type)
      */
   }
 
-  if (__date)
-    free(__date);
+  free(__date);
 
   Stream_unlock(stream);
 }
index 1682238..ed14c54 100644 (file)
@@ -253,9 +253,7 @@ void TestCaseContext_setName(TestCaseContext_t context, char *name)
 {
   size_t size;
 
-  if (NULL != context->name) {
-    free(context->name);
-  }
+  free(context->name);
 
   context->name = strdup(name);
   size = strlen(name);
index 73f7543..0691116 100644 (file)
@@ -241,10 +241,8 @@ void ThreadDynarray_clear(ThreadDynarray_t ptr)
 {
   ThreadDynarray_lock(ptr);
 
-  if (ptr->threads) {
-    free(ptr->threads);
-    ptr->threads = NULL;
-  }
+  free(ptr->threads);
+  ptr->threads = NULL;
 
   ptr->count = 0;
   ptr->capacity = 0;